card 1.21.0 → 1.91

Sign up to get free protection for your applications and to get access to all the features.
Files changed (614) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/card.gemspec +18 -6
  4. data/config/initializers/internationalization.rb +5 -5
  5. data/config/locales/en.yml +4 -4
  6. data/db/migrate_core_cards/20170719163708_update_bootswatch_themes.rb +80 -0
  7. data/db/migrate_core_cards/20170720093738_update_layout.rb +7 -0
  8. data/db/migrate_core_cards/20170726111053_add_bootstrap_mixins.rb +11 -0
  9. data/db/migrate_core_cards/20170726145012_select2.rb +21 -0
  10. data/db/migrate_core_cards/data/1.12_stylesheets/classic_cards.scss +6 -6
  11. data/db/migrate_core_cards/data/1.12_stylesheets/common.scss +9 -9
  12. data/db/migrate_core_cards/data/1.12_stylesheets/traditional.scss +2 -2
  13. data/db/migrate_core_cards/data/b4_themes/bootstrap_default/_bootswatch.scss +0 -0
  14. data/db/migrate_core_cards/data/b4_themes/bootstrap_default/_variables.scss +961 -0
  15. data/db/migrate_core_cards/data/b4_themes/cerulean/_bootswatch.scss +67 -0
  16. data/db/migrate_core_cards/data/b4_themes/cerulean/_variables.scss +961 -0
  17. data/db/migrate_core_cards/data/b4_themes/cerulean/thumbnail.png +0 -0
  18. data/db/migrate_core_cards/data/b4_themes/cosmo/_bootswatch.scss +45 -0
  19. data/db/migrate_core_cards/data/b4_themes/cosmo/_variables.scss +961 -0
  20. data/db/migrate_core_cards/data/b4_themes/cosmo/thumbnail.png +0 -0
  21. data/db/migrate_core_cards/data/b4_themes/cyborg/_bootswatch.scss +141 -0
  22. data/db/migrate_core_cards/data/b4_themes/cyborg/_variables.scss +961 -0
  23. data/db/migrate_core_cards/data/b4_themes/cyborg/thumbnail.png +0 -0
  24. data/db/migrate_core_cards/data/b4_themes/darkly/_bootswatch.scss +142 -0
  25. data/db/migrate_core_cards/data/b4_themes/darkly/_variables.scss +961 -0
  26. data/db/migrate_core_cards/data/b4_themes/darkly/thumbnail.png +0 -0
  27. data/db/migrate_core_cards/data/b4_themes/flatly/_bootswatch.scss +107 -0
  28. data/db/migrate_core_cards/data/b4_themes/flatly/_variables.scss +961 -0
  29. data/db/migrate_core_cards/data/b4_themes/flatly/thumbnail.png +0 -0
  30. data/db/migrate_core_cards/data/b4_themes/journal/_bootswatch.scss +69 -0
  31. data/db/migrate_core_cards/data/b4_themes/journal/_variables.scss +961 -0
  32. data/db/migrate_core_cards/data/b4_themes/journal/thumbnail.png +0 -0
  33. data/db/migrate_core_cards/data/b4_themes/litera/_bootswatch.scss +130 -0
  34. data/db/migrate_core_cards/data/b4_themes/litera/_variables.scss +961 -0
  35. data/db/migrate_core_cards/data/b4_themes/litera/thumbnail.png +0 -0
  36. data/db/migrate_core_cards/data/b4_themes/lumen/_bootswatch.scss +294 -0
  37. data/db/migrate_core_cards/data/b4_themes/lumen/_variables.scss +961 -0
  38. data/db/migrate_core_cards/data/b4_themes/lumen/thumbnail.png +0 -0
  39. data/db/migrate_core_cards/data/b4_themes/lux/_bootswatch.scss +111 -0
  40. data/db/migrate_core_cards/data/b4_themes/lux/_variables.scss +961 -0
  41. data/db/migrate_core_cards/data/b4_themes/lux/thumbnail.png +0 -0
  42. data/db/migrate_core_cards/data/b4_themes/materia/_bootswatch.scss +610 -0
  43. data/db/migrate_core_cards/data/b4_themes/materia/_variables.scss +961 -0
  44. data/db/migrate_core_cards/data/b4_themes/materia/thumbnail.png +0 -0
  45. data/db/migrate_core_cards/data/b4_themes/minty/_bootswatch.scss +85 -0
  46. data/db/migrate_core_cards/data/b4_themes/minty/_variables.scss +961 -0
  47. data/db/migrate_core_cards/data/b4_themes/minty/thumbnail.png +0 -0
  48. data/db/migrate_core_cards/data/b4_themes/paper/_bootswatch.scss +607 -0
  49. data/db/migrate_core_cards/data/b4_themes/paper/_variables.scss +861 -0
  50. data/db/migrate_core_cards/data/b4_themes/pulse/_bootswatch.scss +122 -0
  51. data/db/migrate_core_cards/data/b4_themes/pulse/_variables.scss +961 -0
  52. data/db/migrate_core_cards/data/b4_themes/pulse/thumbnail.png +0 -0
  53. data/db/migrate_core_cards/data/b4_themes/readable/_bootswatch.scss +174 -0
  54. data/db/migrate_core_cards/data/b4_themes/readable/_variables.scss +861 -0
  55. data/db/migrate_core_cards/data/b4_themes/sandstone/_bootswatch.scss +152 -0
  56. data/db/migrate_core_cards/data/b4_themes/sandstone/_variables.scss +961 -0
  57. data/db/migrate_core_cards/data/b4_themes/sandstone/thumbnail.png +0 -0
  58. data/db/migrate_core_cards/data/b4_themes/simplex/_bootswatch.scss +103 -0
  59. data/db/migrate_core_cards/data/b4_themes/simplex/_variables.scss +961 -0
  60. data/db/migrate_core_cards/data/b4_themes/simplex/thumbnail.png +0 -0
  61. data/db/migrate_core_cards/data/b4_themes/slate/_bootswatch.scss +274 -0
  62. data/db/migrate_core_cards/data/b4_themes/slate/_variables.scss +961 -0
  63. data/db/migrate_core_cards/data/b4_themes/slate/thumbnail.png +0 -0
  64. data/db/migrate_core_cards/data/b4_themes/solar/_bootswatch.scss +45 -0
  65. data/db/migrate_core_cards/data/b4_themes/solar/_variables.scss +961 -0
  66. data/db/migrate_core_cards/data/b4_themes/solar/thumbnail.png +0 -0
  67. data/db/migrate_core_cards/data/b4_themes/spacelab/_bootswatch.scss +125 -0
  68. data/db/migrate_core_cards/data/b4_themes/spacelab/_variables.scss +961 -0
  69. data/db/migrate_core_cards/data/b4_themes/spacelab/thumbnail.png +0 -0
  70. data/db/migrate_core_cards/data/b4_themes/superhero/_bootswatch.scss +136 -0
  71. data/db/migrate_core_cards/data/b4_themes/superhero/_variables.scss +961 -0
  72. data/db/migrate_core_cards/data/b4_themes/superhero/thumbnail.png +0 -0
  73. data/db/migrate_core_cards/data/b4_themes/united/_bootswatch.scss +32 -0
  74. data/db/migrate_core_cards/data/b4_themes/united/_variables.scss +961 -0
  75. data/db/migrate_core_cards/data/b4_themes/united/thumbnail.png +0 -0
  76. data/db/migrate_core_cards/data/b4_themes/yeti/_bootswatch.scss +304 -0
  77. data/db/migrate_core_cards/data/b4_themes/yeti/_full.scss +9921 -0
  78. data/db/migrate_core_cards/data/b4_themes/yeti/_variables.scss +961 -0
  79. data/db/migrate_core_cards/data/b4_themes/yeti/thumbnail.png +0 -0
  80. data/db/migrate_core_cards/data/cards.yml +11 -0
  81. data/db/migrate_core_cards/data/cards/*header +16 -0
  82. data/db/migrate_core_cards/data/cards/*main_menu +2 -0
  83. data/db/seeds.rb +3 -3
  84. data/lib/card.rb +3 -1
  85. data/lib/card/act_manager/stage.rb +1 -1
  86. data/lib/card/act_manager/stage_director.rb +3 -0
  87. data/lib/card/auth/current.rb +9 -3
  88. data/lib/card/codename.rb +1 -2
  89. data/lib/card/error.rb +1 -1
  90. data/lib/card/migration.rb +1 -1
  91. data/lib/card/migration/import.rb +85 -72
  92. data/lib/card/migration/import/import_data.rb +20 -24
  93. data/lib/card/migration/import/import_data/card_content.rb +2 -4
  94. data/lib/card/migration/import/merger.rb +6 -17
  95. data/lib/card/set/event.rb +1 -1
  96. data/lib/card/set_pattern.rb +0 -1
  97. data/lib/card/subcards.rb +4 -3
  98. data/lib/card/tasks/card.rake +10 -6
  99. data/lib/card/tasks/card/create.rake +1 -1
  100. data/lib/cardio.rb +1 -1
  101. data/mod/account/set/right/password.rb +1 -1
  102. data/mod/account/set/self/account_links.rb +8 -6
  103. data/mod/ace_editor/lib/javascript/script_ace_config.js.coffee +8 -8
  104. data/mod/ace_editor/set/abstract/ace_editor.rb +1 -1
  105. data/mod/admin/set/self/admin_info.rb +3 -6
  106. data/mod/basic_formats/set/all/base.rb +11 -1
  107. data/mod/bootstrap/file/cerulean_skin_image/image-icon.png +0 -0
  108. data/mod/bootstrap/file/cerulean_skin_image/image-large.png +0 -0
  109. data/mod/bootstrap/file/cerulean_skin_image/image-medium.png +0 -0
  110. data/mod/bootstrap/file/cerulean_skin_image/image-original.png +0 -0
  111. data/mod/bootstrap/file/cerulean_skin_image/image-small.png +0 -0
  112. data/mod/bootstrap/file/cosmo_skin_image/image-icon.png +0 -0
  113. data/mod/bootstrap/file/cosmo_skin_image/image-large.png +0 -0
  114. data/mod/bootstrap/file/cosmo_skin_image/image-medium.png +0 -0
  115. data/mod/bootstrap/file/cosmo_skin_image/image-original.png +0 -0
  116. data/mod/bootstrap/file/cosmo_skin_image/image-small.png +0 -0
  117. data/mod/bootstrap/file/cyborg_skin_image/image-icon.png +0 -0
  118. data/mod/bootstrap/file/cyborg_skin_image/image-large.png +0 -0
  119. data/mod/bootstrap/file/cyborg_skin_image/image-medium.png +0 -0
  120. data/mod/bootstrap/file/cyborg_skin_image/image-original.png +0 -0
  121. data/mod/bootstrap/file/cyborg_skin_image/image-small.png +0 -0
  122. data/mod/bootstrap/file/darkly_skin_image/image-icon.png +0 -0
  123. data/mod/bootstrap/file/darkly_skin_image/image-large.png +0 -0
  124. data/mod/bootstrap/file/darkly_skin_image/image-medium.png +0 -0
  125. data/mod/bootstrap/file/darkly_skin_image/image-original.png +0 -0
  126. data/mod/bootstrap/file/darkly_skin_image/image-small.png +0 -0
  127. data/mod/bootstrap/file/flatly_skin_image/image-icon.png +0 -0
  128. data/mod/bootstrap/file/flatly_skin_image/image-large.png +0 -0
  129. data/mod/bootstrap/file/flatly_skin_image/image-medium.png +0 -0
  130. data/mod/bootstrap/file/flatly_skin_image/image-original.png +0 -0
  131. data/mod/bootstrap/file/flatly_skin_image/image-small.png +0 -0
  132. data/mod/bootstrap/file/journal_skin_image/image-icon.png +0 -0
  133. data/mod/bootstrap/file/journal_skin_image/image-large.png +0 -0
  134. data/mod/bootstrap/file/journal_skin_image/image-medium.png +0 -0
  135. data/mod/bootstrap/file/journal_skin_image/image-original.png +0 -0
  136. data/mod/bootstrap/file/journal_skin_image/image-small.png +0 -0
  137. data/mod/bootstrap/file/lumen_skin_image/image-icon.png +0 -0
  138. data/mod/bootstrap/file/lumen_skin_image/image-large.png +0 -0
  139. data/mod/bootstrap/file/lumen_skin_image/image-medium.png +0 -0
  140. data/mod/bootstrap/file/lumen_skin_image/image-original.png +0 -0
  141. data/mod/bootstrap/file/lumen_skin_image/image-small.png +0 -0
  142. data/mod/bootstrap/file/sandstone_skin_image/image-icon.png +0 -0
  143. data/mod/bootstrap/file/sandstone_skin_image/image-large.png +0 -0
  144. data/mod/bootstrap/file/sandstone_skin_image/image-medium.png +0 -0
  145. data/mod/bootstrap/file/sandstone_skin_image/image-original.png +0 -0
  146. data/mod/bootstrap/file/sandstone_skin_image/image-small.png +0 -0
  147. data/mod/bootstrap/file/simplex_skin_image/image-icon.png +0 -0
  148. data/mod/bootstrap/file/simplex_skin_image/image-large.png +0 -0
  149. data/mod/bootstrap/file/simplex_skin_image/image-medium.png +0 -0
  150. data/mod/bootstrap/file/simplex_skin_image/image-original.png +0 -0
  151. data/mod/bootstrap/file/simplex_skin_image/image-small.png +0 -0
  152. data/mod/bootstrap/file/slate_skin_image/image-icon.png +0 -0
  153. data/mod/bootstrap/file/slate_skin_image/image-large.png +0 -0
  154. data/mod/bootstrap/file/slate_skin_image/image-medium.png +0 -0
  155. data/mod/bootstrap/file/slate_skin_image/image-original.png +0 -0
  156. data/mod/bootstrap/file/slate_skin_image/image-small.png +0 -0
  157. data/mod/bootstrap/file/spacelab_skin_image/image-icon.png +0 -0
  158. data/mod/bootstrap/file/spacelab_skin_image/image-large.png +0 -0
  159. data/mod/bootstrap/file/spacelab_skin_image/image-medium.png +0 -0
  160. data/mod/bootstrap/file/spacelab_skin_image/image-original.png +0 -0
  161. data/mod/bootstrap/file/spacelab_skin_image/image-small.png +0 -0
  162. data/mod/bootstrap/file/superhero_skin_image/image-icon.png +0 -0
  163. data/mod/bootstrap/file/superhero_skin_image/image-large.png +0 -0
  164. data/mod/bootstrap/file/superhero_skin_image/image-medium.png +0 -0
  165. data/mod/bootstrap/file/superhero_skin_image/image-original.png +0 -0
  166. data/mod/bootstrap/file/superhero_skin_image/image-small.png +0 -0
  167. data/mod/bootstrap/file/united_skin_image/image-icon.png +0 -0
  168. data/mod/bootstrap/file/united_skin_image/image-large.png +0 -0
  169. data/mod/bootstrap/file/united_skin_image/image-medium.png +0 -0
  170. data/mod/bootstrap/file/united_skin_image/image-original.png +0 -0
  171. data/mod/bootstrap/file/united_skin_image/image-small.png +0 -0
  172. data/mod/bootstrap/file/yeti_skin_image/image-icon.png +0 -0
  173. data/mod/bootstrap/file/yeti_skin_image/image-large.png +0 -0
  174. data/mod/bootstrap/file/yeti_skin_image/image-medium.png +0 -0
  175. data/mod/bootstrap/file/yeti_skin_image/image-original.png +0 -0
  176. data/mod/bootstrap/file/yeti_skin_image/image-small.png +0 -0
  177. data/mod/bootstrap/lib/bootstrap/component/panel.rb +3 -3
  178. data/mod/bootstrap/lib/javascript/bootstrap.js +2953 -1735
  179. data/mod/bootstrap/lib/javascript/bootstrap.min.js +4 -4
  180. data/mod/bootstrap/lib/javascript/script_load_select2.js.coffee +9 -0
  181. data/mod/bootstrap/lib/javascript/script_select2.js +5725 -0
  182. data/mod/bootstrap/lib/javascript/select2.min.js +3 -0
  183. data/mod/bootstrap/lib/javascript/tether.min.js +1 -0
  184. data/mod/bootstrap/lib/stylesheets/bootstrap.css +9320 -0
  185. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/.scss-lint.yml +548 -0
  186. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_alert.scss +55 -0
  187. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_badge.scss +77 -0
  188. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_breadcrumb.scss +38 -0
  189. data/mod/bootstrap/lib/stylesheets/bootstrap/{_button-groups.scss → scss/_button-group.scss} +46 -87
  190. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_buttons.scss +170 -0
  191. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_card.scss +276 -0
  192. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_carousel.scss +178 -0
  193. data/mod/bootstrap/lib/stylesheets/bootstrap/{_close.scss → scss/_close.scss} +7 -12
  194. data/mod/bootstrap/lib/stylesheets/bootstrap/{_code.scss → scss/_code.scss} +19 -24
  195. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_custom-forms.scss +263 -0
  196. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_custom.scss +4 -0
  197. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_dropdown.scss +161 -0
  198. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_forms.scss +388 -0
  199. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_grid.scss +52 -0
  200. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_images.scss +43 -0
  201. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_input-group.scss +178 -0
  202. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_jumbotron.scss +20 -0
  203. data/mod/bootstrap/lib/stylesheets/bootstrap/{_list-group.scss → scss/_list-group.scss} +71 -54
  204. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_media.scss +8 -0
  205. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_mixins.scss +57 -0
  206. data/mod/bootstrap/lib/stylesheets/bootstrap/{_modals.scss → scss/_modal.scss} +45 -53
  207. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_nav.scss +119 -0
  208. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_navbar.scss +268 -0
  209. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_normalize.scss +461 -0
  210. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_pagination.scss +67 -0
  211. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_popover.scss +171 -0
  212. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_print.scss +119 -0
  213. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_progress.scss +32 -0
  214. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_reboot.scss +389 -0
  215. data/mod/bootstrap/lib/stylesheets/bootstrap/{_responsive-embed.scss → scss/_responsive-embed.scss} +26 -9
  216. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_tables.scss +153 -0
  217. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_tooltip.scss +90 -0
  218. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_transitions.scss +34 -0
  219. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_type.scss +143 -0
  220. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_utilities.scss +13 -0
  221. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/_variables.scss +961 -0
  222. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/bootstrap-grid.scss +43 -0
  223. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/bootstrap-reboot.scss +10 -0
  224. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/bootstrap.scss +54 -0
  225. data/mod/bootstrap/lib/stylesheets/bootstrap/{mixins/_alerts.scss → scss/mixins/_alert.scss} +3 -3
  226. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_background-variant.scss +12 -0
  227. data/mod/bootstrap/lib/stylesheets/bootstrap/{mixins/_labels.scss → scss/mixins/_badge.scss} +3 -4
  228. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_border-radius.scss +35 -0
  229. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_breakpoints.scss +95 -0
  230. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_buttons.scss +86 -0
  231. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_cards.scss +47 -0
  232. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_clearfix.scss +7 -0
  233. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_float.scss +9 -0
  234. data/mod/bootstrap/lib/stylesheets/bootstrap/{mixins → scss/mixins}/_forms.scss +27 -36
  235. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_gradients.scss +37 -0
  236. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_grid-framework.scss +65 -0
  237. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_grid.scss +100 -0
  238. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_hover.scss +60 -0
  239. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_image.scss +36 -0
  240. data/mod/bootstrap/lib/stylesheets/bootstrap/{mixins → scss/mixins}/_list-group.scss +5 -8
  241. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_lists.scss +7 -0
  242. data/mod/bootstrap/lib/stylesheets/bootstrap/{mixins → scss/mixins}/_nav-divider.scss +1 -1
  243. data/mod/bootstrap/lib/stylesheets/bootstrap/{mixins/_nav-vertical-align.scss → scss/mixins/_navbar-align.scss} +4 -4
  244. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_pagination.scss +21 -0
  245. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_reset-text.scss +17 -0
  246. data/mod/bootstrap/lib/stylesheets/bootstrap/{mixins → scss/mixins}/_resize.scss +0 -0
  247. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_screen-reader.scss +32 -0
  248. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_size.scss +6 -0
  249. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_table-row.scss +30 -0
  250. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_text-emphasis.scss +12 -0
  251. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_text-hide.scss +8 -0
  252. data/mod/bootstrap/lib/stylesheets/bootstrap/{mixins/_text-overflow.scss → scss/mixins/_text-truncate.scss} +3 -3
  253. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_transforms.scss +14 -0
  254. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/mixins/_visibility.scss +5 -0
  255. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_align.scss +6 -0
  256. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_background.scss +19 -0
  257. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_borders.scss +37 -0
  258. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_clearfix.scss +3 -0
  259. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_display.scss +18 -0
  260. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_flex.scss +48 -0
  261. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_float.scss +9 -0
  262. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_position.scss +23 -0
  263. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_screenreaders.scss +11 -0
  264. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_sizing.scss +10 -0
  265. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_spacing.scss +43 -0
  266. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_text.scss +61 -0
  267. data/mod/bootstrap/lib/stylesheets/bootstrap/scss/utilities/_visibility.scss +55 -0
  268. data/mod/bootstrap/lib/stylesheets/bootstrap_cards.scss +46 -9
  269. data/mod/bootstrap/lib/stylesheets/font-awesome.css +2337 -0
  270. data/mod/bootstrap/lib/stylesheets/material-icons.css +36 -0
  271. data/mod/bootstrap/lib/stylesheets/select2-boostrap-v4-alpha-6.scss +828 -0
  272. data/mod/bootstrap/lib/stylesheets/select2.min.css +1 -0
  273. data/mod/bootstrap/lib/stylesheets/style_select2.css +484 -0
  274. data/mod/bootstrap/lib/stylesheets/style_select2_bootstrap.scss +828 -0
  275. data/mod/bootstrap/set/abstract/bootstrap_code_file.rb +39 -0
  276. data/mod/bootstrap/set/all/bootstrap/helper.rb +65 -9
  277. data/mod/bootstrap/set/all/bootstrap/navbar.rb +35 -49
  278. data/mod/bootstrap/set/all/bootstrap/tabs.rb +3 -2
  279. data/mod/bootstrap/set/all/bootstrap/wrapper.rb +8 -5
  280. data/mod/bootstrap/set/all/rich_bootstrap.rb +1 -1
  281. data/mod/bootstrap/set/self/bootstrap_js.rb +1 -1
  282. data/mod/bootstrap/set/self/bootswatch_shared.rb +21 -33
  283. data/mod/bootstrap/set/self/script_load_select2.rb +1 -0
  284. data/mod/bootstrap/set/self/script_select2.rb +1 -0
  285. data/mod/bootstrap/set/self/style_bootstrap_breakpoints.rb +6 -0
  286. data/mod/bootstrap/set/self/style_bootstrap_mixins.rb +7 -0
  287. data/mod/bootstrap/set/self/style_select2.rb +1 -0
  288. data/mod/carrierwave/set/abstract/attachment/storage_type.rb +11 -2
  289. data/mod/carrierwave/set/type/file.rb +6 -2
  290. data/mod/carrierwave/spec/set/type/file_spec.rb +13 -3
  291. data/mod/core/set/all/content.rb +1 -1
  292. data/mod/core/spec/format/html_format_spec.rb +35 -48
  293. data/mod/core/spec/set/all/collection_spec.rb +1 -1
  294. data/mod/history/lib/card/act/act_renderer.rb +2 -2
  295. data/mod/history/set/all/act_view.rb +5 -5
  296. data/mod/history/set/all/action_view.rb +2 -2
  297. data/mod/history/set/all/history.rb +1 -1
  298. data/mod/machines/file/all_script_machine_output/file.js +8 -7
  299. data/mod/machines/lib/javascript/{wagn.js.coffee → decko.js.coffee} +23 -23
  300. data/mod/machines/lib/javascript/{wagn_editor.js.coffee → decko_editor.js.coffee} +6 -6
  301. data/mod/machines/lib/javascript/{wagn_layout.js.coffee → decko_layout.js.coffee} +10 -6
  302. data/mod/machines/lib/javascript/{wagn_mod.js.coffee → decko_mod.js.coffee} +9 -9
  303. data/mod/machines/lib/javascript/{wagn_navbox.js.coffee → decko_navbox.js.coffee} +8 -8
  304. data/mod/machines/lib/javascript/{wagn_upload.js.coffee → decko_upload.js.coffee} +4 -4
  305. data/mod/machines/lib/javascript/script_card_menu.js.coffee +3 -4
  306. data/mod/machines/lib/stylesheets/style_cards.scss +28 -27
  307. data/mod/machines/set/self/script_slot.rb +1 -1
  308. data/mod/notifications/set/all/follow.rb +1 -1
  309. data/mod/notifications/set/right/following.rb +1 -1
  310. data/mod/notifications/set/type_plus_right/user/follow.rb +1 -1
  311. data/mod/pointer/lib/javascript/script_pointer_config.js.coffee +6 -5
  312. data/mod/pointer/set/abstract/01_paging.rb +2 -3
  313. data/mod/pointer/set/abstract/02_pointer/edit.rb +13 -0
  314. data/mod/prosemirror_editor/lib/javascript/script_prosemirror_config.js.coffee +5 -5
  315. data/mod/prosemirror_editor/set/abstract/prosemirror_editor.rb +1 -1
  316. data/mod/settings/spec/set/right/comment_spec.rb +1 -3
  317. data/mod/standard/set/abstract/toolbar_split_button.rb +2 -2
  318. data/mod/standard/set/all/comment.rb +1 -0
  319. data/mod/standard/set/all/error.rb +1 -1
  320. data/mod/standard/set/all/rich_html/classy.rb +1 -1
  321. data/mod/standard/set/all/rich_html/content.rb +5 -5
  322. data/mod/standard/set/all/rich_html/editor.rb +2 -2
  323. data/mod/standard/set/all/rich_html/form.rb +1 -1
  324. data/mod/standard/set/all/rich_html/header.rb +7 -15
  325. data/mod/standard/set/all/rich_html/menu.rb +12 -10
  326. data/mod/standard/set/all/rich_html/toolbar.rb +18 -19
  327. data/mod/standard/set/all/rich_html/wrapper.rb +4 -6
  328. data/mod/standard/set/rstar/rules_editor.rb +1 -1
  329. data/mod/standard/set/self/activity_toolbar_button.rb +4 -4
  330. data/mod/standard/set/self/navbox.rb +5 -10
  331. data/mod/standard/set/self/rules_toolbar_button.rb +2 -1
  332. data/mod/standard/set/type/set.rb +35 -33
  333. data/mod/standard/spec/chunk/include_spec.rb +4 -4
  334. data/mod/standard/spec/set/all/history_spec.rb +1 -1
  335. data/mod/standard/spec/set/all/rich_html/wrapper_spec.rb +8 -8
  336. data/mod/standard/spec/set/type/phrase_spec.rb +1 -1
  337. data/mod/standard/spec/set/type/uri_spec.rb +1 -1
  338. data/mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee +6 -6
  339. data/mod/tinymce_editor/set/abstract/tinymce_editor.rb +1 -1
  340. data/script/fetch_bootswatch_themes.rb +38 -0
  341. data/spec/lib/card/cache_spec.rb +1 -1
  342. data/spec/lib/card/migration/import_spec.rb +23 -17
  343. data/spec/support/helper/render_helper.rb +10 -3
  344. metadata +189 -298
  345. data/mod/bootstrap/lib/stylesheets/bootstrap/_alerts.scss +0 -73
  346. data/mod/bootstrap/lib/stylesheets/bootstrap/_badges.scss +0 -68
  347. data/mod/bootstrap/lib/stylesheets/bootstrap/_breadcrumbs.scss +0 -26
  348. data/mod/bootstrap/lib/stylesheets/bootstrap/_buttons.scss +0 -160
  349. data/mod/bootstrap/lib/stylesheets/bootstrap/_carousel.scss +0 -269
  350. data/mod/bootstrap/lib/stylesheets/bootstrap/_component-animations.scss +0 -37
  351. data/mod/bootstrap/lib/stylesheets/bootstrap/_dropdowns.scss +0 -214
  352. data/mod/bootstrap/lib/stylesheets/bootstrap/_forms.scss +0 -578
  353. data/mod/bootstrap/lib/stylesheets/bootstrap/_glyphicons.scss +0 -305
  354. data/mod/bootstrap/lib/stylesheets/bootstrap/_grid.scss +0 -84
  355. data/mod/bootstrap/lib/stylesheets/bootstrap/_input-groups.scss +0 -166
  356. data/mod/bootstrap/lib/stylesheets/bootstrap/_jumbotron.scss +0 -50
  357. data/mod/bootstrap/lib/stylesheets/bootstrap/_labels.scss +0 -66
  358. data/mod/bootstrap/lib/stylesheets/bootstrap/_media.scss +0 -61
  359. data/mod/bootstrap/lib/stylesheets/bootstrap/_mixins.scss +0 -39
  360. data/mod/bootstrap/lib/stylesheets/bootstrap/_navbar.scss +0 -662
  361. data/mod/bootstrap/lib/stylesheets/bootstrap/_navs.scss +0 -242
  362. data/mod/bootstrap/lib/stylesheets/bootstrap/_normalize.scss +0 -427
  363. data/mod/bootstrap/lib/stylesheets/bootstrap/_pager.scss +0 -54
  364. data/mod/bootstrap/lib/stylesheets/bootstrap/_pagination.scss +0 -88
  365. data/mod/bootstrap/lib/stylesheets/bootstrap/_panels.scss +0 -265
  366. data/mod/bootstrap/lib/stylesheets/bootstrap/_popovers.scss +0 -135
  367. data/mod/bootstrap/lib/stylesheets/bootstrap/_print.scss +0 -107
  368. data/mod/bootstrap/lib/stylesheets/bootstrap/_progress-bars.scss +0 -87
  369. data/mod/bootstrap/lib/stylesheets/bootstrap/_responsive-utilities.scss +0 -177
  370. data/mod/bootstrap/lib/stylesheets/bootstrap/_scaffolding.scss +0 -162
  371. data/mod/bootstrap/lib/stylesheets/bootstrap/_tables.scss +0 -237
  372. data/mod/bootstrap/lib/stylesheets/bootstrap/_theme.scss +0 -273
  373. data/mod/bootstrap/lib/stylesheets/bootstrap/_thumbnails.scss +0 -38
  374. data/mod/bootstrap/lib/stylesheets/bootstrap/_tooltip.scss +0 -102
  375. data/mod/bootstrap/lib/stylesheets/bootstrap/_type.scss +0 -298
  376. data/mod/bootstrap/lib/stylesheets/bootstrap/_utilities.scss +0 -55
  377. data/mod/bootstrap/lib/stylesheets/bootstrap/_variables.scss +0 -866
  378. data/mod/bootstrap/lib/stylesheets/bootstrap/_wells.scss +0 -29
  379. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_background-variant.scss +0 -11
  380. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_border-radius.scss +0 -18
  381. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_buttons.scss +0 -52
  382. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
  383. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_clearfix.scss +0 -22
  384. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_gradients.scss +0 -58
  385. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -81
  386. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_grid.scss +0 -122
  387. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_hide-text.scss +0 -21
  388. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_image.scss +0 -33
  389. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_opacity.scss +0 -8
  390. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_pagination.scss +0 -23
  391. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_panels.scss +0 -24
  392. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_progress-bar.scss +0 -10
  393. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
  394. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -21
  395. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_size.scss +0 -10
  396. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
  397. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_table-row.scss +0 -28
  398. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -11
  399. data/mod/bootstrap/lib/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +0 -222
  400. data/mod/machines/file/all_style_machine_output/file.css +0 -19
  401. data/tmpsets/set/mod001-core/abstract/code_file.rb +0 -79
  402. data/tmpsets/set/mod001-core/all/actify.rb +0 -100
  403. data/tmpsets/set/mod001-core/all/active_card.rb +0 -42
  404. data/tmpsets/set/mod001-core/all/collection.rb +0 -313
  405. data/tmpsets/set/mod001-core/all/content.rb +0 -69
  406. data/tmpsets/set/mod001-core/all/erb.rb +0 -18
  407. data/tmpsets/set/mod001-core/all/event.rb +0 -62
  408. data/tmpsets/set/mod001-core/all/export.rb +0 -49
  409. data/tmpsets/set/mod001-core/all/fetch.rb +0 -335
  410. data/tmpsets/set/mod001-core/all/haml.rb +0 -14
  411. data/tmpsets/set/mod001-core/all/initialize.rb +0 -42
  412. data/tmpsets/set/mod001-core/all/location_history.rb +0 -15
  413. data/tmpsets/set/mod001-core/all/name.rb +0 -282
  414. data/tmpsets/set/mod001-core/all/name_validations.rb +0 -65
  415. data/tmpsets/set/mod001-core/all/pattern.rb +0 -67
  416. data/tmpsets/set/mod001-core/all/permissions.rb +0 -309
  417. data/tmpsets/set/mod001-core/all/phases.rb +0 -23
  418. data/tmpsets/set/mod001-core/all/references.rb +0 -187
  419. data/tmpsets/set/mod001-core/all/rules.rb +0 -311
  420. data/tmpsets/set/mod001-core/all/stages.rb +0 -31
  421. data/tmpsets/set/mod001-core/all/states.rb +0 -31
  422. data/tmpsets/set/mod001-core/all/subcards.rb +0 -85
  423. data/tmpsets/set/mod001-core/all/templating.rb +0 -78
  424. data/tmpsets/set/mod001-core/all/tracked_attributes.rb +0 -154
  425. data/tmpsets/set/mod001-core/all/trash.rb +0 -63
  426. data/tmpsets/set/mod001-core/all/type.rb +0 -60
  427. data/tmpsets/set/mod001-core/all/utils.rb +0 -132
  428. data/tmpsets/set/mod001-core/all/view_cache.rb +0 -16
  429. data/tmpsets/set/mod002-history/all/actions.rb +0 -60
  430. data/tmpsets/set/mod002-history/all/content_history.rb +0 -168
  431. data/tmpsets/set/mod002-history/all/history.rb +0 -407
  432. data/tmpsets/set/mod003-basic_formats/all/all_css.rb +0 -45
  433. data/tmpsets/set/mod003-basic_formats/all/all_csv.rb +0 -56
  434. data/tmpsets/set/mod003-basic_formats/all/all_js.rb +0 -13
  435. data/tmpsets/set/mod003-basic_formats/all/base.rb +0 -155
  436. data/tmpsets/set/mod003-basic_formats/all/file.rb +0 -16
  437. data/tmpsets/set/mod003-basic_formats/all/json.rb +0 -76
  438. data/tmpsets/set/mod003-basic_formats/all/rss.rb +0 -77
  439. data/tmpsets/set/mod003-basic_formats/all/text.rb +0 -13
  440. data/tmpsets/set/mod003-basic_formats/self/01_head/javascript.rb +0 -79
  441. data/tmpsets/set/mod003-basic_formats/self/head.rb +0 -101
  442. data/tmpsets/set/mod004-pointer/abstract/01_pointer.rb +0 -193
  443. data/tmpsets/set/mod004-pointer/abstract/01_pointer/edit.rb +0 -224
  444. data/tmpsets/set/mod004-pointer/abstract/code_pointer.rb +0 -16
  445. data/tmpsets/set/mod004-pointer/self/script_editors.rb +0 -8
  446. data/tmpsets/set/mod004-pointer/self/script_mods.rb +0 -8
  447. data/tmpsets/set/mod004-pointer/self/script_pointer_config.rb +0 -10
  448. data/tmpsets/set/mod004-pointer/type/pointer.rb +0 -8
  449. data/tmpsets/set/mod005-ace_editor/abstract/ace_editor.rb +0 -18
  450. data/tmpsets/set/mod005-ace_editor/self/script_ace.rb +0 -10
  451. data/tmpsets/set/mod005-ace_editor/self/script_ace_config.rb +0 -12
  452. data/tmpsets/set/mod006-prosemirror_editor/abstract/prosemirror_editor.rb +0 -14
  453. data/tmpsets/set/mod006-prosemirror_editor/self/script_prosemirror.rb +0 -10
  454. data/tmpsets/set/mod006-prosemirror_editor/self/script_prosemirror_config.rb +0 -13
  455. data/tmpsets/set/mod008-solid_cache/abstract/solid_cache.rb +0 -106
  456. data/tmpsets/set/mod008-solid_cache/all/solid_cache.rb +0 -21
  457. data/tmpsets/set/mod008-solid_cache/right/solid_cache.rb +0 -39
  458. data/tmpsets/set/mod009-basic_types/type/html.rb +0 -26
  459. data/tmpsets/set/mod009-basic_types/type/plain_text.rb +0 -19
  460. data/tmpsets/set/mod010-machines/abstract/script.rb +0 -49
  461. data/tmpsets/set/mod010-machines/all/reset_machines.rb +0 -19
  462. data/tmpsets/set/mod010-machines/right/machine_cache.rb +0 -18
  463. data/tmpsets/set/mod010-machines/right/machine_input.rb +0 -10
  464. data/tmpsets/set/mod010-machines/right/machine_output.rb +0 -39
  465. data/tmpsets/set/mod010-machines/self/script_card_menu.rb +0 -8
  466. data/tmpsets/set/mod010-machines/self/script_html5shiv_printshiv.rb +0 -8
  467. data/tmpsets/set/mod010-machines/self/script_jquery.rb +0 -8
  468. data/tmpsets/set/mod010-machines/self/script_jquery_helper.rb +0 -16
  469. data/tmpsets/set/mod010-machines/self/script_slot.rb +0 -14
  470. data/tmpsets/set/mod010-machines/self/style_bootstrap_compatible.rb +0 -8
  471. data/tmpsets/set/mod010-machines/self/style_cards.rb +0 -8
  472. data/tmpsets/set/mod010-machines/self/style_jquery_ui_smoothness.rb +0 -8
  473. data/tmpsets/set/mod010-machines/type/coffee_script.rb +0 -47
  474. data/tmpsets/set/mod010-machines/type/css.rb +0 -67
  475. data/tmpsets/set/mod010-machines/type/java_script.rb +0 -36
  476. data/tmpsets/set/mod010-machines/type/scss.rb +0 -21
  477. data/tmpsets/set/mod010-machines/type/skin.rb +0 -13
  478. data/tmpsets/set/mod011-settings/abstract/permission.rb +0 -119
  479. data/tmpsets/set/mod011-settings/right/add_help.rb +0 -18
  480. data/tmpsets/set/mod011-settings/right/comment.rb +0 -8
  481. data/tmpsets/set/mod011-settings/right/create.rb +0 -8
  482. data/tmpsets/set/mod011-settings/right/default.rb +0 -14
  483. data/tmpsets/set/mod011-settings/right/delete.rb +0 -8
  484. data/tmpsets/set/mod011-settings/right/help.rb +0 -10
  485. data/tmpsets/set/mod011-settings/right/read.rb +0 -10
  486. data/tmpsets/set/mod011-settings/right/script.rb +0 -16
  487. data/tmpsets/set/mod011-settings/right/structure.rb +0 -68
  488. data/tmpsets/set/mod011-settings/right/style.rb +0 -17
  489. data/tmpsets/set/mod011-settings/right/update.rb +0 -8
  490. data/tmpsets/set/mod011-settings/self/accountable.rb +0 -10
  491. data/tmpsets/set/mod011-settings/self/add_help.rb +0 -9
  492. data/tmpsets/set/mod011-settings/self/autoname.rb +0 -9
  493. data/tmpsets/set/mod011-settings/self/captcha.rb +0 -9
  494. data/tmpsets/set/mod011-settings/self/create.rb +0 -9
  495. data/tmpsets/set/mod011-settings/self/default.rb +0 -9
  496. data/tmpsets/set/mod011-settings/self/default_html_view.rb +0 -9
  497. data/tmpsets/set/mod011-settings/self/delete.rb +0 -9
  498. data/tmpsets/set/mod011-settings/self/follow_fields.rb +0 -9
  499. data/tmpsets/set/mod011-settings/self/help.rb +0 -9
  500. data/tmpsets/set/mod011-settings/self/input.rb +0 -11
  501. data/tmpsets/set/mod011-settings/self/layout.rb +0 -9
  502. data/tmpsets/set/mod011-settings/self/on_create.rb +0 -9
  503. data/tmpsets/set/mod011-settings/self/on_delete.rb +0 -9
  504. data/tmpsets/set/mod011-settings/self/on_update.rb +0 -9
  505. data/tmpsets/set/mod011-settings/self/options.rb +0 -11
  506. data/tmpsets/set/mod011-settings/self/options_label.rb +0 -11
  507. data/tmpsets/set/mod011-settings/self/read.rb +0 -9
  508. data/tmpsets/set/mod011-settings/self/recent_settings.rb +0 -10
  509. data/tmpsets/set/mod011-settings/self/script.rb +0 -9
  510. data/tmpsets/set/mod011-settings/self/structure.rb +0 -9
  511. data/tmpsets/set/mod011-settings/self/style.rb +0 -9
  512. data/tmpsets/set/mod011-settings/self/table_of_contents.rb +0 -9
  513. data/tmpsets/set/mod011-settings/self/thanks.rb +0 -9
  514. data/tmpsets/set/mod011-settings/self/update.rb +0 -9
  515. data/tmpsets/set/mod011-settings/type/setting.rb +0 -111
  516. data/tmpsets/set/mod012-email/all/email_html.rb +0 -11
  517. data/tmpsets/set/mod012-email/all/email_text.rb +0 -12
  518. data/tmpsets/set/mod012-email/all/follow.rb +0 -253
  519. data/tmpsets/set/mod012-email/all/notify.rb +0 -271
  520. data/tmpsets/set/mod012-email/all/observer.rb +0 -33
  521. data/tmpsets/set/mod012-email/right/bcc.rb +0 -47
  522. data/tmpsets/set/mod012-email/right/cc.rb +0 -10
  523. data/tmpsets/set/mod012-email/right/follow.rb +0 -106
  524. data/tmpsets/set/mod012-email/right/follow_fields.rb +0 -10
  525. data/tmpsets/set/mod012-email/right/followers.rb +0 -41
  526. data/tmpsets/set/mod012-email/right/following.rb +0 -65
  527. data/tmpsets/set/mod012-email/right/from.rb +0 -10
  528. data/tmpsets/set/mod012-email/right/html_message.rb +0 -10
  529. data/tmpsets/set/mod012-email/right/to.rb +0 -10
  530. data/tmpsets/set/mod012-email/self/always.rb +0 -20
  531. data/tmpsets/set/mod012-email/self/created.rb +0 -26
  532. data/tmpsets/set/mod012-email/self/edited.rb +0 -27
  533. data/tmpsets/set/mod012-email/self/follow.rb +0 -9
  534. data/tmpsets/set/mod012-email/self/follow_defaults.rb +0 -75
  535. data/tmpsets/set/mod012-email/self/never.rb +0 -20
  536. data/tmpsets/set/mod012-email/type/email_template.rb +0 -133
  537. data/tmpsets/set/mod012-email/type_plus_right/user/follow.rb +0 -184
  538. data/tmpsets/set/mod013-carrierwave/abstract/attachment.rb +0 -282
  539. data/tmpsets/set/mod013-carrierwave/type/file.rb +0 -155
  540. data/tmpsets/set/mod013-carrierwave/type/image.rb +0 -96
  541. data/tmpsets/set/mod014-admin/self/admin.rb +0 -113
  542. data/tmpsets/set/mod014-admin/self/admin_info.rb +0 -110
  543. data/tmpsets/set/mod014-admin/self/version.rb +0 -15
  544. data/tmpsets/set/mod015-developer/all/event_viz.rb +0 -59
  545. data/tmpsets/set/mod015-developer/all/view_viz.rb +0 -30
  546. data/tmpsets/set/mod015-developer/right/debug.rb +0 -96
  547. data/tmpsets/set/mod016-standard/all/comment.rb +0 -67
  548. data/tmpsets/set/mod016-standard/all/error.rb +0 -229
  549. data/tmpsets/set/mod016-standard/all/links.rb +0 -165
  550. data/tmpsets/set/mod016-standard/all/list_changes.rb +0 -53
  551. data/tmpsets/set/mod016-standard/all/rich_html/content.rb +0 -261
  552. data/tmpsets/set/mod016-standard/all/rich_html/editing.rb +0 -247
  553. data/tmpsets/set/mod016-standard/all/rich_html/form.rb +0 -298
  554. data/tmpsets/set/mod016-standard/all/rich_html/header.rb +0 -78
  555. data/tmpsets/set/mod016-standard/all/rich_html/menu.rb +0 -154
  556. data/tmpsets/set/mod016-standard/all/rich_html/modal.rb +0 -58
  557. data/tmpsets/set/mod016-standard/all/rich_html/toolbar.rb +0 -312
  558. data/tmpsets/set/mod016-standard/all/rich_html/wrapper.rb +0 -191
  559. data/tmpsets/set/mod016-standard/right/discussion.rb +0 -10
  560. data/tmpsets/set/mod016-standard/right/when_created.rb +0 -14
  561. data/tmpsets/set/mod016-standard/right/when_last_edited.rb +0 -14
  562. data/tmpsets/set/mod016-standard/rstar/rules.rb +0 -107
  563. data/tmpsets/set/mod016-standard/rstar/rules_editor.rb +0 -371
  564. data/tmpsets/set/mod016-standard/self/alerts.rb +0 -12
  565. data/tmpsets/set/mod016-standard/self/codenames.rb +0 -7
  566. data/tmpsets/set/mod016-standard/self/foot.rb +0 -15
  567. data/tmpsets/set/mod016-standard/self/navbox.rb +0 -36
  568. data/tmpsets/set/mod016-standard/self/now.rb +0 -14
  569. data/tmpsets/set/mod016-standard/self/recent.rb +0 -34
  570. data/tmpsets/set/mod016-standard/self/search.rb +0 -71
  571. data/tmpsets/set/mod016-standard/type/basic.rb +0 -59
  572. data/tmpsets/set/mod016-standard/type/cardtype.rb +0 -81
  573. data/tmpsets/set/mod016-standard/type/date.rb +0 -15
  574. data/tmpsets/set/mod016-standard/type/layout_type.rb +0 -17
  575. data/tmpsets/set/mod016-standard/type/list.rb +0 -120
  576. data/tmpsets/set/mod016-standard/type/listed_by.rb +0 -85
  577. data/tmpsets/set/mod016-standard/type/number.rb +0 -25
  578. data/tmpsets/set/mod016-standard/type/phrase.rb +0 -10
  579. data/tmpsets/set/mod016-standard/type/search_type.rb +0 -339
  580. data/tmpsets/set/mod016-standard/type/session.rb +0 -42
  581. data/tmpsets/set/mod016-standard/type/set.rb +0 -371
  582. data/tmpsets/set/mod016-standard/type/toggle.rb +0 -19
  583. data/tmpsets/set/mod016-standard/type/uri.rb +0 -18
  584. data/tmpsets/set/mod017-account/all/account.rb +0 -72
  585. data/tmpsets/set/mod017-account/right/account.rb +0 -196
  586. data/tmpsets/set/mod017-account/right/email.rb +0 -61
  587. data/tmpsets/set/mod017-account/right/password.rb +0 -54
  588. data/tmpsets/set/mod017-account/right/salt.rb +0 -12
  589. data/tmpsets/set/mod017-account/right/status.rb +0 -16
  590. data/tmpsets/set/mod017-account/right/token.rb +0 -57
  591. data/tmpsets/set/mod017-account/self/account_links.rb +0 -72
  592. data/tmpsets/set/mod017-account/self/signin.rb +0 -165
  593. data/tmpsets/set/mod017-account/type/signup.rb +0 -175
  594. data/tmpsets/set/mod017-account/type/user.rb +0 -88
  595. data/tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb +0 -42
  596. data/tmpsets/set/mod018-bootstrap/all/bootstrap/helper.rb +0 -236
  597. data/tmpsets/set/mod018-bootstrap/all/bootstrap/table.rb +0 -68
  598. data/tmpsets/set/mod018-bootstrap/all/bootstrap/tabs.rb +0 -88
  599. data/tmpsets/set/mod018-bootstrap/all/bootstrap/wrapper.rb +0 -18
  600. data/tmpsets/set/mod018-bootstrap/all/rich_bootstrap.rb +0 -13
  601. data/tmpsets/set/mod018-bootstrap/self/bootstrap_cards.rb +0 -8
  602. data/tmpsets/set/mod018-bootstrap/self/bootstrap_js.rb +0 -12
  603. data/tmpsets/set/mod018-bootstrap/self/bootswatch_shared.rb +0 -47
  604. data/tmpsets/set/mod018-bootstrap/self/script_mods.rb +0 -7
  605. data/tmpsets/set/mod018-bootstrap/self/smartmenu_css.rb +0 -12
  606. data/tmpsets/set/mod018-bootstrap/self/smartmenu_js.rb +0 -12
  607. data/tmpsets/set_pattern/100-all.rb +0 -24
  608. data/tmpsets/set_pattern/101-all_plus.rb +0 -26
  609. data/tmpsets/set_pattern/102-type.rb +0 -36
  610. data/tmpsets/set_pattern/103-star.rb +0 -28
  611. data/tmpsets/set_pattern/104-rstar.rb +0 -30
  612. data/tmpsets/set_pattern/105-right.rb +0 -33
  613. data/tmpsets/set_pattern/106-type_plus_right.rb +0 -39
  614. data/tmpsets/set_pattern/107-self.rb +0 -32
@@ -388,7 +388,8 @@ describe Card::Set::Type::File do
388
388
  Card::Auth.as_bot do
389
389
  Card.create! name: "file card", type_code: "file",
390
390
  file: File.new(File.join(FIXTURES_PATH, "file1.txt")),
391
- storage_type: @storage_type || :cloud
391
+ storage_type: @storage_type || :cloud,
392
+ bucket: :test_bucket
392
393
  end
393
394
  end
394
395
 
@@ -556,11 +557,20 @@ describe Card::Set::Type::File do
556
557
  "public/files/~#{subject.id}/#{subject.last_action_id}.txt"
557
558
  end
558
559
 
559
- let(:directory) { "philipp-test" }
560
+ let(:directory) { "deckodev-test" }
561
+
562
+ # expects access keys in card/spec/support/buckets_credentials.yml for the
563
+ # bucket defined in `directory` in the following format:
564
+ # aws:
565
+ # provider: AWS
566
+ # aws_access_key_id: ...
567
+ # aws_secret_access_key: ...
568
+ # region: eu-central-1
560
569
 
561
570
  def storage_config type=:local
562
571
  Cardio.config.file_storage = type
563
- Wagn.config.file_buckets = {
572
+ # config.file_default_bucket
573
+ Decko.config.file_buckets = {
564
574
  test_bucket: {
565
575
  provider: "fog/aws",
566
576
  credentials: bucket_credentials(:aws),
@@ -20,7 +20,7 @@ end
20
20
 
21
21
  format :html do
22
22
  view :hidden_content_field, tags: :unknown_ok do
23
- hidden_field :content, class: "card-content"
23
+ hidden_field :content, class: "d0-card-content"
24
24
  end
25
25
  end
26
26
 
@@ -2,77 +2,64 @@
2
2
 
3
3
  describe Card::Format::HtmlFormat do
4
4
  describe "views" do
5
- it "content" do
6
- assert_view_select(
7
- render_card(:content, name: "A+B"),
8
- 'div[class="card-slot content-view ALL ALL_PLUS TYPE-basic '\
9
- 'RIGHT-b TYPE_PLUS_RIGHT-basic-b SELF-a-b card-content"]'
10
- )
5
+ specify "content" do
6
+ expect(view(:content, card: "A+B"))
7
+ .to have_tag(
8
+ 'div[class="card-slot content-view ALL ALL_PLUS TYPE-basic '\
9
+ 'RIGHT-b TYPE_PLUS_RIGHT-basic-b SELF-a-b d0-card-content"]'
10
+ )
11
11
  end
12
12
 
13
- it "nests in multi edit" do
14
- c = Card.new name: "ABook", type: "Book"
15
- rendered = c.format.render :edit
16
- assert_view_select rendered, "fieldset" do
17
- assert_select 'div[class~="prosemirror-editor"]' do
18
- assert_select "input[name=?]", "card[subcards][+illustrator][content]"
13
+ specify "nests in multi edit" do
14
+ expect(view(:edit, card: { type: "Book" })).to have_tag "fieldset" do
15
+ have_tag 'div[class~="prosemirror-editor"]' do
16
+ have_tag "input[name=?]", name: "card[subcards][+illustrator][content]"
19
17
  end
20
18
  end
21
19
  end
22
20
 
23
- it "titled" do
24
- result = render_card :titled, name: "A+B"
25
- assert_view_select result, 'div[class~="titled-view"]' do
26
- assert_select 'div[class~="card-header"]' do
27
- assert_select 'span[class~="card-title"]'
21
+ specify "titled" do
22
+ expect(view(:titled, card: "A+B")).to have_tag 'div[class~="titled-view"]' do
23
+ have_tag 'div[class~="d0-card-header"]' do
24
+ have_tag 'span[class~="card-title"]'
28
25
  end
29
- assert_select 'div[class~="card-body card-content"]', "AlphaBeta"
26
+ have_tag 'div[class~="d0-card-body d0-card-content"]', "AlphaBeta"
30
27
  end
31
28
  end
32
29
 
33
- context "Cards with special views" do
34
- end
35
-
36
- context "Simple page with Default Layout" do
37
- before do
38
- Card::Auth.as_bot do
39
- card = Card["A+B"]
40
- @simple_page = card.format.render(:layout)
41
- # warn "render sp: #{card.inspect} :: #{@simple_page}"
42
- end
43
- end
30
+ context "simple page with Default Layout" do
31
+ subject { view(:layout, card: "A+B") }
44
32
 
45
33
  it "renders top menu" do
46
- assert_view_select @simple_page, "header" do
47
- assert_select 'a[class="internal-link"][href="/"]', "Home"
48
- assert_select 'a[class="internal-link"][href="/:recent"]', "Recent"
49
- assert_select 'form.navbox-form[action="/:search"]' do
50
- assert_select 'input[name="_keyword"]'
34
+ is_expected.to have_tag "header" do
35
+ with_tag 'a.nav-link.internal-link[href="/"]', text: "Home"
36
+ with_tag 'a.nav-link.internal-link[href="/:recent"]', text: "Recent"
37
+ with_tag 'form.navbox-form[action="/:search"]' do
38
+ with_tag 'input[name="_keyword"]'
51
39
  end
52
40
  end
53
41
  end
54
42
 
55
43
  it "renders card header" do
56
- # lots of duplication here...
57
- assert_view_select @simple_page,
58
- 'div[class="card-header panel-heading"]' do
59
- assert_select 'div[class="card-header-title panel-title"]'
44
+ is_expected.to have_tag "div.d0-card-header.card-header" do
45
+ with_tag "div.d0-card-header-title" do
46
+ with_tag "span.card-title", text: "A+B"
47
+ end
60
48
  end
61
49
  end
62
50
 
63
51
  it "renders card content" do
64
- assert_view_select(
65
- @simple_page,
66
- 'div[class="card-body card-content ALL ALL_PLUS ' \
67
- 'TYPE-basic RIGHT-b TYPE_PLUS_RIGHT-basic-b SELF-a-b panel-body"]',
68
- "AlphaBeta"
69
- )
52
+ is_expected.to have_tag "div.d0-card-body.d0-card-content" \
53
+ ".ALL.ALL_PLUS" \
54
+ ".TYPE-basic.RIGHT-b.TYPE_PLUS_RIGHT-basic-b" \
55
+ ".SELF-a-b.card-block.card-text",
56
+ text: /AlphaBeta/
70
57
  end
71
58
 
72
59
  it "renders card credit" do
73
- assert_view_select @simple_page, 'div[class~="SELF-Xcredit"]' do
74
- assert_select "img"
75
- assert_select "a", "Wagn v#{Card::Version.release}"
60
+ is_expected.to have_tag 'div[class~="SELF-Xcredit"]' do
61
+ with_tag "img"
62
+ with_tag "a", text: "Wagn v#{Card::Version.release}"
76
63
  end
77
64
  end
78
65
  end
@@ -114,7 +101,7 @@ describe Card::Format::HtmlFormat do
114
101
 
115
102
  result = @main_card.format.render_layout
116
103
  expect(result).to match(/Hey.*div.*Joe User/)
117
- expect(result).not_to match(/card-header/)
104
+ expect(result).not_to match(/d0-card-header/)
118
105
  end
119
106
 
120
107
  it "does not recurse" do
@@ -100,7 +100,7 @@ describe Card::Set::All::Collection do
100
100
  end
101
101
  tabs = Card.fetch("G").format.render_tabs
102
102
  assert_view_select tabs, "div[role=tabpanel]" do
103
- assert_select "div.tab-pane#g-g-b .card-content", "GammaBeta"
103
+ assert_select "div.tab-pane#g-g-b .d0-card-content", "GammaBeta"
104
104
  end
105
105
  end
106
106
 
@@ -75,11 +75,11 @@ class Card
75
75
  end
76
76
 
77
77
  def link_to_act_card
78
- link_to_card @act_card, glyphicon("new-window")
78
+ link_to_card @act_card, icon_tag(:new_window)
79
79
  end
80
80
 
81
81
  def link_to_history
82
- link_to_card @act_card, glyphicon("time"),
82
+ link_to_card @act_card, icon_tag(:history),
83
83
  path: { view: :history, look_in_trash: true },
84
84
  rel: "nofollow"
85
85
  end
@@ -31,12 +31,12 @@ format :html do
31
31
 
32
32
  def action_icon action_type, extra_class=nil
33
33
  icon = case action_type
34
- when :create then "plus"
35
- when :update then "pencil"
36
- when :delete then "trash"
37
- when :draft then "wrench"
34
+ when :create then :plus
35
+ when :update then :pencil
36
+ when :delete then :trash
37
+ when :draft then :wrench
38
38
  end
39
- glyphicon icon, extra_class
39
+ icon_tag icon, extra_class
40
40
  end
41
41
 
42
42
  def action_view
@@ -54,12 +54,12 @@ format :html do
54
54
  def toggle_action_content_link action, view_type
55
55
  other_view_type = view_type == :expanded ? :summary : :expanded
56
56
  link_to_view "action_#{other_view_type}",
57
- glyphicon(arrow_dir(view_type)),
57
+ icon_tag(arrow_dir(view_type)),
58
58
  class: "slotter revision-#{action.card_act_id} pull-right",
59
59
  path: { action_id: action.id, look_in_trash: true }
60
60
  end
61
61
 
62
62
  def arrow_dir view_type
63
- view_type == :expanded ? "triangle-left" : "triangle-right"
63
+ view_type == :expanded ? :triangle_left : :triangle_right
64
64
  end
65
65
  end
@@ -132,7 +132,7 @@ end
132
132
  format :html do
133
133
  view :history, cache: :never do
134
134
  voo.show :toolbar
135
- class_up "card-body", "history-slot"
135
+ class_up "d0-card-body", "history-slot"
136
136
  frame do
137
137
  bs_layout container: true, fluid: true do
138
138
  html _optional_render_history_legend(with_drafts: true)
@@ -4,9 +4,9 @@
4
4
  !T.relative[s=a.type]);)if((l=T.find[s])&&(r=l(a.matches[0].replace(we,Te),be.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return K.apply(n,r),n;break}}return(u||k(e,d))(r,t,!_,n,be.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;return n?void 0:!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);ie.find=ue,ie.expr=ue.selectors,ie.expr[":"]=ie.expr.pseudos,ie.unique=ue.uniqueSort,ie.text=ue.getText,ie.isXMLDoc=ue.isXML,ie.contains=ue.contains;var ce=ie.expr.match.needsContext,de=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,fe=/^.[^:#\[\.,]*$/;ie.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ie.find.matchesSelector(r,e)?[r]:[]:ie.find.matches(e,ie.grep(t,function(e){return 1===e.nodeType}))},ie.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(ie(e).filter(function(){for(t=0;i>t;t++)if(ie.contains(r[t],this))return!0}));for(t=0;i>t;t++)ie.find(e,r[t],n);return n=this.pushStack(i>1?ie.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&ce.test(e)?ie(e):e||[],!1).length}});var pe,he=e.document,me=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(ie.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:me.exec(e))||!n[1]&&t)return!t||t.jquery?(t||pe).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof ie?t[0]:t,ie.merge(this,ie.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:he,!0)),de.test(n[1])&&ie.isPlainObject(t))for(n in t)ie.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((r=he.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return pe.find(e);this.length=1,this[0]=r}return this.context=he,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ie.isFunction(e)?"undefined"!=typeof pe.ready?pe.ready(e):e(ie):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),ie.makeArray(e,this))}).prototype=ie.fn,pe=ie(he);var ge=/^(?:parents|prev(?:Until|All))/,ve={children:!0,contents:!0,next:!0,prev:!0};ie.extend({dir:function(e,t,n){for(var r=[],i=e[t];i&&9!==i.nodeType&&(void 0===n||1!==i.nodeType||!ie(i).is(n));)1===i.nodeType&&r.push(i),i=i[t];return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),ie.fn.extend({has:function(e){var t,n=ie(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(ie.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=ce.test(e)||"string"!=typeof e?ie(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&ie.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?ie.unique(o):o)},index:function(e){return e?"string"==typeof e?ie.inArray(this[0],ie(e)):ie.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ie.unique(ie.merge(this.get(),ie(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ie.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ie.dir(e,"parentNode")},parentsUntil:function(e,t,n){return ie.dir(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return ie.dir(e,"nextSibling")},prevAll:function(e){return ie.dir(e,"previousSibling")},nextUntil:function(e,t,n){return ie.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return ie.dir(e,"previousSibling",n)},siblings:function(e){return ie.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ie.sibling(e.firstChild)},contents:function(e){return ie.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ie.merge([],e.childNodes)}},function(e,t){ie.fn[e]=function(n,r){var i=ie.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ie.filter(r,i)),this.length>1&&(ve[e]||(i=ie.unique(i)),ge.test(e)&&(i=i.reverse())),this.pushStack(i)}});var ye=/\S+/g,be={};ie.Callbacks=function(e){e="string"==typeof e?be[e]||o(e):ie.extend({},e);var t,n,r,i,a,s,l=[],u=!e.once&&[],c=function(o){for(n=e.memory&&o,r=!0,a=s||0,s=0,i=l.length,t=!0;l&&i>a;a++)if(!1===l[a].apply(o[0],o[1])&&e.stopOnFalse){n=!1;break}t=!1,l&&(u?u.length&&c(u.shift()):n?l=[]:d.disable())},d={add:function(){if(l){var r=l.length;!function t(n){ie.each(n,function(n,r){var i=ie.type(r);"function"===i?e.unique&&d.has(r)||l.push(r):r&&r.length&&"string"!==i&&t(r)})}(arguments),t?i=l.length:n&&(s=r,c(n))}return this},remove:function(){return l&&ie.each(arguments,function(e,n){for(var r;(r=ie.inArray(n,l,r))>-1;)l.splice(r,1),t&&(i>=r&&i--,a>=r&&a--)}),this},has:function(e){return e?ie.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],i=0,this},disable:function(){return l=u=n=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,n||d.disable(),this},locked:function(){return!u},fireWith:function(e,n){return!l||r&&!u||(n=n||[],n=[e,n.slice?n.slice():n],t?u.push(n):c(n)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!r}};return d},ie.extend({Deferred:function(e){var t=[["resolve","done",ie.Callbacks("once memory"),"resolved"],["reject","fail",ie.Callbacks("once memory"),"rejected"],["notify","progress",ie.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ie.Deferred(function(n){ie.each(t,function(t,o){var a=ie.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&ie.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ie.extend(e,r):r}},i={};return r.pipe=r.then,ie.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=Y.call(arguments),a=o.length,s=1!==a||e&&ie.isFunction(e.promise)?a:0,l=1===s?e:ie.Deferred(),u=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?Y.call(arguments):i,r===t?l.notifyWith(n,r):--s||l.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);a>i;i++)o[i]&&ie.isFunction(o[i].promise)?o[i].promise().done(u(i,r,o)).fail(l.reject).progress(u(i,n,t)):--s;return s||l.resolveWith(r,o),l.promise()}});var xe;ie.fn.ready=function(e){return ie.ready.promise().done(e),this},ie.extend({isReady:!1,readyWait:1,holdReady:function(e){e?ie.readyWait++:ie.ready(!0)},ready:function(e){if(!0===e?!--ie.readyWait:!ie.isReady){if(!he.body)return setTimeout(ie.ready);ie.isReady=!0,!0!==e&&--ie.readyWait>0||(xe.resolveWith(he,[ie]),ie.fn.triggerHandler&&(ie(he).triggerHandler("ready"),ie(he).off("ready")))}}}),ie.ready.promise=function(t){if(!xe)if(xe=ie.Deferred(),"complete"===he.readyState)setTimeout(ie.ready);else if(he.addEventListener)he.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1);else{he.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&he.documentElement}catch(e){}n&&n.doScroll&&function e(){if(!ie.isReady){try{n.doScroll("left")}catch(t){return setTimeout(e,50)}a(),ie.ready()}}()}return xe.promise(t)};var we,Te="undefined";for(we in ie(ne))break;ne.ownLast="0"!==we,ne.inlineBlockNeedsLayout=!1,ie(function(){var e,t,n,r;(n=he.getElementsByTagName("body")[0])&&n.style&&(t=he.createElement("div"),r=he.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),typeof t.style.zoom!==Te&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ne.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=he.createElement("div");if(null==ne.deleteExpando){ne.deleteExpando=!0;try{delete e.test}catch(e){ne.deleteExpando=!1}}e=null}(),ie.acceptData=function(e){var t=ie.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)};var Ce=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ne=/([A-Z])/g;ie.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?ie.cache[e[ie.expando]]:e[ie.expando])&&!u(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return d(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return d(e,t,!0)}}),ie.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=ie.data(o),1===o.nodeType&&!ie._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=ie.camelCase(r.slice(5)),l(o,r,i[r])));ie._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){ie.data(this,e)}):arguments.length>1?this.each(function(){ie.data(this,e,t)}):o?l(o,e,ie.data(o,e)):void 0},removeData:function(e){return this.each(function(){ie.removeData(this,e)})}}),ie.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=ie._data(e,t),n&&(!r||ie.isArray(n)?r=ie._data(e,t,ie.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=ie.queue(e,t),r=n.length,i=n.shift(),o=ie._queueHooks(e,t),a=function(){ie.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ie._data(e,n)||ie._data(e,n,{empty:ie.Callbacks("once memory").add(function(){ie._removeData(e,t+"queue"),ie._removeData(e,n)})})}}),ie.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?ie.queue(this[0],e):void 0===t?this:this.each(function(){var n=ie.queue(this,e,t);ie._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&ie.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ie.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ie.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=ie._data(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ke=["Top","Right","Bottom","Left"],Se=function(e,t){return e=t||e,"none"===ie.css(e,"display")||!ie.contains(e.ownerDocument,e)},Ae=ie.access=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===ie.type(n)){i=!0;for(s in n)ie.access(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,ie.isFunction(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(ie(e),n)})),t))for(;l>s;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):o},De=/^(?:checkbox|radio)$/i;!function(){var e=he.createElement("input"),t=he.createElement("div"),n=he.createDocumentFragment();if(t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ne.leadingWhitespace=3===t.firstChild.nodeType,ne.tbody=!t.getElementsByTagName("tbody").length,ne.htmlSerialize=!!t.getElementsByTagName("link").length,ne.html5Clone="<:nav></:nav>"!==he.createElement("nav").cloneNode(!0).outerHTML,e.type="checkbox",e.checked=!0,n.appendChild(e),ne.appendChecked=e.checked,t.innerHTML="<textarea>x</textarea>",ne.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,n.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",ne.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,ne.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){ne.noCloneEvent=!1}),t.cloneNode(!0).click()),null==ne.deleteExpando){ne.deleteExpando=!0;try{delete t.test}catch(e){ne.deleteExpando=!1}}}(),function(){var t,n,r=he.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(ne[t+"Bubbles"]=n in e)||(r.setAttribute(n,"t"),ne[t+"Bubbles"]=!1===r.attributes[n].expando);r=null}();var je=/^(?:input|select|textarea)$/i,Le=/^key/,He=/^(?:mouse|pointer|contextmenu)|click/,qe=/^(?:focusinfocus|focusoutblur)$/,_e=/^([^.]*)(?:\.(.+)|)$/;ie.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,d,f,p,h,m,g=ie._data(e);if(g){for(n.handler&&(l=n,n=l.handler,i=l.selector),n.guid||(n.guid=ie.guid++),(a=g.events)||(a=g.events={}),(c=g.handle)||(c=g.handle=function(e){return typeof ie===Te||e&&ie.event.triggered===e.type?void 0:ie.event.dispatch.apply(c.elem,arguments)},c.elem=e),t=(t||"").match(ye)||[""],s=t.length;s--;)o=_e.exec(t[s])||[],p=m=o[1],h=(o[2]||"").split(".").sort(),p&&(u=ie.event.special[p]||{},p=(i?u.delegateType:u.bindType)||p,u=ie.event.special[p]||{},d=ie.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ie.expr.match.needsContext.test(i),namespace:h.join(".")},l),(f=a[p])||(f=a[p]=[],f.delegateCount=0,u.setup&&!1!==u.setup.call(e,r,h,c)||(e.addEventListener?e.addEventListener(p,c,!1):e.attachEvent&&e.attachEvent("on"+p,c))),u.add&&(u.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,d):f.push(d),ie.event.global[p]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,d,f,p,h,m,g=ie.hasData(e)&&ie._data(e);if(g&&(c=g.events)){for(t=(t||"").match(ye)||[""],u=t.length;u--;)if(s=_e.exec(t[u])||[],p=m=s[1],h=(s[2]||"").split(".").sort(),p){for(d=ie.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,f=c[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;o--;)a=f[o],!i&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,d.remove&&d.remove.call(e,a));l&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,g.handle)||ie.removeEvent(e,p,g.handle),delete c[p])}else for(p in c)ie.event.remove(e,p+t[u],n,r,!0);ie.isEmptyObject(c)&&(delete g.handle,ie._removeData(e,"events"))}},trigger:function(t,n,r,i){var o,a,s,l,u,c,d,f=[r||he],p=te.call(t,"type")?t.type:t,h=te.call(t,"namespace")?t.namespace.split("."):[];if(s=c=r=r||he,3!==r.nodeType&&8!==r.nodeType&&!qe.test(p+ie.event.triggered)&&(p.indexOf(".")>=0&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[ie.expando]?t:new ie.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:ie.makeArray(n,[t]),u=ie.event.special[p]||{},i||!u.trigger||!1!==u.trigger.apply(r,n))){if(!i&&!u.noBubble&&!ie.isWindow(r)){for(l=u.delegateType||p,qe.test(l+p)||(s=s.parentNode);s;s=s.parentNode)f.push(s),c=s;c===(r.ownerDocument||he)&&f.push(c.defaultView||c.parentWindow||e)}for(d=0;(s=f[d++])&&!t.isPropagationStopped();)t.type=d>1?l:u.bindType||p,o=(ie._data(s,"events")||{})[t.type]&&ie._data(s,"handle"),o&&o.apply(s,n),(o=a&&s[a])&&o.apply&&ie.acceptData(s)&&(t.result=o.apply(s,n),!1===t.result&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!u._default||!1===u._default.apply(f.pop(),n))&&ie.acceptData(r)&&a&&r[p]&&!ie.isWindow(r)){c=r[a],c&&(r[a]=null),ie.event.triggered=p;try{r[p]()}catch(e){}ie.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=ie.event.fix(e);var t,n,r,i,o,a=[],s=Y.call(arguments),l=(ie._data(this,"events")||{})[e.type]||[],u=ie.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,e)){for(a=ie.event.handlers.call(this,e,l),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,o=0;(r=i.handlers[o++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(r.namespace))&&(e.handleObj=r,e.data=r.data,void 0!==(n=((ie.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,s))&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(i=[],o=0;s>o;o++)r=t[o],n=r.selector+" ",void 0===i[n]&&(i[n]=r.needsContext?ie(n,this).index(l)>=0:ie.find(n,this,null,[l]).length),i[n]&&i.push(r);i.length&&a.push({elem:l,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[ie.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=He.test(i)?this.mouseHooks:Le.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new ie.Event(o),t=r.length;t--;)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||he),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(r=e.target.ownerDocument||he,i=r.documentElement,n=r.body,e.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==h()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===h()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return ie.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return ie.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=ie.extend(new ie.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?ie.event.trigger(i,null,t):ie.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},ie.removeEvent=he.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===Te&&(e[r]=null),e.detachEvent(r,n))},ie.Event=function(e,t){return this instanceof ie.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?f:p):this.type=e,t&&ie.extend(this,t),this.timeStamp=e&&e.timeStamp||ie.now(),void(this[ie.expando]=!0)):new ie.Event(e,t)},ie.Event.prototype={isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=f,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=f,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=f,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},ie.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){ie.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!ie.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),ne.submitBubbles||(ie.event.special.submit={setup:function(){return!ie.nodeName(this,"form")&&void ie.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=ie.nodeName(t,"input")||ie.nodeName(t,"button")?t.form:void 0;n&&!ie._data(n,"submitBubbles")&&(ie.event.add(n,"submit._submit",function(e){e._submit_bubble=!0}),ie._data(n,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&ie.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return!ie.nodeName(this,"form")&&void ie.event.remove(this,"._submit")}}),ne.changeBubbles||(ie.event.special.change={setup:function(){return je.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(ie.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),ie.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),ie.event.simulate("change",this,e,!0)})),!1):void ie.event.add(this,"beforeactivate._change",function(e){var t=e.target;je.test(t.nodeName)&&!ie._data(t,"changeBubbles")&&(ie.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||ie.event.simulate("change",this.parentNode,e,!0)}),ie._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return ie.event.remove(this,"._change"),!je.test(this.nodeName)}}),ne.focusinBubbles||ie.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ie.event.simulate(t,e.target,ie.event.fix(e),!0)};ie.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=ie._data(r,t);i||r.addEventListener(e,n,!0),ie._data(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=ie._data(r,t)-1;i?ie._data(r,t,i):(r.removeEventListener(e,n,!0),ie._removeData(r,t))}}}),ie.fn.extend({on:function(e,t,n,r,i){var o,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(o in e)this.on(o,t,n,e[o],i);return this}if(null==n&&null==r?(r=t,n=t=void 0):null==r&&("string"==typeof t?(r=n,n=void 0):(r=n,n=t,t=void 0)),!1===r)r=p;else if(!r)return this;return 1===i&&(a=r,r=function(e){return ie().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=ie.guid++)),this.each(function(){ie.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ie(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(!1===t||"function"==typeof t)&&(n=t,t=void 0),!1===n&&(n=p),this.each(function(){ie.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){ie.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?ie.event.trigger(e,t,n,!0):void 0}});var Me="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Fe=/ jQuery\d+="(?:null|\d+)"/g,Oe=new RegExp("<(?:"+Me+")[\\s/>]","i"),Be=/^\s+/,Pe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Re=/<([\w:]+)/,We=/<tbody/i,$e=/<|&#?\w+;/,ze=/<(?:script|style|link)/i,Ie=/checked\s*(?:[^=]|=\s*.checked.)/i,Xe=/^$|\/(?:java|ecma)script/i,Ue=/^true\/(.*)/,Ve=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Je={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ne.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Ye=m(he),Ge=Ye.appendChild(he.createElement("div"));Je.optgroup=Je.option,Je.tbody=Je.tfoot=Je.colgroup=Je.caption=Je.thead,Je.th=Je.td,ie.extend({clone:function(e,t,n){var r,i,o,a,s,l=ie.contains(e.ownerDocument,e);if(ne.html5Clone||ie.isXMLDoc(e)||!Oe.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Ge.innerHTML=e.outerHTML,Ge.removeChild(o=Ge.firstChild)),!(ne.noCloneEvent&&ne.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ie.isXMLDoc(e)))for(r=g(o),s=g(e),a=0;null!=(i=s[a]);++a)r[a]&&C(i,r[a]);if(t)if(n)for(s=s||g(e),r=r||g(o),a=0;null!=(i=s[a]);a++)T(i,r[a]);else T(e,o);return r=g(o,"script"),r.length>0&&w(r,!l&&g(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){for(var i,o,a,s,l,u,c,d=e.length,f=m(t),p=[],h=0;d>h;h++)if((o=e[h])||0===o)if("object"===ie.type(o))ie.merge(p,o.nodeType?[o]:o);else if($e.test(o)){for(s=s||f.appendChild(t.createElement("div")),l=(Re.exec(o)||["",""])[1].toLowerCase(),c=Je[l]||Je._default,s.innerHTML=c[1]+o.replace(Pe,"<$1></$2>")+c[2],i=c[0];i--;)s=s.lastChild;if(!ne.leadingWhitespace&&Be.test(o)&&p.push(t.createTextNode(Be.exec(o)[0])),!ne.tbody)for(o="table"!==l||We.test(o)?"<table>"!==c[1]||We.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;i--;)ie.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(ie.merge(p,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=f.lastChild}else p.push(t.createTextNode(o));for(s&&f.removeChild(s),ne.appendChecked||ie.grep(g(p,"input"),v),h=0;o=p[h++];)if((!r||-1===ie.inArray(o,r))&&(a=ie.contains(o.ownerDocument,o),s=g(f.appendChild(o),"script"),a&&w(s),n))for(i=0;o=s[i++];)Xe.test(o.type||"")&&n.push(o);return s=null,f},cleanData:function(e,t){for(var n,r,i,o,a=0,s=ie.expando,l=ie.cache,u=ne.deleteExpando,c=ie.event.special;null!=(n=e[a]);a++)if((t||ie.acceptData(n))&&(i=n[s],o=i&&l[i])){if(o.events)for(r in o.events)c[r]?ie.event.remove(n,r):ie.removeEvent(n,r,o.handle);l[i]&&(delete l[i],u?delete n[s]:typeof n.removeAttribute!==Te?n.removeAttribute(s):n[s]=null,J.push(i))}}}),ie.fn.extend({text:function(e){return Ae(this,function(e){return void 0===e?ie.text(this):this.empty().append((this[0]&&this[0].ownerDocument||he).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){y(this,e).appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?ie.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||ie.cleanData(g(n)),n.parentNode&&(t&&ie.contains(n.ownerDocument,n)&&w(g(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&ie.cleanData(g(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&ie.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ie.clone(this,e,t)})},html:function(e){return Ae(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Fe,""):void 0;if(!("string"!=typeof e||ze.test(e)||!ne.htmlSerialize&&Oe.test(e)||!ne.leadingWhitespace&&Be.test(e)||Je[(Re.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Pe,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(ie.cleanData(g(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,ie.cleanData(g(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=G.apply([],e);var n,r,i,o,a,s,l=0,u=this.length,c=this,d=u-1,f=e[0],p=ie.isFunction(f);if(p||u>1&&"string"==typeof f&&!ne.checkClone&&Ie.test(f))return this.each(function(n){var r=c.eq(n);p&&(e[0]=f.call(this,n,r.html())),r.domManip(e,t)});if(u&&(s=ie.buildFragment(e,this[0].ownerDocument,!1,this),n=s.firstChild,1===s.childNodes.length&&(s=n),n)){for(o=ie.map(g(s,"script"),b),i=o.length;u>l;l++)r=s,l!==d&&(r=ie.clone(r,!0,!0),i&&ie.merge(o,g(r,"script"))),t.call(this[l],r,l);if(i)for(a=o[o.length-1].ownerDocument,ie.map(o,x),l=0;i>l;l++)r=o[l],Xe.test(r.type||"")&&!ie._data(r,"globalEval")&&ie.contains(a,r)&&(r.src?ie._evalUrl&&ie._evalUrl(r.src):ie.globalEval((r.text||r.textContent||r.innerHTML||"").replace(Ve,"")));s=n=null}return this}}),ie.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ie.fn[e]=function(e){for(var n,r=0,i=[],o=ie(e),a=o.length-1;a>=r;r++)n=r===a?this:this.clone(!0),ie(o[r])[t](n),Q.apply(i,n.get());return this.pushStack(i)}});var Qe,Ke={};!function(){var e;ne.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,r;return n=he.getElementsByTagName("body")[0],n&&n.style?(t=he.createElement("div"),r=he.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),typeof t.style.zoom!==Te&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(he.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(r),e):void 0}}();var Ze,et,tt=/^margin/,nt=new RegExp("^("+Ee+")(?!px)[a-z%]+$","i"),rt=/^(top|right|bottom|left)$/;e.getComputedStyle?(Ze=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)},et=function(e,t,n){var r,i,o,a,s=e.style;return n=n||Ze(e),a=n?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==a||ie.contains(e.ownerDocument,e)||(a=ie.style(e,t)),nt.test(a)&&tt.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0===a?a:a+""}):he.documentElement.currentStyle&&(Ze=function(e){return e.currentStyle},et=function(e,t,n){var r,i,o,a,s=e.style;return n=n||Ze(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),nt.test(a)&&!rt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"}),!function(){function t(){var t,n,r,i;(n=he.getElementsByTagName("body")[0])&&n.style&&(t=he.createElement("div"),r=he.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=a=!1,l=!0,e.getComputedStyle&&(o="1%"!==(e.getComputedStyle(t,null)||{}).top,a="4px"===(e.getComputedStyle(t,null)||{width:"4px"}).width,i=t.appendChild(he.createElement("div")),i.style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",t.style.width="1px",l=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight),t.removeChild(i)),t.innerHTML="<table><tr><td></td><td>t</td></tr></table>",
5
5
  i=t.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",s=0===i[0].offsetHeight,s&&(i[0].style.display="",i[1].style.display="none",s=0===i[0].offsetHeight),n.removeChild(r))}var n,r,i,o,a,s,l;n=he.createElement("div"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=n.getElementsByTagName("a")[0],(r=i&&i.style)&&(r.cssText="float:left;opacity:.5",ne.opacity="0.5"===r.opacity,ne.cssFloat=!!r.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",ne.clearCloneStyle="content-box"===n.style.backgroundClip,ne.boxSizing=""===r.boxSizing||""===r.MozBoxSizing||""===r.WebkitBoxSizing,ie.extend(ne,{reliableHiddenOffsets:function(){return null==s&&t(),s},boxSizingReliable:function(){return null==a&&t(),a},pixelPosition:function(){return null==o&&t(),o},reliableMarginRight:function(){return null==l&&t(),l}}))}(),ie.swap=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};var it=/alpha\([^)]*\)/i,ot=/opacity\s*=\s*([^)]*)/,at=/^(none|table(?!-c[ea]).+)/,st=new RegExp("^("+Ee+")(.*)$","i"),lt=new RegExp("^([+-])=("+Ee+")","i"),ut={position:"absolute",visibility:"hidden",display:"block"},ct={letterSpacing:"0",fontWeight:"400"},dt=["Webkit","O","Moz","ms"];ie.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=et(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ne.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=ie.camelCase(t),l=e.style;if(t=ie.cssProps[s]||(ie.cssProps[s]=S(l,s)),a=ie.cssHooks[t]||ie.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];if(o=typeof n,"string"===o&&(i=lt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(ie.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||ie.cssNumber[s]||(n+="px"),ne.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{l[t]=n}catch(e){}}},css:function(e,t,n,r){var i,o,a,s=ie.camelCase(t);return t=ie.cssProps[s]||(ie.cssProps[s]=S(e.style,s)),a=ie.cssHooks[t]||ie.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=et(e,t,r)),"normal"===o&&t in ct&&(o=ct[t]),""===n||n?(i=parseFloat(o),!0===n||ie.isNumeric(i)?i||0:o):o}}),ie.each(["height","width"],function(e,t){ie.cssHooks[t]={get:function(e,n,r){return n?at.test(ie.css(e,"display"))&&0===e.offsetWidth?ie.swap(e,ut,function(){return L(e,t,r)}):L(e,t,r):void 0},set:function(e,n,r){var i=r&&Ze(e);return D(e,n,r?j(e,t,r,ne.boxSizing&&"border-box"===ie.css(e,"boxSizing",!1,i),i):0)}}}),ne.opacity||(ie.cssHooks.opacity={get:function(e,t){return ot.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=ie.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===ie.trim(o.replace(it,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=it.test(o)?o.replace(it,i):o+" "+i)}}),ie.cssHooks.marginRight=k(ne.reliableMarginRight,function(e,t){return t?ie.swap(e,{display:"inline-block"},et,[e,"marginRight"]):void 0}),ie.each({margin:"",padding:"",border:"Width"},function(e,t){ie.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+ke[r]+t]=o[r]||o[r-2]||o[0];return i}},tt.test(e)||(ie.cssHooks[e+t].set=D)}),ie.fn.extend({css:function(e,t){return Ae(this,function(e,t,n){var r,i,o={},a=0;if(ie.isArray(t)){for(r=Ze(e),i=t.length;i>a;a++)o[t[a]]=ie.css(e,t[a],!1,r);return o}return void 0!==n?ie.style(e,t,n):ie.css(e,t)},e,t,arguments.length>1)},show:function(){return A(this,!0)},hide:function(){return A(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Se(this)?ie(this).show():ie(this).hide()})}}),ie.Tween=H,H.prototype={constructor:H,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ie.cssNumber[n]?"":"px")},cur:function(){var e=H.propHooks[this.prop];return e&&e.get?e.get(this):H.propHooks._default.get(this)},run:function(e){var t,n=H.propHooks[this.prop];return this.pos=t=this.options.duration?ie.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=ie.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){ie.fx.step[e.prop]?ie.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ie.cssProps[e.prop]]||ie.cssHooks[e.prop])?ie.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ie.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},ie.fx=H.prototype.init,ie.fx.step={};var ft,pt,ht=/^(?:toggle|show|hide)$/,mt=new RegExp("^(?:([+-])=|)("+Ee+")([a-z%]*)$","i"),gt=/queueHooks$/,vt=[F],yt={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=mt.exec(t),o=i&&i[3]||(ie.cssNumber[e]?"":"px"),a=(ie.cssNumber[e]||"px"!==o&&+r)&&mt.exec(ie.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do{s=s||".5",a/=s,ie.style(n.elem,e,a+o)}while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};ie.Animation=ie.extend(B,{tweener:function(e,t){ie.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],yt[n]=yt[n]||[],yt[n].unshift(t)},prefilter:function(e,t){t?vt.unshift(e):vt.push(e)}}),ie.speed=function(e,t,n){var r=e&&"object"==typeof e?ie.extend({},e):{complete:n||!n&&t||ie.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ie.isFunction(t)&&t};return r.duration=ie.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in ie.fx.speeds?ie.fx.speeds[r.duration]:ie.fx.speeds._default,(null==r.queue||!0===r.queue)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){ie.isFunction(r.old)&&r.old.call(this),r.queue&&ie.dequeue(this,r.queue)},r},ie.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Se).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=ie.isEmptyObject(e),o=ie.speed(t,n,r),a=function(){var t=B(this,ie.extend({},e),o);(i||ie._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=ie.timers,a=ie._data(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&gt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&ie.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=ie._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=ie.timers,a=r?r.length:0;for(n.finish=!0,ie.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),ie.each(["toggle","show","hide"],function(e,t){var n=ie.fn[t];ie.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(_(t,!0),e,r,i)}}),ie.each({slideDown:_("show"),slideUp:_("hide"),slideToggle:_("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ie.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),ie.timers=[],ie.fx.tick=function(){var e,t=ie.timers,n=0;for(ft=ie.now();n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||ie.fx.stop(),ft=void 0},ie.fx.timer=function(e){ie.timers.push(e),e()?ie.fx.start():ie.timers.pop()},ie.fx.interval=13,ie.fx.start=function(){pt||(pt=setInterval(ie.fx.tick,ie.fx.interval))},ie.fx.stop=function(){clearInterval(pt),pt=null},ie.fx.speeds={slow:600,fast:200,_default:400},ie.fn.delay=function(e,t){return e=ie.fx?ie.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},function(){var e,t,n,r,i;t=he.createElement("div"),t.setAttribute("className","t"),t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=t.getElementsByTagName("a")[0],n=he.createElement("select"),i=n.appendChild(he.createElement("option")),e=t.getElementsByTagName("input")[0],r.style.cssText="top:1px",ne.getSetAttribute="t"!==t.className,ne.style=/top/.test(r.getAttribute("style")),ne.hrefNormalized="/a"===r.getAttribute("href"),ne.checkOn=!!e.value,ne.optSelected=i.selected,ne.enctype=!!he.createElement("form").enctype,n.disabled=!0,ne.optDisabled=!i.disabled,e=he.createElement("input"),e.setAttribute("value",""),ne.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),ne.radioValue="t"===e.value}();var bt=/\r/g;ie.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=ie.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,ie(this).val()):e,null==i?i="":"number"==typeof i?i+="":ie.isArray(i)&&(i=ie.map(i,function(e){return null==e?"":e+""})),(t=ie.valHooks[this.type]||ie.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=ie.valHooks[i.type]||ie.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(bt,""):null==n?"":n)):void 0}}),ie.extend({valHooks:{option:{get:function(e){var t=ie.find.attr(e,"value");return null!=t?t:ie.trim(ie.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(ne.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&ie.nodeName(n.parentNode,"optgroup"))){if(t=ie(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=ie.makeArray(t),a=i.length;a--;)if(r=i[a],ie.inArray(ie.valHooks.option.get(r),o)>=0)try{r.selected=n=!0}catch(e){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),ie.each(["radio","checkbox"],function(){ie.valHooks[this]={set:function(e,t){return ie.isArray(t)?e.checked=ie.inArray(ie(e).val(),t)>=0:void 0}},ne.checkOn||(ie.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var xt,wt,Tt=ie.expr.attrHandle,Ct=/^(?:checked|selected)$/i,Nt=ne.getSetAttribute,Et=ne.input;ie.fn.extend({attr:function(e,t){return Ae(this,ie.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ie.removeAttr(this,e)})}}),ie.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===Te?ie.prop(e,t,n):(1===o&&ie.isXMLDoc(e)||(t=t.toLowerCase(),r=ie.attrHooks[t]||(ie.expr.match.bool.test(t)?wt:xt)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=ie.find.attr(e,t),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void ie.removeAttr(e,t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(ye);if(o&&1===e.nodeType)for(;n=o[i++];)r=ie.propFix[n]||n,ie.expr.match.bool.test(n)?Et&&Nt||!Ct.test(n)?e[r]=!1:e[ie.camelCase("default-"+n)]=e[r]=!1:ie.attr(e,n,""),e.removeAttribute(Nt?n:r)},attrHooks:{type:{set:function(e,t){if(!ne.radioValue&&"radio"===t&&ie.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),wt={set:function(e,t,n){return!1===t?ie.removeAttr(e,n):Et&&Nt||!Ct.test(n)?e.setAttribute(!Nt&&ie.propFix[n]||n,n):e[ie.camelCase("default-"+n)]=e[n]=!0,n}},ie.each(ie.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Tt[t]||ie.find.attr;Tt[t]=Et&&Nt||!Ct.test(t)?function(e,t,r){var i,o;return r||(o=Tt[t],Tt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,Tt[t]=o),i}:function(e,t,n){return n?void 0:e[ie.camelCase("default-"+t)]?t.toLowerCase():null}}),Et&&Nt||(ie.attrHooks.value={set:function(e,t,n){return ie.nodeName(e,"input")?void(e.defaultValue=t):xt&&xt.set(e,t,n)}}),Nt||(xt={set:function(e,t,n){var r=e.getAttributeNode(n);return r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n)?t:void 0}},Tt.id=Tt.name=Tt.coords=function(e,t,n){var r;return n?void 0:(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},ie.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:void 0},set:xt.set},ie.attrHooks.contenteditable={set:function(e,t,n){xt.set(e,""!==t&&t,n)}},ie.each(["width","height"],function(e,t){ie.attrHooks[t]={set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}}})),ne.style||(ie.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var kt=/^(?:input|select|textarea|button|object)$/i,St=/^(?:a|area)$/i;ie.fn.extend({prop:function(e,t){return Ae(this,ie.prop,e,t,arguments.length>1)},removeProp:function(e){return e=ie.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(e){}})}}),ie.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!ie.isXMLDoc(e),o&&(t=ie.propFix[t]||t,i=ie.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ie.find.attr(e,"tabindex");return t?parseInt(t,10):kt.test(e.nodeName)||St.test(e.nodeName)&&e.href?0:-1}}}}),ne.hrefNormalized||ie.each(["href","src"],function(e,t){ie.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ne.optSelected||(ie.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),ie.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ie.propFix[this.toLowerCase()]=this}),ne.enctype||(ie.propFix.enctype="encoding");var At=/[\t\r\n\f]/g;ie.fn.extend({addClass:function(e){var t,n,r,i,o,a,s=0,l=this.length,u="string"==typeof e&&e;if(ie.isFunction(e))return this.each(function(t){ie(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(ye)||[];l>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(At," "):" ")){for(o=0;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a=ie.trim(r),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,r,i,o,a,s=0,l=this.length,u=0===arguments.length||"string"==typeof e&&e;if(ie.isFunction(e))return this.each(function(t){ie(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(ye)||[];l>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(At," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");a=e?ie.trim(r):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(ie.isFunction(e)?function(n){ie(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,r=0,i=ie(this),o=e.match(ye)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(n===Te||"boolean"===n)&&(this.className&&ie._data(this,"__className__",this.className),this.className=this.className||!1===e?"":ie._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(At," ").indexOf(t)>=0)return!0;return!1}}),ie.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ie.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ie.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Dt=ie.now(),jt=/\?/,Lt=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;ie.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=ie.trim(t+"");return i&&!ie.trim(i.replace(Lt,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():ie.error("Invalid JSON: "+t)},ie.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new DOMParser,n=r.parseFromString(t,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(e){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ie.error("Invalid XML: "+t),n};var Ht,qt,_t=/#.*$/,Mt=/([?&])_=[^&]*/,Ft=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ot=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Bt=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Wt={},$t={},zt="*/".concat("*");try{qt=location.href}catch(e){qt=he.createElement("a"),qt.href="",qt=qt.href}Ht=Rt.exec(qt.toLowerCase())||[],ie.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qt,type:"GET",isLocal:Ot.test(Ht[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ie.parseJSON,"text xml":ie.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?W(W(e,ie.ajaxSettings),t):W(ie.ajaxSettings,e)},ajaxPrefilter:P(Wt),ajaxTransport:P($t),ajax:function(e,t){function n(e,t,n,r){var i,c,v,y,x,T=t;2!==b&&(b=2,s&&clearTimeout(s),u=void 0,a=r||"",w.readyState=e>0?4:0,i=e>=200&&300>e||304===e,n&&(y=$(d,w,n)),y=z(d,y,w,i),i?(d.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(ie.lastModified[o]=x),(x=w.getResponseHeader("etag"))&&(ie.etag[o]=x)),204===e||"HEAD"===d.type?T="nocontent":304===e?T="notmodified":(T=y.state,c=y.data,v=y.error,i=!v)):(v=T,(e||!T)&&(T="error",0>e&&(e=0))),w.status=e,w.statusText=(t||T)+"",i?h.resolveWith(f,[c,T,w]):h.rejectWith(f,[w,T,v]),w.statusCode(g),g=void 0,l&&p.trigger(i?"ajaxSuccess":"ajaxError",[w,d,i?c:v]),m.fireWith(f,[w,T]),l&&(p.trigger("ajaxComplete",[w,d]),--ie.active||ie.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,s,l,u,c,d=ie.ajaxSetup({},t),f=d.context||d,p=d.context&&(f.nodeType||f.jquery)?ie(f):ie.event,h=ie.Deferred(),m=ie.Callbacks("once memory"),g=d.statusCode||{},v={},y={},b=0,x="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c)for(c={};t=Ft.exec(a);)c[t[1].toLowerCase()]=t[2];t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)g[t]=[g[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||x;return u&&u.abort(t),n(0,t),this}};if(h.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,d.url=((e||d.url||qt)+"").replace(_t,"").replace(Pt,Ht[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=ie.trim(d.dataType||"*").toLowerCase().match(ye)||[""],null==d.crossDomain&&(r=Rt.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]===Ht[1]&&r[2]===Ht[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(Ht[3]||("http:"===Ht[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=ie.param(d.data,d.traditional)),R(Wt,d,t,w),2===b)return w;l=ie.event&&d.global,l&&0==ie.active++&&ie.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Bt.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(jt.test(o)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=Mt.test(o)?o.replace(Mt,"$1_="+Dt++):o+(jt.test(o)?"&":"?")+"_="+Dt++)),d.ifModified&&(ie.lastModified[o]&&w.setRequestHeader("If-Modified-Since",ie.lastModified[o]),ie.etag[o]&&w.setRequestHeader("If-None-Match",ie.etag[o])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&w.setRequestHeader("Content-Type",d.contentType),w.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+zt+"; q=0.01":""):d.accepts["*"]);for(i in d.headers)w.setRequestHeader(i,d.headers[i]);if(d.beforeSend&&(!1===d.beforeSend.call(f,w,d)||2===b))return w.abort();x="abort";for(i in{success:1,error:1,complete:1})w[i](d[i]);if(u=R($t,d,t,w)){w.readyState=1,l&&p.trigger("ajaxSend",[w,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){w.abort("timeout")},d.timeout));try{b=1,u.send(v,n)}catch(e){if(!(2>b))throw e;n(-1,e)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return ie.get(e,t,n,"json")},getScript:function(e,t){return ie.get(e,void 0,t,"script")}}),ie.each(["get","post"],function(e,t){ie[t]=function(e,n,r,i){return ie.isFunction(n)&&(i=i||r,r=n,n=void 0),ie.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),ie._evalUrl=function(e){return ie.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ie.fn.extend({wrapAll:function(e){if(ie.isFunction(e))return this.each(function(t){ie(this).wrapAll(e.call(this,t))});if(this[0]){var t=ie(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return this.each(ie.isFunction(e)?function(t){ie(this).wrapInner(e.call(this,t))}:function(){var t=ie(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ie.isFunction(e);return this.each(function(n){ie(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ie.nodeName(this,"body")||ie(this).replaceWith(this.childNodes)}).end()}}),ie.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!ne.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||ie.css(e,"display"))},ie.expr.filters.visible=function(e){return!ie.expr.filters.hidden(e)};var It=/%20/g,Xt=/\[\]$/,Ut=/\r?\n/g,Vt=/^(?:submit|button|image|reset|file)$/i,Jt=/^(?:input|select|textarea|keygen)/i;ie.param=function(e,t){var n,r=[],i=function(e,t){t=ie.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=ie.ajaxSettings&&ie.ajaxSettings.traditional),ie.isArray(e)||e.jquery&&!ie.isPlainObject(e))ie.each(e,function(){i(this.name,this.value)});else for(n in e)I(n,e[n],t,i);return r.join("&").replace(It,"+")},ie.fn.extend({serialize:function(){return ie.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ie.prop(this,"elements");return e?ie.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ie(this).is(":disabled")&&Jt.test(this.nodeName)&&!Vt.test(e)&&(this.checked||!De.test(e))}).map(function(e,t){var n=ie(this).val();return null==n?null:ie.isArray(n)?ie.map(n,function(e){return{name:t.name,value:e.replace(Ut,"\r\n")}}):{name:t.name,value:n.replace(Ut,"\r\n")}}).get()}}),ie.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&X()||U()}:X;var Yt=0,Gt={},Qt=ie.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in Gt)Gt[e](void 0,!0)}),ne.cors=!!Qt&&"withCredentials"in Qt,(Qt=ne.ajax=!!Qt)&&ie.ajaxTransport(function(e){if(!e.crossDomain||ne.cors){var t;return{send:function(n,r){var i,o=e.xhr(),a=++Yt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)void 0!==n[i]&&o.setRequestHeader(i,n[i]+"");o.send(e.hasContent&&e.data||null),t=function(n,i){var s,l,u;if(t&&(i||4===o.readyState))if(delete Gt[a],t=void 0,o.onreadystatechange=ie.noop,i)4!==o.readyState&&o.abort();else{u={},s=o.status,"string"==typeof o.responseText&&(u.text=o.responseText);try{l=o.statusText}catch(e){l=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=u.text?200:404}u&&r(s,l,u,o.getAllResponseHeaders())},e.async?4===o.readyState?setTimeout(t):o.onreadystatechange=Gt[a]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),ie.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ie.globalEval(e),e}}}),ie.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),ie.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=he.head||ie("head")[0]||he.documentElement;return{send:function(r,i){t=he.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ie.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ie.expando+"_"+Dt++;return this[e]=!0,e}}),ie.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Zt.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=ie.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Zt,"$1"+i):!1!==t.jsonp&&(t.url+=(jt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||ie.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Kt.push(i)),a&&ie.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),ie.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||he;var r=de.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=ie.buildFragment([e],t,i),i&&i.length&&ie(i).remove(),ie.merge([],r.childNodes))};var en=ie.fn.load;ie.fn.load=function(e,t,n){if("string"!=typeof e&&en)return en.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>=0&&(r=ie.trim(e.slice(s,e.length)),e=e.slice(0,s)),ie.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&ie.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){i=arguments,a.html(r?ie("<div>").append(ie.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){a.each(n,i||[e.responseText,t,e])}),this},ie.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ie.fn[t]=function(e){return this.on(t,e)}}),ie.expr.filters.animated=function(e){return ie.grep(ie.timers,function(t){return e===t.elem}).length};var tn=e.document.documentElement;ie.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u,c=ie.css(e,"position"),d=ie(e),f={};"static"===c&&(e.style.position="relative"),s=d.offset(),o=ie.css(e,"top"),l=ie.css(e,"left"),u=("absolute"===c||"fixed"===c)&&ie.inArray("auto",[o,l])>-1,u?(r=d.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),ie.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):d.css(f)}},ie.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ie.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;return o?(t=o.documentElement,ie.contains(t,i)?(typeof i.getBoundingClientRect!==Te&&(r=i.getBoundingClientRect()),n=V(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r):void 0},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===ie.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ie.nodeName(e[0],"html")||(n=e.offset()),n.top+=ie.css(e[0],"borderTopWidth",!0),n.left+=ie.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-ie.css(r,"marginTop",!0),left:t.left-n.left-ie.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||tn;e&&!ie.nodeName(e,"html")&&"static"===ie.css(e,"position");)e=e.offsetParent;return e||tn})}}),ie.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);ie.fn[e]=function(r){return Ae(this,function(e,r,i){var o=V(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?ie(o).scrollLeft():i,n?i:ie(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),ie.each(["top","left"],function(e,t){ie.cssHooks[t]=k(ne.pixelPosition,function(e,n){return n?(n=et(e,t),nt.test(n)?ie(e).position()[t]+"px":n):void 0})}),ie.each({Height:"height",Width:"width"},function(e,t){ie.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){ie.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return Ae(this,function(t,n,r){var i;return ie.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?ie.css(t,n,a):ie.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),ie.fn.size=function(){return this.length},ie.fn.andSelf=ie.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ie});var nn=e.jQuery,rn=e.$;return ie.noConflict=function(t){return e.$===ie&&(e.$=rn),t&&e.jQuery===ie&&(e.jQuery=nn),ie},typeof t===Te&&(e.jQuery=e.$=ie),ie});
6
6
  //script: slot
7
- (function(){var t,e,n,a,i,o,r,s,l,d,c,u,f,h,p;window.wagn||(window.wagn={}),$(window).ready(function(){var t;return $("body").on("click",".pointer-item-add",function(t){var e,n,a;return n=$(this).closest(".content-editor").find(".pointer-li:last"),a=n.clone(),e=a.find("input"),e.val(""),n.after(a),wagn.initPointerList(e),t.preventDefault()}),$("body").on("click",".pointer-item-delete",function(){var t;return t=$(this).closest("li"),t.closest("ul").find(".pointer-li").length>1?t.remove():t.find("input").val("")}),$("body").on("show.bs.tab","a.load[data-toggle=tab][data-url]",function(t){var e,n;return e=$(t.target).attr("href"),n=$(t.target).data("url"),$(t.target).removeClass("load"),$(e).load(n)}),$("body").on("click",".toolbar-pin.active",function(t){return t.preventDefault(),$(this).blur(),$(".toolbar-pin").removeClass("active").addClass("inactive"),$.ajax("/*toolbar_pinned",{type:"PUT",data:"card[content]=false"})}),$("body").on("click",".toolbar-pin.inactive",function(t){return t.preventDefault(),$(this).blur(),$(".toolbar-pin").removeClass("inactive").addClass("active"),$.ajax("/*toolbar_pinned",{type:"PUT",data:"card[content]=true"})}),$("body").on("click",".btn-item-delete",function(){return $(this).find(".glyphicon").addClass("glyphicon-hourglass").removeClass("glyphicon-remove")}),$("body").on("click",".btn-item-add",function(){return $(this).find(".glyphicon").addClass("glyphicon-hourglass").removeClass("glyphicon-plus")}),$("body").on("mouseenter",".btn-item-delete",function(){return $(this).find(".glyphicon").addClass("glyphicon-remove").removeClass("glyphicon-ok"),$(this).addClass("btn-danger").removeClass("btn-primary")}),$("body").on("mouseleave",".btn-item-delete",function(){return $(this).find(".glyphicon").addClass("glyphicon-ok").removeClass("glyphicon-remove"),$(this).addClass("btn-primary").removeClass("btn-danger")}),$("body").on("hidden.bs.modal",function(t){var e,n,a,i,o;if(n=$(t.target).find(".modal-dialog > .modal-content"),"modal-main-slot"!==$(t.target).attr("id"))return i=$(t.target).slot(),e=i.find(".menu-slot:first"),o=wagn.rootPath+"/~"+i.data("card-id"),a={view:"menu"},i.isMain()&&(a.is_main=!0),n.empty(),$.ajax(o,{type:"GET",data:a,success:function(t){return e.replaceWith(t)}})}),$("body").on("click",".perm-vals input",function(){return $(this).slot().find("#inherit").attr("checked",!1)}),$("body").on("click",".perm-editor #inherit",function(){var t;return t=$(this).slot(),t.find(".perm-group input:checked").attr("checked",!1),t.find(".perm-indiv input").val("")}),$("body").on("click",".rule-submit-button",function(){var t,e;return e=$(this).closest("form"),t=e.find(".set-editor input:checked"),t.val()?!t.attr("warning")||confirm(t.attr("warning")):(e.find(".set-editor").addClass("attention"),$(this).notify("To what Set does this Rule apply?"),!1)}),$("body").on("click",".submit-modal",function(){return $(this).closest(".modal-content").find("form").submit()}),$("body").on("click",".shade-view h1",function(){var t;if(t=$(this).slot().find(".shade-content").is(":hidden"),f($(this).closest(".pointer-list").find(".shade-content:visible").parent()),t)return f($(this).slot())}),(t=$(".shade-view h1")[0])&&$(t).trigger("click"),$("body").on("change",".go-to-selected select",function(){var t;if(""!==(t=$(this).val()))return window.location=wagn.rootPath+escape(t)}),$("body").on("click",".open-slow-items",function(){var t;return t=$(this).closest(".panel-group"),t.find(".open-slow-items").removeClass("open-slow-items").addClass("close-slow-items"),t.find(".toggle-fast-items").text("show < 100ms"),t.find(".duration-ok").hide(),t.find(".panel-danger > .panel-collapse").collapse("show").find("a > span").addClass("show-fast-items")}),$("body").on("click",".close-slow-items",function(){var t;return t=$(this).closest(".panel-group"),t.find(".close-slow-items").removeClass("close-slow-items").addClass("open-slow-items"),t.find(".toggle-fast-items").text("hide < 100ms"),t.find(".panel-danger > .panel-collapse").collapse("hide").removeClass("show-fast-items"),t.find(".duration-ok").show()}),$("body").on("click",".toggle-fast-items",function(){var t;return t=$(this).closest(".panel-group"),"hide < 100ms"===$(this).text()?(t.find(".duration-ok").hide(),$(this).text("show < 100ms")):(t.find(".duration-ok").show(),$(this).text("hide < 100ms"))}),$("body").on("click",".show-fast-items",function(t){var e;return $(this).removeClass("show-fast-items"),e=$(this).closest(".panel-group"),e.find(".duration-ok").show(),e.find(".show-fast-items").removeClass("show-fast-items"),e.find(".panel-collapse").collapse("show"),t.stopPropagation()})}),f=function(t){return t.find(".shade-content").slideToggle(1e3),t.find(".glyphicon").toggleClass("glyphicon-triangle-right glpyphicon-triangle-bottom")},$.extend(wagn,{editorContentFunctionMap:{},editorInitFunctionMap:{".date-editor":function(){return this.datepicker({dateFormat:"yy-mm-dd"})},textarea:function(){return $(this).autosize()},".file-upload":function(){return wagn.upload_file(this)},".etherpad-textarea":function(){return $(this).closest("form").find(".edit-submit-button").attr("class","etherpad-submit-button")}},addEditor:function(t,e,n){return wagn.editorContentFunctionMap[t]=n,wagn.editorInitFunctionMap[t]=e}}),jQuery.fn.extend({setContentFieldsFromMap:function(t){var e;return null==t&&(t=wagn.editorContentFunctionMap),e=$(this),$.each(t,function(t,n){return e.setContentFields(t,n)})},setContentFields:function(t,e){return $.each(this.find(t),function(){return $(this).setContentField(e)})},setContentField:function(t){var e,n,a;if(e=this.closest(".card-editor").find(".card-content"),n=e.val(),a=t.call(this),e.val(a),n!==a)return e.change()}}),h=function(){var t;if(t=$("body > footer").first(),$("body > article, body > aside").wrapAll("<div class='"+e()+"'/>"),$("body > div > article, body > div > aside").wrapAll('<div class="row row-offcanvas">'),t)return $("body").append(t)},p=function(t){return"<div class='container'><div class='row'>"+t+"</div></div>"},e=function(){return $("body").hasClass("fluid")?"container-fluid":"container"},d=function(t){var e;return e="left"===t?"right":"left","<button class='offcanvas-toggle offcanvas-toggle-"+t+" btn btn-secondary visible-xs' data-toggle='offcanvas-"+t+"'><span class='glyphicon glyphicon-chevron-"+e+"'/></button>"},c=function(t){var e,n;return e=$("body > article").first(),n=$("body > aside").first(),e.addClass("col-xs-12 col-sm-9 col-md-9"),n.addClass("col-xs-6 col-sm-3 col-md-3 sidebar-offcanvas sidebar-offcanvas-"+t),"left"===t?$("body").append(n).append(e):$("body").append(e).append(n),h(),e.prepend(p(d(t)))},a=function(){var t,e,n,a,i;return t=$("body > article").first(),e=$("body > aside").first(),n=$($("body > aside")[1]),t.addClass("col-xs-12 col-sm-6"),a="col-xs-6 col-sm-3 sidebar-offcanvas",e.addClass(a+" sidebar-offcanvas-left"),n.addClass(a+" sidebar-offcanvas-right"),$("body").append(e).append(t).append(n),h(),i=p(d("right")+d("left")),t.prepend(i)},$(window).ready(function(){switch(!1){case!$("body").hasClass("right-sidebar"):c("right");break;case!$("body").hasClass("left-sidebar"):c("left");break;case!$("body").hasClass("two-sidebar"):a()}return $('[data-toggle="offcanvas-left"]').click(function(){return $(".row-offcanvas").removeClass("right-active").toggleClass("left-active"),$(this).find("span.glyphicon").toggleClass("glyphicon-chevron-left glyphicon-chevron-right")}),$('[data-toggle="offcanvas-right"]').click(function(){return $(".row-offcanvas").removeClass("left-active").toggleClass("right-active"),$(this).find("span.glyphicon").toggleClass("glyphicon-chevron-left glyphicon-chevron-right")})}),$(window).ready(function(){return $(".navbox").autocomplete({html:"html",source:o,select:r})}),l=0,o=function(t,e){var n,a;return n=this.element.closest("form"),a=n.serialize()+"&view=complete",this.xhr=$.ajax({url:wagn.prepUrl(wagn.rootPath+"/:search.json"),data:a,dataType:"json",wagReq:++l,success:function(n){if(this.wagReq===l)return e(s(t.term,n))},error:function(){if(this.wagReq===l)return e([])}})},s=function(t,e){var n;return n=[],$.each(["search","add","new"],function(a,i){var o,r;if(r=e[i])return o={value:t,prefix:i,icon:"plus",label:'<strong class="highlight">'+t+"</strong>"},"search"===i?(o.icon=i,o.term=t):"add"===i?o.href="/card/new?card[name]="+encodeURIComponent(r):"new"===i&&(o.type="add",o.href="/new/"+r[1]),n.push(o)}),$.each(e["goto"],function(t,e){return n.push({icon:"share-alt",prefix:"go to",value:e[0],label:e[1],href:"/"+e[2]})}),$.each(n,function(t,e){return e.label='<span class="glyphicon glyphicon-'+e.icon+'"></span><span class="navbox-item-label">'+e.prefix+':</span> <span class="navbox-item-value">'+e.label+"</span>"}),n},r=function(t,e){return e.item.term?$(this).closest("form").submit():window.location=wagn.rootPath+e.item.href,$(this).attr("disabled","disabled")},$.extend(wagn,{upload_file:function(t){var e,n;return $(t).bind("fileuploadsubmit",function(t,e){var n,a,i;return n=$(this),a=n.siblings(".attachment_card_name:first").attr("name"),i=n.siblings("#attachment_type_id").val(),e.formData={"card[type_id]":i,attachment_upload:a}}),e=$(t),n=e.closest("form").attr("action").indexOf("update")>-1?"/card/update/"+$(t).siblings("#file_card_name").val():"/card/create",$(t).fileupload({url:n,dataType:"html",done:wagn.doneFile,add:wagn.chooseFile,progressall:wagn.progressallFile})},chooseFile:function(t,e){var n;return e.form.find("button[type=submit]").attr("disabled",!0),n=$(this).closest(".card-editor"),$("#progress").show(),n.append('<input type="hidden" class="extra_upload_param" value="true" name="attachment_upload">'),n.append('<input type="hidden" class="extra_upload_param" value="preview_editor" name="view">'),e.submit(),n.find(".choose-file").hide(),n.find(".extra_upload_param").remove()},progressallFile:function(t,e){var n;return n=parseInt(e.loaded/e.total*100,10),$("#progress .progress-bar").css("width",n+"%")},doneFile:function(t,e){var n;return n=$(this).closest(".card-editor"),n.find(".chosen-file").replaceWith(e.result),e.form.find("button[type=submit]").attr("disabled",!1)}}),$(window).ready(function(){return $("body").on("click",".cancel-upload",function(){var t;return t=$(this).closest(".card-editor"),t.find(".choose-file").show(),t.find(".chosen-file").empty(),t.find(".progress").show(),t.find("#progress .progress-bar").css("width","0%"),t.find("#progress").hide()})}),$.extend(wagn,{initializeEditors:function(t,e){return null==e&&(e=wagn.editorInitFunctionMap),$.each(e,function(e,n){return $.each(t.find(e),function(){return n.call($(this))})})},prepUrl:function(t,e){var n,a,i;return i={},n=$("#main").children(".card-slot").data("cardName"),null!=n&&(i.main=n),e&&(e.isMain()&&(i.is_main=!0),null!=(a=e.data("slot"))&&wagn.slotParams(a,i,"slot")),t+(t.match(/\?/)?"&":"?")+$.param(i)},slotParams:function(t,e,n){return $.each(t,function(t,a){var i;return i=n+"["+u(t)+"]","items"===t?wagn.slotParams(a,e,i):e[i]=a})},slotReady:function(t){return $("document").ready(function(){return $("body").on("slotReady",".card-slot",function(e){return e.stopPropagation(),t.call(this,$(this))})})},pingName:function(t,e){return $.getJSON(wagn.rootPath+"/",{format:"json",view:"status","card[name]":t},e)},isTouchDevice:function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)||n()}},n=function(t){return t=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}),jQuery.fn.extend({slot:function(t){return null==t&&(t="success"),this.data("slot-"+t+"-selector")?this.findSlot(this.data("slot-"+t+"-selector")):this.data("slot-selector")?this.findSlot(this.data("slot-selector")):this.closest(".card-slot")},findSlot:function(t){var e,n;for(n=this.closest(t),e=this.closest(".card-slot");0===n.length&&e.length>0;)n=$(e).find(t),e=$(e).parent().closest(".card-slot");return 0===n.length?$(t):n},setSlotContent:function(t){var e,n;return e=this.slot(),n=$(t),n[0]||(n=t),e.replaceWith(n),n.trigger("slotReady"),n},slotSuccess:function(t){var e,n;return t.redirect?window.location=t.redirect:(n=this.attr("notify-success"),e=this.setSlotContent(t),e.jquery&&(wagn.initializeEditors(e),null!=n)?e.notify(n,"success"):void 0)},slotError:function(t,e){return 403===t?this.setSlotContent(e):(this.notify(e,"error"),409===t?this.slot().find(".current_revision_id").val(this.slot().find(".new-current-revision-id").text()):449===t?this.slot().find("g-recaptcha").reloadCaptcha():void 0)},notify:function(t,e){var n,a,i;return i=this.slot(e),a=i.find(".card-notice"),a[0]||(a=$('<div class="card-notice"></div>'),n=i.find(".card-form"),n[0]?$(n[0]).append(a):i.append(a)),a.html(t),a.show("blind")},report:function(t){var e;return e=this.slot().find(".card-report"),!!e[0]&&(e.hide(),e.html(t),e.show("drop",750),setTimeout(function(){return e.hide("drop",750)},3e3))},isMain:function(){return this.slot().parent("#main")[0]},reloadCaptcha:function(){return this[0].empty(),grecaptcha.render(this[0],{sitekey:wagn.recaptchaKey})},autosave:function(){var t,e,n,a,i;if(a=this.slot(),!this.attr("no-autosave")){if(n=this.closest(".form-group"),n[0]){if(!(e=n.data("cardId")))return;": "+n.data("cardName")}else e=a.data("cardId"),"";return i=wagn.rootPath+"/update/~"+e,t=$("#edit_card_"+e).serializeArray().reduce(function(t,e){return t[e.name]=e.value,t},{draft:"true","success[view]":"blank"}),$.ajax(i,{data:t,type:"POST"})}}}),setInterval(function(){return $(".card-form").setContentFieldsFromMap()},2e4),$(window).ready(function(){return $.ajaxSetup({cache:!1}),setTimeout(function(){return wagn.initializeEditors($("body"))},10),$("body").on("ajax:success",".slotter",function(t,e){var n;if(!t.slotSuccessful)return n=$(this).slot().offset().top,$(this).slotSuccess(e),$(this).hasClass("close-modal")&&$(this).closest(".modal").modal("hide"),$(this).hasClass("card-paging-link")&&$("body").scrollTop(n),t.slotSuccessful=!0}),$("body").on("loaded.bs.modal",null,function(t){if(!t.slotSuccessful)return wagn.initializeEditors($(t.target)),$(t.target).find(".card-slot").trigger("slotReady"),t.slotSuccessful=!0}),$("body").on("ajax:error",".slotter",function(t,e){return $(this).slotError(e.status,e.responseText)}),$("body").on("click","button.slotter",function(){return!!$.rails.allowAction($(this))&&$.rails.handleRemote($(this))}),$("body").on("ajax:beforeSend",".slotter",function(e,n,a){var o,r,s,l,d;if(!a.skip_before_send&&(a.url.match(/home_view/)||(a.url=wagn.prepUrl(a.url,$(this).slot())),$(this).is("form"))){if(wagn.recaptchaKey&&"on"===$(this).attr("recaptcha")&&!$(this).find(".g-recaptcha")[0])return $(".g-recaptcha")[0]?t(this):i(this),!1;if(r=$(this).data("file-data"))return l=$(this).find(".file-upload"),l[1]?($(this).notify("Wagn does not yet support multiple files in a single form.","error"),!1):(d=l.data("blueimpFileupload"),d._isXHRUpload(d.options)||($(this).find("[name=success]").val("_self"),a.url+="&simulate_xhr=true",s=function(t){return t.find("body").html()},a.dataFilter=s),o=$.extend(a,d._getAJAXSettings(r),{url:a.url}),o.skip_before_send=!0,$.ajax(o),!1)}}),$("body").on("submit",".card-form",function(){return $(this).setContentFieldsFromMap(),$(this).find(".card-content").attr("no-autosave","true"),!0}),$("body").on("click",".submitter",function(){return $(this).closest("form").submit()}),$("body").on("click",".renamer-updater",function(){return $(this).closest("form").find("#card_update_referers").val("true")}),$("body").on("submit",".edit_name-view .card-form",function(){var t;if(t=$(this).find(".alert"),t.is(":hidden"))return $(this).find("#referers").val()>0&&$(this).find(".renamer-updater").show(),t.show("blind"),!1}),$("body").on("click",".follow-updater",function(){return $(this).closest("form").find("#card_update_all_users").val("true")}),$("body").on("submit",".edit-view.SELF-Xfollow_default .card-form",function(){var t;if(t=$(this).find(".confirm_update_all-view"),t.is(":hidden"))return $(this).find(".follow-updater").show(),t.show("blind"),!1}),$("body").on("click","button.redirecter",function(){return window.location=$(this).attr("href")}),wagn.noDoubleClick||$("body").on("dblclick","div",function(){var t,e;return e=$(this),!e.closest(".nodblclick")[0]&&(!e.closest(".card-header")[0]&&(t=e.slot(),!t.find(".card-editor")[0]&&(!!t.data("cardId")&&(t.addClass("slotter"),t.attr("href",wagn.rootPath+"/card/edit/~"+t.data("cardId")),$.rails.handleRemote(t),!1))))}),$("body").on("submit","form.slotter",function(){var t,e;if((e=$(this).attr("main-success"))&&$(this).isMain()&&(t=$(this).find("[name=success]"))&&!t.val().match(/^REDIRECT/))return t.val("REDIRECT"===e?e+": "+t.val():e)}),$("body").on("change",".live-type-field",function(){return $(this).data("params",$(this).closest("form").serialize()),$(this).data("url",$(this).attr("href"))}),$("body").on("change",".edit-type-field",function(){return $(this).closest("form").submit()}),$("body").on("change",".autosave .card-content",function(){var t;return t=$(this),setTimeout(function(){return t.autosave()},500)}),$("body").on("mouseenter","[hover_content]",function(){return $(this).attr("hover_restore",$(this).html()),$(this).html($(this).attr("hover_content"))}),$("body").on("mouseleave","[hover_content]",function(){return $(this).html($(this).attr("hover_restore"))}),$("body").on("keyup",".name-editor input",function(){var t,e;return t=$(this),e=t.val(),wagn.pingName(e,function(n){var a,i,o,r,s,l;return t.val()!==e?null:(l=n.status,l?(a=t.parent(),i=t.closest("fieldset").find("legend"),o=i.find(".name-messages"),o[0]||(o=$('<span class="name-messages"></span>'),i.append(o)),a.removeClass("real-name virtual-name known-name"),s=t.slot().data("cardId"),"unknown"===l||s&&parseInt(s)===n.id?o.html(""):(a.addClass(l+"-name known-name"),r="virtual"===l?"in virtual":"already in",o.html('"<a href="'+wagn.rootPath+"/"+n.url_key+'">'+e+'</a>" '+r+" use"))):void 0)})}),$("body").on("click",".render-error-link",function(t){var e;return e=$(this).closest(".render-error").find(".render-error-message"),e.show(),t.preventDefault()}),$("card-view-placeholder").each(function(){var t;return t=$(this),$.get(t.data("url"),function(e){return t.replaceWith(e)})})}),i=function(t){var e,n;return e=$("<div class='g-recaptcha' data-sitekey='"+wagn.recaptchaKey+"'></div>"),$(t).children().last().after(e),n="https://www.google.com/recaptcha/api.js",$.getScript(n)},t=function(t){var e;return e=$('<div class="g-recaptcha"></div>'),$(t).children().last().after(e),grecaptcha.render(e,{sitekey:wagn.recaptchaKey})},u=function(t){return t.replace(/([a-z])([A-Z])/g,function(t){return t[0]+"_"+t[1].toLowerCase()})},wagn.slotReady(function(t){return t.find("._disappear").delay(5e3).animate({height:0},1e3,function(){return $(this).hide()})})}).call(this);
7
+ (function(){var t,e,n,a,i,o,r,s,l,d,c,u,f,h,p;window.wagn||(window.wagn={}),$(window).ready(function(){var t;return $("body").on("click",".pointer-item-add",function(t){var e,n,a;return n=$(this).closest(".content-editor").find(".pointer-li:last"),a=n.clone(),e=a.find("input"),e.val(""),n.after(a),wagn.initPointerList(e),t.preventDefault()}),$("body").on("click",".pointer-item-delete",function(){var t;return t=$(this).closest("li"),t.closest("ul").find(".pointer-li").length>1?t.remove():t.find("input").val("")}),$("body").on("show.bs.tab","a.load[data-toggle=tab][data-url]",function(t){var e,n;return e=$(t.target).attr("href"),n=$(t.target).data("url"),$(t.target).removeClass("load"),$(e).load(n)}),$("body").on("click",".toolbar-pin.active",function(t){return t.preventDefault(),$(this).blur(),$(".toolbar-pin").removeClass("active").addClass("inactive"),$.ajax("/*toolbar_pinned",{type:"PUT",data:"card[content]=false"})}),$("body").on("click",".toolbar-pin.inactive",function(t){return t.preventDefault(),$(this).blur(),$(".toolbar-pin").removeClass("inactive").addClass("active"),$.ajax("/*toolbar_pinned",{type:"PUT",data:"card[content]=true"})}),$("body").on("click",".btn-item-delete",function(){return $(this).find(".glyphicon").addClass("glyphicon-hourglass").removeClass("glyphicon-remove")}),$("body").on("click",".btn-item-add",function(){return $(this).find(".glyphicon").addClass("glyphicon-hourglass").removeClass("glyphicon-plus")}),$("body").on("mouseenter",".btn-item-delete",function(){return $(this).find(".glyphicon").addClass("glyphicon-remove").removeClass("glyphicon-ok"),$(this).addClass("btn-danger").removeClass("btn-primary")}),$("body").on("mouseleave",".btn-item-delete",function(){return $(this).find(".glyphicon").addClass("glyphicon-ok").removeClass("glyphicon-remove"),$(this).addClass("btn-primary").removeClass("btn-danger")}),$("body").on("hidden.bs.modal",function(t){var e,n,a,i,o;if(n=$(t.target).find(".modal-dialog > .modal-content"),"modal-main-slot"!==$(t.target).attr("id"))return i=$(t.target).slot(),e=i.find(".menu-slot:first"),o=wagn.rootPath+"/~"+i.data("card-id"),a={view:"menu"},i.isMain()&&(a.is_main=!0),n.empty(),$.ajax(o,{type:"GET",data:a,success:function(t){return e.replaceWith(t)}})}),$("body").on("click",".perm-vals input",function(){return $(this).slot().find("#inherit").attr("checked",!1)}),$("body").on("click",".perm-editor #inherit",function(){var t;return t=$(this).slot(),t.find(".perm-group input:checked").attr("checked",!1),t.find(".perm-indiv input").val("")}),$("body").on("click",".rule-submit-button",function(){var t,e;return e=$(this).closest("form"),t=e.find(".set-editor input:checked"),t.val()?!t.attr("warning")||confirm(t.attr("warning")):(e.find(".set-editor").addClass("attention"),$(this).notify("To what Set does this Rule apply?"),!1)}),$("body").on("click",".submit-modal",function(){return $(this).closest(".modal-content").find("form").submit()}),$("body").on("click",".shade-view h1",function(){var t;if(t=$(this).slot().find(".shade-content").is(":hidden"),f($(this).closest(".pointer-list").find(".shade-content:visible").parent()),t)return f($(this).slot())}),(t=$(".shade-view h1")[0])&&$(t).trigger("click"),$("body").on("change",".go-to-selected select",function(){var t;if(""!==(t=$(this).val()))return window.location=wagn.rootPath+escape(t)}),$("body").on("click",".open-slow-items",function(){var t;return t=$(this).closest(".panel-group"),t.find(".open-slow-items").removeClass("open-slow-items").addClass("close-slow-items"),t.find(".toggle-fast-items").text("show < 100ms"),t.find(".duration-ok").hide(),t.find(".panel-danger > .panel-collapse").collapse("show").find("a > span").addClass("show-fast-items")}),$("body").on("click",".close-slow-items",function(){var t;return t=$(this).closest(".panel-group"),t.find(".close-slow-items").removeClass("close-slow-items").addClass("open-slow-items"),t.find(".toggle-fast-items").text("hide < 100ms"),t.find(".panel-danger > .panel-collapse").collapse("hide").removeClass("show-fast-items"),t.find(".duration-ok").show()}),$("body").on("click",".toggle-fast-items",function(){var t;return t=$(this).closest(".panel-group"),"hide < 100ms"===$(this).text()?(t.find(".duration-ok").hide(),$(this).text("show < 100ms")):(t.find(".duration-ok").show(),$(this).text("hide < 100ms"))}),$("body").on("click",".show-fast-items",function(t){var e;return $(this).removeClass("show-fast-items"),e=$(this).closest(".panel-group"),e.find(".duration-ok").show(),e.find(".show-fast-items").removeClass("show-fast-items"),e.find(".panel-collapse").collapse("show"),t.stopPropagation()})}),f=function(t){return t.find(".shade-content").slideToggle(1e3),t.find(".glyphicon").toggleClass("glyphicon-triangle-right glpyphicon-triangle-bottom")},$.extend(wagn,{editorContentFunctionMap:{},editorInitFunctionMap:{".date-editor":function(){return this.datepicker({dateFormat:"yy-mm-dd"})},textarea:function(){return $(this).autosize()},".file-upload":function(){return wagn.upload_file(this)},".etherpad-textarea":function(){return $(this).closest("form").find(".edit-submit-button").attr("class","etherpad-submit-button")}},addEditor:function(t,e,n){return wagn.editorContentFunctionMap[t]=n,wagn.editorInitFunctionMap[t]=e}}),jQuery.fn.extend({setContentFieldsFromMap:function(t){var e;return null==t&&(t=wagn.editorContentFunctionMap),e=$(this),$.each(t,function(t,n){return e.setContentFields(t,n)})},setContentFields:function(t,e){return $.each(this.find(t),function(){return $(this).setContentField(e)})},setContentField:function(t){var e,n,a;if(e=this.closest(".card-editor").find(".d0-card-content"),n=e.val(),a=t.call(this),e.val(a),n!==a)return e.change()}}),h=function(){var t;if(t=$("body > footer").first(),$("body > article, body > aside").wrapAll("<div class='"+e()+"'/>"),$("body > div > article, body > div > aside").wrapAll('<div class="row row-offcanvas">'),t)return $("body").append(t)},p=function(t){return"<div class='container'><div class='row'>"+t+"</div></div>"},e=function(){return $("body").hasClass("fluid")?"container-fluid":"container"},d=function(t){var e;return e="left"===t?"right":"left","<button class='offcanvas-toggle offcanvas-toggle-"+t+" btn btn-secondary hidden-sm-up' data-toggle='offcanvas-"+t+"'><i class='material-icons'>chevron-"+e+"</i></button>"},c=function(t){var e,n;return e=$("body > article").first(),n=$("body > aside").first(),e.addClass("col-xs-12 col-sm-9 col-md-9"),n.addClass("col-xs-6 col-sm-3 col-md-3 sidebar-offcanvas sidebar-offcanvas-"+t),"left"===t?$("body").append(n).append(e):$("body").append(e).append(n),h(),e.prepend(p(d(t)))},a=function(){var t,e,n,a,i;return t=$("body > article").first(),e=$("body > aside").first(),n=$($("body > aside")[1]),t.addClass("col-xs-12 col-sm-6"),a="col-xs-6 col-sm-3 sidebar-offcanvas",e.addClass(a+" sidebar-offcanvas-left"),n.addClass(a+" sidebar-offcanvas-right"),$("body").append(e).append(t).append(n),h(),i=p(d("right")+d("left")),t.prepend(i)},$.fn.extend({toggleText:function(t,e){return this.text(this.text()===e?t:e),this}}),$(window).ready(function(){switch(!1){case!$("body").hasClass("right-sidebar"):c("right");break;case!$("body").hasClass("left-sidebar"):c("left");break;case!$("body").hasClass("two-sidebar"):a()}return $('[data-toggle="offcanvas-left"]').click(function(){return $(".row-offcanvas").removeClass("right-active").toggleClass("left-active"),$(this).find("i.material-icons").toggleText("chevron_left chevron_right")}),$('[data-toggle="offcanvas-right"]').click(function(){return $(".row-offcanvas").removeClass("left-active").toggleClass("right-active"),$(this).find("i.material-icons").toggleText("chevron_left chevron_right")})}),$(window).ready(function(){return $("._navbox").autocomplete({html:"html",source:o,select:r})}),l=0,o=function(t,e){var n,a;return n=this.element.closest("form"),a=n.serialize()+"&view=complete",this.xhr=$.ajax({url:wagn.prepUrl(wagn.rootPath+"/:search.json"),data:a,dataType:"json",wagReq:++l,success:function(n){if(this.wagReq===l)return e(s(t.term,n))},error:function(){if(this.wagReq===l)return e([])}})},s=function(t,e){var n;return n=[],$.each(["search","add","new"],function(a,i){var o,r;if(r=e[i])return o={value:t,prefix:i,icon:"add",label:'<strong class="highlight">'+t+"</strong>"},"search"===i?(o.icon=i,o.term=t):"add"===i?o.href="/card/new?card[name]="+encodeURIComponent(r):"new"===i&&(o.type="add",o.href="/new/"+r[1]),n.push(o)}),$.each(e["goto"],function(t,e){return n.push({icon:"arrow_forward",prefix:"go to",value:e[0],label:e[1],href:"/"+e[2]})}),$.each(n,function(t,e){return e.label='<i class="material-icons">'+e.icon+'</i><span class="navbox-item-label">'+e.prefix+':</span> <span class="navbox-item-value">'+e.label+"</span>"}),n},r=function(t,e){return e.item.term?$(this).closest("form").submit():window.location=wagn.rootPath+e.item.href,$(this).attr("disabled","disabled")},$.extend(wagn,{upload_file:function(t){var e,n;return $(t).bind("fileuploadsubmit",function(t,e){var n,a,i;return n=$(this),a=n.siblings(".attachment_card_name:first").attr("name"),i=n.siblings("#attachment_type_id").val(),e.formData={"card[type_id]":i,attachment_upload:a}}),e=$(t),n=e.closest("form").attr("action").indexOf("update")>-1?"/card/update/"+$(t).siblings("#file_card_name").val():"/card/create",$(t).fileupload({url:n,dataType:"html",done:wagn.doneFile,add:wagn.chooseFile,progressall:wagn.progressallFile})},chooseFile:function(t,e){var n;return e.form.find("button[type=submit]").attr("disabled",!0),n=$(this).closest(".card-editor"),$("#progress").show(),n.append('<input type="hidden" class="extra_upload_param" value="true" name="attachment_upload">'),n.append('<input type="hidden" class="extra_upload_param" value="preview_editor" name="view">'),e.submit(),n.find(".choose-file").hide(),n.find(".extra_upload_param").remove()},progressallFile:function(t,e){var n;return n=parseInt(e.loaded/e.total*100,10),$("#progress .progress-bar").css("width",n+"%")},doneFile:function(t,e){var n;return n=$(this).closest(".card-editor"),n.find(".chosen-file").replaceWith(e.result),e.form.find("button[type=submit]").attr("disabled",!1)}}),$(window).ready(function(){return $("body").on("click",".cancel-upload",function(){var t;return t=$(this).closest(".card-editor"),t.find(".choose-file").show(),t.find(".chosen-file").empty(),t.find(".progress").show(),t.find("#progress .progress-bar").css("width","0%"),t.find("#progress").hide()})}),$.extend(wagn,{initializeEditors:function(t,e){return null==e&&(e=wagn.editorInitFunctionMap),$.each(e,function(e,n){return $.each(t.find(e),function(){return n.call($(this))})})},prepUrl:function(t,e){var n,a,i;return i={},n=$("#main").children(".card-slot").data("cardName"),null!=n&&(i.main=n),e&&(e.isMain()&&(i.is_main=!0),null!=(a=e.data("slot"))&&wagn.slotParams(a,i,"slot")),t+(t.match(/\?/)?"&":"?")+$.param(i)},slotParams:function(t,e,n){return $.each(t,function(t,a){var i;return i=n+"["+u(t)+"]","items"===t?wagn.slotParams(a,e,i):e[i]=a})},slotReady:function(t){return $("document").ready(function(){return $("body").on("slotReady",".card-slot",function(e){return e.stopPropagation(),t.call(this,$(this))})})},pingName:function(t,e){return $.getJSON(wagn.rootPath+"/",{format:"json",view:"status","card[name]":t},e)},isTouchDevice:function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)||n()}},n=function(t){return t=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}),jQuery.fn.extend({slot:function(t){return null==t&&(t="success"),this.data("slot-"+t+"-selector")?this.findSlot(this.data("slot-"+t+"-selector")):this.data("slot-selector")?this.findSlot(this.data("slot-selector")):this.closest(".card-slot")},findSlot:function(t){var e,n;for(n=this.closest(t),e=this.closest(".card-slot");0===n.length&&e.length>0;)n=$(e).find(t),e=$(e).parent().closest(".card-slot");return 0===n.length?$(t):n},setSlotContent:function(t){var e,n;return e=this.slot(),n=$(t),n[0]||(n=t),e.replaceWith(n),n.trigger("slotReady"),n},slotSuccess:function(t){var e,n;return t.redirect?window.location=t.redirect:(n=this.attr("notify-success"),e=this.setSlotContent(t),e.jquery&&(wagn.initializeEditors(e),null!=n)?e.notify(n,"success"):void 0)},slotError:function(t,e){return 403===t?this.setSlotContent(e):(this.notify(e,"error"),409===t?this.slot().find(".current_revision_id").val(this.slot().find(".new-current-revision-id").text()):449===t?this.slot().find("g-recaptcha").reloadCaptcha():void 0)},notify:function(t,e){var n,a,i;return i=this.slot(e),a=i.find(".card-notice"),a[0]||(a=$('<div class="card-notice"></div>'),n=i.find(".card-form"),n[0]?$(n[0]).append(a):i.append(a)),a.html(t),a.show("blind")},report:function(t){var e;return e=this.slot().find(".card-report"),!!e[0]&&(e.hide(),e.html(t),e.show("drop",750),setTimeout(function(){return e.hide("drop",750)},3e3))},isMain:function(){return this.slot().parent("#main")[0]},reloadCaptcha:function(){return this[0].empty(),grecaptcha.render(this[0],{sitekey:wagn.recaptchaKey})},autosave:function(){var t,e,n,a,i;if(a=this.slot(),!this.attr("no-autosave")){if(n=this.closest(".form-group"),n[0]){if(!(e=n.data("cardId")))return;": "+n.data("cardName")}else e=a.data("cardId"),"";return i=wagn.rootPath+"/update/~"+e,t=$("#edit_card_"+e).serializeArray().reduce(function(t,e){return t[e.name]=e.value,t},{draft:"true","success[view]":"blank"}),$.ajax(i,{data:t,type:"POST"})}}}),setInterval(function(){return $(".card-form").setContentFieldsFromMap()},2e4),$(window).ready(function(){return $.ajaxSetup({cache:!1}),setTimeout(function(){return wagn.initializeEditors($("body"))},10),$("body").on("ajax:success",".slotter",function(t,e){var n;if(!t.slotSuccessful)return n=$(this).slot().offset().top,$(this).slotSuccess(e),$(this).hasClass("close-modal")&&$(this).closest(".modal").modal("hide"),$(this).hasClass("card-paging-link")&&$("body").scrollTop(n),t.slotSuccessful=!0}),$("body").on("loaded.bs.modal",null,function(t){if(!t.slotSuccessful)return wagn.initializeEditors($(t.target)),$(t.target).find(".card-slot").trigger("slotReady"),t.slotSuccessful=!0}),$("body").on("ajax:error",".slotter",function(t,e){return $(this).slotError(e.status,e.responseText)}),$("body").on("click","button.slotter",function(){return!!$.rails.allowAction($(this))&&$.rails.handleRemote($(this))}),$("body").on("ajax:beforeSend",".slotter",function(e,n,a){var o,r,s,l,d;if(!a.skip_before_send&&(a.url.match(/home_view/)||(a.url=wagn.prepUrl(a.url,$(this).slot())),$(this).is("form"))){if(wagn.recaptchaKey&&"on"===$(this).attr("recaptcha")&&!$(this).find(".g-recaptcha")[0])return $(".g-recaptcha")[0]?t(this):i(this),!1;if(r=$(this).data("file-data"))return l=$(this).find(".file-upload"),l[1]?($(this).notify("Wagn does not yet support multiple files in a single form.","error"),!1):(d=l.data("blueimpFileupload"),d._isXHRUpload(d.options)||($(this).find("[name=success]").val("_self"),a.url+="&simulate_xhr=true",s=function(t){return t.find("body").html()},a.dataFilter=s),o=$.extend(a,d._getAJAXSettings(r),{url:a.url}),o.skip_before_send=!0,$.ajax(o),!1)}}),$("body").on("submit",".card-form",function(){return $(this).setContentFieldsFromMap(),$(this).find(".d0-card-content").attr("no-autosave","true"),!0}),$("body").on("click",".submitter",function(){return $(this).closest("form").submit()}),$("body").on("click",".renamer-updater",function(){return $(this).closest("form").find("#card_update_referers").val("true")}),$("body").on("submit",".edit_name-view .card-form",function(){var t;if(t=$(this).find(".alert"),t.is(":hidden"))return $(this).find("#referers").val()>0&&$(this).find(".renamer-updater").show(),t.show("blind"),!1}),$("body").on("click",".follow-updater",function(){return $(this).closest("form").find("#card_update_all_users").val("true")}),$("body").on("submit",".edit-view.SELF-Xfollow_default .card-form",function(){var t;if(t=$(this).find(".confirm_update_all-view"),t.is(":hidden"))return $(this).find(".follow-updater").show(),t.show("blind"),!1}),$("body").on("click","button.redirecter",function(){return window.location=$(this).attr("href")}),wagn.noDoubleClick||$("body").on("dblclick","div",function(){var t,e;return e=$(this),!e.closest(".nodblclick")[0]&&(!e.closest(".d0-card-header")[0]&&(t=e.slot(),!t.find(".card-editor")[0]&&(!!t.data("cardId")&&(t.addClass("slotter"),t.attr("href",wagn.rootPath+"/card/edit/~"+t.data("cardId")),$.rails.handleRemote(t),!1))))}),$("body").on("submit","form.slotter",function(){var t,e;if((e=$(this).attr("main-success"))&&$(this).isMain()&&(t=$(this).find("[name=success]"))&&!t.val().match(/^REDIRECT/))return t.val("REDIRECT"===e?e+": "+t.val():e)}),$("body").on("change",".live-type-field",function(){return $(this).data("params",$(this).closest("form").serialize()),$(this).data("url",$(this).attr("href"))}),$("body").on("change",".edit-type-field",function(){return $(this).closest("form").submit()}),$("body").on("change",".autosave .d0-card-content",function(){var t;return t=$(this),setTimeout(function(){return t.autosave()},500)}),$("body").on("mouseenter","[hover_content]",function(){return $(this).attr("hover_restore",$(this).html()),$(this).html($(this).attr("hover_content"))}),$("body").on("mouseleave","[hover_content]",function(){return $(this).html($(this).attr("hover_restore"))}),$("body").on("keyup",".name-editor input",function(){var t,e;return t=$(this),e=t.val(),wagn.pingName(e,function(n){var a,i,o,r,s,l;return t.val()!==e?null:(l=n.status,l?(a=t.parent(),i=t.closest("fieldset").find("legend"),o=i.find(".name-messages"),o[0]||(o=$('<span class="name-messages"></span>'),i.append(o)),a.removeClass("real-name virtual-name known-name"),s=t.slot().data("cardId"),"unknown"===l||s&&parseInt(s)===n.id?o.html(""):(a.addClass(l+"-name known-name"),r="virtual"===l?"in virtual":"already in",o.html('"<a href="'+wagn.rootPath+"/"+n.url_key+'">'+e+'</a>" '+r+" use"))):void 0)})}),$("body").on("click",".render-error-link",function(t){var e;return e=$(this).closest(".render-error").find(".render-error-message"),e.show(),t.preventDefault()}),$("card-view-placeholder").each(function(){var t;return t=$(this),$.get(t.data("url"),function(e){return t.replaceWith(e)})})}),i=function(t){var e,n;return e=$("<div class='g-recaptcha' data-sitekey='"+wagn.recaptchaKey+"'></div>"),$(t).children().last().after(e),n="https://www.google.com/recaptcha/api.js",$.getScript(n)},t=function(t){var e;return e=$('<div class="g-recaptcha"></div>'),$(t).children().last().after(e),grecaptcha.render(e,{sitekey:wagn.recaptchaKey})},u=function(t){return t.replace(/([a-z])([A-Z])/g,function(t){return t[0]+"_"+t[1].toLowerCase()})},wagn.slotReady(function(t){return t.find("._disappear").delay(5e3).animate({height:0},1e3,function(){return $(this).hide()})})}).call(this);
8
8
  //script: card menu
9
- (function(){wagn.slotReady(function(o){var n;if(null!=(n=$(o).find(".open-menu.dropdown-toggle")))return $(n).dropdown("toggle")}),$(window).ready(function(){if($("body").on("click",".toolbar .nav-pills > li",function(){return $(this).tab("show")}),wagn.isTouchDevice())return $(".show-on-hover").removeClass("show-on-hover")})}).call(this);
9
+ (function(){wagn.slotReady(function(o){var n;if(null!=(n=$(o).find(".open-menu.dropdown-toggle")))return $(n).dropdown("toggle")}),$(window).ready(function(){if($("body").on("click",".toolbar .nav-pills > li",function(){return $(this).tab("show")}),wagn.isTouchDevice())return $("._show-on-hover").removeClass("_show-on-hover")})}).call(this);
10
10
  //script: jquery helper
11
11
  /*! jQuery UI - v1.9.2 - 2012-11-23
12
12
  * http://jqueryui.com
@@ -63,7 +63,7 @@ function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery",
63
63
  */
64
64
  function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(window.jQuery)}(function(t){"use strict";var e=0;t.ajaxTransport("iframe",function(i){if(i.async){var s,n,a;return{send:function(o,r){s=t('<form style="display:none;"></form>'),s.attr("accept-charset",i.formAcceptCharset),a=/\?/.test(i.url)?"&":"?","DELETE"===i.type?(i.url=i.url+a+"_method=DELETE",i.type="POST"):"PUT"===i.type?(i.url=i.url+a+"_method=PUT",i.type="POST"):"PATCH"===i.type&&(i.url=i.url+a+"_method=PATCH",i.type="POST"),n=t('<iframe src="javascript:false;" name="iframe-transport-'+(e+=1)+'"></iframe>').bind("load",function(){var e,a=t.isArray(i.paramName)?i.paramName:[i.paramName];n.unbind("load").bind("load",function(){var e;try{if(e=n.contents(),!e.length||!e[0].firstChild)throw new Error}catch(t){e=undefined}r(200,"success",{iframe:e}),t('<iframe src="javascript:false;"></iframe>').appendTo(s),s.remove()}),s.prop("target",n.prop("name")).prop("action",i.url).prop("method",i.type),i.formData&&t.each(i.formData,function(e,i){t('<input type="hidden"/>').prop("name",i.name).val(i.value).appendTo(s)}),i.fileInput&&i.fileInput.length&&"POST"===i.type&&(e=i.fileInput.clone(),i.fileInput.after(function(t){return e[t]}),i.paramName&&i.fileInput.each(function(e){t(this).prop("name",a[e]||i.paramName)}),s.append(i.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data")),s.submit(),e&&e.length&&i.fileInput.each(function(i,s){var n=t(e[i]);t(s).prop("name",n.prop("name")),n.replaceWith(s)})}),s.append(n).appendTo(document.body)},abort:function(){n&&n.unbind("load").prop("src","javascript".concat(":false;")),s&&s.remove()}}}}),t.ajaxSetup({converters:{"iframe text":function(e){return e&&t(e[0].body).text()},"iframe json":function(e){return e&&t.parseJSON(t(e[0].body).text())},"iframe html":function(e){return e&&t(e[0].body).html()},"iframe script":function(e){return e&&t.globalEval(t(e[0].body).text())}}})}),function(t,e){t.rails!==e&&t.error("jquery-ujs has already been loaded!");var i,s=t(document);t.rails=i={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not(form button), button[data-confirm]:not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",CSRFProtection:function(e){var i=t('meta[name="csrf-token"]').attr("content");i&&e.setRequestHeader("X-CSRF-Token",i)},refreshCSRFTokens:function(){var e=t("meta[name=csrf-token]").attr("content"),i=t("meta[name=csrf-param]").attr("content");t('form input[name="'+i+'"]').val(e)},fire:function(e,i,s){var n=t.Event(i);return e.trigger(n,s),!1!==n.result},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t.attr("href")},handleRemote:function(s){var n,a,o,r,l,h,c,u;if(i.fire(s,"ajax:before")){if(r=s.data("cross-domain"),l=r===e?null:r,h=s.data("with-credentials")||null,c=s.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,s.is("form")){n=s.attr("method"),a=s.attr("action"),o=s.serializeArray();var d=s.data("ujs:submit-button");d&&(o.push(d),s.data("ujs:submit-button",null))}else s.is(i.inputChangeSelector)?(n=s.data("method"),a=s.data("url"),o=s.serialize(),s.data("params")&&(o=o+"&"+s.data("params"))):s.is(i.buttonClickSelector)?(n=s.data("method")||"get",a=s.data("url"),o=s.serialize(),s.data("params")&&(o=o+"&"+s.data("params"))):(n=s.data("method"),a=i.href(s),o=s.data("params")||null);return u={type:n||"GET",data:o,dataType:c,beforeSend:function(t,n){if(n.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+n.accepts.script),!i.fire(s,"ajax:beforeSend",[t,n]))return!1;s.trigger("ajax:send",t)},success:function(t,e,i){s.trigger("ajax:success",[t,e,i])},complete:function(t,e){s.trigger("ajax:complete",[t,e])},error:function(t,e,i){s.trigger("ajax:error",[t,e,i])},crossDomain:l},h&&(u.xhrFields={withCredentials:h}),a&&(u.url=a),i.ajax(u)}return!1},handleMethod:function(s){var n=i.href(s),a=s.data("method"),o=s.attr("target"),r=t("meta[name=csrf-token]").attr("content"),l=t("meta[name=csrf-param]").attr("content"),h=t('<form method="post" action="'+n+'"></form>'),c='<input name="_method" value="'+a+'" type="hidden" />';l!==e&&r!==e&&(c+='<input name="'+l+'" value="'+r+'" type="hidden" />'),o&&h.attr("target",o),h.hide().append(c).appendTo("body"),h.submit()},formElements:function(e,i){return e.is("form")?t(e[0].elements).filter(i):e.find(i)},disableFormElements:function(e){i.formElements(e,i.disableSelector).each(function(){i.disableFormElement(t(this))})},disableFormElement:function(t){var i,s;i=t.is("button")?"html":"val",s=t.data("disable-with"),t.data("ujs:enable-with",t[i]()),s!==e&&t[i](s),t.prop("disabled",!0)},enableFormElements:function(e){i.formElements(e,i.enableSelector).each(function(){i.enableFormElement(t(this))})},enableFormElement:function(t){var e=t.is("button")?"html":"val";t.data("ujs:enable-with")&&t[e](t.data("ujs:enable-with")),t.prop("disabled",!1)},allowAction:function(t){var e,s=t.data("confirm"),n=!1;return!s||(i.fire(t,"confirm")&&(n=i.confirm(s),e=i.fire(t,"confirm:complete",[n])),n&&e)},blankInputs:function(e,i,s){var n,a,o=t(),r=i||"input,textarea",l=e.find(r);return l.each(function(){if(n=t(this),!(a=n.is("input[type=checkbox],input[type=radio]")?n.is(":checked"):n.val())==!s){if(n.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+n.attr("name")+'"]').length)return!0;o=o.add(n)}}),!!o.length&&o},nonBlankInputs:function(t,e){return i.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){var s=t.data("disable-with");t.data("ujs:enable-with",t.html()),s!==e&&t.html(s),t.bind("click.railsDisable",function(t){return i.stopEverything(t)})},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable")}},i.fire(s,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,s){t.crossDomain||i.CSRFProtection(s)}),t(window).on("pageshow.rails",function(){t(t.rails.enableSelector).each(function(){var e=t(this);e.data("ujs:enable-with")&&t.rails.enableFormElement(e)}),t(t.rails.linkDisableSelector).each(function(){var e=t(this);e.data("ujs:enable-with")&&t.rails.enableElement(e)})}),s.delegate(i.linkDisableSelector,"ajax:complete",function(){i.enableElement(t(this))}),s.delegate(i.buttonDisableSelector,"ajax:complete",function(){i.enableFormElement(t(this))}),s.delegate(i.linkClickSelector,"click.rails",function(s){var n=t(this),a=n.data("method"),o=n.data("params"),r=s.metaKey||s.ctrlKey;if(!i.allowAction(n))return i.stopEverything(s);if(!r&&n.is(i.linkDisableSelector)&&i.disableElement(n),n.data("remote")!==e){if(r&&(!a||"GET"===a)&&!o)return!0;var l=i.handleRemote(n);return!1===l?i.enableElement(n):l.fail(function(){i.enableElement(n)}),!1}return a?(i.handleMethod(n),!1):void 0}),s.delegate(i.buttonClickSelector,"click.rails",function(e){var s=t(this);if(!i.allowAction(s))return i.stopEverything(e);s.is(i.buttonDisableSelector)&&i.disableFormElement(s);var n=i.handleRemote(s);return!1===n?i.enableFormElement(s):n.fail(function(){i.enableFormElement(s)}),!1}),s.delegate(i.inputChangeSelector,"change.rails",function(e){var s=t(this);return i.allowAction(s)?(i.handleRemote(s),!1):i.stopEverything(e)}),s.delegate(i.formSubmitSelector,"submit.rails",function(s){var n,a,o=t(this),r=o.data("remote")!==e;if(!i.allowAction(o))return i.stopEverything(s);if(o.attr("novalidate")==e&&(n=i.blankInputs(o,i.requiredInputSelector))&&i.fire(o,"ajax:aborted:required",[n]))return i.stopEverything(s);if(r){if(a=i.nonBlankInputs(o,i.fileInputSelector)){setTimeout(function(){i.disableFormElements(o)},13);var l=i.fire(o,"ajax:aborted:file",[a]);return l||setTimeout(function(){i.enableFormElements(o)},13),l}return i.handleRemote(o),!1}setTimeout(function(){i.disableFormElements(o)},13)}),s.delegate(i.formInputClickSelector,"click.rails",function(e){var s=t(this);if(!i.allowAction(s))return i.stopEverything(e);var n=s.attr("name"),a=n?{name:n,value:s.val()}:null;s.closest("form").data("ujs:submit-button",a)}),s.delegate(i.formSubmitSelector,"ajax:send.rails",function(e){this==e.target&&i.disableFormElements(t(this))}),s.delegate(i.formSubmitSelector,"ajax:complete.rails",function(e){this==e.target&&i.enableFormElements(t(this))}),t(function(){i.refreshCSRFTokens()}))}(jQuery);
65
65
  //script: pointer config
66
- (function(){var n,t;$.extend(wagn.editorContentFunctionMap,{".pointer-select":function(){return t(this.val())},".pointer-multiselect":function(){return t(this.val())},".pointer-radio-list":function(){return t(this.find("input:checked").val())},".pointer-list-ul":function(){return t(this.find("input").map(function(){return $(this).val()}))},".pointer-checkbox-list":function(){return t(this.find("input:checked").map(function(){return $(this).val()}))},".pointer-select-list":function(){return t(this.find(".pointer-select select").map(function(){return $(this).val()}))},".pointer-mixed":function(){var n;return n=".pointer-checkbox-sublist input:checked,.pointer-sublist-ul input",t(this.find(n).map(function(){return $(this).val()}))},".perm-editor":function(){return n(this)}}),wagn.editorInitFunctionMap[".pointer-list-editor"]=function(){return this.sortable({handle:".handle",cancel:""}),wagn.initPointerList(this.find("input"))},$.extend(wagn,{initPointerList:function(n){var t;return t=n.closest("ul").data("options-card"),n.autocomplete({source:wagn.prepUrl(wagn.rootPath+"/"+t+".json?view=name_complete")})}}),t=function(n){var t;return t=$.map($.makeArray(n),function(n){if(n)return"[["+n+"]]"}),$.makeArray(t).join("\n")},n=function(n){var i,e;return n.find("#inherit").is(":checked")?"_left":(i=n.find(".perm-group input:checked").map(function(){return $(this).val()}),e=n.find(".perm-indiv input").map(function(){return $(this).val()}),t($.makeArray(i).concat($.makeArray(e))))}}).call(this);
66
+ (function(){var t,n;$.extend(wagn.editorContentFunctionMap,{".pointer-select":function(){return n(this.val())},".pointer-multiselect":function(){return n(this.val())},".pointer-radio-list":function(){return n(this.find("input:checked").val())},".pointer-list-ul":function(){return n(this.find("input").map(function(){return $(this).val()}))},".pointer-checkbox-list":function(){return n(this.find("input:checked").map(function(){return $(this).val()}))},".pointer-select-list":function(){return n(this.find(".pointer-select select").map(function(){return $(this).val()}))},".pointer-mixed":function(){var t;return t=".pointer-checkbox-sublist input:checked,.pointer-sublist-ul input",n(this.find(t).map(function(){return $(this).val()}))},".perm-editor":function(){return t(this)}}),wagn.editorInitFunctionMap[".pointer-list-editor"]=function(){return this.sortable({handle:".handle",cancel:""}),wagn.initPointerList(this.find("input"))},$.extend(wagn,{initPointerList:function(t){var n;return n=t.closest("ul").data("options-card"),n||(n=t.closest(".pointer-list-editor").data("options-card")),t.autocomplete({source:wagn.prepUrl(wagn.rootPath+"/"+n+".json?view=name_complete")})}}),n=function(t){var n;return n=$.map($.makeArray(t),function(t){if(t)return"[["+t+"]]"}),$.makeArray(n).join("\n")},t=function(t){var i,e;return t.find("#inherit").is(":checked")?"_left":(i=t.find(".perm-group input:checked").map(function(){return $(this).val()}),e=t.find(".perm-indiv input").map(function(){return $(this).val()}),n($.makeArray(i).concat($.makeArray(e))))}}).call(this);
67
67
  //script: ace config
68
68
  (function(){var e;wagn.addEditor(".ace-editor-textarea",function(){return wagn.initAce($(this))},function(){return e(this[0])}),$.extend(wagn,{setAceConfig:function(e){var t;return t=function(){try{return $.parseJSON(e)}catch(e){return{}}},wagn.aceConfig=t()},configAceEditor:function(e,t){var n,i,r;return n={showGutter:!0,theme:"ace/theme/github",printMargin:!1,tabSize:2,useSoftTabs:!0,maxLines:30},i={mode:"ace/mode/"+t},r=null!=wagn.aceConfig?wagn.aceConfig:{},$.extend(n,r["default"],r[t],i),e.setOptions(n)},initAce:function(e){var t,n,i;if(!(i=e.attr("data-ace-mode")))return void e.autosize();t=$("<div>",{position:"absolute",width:"auto",height:e.height()}).insertBefore(e),e.css("visibility","hidden"),e.css("height","0px"),ace.config.set("basePath","/assets/ace"),n=ace.edit(t[0]),n.getSession().setValue(e.val()),wagn.configAceEditor(n,i)}}),e=function(e){var t,n;return t=$(e).siblings(".ace_editor"),n=ace.edit(t[0]),n.getSession().getValue()},$.extend(wagn,{initProseMirror:function(e){var t,n,i;return t={menuBar:!0,tooltipMenu:!1},n={docFormat:"html"},i=null!=wagn.proseMirrorConfig?wagn.proseMirrorConfig:{},$.extend(t,i,n),createProseMirror(e,t)}})}).call(this);
69
69
  //script: prosemirror config
@@ -135,9 +135,10 @@ n.href&&C.apply("link",n,o)},selectAll:function(){var e=g.getRoot(),t=g.createRn
135
135
  ;1!=n.nodeType||c[n.nodeName.toLowerCase()]||o.push(n)}for(t=o.length;t--;)n=o[t],!n.hasChildNodes()||n.firstChild==n.lastChild&&""===n.firstChild.nodeValue?r.remove(n):"A"==n.nodeName&&" "===(n.innerText||n.textContent)&&r.remove(n)}function f(e){var o,a,s,d,l,u,f=e;if(s=r.createRng(),e.hasChildNodes()){for(o=new t(e,e);a=o.current();){if(3==a.nodeType){s.setStart(a,0),s.setEnd(a,0);break}if(c[a.nodeName.toLowerCase()]){s.setStartBefore(a),s.setEndBefore(a);break}f=a,a=o.next()}a||(s.setStart(f,0),s.setEnd(f,0))}else"BR"==e.nodeName?e.nextSibling&&r.isBlock(e.nextSibling)?((!N||9>N)&&(u=r.create("br"),e.parentNode.insertBefore(u,e)),s.setStartBefore(e),s.setEndBefore(e)):(s.setStartAfter(e),s.setEndAfter(e)):(s.setStart(e,0),s.setEnd(e,0));i.setRng(s),r.remove(u),l=r.getViewPort(n.getWin()),((d=r.getPos(e).y)<l.y||d+25>l.y+l.h)&&n.getWin().scrollTo(0,d<l.y?d:d-l.h+25)}function p(t){var n,o,i,s=S;if(n=t||"TABLE"==R?r.create(t||I):w.cloneNode(!1),i=n,!1!==a.keep_styles)do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(s.nodeName)){if("_mce_caret"==s.id)continue;o=s.cloneNode(!1),r.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(i=o,n.appendChild(o))}}while(s=s.parentNode);return(!e.isIE||e.isIE11)&&(i.innerHTML='<br data-mce-bogus="1">'),n}function m(e){var n,o,r;if(3==S.nodeType&&(e?k>0:k<S.nodeValue.length))return!1;if(S.parentNode==w&&D&&!e)return!0;if(e&&1==S.nodeType&&S==w.firstChild)return!0;if("TABLE"===S.nodeName||S.previousSibling&&"TABLE"==S.previousSibling.nodeName)return D&&!e||!D&&e;for(n=new t(S,w),3==S.nodeType&&(e&&0==k?n.prev():e||k!=S.nodeValue.length||n.next());o=n.current();){if(1===o.nodeType){if(!o.getAttribute("data-mce-bogus")&&(r=o.nodeName.toLowerCase(),c[r]&&"br"!==r))return!1}else if(3===o.nodeType&&!/^[ \t\r\n]*$/.test(o.nodeValue))return!1;e?n.prev():n.next()}return!0}function h(e,t){var n,o,i,a,s,c=I||"P";if(!(o=r.getParent(e,r.isBlock))||!d(o)){if(o=o||E,!o.hasChildNodes())return n=r.create(c),o.appendChild(n),P.setStart(n,0),P.setEnd(n,0),n;for(a=e;a.parentNode!=o;)a=a.parentNode;for(;a&&!r.isBlock(a);)i=a,a=a.previousSibling;if(i){for(n=r.create(c),i.parentNode.insertBefore(n,i),a=i;a&&!r.isBlock(a);)s=a.nextSibling,n.appendChild(a),a=s;P.setStart(e,t),P.setEnd(e,t)}}return e}function g(){function e(e){for(var t=M[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===w}A=I?p(I):r.create("BR"),e(!0)&&e()?r.replace(A,M):e(!0)?M.parentNode.insertBefore(A,M):e()?(r.insertAfter(A,M),l(A)):(_=P.cloneRange(),_.setStartAfter(w),_.setEndAfter(M),B=_.extractContents(),r.insertAfter(B,M),r.insertAfter(A,M)),r.remove(w),f(A),s.add()}function v(){for(var e,n=new t(S,w);e=n.next();)if(c[e.nodeName.toLowerCase()]||e.length>0)return!0}function y(){var t,n,o;S&&3==S.nodeType&&k>=S.nodeValue.length&&(e.isIE&&!e.isIE11||v()||(t=r.create("br"),P.insertNode(t),P.setStartAfter(t),P.setEndAfter(t),n=!0)),t=r.create("br"),P.insertNode(t),e.isIE&&!e.isIE11&&"PRE"==R&&(!N||8>N)&&t.parentNode.insertBefore(r.doc.createTextNode("\r"),t),o=r.create("span",{},"&nbsp;"),t.parentNode.insertBefore(o,t),i.scrollIntoView(o),r.remove(o),n?(P.setStartBefore(t),P.setEndBefore(t)):(P.setStartAfter(t),P.setEndAfter(t)),i.setRng(P),s.add()}function b(e){do{3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild}while(e)}function C(e){var t,n,o=r.getRoot();for(t=e;t!==o&&"false"!==r.getContentEditable(t);)"true"===r.getContentEditable(t)&&(n=t),t=t.parentNode;return t!==o?n:o}function x(t){var n;(!e.isIE||e.isIE11)&&(t.normalize(),(!(n=t.lastChild)||/^(left|right)$/gi.test(r.getStyle(n,"float",!0)))&&r.add(t,"br"))}var _,E,S,k,w,N,T,A,B,M,R,L,I,D,P=i.getRng(!0);if(!P.collapsed)return void n.execCommand("Delete");if(!o.isDefaultPrevented()&&(S=P.startContainer,k=P.startOffset,I=(a.force_p_newlines?"p":"")||a.forced_root_block,I=I?I.toUpperCase():"",N=r.doc.documentMode,T=o.shiftKey,1==S.nodeType&&S.hasChildNodes()&&(D=k>S.childNodes.length-1,S=S.childNodes[Math.min(k,S.childNodes.length-1)]||S,k=D&&3==S.nodeType?S.nodeValue.length:0),E=C(S))){if(s.beforeChange(),!r.isBlock(E)&&E!=r.getRoot())return void((!I||T)&&y());if((I&&!T||!I&&T)&&(S=h(S,k)),w=r.getParent(S,r.isBlock),M=w?r.getParent(w.parentNode,r.isBlock):null,R=w?w.nodeName.toUpperCase():"",L=M?M.nodeName.toUpperCase():"","LI"!=L||o.ctrlKey||(w=M,R=L),"LI"==R){if(!I&&T)return void y();if(r.isEmpty(w))return!/^(UL|OL|LI)$/.test(M.parentNode.nodeName)&&void g()}if("PRE"==R&&!1!==a.br_in_pre){if(!T)return void y()}else if(!I&&!T&&"LI"!=R||I&&T)return void y();I=I||"P",m()?(A=/^(H[1-6]|PRE)$/.test(R)&&"HGROUP"!=L?p(I):p(),a.end_container_on_empty_block&&d(M)&&r.isEmpty(w)?A=r.split(M,w):r.insertAfter(A,w),f(A)):m(!0)?(A=w.parentNode.insertBefore(p(),w),l(A)):(_=P.cloneRange(),_.setEndAfter(w),B=_.extractContents(),b(B),A=B.firstChild,r.insertAfter(B,w),u(A),x(w),f(A)),r.setAttrib(A,"id",""),s.add()}}var r=n.dom,i=n.selection,a=n.settings,s=n.undoManager,c=n.schema.getNonEmptyElements();n.onKeyDown.add(function(e,t){13==t.keyCode&&!1!==o(t)&&t.preventDefault()})}}(tinymce);
136
136
  //script: bootstrap
137
137
  /*!
138
- * Bootstrap v3.3.4 (http://getbootstrap.com)
139
- * Copyright 2011-2015 Twitter, Inc.
138
+ * Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com)
139
+ * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
140
140
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
141
141
  */
142
- if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(t.style[i]!==undefined)return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new o(this)),"string"==typeof e&&n[e].call(i)})}var i='[data-dismiss="alert"]',o=function(e){t(e).on("click",i,this.close)};o.VERSION="3.3.4",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function i(){a.detach().trigger("closed.bs.alert").remove()}var n=t(this),s=n.attr("data-target");s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var a=t(s);e&&e.preventDefault(),a.length||(a=n.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",i).emulateTransitionEnd(o.TRANSITION_DURATION):i())};var n=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",i,o.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.button"),s="object"==typeof e&&e;n||o.data("bs.button",n=new i(this,s)),"toggle"==e?n.toggle():e&&n.setState(e)})}var i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.isLoading=!1};i.VERSION="3.3.4",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",o=this.$element,n=o.is("input")?"val":"html",s=o.data();e+="Text",null==s.resetText&&o.data("resetText",o[n]()),setTimeout(t.proxy(function(){o[n](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,o.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,o.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));t&&this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var o=t(i.target);o.hasClass("btn")||(o=o.closest(".btn")),e.call(o,"toggle"),i.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.carousel"),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e),a="string"==typeof e?e:s.slide;n||o.data("bs.carousel",n=new i(this,s)),"number"==typeof e?n.to(e):a?n[a]():s.interval&&n.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.4",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o="prev"==t?-1:1,n=(i+o)%this.$items.length;return this.$items.eq(n)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){if(!this.sliding)return this.slide("next")},i.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},i.prototype.slide=function(e,o){var n=this.$element.find(".item.active"),s=o||this.getItemForDirection(e,n),a=this.interval,r="next"==e?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var h=s[0],d=t.Event("slide.bs.carousel",{relatedTarget:h,direction:r});if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var p=t(this.$indicators.children()[this.getItemIndex(s)]);p&&p.addClass("active")}var c=t.Event("slid.bs.carousel",{relatedTarget:h,direction:r});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,n.addClass(r),s.addClass(r),n.one("bsTransitionEnd",function(){s.removeClass([e,r].join(" ")).addClass("active"),n.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(c)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(n.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(c)),a&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this};var n=function(i){var o,n=t(this),s=t(n.attr("data-target")||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var a=t.extend({},s.data(),n.data()),r=n.attr("data-slide-to");r&&(a.interval=!1),e.call(s,a),r&&s.data("bs.carousel").to(r),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",n).on("click.bs.carousel.data-api","[data-slide-to]",n),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),function(t){"use strict";function e(e){var i,o=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function i(e){return this.each(function(){var i=t(this),n=i.data("bs.collapse"),s=t.extend({},o.DEFAULTS,i.data(),"object"==typeof e&&e);!n&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),n||i.data("bs.collapse",n=new o(this,s)),"string"==typeof e&&n[e]()})}var o=function(e,i){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.4",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,n=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(n&&n.length&&(e=n.data("bs.collapse"))&&e.transitioning)){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){n&&n.length&&(i.call(n,"hide"),e||n.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[a](this.$element[0][l])}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return n.call(this);this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(o.TRANSITION_DURATION)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,o){var n=t(o);this.addAriaAndCollapsedClass(e(n),n)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var n=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var n=t(this);n.attr("data-target")||o.preventDefault();var s=e(n),a=s.data("bs.collapse"),r=a?"toggle":n.data();i.call(s,r)})}(jQuery),function(t){"use strict";function e(e){e&&3===e.which||(t(n).remove(),t(s).each(function(){var o=t(this),n=i(o),s={relatedTarget:this};n.hasClass("open")&&(n.trigger(e=t.Event("hide.bs.dropdown",s)),e.isDefaultPrevented()||(o.attr("aria-expanded","false"),n.removeClass("open").trigger("hidden.bs.dropdown",s)))}))}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o=i&&t(i);return o&&o.length?o:e.parent()}function o(e){return this.each(function(){var i=t(this),o=i.data("bs.dropdown");o||i.data("bs.dropdown",o=new a(this)),"string"==typeof e&&o[e].call(i)})}var n=".dropdown-backdrop",s='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.4",a.prototype.toggle=function(o){var n=t(this);if(!n.is(".disabled, :disabled")){var s=i(n),a=s.hasClass("open");if(e(),!a){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",e);var r={relatedTarget:this};if(s.trigger(o=t.Event("show.bs.dropdown",r)),o.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger("shown.bs.dropdown",r)}return!1}},a.prototype.keydown=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)){var o=t(this);if(e.preventDefault(),e.stopPropagation(),!o.is(".disabled, :disabled")){var n=i(o),a=n.hasClass("open");if(!a&&27!=e.which||a&&27==e.which)return 27==e.which&&n.find(s).trigger("focus"),o.trigger("click");var r=" li:not(.disabled):visible a",l=n.find('[role="menu"]'+r+', [role="listbox"]'+r);if(l.length){var h=l.index(e.target);38==e.which&&h>0&&h--,40==e.which&&h<l.length-1&&h++,~h||(h=0),l.eq(h).trigger("focus")}}}};var r=t.fn.dropdown;t.fn.dropdown=o,t.fn.dropdown.Constructor=a,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this},t(document).on("click.bs.dropdown.data-api",e).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",s,a.prototype.toggle).on("keydown.bs.dropdown.data-api",s,a.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',a.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',a.prototype.keydown)}(jQuery),function(t){"use strict";function e(e,o){return this.each(function(){var n=t(this),s=n.data("bs.modal"),a=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);s||n.data("bs.modal",s=new i(this,a)),"string"==typeof e?s[e](o):a.show&&s.show(o)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.4",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var o=this,n=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var n=t.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),n&&o.$element[0].offsetWidth,o.$element.addClass("in").attr("aria-hidden",!1),o.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});n?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(i.TRANSITION_DURATION):o.$element.trigger("focus").trigger(s)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var o=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&n;if(this.$backdrop=t('<div class="modal-backdrop '+n+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){if(this.ignoreBackdropClick)return void(this.ignoreBackdropClick=!1);t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){o.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):a()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var o=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=o,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var o=t(this),n=o.attr("href"),s=t(o.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,"")),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(n)&&n},s.data(),o.data());o.is("a")&&i.preventDefault(),s.one("show.bs.modal",function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",function(){o.is(":visible")&&o.trigger("focus")})}),e.call(s,a,this)})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tooltip"),s="object"==typeof e&&e;!n&&/destroy|hide/.test(e)||(n||o.data("bs.tooltip",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",t,e)};i.VERSION="3.3.4",i.TRANSITION_DURATION=150,i.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,o){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var n=this.options.trigger.split(" "),s=n.length;s--;){var a=n[s];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i&&i.$tip&&i.$tip.is(":visible")?void(i.hoverState="in"):(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var n=this,s=this.tip(),a=this.getUID(this.type);this.setContent(),s.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&s.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,h=l.test(r);h&&(r=r.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element);var d=this.getPosition(),p=s[0].offsetWidth,c=s[0].offsetHeight;if(h){var f=r,u=this.options.container?t(this.options.container):this.$element.parent(),g=this.getPosition(u);r="bottom"==r&&d.bottom+c>g.bottom?"top":"top"==r&&d.top-c<g.top?"bottom":"right"==r&&d.right+p>g.width?"left":"left"==r&&d.left-p<g.left?"right":r,s.removeClass(f).addClass(r)}var m=this.getCalculatedOffset(r,d,p,c);this.applyPlacement(m,r);var v=function(){var t=n.hoverState;n.$element.trigger("shown.bs."+n.type),n.hoverState=null,"out"==t&&n.leave(n)};t.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",v).emulateTransitionEnd(i.TRANSITION_DURATION):v()}},i.prototype.applyPlacement=function(e,i){var o=this.tip(),n=o[0].offsetWidth,s=o[0].offsetHeight,a=parseInt(o.css("margin-top"),10),r=parseInt(o.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(r)&&(r=0),e.top=e.top+a,e.left=e.left+r,t.offset.setOffset(o[0],t.extend({using:function(t){o.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),o.addClass("in");var l=o[0].offsetWidth,h=o[0].offsetHeight;"top"==i&&h!=s&&(e.top=e.top+s-h);var d=this.getViewportAdjustedDelta(i,e,l,h);d.left?e.left+=d.left:e.top+=d.top;var p=/top|bottom/.test(i),c=p?2*d.left-n+l:2*d.top-s+h,f=p?"offsetWidth":"offsetHeight";o.offset(e),this.replaceArrow(c,o[0][f],p)},i.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},i.prototype.hide=function(e){function o(){"in"!=n.hoverState&&s.detach(),n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}var n=this,s=t(this.$tip),a=t.Event("hide.bs."+this.type);if(this.$element.trigger(a),!a.isDefaultPrevented())return s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",o).emulateTransitionEnd(i.TRANSITION_DURATION):o(),this.hoverState=null,this},i.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},i.prototype.hasContent=function(){return this.getTitle()},i.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],o="BODY"==i.tagName,n=i.getBoundingClientRect();null==n.width&&(n=t.extend({},n,{width:n.right-n.left,height:n.bottom-n.top}));var s=o?{top:0,left:0}:e.offset(),a={scroll:o?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},r=o?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},n,a,r,s)},i.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},i.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.width&&(n.left=a.left+a.width-d)}return n},i.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},i.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},i.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&((i=t(e.currentTarget).data("bs."+this.type))||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type)})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.popover"),s="object"==typeof e&&e;!n&&/destroy|hide/.test(e)||(n||o.data("bs.popover",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.3.4",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery),function(t){"use strict";function e(i,o){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,o),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each(function(){var o=t(this),n=o.data("bs.scrollspy"),s="object"==typeof i&&i;n||o.data("bs.scrollspy",n=new e(this,s)),"string"==typeof i&&n[i]()})}e.VERSION="3.3.4",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),n=e.data("target")||e.attr("href"),s=/^#./.test(n)&&t(n);return s&&s.length&&s.is(":visible")&&[[s[i]().top+o,n]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=o)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(n[t+1]===undefined||e<n[t+1])&&this.activate(s[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',o=t(i).parents("li").addClass("active");o.parent(".dropdown-menu").length&&(o=o.closest("li.dropdown").addClass("active")),o.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var o=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=o,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);i.call(e,e.data())})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tab");n||o.data("bs.tab",n=new i(this)),"string"==typeof e&&n[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.4",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),o=e.data("target");if(o||(o=e.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),a=t.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(s),e.trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){var r=t(o);this.activate(e.closest("li"),i),this.activate(r,r.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},i.prototype.activate=function(e,o,n){function s(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),
143
- e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var a=o.find("> .active"),r=n&&t.support.transition&&(a.length&&a.hasClass("fade")||!!o.find("> .fade").length);a.length&&r?a.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),a.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var n=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.affix"),s="object"==typeof e&&e;n||o.data("bs.affix",n=new i(this,s)),"string"==typeof e&&n[e]()})}var i=function(e,o){this.options=t.extend({},i.DEFAULTS,o),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.4",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top,h=r?a:e;return null!=i&&n<=i?"top":null!=o&&l+h>=t-o&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),o=this.options.offset,n=o.top,s=o.bottom,a=t(document.body).height();"object"!=typeof o&&(s=n=o),"function"==typeof n&&(n=o.top(this.$element)),"function"==typeof s&&(s=o.bottom(this.$element));var r=this.getState(a,e,n,s);if(this.affixed!=r){null!=this.unpin&&this.$element.css("top","");var l="affix"+(r?"-"+r:""),h=t.Event(l+".bs.affix");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.affixed=r,this.unpin="bottom"==r?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==r&&this.$element.offset({top:a-e-s})}};var o=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=o,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),o=i.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),e.call(i,o)})})}(jQuery),wagn.slotReady(function(t){t.find(".modal.fade").on("loaded.bs.modal",function(){$(this).trigger("slotReady")}),t.find("[data-toggle='modal']").off("click").on("click",function(t){var e,i,o;return t.preventDefault(),t.stopPropagation(),e=$(this),i=e.attr("href"),o=e.data("target"),$(o).modal("show"),$.ajax({url:i,type:"GET",success:function(t){return $(o+" .modal-content").html(t),$(o).trigger("loaded.bs.modal")},error:function(t){return $(o+" .modal-content").html(t.responseText),$(o).trigger("loaded.bs.modal")}}),!1})});
142
+ if(function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t){var n=t.getBoundingClientRect(),i={};for(var o in n)i[o]=n[o];if(t.ownerDocument!==document){var r=t.ownerDocument.defaultView.frameElement;if(r){var s=e(r);i.top+=s.top,i.bottom+=s.top,i.left+=s.left,i.right+=s.left}}return i}function n(t){var e=getComputedStyle(t)||{},n=e.position,i=[];if("fixed"===n)return[t];for(var o=t;(o=o.parentNode)&&o&&1===o.nodeType;){var r=void 0;try{r=getComputedStyle(o)}catch(t){}if(void 0===r||null===r)return i.push(o),i;var s=r,a=s.overflow,l=s.overflowX,h=s.overflowY;/(auto|scroll|overlay)/.test(a+h+l)&&("absolute"!==n||["relative","absolute","fixed"].indexOf(r.position)>=0)&&i.push(o)}return i.push(t.ownerDocument.body),t.ownerDocument!==document&&i.push(t.ownerDocument.defaultView),i}function i(){C&&document.body.removeChild(C),C=null}function o(t){var n=void 0;t===document?(n=document,t=document.documentElement):n=t.ownerDocument;var i=n.documentElement,o=e(t),r=O();return o.top-=r.top,o.left-=r.left,"undefined"==typeof o.width&&(o.width=document.body.scrollWidth-o.left-o.right),"undefined"==typeof o.height&&(o.height=document.body.scrollHeight-o.top-o.bottom),o.top=o.top-i.clientTop,o.left=o.left-i.clientLeft,o.right=n.body.clientWidth-o.width-o.left,o.bottom=n.body.clientHeight-o.height-o.top,o}function r(t){return t.offsetParent||document.documentElement}function s(){if(I)return I;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");a(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var n=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;n===i&&(i=e.clientWidth),document.body.removeChild(e);var o=n-i;return I={width:o,height:o}}function a(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}),t}function l(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var n=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=c(t).replace(n," ");u(t,i)}}function h(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{l(t,e);var n=c(t)+" "+e;u(t,n)}}function f(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var n=c(t);return new RegExp("(^| )"+e+"( |$)","gi").test(n)}function c(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function u(t,e){t.setAttribute("class",e)}function d(t,e,n){n.forEach(function(n){-1===e.indexOf(n)&&f(t,n)&&l(t,n)}),e.forEach(function(e){f(t,e)||h(t,e)})}function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function g(t,e){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+n>=e&&e>=t-n}function m(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function _(){for(var t={top:0,left:0},e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return n.forEach(function(e){var n=e.top,i=e.left;"string"==typeof n&&(n=parseFloat(n,10)),"string"==typeof i&&(i=parseFloat(i,10)),t.top+=n,t.left+=i}),t}function v(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function E(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&function(){var t=e,n=o(e),i=n,r=getComputedStyle(e);if(e=[i.left,i.top,n.width+i.left,n.height+i.top],t.ownerDocument!==document){var s=t.ownerDocument.defaultView;e[0]+=s.pageXOffset,e[1]+=s.pageYOffset,e[2]+=s.pageXOffset,e[3]+=s.pageYOffset}Q.forEach(function(t,n){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[n]+=parseFloat(r["border"+t+"Width"]):e[n]-=parseFloat(r["border"+t+"Width"])})}(),e}var y=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),T=void 0;void 0===T&&(T={modules:[]});var C=null,A=function(){var t=0;return function(){return++t}}(),b={},O=function(){var t=C;t&&document.body.contains(t)||(t=document.createElement("div"),t.setAttribute("data-tether-id",A()),a(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),C=t);var n=t.getAttribute("data-tether-id");return"undefined"==typeof b[n]&&(b[n]=e(t),D(function(){delete b[n]})),b[n]},I=null,S=[],D=function(t){S.push(t)},w=function(){for(var t=void 0;t=S.pop();)t()},N=function(){function e(){t(this,e)}return y(e,[{key:"on",value:function(t,e,n){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:n,once:i})}},{key:"once",value:function(t,e,n){this.on(t,e,n,!0)}},{key:"off",value:function(t,e){if("undefined"!=typeof this.bindings&&"undefined"!=typeof this.bindings[t])if(void 0===e)delete this.bindings[t];else for(var n=0;n<this.bindings[t].length;)this.bindings[t][n].handler===e?this.bindings[t].splice(n,1):++n}},{key:"trigger",value:function(t){if("undefined"!=typeof this.bindings&&this.bindings[t]){for(var e=0,n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];for(;e<this.bindings[t].length;){var r=this.bindings[t][e],s=r.handler,a=r.ctx,l=r.once,h=a;void 0===h&&(h=this),s.apply(h,i),l?this.bindings[t].splice(e,1):++e}}}}]),e}();T.Utils={getActualBoundingClientRect:e,getScrollParents:n,getBounds:o,getOffsetParent:r,extend:a,addClass:h,removeClass:l,hasClass:f,updateClasses:d,defer:D,flush:w,uniqueId:A,Evented:N,getScrollBarSize:s,removeUtilElements:i};var L=function(){function t(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){o=!0,r=t}finally{try{!i&&a["return"]&&a["return"]()}finally{if(o)throw r}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),P=function(t,e,n){for(var i=!0;i;){var o=t,r=e,s=n;i=!1,null===o&&(o=Function.prototype);var a=Object.getOwnPropertyDescriptor(o,r);if(void 0!==a){if("value"in a)return a.value;var l=a.get;if(void 0===l)return;return l.call(s)}var h=Object.getPrototypeOf(o);if(null===h)return;t=h,e=r,n=s,i=!0,a=h=void 0}};if(void 0===T)throw new Error("You must include the utils.js file before tether.js");var H=T.Utils,n=H.getScrollParents,o=H.getBounds,r=H.getOffsetParent,a=H.extend,h=H.addClass,l=H.removeClass,d=H.updateClasses,D=H.defer,w=H.flush,s=H.getScrollBarSize,i=H.removeUtilElements,k=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],n=0;n<e.length;++n){var i=e[n];if(void 0!==t.style[i])return i}}(),W=[],R=function(){W.forEach(function(t){t.position(!1)}),w()};!function(){var t=null,e=null,n=null,i=function i(){return void 0!==e&&e>16?(e=Math.min(e-16,250),void(n=setTimeout(i,250))):void(void 0!==t&&m()-t<10||(null!=n&&(clearTimeout(n),n=null),t=m(),R(),e=m()-t))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var x={center:"center",left:"right",right:"left"},M={middle:"middle",top:"bottom",bottom:"top"},V={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},j=function(t,e){var n=t.left,i=t.top;return"auto"===n&&(n=x[e.left]),"auto"===i&&(i=M[e.top]),{left:n,top:i}},F=function(t){var e=t.left,n=t.top;return"undefined"!=typeof V[t.left]&&(e=V[t.left]),"undefined"!=typeof V[t.top]&&(n=V[t.top]),{left:e,top:n}},U=function(t){var e=t.split(" "),n=L(e,2);return{top:n[0],left:n[1]}},B=U,K=function(e){function f(e){var n=this;t(this,f),P(Object.getPrototypeOf(f.prototype),"constructor",this).call(this),this.position=this.position.bind(this),W.push(this),this.history=[],this.setOptions(e,!1),T.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(n)}),this.position()}return p(f,e),y(f,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return void 0!==e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,i=arguments.length<=1||void 0===arguments[1]||arguments[1],o={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=a(o,t);var r=this.options,s=r.element,l=r.target,f=r.targetModifier;if(this.element=s,this.target=l,this.targetModifier=f,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),h(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&h(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=B(this.options.targetAttachment),this.attachment=B(this.options.attachment),this.offset=U(this.options.offset),this.targetOffset=U(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=n(this.target),!1!==this.options.enabled&&this.enable(i)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return o(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=o(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,n=this.target;n===document.body?(n=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=o(n);var i=getComputedStyle(n),r=n.scrollWidth>n.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,s=0;r&&(s=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-s,e={width:15,height:.975*a*(a/n.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},l=0;a<408&&this.target===document.body&&(l=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var h=this.target.scrollTop/(n.scrollHeight-a);return e.top=h*(a-e.height-l)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;l(this.target,this.getClass("enabled")),l(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),W.forEach(function(e,n){e===t&&W.splice(n,1)}),0===W.length&&i()}},{key:"updateAttachClasses",value:function(t,e){var n=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var o=this._addAttachClasses;t.top&&o.push(this.getClass("element-attached")+"-"+t.top),t.left&&o.push(this.getClass("element-attached")+"-"+t.left),e.top&&o.push(this.getClass("target-attached")+"-"+e.top),e.left&&o.push(this.getClass("target-attached")+"-"+e.left);var r=[];i.forEach(function(t){r.push(n.getClass("element-attached")+"-"+t),r.push(n.getClass("target-attached")+"-"+t)}),D(function(){"undefined"!=typeof n._addAttachClasses&&(d(n.element,n._addAttachClasses,r),!1!==n.options.addTargetClasses&&d(n.target,n._addAttachClasses,r),delete n._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var n=j(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var i=this.cache("element-bounds",function(){return o(t.element)}),a=i.width,l=i.height;if(0===a&&0===l&&"undefined"!=typeof this.lastSize){var h=this.lastSize;a=h.width,l=h.height}else this.lastSize={width:a,height:l};var f=this.cache("target-bounds",function(){return t.getTargetBounds()}),c=f,u=v(F(this.attachment),{width:a,height:l}),d=v(F(n),c),p=v(this.offset,{width:a,height:l}),g=v(this.targetOffset,c);u=_(u,p),d=_(d,g);for(var m=f.left+d.left-u.left,E=f.top+d.top-u.top,y=0;y<T.modules.length;++y){var C=T.modules[y],A=C.position.call(this,{left:m,top:E,targetAttachment:n,targetPos:f,elementPos:i,offset:u,targetOffset:d,manualOffset:p,manualTargetOffset:g,scrollbarSize:S,attachment:this.attachment});if(!1===A)return!1;void 0!==A&&"object"==typeof A&&(E=A.top,m=A.left)}var b={page:{top:E,left:m},viewport:{top:E-pageYOffset,bottom:pageYOffset-E-l+innerHeight,left:m-pageXOffset,right:pageXOffset-m-a+innerWidth}},O=this.target.ownerDocument,I=O.defaultView,S=void 0;return I.innerHeight>O.documentElement.clientHeight&&(S=this.cache("scrollbar-size",s),b.viewport.bottom-=S.height),I.innerWidth>O.documentElement.clientWidth&&(S=this.cache("scrollbar-size",s),b.viewport.right-=S.width),-1!==["","static"].indexOf(O.body.style.position)&&-1!==["","static"].indexOf(O.body.parentElement.style.position)||(b.page.bottom=O.body.scrollHeight-E-l,b.page.right=O.body.scrollWidth-m-a),"undefined"!=typeof this.options.optimizations&&!1!==this.options.optimizations.moveElement&&"undefined"==typeof this.targetModifier&&function(){var e=t.cache("target-offsetparent",function(){return r(t.target)}),n=t.cache("target-offsetparent-bounds",function(){return o(e)}),i=getComputedStyle(e),s=n,a={};if(["Top","Left","Bottom","Right"].forEach(function(t){a[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),n.right=O.body.scrollWidth-n.left-s.width+a.right,n.bottom=O.body.scrollHeight-n.top-s.height+a.bottom,b.page.top>=n.top+a.top&&b.page.bottom>=n.bottom&&b.page.left>=n.left+a.left&&b.page.right>=n.right){var l=e.scrollTop,h=e.scrollLeft;b.offset={top:b.page.top-n.top+l-a.top,left:b.page.left-n.left+h-a.left}}}(),this.move(b),this.history.unshift(b),this.history.length>3&&this.history.pop(),e&&w(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var n={};for(var i in t){n[i]={};for(var o in t[i]){for(var s=!1,l=0;l<this.history.length;++l){var h=this.history[l];if("undefined"!=typeof h[i]&&!g(h[i][o],t[i][o])){s=!0;break}}s||(n[i][o]=!0)}}var f={top:"",left:"",right:"",bottom:""},c=function(t,n){if(!1!==("undefined"!=typeof e.options.optimizations?e.options.optimizations.gpu:null)){var i=void 0,o=void 0;t.top?(f.top=0,i=n.top):(f.bottom=0,i=-n.bottom),t.left?(f.left=0,o=n.left):(f.right=0,o=-n.right),window.matchMedia&&(window.matchMedia("only screen and (min-resolution: 1.3dppx)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3)").matches||(o=Math.round(o),i=Math.round(i))),f[k]="translateX("+o+"px) translateY("+i+"px)","msTransform"!==k&&(f[k]+=" translateZ(0)")}else t.top?f.top=n.top+"px":f.bottom=n.bottom+"px",t.left?f.left=n.left+"px":f.right=n.right+"px"},u=!1;if((n.page.top||n.page.bottom)&&(n.page.left||n.page.right)?(f.position="absolute",c(n.page,t.page)):(n.viewport.top||n.viewport.bottom)&&(n.viewport.left||n.viewport.right)?(f.position="fixed",c(n.viewport,t.viewport)):"undefined"!=typeof n.offset&&n.offset.top&&n.offset.left?function(){f.position="absolute";var i=e.cache("target-offsetparent",function(){return r(e.target)});r(e.element)!==i&&D(function(){e.element.parentNode.removeChild(e.element),i.appendChild(e.element)}),c(n.offset,t.offset),u=!0}():(f.position="absolute",c({top:!0,left:!0},t.page)),!u)if(this.options.bodyElement)this.options.bodyElement.appendChild(this.element);else{for(var d=!0,p=this.element.parentNode;p&&1===p.nodeType&&"BODY"!==p.tagName;){if("static"!==getComputedStyle(p).position){d=!1;break}p=p.parentNode}d||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var m={},_=!1;for(var o in f){var v=f[o];this.element.style[o]!==v&&(_=!0,m[o]=v)}_&&D(function(){a(e.element.style,m),e.trigger("repositioned")})}}}]),f}(N);K.modules=[],T.position=R;var G=a(K,T),L=function(){function t(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){o=!0,r=t}finally{try{!i&&a["return"]&&a["return"]()}finally{if(o)throw r}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),H=T.Utils,o=H.getBounds,a=H.extend,d=H.updateClasses,D=H.defer,Q=["left","top","right","bottom"];T.modules.push({position:function(t){var e=this,n=t.top,i=t.left,r=t.targetAttachment;if(!this.options.constraints)return!0;var s=this.cache("element-bounds",function(){return o(e.element)}),l=s.height,h=s.width;if(0===h&&0===l&&"undefined"!=typeof this.lastSize){var f=this.lastSize;h=f.width,l=f.height}var c=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=c.height,p=c.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,n=t.pinnedClass;e&&g.push(e),n&&g.push(n)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],_=a({},r),v=a({},this.attachment);return this.options.constraints.forEach(function(t){var o=t.to,s=t.attachment,a=t.pin;void 0===s&&(s="");var f=void 0,c=void 0;if(s.indexOf(" ")>=0){var d=s.split(" "),g=L(d,2);c=g[0],f=g[1]}else f=c=s;var y=E(e,o);"target"!==c&&"both"!==c||(n<y[1]&&"top"===_.top&&(n+=u,_.top="bottom"),n+l>y[3]&&"bottom"===_.top&&(n-=u,_.top="top")),"together"===c&&("top"===_.top&&("bottom"===v.top&&n<y[1]?(n+=u,_.top="bottom",n+=l,v.top="top"):"top"===v.top&&n+l>y[3]&&n-(l-u)>=y[1]&&(n-=l-u,_.top="bottom",v.top="bottom")),"bottom"===_.top&&("top"===v.top&&n+l>y[3]?(n-=u,_.top="top",n-=l,v.top="bottom"):"bottom"===v.top&&n<y[1]&&n+(2*l-u)<=y[3]&&(n+=l-u,_.top="top",v.top="top")),"middle"===_.top&&(n+l>y[3]&&"top"===v.top?(n-=l,v.top="bottom"):n<y[1]&&"bottom"===v.top&&(n+=l,v.top="top"))),"target"!==f&&"both"!==f||(i<y[0]&&"left"===_.left&&(i+=p,_.left="right"),i+h>y[2]&&"right"===_.left&&(i-=p,_.left="left")),"together"===f&&(i<y[0]&&"left"===_.left?"right"===v.left?(i+=p,_.left="right",i+=h,v.left="left"):"left"===v.left&&(i+=p,_.left="right",i-=h,v.left="right"):i+h>y[2]&&"right"===_.left?"left"===v.left?(i-=p,_.left="left",i-=h,v.left="right"):"right"===v.left&&(i-=p,_.left="left",i+=h,v.left="left"):"center"===_.left&&(i+h>y[2]&&"left"===v.left?(i-=h,v.left="right"):i<y[0]&&"right"===v.left&&(i+=h,v.left="left"))),"element"!==c&&"both"!==c||(n<y[1]&&"bottom"===v.top&&(n+=l,v.top="top"),n+l>y[3]&&"top"===v.top&&(n-=l,v.top="bottom")),"element"!==f&&"both"!==f||(i<y[0]&&("right"===v.left?(i+=h,v.left="left"):"center"===v.left&&(i+=h/2,v.left="left")),i+h>y[2]&&("left"===v.left?(i-=h,v.left="right"):"center"===v.left&&(i-=h/2,v.left="right"))),"string"==typeof a?a=a.split(",").map(function(t){return t.trim()}):!0===a&&(a=["top","left","right","bottom"]),a=a||[];var T=[],C=[];n<y[1]&&(a.indexOf("top")>=0?(n=y[1],T.push("top")):C.push("top")),n+l>y[3]&&(a.indexOf("bottom")>=0?(n=y[3]-l,T.push("bottom")):C.push("bottom")),i<y[0]&&(a.indexOf("left")>=0?(i=y[0],T.push("left")):C.push("left")),i+h>y[2]&&(a.indexOf("right")>=0?(i=y[2]-h,T.push("right")):C.push("right")),T.length&&function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),T.forEach(function(e){m.push(t+"-"+e)})}(),C.length&&function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),C.forEach(function(e){m.push(t+"-"+e)})}(),(T.indexOf("left")>=0||T.indexOf("right")>=0)&&(v.left=_.left=!1),(T.indexOf("top")>=0||T.indexOf("bottom")>=0)&&(v.top=_.top=!1),_.top===r.top&&_.left===r.left&&v.top===e.attachment.top&&v.left===e.attachment.left||(e.updateAttachClasses(v,_),e.trigger("update",{attachment:v,targetAttachment:_}))}),D(function(){!1!==e.options.addTargetClasses&&d(e.target,m,g),d(e.element,m,g)}),{top:n,left:i}}});var H=T.Utils,o=H.getBounds,d=H.updateClasses,D=H.defer;T.modules.push({position:function(t){var e=this,n=t.top,i=t.left,r=this.cache("element-bounds",function(){return o(e.element)}),s=r.height,a=r.width,l=this.getTargetBounds(),h=n+s,f=i+a,c=[];n<=l.bottom&&h>=l.top&&["left","right"].forEach(function(t){var e=l[t];e!==i&&e!==f||c.push(t)}),i<=l.right&&f>=l.left&&["top","bottom"].forEach(function(t){var e=l[t];e!==n&&e!==h||c.push(t)});var u=[],p=[],g=["left","top","right","bottom"];return u.push(this.getClass("abutted")),g.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),c.length&&p.push(this.getClass("abutted")),c.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),D(function(){!1!==e.options.addTargetClasses&&d(e.target,p,u),d(e.element,p,u)}),!0}});var L=function(){function t(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){o=!0,r=t}finally{try{!i&&a["return"]&&a["return"]()}finally{if(o)throw r}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return T.modules.push({position:function(t){var e=t.top,n=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:n}));var o=void 0,r=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var s=i,a=L(s,2);o=a[0],r=a[1],o=parseFloat(o,10),r=parseFloat(r,10)}else o=i.top,r=i.left;return e+=o,n+=r,{top:e,left:n}}}}),G}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");+function(t){var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(t){function e(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(t){return(t[0]||t).nodeType}function i(){return{bindType:a.end,delegateType:a.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):undefined}}}function o(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in h)if(t.style[e]!==undefined)return{end:h[e]};return!1}function r(e){var n=this,i=!1;return t(this).one(f.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||f.triggerTransitionEnd(n)},e),this}function s(){a=o(),t.fn.emulateTransitionEnd=r,f.supportsTransitionEnd()&&(t.event.special[f.TRANSITION_END]=i())}var a=!1,l=1e6,h={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},f={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(Math.random()*l)}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");return e||(e=t.getAttribute("href")||"",e=/^#[a-z]/i.test(e)?e:null),e},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger(a.end)},supportsTransitionEnd:function(){return Boolean(a)},typeCheckConfig:function(t,i,o){for(var r in o)if(o.hasOwnProperty(r)){var s=o[r],a=i[r],l=a&&n(a)?"element":e(a);if(!new RegExp(s).test(l))throw new Error(t.toUpperCase()+': Option "'+r+'" provided type "'+l+'" but expected type "'+s+'".')}}};return s(),f}(jQuery),s=(function(t){var e="alert",i="4.0.0-alpha.6",s="bs.alert",a="."+s,l=".data-api",h=t.fn[e],f=150,c={DISMISS:'[data-dismiss="alert"]'},u={CLOSE:"close"+a,CLOSED:"closed"+a,CLICK_DATA_API:"click"+a+l},d={ALERT:"alert",FADE:"fade",SHOW:"show"},p=function(){function e(t){n(this,e),this._element=t}return e.prototype.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.prototype.dispose=function(){t.removeData(this._element,s),this._element=null},e.prototype._getRootElement=function(e){var n=r.getSelectorFromElement(e),i=!1;return n&&(i=t(n)[0]),i||(i=t(e).closest("."+d.ALERT)[0]),i},e.prototype._triggerCloseEvent=function(e){var n=t.Event(u.CLOSE);return t(e).trigger(n),n},e.prototype._removeElement=function(e){var n=this;if(t(e).removeClass(d.SHOW),!r.supportsTransitionEnd()||!t(e).hasClass(d.FADE))return void this._destroyElement(e);t(e).one(r.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(f)},e.prototype._destroyElement=function(e){t(e).detach().trigger(u.CLOSED).remove()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data(s);o||(o=new e(this),i.data(s,o)),"close"===n&&o[n](this)})},e._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(e,null,[{key:"VERSION",get:function(){return i}}]),e}();t(document).on(u.CLICK_DATA_API,c.DISMISS,p._handleDismiss(new p)),t.fn[e]=p._jQueryInterface,t.fn[e].Constructor=p,t.fn[e].noConflict=function(){return t.fn[e]=h,p._jQueryInterface}}(jQuery),function(t){var e="button",i="4.0.0-alpha.6",r="bs.button",s="."+r,a=".data-api",l=t.fn[e],h={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},f={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},c={CLICK_DATA_API:"click"+s+a,FOCUS_BLUR_DATA_API:"focus"+s+a+" blur"+s+a},u=function(){function e(t){n(this,e),this._element=t}return e.prototype.toggle=function(){var e=!0,n=t(this._element).closest(f.DATA_TOGGLE)[0];if(n){var i=t(this._element).find(f.INPUT)[0];if(i){if("radio"===i.type)if(i.checked&&t(this._element).hasClass(h.ACTIVE))e=!1;else{var o=t(n).find(f.ACTIVE)[0];o&&t(o).removeClass(h.ACTIVE)}e&&(i.checked=!t(this._element).hasClass(h.ACTIVE),t(i).trigger("change")),i.focus()}}this._element.setAttribute("aria-pressed",!t(this._element).hasClass(h.ACTIVE)),e&&t(this._element).toggleClass(h.ACTIVE)},e.prototype.dispose=function(){t.removeData(this._element,r),this._element=null},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(r);i||(i=new e(this),t(this).data(r,i)),"toggle"===n&&i[n]()})},o(e,null,[{key:"VERSION",get:function(){return i}}]),e}();t(document).on(c.CLICK_DATA_API,f.DATA_TOGGLE_CARROT,function(e){e.preventDefault();var n=e.target;t(n).hasClass(h.BUTTON)||(n=t(n).closest(f.BUTTON)),u._jQueryInterface.call(t(n),"toggle")}).on(c.FOCUS_BLUR_DATA_API,f.DATA_TOGGLE_CARROT,function(e){var n=t(e.target).closest(f.BUTTON)[0];t(n).toggleClass(h.FOCUS,/^focus(in)?$/.test(e.type))}),t.fn[e]=u._jQueryInterface,t.fn[e].Constructor=u,t.fn[e].noConflict=function(){return t.fn[e]=l,u._jQueryInterface}}(jQuery),function(t){var e="carousel",s="4.0.0-alpha.6",a="bs.carousel",l="."+a,h=".data-api",f=t.fn[e],c=600,u=37,d=39,p={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},g={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},m={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},_={SLIDE:"slide"+l,SLID:"slid"+l,KEYDOWN:"keydown"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l,LOAD_DATA_API:"load"+l+h,CLICK_DATA_API:"click"+l+h},v={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},E={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},y=function(){function h(e,i){n(this,h),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this._config=this._getConfig(i),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(E.INDICATORS)[0],this._addEventListeners()}return h.prototype.next=function(){if(this._isSliding)throw new Error("Carousel is sliding");this._slide(m.NEXT)},h.prototype.nextWhenVisible=function(){document.hidden||this.next()},h.prototype.prev=function(){if(this._isSliding)throw new Error("Carousel is sliding");this._slide(m.PREVIOUS)},h.prototype.pause=function(e){e||(this._isPaused=!0),t(this._element).find(E.NEXT_PREV)[0]&&r.supportsTransitionEnd()&&(r.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},h.prototype.cycle=function(t){
143
+ t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},h.prototype.to=function(e){var n=this;this._activeElement=t(this._element).find(E.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0)){if(this._isSliding)return void t(this._element).one(_.SLID,function(){return n.to(e)});if(i===e)return this.pause(),void this.cycle();var o=e>i?m.NEXT:m.PREVIOUS;this._slide(o,this._items[e])}},h.prototype.dispose=function(){t(this._element).off(l),t.removeData(this._element,a),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},h.prototype._getConfig=function(n){return n=t.extend({},p,n),r.typeCheckConfig(e,n,g),n},h.prototype._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(_.KEYDOWN,function(t){return e._keydown(t)}),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||t(this._element).on(_.MOUSEENTER,function(t){return e.pause(t)}).on(_.MOUSELEAVE,function(t){return e.cycle(t)})},h.prototype._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case u:t.preventDefault(),this.prev();break;case d:t.preventDefault(),this.next();break;default:return}},h.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(E.ITEM)),this._items.indexOf(e)},h.prototype._getItemByDirection=function(t,e){var n=t===m.NEXT,i=t===m.PREVIOUS,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=t===m.PREVIOUS?-1:1,a=(o+s)%this._items.length;return-1===a?this._items[this._items.length-1]:this._items[a]},h.prototype._triggerSlideEvent=function(e,n){var i=t.Event(_.SLIDE,{relatedTarget:e,direction:n});return t(this._element).trigger(i),i},h.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(E.ACTIVE).removeClass(v.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(v.ACTIVE)}},h.prototype._slide=function(e,n){var i=this,o=t(this._element).find(E.ACTIVE_ITEM)[0],s=n||o&&this._getItemByDirection(e,o),a=Boolean(this._interval),l=void 0,h=void 0,f=void 0;if(e===m.NEXT?(l=v.LEFT,h=v.NEXT,f=m.LEFT):(l=v.RIGHT,h=v.PREV,f=m.RIGHT),s&&t(s).hasClass(v.ACTIVE))return void(this._isSliding=!1);if(!this._triggerSlideEvent(s,f).isDefaultPrevented()&&o&&s){this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(s);var u=t.Event(_.SLID,{relatedTarget:s,direction:f});r.supportsTransitionEnd()&&t(this._element).hasClass(v.SLIDE)?(t(s).addClass(h),r.reflow(s),t(o).addClass(l),t(s).addClass(l),t(o).one(r.TRANSITION_END,function(){t(s).removeClass(l+" "+h).addClass(v.ACTIVE),t(o).removeClass(v.ACTIVE+" "+h+" "+l),i._isSliding=!1,setTimeout(function(){return t(i._element).trigger(u)},0)}).emulateTransitionEnd(c)):(t(o).removeClass(v.ACTIVE),t(s).addClass(v.ACTIVE),this._isSliding=!1,t(this._element).trigger(u)),a&&this.cycle()}},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o=t.extend({},p,t(this).data());"object"===(void 0===e?"undefined":i(e))&&t.extend(o,e);var r="string"==typeof e?e:o.slide;if(n||(n=new h(this,o),t(this).data(a,n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if(n[r]===undefined)throw new Error('No method named "'+r+'"');n[r]()}else o.interval&&(n.pause(),n.cycle())})},h._dataApiClickHandler=function(e){var n=r.getSelectorFromElement(this);if(n){var i=t(n)[0];if(i&&t(i).hasClass(v.CAROUSEL)){var o=t.extend({},t(i).data(),t(this).data()),s=this.getAttribute("data-slide-to");s&&(o.interval=!1),h._jQueryInterface.call(t(i),o),s&&t(i).data(a).to(s),e.preventDefault()}}},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return p}}]),h}();t(document).on(_.CLICK_DATA_API,E.DATA_SLIDE,y._dataApiClickHandler),t(window).on(_.LOAD_DATA_API,function(){t(E.DATA_RIDE).each(function(){var e=t(this);y._jQueryInterface.call(e,e.data())})}),t.fn[e]=y._jQueryInterface,t.fn[e].Constructor=y,t.fn[e].noConflict=function(){return t.fn[e]=f,y._jQueryInterface}}(jQuery),function(t){var e="collapse",s="4.0.0-alpha.6",a="bs.collapse",l="."+a,h=".data-api",f=t.fn[e],c=600,u={toggle:!0,parent:""},d={toggle:"boolean",parent:"string"},p={SHOW:"show"+l,SHOWN:"shown"+l,HIDE:"hide"+l,HIDDEN:"hidden"+l,CLICK_DATA_API:"click"+l+h},g={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},m={WIDTH:"width",HEIGHT:"height"},_={ACTIVES:".card > .show, .card > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},v=function(){function l(e,i){n(this,l),this._isTransitioning=!1,this._element=e,this._config=this._getConfig(i),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]')),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return l.prototype.toggle=function(){t(this._element).hasClass(g.SHOW)?this.hide():this.show()},l.prototype.show=function(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(!t(this._element).hasClass(g.SHOW)){var n=void 0,i=void 0;if(this._parent&&(n=t.makeArray(t(this._parent).find(_.ACTIVES)),n.length||(n=null)),!(n&&(i=t(n).data(a))&&i._isTransitioning)){var o=t.Event(p.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){n&&(l._jQueryInterface.call(t(n),"hide"),i||t(n).data(a,null));var s=this._getDimension();t(this._element).removeClass(g.COLLAPSE).addClass(g.COLLAPSING),this._element.style[s]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&t(this._triggerArray).removeClass(g.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var h=function(){t(e._element).removeClass(g.COLLAPSING).addClass(g.COLLAPSE).addClass(g.SHOW),e._element.style[s]="",e.setTransitioning(!1),t(e._element).trigger(p.SHOWN)};if(!r.supportsTransitionEnd())return void h();var f=s[0].toUpperCase()+s.slice(1),u="scroll"+f;t(this._element).one(r.TRANSITION_END,h).emulateTransitionEnd(c),this._element.style[s]=this._element[u]+"px"}}}},l.prototype.hide=function(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(t(this._element).hasClass(g.SHOW)){var n=t.Event(p.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),o=i===m.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[o]+"px",r.reflow(this._element),t(this._element).addClass(g.COLLAPSING).removeClass(g.COLLAPSE).removeClass(g.SHOW),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&t(this._triggerArray).addClass(g.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var s=function(){e.setTransitioning(!1),t(e._element).removeClass(g.COLLAPSING).addClass(g.COLLAPSE).trigger(p.HIDDEN)};if(this._element.style[i]="",!r.supportsTransitionEnd())return void s();t(this._element).one(r.TRANSITION_END,s).emulateTransitionEnd(c)}}},l.prototype.setTransitioning=function(t){this._isTransitioning=t},l.prototype.dispose=function(){t.removeData(this._element,a),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},l.prototype._getConfig=function(n){return n=t.extend({},u,n),n.toggle=Boolean(n.toggle),r.typeCheckConfig(e,n,d),n},l.prototype._getDimension=function(){return t(this._element).hasClass(m.WIDTH)?m.WIDTH:m.HEIGHT},l.prototype._getParent=function(){var e=this,n=t(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(l._getTargetFromElement(n),[n])}),n},l.prototype._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(g.SHOW);e.setAttribute("aria-expanded",i),n.length&&t(n).toggleClass(g.COLLAPSED,!i).attr("aria-expanded",i)}},l._getTargetFromElement=function(e){var n=r.getSelectorFromElement(e);return n?t(n)[0]:null},l._jQueryInterface=function(e){return this.each(function(){var n=t(this),o=n.data(a),r=t.extend({},u,n.data(),"object"===(void 0===e?"undefined":i(e))&&e);if(!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||(o=new l(this,r),n.data(a,o)),"string"==typeof e){if(o[e]===undefined)throw new Error('No method named "'+e+'"');o[e]()}})},o(l,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return u}}]),l}();t(document).on(p.CLICK_DATA_API,_.DATA_TOGGLE,function(e){e.preventDefault();var n=v._getTargetFromElement(this),i=t(n).data(a),o=i?"toggle":t(this).data();v._jQueryInterface.call(t(n),o)}),t.fn[e]=v._jQueryInterface,t.fn[e].Constructor=v,t.fn[e].noConflict=function(){return t.fn[e]=f,v._jQueryInterface}}(jQuery),function(t){var e="dropdown",i="4.0.0-alpha.6",s="bs.dropdown",a="."+s,l=".data-api",h=t.fn[e],f=27,c=38,u=40,d=3,p={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click"+a+l,FOCUSIN_DATA_API:"focusin"+a+l,KEYDOWN_DATA_API:"keydown"+a+l},g={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",SHOW:"show"},m={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},_=function(){function e(t){n(this,e),this._element=t,this._addEventListeners()}return e.prototype.toggle=function(){if(this.disabled||t(this).hasClass(g.DISABLED))return!1;var n=e._getParentFromElement(this),i=t(n).hasClass(g.SHOW);if(e._clearMenus(),i)return!1;if("ontouchstart"in document.documentElement&&!t(n).closest(m.NAVBAR_NAV).length){var o=document.createElement("div");o.className=g.BACKDROP,t(o).insertBefore(this),t(o).on("click",e._clearMenus)}var r={relatedTarget:this},s=t.Event(p.SHOW,r);return t(n).trigger(s),!s.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded",!0),t(n).toggleClass(g.SHOW),t(n).trigger(t.Event(p.SHOWN,r)),!1)},e.prototype.dispose=function(){t.removeData(this._element,s),t(this._element).off(a),this._element=null},e.prototype._addEventListeners=function(){t(this._element).on(p.CLICK,this.toggle)},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(s);if(i||(i=new e(this),t(this).data(s,i)),"string"==typeof n){if(i[n]===undefined)throw new Error('No method named "'+n+'"');i[n].call(this)}})},e._clearMenus=function(n){if(!n||n.which!==d){var i=t(m.BACKDROP)[0];i&&i.parentNode.removeChild(i);for(var o=t.makeArray(t(m.DATA_TOGGLE)),r=0;r<o.length;r++){var s=e._getParentFromElement(o[r]),a={relatedTarget:o[r]};if(t(s).hasClass(g.SHOW)&&!(n&&("click"===n.type&&/input|textarea/i.test(n.target.tagName)||"focusin"===n.type)&&t.contains(s,n.target))){var l=t.Event(p.HIDE,a);t(s).trigger(l),l.isDefaultPrevented()||(o[r].setAttribute("aria-expanded","false"),t(s).removeClass(g.SHOW).trigger(t.Event(p.HIDDEN,a)))}}}},e._getParentFromElement=function(e){var n=void 0,i=r.getSelectorFromElement(e);return i&&(n=t(i)[0]),n||e.parentNode},e._dataApiKeydownHandler=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)&&(n.preventDefault(),n.stopPropagation(),!this.disabled&&!t(this).hasClass(g.DISABLED))){var i=e._getParentFromElement(this),o=t(i).hasClass(g.SHOW);if(!o&&n.which!==f||o&&n.which===f){if(n.which===f){var r=t(i).find(m.DATA_TOGGLE)[0];t(r).trigger("focus")}return void t(this).trigger("click")}var s=t(i).find(m.VISIBLE_ITEMS).get();if(s.length){var a=s.indexOf(n.target);n.which===c&&a>0&&a--,n.which===u&&a<s.length-1&&a++,a<0&&(a=0),s[a].focus()}}},o(e,null,[{key:"VERSION",get:function(){return i}}]),e}();t(document).on(p.KEYDOWN_DATA_API,m.DATA_TOGGLE,_._dataApiKeydownHandler).on(p.KEYDOWN_DATA_API,m.ROLE_MENU,_._dataApiKeydownHandler).on(p.KEYDOWN_DATA_API,m.ROLE_LISTBOX,_._dataApiKeydownHandler).on(p.CLICK_DATA_API+" "+p.FOCUSIN_DATA_API,_._clearMenus).on(p.CLICK_DATA_API,m.DATA_TOGGLE,_.prototype.toggle).on(p.CLICK_DATA_API,m.FORM_CHILD,function(t){t.stopPropagation()}),t.fn[e]=_._jQueryInterface,t.fn[e].Constructor=_,t.fn[e].noConflict=function(){return t.fn[e]=h,_._jQueryInterface}}(jQuery),function(t){var e="modal",s="4.0.0-alpha.6",a="bs.modal",l="."+a,h=".data-api",f=t.fn[e],c=300,u=150,d=27,p={backdrop:!0,keyboard:!0,focus:!0,show:!0},g={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},m={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,FOCUSIN:"focusin"+l,RESIZE:"resize"+l,CLICK_DISMISS:"click.dismiss"+l,KEYDOWN_DISMISS:"keydown.dismiss"+l,MOUSEUP_DISMISS:"mouseup.dismiss"+l,MOUSEDOWN_DISMISS:"mousedown.dismiss"+l,CLICK_DATA_API:"click"+l+h},_={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},v={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"},E=function(){function h(e,i){n(this,h),this._config=this._getConfig(i),this._element=e,this._dialog=t(e).find(v.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return h.prototype.toggle=function(t){return this._isShown?this.hide():this.show(t)},h.prototype.show=function(e){var n=this;if(this._isTransitioning)throw new Error("Modal is transitioning");r.supportsTransitionEnd()&&t(this._element).hasClass(_.FADE)&&(this._isTransitioning=!0);var i=t.Event(m.SHOW,{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),t(document.body).addClass(_.OPEN),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(m.CLICK_DISMISS,v.DATA_DISMISS,function(t){return n.hide(t)}),t(this._dialog).on(m.MOUSEDOWN_DISMISS,function(){t(n._element).one(m.MOUSEUP_DISMISS,function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(e)}))},h.prototype.hide=function(e){var n=this;if(e&&e.preventDefault(),this._isTransitioning)throw new Error("Modal is transitioning");var i=r.supportsTransitionEnd()&&t(this._element).hasClass(_.FADE);i&&(this._isTransitioning=!0);var o=t.Event(m.HIDE);t(this._element).trigger(o),this._isShown&&!o.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),t(document).off(m.FOCUSIN),t(this._element).removeClass(_.SHOW),t(this._element).off(m.CLICK_DISMISS),t(this._dialog).off(m.MOUSEDOWN_DISMISS),i?t(this._element).one(r.TRANSITION_END,function(t){return n._hideModal(t)}).emulateTransitionEnd(c):this._hideModal())},h.prototype.dispose=function(){t.removeData(this._element,a),t(window,document,this._element,this._backdrop).off(l),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._originalBodyPadding=null,this._scrollbarWidth=null},h.prototype._getConfig=function(n){return n=t.extend({},p,n),r.typeCheckConfig(e,n,g),n},h.prototype._showElement=function(e){var n=this,i=r.supportsTransitionEnd()&&t(this._element).hasClass(_.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&r.reflow(this._element),t(this._element).addClass(_.SHOW),this._config.focus&&this._enforceFocus();var o=t.Event(m.SHOWN,{relatedTarget:e}),s=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,t(n._element).trigger(o)};i?t(this._dialog).one(r.TRANSITION_END,s).emulateTransitionEnd(c):s()},h.prototype._enforceFocus=function(){var e=this;t(document).off(m.FOCUSIN).on(m.FOCUSIN,function(n){document===n.target||e._element===n.target||t(e._element).has(n.target).length||e._element.focus()})},h.prototype._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(m.KEYDOWN_DISMISS,function(t){t.which===d&&e.hide()}):this._isShown||t(this._element).off(m.KEYDOWN_DISMISS)},h.prototype._setResizeEvent=function(){var e=this;this._isShown?t(window).on(m.RESIZE,function(t){return e._handleUpdate(t)}):t(window).off(m.RESIZE)},h.prototype._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden","true"),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass(_.OPEN),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(m.HIDDEN)})},h.prototype._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},h.prototype._showBackdrop=function(e){var n=this,i=t(this._element).hasClass(_.FADE)?_.FADE:"";if(this._isShown&&this._config.backdrop){var o=r.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=_.BACKDROP,i&&t(this._backdrop).addClass(i),t(this._backdrop).appendTo(document.body),t(this._element).on(m.CLICK_DISMISS,function(t){if(n._ignoreBackdropClick)return void(n._ignoreBackdropClick=!1);t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide())}),o&&r.reflow(this._backdrop),t(this._backdrop).addClass(_.SHOW),!e)return;if(!o)return void e();t(this._backdrop).one(r.TRANSITION_END,e).emulateTransitionEnd(u)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(_.SHOW);var s=function(){n._removeBackdrop(),e&&e()};r.supportsTransitionEnd()&&t(this._element).hasClass(_.FADE)?t(this._backdrop).one(r.TRANSITION_END,s).emulateTransitionEnd(u):s()}else e&&e()},h.prototype._handleUpdate=function(){this._adjustDialog()},h.prototype._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},h.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},h.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},h.prototype._setScrollbar=function(){var e=parseInt(t(v.FIXED_CONTENT).css("padding-right")||0,10);this._originalBodyPadding=document.body.style.paddingRight||"",this._isBodyOverflowing&&(document.body.style.paddingRight=e+this._scrollbarWidth+"px")},h.prototype._resetScrollbar=function(){document.body.style.paddingRight=this._originalBodyPadding},h.prototype._getScrollbarWidth=function(){var t=document.createElement("div");t.className=_.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e},h._jQueryInterface=function(e,n){return this.each(function(){var o=t(this).data(a),r=t.extend({},h.Default,t(this).data(),"object"===(void 0===e?"undefined":i(e))&&e);if(o||(o=new h(this,r),t(this).data(a,o)),"string"==typeof e){if(o[e]===undefined)throw new Error('No method named "'+e+'"');o[e](n)}else r.show&&o.show(n)})},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return p}}]),h}();t(document).on(m.CLICK_DATA_API,v.DATA_TOGGLE,function(e){var n=this,i=void 0,o=r.getSelectorFromElement(this);o&&(i=t(o)[0]);var s=t(i).data(a)?"toggle":t.extend({},t(i).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var l=t(i).one(m.SHOW,function(e){e.isDefaultPrevented()||l.one(m.HIDDEN,function(){t(n).is(":visible")&&n.focus()})});E._jQueryInterface.call(t(i),s,this)}),t.fn[e]=E._jQueryInterface,t.fn[e].Constructor=E,t.fn[e].noConflict=function(){return t.fn[e]=f,E._jQueryInterface}}(jQuery),function(t){var e="scrollspy",s="4.0.0-alpha.6",a="bs.scrollspy",l="."+a,h=".data-api",f=t.fn[e],c={offset:10,method:"auto",target:""},u={offset:"number",method:"string",target:"(string|element)"},d={ACTIVATE:"activate"+l,SCROLL:"scroll"+l,LOAD_DATA_API:"load"+l+h},p={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",NAV_LINK:"nav-link",NAV:"nav",ACTIVE:"active"},g={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",LIST_ITEM:".list-item",LI:"li",LI_DROPDOWN:"li.dropdown",NAV_LINKS:".nav-link",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},m={OFFSET:"offset",POSITION:"position"},_=function(){function h(e,i){var o=this;n(this,h),this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(i),this._selector=this._config.target+" "+g.NAV_LINKS+","+this._config.target+" "+g.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(d.SCROLL,function(t){return o._process(t)}),this.refresh(),this._process()}return h.prototype.refresh=function(){var e=this,n=this._scrollElement!==this._scrollElement.window?m.POSITION:m.OFFSET,i="auto"===this._config.method?n:this._config.method,o=i===m.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n=void 0,s=r.getSelectorFromElement(e);return s&&(n=t(s)[0]),n&&(n.offsetWidth||n.offsetHeight)?[t(n)[i]().top+o,s]:null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},h.prototype.dispose=function(){t.removeData(this._element,a),t(this._scrollElement).off(l),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},h.prototype._getConfig=function(n){if(n=t.extend({},c,n),"string"!=typeof n.target){var i=t(n.target).attr("id");i||(i=r.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return r.typeCheckConfig(e,n,u),n},h.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},h.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},h.prototype._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.offsetHeight},h.prototype._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];return void(this._activeTarget!==i&&this._activate(i))}if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(this._offsets[o+1]===undefined||t<this._offsets[o+1])&&this._activate(this._targets[o])}},h.prototype._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",");n=n.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var i=t(n.join(","));i.hasClass(p.DROPDOWN_ITEM)?(i.closest(g.DROPDOWN).find(g.DROPDOWN_TOGGLE).addClass(p.ACTIVE),i.addClass(p.ACTIVE)):i.parents(g.LI).find("> "+g.NAV_LINKS).addClass(p.ACTIVE),t(this._scrollElement).trigger(d.ACTIVATE,{relatedTarget:e})},h.prototype._clear=function(){t(this._selector).filter(g.ACTIVE).removeClass(p.ACTIVE)},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o="object"===(void 0===e?"undefined":i(e))&&e;if(n||(n=new h(this,o),t(this).data(a,n)),"string"==typeof e){if(n[e]===undefined)throw new Error('No method named "'+e+'"');n[e]()}})},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return c}}]),h}();t(window).on(d.LOAD_DATA_API,function(){for(var e=t.makeArray(t(g.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);_._jQueryInterface.call(i,i.data())}}),t.fn[e]=_._jQueryInterface,t.fn[e].Constructor=_,t.fn[e].noConflict=function(){return t.fn[e]=f,_._jQueryInterface}}(jQuery),function(t){var e="tab",i="4.0.0-alpha.6",s="bs.tab",a="."+s,l=".data-api",h=t.fn[e],f=150,c={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK_DATA_API:"click"+a+l},u={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},d={A:"a",LI:"li",DROPDOWN:".dropdown",LIST:"ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},p=function(){function e(t){n(this,e),this._element=t}return e.prototype.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(u.ACTIVE)||t(this._element).hasClass(u.DISABLED))){var n=void 0,i=void 0,o=t(this._element).closest(d.LIST)[0],s=r.getSelectorFromElement(this._element);o&&(i=t.makeArray(t(o).find(d.ACTIVE)),i=i[i.length-1]);var a=t.Event(c.HIDE,{relatedTarget:this._element}),l=t.Event(c.SHOW,{relatedTarget:i});if(i&&t(i).trigger(a),t(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){s&&(n=t(s)[0]),this._activate(this._element,o);var h=function(){var n=t.Event(c.HIDDEN,{relatedTarget:e._element}),o=t.Event(c.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},e.prototype.dispose=function(){t.removeClass(this._element,s),this._element=null},e.prototype._activate=function(e,n,i){var o=this,s=t(n).find(d.ACTIVE_CHILD)[0],a=i&&r.supportsTransitionEnd()&&(s&&t(s).hasClass(u.FADE)||Boolean(t(n).find(d.FADE_CHILD)[0])),l=function(){return o._transitionComplete(e,s,a,i)};s&&a?t(s).one(r.TRANSITION_END,l).emulateTransitionEnd(f):l(),s&&t(s).removeClass(u.SHOW)},e.prototype._transitionComplete=function(e,n,i,o){if(n){t(n).removeClass(u.ACTIVE);var s=t(n.parentNode).find(d.DROPDOWN_ACTIVE_CHILD)[0];s&&t(s).removeClass(u.ACTIVE),n.setAttribute("aria-expanded",!1)}if(t(e).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0),i?(r.reflow(e),t(e).addClass(u.SHOW)):t(e).removeClass(u.FADE),e.parentNode&&t(e.parentNode).hasClass(u.DROPDOWN_MENU)){var a=t(e).closest(d.DROPDOWN)[0];a&&t(a).find(d.DROPDOWN_TOGGLE).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0)}o&&o()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data(s);if(o||(o=new e(this),i.data(s,o)),"string"==typeof n){if(o[n]===undefined)throw new Error('No method named "'+n+'"');o[n]()}})},o(e,null,[{key:"VERSION",get:function(){return i}}]),e}();t(document).on(c.CLICK_DATA_API,d.DATA_TOGGLE,function(e){e.preventDefault(),p._jQueryInterface.call(t(this),"show")}),t.fn[e]=p._jQueryInterface,t.fn[e].Constructor=p,t.fn[e].noConflict=function(){return t.fn[e]=h,p._jQueryInterface}}(jQuery),function(t){if("undefined"==typeof Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var e="tooltip",s="4.0.0-alpha.6",a="bs.tooltip",l="."+a,h=t.fn[e],f=150,c="bs-tether",u={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[],container:!1},d={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array",container:"(string|element|boolean)"},p={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},g={SHOW:"show",OUT:"out"},m={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,INSERTED:"inserted"+l,CLICK:"click"+l,FOCUSIN:"focusin"+l,FOCUSOUT:"focusout"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l},_={FADE:"fade",SHOW:"show"},v={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},E={element:!1,enabled:!1},y={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},T=function(){function h(t,e){n(this,h),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._isTransitioning=!1,this._tether=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return h.prototype.enable=function(){this._isEnabled=!0},h.prototype.disable=function(){this._isEnabled=!1},h.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},h.prototype.toggle=function(e){if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(_.SHOW))return void this._leave(null,this);this._enter(null,this)}},h.prototype.dispose=function(){clearTimeout(this._timeout),this.cleanupTether(),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null},h.prototype.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){if(this._isTransitioning)throw new Error("Tooltip is transitioning");t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var o=this.getTipElement(),s=r.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&t(o).addClass(_.FADE);var a="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,l=this._getAttachment(a),f=!1===this.config.container?document.body:t(this.config.container);t(o).data(this.constructor.DATA_KEY,this).appendTo(f),t(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:l,element:o,target:this.element,classes:E,classPrefix:c,offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),r.reflow(o),this._tether.position(),t(o).addClass(_.SHOW);var u=function(){var n=e._hoverState;e._hoverState=null,e._isTransitioning=!1,t(e.element).trigger(e.constructor.Event.SHOWN),n===g.OUT&&e._leave(null,e)};if(r.supportsTransitionEnd()&&t(this.tip).hasClass(_.FADE))return this._isTransitioning=!0,void t(this.tip).one(r.TRANSITION_END,u).emulateTransitionEnd(h._TRANSITION_DURATION);u()}},h.prototype.hide=function(e){var n=this,i=this.getTipElement(),o=t.Event(this.constructor.Event.HIDE);if(this._isTransitioning)throw new Error("Tooltip is transitioning");var s=function(){n._hoverState!==g.SHOW&&i.parentNode&&i.parentNode.removeChild(i),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),n._isTransitioning=!1,n.cleanupTether(),e&&e()};t(this.element).trigger(o),o.isDefaultPrevented()||(t(i).removeClass(_.SHOW),this._activeTrigger[y.CLICK]=!1,this._activeTrigger[y.FOCUS]=!1,this._activeTrigger[y.HOVER]=!1,r.supportsTransitionEnd()&&t(this.tip).hasClass(_.FADE)?(this._isTransitioning=!0,t(i).one(r.TRANSITION_END,s).emulateTransitionEnd(f)):s(),this._hoverState="")},h.prototype.isWithContent=function(){return Boolean(this.getTitle())},h.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},h.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(v.TOOLTIP_INNER),this.getTitle()),e.removeClass(_.FADE+" "+_.SHOW),this.cleanupTether()},h.prototype.setElementContent=function(e,n){var o=this.config.html;"object"===(void 0===n?"undefined":i(n))&&(n.nodeType||n.jquery)?o?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[o?"html":"text"](n)},h.prototype.getTitle=function(){var t=this.element.getAttribute("data-original-title")
144
+ ;return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},h.prototype.cleanupTether=function(){this._tether&&this._tether.destroy()},h.prototype._getAttachment=function(t){return p[t.toUpperCase()]},h.prototype._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==y.MANUAL){var i=n===y.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,o=n===y.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(o,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},h.prototype._fixTitle=function(){var t=i(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},h.prototype._enter=function(e,n){var i=this.constructor.DATA_KEY;return n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?y.FOCUS:y.HOVER]=!0),t(n.getTipElement()).hasClass(_.SHOW)||n._hoverState===g.SHOW?void(n._hoverState=g.SHOW):(clearTimeout(n._timeout),n._hoverState=g.SHOW,n.config.delay&&n.config.delay.show?void(n._timeout=setTimeout(function(){n._hoverState===g.SHOW&&n.show()},n.config.delay.show)):void n.show())},h.prototype._leave=function(e,n){var i=this.constructor.DATA_KEY;if(n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?y.FOCUS:y.HOVER]=!1),!n._isWithActiveTrigger()){if(clearTimeout(n._timeout),n._hoverState=g.OUT,!n.config.delay||!n.config.delay.hide)return void n.hide();n._timeout=setTimeout(function(){n._hoverState===g.OUT&&n.hide()},n.config.delay.hide)}},h.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},h.prototype._getConfig=function(n){return n=t.extend({},this.constructor.Default,t(this.element).data(),n),n.delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),r.typeCheckConfig(e,n,this.constructor.DefaultType),n},h.prototype._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o="object"===(void 0===e?"undefined":i(e))&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new h(this,o),t(this).data(a,n)),"string"==typeof e)){if(n[e]===undefined)throw new Error('No method named "'+e+'"');n[e]()}})},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return a}},{key:"Event",get:function(){return m}},{key:"EVENT_KEY",get:function(){return l}},{key:"DefaultType",get:function(){return d}}]),h}();return t.fn[e]=T._jQueryInterface,t.fn[e].Constructor=T,t.fn[e].noConflict=function(){return t.fn[e]=h,T._jQueryInterface},T}(jQuery));!function(r){var a="popover",l="4.0.0-alpha.6",h="bs.popover",f="."+h,c=r.fn[a],u=r.extend({},s.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),d=r.extend({},s.DefaultType,{content:"(string|element|function)"}),p={FADE:"fade",SHOW:"show"},g={TITLE:".popover-title",CONTENT:".popover-content"},m={HIDE:"hide"+f,HIDDEN:"hidden"+f,SHOW:"show"+f,SHOWN:"shown"+f,INSERTED:"inserted"+f,CLICK:"click"+f,FOCUSIN:"focusin"+f,FOCUSOUT:"focusout"+f,MOUSEENTER:"mouseenter"+f,MOUSELEAVE:"mouseleave"+f},_=function(s){function c(){return n(this,c),t(this,s.apply(this,arguments))}return e(c,s),c.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},c.prototype.getTipElement=function(){return this.tip=this.tip||r(this.config.template)[0]},c.prototype.setContent=function(){var t=r(this.getTipElement());this.setElementContent(t.find(g.TITLE),this.getTitle()),this.setElementContent(t.find(g.CONTENT),this._getContent()),t.removeClass(p.FADE+" "+p.SHOW),this.cleanupTether()},c.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},c._jQueryInterface=function(t){return this.each(function(){var e=r(this).data(h),n="object"===(void 0===t?"undefined":i(t))?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new c(this,n),r(this).data(h,e)),"string"==typeof t)){if(e[t]===undefined)throw new Error('No method named "'+t+'"');e[t]()}})},o(c,null,[{key:"VERSION",get:function(){return l}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return a}},{key:"DATA_KEY",get:function(){return h}},{key:"Event",get:function(){return m}},{key:"EVENT_KEY",get:function(){return f}},{key:"DefaultType",get:function(){return d}}]),c}(s);r.fn[a]=_._jQueryInterface,r.fn[a].Constructor=_,r.fn[a].noConflict=function(){return r.fn[a]=c,_._jQueryInterface}}(jQuery)}(),wagn.slotReady(function(t){t.find(".modal.fade").on("loaded.bs.modal",function(){$(this).trigger("slotReady")}),t.find("[data-toggle='modal']").off("click").on("click",function(t){var e,n,i;return t.preventDefault(),t.stopPropagation(),e=$(this),n=e.attr("href"),i=e.data("target"),$(i).modal("show"),$.ajax({url:n,type:"GET",success:function(t){return $(i+" .modal-content").html(t),$(i).trigger("loaded.bs.modal")},error:function(t){return $(i+" .modal-content").html(t.responseText),$(i).trigger("loaded.bs.modal")}}),!1})});
@@ -1,6 +1,6 @@
1
- $.extend wagn,
1
+ $.extend decko,
2
2
  initializeEditors: (range, map) ->
3
- map = wagn.editorInitFunctionMap unless map?
3
+ map = decko.editorInitFunctionMap unless map?
4
4
  $.each map, (selector, fn) ->
5
5
  $.each range.find(selector), ->
6
6
  fn.call $(this)
@@ -12,7 +12,7 @@ $.extend wagn,
12
12
  if slot
13
13
  xtra['is_main'] = true if slot.isMain()
14
14
  slotdata = slot.data 'slot'
15
- wagn.slotParams slotdata, xtra, 'slot' if slotdata?
15
+ decko.slotParams slotdata, xtra, 'slot' if slotdata?
16
16
 
17
17
  url + ( (if url.match /\?/ then '&' else '?') + $.param(xtra) )
18
18
 
@@ -20,7 +20,7 @@ $.extend wagn,
20
20
  $.each raw, (key, value)->
21
21
  cgiKey = prefix + '[' + snakeCase(key) + ']'
22
22
  if key == 'items'
23
- wagn.slotParams value, processed, cgiKey
23
+ decko.slotParams value, processed, cgiKey
24
24
  else
25
25
  processed[cgiKey] = value
26
26
 
@@ -31,7 +31,7 @@ $.extend wagn,
31
31
  func.call this, $(this)
32
32
 
33
33
  pingName: (name, success)->
34
- $.getJSON wagn.rootPath + '/',
34
+ $.getJSON decko.rootPath + '/',
35
35
  format: 'json', view: 'status', 'card[name]': name,
36
36
  success
37
37
 
@@ -89,7 +89,7 @@ jQuery.fn.extend {
89
89
  newslot = @setSlotContent data
90
90
 
91
91
  if newslot.jquery # sometimes response is plaintext
92
- wagn.initializeEditors newslot
92
+ decko.initializeEditors newslot
93
93
  if notice?
94
94
  newslot.notify notice, "success"
95
95
 
@@ -131,7 +131,7 @@ jQuery.fn.extend {
131
131
  reloadCaptcha: ->
132
132
  this[0].empty()
133
133
  grecaptcha.render this[0],
134
- sitekey: wagn.recaptchaKey
134
+ sitekey: decko.recaptchaKey
135
135
 
136
136
  autosave: ->
137
137
  slot = @slot()
@@ -145,7 +145,7 @@ jQuery.fn.extend {
145
145
  reportee = ''
146
146
 
147
147
  # #might be better to put this href base in the html
148
- submit_url = wagn.rootPath + '/update/~' + id
148
+ submit_url = decko.rootPath + '/update/~' + id
149
149
  form_data = $('#edit_card_'+id).serializeArray().reduce( ((obj, item) ->
150
150
  obj[item.name] = item.value
151
151
  return obj
@@ -164,7 +164,7 @@ setInterval (-> $('.card-form').setContentFieldsFromMap()), 20000
164
164
  $(window).ready ->
165
165
  $.ajaxSetup cache: false
166
166
 
167
- setTimeout (-> wagn.initializeEditors $('body')), 10
167
+ setTimeout (-> decko.initializeEditors $('body')), 10
168
168
  # dislike the timeout, but without this forms with multiple TinyMCE editors
169
169
  # were failing to load properly
170
170
 
@@ -183,7 +183,7 @@ $(window).ready ->
183
183
 
184
184
  $('body').on 'loaded.bs.modal', null, (event) ->
185
185
  unless event.slotSuccessful
186
- wagn.initializeEditors $(event.target)
186
+ decko.initializeEditors $(event.target)
187
187
  $(event.target).find(".card-slot").trigger("slotReady")
188
188
  event.slotSuccessful = true
189
189
 
@@ -199,10 +199,10 @@ $(window).ready ->
199
199
 
200
200
  # avoiding duplication. could be better test?
201
201
  unless opt.url.match /home_view/
202
- opt.url = wagn.prepUrl opt.url, $(this).slot()
202
+ opt.url = decko.prepUrl opt.url, $(this).slot()
203
203
 
204
204
  if $(this).is('form')
205
- if wagn.recaptchaKey and $(this).attr('recaptcha')=='on' and
205
+ if decko.recaptchaKey and $(this).attr('recaptcha')=='on' and
206
206
  !($(this).find('.g-recaptcha')[0])
207
207
  # if there is already a recaptcha on the page then we don't have to
208
208
  # load the recaptcha script
@@ -238,7 +238,7 @@ $(window).ready ->
238
238
  # gets rid of default html and body tags
239
239
 
240
240
  args = $.extend opt, (widget._getAJAXSettings data), url: opt.url
241
- # combines settings from wagn's slotter and jQuery UI's upload widget
241
+ # combines settings from decko's slotter and jQuery UI's upload widget
242
242
  args.skip_before_send = true #avoid looping through this method again
243
243
 
244
244
  $.ajax( args )
@@ -246,7 +246,7 @@ $(window).ready ->
246
246
 
247
247
  $('body').on 'submit', '.card-form', ->
248
248
  $(this).setContentFieldsFromMap()
249
- $(this).find('.card-content').attr('no-autosave','true')
249
+ $(this).find('.d0-card-content').attr('no-autosave','true')
250
250
  true
251
251
 
252
252
  $('body').on 'click', '.submitter', ->
@@ -281,12 +281,12 @@ $(window).ready ->
281
281
  $('body').on 'click', 'button.redirecter', ->
282
282
  window.location = $(this).attr('href')
283
283
 
284
- unless wagn.noDoubleClick
284
+ unless decko.noDoubleClick
285
285
  $('body').on 'dblclick', 'div', (event) ->
286
286
  t = $(this)
287
287
  return false if t.closest( '.nodblclick' )[0]
288
288
  # fail if inside a div with "nodblclick" class
289
- return false if t.closest( '.card-header' )[0]
289
+ return false if t.closest( '.d0-card-header' )[0]
290
290
  # fail if inside a card header
291
291
  s = t.slot()
292
292
  return false if s.find( '.card-editor' )[0]
@@ -294,7 +294,7 @@ $(window).ready ->
294
294
  return false unless s.data('cardId')
295
295
  # fail if slot has not card id
296
296
  s.addClass 'slotter'
297
- s.attr 'href', wagn.rootPath + '/card/edit/~' + s.data('cardId')
297
+ s.attr 'href', decko.rootPath + '/card/edit/~' + s.data('cardId')
298
298
  $.rails.handleRemote(s)
299
299
  false # don't propagate up to next slot
300
300
 
@@ -315,7 +315,7 @@ $(window).ready ->
315
315
  $('body').on 'change', '.edit-type-field', ->
316
316
  $(this).closest('form').submit()
317
317
 
318
- $('body').on 'change', '.autosave .card-content', ->
318
+ $('body').on 'change', '.autosave .d0-card-content', ->
319
319
  content_field = $(this)
320
320
  setTimeout ( -> content_field.autosave() ), 500
321
321
 
@@ -328,7 +328,7 @@ $(window).ready ->
328
328
  $('body').on 'keyup', '.name-editor input', ->
329
329
  box = $(this)
330
330
  name = box.val()
331
- wagn.pingName name, (data)->
331
+ decko.pingName name, (data)->
332
332
  return null if box.val() != name # avert race conditions
333
333
  status = data['status']
334
334
  if status
@@ -350,7 +350,7 @@ $(window).ready ->
350
350
  'in virtual'
351
351
  else
352
352
  'already in'
353
- msg.html '"<a href="' + wagn.rootPath + '/' + data['url_key'] + '">' +
353
+ msg.html '"<a href="' + decko.rootPath + '/' + data['url_key'] + '">' +
354
354
  name + '</a>" ' + qualifier + ' use'
355
355
  else
356
356
  msg.html ''
@@ -376,7 +376,7 @@ $(window).ready ->
376
376
 
377
377
 
378
378
  initCaptcha = (form)->
379
- recapDiv = $("<div class='g-recaptcha' data-sitekey='#{wagn.recaptchaKey}'>" +
379
+ recapDiv = $("<div class='g-recaptcha' data-sitekey='#{decko.recaptchaKey}'>" +
380
380
  "</div>")
381
381
  $(form).children().last().after recapDiv
382
382
  recapUri = "https://www.google.com/recaptcha/api.js"
@@ -389,7 +389,7 @@ addCaptcha = (form)->
389
389
  recapDiv = $('<div class="g-recaptcha"></div>')
390
390
  $(form).children().last().after recapDiv
391
391
  grecaptcha.render recapDiv,
392
- sitekey: wagn.recaptchaKey
392
+ sitekey: decko.recaptchaKey
393
393
 
394
394
  snakeCase = (str)->
395
395
  str.replace /([a-z])([A-Z])/g, (match) -> match[0] + '_' +
@@ -397,6 +397,6 @@ snakeCase = (str)->
397
397
 
398
398
  warn = (stuff) -> console.log stuff if console?
399
399
 
400
- wagn.slotReady (slot) ->
400
+ decko.slotReady (slot) ->
401
401
  slot.find('._disappear').delay(5000).animate(
402
402
  height: 0, 1000, -> $(this).hide())