unpoly-rails 1.0.3 → 2.0.0.pre.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of unpoly-rails might be problematic. Click here for more details.

Files changed (344) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/CHANGELOG.md +43 -25
  4. data/README.md +5 -6
  5. data/README_RAILS.md +295 -14
  6. data/dist/unpoly-bootstrap3.css +9 -14
  7. data/dist/unpoly-bootstrap3.js +4 -18
  8. data/dist/unpoly-bootstrap3.min.css +1 -1
  9. data/dist/unpoly-bootstrap3.min.js +1 -1
  10. data/dist/unpoly-bootstrap4.css +9 -0
  11. data/dist/unpoly-bootstrap4.js +16 -0
  12. data/dist/unpoly-bootstrap4.min.css +1 -0
  13. data/dist/unpoly-bootstrap4.min.js +1 -0
  14. data/dist/unpoly-bootstrap5.css +9 -0
  15. data/dist/unpoly-bootstrap5.js +14 -0
  16. data/dist/unpoly-bootstrap5.min.css +1 -0
  17. data/dist/unpoly-bootstrap5.min.js +1 -0
  18. data/dist/unpoly-migrate.js +1213 -0
  19. data/dist/unpoly-migrate.min.js +1 -0
  20. data/dist/unpoly.css +109 -140
  21. data/dist/unpoly.js +15376 -10484
  22. data/dist/unpoly.min.css +1 -1
  23. data/dist/unpoly.min.js +6 -4
  24. data/lib/unpoly/rails/change/cache.rb +26 -0
  25. data/lib/unpoly/rails/change/context.rb +80 -0
  26. data/lib/unpoly/rails/change/field.rb +117 -0
  27. data/lib/unpoly/rails/change/field_definition.rb +74 -0
  28. data/lib/unpoly/rails/change/layer.rb +60 -0
  29. data/lib/unpoly/rails/change.rb +372 -0
  30. data/lib/unpoly/rails/controller.rb +47 -0
  31. data/lib/unpoly/rails/error.rb +5 -0
  32. data/lib/unpoly/rails/request_echo_headers.rb +2 -2
  33. data/lib/unpoly/rails/version.rb +1 -1
  34. data/lib/unpoly/tasks.rb +45 -0
  35. data/lib/unpoly-rails.rb +9 -3
  36. metadata +42 -316
  37. data/.gitignore +0 -10
  38. data/.ruby-version +0 -1
  39. data/Gemfile +0 -7
  40. data/Gemfile.lock +0 -39
  41. data/Rakefile +0 -154
  42. data/bower.json +0 -27
  43. data/design/animation-ghosting.txt +0 -72
  44. data/design/design.txt +0 -34
  45. data/design/draft.html.erb +0 -48
  46. data/design/draft.rb +0 -9
  47. data/design/es6.js +0 -32
  48. data/design/ghost-debugging.txt +0 -118
  49. data/design/homepage.txt +0 -236
  50. data/design/ie11.txt +0 -9
  51. data/design/measure_import_node.js +0 -330
  52. data/design/measure_jquery/element_list.js +0 -41
  53. data/design/measure_jquery/up.on_vs_addEventListener.js +0 -56
  54. data/design/positioning.txt +0 -28
  55. data/design/query-params-in-form-actions/cases.html +0 -125
  56. data/design/rename.txt +0 -0
  57. data/design/test_rejected_promise.txt +0 -5
  58. data/design/unpoly errors.txt +0 -19
  59. data/lib/assets/javascripts/unpoly/browser.coffee.erb +0 -240
  60. data/lib/assets/javascripts/unpoly/classes/body_shifter.coffee +0 -45
  61. data/lib/assets/javascripts/unpoly/classes/cache.coffee +0 -127
  62. data/lib/assets/javascripts/unpoly/classes/compile_pass.coffee +0 -93
  63. data/lib/assets/javascripts/unpoly/classes/config.coffee +0 -9
  64. data/lib/assets/javascripts/unpoly/classes/css_transition.coffee +0 -118
  65. data/lib/assets/javascripts/unpoly/classes/divertible_chain.coffee +0 -39
  66. data/lib/assets/javascripts/unpoly/classes/event_listener.coffee +0 -116
  67. data/lib/assets/javascripts/unpoly/classes/extract_cascade.coffee +0 -86
  68. data/lib/assets/javascripts/unpoly/classes/extract_plan.coffee +0 -111
  69. data/lib/assets/javascripts/unpoly/classes/field_observer.coffee +0 -80
  70. data/lib/assets/javascripts/unpoly/classes/focus_follower.coffee +0 -29
  71. data/lib/assets/javascripts/unpoly/classes/follow_variant.coffee +0 -64
  72. data/lib/assets/javascripts/unpoly/classes/html_parser.coffee +0 -46
  73. data/lib/assets/javascripts/unpoly/classes/motion_controller.coffee +0 -157
  74. data/lib/assets/javascripts/unpoly/classes/params.coffee.erb +0 -544
  75. data/lib/assets/javascripts/unpoly/classes/record.coffee +0 -22
  76. data/lib/assets/javascripts/unpoly/classes/rect.js +0 -21
  77. data/lib/assets/javascripts/unpoly/classes/request.coffee +0 -247
  78. data/lib/assets/javascripts/unpoly/classes/response.coffee +0 -157
  79. data/lib/assets/javascripts/unpoly/classes/reveal_motion.coffee +0 -102
  80. data/lib/assets/javascripts/unpoly/classes/scroll_motion.coffee +0 -67
  81. data/lib/assets/javascripts/unpoly/classes/selector.coffee +0 -60
  82. data/lib/assets/javascripts/unpoly/classes/store/memory.coffee +0 -26
  83. data/lib/assets/javascripts/unpoly/classes/store/session.coffee +0 -59
  84. data/lib/assets/javascripts/unpoly/classes/tether.coffee +0 -105
  85. data/lib/assets/javascripts/unpoly/classes/url_set.coffee +0 -32
  86. data/lib/assets/javascripts/unpoly/cookie.coffee +0 -56
  87. data/lib/assets/javascripts/unpoly/element.coffee.erb +0 -1129
  88. data/lib/assets/javascripts/unpoly/event.coffee.erb +0 -445
  89. data/lib/assets/javascripts/unpoly/feedback.coffee +0 -353
  90. data/lib/assets/javascripts/unpoly/form.coffee.erb +0 -1084
  91. data/lib/assets/javascripts/unpoly/fragment.coffee.erb +0 -928
  92. data/lib/assets/javascripts/unpoly/framework.coffee +0 -65
  93. data/lib/assets/javascripts/unpoly/history.coffee +0 -268
  94. data/lib/assets/javascripts/unpoly/legacy.coffee +0 -60
  95. data/lib/assets/javascripts/unpoly/link.coffee.erb +0 -622
  96. data/lib/assets/javascripts/unpoly/log.coffee +0 -253
  97. data/lib/assets/javascripts/unpoly/modal.coffee.erb +0 -827
  98. data/lib/assets/javascripts/unpoly/motion.coffee.erb +0 -668
  99. data/lib/assets/javascripts/unpoly/namespace.coffee.erb +0 -5
  100. data/lib/assets/javascripts/unpoly/popup.coffee.erb +0 -515
  101. data/lib/assets/javascripts/unpoly/protocol.coffee +0 -300
  102. data/lib/assets/javascripts/unpoly/proxy.coffee +0 -672
  103. data/lib/assets/javascripts/unpoly/radio.coffee +0 -60
  104. data/lib/assets/javascripts/unpoly/rails.coffee +0 -24
  105. data/lib/assets/javascripts/unpoly/syntax.coffee.erb +0 -476
  106. data/lib/assets/javascripts/unpoly/toast.coffee +0 -67
  107. data/lib/assets/javascripts/unpoly/tooltip.coffee +0 -276
  108. data/lib/assets/javascripts/unpoly/util.coffee.erb +0 -1677
  109. data/lib/assets/javascripts/unpoly/viewport.coffee.erb +0 -830
  110. data/lib/assets/javascripts/unpoly-bootstrap3/feedback-ext.coffee +0 -5
  111. data/lib/assets/javascripts/unpoly-bootstrap3/form-ext.coffee +0 -1
  112. data/lib/assets/javascripts/unpoly-bootstrap3/modal-ext.coffee +0 -14
  113. data/lib/assets/javascripts/unpoly-bootstrap3/viewport-ext.coffee +0 -5
  114. data/lib/assets/javascripts/unpoly-bootstrap3.coffee +0 -2
  115. data/lib/assets/javascripts/unpoly.coffee +0 -28
  116. data/lib/assets/stylesheets/unpoly/close.sass +0 -2
  117. data/lib/assets/stylesheets/unpoly/dom.sass +0 -5
  118. data/lib/assets/stylesheets/unpoly/layout.sass +0 -2
  119. data/lib/assets/stylesheets/unpoly/link.sass +0 -2
  120. data/lib/assets/stylesheets/unpoly/modal.sass +0 -116
  121. data/lib/assets/stylesheets/unpoly/popup.sass +0 -7
  122. data/lib/assets/stylesheets/unpoly/toast.sass +0 -33
  123. data/lib/assets/stylesheets/unpoly/tooltip.sass +0 -62
  124. data/lib/assets/stylesheets/unpoly-bootstrap3/modal-ext.sass +0 -27
  125. data/lib/assets/stylesheets/unpoly-bootstrap3.sass +0 -1
  126. data/lib/assets/stylesheets/unpoly.sass +0 -1
  127. data/lib/unpoly/rails/inspector.rb +0 -149
  128. data/lib/unpoly/rails/inspector_accessor.rb +0 -30
  129. data/package.json +0 -38
  130. data/spec_app/.firefox-version +0 -1
  131. data/spec_app/.gitignore +0 -17
  132. data/spec_app/.rspec +0 -2
  133. data/spec_app/Gemfile +0 -29
  134. data/spec_app/Gemfile.lock +0 -223
  135. data/spec_app/README.rdoc +0 -28
  136. data/spec_app/Rakefile +0 -6
  137. data/spec_app/app/assets/images/.keep +0 -0
  138. data/spec_app/app/assets/images/favicon.png +0 -0
  139. data/spec_app/app/assets/images/grid.png +0 -0
  140. data/spec_app/app/assets/javascripts/bootstrap_manifest.coffee +0 -6
  141. data/spec_app/app/assets/javascripts/integration_test.coffee +0 -5
  142. data/spec_app/app/assets/javascripts/jasmine_specs.coffee +0 -6
  143. data/spec_app/app/assets/stylesheets/_helpers.sass +0 -5
  144. data/spec_app/app/assets/stylesheets/bootstrap_manifest.sass +0 -2
  145. data/spec_app/app/assets/stylesheets/integration_test.sass +0 -88
  146. data/spec_app/app/assets/stylesheets/jasmine_specs.sass +0 -20
  147. data/spec_app/app/controllers/application_controller.rb +0 -14
  148. data/spec_app/app/controllers/binding_test_controller.rb +0 -51
  149. data/spec_app/app/controllers/boot_test_controller.rb +0 -31
  150. data/spec_app/app/controllers/compiler_test_controller.rb +0 -5
  151. data/spec_app/app/controllers/css_test_controller.rb +0 -5
  152. data/spec_app/app/controllers/error_test_controller.rb +0 -5
  153. data/spec_app/app/controllers/form_test/basics_controller.rb +0 -14
  154. data/spec_app/app/controllers/form_test/redirects_controller.rb +0 -17
  155. data/spec_app/app/controllers/form_test/uploads_controller.rb +0 -15
  156. data/spec_app/app/controllers/hash_test_controller.rb +0 -5
  157. data/spec_app/app/controllers/method_test_controller.rb +0 -16
  158. data/spec_app/app/controllers/motion_test_controller.rb +0 -5
  159. data/spec_app/app/controllers/pages_controller.rb +0 -17
  160. data/spec_app/app/controllers/replace_test_controller.rb +0 -5
  161. data/spec_app/app/controllers/reveal_test_controller.rb +0 -5
  162. data/spec_app/app/controllers/scroll_test_controller.rb +0 -5
  163. data/spec_app/app/helpers/application_helper.rb +0 -11
  164. data/spec_app/app/mailers/.keep +0 -0
  165. data/spec_app/app/models/concerns/.keep +0 -0
  166. data/spec_app/app/views/boot_test/defer.erb +0 -18
  167. data/spec_app/app/views/boot_test/module.erb +0 -18
  168. data/spec_app/app/views/boot_test/sync.erb +0 -17
  169. data/spec_app/app/views/compiler_test/timestamp.erb +0 -10
  170. data/spec_app/app/views/css_test/modal.erb +0 -47
  171. data/spec_app/app/views/css_test/modal_contents.erb +0 -5
  172. data/spec_app/app/views/css_test/modal_contents_wide.erb +0 -5
  173. data/spec_app/app/views/css_test/popup.erb +0 -81
  174. data/spec_app/app/views/css_test/popup_contents.erb +0 -5
  175. data/spec_app/app/views/css_test/tooltip.erb +0 -48
  176. data/spec_app/app/views/error_test/trigger.erb +0 -80
  177. data/spec_app/app/views/error_test/unexpected_response.erb +0 -3
  178. data/spec_app/app/views/form_test/basics/new.erb +0 -60
  179. data/spec_app/app/views/form_test/redirects/new.erb +0 -27
  180. data/spec_app/app/views/form_test/redirects/target.erb +0 -6
  181. data/spec_app/app/views/form_test/submission_result.erb +0 -30
  182. data/spec_app/app/views/form_test/uploads/new.erb +0 -44
  183. data/spec_app/app/views/hash_test/unpoly.erb +0 -30
  184. data/spec_app/app/views/hash_test/vanilla.erb +0 -13
  185. data/spec_app/app/views/layouts/integration_test.erb +0 -22
  186. data/spec_app/app/views/layouts/jasmine_rails/spec_runner.html.erb +0 -20
  187. data/spec_app/app/views/method_test/form_target.erb +0 -17
  188. data/spec_app/app/views/method_test/page1.erb +0 -11
  189. data/spec_app/app/views/method_test/page2.erb +0 -6
  190. data/spec_app/app/views/motion_test/animations.erb +0 -16
  191. data/spec_app/app/views/motion_test/transitions.erb +0 -13
  192. data/spec_app/app/views/pages/start.erb +0 -82
  193. data/spec_app/app/views/replace_test/_nav.erb +0 -6
  194. data/spec_app/app/views/replace_test/page1.erb +0 -14
  195. data/spec_app/app/views/replace_test/page2.erb +0 -14
  196. data/spec_app/app/views/replace_test/table.erb +0 -16
  197. data/spec_app/app/views/reveal_test/long1.erb +0 -17
  198. data/spec_app/app/views/reveal_test/long2.erb +0 -17
  199. data/spec_app/app/views/reveal_test/within_document_viewport.erb +0 -24
  200. data/spec_app/app/views/reveal_test/within_overflowing_div_viewport.erb +0 -28
  201. data/spec_app/app/views/scroll_test/long1.erb +0 -30
  202. data/spec_app/bin/bundle +0 -3
  203. data/spec_app/bin/rails +0 -8
  204. data/spec_app/bin/rake +0 -8
  205. data/spec_app/bin/setup +0 -29
  206. data/spec_app/bin/spring +0 -18
  207. data/spec_app/config/application.rb +0 -28
  208. data/spec_app/config/boot.rb +0 -3
  209. data/spec_app/config/database.yml +0 -25
  210. data/spec_app/config/environment.rb +0 -5
  211. data/spec_app/config/environments/development.rb +0 -41
  212. data/spec_app/config/environments/production.rb +0 -79
  213. data/spec_app/config/environments/test.rb +0 -42
  214. data/spec_app/config/initializers/assets.rb +0 -19
  215. data/spec_app/config/initializers/backtrace_silencers.rb +0 -7
  216. data/spec_app/config/initializers/bower_rails.rb +0 -16
  217. data/spec_app/config/initializers/cookies_serializer.rb +0 -3
  218. data/spec_app/config/initializers/filter_parameter_logging.rb +0 -4
  219. data/spec_app/config/initializers/inflections.rb +0 -16
  220. data/spec_app/config/initializers/mime_types.rb +0 -4
  221. data/spec_app/config/initializers/session_store.rb +0 -3
  222. data/spec_app/config/initializers/wrap_parameters.rb +0 -14
  223. data/spec_app/config/locales/en.yml +0 -23
  224. data/spec_app/config/routes.rb +0 -33
  225. data/spec_app/config/secrets.yml +0 -22
  226. data/spec_app/config.ru +0 -4
  227. data/spec_app/db/schema.rb +0 -23
  228. data/spec_app/db/seeds.rb +0 -7
  229. data/spec_app/lib/assets/.keep +0 -0
  230. data/spec_app/lib/tasks/.keep +0 -0
  231. data/spec_app/lib/tasks/cucumber.rake +0 -65
  232. data/spec_app/log/.keep +0 -0
  233. data/spec_app/public/404.html +0 -67
  234. data/spec_app/public/422.html +0 -67
  235. data/spec_app/public/500.html +0 -66
  236. data/spec_app/public/favicon.ico +0 -0
  237. data/spec_app/public/robots.txt +0 -5
  238. data/spec_app/script/cucumber +0 -10
  239. data/spec_app/spec/controllers/binding_test_controller_spec.rb +0 -248
  240. data/spec_app/spec/javascripts/helpers/agent_detector.coffee +0 -20
  241. data/spec_app/spec/javascripts/helpers/async_sequence.js.coffee +0 -103
  242. data/spec_app/spec/javascripts/helpers/browser_switches.js.coffee +0 -21
  243. data/spec_app/spec/javascripts/helpers/enable_logging.js.coffee +0 -2
  244. data/spec_app/spec/javascripts/helpers/fixture.js.coffee +0 -25
  245. data/spec_app/spec/javascripts/helpers/index.js.coffee +0 -1
  246. data/spec_app/spec/javascripts/helpers/jquery_no_conflict.js +0 -1
  247. data/spec_app/spec/javascripts/helpers/knife.js.coffee +0 -69
  248. data/spec_app/spec/javascripts/helpers/last_request.js.coffee +0 -25
  249. data/spec_app/spec/javascripts/helpers/mock_ajax.js.coffee +0 -8
  250. data/spec_app/spec/javascripts/helpers/mock_clock.js.coffee +0 -2
  251. data/spec_app/spec/javascripts/helpers/parse_form_data.js.coffee +0 -24
  252. data/spec_app/spec/javascripts/helpers/promise_state.js +0 -18
  253. data/spec_app/spec/javascripts/helpers/protect_jasmine_runner.coffee +0 -12
  254. data/spec_app/spec/javascripts/helpers/remove_body_margin.js.coffee +0 -8
  255. data/spec_app/spec/javascripts/helpers/reset_history.js.coffee +0 -23
  256. data/spec_app/spec/javascripts/helpers/reset_knife.js.coffee +0 -2
  257. data/spec_app/spec/javascripts/helpers/reset_up.js.coffee +0 -25
  258. data/spec_app/spec/javascripts/helpers/restore_body_scroll.js.coffee +0 -5
  259. data/spec_app/spec/javascripts/helpers/show_lib_versions.coffee +0 -12
  260. data/spec_app/spec/javascripts/helpers/spec_util.coffee +0 -47
  261. data/spec_app/spec/javascripts/helpers/to_be_around.js.coffee +0 -8
  262. data/spec_app/spec/javascripts/helpers/to_be_array.coffee +0 -5
  263. data/spec_app/spec/javascripts/helpers/to_be_attached.coffee +0 -9
  264. data/spec_app/spec/javascripts/helpers/to_be_blank.js.coffee +0 -8
  265. data/spec_app/spec/javascripts/helpers/to_be_detached.coffee +0 -9
  266. data/spec_app/spec/javascripts/helpers/to_be_element.js.coffee +0 -8
  267. data/spec_app/spec/javascripts/helpers/to_be_error.coffee +0 -8
  268. data/spec_app/spec/javascripts/helpers/to_be_given.js.coffee +0 -8
  269. data/spec_app/spec/javascripts/helpers/to_be_hidden.js.coffee +0 -8
  270. data/spec_app/spec/javascripts/helpers/to_be_jquery.js.coffee +0 -5
  271. data/spec_app/spec/javascripts/helpers/to_be_missing.js.coffee +0 -8
  272. data/spec_app/spec/javascripts/helpers/to_be_present.js.coffee +0 -8
  273. data/spec_app/spec/javascripts/helpers/to_be_scrolled_to.coffee +0 -11
  274. data/spec_app/spec/javascripts/helpers/to_be_visible.js.coffee +0 -9
  275. data/spec_app/spec/javascripts/helpers/to_contain.js.coffee +0 -8
  276. data/spec_app/spec/javascripts/helpers/to_end_with.js.coffee +0 -11
  277. data/spec_app/spec/javascripts/helpers/to_equal_jquery.js.coffee +0 -8
  278. data/spec_app/spec/javascripts/helpers/to_equal_node_list.coffee +0 -7
  279. data/spec_app/spec/javascripts/helpers/to_equal_via_is_equal.js.coffee +0 -7
  280. data/spec_app/spec/javascripts/helpers/to_have_class.js.coffee +0 -10
  281. data/spec_app/spec/javascripts/helpers/to_have_descendant.js.coffee +0 -10
  282. data/spec_app/spec/javascripts/helpers/to_have_length.js.coffee +0 -8
  283. data/spec_app/spec/javascripts/helpers/to_have_opacity.coffee +0 -15
  284. data/spec_app/spec/javascripts/helpers/to_have_own_property.js.coffee +0 -8
  285. data/spec_app/spec/javascripts/helpers/to_have_request_method.js.coffee +0 -16
  286. data/spec_app/spec/javascripts/helpers/to_have_text.js.coffee +0 -9
  287. data/spec_app/spec/javascripts/helpers/to_have_unhandled_rejections.coffee +0 -18
  288. data/spec_app/spec/javascripts/helpers/to_match_list.coffee +0 -14
  289. data/spec_app/spec/javascripts/helpers/to_match_selector.coffee +0 -8
  290. data/spec_app/spec/javascripts/helpers/to_match_text.js.coffee +0 -13
  291. data/spec_app/spec/javascripts/helpers/to_match_url.coffee +0 -14
  292. data/spec_app/spec/javascripts/helpers/trigger.js.coffee +0 -200
  293. data/spec_app/spec/javascripts/helpers/wait_until_dom_ready.js.coffee +0 -5
  294. data/spec_app/spec/javascripts/support/jasmine.yml +0 -51
  295. data/spec_app/spec/javascripts/up/browser_spec.js.coffee +0 -150
  296. data/spec_app/spec/javascripts/up/classes/cache_spec.js.coffee +0 -82
  297. data/spec_app/spec/javascripts/up/classes/config_spec.coffee +0 -24
  298. data/spec_app/spec/javascripts/up/classes/divertible_chain_spec.coffee +0 -45
  299. data/spec_app/spec/javascripts/up/classes/focus_tracker_spec.coffee +0 -34
  300. data/spec_app/spec/javascripts/up/classes/params_spec.coffee +0 -557
  301. data/spec_app/spec/javascripts/up/classes/request_spec.coffee +0 -50
  302. data/spec_app/spec/javascripts/up/classes/scroll_motion_spec.js.coffee +0 -51
  303. data/spec_app/spec/javascripts/up/classes/store/memory_spec.js.coffee +0 -70
  304. data/spec_app/spec/javascripts/up/classes/store/session_spec.js.coffee +0 -114
  305. data/spec_app/spec/javascripts/up/element_spec.coffee +0 -897
  306. data/spec_app/spec/javascripts/up/event_spec.js.coffee +0 -530
  307. data/spec_app/spec/javascripts/up/feedback_spec.js.coffee +0 -401
  308. data/spec_app/spec/javascripts/up/form_spec.js.coffee +0 -1527
  309. data/spec_app/spec/javascripts/up/fragment_spec.js.coffee +0 -2624
  310. data/spec_app/spec/javascripts/up/history_spec.js.coffee +0 -340
  311. data/spec_app/spec/javascripts/up/jquery_spec.js.coffee +0 -4
  312. data/spec_app/spec/javascripts/up/legacy_spec.js.coffee +0 -27
  313. data/spec_app/spec/javascripts/up/link_spec.js.coffee +0 -1098
  314. data/spec_app/spec/javascripts/up/log_spec.js.coffee +0 -119
  315. data/spec_app/spec/javascripts/up/modal_spec.js.coffee +0 -939
  316. data/spec_app/spec/javascripts/up/motion_spec.js.coffee +0 -582
  317. data/spec_app/spec/javascripts/up/popup_spec.js.coffee +0 -508
  318. data/spec_app/spec/javascripts/up/protocol_spec.js.coffee +0 -39
  319. data/spec_app/spec/javascripts/up/proxy_spec.js.coffee +0 -1145
  320. data/spec_app/spec/javascripts/up/radio_spec.js.coffee +0 -212
  321. data/spec_app/spec/javascripts/up/rails_spec.js.coffee +0 -118
  322. data/spec_app/spec/javascripts/up/spec_spec.js.coffee +0 -9
  323. data/spec_app/spec/javascripts/up/syntax_spec.js.coffee +0 -304
  324. data/spec_app/spec/javascripts/up/toast_spec.js.coffee +0 -37
  325. data/spec_app/spec/javascripts/up/tooltip_spec.js.coffee +0 -163
  326. data/spec_app/spec/javascripts/up/util_spec.js.coffee +0 -1434
  327. data/spec_app/spec/javascripts/up/viewport_spec.js.coffee +0 -655
  328. data/spec_app/spec/spec_helper.rb +0 -62
  329. data/spec_app/test/controllers/.keep +0 -0
  330. data/spec_app/test/fixtures/.keep +0 -0
  331. data/spec_app/test/helpers/.keep +0 -0
  332. data/spec_app/test/integration/.keep +0 -0
  333. data/spec_app/test/mailers/.keep +0 -0
  334. data/spec_app/test/models/.keep +0 -0
  335. data/spec_app/test/test_helper.rb +0 -10
  336. data/spec_app/vendor/asset-libs/es6-promise-4.1.6/es6-promise.auto.js +0 -1159
  337. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/.bower.json +0 -43
  338. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/.gitignore +0 -6
  339. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/.npmignore +0 -10
  340. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/.pairs +0 -6
  341. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/.travis.yml +0 -56
  342. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/jasmine-ajax.js +0 -790
  343. data/spec_app/vendor/assets/.keep +0 -0
  344. data/unpoly-rails.gemspec +0 -24
data/dist/unpoly.min.js CHANGED
@@ -1,4 +1,6 @@
1
- (function(){window.up={version:"1.0.3"}}).call(this),function(){var t=[].slice,e={}.hasOwnProperty;up.util=function(){var n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y,b,w,k,S,E,T,A,F,C,x,P,O,R,M,j,D,L,U,q,N,K,H,_,B,z,V,I,Q,W,$,X,G,J,Y,Z,te,ee,ne,re,ie,oe,ue,se,ae,le,ce,pe,he,fe,de,me,ge,ve,ye,be,we,ke,Se,Ee,Te,Ae,Fe,Ce,xe,Pe,Oe,Re,Me,je,De,Le,Ue,qe,Ne,Ke,He,_e,Be,ze,Ve,Ie,Qe,We,$e,Xe,Ge,Je;return we=function(){},s=function(){return Promise.resolve()},fe=function(e){var n,r;return r=void 0,n=!1,function(){var i;return i=1<=arguments.length?t.call(arguments,0):[],n?r:(n=!0,r=e.apply(null,i))}},re=function(t,e){return e=e.toString(),(""===e||"80"===e)&&"http:"===t||"443"===e&&"https:"===t},Se=function(t,e){var n,r,i;return r=Ae(t),n=r.protocol+"//"+r.hostname,re(r.protocol,r.port)||(n+=":"+r.port),i=r.pathname,(null!=e?e.stripTrailingSlash:void 0)===!0&&(i=i.replace(/\/$/,"")),n+=i,(null!=e?e.search:void 0)!==!1&&(n+=r.search),(null!=e?e.hash:void 0)===!0&&(n+=r.hash),n},N=function(t){var e;return e=Ae(location.href),t=Ae(t),e.protocol!==t.protocol||e.hostname!==t.hostname},Ae=function(t){var e;return W(t)?e=up.element.get(t):t.pathname?e=t:(e=document.createElement("a"),e.href=t),e.hostname||(e.href=e.href),"/"!==e.pathname[0]&&(e=Te(e,"protocol","hostname","port","pathname","search","hash"),e.pathname="/"+e.pathname),e},ke=function(t){return t?t.toUpperCase():"GET"},me=function(t){return"GET"!==t&&"HEAD"!==t},u=function(){var n,r,i,o,u,s,a;for(s=arguments[0],u=2<=arguments.length?t.call(arguments,1):[],n=0,i=u.length;i>n;n++){o=u[n];for(r in o)e.call(o,r)&&(a=o[r],s[r]=a)}return s},o=Object.assign||u,Xe=function(t){var e,n,r;n=[];for(e in t)r=t[e],n.push(r);return n},Ee=Object.values||Xe,le=function(t){return ie(t)?function(e){return e[t]}:t},pe=function(t,e){var n,r,i,o,u;if(0===t.length)return[];for(e=le(e),u=[],r=n=0,o=t.length;o>n;r=++n)i=t[r],u.push(e(i,r));return u},he=function(t,e){var n;return n=function(t,e){return t[e[0]]=e[1],t},pe(t,e).reduce(n,{})},h=pe,f=function(t,e){var n,r;for(r=[];(n=t.next())&&!n.done;)r.push(e(n.value));return r},ze=function(t,e){var n,r,i,o;for(o=[],r=n=0,i=t-1;i>=0?i>=n:n>=i;r=i>=0?++n:--n)o.push(e(r));return o},J=function(t){return null===t},ue=function(t){return void 0===t},K=function(t){return!ue(t)},X=function(t){return ue(t)||J(t)},I=function(t){return!X(t)},U=function(t){return X(t)?!0:Z(t)&&t[U.key]?t[U.key]():ie(t)||$(t)?0===t.length:te(t)?0===Object.keys(t).length:!1},U.key="up.util.isBlank",xe=function(t,e){return null==e&&(e=ee),e(t)?t:void 0},ee=function(t){return!U(t)},V=function(t){return"function"==typeof t},ie=function(t){return"string"==typeof t||t instanceof String},q=function(t){return"boolean"==typeof t||t instanceof Boolean},Y=function(t){return"number"==typeof t||t instanceof Number},te=function(t){return"object"==typeof t&&!J(t)&&(ue(t.constructor)||t.constructor===Object)},Z=function(t){var e;return e=typeof t,"object"===e&&!J(t)||"function"===e},H=function(t){return t instanceof Element},W=function(t){return!!(null!=t?t.jquery:void 0)},ne=function(t){return Z(t)&&V(t.then)},D=Array.isArray,z=function(t){return t instanceof FormData},Ve=function(t){return D(t)?t:Array.prototype.slice.call(t)},$=function(t){return D(t)||G(t)||j(t)||W(t)||Q(t)},G=function(t){return t instanceof NodeList},Q=function(t){return t instanceof HTMLCollection},j=function(t){return"[object Arguments]"===Object.prototype.toString.call(t)},Ge=function(t){return $(t)?t:X(t)?[]:[t]},c=function(t,e){var n,r,i;if(Z(t)&&t[c.key]?t=t[c.key]():$(t)?(t=Array.prototype.slice.call(t),n=!0):te(t)&&(t=o({},t),n=!0),n&&e)for(r in t)i=t[r],t[r]=c(i,!0);return t},c.key="up.util.copy",Date.prototype[c.key]=function(){return new Date(+this)},p=function(t){return c(t,!0)},de=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],o.apply(null,[{}].concat(t.call(e)))},ye=function(t,e){return e?de(e,t):t?c(t):{}},F=function(t,e){var n,r,i,o;for(o=void 0,r=0,i=t.length;i>r;r++)if(n=t[r],e(n)){o=n;break}return o},He=function(t,e){return!!C(t,e)},C=function(t,e){var n,r,i,o,u;for(e=le(e),i=r=0,o=t.length;o>r;i=++r)if(n=t[i],u=e(n,i))return u;return void 0},b=function(t,e){var n,r,i,o,u;for(e=le(e),u=!0,i=r=0,o=t.length;o>r;i=++r)if(n=t[i],!e(n,i)){u=!1;break}return u},a=function(t){return A(t,I)},Qe=function(t){return t.length<2?t:Ne(i(t))},We=function(t,e){var n;return t.length<2?t:(e=le(e),n=new Set,A(t,function(t,r){var i;return i=e(t,r),n.has(i)?!1:(n.add(i),!0)}))},Ne=function(t){var e;return e=[],t.forEach(function(t){return e.push(t)}),e},i=function(t){var e;return e=new Set,t.forEach(function(t){return e.add(t)}),e},A=function(t,e){var n;return e=le(e),n=[],h(t,function(t,r){return e(t,r)?n.push(t):void 0}),n},Me=function(t,e){return e=le(e),A(t,function(t,n){return!e(t,n)})},M=function(t,e){return A(t,function(t){return l(e,t)})},Ue=function(t,e){return setTimeout(e,t)},Re=function(t){return setTimeout(t,0)},Oe=function(t){return Promise.resolve().then(t)},ce=function(t){return t[t.length-1]},g=function(t){var e;return e=t.key,"Escape"===e||"Esc"===e},l=function(t,e){return t.indexOf(e)>=0},Te=function(){var e,n,r,i,o,u;for(i=arguments[0],o=2<=arguments.length?t.call(arguments,1):[],e={},n=0,r=o.length;r>n;n++)u=o[n],u in i&&(e[u]=i[u]);return e},w=function(){var e,n,r,i,o,u;for(i=arguments[0],o=2<=arguments.length?t.call(arguments,1):[],e=c(i),n=0,r=o.length;r>n;n++)u=o[n],delete e[u];return e},se=function(t){return!(t.metaKey||t.shiftKey||t.ctrlKey)},ae=function(t){var e;return e=ue(t.button)||0===t.button,e&&se(t)},$e=function(){return new Promise(we)},De=function(t,e){var n;return n=t.indexOf(e),n>=0?(t.splice(n,1),e):void 0},y=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],V(n)?n.apply(null,e):n},T=function(){var e,n,r,i,o,u;throw e=1<=arguments.length?t.call(arguments,0):[],D(e[0])?(r=e[0],u=e[1]||{}):(r=e,u={}),(i=up.log).error.apply(i,r),up.event.onReady(function(){return up.toast.open(r,u)}),n=(o=up.log).sprintf.apply(o,r),new Error(n)},n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},m=function(t){return t.replace(/[&<>"']/g,function(t){return n[t]})},v=function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},Ce=function(t,e){var n;return n=t[e],delete t[e],n},Le=function(t,e,n){return t[n]=Ce(t,e)},S=function(t,e){var n;return n=ce(t),e(n)?t.pop():void 0},k=function(t){return S(t,V)},E=function(t){return S(t,te)||{}},Fe=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],function(){var r;return r=1<=arguments.length?t.call(arguments,0):[],n.apply(this,e.concat(r))}},R=function(t){return t},Pe=function(e){var n,r;return n=ve(),r=function(){var r,i;return r=1<=arguments.length?t.call(arguments,0):[],i=e.apply(null,r),n.resolve(i),i},r.promise=n.promise(),r},qe=function(t){return 1===t.length?t[0]:function(){return pe(t,function(t){return t()})}},O=function(t){var e,n,r;return e=t.getBoundingClientRect(),n=e.left+.5*e.width,r=.5*up.viewport.rootWidth(),r>n?"left":"right"},P=function(t){var e,n,r,i;for(e=[],n=0,r=t.length;r>n;n++)i=t[n],$(i)?e.push.apply(e,i):e.push(i);return e},x=function(t,e){return P(pe(t,e))},oe=function(t){return!!t},r=function(t,e){return t.then(e,e)},ge=function(t){return null!=t?t["catch"](we):void 0},ve=function(){var t,e,n;return n=void 0,e=void 0,t=new Promise(function(t,r){return n=t,e=r}),t.resolve=n,t.reject=e,t.promise=function(){return t},t},je=function(t){var e;try{return t()}catch(n){return e=n,Promise.reject(e)}},Be=function(t,e){var n,r,i,o,u;for(e=le(e),u=0,i=0,o=t.length;o>i;i++)n=t[i],r=e(n),I(r)&&(u+=r);return u},L=function(t){return Object.prototype.hasOwnProperty(t)},_=function(t,e){var n,r;return(null!=t?t.valueOf:void 0)&&(t=t.valueOf()),(null!=e?e.valueOf:void 0)&&(e=e.valueOf()),typeof t!=typeof e?!1:$(t)&&$(e)?B(t,e):Z(t)&&t[_.key]?t[_.key](e):te(t)&&te(e)?(n=Object.keys(t),r=Object.keys(e),B(n,r)?b(n,function(n){return _(t[n],e[n])}):!1):t===e},_.key="up.util.isEqual",B=function(t,e){return t.length===e.length&&b(t,function(t,n){return _(t,e[n])})},_e=function(t,e){var n;return null==e&&(e=" "),n=t.split(e),n=pe(n,function(t){return t.trim()}),n=A(n,ee)},d=function(t,e){return e.length>t.length?!1:t.substring(t.length-e.length)===e},Ke=function(t){return.5>t?2*t*t:t*(4-2*t)-1},Je=function(t,e){return t instanceof e?t:new e(t)},be=0,Ie=function(){return be++},{parseUrl:Ae,normalizeUrl:Se,normalizeMethod:ke,methodAllowsPayload:me,assign:o,assignPolyfill:u,copy:c,deepCopy:p,merge:de,options:ye,fail:T,each:h,eachIterator:f,map:pe,flatMap:x,mapObject:he,times:ze,findResult:C,some:He,any:function(){return up.legacy.warn("up.util.any() has been renamed to up.util.some()"),He.apply(null,arguments)},every:b,all:function(){return up.legacy.warn("up.util.all() has been renamed to up.util.every()"),b.apply(null,arguments)},detect:function(){return up.legacy.warn("up.util.find() has been renamed to up.util.find()"),F.apply(null,arguments)},find:F,select:function(){return up.legacy.warn("up.util.select() has been renamed to up.util.filter()"),A.apply(null,arguments)},filter:A,reject:Me,intersect:M,compact:a,uniq:Qe,uniqBy:We,last:ce,isNull:J,isDefined:K,isUndefined:ue,isGiven:I,isMissing:X,isPresent:ee,isBlank:U,presence:xe,isObject:Z,isFunction:V,isString:ie,isBoolean:q,isNumber:Y,isElement:H,isJQuery:W,isPromise:ne,isOptions:te,isArray:D,isFormData:z,isNodeList:G,isArguments:j,isList:$,isUnmodifiedKeyEvent:se,isUnmodifiedMouseEvent:ae,timer:Ue,setTimer:function(){return up.legacy.warn("up.util.setTimer() has been renamed to up.util.timer()"),Ue.apply(null,arguments)},escapePressed:g,contains:l,toArray:Ve,only:Te,except:w,unresolvablePromise:$e,remove:De,memoize:fe,error:T,pluckKey:Ce,renameKey:Le,extractOptions:E,extractCallback:k,noop:we,asyncNoop:s,identity:R,escapeHtml:m,escapeRegexp:v,sequence:qe,previewable:Pe,evalOption:y,horizontalScreenHalf:O,flatten:P,isTruthy:oe,newDeferred:ve,always:r,muteRejection:ge,rejectOnError:je,isBasicObjectProperty:L,isCrossDomain:N,selectorForElement:function(){return up.legacy.warn("up.util.selectorForElement() has been renamed to up.element.toSelector()"),up.element.toSelector.apply(null,arguments)},nextFrame:function(){return up.legacy.warn("up.util.nextFrame() has been renamed to up.util.task()"),Re.apply(null,arguments)},task:Re,microtask:Oe,isEqual:_,splitValues:_e,endsWith:d,sum:Be,wrapList:Ge,wrapValue:Je,simpleEase:Ke,values:Ee,partial:Fe,arrayToSet:i,setToArray:Ne,uid:Ie}}(),up.fail=up.util.fail}.call(this),function(){var t,e=[].slice;t=up.util,up.legacy=function(){var n,r,i,o;return n=function(e,n,r){return n in e?(i("Property { %s } has been renamed to { %s } (found in %o)",n,r,e),t.renameKey(e,n,r)):void 0},r=function(t,e){return Object.defineProperty(up,t,{get:function(){return i("up."+t+" has been renamed to up."+e),up[e]}})},o={},i=function(){var t,n,r;return n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],n="[DEPRECATION] "+n,n=(r=up.log).sprintf.apply(r,[n].concat(e.call(t))),o[n]?void 0:(o[n]=!0,up.warn(n))},{renamedModule:r,fixKey:n,warn:i}}()}.call(this),function(){var t=[].slice;up.browser=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y,b,w,k,S;return w=up.util,v=function(t,e){var n,r;return r=w.merge(e,{url:t}),n=new up.Request(r),n.navigate()},b=function(t){return t.submit()},k=function(){return location.href},d=w.memoize(function(){return!window.atob}),m=w.memoize(function(){return"ActiveXObject"in window}),f=function(){return w.isDefined(history.pushState)&&"get"===up.protocol.initialRequestMethod()},o=w.memoize(function(){return"transition"in document.documentElement.style}),l=w.memoize(function(){return"oninput"in document.createElement("input")}),h=w.memoize(function(){return!!window.Promise}),a=w.memoize(function(){return!!window.FormData}),c=w.memoize(function(){return a()&&!!FormData.prototype.entries}),s=w.memoize(function(){return!!window.DOMParser}),r=w.memoize(function(){return window.console&&console.debug&&console.info&&console.warn&&console.error&&console.group&&console.groupCollapsed&&console.groupEnd}),u=w.memoize(function(){return!!window.customElements}),n=w.memoize(function(){return"requestAnimationFrame"in window}),i=w.memoize(function(){return"scrollRestoration"in history}),p=function(){return!!window.jQuery},y=function(t){var e,n;return n=null!=(e=document.cookie.match(new RegExp(t+"=(\\w+)")))?e[1]:void 0,w.isPresent(n)&&(document.cookie=t+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/"),n},S=function(t){return t.preload||w.isBlank(t.confirm)||window.confirm(t.confirm)?Promise.resolve():Promise.reject(new Error("User canceled action"))},g=function(){return!d()&&r()&&s()&&a()&&o()&&l()&&h()&&n()},e=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],p()||up.fail("jQuery must be published as window.jQuery"),jQuery.apply(null,e)},{url:k,navigate:v,submitForm:b,canPushState:f,canFormData:a,canInspectFormData:c,canCustomElements:u,canControlScrollRestoration:i,canJQuery:p,whenConfirmed:S,isSupported:g,popCookie:y,jQuery:e,isIE11:m}}()}.call(this),function(){var t;t=up.util,up.Selector=function(){function e(t,e){this.selector=t,this.filterFn=e}var n,r;return n=new RegExp("\\:has\\(([^\\)]+)\\)$"),r=up.browser.isIE11()?"msMatchesSelector":"matches",e.prototype.matches=function(t){var e;return e=t[r](this.selector),this.filterFn&&e&&(e=this.filterFn(t)),e},e.prototype.descendants=function(e){var n;return n=e.querySelectorAll(this.selector),this.filterFn&&(n=t.filter(n,this.filterFn)),n},e.prototype.descendant=function(e){var n;return this.filterFn?(n=e.querySelectorAll(this.selector),t.find(n,this.filterFn)):e.querySelector(this.selector)},e.prototype.subtree=function(t){var e;return e=[],this.matches(t)&&e.push(t),e.push.apply(e,this.descendants(t)),e},e.prototype.closest=function(t){return t.closest&&!this.filterFn?t.closest(this.selector):this.closestPolyfill(t)},e.prototype.closestPolyfill=function(t){return this.matches(t,this.selector)?t:this.ancestor(t)},e.prototype.ancestor=function(t){var e;return(e=t.parentElement)?this.matches(e)?e:this.ancestor(e):void 0},e.parse=function(t){var e;return e=null,t=t.replace(n,function(t,n){return e=function(t){return t.querySelector(n)},""}),new this(t,e)},e}()}.call(this),function(){var t=[].slice;up.element=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y,b,w,k,S,E,T,A,F,C,x,P,O,R,M,j,D,L,U,q,N,K,H,_,B,z,V,I,Q,W,$,X,G,J,Y;return G=up.util,n={getAttribute:function(){return void 0}},q=function(t){return up.Selector.parse(t)},b=function(){var e,n,r,i;return e=1<=arguments.length?t.call(arguments,0):[],i=e.pop(),n=null!=(r=e[0])?r:document,q(i).descendant(n)},i=function(){var e,n,r,i;return e=1<=arguments.length?t.call(arguments,0):[],i=e.pop(),n=null!=(r=e[0])?r:document,q(i).descendants(n)},Q=function(t,e){return q(e).subtree(t)},l=function(t,e){return q(e).closest(t)},R=function(t,e){return q(e).matches(t)},o=function(t,e){return q(e).ancestor(t)},S=function(t){return G.isElement(t)?t:G.isString(t)?b(t):G.isJQuery(t)?(t.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",t),t[0]):t},k=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],G.flatMap(e,Y)},Y=function(t){return G.isString(t)?i(t):G.wrapList(t)},N=function(t){var e;return t.remove?t.remove():(e=t.parentNode)?e.removeChild(t):void 0},A=function(t){return t.style.display="none"},I=function(t){return t.style.display=""},$=function(t,e){return null==e&&(e=!P(t)),e?I(t):A(t)},X=function(t,e,n){var r;return r=t.classList,null==n&&(n=!r.contains(e)),n?r.add(e):r.remove(e)},_=function(t,e){var n,r,i;r=[];for(n in e)i=e[n],r.push(t.setAttribute(n,i));return r},M=function(t){var e,n;return n="meta"+u("name",t),null!=(e=b(n))?e.getAttribute("content"):void 0},C=function(t,e){return t.insertAdjacentElement("beforebegin",e)},K=function(t,e){return t.parentElement.replaceChild(e,t)},m=function(t,e){var n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y;for(n=[],m=t.replace(/\[([\w-]+)(?:=(["'])?([^"'\]]*?)\2)?\]/g,function(t,e,r,i){return n.push(i||""),"["+e+"]"}),u=m.split(/[ >]+/),d=void 0,i=void 0,h=void 0,s=0,c=u.length;c>s;s++){if(o=u[s],v=void 0,o=o.replace(/^[\w-]+/,function(t){return v=t,""}),i=document.createElement(v||"div"),d||(d=i),o=o.replace(/\#([\w-]+)/,function(t,e){return i.id=e,""}),o=o.replace(/\.([\w-]+)/g,function(t,e){return i.classList.add(e),""}),n.length&&(o=o.replace(/\[([\w-]+)\]/g,function(t,e){return i.setAttribute(e,n.shift()),""})),""!==o)throw new Error("Cannot parse selector: "+t);null!=h&&h.appendChild(i),h=i}if(e){if(r=G.pluckKey(e,"class"))for(f=G.wrapList(r),a=0,p=f.length;p>a;a++)l=f[a],d.classList.add(l);(g=G.pluckKey(e,"style"))&&B(d,g),(y=G.pluckKey(e,"text"))&&(d.innerText=y),_(d,e)}return d},r=function(t,e,n){var r;return r=m(e,n),t.appendChild(r),r},W=function(t){var e,n,r,i,o,s,a,l,c;if(G.isString(t))return t;if(t=S(t),l=void 0,x(t))l=v(t);else if(c=t.getAttribute("up-id"))l=u("up-id",c);else if(i=t.getAttribute("id"))l=i.match(/^[a-z0-9\-_]+$/i)?"#"+i:u("id",i);else if(a=t.getAttribute("name"))l=v(t)+u("name",a);else if(n=G.presence(j(t)))for(l="",r=0,s=n.length;s>r;r++)o=n[r],l+="."+o;else l=(e=t.getAttribute("aria-label"))?u("aria-label",e):v(t);return l},x=function(t){return R(t,"html, body, head, title")},v=function(t){return t.tagName.toLowerCase()},u=function(t,e){return e=e.replace(/"/g,'\\"'),"["+t+'="'+e+'"]'},j=function(t){var e,n;return e=t.className,n=G.splitValues(e),G.reject(n,function(t){return t.match(/^up-/)})},f=function(t){var e;return e=new DOMParser,e.parseFromString(t,"text/html")},d=function(t){var e;return e=f(t),e.body.children[0]},E=function(){return document.documentElement},U=function(t){return t.offsetHeight},h=function(t){var e;return e=V(t,{transition:"none"}),U(t),e},T=function(t){var e,n,r,i;return i=G.isOptions(t)?t:c(t),r=i.transitionProperty,e=i.transitionDuration,n="none"===r||"all"===r&&0===e,!n},w=function(t){var e,n;return e=t.getBoundingClientRect(),t.style.position="absolute",n=t.offsetParent.getBoundingClientRect(),B(t,{left:e.left-p(t,"margin-left")-n.left,top:e.top-p(t,"margin-top")-n.top,right:"",bottom:""})},z=function(t,e){var n,r,i;r=[];for(n in e)i=e[n],r.push(G.isMissing(t.getAttribute(n))?t.setAttribute(n,i):void 0);return r},J=function(t){var e,n;return e=t.parentNode,n=G.toArray(t.childNodes),G.each(n,function(n){return e.insertBefore(n,t)}),e.removeChild(t)},s=function(t,e,n){var r;switch(r=t.getAttribute(e)){case"false":return!1;case"true":case"":case e:return!0;default:if(n)return r}},a=function(t,e){return s(t,e,!0)},L=function(t,e){var n;return n=t.getAttribute(e),(null!=n?n.match(/^[\d\.]+$/):void 0)?parseFloat(n):void 0},O=function(t,e){var n,r;return(n="function"==typeof t.getAttribute&&null!=(r=t.getAttribute(e))?r.trim():void 0)?JSON.parse(n):void 0},V=function(t,e){var n;return n=F(t,Object.keys(e)),B(t,e),function(){return B(t,n)}},c=function(t,e){var n;return n=window.getComputedStyle(t),y(n,e)},p=function(t,e){var n;return n=c(t,e),G.isGiven(n)?parseFloat(n):void 0},F=function(t,e){var n;return n=t.style,y(n,e)},y=function(e,n){return G.isString(n)?e[n]:G.only.apply(G,[e].concat(t.call(n)))},B=function(t,e){var n,r,i,o;i=t.style,r=[];for(n in e)o=e[n],o=D(n,o),r.push(i[n]=o);return r},D=function(t,n){return G.isMissing(n)?n="":e.has(t.toLowerCase().replace(/-/,""))&&(n=g(n)),n},e=G.arrayToSet(["top","right","bottom","left","padding","paddingtop","paddingright","paddingbottom","paddingleft","margin","margintop","marginright","marginbottom","marginleft","borderwidth","bordertopwidth","borderrightwidth","borderbottomwidth","borderleftwidth","width","height","maxwidth","maxheight","minwidth","minheight"]),g=function(t){return G.isNumber(t)||G.isString(t)&&/^\d+$/.test(t)?t.toString()+"px":t},H=function(t,e){var n,r;return G.isString(t)?(r=t,G.contains(r,"&")&&(G.isPresent(e)?(n=W(e),r=r.replace(/\&/,n)):up.fail("Found origin reference (%s) in selector %s, but no origin was given","&",r))):r=W(t),r},P=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},{first:b,all:i,subtree:Q,closest:l,matches:R,ancestor:o,get:S,list:k,remove:N,toggle:$,toggleClass:X,hide:A,show:I,metaContent:M,replace:K,insertBefore:C,createFromSelector:m,setAttrs:_,affix:r,toSelector:W,isSingleton:x,attributeSelector:u,createDocumentFromHtml:f,createFromHtml:d,root:E,paint:U,concludeCssTransition:h,hasCssTransition:T,fixedToAbsolute:w,setMissingAttrs:z,unwrap:J,booleanAttr:s,numberAttr:L,jsonAttr:O,booleanOrStringAttr:a,setTemporaryStyle:V,style:c,styleNumber:p,inlineStyle:F,setStyle:B,resolveSelector:H,none:function(){return n},isVisible:P}}()}.call(this),function(){var t;t=up.element,up.BodyShifter=function(){function e(){this.unshiftFns=[]}return e.prototype.shift=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f;if(h=up.viewport.rootHasVerticalScrollbar(),l=up.viewport.rootOverflowElement(),this.unshiftFns.push(t.setTemporaryStyle(l,{overflowY:"hidden"})),h){for(n=document.body,f=up.viewport.scrollbarWidth(),r=t.styleNumber(n,"paddingRight"),i=f+r,this.unshiftFns.push(t.setTemporaryStyle(n,{paddingRight:i})),c=up.viewport.anchoredRight(),p=[],s=0,a=c.length;a>s;s++)e=c[s],o=t.styleNumber(e,"right"),u=f+o,p.push(this.unshiftFns.push(t.setTemporaryStyle(e,{right:u})));return p}},e.prototype.unshift=function(){var t,e;for(t=[];e=this.unshiftFns.pop();)t.push(e());return t},e}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=[].slice;t=up.util,up.Cache=function(){function r(t){this.config=null!=t?t:{},this.get=e(this.get,this),this.isFresh=e(this.isFresh,this),this.remove=e(this.remove,this),this.set=e(this.set,this),this.timestamp=e(this.timestamp,this),this.alias=e(this.alias,this),this.makeRoomForAnotherKey=e(this.makeRoomForAnotherKey,this),this.keys=e(this.keys,this),this.log=e(this.log,this),this.clear=e(this.clear,this),this.isCachable=e(this.isCachable,this),this.isEnabled=e(this.isEnabled,this),this.normalizeStoreKey=e(this.normalizeStoreKey,this),this.expiryMillis=e(this.expiryMillis,this),this.maxKeys=e(this.maxKeys,this),this.store=this.config.store||new up.store.Memory}return r.prototype.maxKeys=function(){return t.evalOption(this.config.size)},r.prototype.expiryMillis=function(){return t.evalOption(this.config.expiry)},r.prototype.normalizeStoreKey=function(t){return this.config.key?this.config.key(t):t.toString()},r.prototype.isEnabled=function(){return 0!==this.maxKeys()&&0!==this.expiryMillis()},r.prototype.isCachable=function(t){return this.config.cachable?this.config.cachable(t):!0},r.prototype.clear=function(){return this.store.clear()},r.prototype.log=function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],this.config.logPrefix?(t[0]="["+this.config.logPrefix+"] "+t[0],up.puts.apply(up,t)):void 0},r.prototype.keys=function(){return this.store.keys()},r.prototype.makeRoomForAnotherKey=function(){var e,n,r,i;return i=t.copy(this.keys()),e=this.maxKeys(),e&&i.length>=e&&(n=void 0,r=void 0,t.each(i,function(t){return function(e){var i,o;return i=t.store.get(e),o=i.timestamp,!r||r>o?(n=e,r=o):void 0}}(this)),n)?this.store.remove(n):void 0},r.prototype.alias=function(e,n){var r;return r=this.get(e,{silent:!0}),t.isDefined(r)?this.set(n,r):void 0},r.prototype.timestamp=function(){return(new Date).valueOf()},r.prototype.set=function(t,e){var n,r;return this.isEnabled()&&this.isCachable(t)?(this.makeRoomForAnotherKey(),n=this.normalizeStoreKey(t),this.log("Setting entry %o to %o",n,e),r={timestamp:this.timestamp(),value:e},this.store.set(n,r)):void 0},r.prototype.remove=function(t){var e;return this.isCachable(t)?(e=this.normalizeStoreKey(t),this.store.remove(e)):void 0},r.prototype.isFresh=function(t){var e,n;return e=this.expiryMillis(),e?(n=this.timestamp()-t.timestamp,e>n):!0},r.prototype.get=function(t,e){var n;return null==e&&(e={}),this.isCachable(t)&&(n=this.store.get(this.normalizeStoreKey(t)))?this.isFresh(n)?(e.silent||this.log("Cache hit for '%s'",t),n.value):(e.silent||this.log("Discarding stale cache entry for '%s'",t),void this.remove(t)):void(e.silent||this.log("Cache miss for '%s'",t))},r}()}.call(this),function(){var t,e=[].slice;t=up.util,up.Record=function(){function n(e){t.assign(this,this.attributes(e))}return n.prototype.fields=function(){throw"Return an array of property names"},n.prototype.attributes=function(n){return null==n&&(n=this),t.only.apply(t,[n].concat(e.call(this.fields())))},n.prototype[""+t.copy.key]=function(){return this.variant()},n.prototype.variant=function(e){var n;return null==e&&(e={}),n=t.merge(this.attributes(),e),new this.constructor(n)},n.prototype[""+t.isEqual.key]=function(e){return e&&this.constructor===e.constructor&&t.isEqual(this.attributes(),e.attributes())},n}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.CompilePass=function(){function r(t,e,r){this.root=t,this.compilers=e,null==r&&(r={}),this.isInSkippedSubtree=n(this.isInSkippedSubtree,this),this.skipSubtrees=r.skip,this.skipSubtrees.length&&this.root.querySelector("[up-keep]")||(this.skipSubtrees=void 0)}return r.prototype.compile=function(){return up.log.group("Compiling fragment %o",this.root,function(t){return function(){var e,n,r,i,o;for(i=t.compilers,o=[],n=0,r=i.length;r>n;n++)e=i[n],o.push(t.runCompiler(e));return o}}(this))},r.prototype.runCompiler=function(t){var n;return n=this.select(t.selector),n.length?up.log.group(t.isDefault?void 0:"Compiling '%s' on %d element(s)",t.selector,n.length,function(r){return function(){var i,o,u,s,a,l,c,p;if(t.batch)r.compileBatch(t,n);else for(i=0,s=n.length;s>i;i++)l=n[i],r.compileOneElement(t,l);if(u=t.keep){for(p=e.isString(u)?u:"",c=[],o=0,a=n.length;a>o;o++)l=n[o],c.push(l.setAttribute("up-keep",p));return c}}}(this)):void 0},r.prototype.compileOneElement=function(t,e){var n,r,i,o,u;return o=t.jQuery?up.browser.jQuery(e):e,n=[o],1!==t.length&&(r=up.syntax.data(e),n.push(r)),u=t.apply(e,n),(i=this.destructorPresence(u))?up.destructor(e,i):void 0},r.prototype.compileBatch=function(t,n){var r,i,o,u;return o=t.jQuery?up.browser.jQuery(n):n,r=[o],1!==t.length&&(i=e.map(n,up.syntax.data),r.push(i)),u=t.apply(n,r),this.destructorPresence(u)?up.fail("Compilers with { batch: true } cannot return destructors"):void 0},r.prototype.destructorPresence=function(t){return e.isFunction(t)||e.isArray(t)&&e.every(t,e.isFunction)?t:void 0},r.prototype.select=function(n){var r;return e.isFunction(n)&&(n=n()),r=t.subtree(this.root,n),this.skipSubtrees&&(r=e.reject(r,this.isInSkippedSubtree)),r},r.prototype.isInSkippedSubtree=function(t){var n;return e.contains(this.skipSubtrees,t)?!0:(n=t.parentElement)?this.isInSkippedSubtree(n):!1},r}()}.call(this),function(){var t;t=up.util,up.Config=function(){function e(t){this.blueprint=t,this.reset()}return e.prototype.reset=function(){return t.assign(this,t.deepCopy(this.blueprint))},e}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.CssTransition=function(){function r(t,r,i){this.element=t,this.lastFrameKebab=r,this.startMotion=n(this.startMotion,this),this.resumeOldTransition=n(this.resumeOldTransition,this),this.pauseOldTransition=n(this.pauseOldTransition,this),this.finish=n(this.finish,this),this.onTransitionEnd=n(this.onTransitionEnd,this),this.listenToTransitionEnd=n(this.listenToTransitionEnd,this),this.stopFallbackTimer=n(this.stopFallbackTimer,this),this.startFallbackTimer=n(this.startFallbackTimer,this),this.onFinishEvent=n(this.onFinishEvent,this),this.listenToFinishEvent=n(this.listenToFinishEvent,this),this.start=n(this.start,this),this.lastFrameKeysKebab=Object.keys(this.lastFrameKebab),e.some(this.lastFrameKeysKebab,function(t){return t.match(/A-Z/)})&&up.fail("Animation keys must be kebab-case"),this.finishEvent=i.finishEvent,this.duration=i.duration,this.delay=i.delay,this.totalDuration=this.delay+this.duration,this.easing=i.easing,this.finished=!1}return r.prototype.start=function(){return 0===this.lastFrameKeysKebab.length?(this.finished=!0,Promise.resolve()):(this.deferred=e.newDeferred(),this.pauseOldTransition(),this.startTime=new Date,this.startFallbackTimer(),this.listenToFinishEvent(),this.listenToTransitionEnd(),this.startMotion(),this.deferred.promise())},r.prototype.listenToFinishEvent=function(){return this.finishEvent?this.stopListenToFinishEvent=this.element.addEventListener(this.finishEvent,this.onFinishEvent):void 0},r.prototype.onFinishEvent=function(t){return t.stopPropagation(),this.finish()},r.prototype.startFallbackTimer=function(){var t;return t=100,this.fallbackTimer=e.timer(this.totalDuration+t,function(t){return function(){return t.finish()}}(this))},r.prototype.stopFallbackTimer=function(){return clearTimeout(this.fallbackTimer)},r.prototype.listenToTransitionEnd=function(){return this.stopListenToTransitionEnd=up.on(this.element,"transitionend",this.onTransitionEnd)},r.prototype.onTransitionEnd=function(t){var n,r;if(t.target===this.element&&(r=new Date-this.startTime,r>.25*this.totalDuration&&(n=t.propertyName,e.contains(this.lastFrameKeysKebab,n))))return this.finish()},r.prototype.finish=function(){return this.finished?void 0:(this.finished=!0,this.stopFallbackTimer(),"function"==typeof this.stopListenToFinishEvent&&this.stopListenToFinishEvent(),"function"==typeof this.stopListenToTransitionEnd&&this.stopListenToTransitionEnd(),t.concludeCssTransition(this.element),this.resumeOldTransition(),this.deferred.resolve())},r.prototype.pauseOldTransition=function(){var e,n,r;return e=t.style(this.element,["transitionProperty","transitionDuration","transitionDelay","transitionTimingFunction"]),t.hasCssTransition(e)?("all"!==e.transitionProperty&&(r=e.transitionProperty.split(/\s*,\s*/),n=t.style(this.element,r),this.setOldTransitionTargetFrame=t.setTemporaryStyle(this.element,n)),this.setOldTransition=t.concludeCssTransition(this.element)):void 0},r.prototype.resumeOldTransition=function(){return"function"==typeof this.setOldTransitionTargetFrame&&this.setOldTransitionTargetFrame(),"function"==typeof this.setOldTransition?this.setOldTransition():void 0},r.prototype.startMotion=function(){return t.setStyle(this.element,{transitionProperty:Object.keys(this.lastFrameKebab).join(", "),transitionDuration:this.duration+"ms",transitionDelay:this.delay+"ms",transitionTimingFunction:this.easing}),t.setStyle(this.element,this.lastFrameKebab)},r}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=[].slice;t=up.util,up.DivertibleChain=function(){function r(){this.asap=e(this.asap,this),this.poke=e(this.poke,this),this.allTasks=e(this.allTasks,this),this.promise=e(this.promise,this),this.reset=e(this.reset,this),this.reset()}return r.prototype.reset=function(){return this.queue=[],this.currentTask=void 0},r.prototype.promise=function(){var e;return e=t.last(this.allTasks()),(null!=e?e.promise:void 0)||Promise.resolve()},r.prototype.allTasks=function(){var t;return t=[],this.currentTask&&t.push(this.currentTask),t=t.concat(this.queue)},r.prototype.poke=function(){var e;return!this.currentTask&&(this.currentTask=this.queue.shift())?(e=this.currentTask(),t.always(e,function(t){return function(){return t.currentTask=void 0,t.poke()}}(this))):void 0},r.prototype.asap=function(){var e;return e=1<=arguments.length?n.call(arguments,0):[],this.queue=t.map(e,t.previewable),this.poke(),this.promise()},r}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.EventListener=function(){function r(t,e,r,i,o){this.element=t,this.eventName=e,this.selector=r,this.callback=i,null==o&&(o={}),this.nativeCallback=n(this.nativeCallback,this),this.unbind=n(this.unbind,this),this.jQuery=o.jQuery,this.key=this.constructor.key(this.eventName,this.selector,this.callback),this.isDefault=up.framework.isBooting()}return r.prototype.bind=function(){var t,e;return e=(t=this.element).upEventListeners||(t.upEventListeners={}),e[this.key]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventName,this.callback),e[this.key]=this,this.element.addEventListener(this.eventName,this.nativeCallback)},r.prototype.unbind=function(){var t;return(t=this.element.upEventListeners)&&delete t[this.key],this.element.removeEventListener(this.eventName,this.nativeCallback)},r.prototype.nativeCallback=function(e){var n,r,i,o,u;return i=e.target,this.selector&&(i=t.closest(i,this.selector)),i?(o=this.jQuery?up.browser.jQuery(i):i,n=[e,o],u=this.callback.length,1!==u&&2!==u&&(r=up.syntax.data(i),n.push(r)),this.callback.apply(i,n)):void 0},r.parseArgs=function(t){var n,r,i,o;return t=e.copy(t),n=t.pop(),n.upUid||(n.upUid=e.uid()),r=t[0].addEventListener?[t.shift()]:e.isJQuery(t[0])||e.isList(t[0])&&t[0][0].addEventListener?t.shift():[document],i=e.splitValues(t.shift()),o=t[0],{elements:r,eventNames:i,selector:o,callback:n}
2
- },r.bind=function(t,n){var r,i,o,u,s,a,l,c,p,h,f;for(c=this.parseArgs(t),f=[],p=c.elements,o=0,s=p.length;s>o;o++)for(r=p[o],h=c.eventNames,u=0,a=h.length;a>u;u++)i=h[u],l=new this(r,i,c.selector,c.callback,n),l.bind(),f.push(l.unbind);return e.sequence(f)},r.key=function(t,e,n){return[t,e,n.upUid].join("|")},r.unbind=function(t){var e,n,r,i,o,u,s,a,l,c;for(a=this.parseArgs(t),l=a.elements,c=[],r=0,o=l.length;o>r;r++)e=l[r],s=e.upEventListeners,c.push(function(){var t,e,r,o;for(r=a.eventNames,o=[],t=0,e=r.length;e>t;t++)n=r[t],i=this.key(n,a.selector,a.callback),o.push(s&&(u=s[i])?u.unbind():void 0);return o}.call(this));return c},r.unbindNonDefault=function(t){var n,r,i,o,u,s;if(u=t.upEventListeners){for(o=e.values(u),s=[],n=0,r=o.length;r>n;n++)i=o[n],s.push(i.isDefault?void 0:i.unbind());return s}},r}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.ExtractCascade=function(){function n(n,r){this.oldPlanNotFound=e(this.oldPlanNotFound,this),this.matchingPlanNotFound=e(this.matchingPlanNotFound,this),this.bestMatchingSteps=e(this.bestMatchingSteps,this),this.bestPreflightSelector=e(this.bestPreflightSelector,this),this.detectPlan=e(this.detectPlan,this),this.matchingPlan=e(this.matchingPlan,this),this.newPlan=e(this.newPlan,this),this.oldPlan=e(this.oldPlan,this);var i,o;this.options=t.options(r,{humanizedTarget:"selector",layer:"auto"}),null==(i=this.options).transition&&(i.transition=this.options.animation),null==(o=this.options).hungry&&(o.hungry=!0),this.candidates=this.buildCandidates(n),this.plans=t.map(this.candidates,function(e){return function(n,r){var i,o;return i=t.copy(e.options),r>0&&(i.transition=null!=(o=up.fragment.config.fallbackTransition)?o:e.options.transition),new up.ExtractPlan(n,i)}}(this))}return n.prototype.buildCandidates=function(e){var n;return n=[e,this.options.fallback,up.fragment.config.fallbacks],n=t.flatten(n),n=t.filter(n,t.isTruthy),n=t.uniq(n),(this.options.fallback===!1||this.options.provideTarget)&&(n=[n[0]]),n},n.prototype.oldPlan=function(){return this.detectPlan("oldExists")},n.prototype.newPlan=function(){return this.detectPlan("newExists")},n.prototype.matchingPlan=function(){return this.detectPlan("matchExists")},n.prototype.detectPlan=function(e){return t.find(this.plans,function(t){return t[e]()})},n.prototype.bestPreflightSelector=function(){var t;return t=this.options.provideTarget?this.plans[0]:this.oldPlan(),t?(t.resolveNesting(),t.selector()):this.oldPlanNotFound()},n.prototype.bestMatchingSteps=function(){var t;return(t=this.matchingPlan())?(t.addHungrySteps(),t.resolveNesting(),t.steps):this.matchingPlanNotFound()},n.prototype.matchingPlanNotFound=function(){var t,e;return this.newPlan()?this.oldPlanNotFound():(e=this.oldPlan()?"Could not find "+this.options.humanizedTarget+" in response":"Could not match "+this.options.humanizedTarget+" in current page and response",this.options.inspectResponse&&(t={label:"Open response",callback:this.options.inspectResponse}),up.fail([e+" (tried %o)",this.candidates],{action:t}))},n.prototype.oldPlanNotFound=function(){var t;return t=this.options.layer,"auto"===t&&(t="page, modal or popup"),up.fail("Could not find "+this.options.humanizedTarget+" in current "+t+" (tried %o)",this.candidates)},n}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.ExtractPlan=function(){function r(e,r){this.addHungrySteps=n(this.addHungrySteps,this),this.parseSteps=n(this.parseSteps,this),this.selector=n(this.selector,this),this.resolveNesting=n(this.resolveNesting,this),this.addSteps=n(this.addSteps,this),this.matchExists=n(this.matchExists,this),this.newExists=n(this.newExists,this),this.oldExists=n(this.oldExists,this),this.findNew=n(this.findNew,this),this.findOld=n(this.findOld,this);var i;this.reveal=r.reveal,this.origin=r.origin,this.hungry=r.hungry,this.transition=r.transition,this.response=r.response,this.oldLayer=r.layer,i=t.resolveSelector(e,this.origin),this.parseSteps(i)}return r.prototype.findOld=function(){return e.each(this.steps,function(t){return function(e){return e.oldElement=up.fragment.first(e.selector,{layer:t.oldLayer})}}(this))},r.prototype.findNew=function(){return e.each(this.steps,function(t){return function(e){return e.newElement=t.response.first(e.selector)}}(this))},r.prototype.oldExists=function(){return this.findOld(),e.every(this.steps,function(t){return t.oldElement})},r.prototype.newExists=function(){return this.findNew(),e.every(this.steps,function(t){return t.newElement})},r.prototype.matchExists=function(){return this.oldExists()&&this.newExists()},r.prototype.addSteps=function(t){return this.steps=this.steps.concat(t)},r.prototype.resolveNesting=function(){var t;if(!(this.steps.length<2))return t=e.copy(this.steps),t=e.uniqBy(t,function(t){return t.oldElement}),t=e.filter(t,function(){return function(n,r){return e.every(t,function(t,e){var i,o;return e===r?!0:(i=n.oldElement,o=t.oldElement,t.pseudoClass||!o.contains(i))})}}(this)),t[0].reveal=this.steps[0].reveal,this.steps=t},r.prototype.selector=function(){return e.map(this.steps,"expression").join(", ")},r.prototype.parseSteps=function(t){var n,r;return n=/\ *,\ */,this.steps=[],r=t.split(n),e.each(r,function(t){return function(e,n){var r,i,o,u;return i=e.match(/^(.+?)(?:\:(before|after))?$/),i||up.fail('Could not parse selector literal "%s"',e),u=i[1],"html"===u&&(u="body"),o=i[2],r=0===n?t.reveal:!1,t.steps.push({expression:e,selector:u,pseudoClass:o,transition:t.transition,origin:t.origin,reveal:r})}}(this))},r.prototype.addHungrySteps=function(){var e,n,r,i,o,u,s,a,l;if(r=[],this.hungry)for(e=t.all(up.radio.hungrySelector()),l=null!=(s=up.radio.config.hungryTransition)?s:this.transition,i=0,o=e.length;o>i;i++)n=e[i],a=t.toSelector(n),(u=this.response.first(a))&&r.push({selector:a,oldElement:n,newElement:u,transition:l,reveal:!1,origin:null});return this.addSteps(r)},r}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.FieldObserver=function(){function r(e,r,i){this.callback=i,this.check=n(this.check,this),this.readFieldValues=n(this.readFieldValues,this),this.requestCallback=n(this.requestCallback,this),this.isNewValues=n(this.isNewValues,this),this.scheduleValues=n(this.scheduleValues,this),this.scheduleTimer=n(this.scheduleTimer,this),this.cancelTimer=n(this.cancelTimer,this),this.stop=n(this.stop,this),this.start=n(this.start,this),this.fields=t.list(e),this.delay=r.delay,this.batch=r.batch}return r.prototype.start=function(){return this.scheduledValues=null,this.processedValues=this.readFieldValues(),this.currentTimer=void 0,this.callbackRunning=!1,this.unbind=up.on(this.fields,"input change",this.check)},r.prototype.stop=function(){return this.unbind(),this.cancelTimer()},r.prototype.cancelTimer=function(){return clearTimeout(this.currentTimer),this.currentTimer=void 0},r.prototype.scheduleTimer=function(){return this.cancelTimer(),this.currentTimer=e.timer(this.delay,function(t){return function(){return t.currentTimer=void 0,t.requestCallback()}}(this))},r.prototype.scheduleValues=function(t){return this.scheduledValues=t,this.scheduleTimer()},r.prototype.isNewValues=function(t){return!e.isEqual(t,this.processedValues)&&!e.isEqual(this.scheduledValues,t)},r.prototype.requestCallback=function(){var t,n,r,i,o;if(null!==this.scheduledValues&&!this.currentTimer&&!this.callbackRunning){if(r=this.changedValues(this.processedValues,this.scheduledValues),this.processedValues=this.scheduledValues,this.scheduledValues=null,this.callbackRunning=!0,t=[],this.batch)t.push(this.callback(r));else for(i in r)o=r[i],t.push(this.callback(o,i));return n=Promise.all(t),e.always(n,function(t){return function(){return t.callbackRunning=!1,t.requestCallback()}}(this))}},r.prototype.changedValues=function(t,n){var r,i,o,u,s,a,l;for(r={},u=Object.keys(t),u=u.concat(Object.keys(n)),u=e.uniq(u),i=0,s=u.length;s>i;i++)o=u[i],l=t[o],a=n[o],e.isEqual(l,a)||(r[o]=a);return r},r.prototype.readFieldValues=function(){return up.Params.fromFields(this.fields).toObject()},r.prototype.check=function(){var t;return t=this.readFieldValues(),this.isNewValues(t)?this.scheduleValues(t):void 0},r}()}.call(this),function(){}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}},r=[].slice;e=up.util,t=up.element,up.FollowVariant=function(){function i(t,r){this.matchesLink=n(this.matchesLink,this),this.followLink=n(this.followLink,this),this.fullSelector=n(this.fullSelector,this),this.onMousedown=n(this.onMousedown,this),this.onClick=n(this.onClick,this),this.followNow=r.follow,this.preloadLink=r.preload,this.selectors=e.splitValues(t,",")}return i.prototype.onClick=function(e,n){return up.link.shouldProcessEvent(e,n)?t.matches(n,"[up-instant]")&&n.upInstantSupported?(up.event.halt(e),void(n.upInstantSupported=!1)):(up.event.consumeAction(e),this.followLink(n)):up.link.allowDefault(e)},i.prototype.onMousedown=function(t,e){return up.link.shouldProcessEvent(t,e)?(e.upInstantSupported=!0,up.event.consumeAction(t),this.followLink(e)):void 0},i.prototype.fullSelector=function(t){var e;return null==t&&(t=""),e=[],this.selectors.forEach(function(n){var r,i,o,u,s;for(o=["a","[up-href]"],u=[],r=0,i=o.length;i>r;r++)s=o[r],u.push(e.push(""+s+n+t));return u}),e.join(", ")},i.prototype.registerEvents=function(){return up.on("click",this.fullSelector(),function(t){return function(){var n;return n=1<=arguments.length?r.call(arguments,0):[],e.muteRejection(t.onClick.apply(t,n))}}(this)),up.on("mousedown",this.fullSelector("[up-instant]"),function(t){return function(){var n;return n=1<=arguments.length?r.call(arguments,0):[],e.muteRejection(t.onMousedown.apply(t,n))}}(this))},i.prototype.followLink=function(t,n){var r;return null==n&&(n={}),r=up.event.whenEmitted("up:link:follow",{log:"Following link",target:t}),r=r.then(function(e){return function(){return n.preload||up.feedback.start(t),e.followNow(t,n)}}(this)),n.preload||e.always(r,function(){return up.feedback.stop(t)}),r},i.prototype.matchesLink=function(e){return t.matches(e,this.fullSelector())},i}()}.call(this),function(){var t,e;e=up.util,t=up.element,up.HtmlParser=function(){function n(e){this.html=e,this.wrapNoscriptInHtml(),this.parsedDoc=t.createDocumentFromHtml(this.html)}return n.prototype.title=function(){var t;return null!=(t=this.parsedDoc.querySelector("head title"))?t.textContent:void 0},n.prototype.first=function(e){return t.first(this.parsedDoc,e)},n.prototype.prepareForInsertion=function(t){return this.unwrapNoscriptInElement(t)},n.prototype.wrapNoscriptInHtml=function(){var t;return t=/<noscript[^>]*>((.|\s)*?)<\/noscript>/gi,this.html=this.html.replace(t,function(t){return function(n,r){return t.didWrapNoscript=!0,'<div class="up-noscript" data-html="'+e.escapeHtml(r)+'"></div>'}}(this))},n.prototype.unwrapNoscriptInElement=function(t){var e,n,r,i,o,u,s;if(this.didWrapNoscript){for(s=t.querySelectorAll(".up-noscript"),i=[],e=0,n=s.length;n>e;e++)u=s[e],o=u.getAttribute("data-html"),r=document.createElement("noscript"),r.textContent=o,i.push(u.parentNode.replaceChild(r,u));return i}},n}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.MotionController=function(){function r(t){this.reset=n(this.reset,this),this.whileForwardingFinishEvent=n(this.whileForwardingFinishEvent,this),this.unmarkCluster=n(this.unmarkCluster,this),this.markCluster=n(this.markCluster,this),this.whenElementFinished=n(this.whenElementFinished,this),this.emitFinishEvent=n(this.emitFinishEvent,this),this.finishOneElement=n(this.finishOneElement,this),this.isActive=n(this.isActive,this),this.expandFinishRequest=n(this.expandFinishRequest,this),this.finish=n(this.finish,this),this.startFunction=n(this.startFunction,this),this.activeClass="up-"+t,this.dataKey="up-"+t+"-finished",this.selector="."+this.activeClass,this.finishEvent="up:"+t+":finish",this.finishCount=0,this.clusterCount=0}return r.prototype.startFunction=function(n,r,i){var o,u;return null==i&&(i={}),n=t.list(n),o=function(){return e.muteRejection(r())},i.trackMotion=null!=(u=i.trackMotion)?u:up.motion.isEnabled(),i.trackMotion===!1?e.microtask(o):(i.trackMotion=!1,this.finish(n).then(function(t){return function(){var e;return e=t.whileForwardingFinishEvent(n,o),e=e.then(function(){return t.unmarkCluster(n)}),t.markCluster(n,e),e}}(this)))},r.prototype.startMotion=function(t,e,n){var r,i,o,u;return null==n&&(n={}),o=function(){return e.start()},r=function(){return e.finish()},u=up.on(t,this.finishEvent,r),i=this.startFunction(t,o,n),i=i.then(u)},r.prototype.finish=function(t){var n;return this.finishCount++,0!==this.clusterCount&&up.motion.isEnabled()?(t=this.expandFinishRequest(t),n=e.map(t,this.finishOneElement),Promise.all(n)):Promise.resolve()},r.prototype.expandFinishRequest=function(n){return n?e.flatMap(n,function(e){return function(n){return t.list(t.closest(n,e.selector),t.all(n,e.selector))}}(this)):t.all(this.selector)},r.prototype.isActive=function(t){return t.classList.contains(this.activeClass)},r.prototype.finishOneElement=function(t){return this.emitFinishEvent(t),this.whenElementFinished(t)},r.prototype.emitFinishEvent=function(t,n){return null==n&&(n={}),n=e.merge({target:t,log:!1},n),up.emit(this.finishEvent,n)},r.prototype.whenElementFinished=function(t){return t[this.dataKey]||Promise.resolve()},r.prototype.markCluster=function(t,e){var n,r,i,o;for(this.clusterCount++,o=[],r=0,i=t.length;i>r;r++)n=t[r],n.classList.add(this.activeClass),o.push(n[this.dataKey]=e);return o},r.prototype.unmarkCluster=function(t){var e,n,r,i;for(this.clusterCount--,i=[],n=0,r=t.length;r>n;n++)e=t[n],e.classList.remove(this.activeClass),i.push(delete e[this.dataKey]);return i},r.prototype.whileForwardingFinishEvent=function(t,n){var r,i;return t.length<2?n():(r=function(n){return function(r){return r.forwarded?void 0:e.each(t,function(t){return t!==r.target&&n.isActive(t)?n.emitFinishEvent(t,{forwarded:!0}):void 0})}}(this),i=up.on(t,this.finishEvent,r),n().then(i))},r.prototype.reset=function(){return this.finish().then(function(t){return function(){return t.finishCount=0,t.clusterCount=0}}(this))},r}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.Params=function(){function r(t){this.arrayEntryToQuery=n(this.arrayEntryToQuery,this),this.clear(),this.addAll(t)}return r.prototype.clear=function(){return this.entries=[]},r.prototype[""+e.copy.key]=function(){return new up.Params(this)},r.prototype.toObject=function(){var t,n,r,i,o,u,s;for(o={},u=this.entries,n=0,r=u.length;r>n;n++)t=u[n],i=t.name,s=t.value,e.isBasicObjectProperty(i)||(this.isArrayKey(i)?(o[i]||(o[i]=[]),o[i].push(s)):o[i]=s);return o},r.prototype.toArray=function(){return this.entries},r.prototype.toFormData=function(){var t,e,n,r,i;for(e=new FormData,i=this.entries,n=0,r=i.length;r>n;n++)t=i[n],e.append(t.name,t.value);return e},r.prototype.toQuery=function(){var t;return t=e.map(this.entries,this.arrayEntryToQuery),t=e.compact(t),t.join("&")},r.prototype.arrayEntryToQuery=function(t){var n,r;return r=t.value,this.isPrimitiveValue(r)?(n=encodeURIComponent(t.name),e.isGiven(r)&&(n+="=",n+=encodeURIComponent(r)),n):void 0},r.prototype.isPrimitiveValue=function(t){return e.isMissing(t)||e.isString(t)||e.isNumber(t)||e.isBoolean(t)},r.prototype.toURL=function(t){var n,r;return n=[t,this.toQuery()],n=e.filter(n,e.isPresent),r=e.contains(t,"?")?"&":"?",n.join(r)},r.prototype.add=function(t,e){return this.entries.push({name:t,value:e})},r.prototype.addAll=function(t){var n,r;return e.isMissing(t)||(t instanceof this.constructor?(n=this.entries).push.apply(n,t.entries):e.isArray(t)?(r=this.entries).push.apply(r,t):e.isString(t)?this.addAllFromQuery(t):e.isFormData(t)?this.addAllFromFormData(t):e.isObject(t)?this.addAllFromObject(t):up.fail("Unsupport params type: %o",t)),this},r.prototype.addAllFromObject=function(t){var n,r,i,o,u;r=[];for(n in t)i=t[n],u=e.isArray(i)?i:[i],r.push(function(){var t,e,r;for(r=[],t=0,e=u.length;e>t;t++)o=u[t],r.push(this.add(n,o));return r}.call(this));return r},r.prototype.addAllFromQuery=function(t){var n,r,i,o,u,s,a,l;for(u=t.split("&"),a=[],n=0,r=u.length;r>n;n++)o=u[n],o?(s=o.split("="),i=s[0],l=s[1],i=decodeURIComponent(i),l=e.isGiven(l)?decodeURIComponent(l):null,a.push(this.add(i,l))):a.push(void 0);return a},r.prototype.addAllFromFormData=function(t){return e.eachIterator(t.entries(),function(t){return function(e){return t.add.apply(t,e)}}(this))},r.prototype.set=function(t,e){return this["delete"](t),this.add(t,e)},r.prototype["delete"]=function(t){return this.entries=e.reject(this.entries,this.matchEntryFn(t))},r.prototype.matchEntryFn=function(t){return function(e){return e.name===t}},r.prototype.get=function(t){return this.isArrayKey(t)?this.getAll(t):this.getFirst(t)},r.prototype.getFirst=function(t){var n;return n=e.find(this.entries,this.matchEntryFn(t)),null!=n?n.value:void 0},r.prototype.getAll=function(t){var n;return this.isArrayKey(t)?this.getAll(t):(n=e.map(this.entries,this.matchEntryFn(t)),e.map(n,"value"))},r.prototype.isArrayKey=function(t){return e.endsWith(t,"[]")},r.prototype[""+e.isBlank.key]=function(){return 0===this.entries.length},r.fromForm=function(e){var n;return(e=t.get(e))?(n=up.form.submissionFields(e),this.fromFields(n)):void 0},r.fromFields=function(t){var n,r,i,o,u;for(o=new this,u=e.wrapList(t),r=0,i=u.length;i>r;r++)n=u[r],o.addField(n);return o},r.prototype.addField=function(e){var n,r,i,o,u,s,a,l,c,p,h,f,d,m;if(l=new this.constructor,(e=t.get(e))&&(s=e.name)&&!e.disabled){if(d=e.tagName,m=e.type,"SELECT"===d){for(c=e.querySelectorAll("option"),h=[],r=0,o=c.length;o>r;r++)a=c[r],h.push(a.selected?this.add(s,a.value):void 0);return h}if("checkbox"!==m&&"radio"!==m){if("file"===m){for(p=e.files,f=[],i=0,u=p.length;u>i;i++)n=p[i],f.push(this.add(s,n));return f}return this.add(s,e.value)}if(e.checked)return this.add(s,e.value)}},r.prototype[""+e.isEqual.key]=function(t){return t&&this.constructor===t.constructor&&e.isEqual(this.entries,t.entries)},r.fromURL=function(t){var n,r,i;return n=new this,i=e.parseUrl(t),(r=i.search)&&(r=r.replace(/^\?/,""),n.addAll(r)),n},r.stripURL=function(t){return e.normalizeUrl(t,{search:!1})},r.wrap=function(t){return e.wrapValue(t,this)},r}()}.call(this),function(){var t=up.util;up.Rect=function(e){t.assign(this,t.only(e,"left","top","width","height"))},up.Rect.prototype={get bottom(){return this.top+this.height},get right(){return this.left+this.width}},up.Rect.fromElement=function(t){return new up.Rect(t.getBoundingClientRect())}}(),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;e=up.util,t=up.element,up.Request=function(i){function o(t){this.cacheKey=n(this.cacheKey,this),this.isCachable=n(this.isCachable,this),this.buildResponse=n(this.buildResponse,this),this.isCrossDomain=n(this.isCrossDomain,this),this.csrfToken=n(this.csrfToken,this),this.navigate=n(this.navigate,this),this.send=n(this.send,this),this.isSafe=n(this.isSafe,this),this.transferSearchToParams=n(this.transferSearchToParams,this),this.transferParamsToUrl=n(this.transferParamsToUrl,this),this.extractHashFromUrl=n(this.extractHashFromUrl,this),this.normalize=n(this.normalize,this),up.legacy.fixKey(t,"data","params"),o.__super__.constructor.call(this,t),this.normalize()}return r(o,i),o.prototype.fields=function(){return["method","url","params","target","failTarget","headers","timeout","preload","cache"]},o.prototype.normalize=function(){return this.params=new up.Params(this.params),this.method=e.normalizeMethod(this.method),this.headers||(this.headers={}),this.extractHashFromUrl(),e.methodAllowsPayload(this.method)?void 0:this.transferParamsToUrl()},o.prototype.extractHashFromUrl=function(){var t;return t=e.parseUrl(this.url),this.hash=e.presence(t.hash),this.url=e.normalizeUrl(t,{hash:!1})},o.prototype.transferParamsToUrl=function(){return e.isBlank(this.params)?void 0:(this.url=this.params.toURL(this.url),this.params.clear())},o.prototype.transferSearchToParams=function(){var t;return t=up.Params.fromURL(this.url),e.isBlank(t)?void 0:(this.params.addAll(t),this.url=e.normalizeUrl(this.url,{search:!1}))},o.prototype.isSafe=function(){return up.proxy.isSafeMethod(this.method)},o.prototype.send=function(){return new Promise(function(t){return function(n,r){var i,o,u,s,a,l,c,p,h,f,d;l=new XMLHttpRequest,c=e.copy(t.headers),d=t.url,h=e.copy(t.params),p=up.proxy.wrapMethod(t.method,h),f=null,e.isBlank(h)||(delete c["Content-Type"],f=h.toFormData()),u=up.protocol.config,c[u.versionHeader]=up.version,t.target&&(c[u.targetHeader]=t.target),t.failTarget&&(c[u.failTargetHeader]=t.failTarget),t.isCrossDomain()||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),(i=t.csrfToken())&&(c[u.csrfHeader]=i),l.open(p,d);for(o in c)a=c[o],l.setRequestHeader(o,a);return s=function(){var e;return e=t.buildResponse(l),e.isSuccess()?n(e):r(e)},l.onload=s,l.onerror=s,l.ontimeout=s,t.timeout&&(l.timeout=t.timeout),l.send(f)}}(this))},o.prototype.navigate=function(){var n,r,i,o,u;return this.transferSearchToParams(),o=t.affix(document.body,"form.up-page-loader"),n=function(e){return t.affix(o,"input[type=hidden]",e)},"GET"===this.method?u="GET":(n({name:up.protocol.config.methodParam,value:this.method}),u="POST"),t.setAttrs(o,{method:u,action:this.url}),(r=up.protocol.csrfParam())&&(i=this.csrfToken())&&n({name:r,value:i}),e.each(this.params.toArray(),n),t.hide(o),up.browser.submitForm(o)},o.prototype.csrfToken=function(){return this.isSafe()||this.isCrossDomain()?void 0:up.protocol.csrfToken()},o.prototype.isCrossDomain=function(){return e.isCrossDomain(this.url)},o.prototype.buildResponse=function(t){var e,n,r;return n={method:this.method,url:this.url,text:t.responseText,status:t.status,request:this,xhr:t},(r=up.protocol.locationFromXhr(t))&&(n.url=r,n.method=null!=(e=up.protocol.methodFromXhr(t))?e:"GET"),n.title=up.protocol.titleFromXhr(t),new up.Response(n)},o.prototype.isCachable=function(){return this.isSafe()&&!e.isFormData(this.params)},o.prototype.cacheKey=function(){return[this.url,this.method,this.params.toQuery(),this.target].join("|")},o.wrap=function(t){return e.wrapValue(t,this)},o}(up.Record)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t=up.util,up.Response=function(r){function i(t){this.getHeader=e(this.getHeader,this),this.isFatalError=e(this.isFatalError,this),this.isError=e(this.isError,this),this.isSuccess=e(this.isSuccess,this),i.__super__.constructor.call(this,t)}return n(i,r),i.prototype.fields=function(){return["method","url","text","status","request","xhr","title"]},i.prototype.isSuccess=function(){return this.status&&this.status>=200&&this.status<=299},i.prototype.isError=function(){return!this.isSuccess()},i.prototype.isFatalError=function(){return this.isError()&&t.isBlank(this.text)},i.prototype.getHeader=function(t){return this.xhr.getResponseHeader(t)},i}(up.Record)}.call(this),function(){var t;t=up.element,up.RevealMotion=function(){function e(t,e){var n,r,i,o,u,s,a,l,c,p,h,f;this.element=t,null==e&&(e={}),n=up.viewport.config,this.viewport=null!=(r=e.viewport)?r:up.viewport.closest(this.element),up.legacy.fixKey(n,"snap","revealSnap"),f=n.revealSnap,this.snap=null!=(i=null!=(o=e.snap)?o:e.revealSnap)?i:f,this.snap===!1?this.snap=0:this.snap===!0&&(this.snap=f),this.padding=null!=(u=null!=(s=e.padding)?s:e.revealPadding)?u:n.revealPadding,this.top=e.top,this.fixedTop=null!=(a=e.fixedTop)?a:n.fixedTop,this.fixedBottom=null!=(l=e.fixedBottom)?l:n.fixedBottom,this.speed=null!=(c=null!=(p=e.speed)?p:e.scrollSpeed)?c:n.scrollSpeed,this.behavior=null!=(h=e.behavior)?h:e.scrollBehavior}return e.prototype.start=function(){var t,e,n,r,i;return e=up.Rect.fromElement(this.element),i=this.getViewportRect(this.viewport),this.addPadding(e),this.substractObstructions(i),i.height<=0?Promise.reject(new Error("Viewport has no visible area")):(r=this.viewport.scrollTop,n=r,this.top||e.height>i.height?(t=e.top-i.top,n+=t):e.top<i.top?n-=i.top-e.top:e.bottom>i.bottom&&(n+=e.bottom-i.bottom),n<this.snap&&e.top<.5*i.height&&(n=0),n!==r?this.scrollTo(n):Promise.resolve())},e.prototype.scrollTo=function(t){var e;return e={speed:this.speed,behavior:this.behavior},this.scrollMotion=new up.ScrollMotion(this.viewport,t,e),this.scrollMotion.start()},e.prototype.getViewportRect=function(){return up.viewport.isRoot(this.viewport)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.viewport)},e.prototype.addPadding=function(t){return t.top-=this.padding,t.height+=2*this.padding},e.prototype.substractObstructions=function(e){var n,r,i,o,u,s,a,l,c,p;for(l=t.list.apply(t,this.fixedTop),r=0,o=l.length;o>r;r++)s=l[r],a=up.Rect.fromElement(s),n=a.bottom-e.top,n>0&&(e.top+=n,e.height-=n);for(c=t.list.apply(t,this.fixedBottom),p=[],i=0,u=c.length;u>i;i++)s=c[i],a=up.Rect.fromElement(s),n=e.bottom-a.top,p.push(n>0?e.height-=n:void 0);return p},e.prototype.finish=function(){var t;return null!=(t=this.scrollMotion)?t.finish():void 0},e}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.ScrollMotion=function(){function n(t,n,i){var o,u,s,a;this.scrollable=t,this.targetTop=n,null==i&&(i={}),this.finish=e(this.finish,this),this.cancel=e(this.cancel,this),this.animationFrame=e(this.animationFrame,this),this.start=e(this.start,this),this.behavior=null!=(o=null!=(u=i.behavior)?u:i.scrollBehavior)?o:"auto",this.speed=(null!=(s=null!=(a=i.speed)?a:i.scrollSpeed)?s:up.viewport.config.scrollSpeed)*r}var r;return r=.065,n.prototype.start=function(){return new Promise(function(t){return function(e,n){return t.resolve=e,t.reject=n,"smooth"===t.behavior&&up.motion.isEnabled()?t.startAnimation():t.finish()}}(this))},n.prototype.startAnimation=function(){return this.startTime=Date.now(),this.startTop=this.scrollable.scrollTop,this.topDiff=this.targetTop-this.startTop,this.duration=Math.sqrt(Math.abs(this.topDiff))/this.speed,requestAnimationFrame(this.animationFrame)},n.prototype.animationFrame=function(){var e,n,r;if(!this.settled)return this.frameTop&&Math.abs(this.frameTop-this.scrollable.scrollTop)>1.5&&this.cancel("Animation aborted due to user intervention"),e=Date.now(),n=e-this.startTime,r=Math.min(n/this.duration,1),this.frameTop=this.startTop+t.simpleEase(r)*this.topDiff,Math.abs(this.targetTop-this.frameTop)<.3?this.finish():(this.scrollable.scrollTop=this.frameTop,requestAnimationFrame(this.animationFrame))},n.prototype.cancel=function(t){return this.settled=!0,this.reject(new Error(t))},n.prototype.finish=function(){return this.settled=!0,this.scrollable.scrollTop=this.targetTop,this.resolve()},n}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};up.store||(up.store={}),t=up.util,up.store.Memory=function(){function n(){this.values=e(this.values,this),this.keys=e(this.keys,this),this.remove=e(this.remove,this),this.set=e(this.set,this),this.get=e(this.get,this),this.clear=e(this.clear,this),this.clear()}return n.prototype.clear=function(){return this.data={}},n.prototype.get=function(t){return this.data[t]},n.prototype.set=function(t,e){return this.data[t]=e},n.prototype.remove=function(t){return delete this.data[t]},n.prototype.keys=function(){return Object.keys(this.data)},n.prototype.values=function(){return t.values(this.data)},n}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t=up.util,up.store.Session=function(t){function r(t){this.saveToSessionStorage=e(this.saveToSessionStorage,this),this.loadFromSessionStorage=e(this.loadFromSessionStorage,this),this.remove=e(this.remove,this),this.set=e(this.set,this),this.clear=e(this.clear,this),this.rootKey=t,this.loadFromSessionStorage()}return n(r,t),r.prototype.clear=function(){return r.__super__.clear.call(this),this.saveToSessionStorage()},r.prototype.set=function(t,e){return r.__super__.set.call(this,t,e),this.saveToSessionStorage()},r.prototype.remove=function(t){return r.__super__.remove.call(this,t),this.saveToSessionStorage()},r.prototype.loadFromSessionStorage=function(){var t;try{(t="undefined"!=typeof sessionStorage&&null!==sessionStorage?sessionStorage.getItem(this.rootKey):void 0)&&(this.data=JSON.parse(t))}catch(e){}return this.data||(this.data={})},r.prototype.saveToSessionStorage=function(){var t;t=JSON.stringify(this.data);try{return"undefined"!=typeof sessionStorage&&null!==sessionStorage?sessionStorage.setItem(this.rootKey,t):void 0}catch(e){}},r}(up.store.Memory)}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.Tether=function(){function r(e){this.sync=n(this.sync,this),this.scheduleSync=n(this.scheduleSync,this);var r;this.anchor=e.anchor,r=e.position.split("-"),this.position=r[0],this.align=r[1],this.align?up.legacy.warn("The position value %o is deprecated. Use %o instead.",e.position,this.describeConstraints()):this.align=e.align,this.alignAxis="top"===this.position||"bottom"===this.position?"horizontal":"vertical",this.viewport=up.viewport.closest(this.anchor),this.parent=this.viewport===t.root()?document.body:this.viewport,this.syncOnScroll=!this.viewport.contains(this.anchor.offsetParent),this.root=t.affix(this.parent,".up-bounds"),this.setBoundsOffset(0,0),this.changeEventSubscription("on")}return r.prototype.destroy=function(){return t.remove(this.root),this.changeEventSubscription("off")},r.prototype.changeEventSubscription=function(t){return up[t](window,"resize",this.scheduleSync),this.syncOnScroll?up[t](this.viewport,"scroll",this.scheduleSync):void 0},r.prototype.scheduleSync=function(){return clearTimeout(this.syncTimer),this.syncTimer=e.task(this.sync)},r.prototype.sync=function(){var t,n,r,i;switch(r=this.root.getBoundingClientRect(),t=this.anchor.getBoundingClientRect(),n=void 0,i=void 0,this.alignAxis){case"horizontal":i=function(){switch(this.position){case"top":return t.top-r.height;case"bottom":return t.top+t.height}}.call(this),n=function(){switch(this.align){case"left":return t.left;case"center":return t.left+.5*(t.width-r.width);case"right":return t.left+t.width-r.width}}.call(this);break;case"vertical":i=function(){switch(this.align){case"top":return t.top;case"center":return t.top+.5*(t.height-r.height);case"bottom":return t.top+t.height-r.height}}.call(this),n=function(){switch(this.position){case"left":return t.left-r.width;case"right":return t.left+t.width}}.call(this)}return e.isDefined(n)||e.isDefined(i)?this.moveTo(n,i):up.fail("Invalid tether constraints: %o",this.describeConstraints())},r.prototype.describeConstraints=function(){return{position:this.position,align:this.align}},r.prototype.moveTo=function(t,e){var n;return n=this.root.getBoundingClientRect(),this.setBoundsOffset(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)},r.prototype.setBoundsOffset=function(e,n){return this.offsetLeft=e,this.offsetTop=n,t.setStyle(this.root,{left:e,top:n})},r}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.UrlSet=function(){function n(n,r){this.urls=n,null==r&&(r={}),this[""+t.isEqual.key]=e(this[""+t.isEqual.key],this),this.matchesAny=e(this.matchesAny,this),this.doesMatchPattern=e(this.doesMatchPattern,this),this.doesMatchFully=e(this.doesMatchFully,this),this.matches=e(this.matches,this),this.normalizeUrl=r.normalizeUrl||t.normalizeUrl,this.urls=t.map(this.urls,this.normalizeUrl),this.urls=t.compact(this.urls)}return n.prototype.matches=function(t){return t.indexOf("*")>=0?this.doesMatchPattern(t):this.doesMatchFully(t)},n.prototype.doesMatchFully=function(e){return t.contains(this.urls,e)},n.prototype.doesMatchPattern=function(e){var n;return n="__ASTERISK__",e=e.replace(/\*/g,n),e=t.escapeRegexp(e),e=e.replace(new RegExp(n,"g"),".*?"),e=new RegExp("^"+e+"$"),t.find(this.urls,function(t){return e.test(t)})},n.prototype.matchesAny=function(e){return t.find(e,this.matches)},n.prototype[""+t.isEqual.key]=function(e){return t.isEqual(this.urls,null!=e?e.urls:void 0)
3
- },n}()}.call(this),function(){up.framework=function(){var t,e,n,r;return r=up.util,n=!0,e=function(){return up.emit("up:framework:reset",{log:"Resetting framework"})},t=function(){return up.browser.isSupported()?(up.emit("up:framework:booted",{log:"Framework booted"}),n=!1,document.addEventListener("DOMContentLoaded",function(){return up.emit("up:app:boot",{log:"Booting user application"}),up.emit("up:app:booted",{log:"User application booted"})})):"function"==typeof console.log?console.log("Unpoly doesn't support this browser. Framework was not booted."):void 0},{reset:e,boot:t,isBooting:function(){return n}}}()}.call(this),function(){var t=[].slice;up.event=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g;return d=up.util,u=up.element,f=function(){var t,e,n,r,i;for(r=[window,document,document.documentElement,document.body],i=[],e=0,n=r.length;n>e;e++)t=r[e],i.push(up.EventListener.unbindNonDefault(t));return i},n=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],r(e)},e=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],r(e,{jQuery:!0})},r=function(t,e){return up.browser.isSupported()?up.EventListener.bind(t,e):function(){}},m=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],up.EventListener.unbind(e)},s=function(){var e,n,r,o,s,a;return e=1<=arguments.length?t.call(arguments,0):[],e[0].addEventListener?s=e.shift():d.isJQuery(e[0])&&(s=u.get(e.shift())),r=e[0],o=e[1]||{},(a=d.pluckKey(o,"target"))&&(s=a),null==s&&(s=document),l(r,o),n=i(r,o),s.dispatchEvent(n),n},i=function(t,e){var n;return n=document.createEvent("Event"),n.initEvent(t,!0,!0),d.assign(n,e),up.browser.isIE11()&&(n.preventDefault=function(){return Object.defineProperty(n,"defaultPrevented",{get:function(){return!0}})}),n},l=function(e,n){var r,i,o;if(up.log.isEnabled())return r=d.pluckKey(n,"log"),d.isArray(r)?(o=r,r=o[0],i=2<=o.length?t.call(o,1):[]):i=[],d.isString(r)?d.isPresent(n)?up.puts.apply(up,[r+" (%s (%o))"].concat(t.call(i),[e],[n])):up.puts.apply(up,[r+" (%s)"].concat(t.call(i),[e])):r===!0?d.isPresent(n)?up.puts("Event %s (%o)",e,n):up.puts("Event %s",e):void 0},c=function(){var e,n;return e=1<=arguments.length?t.call(arguments,0):[],n=s.apply(null,e),!n.defaultPrevented},g=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],new Promise(function(t,n){return c.apply(null,e)?t():n(new Error("Event "+e[0]+" was prevented"))})},p=function(t){return n("keydown","body",function(e){return d.escapePressed(e)?t(e):void 0})},a=function(t){return t.stopImmediatePropagation(),t.preventDefault()},o=function(t){return a(t),"up:action:consumed"!==t.type?s(t.target,"up:action:consumed",{log:!1}):void 0},h=function(t){return"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t)},n("up:framework:reset",f),{on:n,$on:e,off:m,emit:s,nobodyPrevents:c,whenEmitted:g,onEscape:p,halt:a,consumeAction:o,onReady:h}}(),up.on=up.event.on,up.$on=up.event.$on,up.off=up.event.off,up.$off=up.event.off,up.emit=up.event.emit,up.legacy.renamedModule("bus","event")}.call(this),function(){}.call(this),function(){up.protocol=function(){var t,e,n,r,i,o,u,s,a,l;return l=up.util,r=up.element,o=function(e){return e.getResponseHeader(t.locationHeader)||e.responseURL},a=function(e){return e.getResponseHeader(t.titleHeader)},u=function(e){var n;return(n=e.getResponseHeader(t.methodHeader))?l.normalizeMethod(n):void 0},i=l.memoize(function(){var e;return e=up.browser.popCookie(t.methodCookie),(e||"get").toLowerCase()}),up.on("up:framework:booted",i),t=new up.Config({versionHeader:"X-Up-Version",targetHeader:"X-Up-Target",failTargetHeader:"X-Up-Fail-Target",locationHeader:"X-Up-Location",validateHeader:"X-Up-Validate",titleHeader:"X-Up-Title",methodHeader:"X-Up-Method",methodCookie:"_up_method",methodParam:"_method",csrfParam:function(){return r.metaContent("csrf-param")},csrfToken:function(){return r.metaContent("csrf-token")},csrfHeader:"X-CSRF-Token"}),e=function(){return l.evalOption(t.csrfParam)},n=function(){return l.evalOption(t.csrfToken)},s=function(){return t.reset()},up.on("up:framework:reset",s),{config:t,reset:s,locationFromXhr:o,titleFromXhr:a,methodFromXhr:u,csrfParam:e,csrfToken:n,initialRequestMethod:i}}()}.call(this),function(){var t=[].slice;up.log=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y,b,w;return b=up.util,n=up.browser,d=new up.store.Session("up.log"),i=new up.Config({prefix:"[UP] ",enabled:d.get("enabled"),collapse:!1,banner:!0}),f=function(){return i.reset()},c=function(t){return""+i.prefix+t},r=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],console[n].apply(console,e)},e=/\%[odisf]/g,y=function(t){var e,n,r,i,o,u,s,a;if(o=200,n="",b.isString(t))s=t.replace(/[\n\r\t ]+/g," "),s=s.replace(/^[\n\r\t ]+/,""),s=s.replace(/[\n\r\t ]$/,""),s='"'+s+'"',n='"';else if(b.isUndefined(t))s="undefined";else if(b.isNumber(t)||b.isFunction(t))s=t.toString();else if(b.isArray(t))s="["+b.map(t,y).join(", ")+"]",n="]";else if(b.isJQuery(t))s="$("+b.map(t,y).join(", ")+")",n=")";else if(b.isElement(t)){for(s="<"+t.tagName.toLowerCase(),u=["id","name","class"],r=0,i=u.length;i>r;r++)e=u[r],(a=t.getAttribute(e))&&(s+=" "+e+'="'+a+'"');s+=">",n=">"}else s=JSON.stringify(t);return s.length>o&&(s=s.substr(0,o)+" \u2026",s+=n),s},g=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],v.apply(null,[b.identity,n].concat(t.call(e)))},v=function(){var n,r,i,o;return r=arguments[0],o=arguments[1],n=3<=arguments.length?t.call(arguments,2):[],b.isBlank(o)?"":(i=0,o.replace(e,function(){var t;return t=n[i],t=r(y(t)),i+=1,t}))},o=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],i.enabled&&n?console.debug.apply(console,[c(n)].concat(t.call(e))):void 0},h=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],i.enabled&&n?console.log.apply(console,[c(n)].concat(t.call(e))):void 0},w=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],n?console.warn.apply(console,[c(n)].concat(t.call(e))):void 0},l=function(){var e,n,r,o;if(o=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],n=e.pop(),!i.enabled||!o)return n();r=i.collapse?"groupCollapsed":"group",console[r].apply(console,[c(o)].concat(t.call(e)));try{return n()}finally{o&&console.groupEnd()}},a=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],n?console.error.apply(console,[c(n)].concat(t.call(e))):void 0},p=function(){var t;if(i.banner)return t=" __ _____ ___ ___ / /_ __\n"+("/ // / _ \\/ _ \\/ _ \\/ / // / "+up.version+"\n")+"\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n",t+=i.enabled?"Call `up.log.disable()` to disable logging for this session.":"Call `up.log.enable()` to enable logging for this session.",console.log(t)},up.on("up:app:boot",p),up.on("up:framework:reset",f),m=function(t){return d.set("enabled",t),i.enabled=t},s=function(){return m(!0)},u=function(){return m(!1)},{puts:h,sprintf:g,sprintfWithFormattedArgs:v,puts:h,debug:o,error:a,warn:w,group:l,config:i,enable:s,disable:u,isEnabled:function(){return i.enabled}}}(),up.puts=up.log.puts,up.warn=up.log.warn}.call(this),function(){var t=[].slice;up.toast=function(){var e,n,r,i,o,u,s,a,l,c;return c=up.util,i=up.element,e=function(t){return"<span class='up-toast-variable'>"+c.escapeHtml(t)+"</span>"},l=new up.Config({element:null}),a=function(){return r(),l.reset()},u=function(n){var r;return c.isArray(n)?(n[0]=c.escapeHtml(n[0]),n=(r=up.log).sprintfWithFormattedArgs.apply(r,[e].concat(t.call(n)))):n=c.escapeHtml(n),n},o=function(){return!!l.element},n=function(t,e){var n,r;return r=l.element.querySelector(".up-toast-actions"),n=i.affix(r,".up-toast-action"),n.innerText=t,n.addEventListener("click",e)},s=function(t,e){var o;return null==e&&(e={}),r(),t=u(t),l.element=i.createFromHtml('<div class="up-toast">\n <div class="up-toast-message">'+t+'</div>\n <div class="up-toast-actions"></div>\n</div>'),(o=e.action||e.inspect)&&n(o.label,o.callback),n("Close",r),document.body.appendChild(l.element)},r=function(){return o()?(i.remove(l.element),l.element=null):void 0},up.on("up:framework:reset",a),{open:s,close:r,reset:a,isOpen:o}}()}.call(this),function(){var t=[].slice;up.syntax=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y;return y=up.util,s=up.element,e={"[up-back]":-100,"[up-drawer]":-200,"[up-dash]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400},o=[],l=[],h=function(){var e,r;return e=1<=arguments.length?t.call(arguments,0):[],r=n(e),a(o,r)},d=function(){var e,n;return e=1<=arguments.length?t.call(arguments,0):[],n=h.apply(null,e),n.jQuery=!0,n},g=function(){var e,r;return e=1<=arguments.length?t.call(arguments,0):[],r=n(e),up.framework.isBooting()&&(r.priority=u(r.selector)||up.fail("Unregistered priority for system macro %o",r.selector)),a(l,r)},m=function(){var e,n;return e=1<=arguments.length?t.call(arguments,0):[],n=g.apply(null,e),n.jQuery=!0,n},u=function(t){var n,r;for(r in e)if(n=e[r],t.indexOf(r)>=0)return n},c=function(t){var e,n,r;return r=t.shift(),e=t.pop(),n=y.extractOptions(t),[r,n,e]},n=function(t){var e,n,r,i;return r=c(t),i=r[0],n=r[1],e=r[2],n=y.options(n,{selector:i,isDefault:up.framework.isBooting(),priority:0,batch:!1,keep:!1,jQuery:!1}),y.assign(e,n)},a=function(t,e){var n,r;for(r=0;(n=t[r])&&n.priority>=e.priority;)r+=1;return t.splice(r,0,e),e},i=function(t,e){var n,r;return r=l.concat(o),n=new up.CompilePass(t,r,e),n.compile()},f=function(t,e){var n;return(n=t.upDestructors)||(n=[],t.upDestructors=n,t.classList.add("up-can-clean")),y.isArray(e)?n.push.apply(n,e):n.push(e)},r=function(t){var e;return e=s.subtree(t,".up-can-clean"),y.each(e,function(t){var e,n,r,i;if(n=y.pluckKey(t,"upDestructors"))for(r=0,i=n.length;i>r;r++)(e=n[r])();return t.classList.remove("up-can-clean")})},p=function(t){var e;return e=s.get(t),s.jsonAttr(e,"up-data")||{}},v=function(){return o=y.filter(o,"isDefault"),l=y.filter(l,"isDefault")},up.on("up:framework:reset",v),{compiler:h,macro:g,$compiler:d,$macro:m,destructor:f,compile:i,clean:r,data:p}}(),up.compiler=up.syntax.compiler,up.$compiler=up.syntax.$compiler,up.destructor=up.syntax.destructor,up.macro=up.syntax.macro,up.$macro=up.syntax.$macro}.call(this),function(){up.history=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h,f,d,m;return m=up.util,r=up.element,e=new up.Config({enabled:!0,popTargets:["body"],restoreScroll:!0}),c=void 0,u=void 0,f=function(){return e.reset(),c=void 0,u=void 0},s=function(t,e){return e||(e={}),e.hash=!0,m.normalizeUrl(t,e)},n=function(t){return s(up.browser.url(),t)},i=function(t){var e;return e={stripTrailingSlash:!0},s(t,e)===n(e)},a=function(t){return u&&(c=u,u=void 0),u=t},h=function(t){return o("replaceState",t)?up.emit("up:history:replaced",{url:t}):void 0},p=function(t,e){return e=m.options(e,{force:!1}),t=s(t),!e.force&&i(t)||!up.event.nobodyPrevents("up:history:push",{url:t,log:"Adding history entry for "+t})?void 0:o("pushState",t)?up.emit("up:history:pushed",{url:t,log:"Advanced to location "+t}):up.emit("up:history:muted",{url:t,log:"Did not advance to "+t+" (history is unavailable)"})},o=function(r,i){var o;return up.browser.canPushState()&&e.enabled?(o=t(),window.history[r](o,"",i),a(n()),!0):!1},t=function(){return{fromUp:!0}},d=function(t){var r,i,o;return(null!=t?t.fromUp:void 0)?(o=n(),up.emit("up:history:restore",{url:o,log:"Restoring location "+o}),r=e.popTargets.join(", "),i=up.replace(r,o,{history:!1,title:!0,reveal:!1,saveScroll:!1,restoreScroll:e.restoreScroll,layer:"page"}),i.then(function(){return o=n(),up.emit("up:history:restored",{url:o,log:"Restored location "+o})})):up.puts("Ignoring a state not pushed by Unpoly (%o)",t)},l=function(t){var e;return a(n()),up.viewport.saveScroll({url:c}),e=t.state,d(e)},up.on("up:app:boot",function(){var t;return up.browser.canPushState()?(t=function(){return up.browser.canControlScrollRestoration()&&(window.history.scrollRestoration="manual"),window.addEventListener("popstate",l),h(n(),{force:!0})},"undefined"!=typeof jasmine&&null!==jasmine?t():setTimeout(t,100)):void 0}),up.macro("a[up-back], [up-href][up-back]",function(t){return m.isPresent(c)?(r.setMissingAttrs(t,{"up-href":c,"up-restore-scroll":""}),t.removeAttribute("up-back"),up.link.makeFollowable(t)):void 0}),up.on("up:framework:reset",f),{config:e,push:p,replace:h,url:n,isUrl:i,previousUrl:function(){return c},normalizeUrl:s}}()}.call(this),function(){var t=[].slice;up.viewport=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y,b,w,k,S,E,T,A,F,C,x,P,O,R,M,j,D,L;return D=up.util,u=up.element,o=new up.Config({duration:0,viewports:[".up-modal-viewport","[up-viewport]","[up-fixed]"],fixedTop:["[up-fixed~=top]"],fixedBottom:["[up-fixed~=bottom]"],anchoredRight:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],revealSnap:50,revealPadding:0,scrollSpeed:1}),m=new up.Cache({size:30,key:up.history.normalizeUrl}),j=new up.MotionController("scrolling"),y=function(){return o.reset(),m.clear(),j.reset()},x=function(t,e,n){var r;return r=new up.ScrollMotion(t,e,n),j.startMotion(t,r,n)},s=function(t){var e;return up.motion.isEnabled()?(e=i(t),j.finish(e)):Promise.resolve()},r=function(){var t;return t=o.anchoredRight.join(","),u.all(t)},g=function(){var e,n,r,i,s,a,l;return r=function(t,e){var n;return n=D.sum(e,function(e){return u.styleNumber(t,e)})||0,n+t.offsetHeight},s=function(t){return r(t,["top","margin-top"])},i=function(t){return r(t,["bottom","margin-bottom"])},l=u.all(o.fixedTop.join(", ")),n=u.all(o.fixedBottom.join(", ")),a=D.map(l,s),e=D.map(n,i),{top:Math.max.apply(Math,[0].concat(t.call(a))),bottom:Math.max.apply(Math,[0].concat(t.call(e)))}},w=function(t,e){var n,r;return n=u.get(t),r=new up.RevealMotion(n,e),j.startMotion(n,r,e)},P=function(t,e){var n,r,i,o,s,a;return null==e&&(e={}),r=e.hash,o=e.reveal,i=e.restoreScroll,s=D.only(e,"scrollBehavior","scrollSpeed"),i?(n=D.presence(i,D.isObject),b({around:t,scrollTops:n})):r&&o===!0?k(r,s):o?(D.isElement(o)||D.isJQuery(o)?t=u.get(o):D.isString(o)&&(a=u.resolveSelector(o,e.origin),t=up.fragment.first(a)),t?w(t,s):void 0):Promise.resolve()},k=function(t){var e;return t&&(e=a(t))?w(e,{top:!0}):Promise.resolve()},n=function(){return[A()].concat(t.call(o.viewports)).join(",")},i=function(t){var e;return e=u.get(t),u.closest(e,n())},f=function(t){var e;return e=u.get(t),u.subtree(e,n())},p=function(t){var e;return e=u.get(t),u.list(i(e),f(e))},c=function(){return u.all(n())},A=function(){var t;return(t=document.scrollingElement)?t.tagName:"html"},h=function(){return document.querySelector(A())},F=function(){return u.root().clientWidth},E=function(){return u.root().clientHeight},d=function(t){return u.matches(t,A())},S=function(){return window.innerWidth>document.documentElement.offsetWidth},T=function(){var t,e,n;return t=document.body,n=document.documentElement,e=D.find([n,t],L),e||h()},L=function(t){var e;return e=u.style(t,"overflow-y"),"auto"===e||"scroll"===e},M=D.memoize(function(){var t,e,n;return e={position:"absolute",top:"0",left:"0",width:"100px",height:"100px",overflowY:"scroll"},t=up.element.affix(document.body,"[up-viewport]",{style:e}),n=t.offsetWidth-t.clientWidth,up.element.remove(t),n}),O=function(t){return u.toSelector(t)},R=function(){return D.mapObject(c(),function(t){return[O(t),t.scrollTop]})},l=function(t){var e;return null==t&&(t=document),e=["[up-fixed]"].concat(o.fixedTop).concat(o.fixedBottom),t.querySelectorAll(e.join(","))},C=function(t){var e,n,r,i;return null==t&&(t={}),i=null!=(e=t.url)?e:up.history.url(),r=null!=(n=t.tops)?n:R(),m.set(i,r)},b=function(t){var e,n,r;return null==t&&(t={}),n=up.history.url(),r=t.around?p(t.around):c(),e=t.scrollTops||m.get(n)||{},up.log.group("Restoring scroll positions for URL %s to %o",n,e,function(){var t;return t=D.map(r,function(t){var n,r;return n=O(t),r=e[n]||0,x(t,r,{duration:0})}),Promise.all(t)})},e=function(t,e){var n,r,i,o,s,a,c,p;return null==e&&(e={}),i=u.get(t),c=up.viewport.closest(i),p=c.getBoundingClientRect(),a=i.getBoundingClientRect(),r=new up.Rect({left:a.left-p.left,top:a.top-p.top,width:a.width,height:a.height}),"function"==typeof e.afterMeasure&&e.afterMeasure(),u.setStyle(i,{position:"static"===i.style.position?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"}),n=u.createFromSelector(".up-bounds"),u.insertBefore(i,n),n.appendChild(i),o=function(t,e){return r.left+=t,r.top+=e,u.setStyle(n,r)},o(0,0),s=i.getBoundingClientRect(),o(a.left-s.left,a.top-s.top),D.each(l(i),u.fixedToAbsolute),{bounds:n,moveBounds:o}},a=function(t){var e;return(t=v(t))?(e=[u.attributeSelector("up-id",t),u.attributeSelector("id",t),"a"+u.attributeSelector("name",t)].join(","),up.fragment.first(e)):void 0},v=function(t){return t&&"#"===t[0]&&(t=t.substr(1)),D.presence(t)},up.on("up:app:booted",function(){return k(location.hash)}),up.on("up:framework:reset",y),{reveal:w,revealHash:k,firstHashTarget:a,scroll:x,config:o,closest:i,subtree:f,around:p,all:c,rootSelector:A,root:h,rootWidth:F,rootHeight:E,rootHasVerticalScrollbar:S,rootOverflowElement:T,isRoot:d,scrollbarWidth:M,scrollTops:R,saveScroll:C,restoreScroll:b,scrollAfterInsertFragment:P,anchoredRight:r,fixedElements:l,absolutize:e}}(),up.scroll=up.viewport.scroll,up.reveal=up.viewport.reveal,up.revealHash=up.viewport.revealHash,up.legacy.renamedModule("layout","viewport")}.call(this),function(){var t=[].slice;up.fragment=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y,b,w,k,S,E,T,A,F,C,x,P,O,R;return O=up.util,u=up.element,r=new up.Config({fallbacks:["body"],fallbackTransition:null}),E=function(){return r.reset()},T=function(t,e){return e!==!1?(O.isPresent(e)&&(e=O.normalizeUrl(e)),t.setAttribute("up-source",e)):void 0},C=function(t){var e;return e=u.get(t),(e=u.closest(e,"[up-source]"))?e.getAttribute("up-source"):up.browser.url()},S=function(t,e,r){var i,o,u,s,a,l,c,p,h,f,d;if(r=O.options(r),r.inspectResponse=u=function(){return up.browser.navigate(e,O.only(r,"method","params"))},!up.browser.canPushState()&&r.history!==!1)return r.preload||u(),O.unresolvablePromise();d=O.merge(r,{humanizedTarget:"target"}),o=O.merge(r,{humanizedTarget:"failure target",provideTarget:void 0,restoreScroll:!1}),O.renameKey(o,"failTransition","transition"),O.renameKey(o,"failLayer","layer"),O.renameKey(o,"failReveal","reveal");try{a=n(t,d),s=n(r.failTarget,o)}catch(m){return i=m,Promise.reject(i)}return f=O.only(r,"method","data","params","cache","preload","headers","timeout"),O.assign(f,{url:e,target:a,failTarget:s}),h=new up.Request(f),c=function(t){return w(!0,a,h,t,d)},l=function(t){var e,n;return n=function(){return Promise.reject(t)},t.isFatalError()?n():(e=w(!1,s,h,t,o),O.always(e,n))},p=up.request(h),r.preload||(p=p.then(c,l)),p},w=function(t,e,n,r,i){var o,u,s,a;return a=r.url,u=a,(o=n.hash)&&(i.hash=o,u+=o),s="GET"===r.method,t?s?(i.history===!1||O.isString(i.history)||(i.history=u),i.source===!1||O.isString(i.source)||(i.source=a)):(O.isString(i.history)||(i.history=!1),O.isString(i.source)||(i.source="keep")):s?(i.history!==!1&&(i.history=u),i.source!==!1&&(i.source=a)):(i.history=!1,i.source="keep"),A(i)&&r.title&&(i.title=r.title),c(e,r.text,i)},A=function(t){return!(t.title===!1||O.isString(t.title)||t.history===!1&&t.title!==!0)},c=function(t,n,r){return up.log.group("Extracting %s from %d bytes of HTML",t,null!=n?n.length:void 0,function(){return r=O.options(r,{historyMethod:"push",keep:!0,layer:"auto"}),r.saveScroll!==!1&&up.viewport.saveScroll(),O.rejectOnError(function(){var i,o,u,s,a,l,c;for("function"==typeof r.provideTarget&&r.provideTarget(),s=new up.HtmlParser(n),i=e(t,s,r),A(r)&&(a=s.title())&&(r.title=a),R(r),c=[],o=0,u=i.length;u>o;o++)l=i[o],up.log.group("Swapping fragment %s",l.selector,function(){var t,e;return t=O.merge(r,O.only(l,"origin","reveal")),s.prepareForInsertion(l.newElement),e=x(l.oldElement,l.newElement,l.pseudoClass,l.transition,t),c.push(e)});return Promise.all(c)})})},n=function(t,e){var n;return n=new up.ExtractCascade(t,e),n.bestPreflightSelector()},e=function(t,e,n){var r;return n=O.merge(n,{response:e}),r=new up.ExtractCascade(t,n),r.bestMatchingSteps()},R=function(t){return t=O.options(t,{historyMethod:"push"}),t.history&&up.history[t.historyMethod](t.history),O.isString(t.title)?document.title=t.title:void 0},x=function(t,e,n,r,i){var o,a,c,h,f,d,g,v,b,w;if(r||(r="none"),"keep"===i.source&&(i=O.merge(i,{source:C(t)})),T(e,i.source),n){for(w=u.createFromSelector(".up-insertion");a=e.firstChild;)w.appendChild(a);for("before"===n?t.insertAdjacentElement("afterbegin",w):t.insertAdjacentElement("beforeend",w),b=w.children,c=0,f=b.length;f>c;c++)o=b[c],m(o,i);return v=up.viewport.scrollAfterInsertFragment(w,i),v=O.always(v,up.animate(w,r,i)),v=v.then(function(){return u.unwrap(w)})}return(h=p(t,e,i))?(l(h),Promise.resolve()):(i.keepPlans=P(t,e,i),g=t.parentNode,d=O.merge(i,{beforeStart:function(){return y(t)},afterInsert:function(){return up.hello(e,i)},beforeDetach:function(){return up.syntax.clean(t)},afterDetach:function(){return u.remove(t),s(t,{parent:g,log:!1})}}),up.morph(t,e,r,d))},P=function(t,e,n){var r,i,o,s,a,l,c;if(i=[],n.keep)for(c=t.querySelectorAll("[up-keep]"),r=0,a=c.length;a>r;r++)o=c[r],(l=p(o,e,O.merge(n,{descendantsOnly:!0})))&&(s=o.cloneNode(!0),u.replace(o,s),u.replace(l.newElement,o),i.push(l));return i},p=function(t,e,n){var r,i,o,s,a;return n.keep&&(i=t,(s=u.booleanOrStringAttr(i,"up-keep"))&&(O.isString(s)||(s="&"),s=u.resolveSelector(s,i),o=n.descendantsOnly?u.first(e,s):u.subtree(e,s)[0],o&&u.matches(o,"[up-keep]")&&(a={oldElement:i,newElement:o,newData:up.syntax.data(o)},r={target:i,newFragment:o,newData:a.newData,log:["Keeping element %o",i]},up.event.nobodyPrevents("up:fragment:keep",r))))?a:void 0},m=function(t,e){var n,r,i,o,s,c;for(n=u.get(t),e=O.options(e,{keepPlans:[]}),i=[],c=e.keepPlans,r=0,o=c.length;o>r;r++)s=c[r],l(s),i.push(s.oldElement);return up.syntax.compile(n,{skip:i}),a(n,e),n},a=function(t,e){return up.emit(t,"up:fragment:inserted",{log:["Inserted fragment %o",t],origin:e.origin})},l=function(t){var e,n;return n=t.oldElement,e={target:n,newFragment:t.newElement,newData:t.newData,log:["Kept fragment %o",n]},up.emit("up:fragment:kept",e)},s=function(t,e){var n,r;return F(t,e)&&(n=["Destroyed fragment %o",t]),r=e.parent||up.fail("Missing { parent } option"),up.emit(r,"up:fragment:destroyed",{fragment:t,parent:r,log:n})},g=function(t){return!u.closest(t,".up-destroying")},h=function(){var e,n,r,i,o,s,a;return e=1<=arguments.length?t.call(arguments,0):[],r=O.extractOptions(e),a=e.pop(),s=e[0]||document,n=null!=(o=r.layer)?o:"auto",i=r.origin,a=u.resolveSelector(a,i),"auto"===n?d(s,a,i):f(s,a,n)},d=function(t,e,n){var r,i;return r=["popup","modal","page"],n&&(i=v(n),O.remove(r,i),r.unshift(i)),O.findResult(r,function(n){return f(t,e,n)})},f=function(t,e,n){var r;return r=u.all(t,e),O.findResult(r,function(t){return g(t)&&b(t,n)?t:void 0})},v=function(t){return up.popup.contains(t)?"popup":up.modal.contains(t)?"modal":"page"},b=function(t,e){return!e||v(t)===e},i=function(t,e){return null==e&&(e=document.body),u.affix(e,t,{"class":"up-placeholder"})},o=function(t,e){var n,r,i;return r=u.get(t),e=O.options(e,{animation:!1}),r?(y(r),R(e),n=function(){var t;return t=up.motion.animateOptions(e),up.motion.animate(r,e.animation,t)},i=function(){var t;return t=r.parentNode,up.syntax.clean(r),up.browser.canJQuery()?jQuery(r).remove():u.remove(r),s(r,{parent:t,log:e.log})},n().then(i)):Promise.resolve()},F=function(t,e){return e.log!==!1&&!u.matches(t,".up-placeholder, .up-tooltip, .up-modal, .up-popup")},y=function(t){return t.classList.add("up-destroying"),t.setAttribute("aria-hidden","true")},k=function(t,e){var n;return e=O.options(e,{cache:!1}),n=e.url||C(t),S(t,n,e)},up.on("up:app:boot",function(){var t;return t=document.body,T(t,up.browser.url()),m(t)}),up.on("up:framework:reset",E),{createPlaceholder:i,replace:S,reload:k,destroy:o,extract:c,first:h,source:C,hello:m,config:r,layerOf:v}}(),up.replace=up.fragment.replace,up.extract=up.fragment.extract,up.reload=up.fragment.reload,up.destroy=up.fragment.destroy,up.hello=up.fragment.hello,up.first=function(){var e,n;return e=1<=arguments.length?t.call(arguments,0):[],up.legacy.warn("up.first() has been renamed to up.fragment.first()"),(n=up.fragment).first.apply(n,e)},up.legacy.renamedModule("flow","fragment"),up.legacy.renamedModule("dom","fragment")}.call(this),function(){var t=[].slice;up.motion=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y,b,w,k,S,E,T,A,F,C,x;return C=up.util,l=up.element,y={},s={},b={},a={},v=new up.MotionController("motion"),u=new up.Config({duration:300,delay:0,easing:"ease",enabled:!0}),S=function(){return v.reset(),y=C.copy(s),b=C.copy(a),u.reset()},d=function(){return u.enabled},n=function(t,e,n){var r,o,u,s;return o=l.get(t),n=i(n),r=c(e),s=x(o,e,n),s?(u=function(){return r(o,n)},v.startFunction(o,u,n)):E(o,e)},x=function(t,e,n){return n=i(n),d()&&!m(e)&&n.duration>0&&!l.isSingleton(t)},E=function(t,e){return C.isOptions(e)&&l.setStyle(t,e),Promise.resolve()},e=0,r=function(t,e,n){var r;return n=C.merge(n,{finishEvent:v.finishEvent}),r=new up.CssTransition(t,e,n),r.start()},i=function(){var e,n,r,i,o,s,a,c,p,h,f,d,m,g,v;return e=1<=arguments.length?t.call(arguments,0):[],v=null!=(o=e.shift())?o:{},i=C.extractOptions(e),r=e.pop()||l.none(),n={},n.easing=null!=(s=null!=(a=null!=(c=v.easing)?c:r.getAttribute("up-easing"))?a:i.easing)?s:u.easing,n.duration=null!=(p=null!=(h=null!=(f=v.duration)?f:l.numberAttr(r,"up-duration"))?h:i.duration)?p:u.duration,n.delay=null!=(d=null!=(m=null!=(g=v.delay)?g:l.numberAttr(r,"up-delay"))?m:i.delay)?d:u.delay,n.trackMotion=v.trackMotion,n},p=function(t){return y[t]||up.fail("Unknown animation %o",t)},f=function(t){return v.finish(t)},g=function(t,e,n,r){var o,u,s,a,c,p,f,d,m,g,y,b;return r=C.options(r),C.assign(r,i(r)),t=l.get(t),e=l.get(e),g=h(n),b=x(t,g,r),a=C.pluckKey(r,"beforeStart")||C.noop,u=C.pluckKey(r,"afterInsert")||C.noop,s=C.pluckKey(r,"beforeDetach")||C.noop,o=C.pluckKey(r,"afterDetach")||C.noop,a(),f=function(){var t;return t=C.merge(r,{scrollBehavior:"auto"}),up.viewport.scrollAfterInsertFragment(e,t)},b?v.isActive(t)&&r.trackMotion===!1?g(t,e,r):(up.puts("Morphing %o to %o with transition %o",t,e,n),y=up.viewport.closest(t),d=y.scrollTop,c=up.viewport.absolutize(t,{afterMeasure:function(){return l.insertBefore(t,e),u()}}),m=function(){var n;return n=f(),n=n.then(function(){var n;return n=y.scrollTop,c.moveBounds(0,n-d),g(t,e,r)}),n=n.then(function(){return s(),l.remove(c.bounds),o()})},v.startFunction([t,e],m,r)):(s(),A(t,e),u(),o(),p=f())},h=function(t){var e;return m(t)?void 0:C.isFunction(t)?t:C.isArray(t)?o.apply(null,t):C.isString(t)?t.indexOf("/")>=0?o.apply(null,t.split("/")):(e=b[t])?h(e):void 0:up.fail("Unknown transition %o",t)},o=function(t,e){var n,r;return m(t)&&m(t)?void 0:(r=c(t)||C.asyncNoop,n=c(e)||C.asyncNoop,function(t,e,i){return Promise.all([r(t,i),n(e,i)])})},c=function(t){return m(t)?void 0:C.isFunction(t)?t:C.isString(t)?p(t):C.isOptions(t)?function(e,n){return r(e,t,n)}:up.fail("Unknown animation %o",t)},A=function(t,e){return l.replace(t,e)},k=function(t,e){return b[t]=h(e)},w=function(t,e){return y[t]=c(e)},T=function(){return s=C.copy(y),a=C.copy(b)},m=function(t){return!t||"none"===t||C.isBlank(t)},w("fade-in",function(t,e){return l.setStyle(t,{opacity:0}),r(t,{opacity:1},e)}),w("fade-out",function(t,e){return l.setStyle(t,{opacity:1}),r(t,{opacity:0},e)}),F=function(t,e){return{transform:"translate("+t+"px, "+e+"px)"}},w("move-to-top",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=n.top+n.height,r(t,F(0,-i),e)}),w("move-from-top",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=n.top+n.height,l.setStyle(t,F(0,-i)),r(t,F(0,0),e)}),w("move-to-bottom",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=l.root().clientHeight-n.top,r(t,F(0,i),e)}),w("move-from-bottom",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=up.viewport.rootHeight()-n.top,l.setStyle(t,F(0,i)),r(t,F(0,0),e)}),w("move-to-left",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=n.left+n.width,r(t,F(-i,0),e)}),w("move-from-left",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=n.left+n.width,l.setStyle(t,F(-i,0)),r(t,F(0,0),e)}),w("move-to-right",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=up.viewport.rootWidth()-n.left,r(t,F(i,0),e)}),w("move-from-right",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=up.viewport.rootWidth()-n.left,l.setStyle(t,F(i,0)),r(t,F(0,0),e)}),w("roll-down",function(t,e){var r,i,o;return i=l.style(t,"height"),o=l.setTemporaryStyle(t,{height:"0px",overflow:"hidden"}),r=n(t,{height:i},e),r.then(o),r}),k("move-left",["move-to-left","move-from-right"]),k("move-right",["move-to-right","move-from-left"]),k("move-up",["move-to-top","move-from-bottom"]),k("move-down",["move-to-bottom","move-from-top"]),k("cross-fade",["fade-out","fade-in"]),up.on("up:framework:booted",T),up.on("up:framework:reset",S),{morph:g,animate:n,animateOptions:i,finish:f,finishCount:function(){return v.finishCount},transition:k,animation:w,config:u,isEnabled:d,isNone:m}}(),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate}.call(this),function(){var t=[].slice;up.proxy=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y,b,w,k,S,E,T,A,F,C,x,P,O,R,M,j,D,L,U;return D=up.util,a=up.element,L=void 0,S=void 0,O=void 0,y=void 0,R=void 0,T=[],s=new up.Config({slowDelay:300,preloadDelay:75,cacheSize:70,cacheExpiry:3e5,maxRequests:4,wrapMethods:["PATCH","PUT","DELETE"],safeMethods:["GET","OPTIONS","HEAD"]}),r=new up.Cache({size:function(){return s.cacheSize},expiry:function(){return s.cacheExpiry},key:function(t){return up.Request.wrap(t).cacheKey()},cachable:function(t){return up.Request.wrap(t).isCachable()}}),l=function(t){var e,n,i,o,u,s,a;for(t=up.Request.wrap(t),n=[t],"html"!==t.target&&(s=t.variant({target:"html"}),n.push(s),"body"!==t.target&&(u=t.variant({target:"body"}),n.push(u))),i=0,o=n.length;o>i;i++)if(e=n[i],a=r.get(e))return a},i=function(){return clearTimeout(S),S=null},o=function(){return clearTimeout(O),O=null},C=function(){return L=null,i(),o(),y=0,s.reset(),r.clear(),R=!1,T=[]},C(),v=function(){var e,n,r,i,o,s;return e=1<=arguments.length?t.call(arguments,0):[],D.isString(e[0])&&(s=e.shift()),o=e.shift()||{},s&&(o.url=s),i=up.Request.wrap(o),i.isSafe()||u(),n=i.cache===!1,!n&&(r=l(i))?up.puts("Re-using cached response for %s %s",i.method,i.url):(r=m(i),P(i,r),r["catch"](function(){return F(i)})),i.preload||(g(),D.always(r,d)),r},e=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],up.legacy.warn("up.ajax() has been deprecated. Use up.request() instead."),new Promise(function(t,n){var r;return r=function(e){return t(e.text)},v.apply(null,e).then(r,n)})},p=function(){return 0===y},c=function(){return y>0},g=function(){var t;return y+=1,O?void 0:(t=function(){return c()?(up.emit("up:proxy:slow",{log:"Proxy is slow to respond"}),R=!0):void 0},O=D.timer(s.slowDelay,t))},d=function(){return y-=1,p()&&(o(),R)?(up.emit("up:proxy:recover",{log:"Proxy has recovered from slow response"}),R=!1):void 0},m=function(t){return y<s.maxRequests?f(t):E(t)},E=function(t){var e;return up.puts("Queuing request for %s %s",t.method,t.url),e=function(){return f(t)},e=D.previewable(e),T.push(e),e.promise},f=function(t){var e,n;return e={request:t,log:["Loading %s %s",t.method,t.url]},up.event.nobodyPrevents("up:proxy:load",e)?(n=t.send(),D.always(n,x),D.always(n,b),n):(D.microtask(b),Promise.reject(new Error("Event up:proxy:load was prevented")))},A=function(t){var e,n;return n=t.request,t.url&&n.url!==t.url?(e=n.variant({method:t.method,url:t.url}),up.proxy.alias(n,e)):void 0},x=function(t){return t.isFatalError()?up.emit("up:proxy:fatal",{log:"Fatal error during request",request:t.request,response:t}):(t.isError()||A(t),up.emit("up:proxy:loaded",{log:["Server responded with HTTP %d (%d bytes)",t.status,t.text.length],request:t.request,response:t}))},b=function(){var t;return void("function"==typeof(t=T.shift())&&t())},n=r.alias,P=r.set,F=r.remove,u=r.clear,k=function(t){var e,n;return n=a.numberAttr(t,"up-delay")||s.preloadDelay,t!==L?(L=t,i(),e=function(){return D.muteRejection(w(t)),L=null},M(e,n)):void 0},M=function(t,e){return S=setTimeout(t,e)},j=function(t){return t===L?(L=void 0,i()):void 0},w=function(t,e){var n,r;return n=a.get(t),up.link.isSafe(n)?(r={log:["Preloading link %o",n],target:n},up.event.whenEmitted("up:link:preload",r).then(function(){var t;
4
- return t=up.link.followVariantForLink(n),t.preloadLink(n,e)})):Promise.reject(new Error("Won't preload unsafe link"))},h=function(t){return D.contains(s.safeMethods,t)},U=function(t,e){return D.contains(s.wrapMethods,t)&&(e.add(up.protocol.config.methodParam,t),t="POST"),t},up.compiler("a[up-preload], [up-href][up-preload]",function(t){return up.link.isSafe(t)?(t.addEventListener("mouseenter",function(e){return up.link.shouldProcessEvent(e,t)?k(t):void 0}),t.addEventListener("mouseleave",function(){return j(t)})):void 0}),up.on("up:framework:reset",C),{preload:w,ajax:e,request:v,get:l,alias:n,clear:u,remove:F,isIdle:p,isBusy:c,isSafeMethod:h,wrapMethod:U,config:s}}(),up.ajax=up.proxy.ajax,up.request=up.proxy.request}.call(this),function(){up.link=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h,f,d,m;return d=up.util,o=up.element,m=function(t,e){var n,r;return null==e&&(e={}),r=null!=(n=e.target)?n:"body",up.replace(r,t,e)},u=function(t,e){var n,r;return n=o.get(t),r=a(n),r.followLink(n,e)},r=function(t,e){var n,r,i,u,a,l,c;return e=d.options(e),c=null!=(n=null!=(r=e.url)?r:t.getAttribute("up-href"))?n:t.getAttribute("href"),l=null!=(i=e.target)?i:t.getAttribute("up-target"),null==e.failTarget&&(e.failTarget=t.getAttribute("up-fail-target")),null==e.fallback&&(e.fallback=t.getAttribute("up-fallback")),null==e.transition&&(e.transition=o.booleanOrStringAttr(t,"up-transition")),null==e.failTransition&&(e.failTransition=o.booleanOrStringAttr(t,"up-fail-transition")),null==e.history&&(e.history=o.booleanOrStringAttr(t,"up-history")),null==e.reveal&&(e.reveal=null!=(u=o.booleanOrStringAttr(t,"up-reveal"))?u:!0),null==e.failReveal&&(e.failReveal=null!=(a=o.booleanOrStringAttr(t,"up-fail-reveal"))?a:!0),null==e.cache&&(e.cache=o.booleanAttr(t,"up-cache")),null==e.restoreScroll&&(e.restoreScroll=o.booleanAttr(t,"up-restore-scroll")),e.method=s(t,e),null==e.origin&&(e.origin=t),null==e.layer&&(e.layer=t.getAttribute("up-layer")),null==e.failLayer&&(e.failLayer=t.getAttribute("up-fail-layer")),null==e.confirm&&(e.confirm=t.getAttribute("up-confirm")),null==e.scrollBehavior&&(e.scrollBehavior=t.getAttribute("up-scroll-behavior")),null==e.scrollSpeed&&(e.scrollSpeed=t.getAttribute("up-scroll-speed")),e=d.merge(e,up.motion.animateOptions(e,t)),up.browser.whenConfirmed(e).then(function(){return up.replace(l,c,e)})},i=function(t,e){return e=d.options(e),e.preload=!0,r(t,e)},s=function(t,e){var n,r,i,o;return null==e&&(e={}),n=null!=(r=null!=(i=null!=(o=e.method)?o:t.getAttribute("up-method"))?i:t.getAttribute("data-method"))?r:"GET",n.toUpperCase()},n=function(){},l=[],e=function(t,e){var n;return n=new up.FollowVariant(t,e),l.push(n),n.registerEvents(),n},c=function(t){return t=o.get(t),!!a(t,{"default":!1})},a=function(e,n){var r;return null==n&&(n={}),r=d.find(l,function(t){return t.matchesLink(e)}),n["default"]!==!1&&(r||(r=t)),r},h=function(t){return c(t)?void 0:t.setAttribute("up-follow","")},f=function(t,e){var n,r,i;return i=t.target,d.isUnmodifiedMouseEvent(t)?i===e?!0:(r="a, [up-href], "+up.form.fieldSelector(),n=o.closest(i,r),!n||n===e):!1},p=function(t,e){var n;return n=s(t,e),up.proxy.isSafeMethod(n)},t=e("[up-target], [up-follow]",{follow:function(t,e){return r(t,e)},preload:function(t,e){return i(t,e)}}),up.macro("[up-dash]",function(t){var e,n;return n=o.booleanOrStringAttr(t,"up-dash"),t.removeAttribute("up-dash"),e={"up-preload":"","up-instant":""},n===!0?h(t):e["up-target"]=n,o.setMissingAttrs(t,e)}),up.macro("[up-expand]",function(t){var e,n,r,i,u,s,a,l,c,p;if(c=t.getAttribute("up-expand")||"a, [up-href]",r=o.all(t,c),n=r[0]){for(p=/^up-/,a={},a["up-href"]=n.getAttribute("href"),l=n.attributes,i=0,u=l.length;u>i;i++)e=l[i],s=e.name,s.match(p)&&(a[s]=e.value);return o.setMissingAttrs(t,a),t.removeAttribute("up-expand"),h(t)}}),{visit:m,follow:u,makeFollowable:h,isSafe:p,isFollowable:c,shouldProcessEvent:f,followMethod:s,addFollowVariant:e,followVariantForLink:a,allowDefault:n}}(),up.visit=up.link.visit,up.follow=up.link.follow}.call(this),function(){var t=[].slice;up.form=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y,b,w;return b=up.util,i=up.element,r=new up.Config({validateTargets:["[up-fieldset]:has(&)","fieldset:has(&)","label:has(&)","form:has(&)"],fields:["select","input:not([type=submit]):not([type=image])","button[type]:not([type=submit])","textarea"],submitButtons:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],observeDelay:0}),h=function(){return r.reset()},o=function(t){return null==t&&(t=""),r.fields.map(function(e){return e+t}).join(",")},u=function(t){var e,n,r;return t=i.get(t),e=i.subtree(t,o()),i.matches(t,"form[id]")&&(n=o(i.attributeSelector("form",t.id)),r=i.all(n),e.push.apply(e,r),e=b.uniq(e)),e},s=function(t){var e,n;return n=u(t),(e=m(t))&&(n=b.toArray(n),n.push(e)),n},m=function(t){var e,n;return n=d(),e=document.activeElement,e&&i.matches(e,n)&&t.contains(e)?e:i.first(t,n)},d=function(){return r.submitButtons.join(",")},f=function(t,e){var n,r,o,u,s,a,l,c,p,h,f,d,m,g;return e=b.options(e),n=i.get(t),n=i.closest(n,"form"),m=null!=(r=null!=(o=e.target)?o:n.getAttribute("up-target"))?r:"body",null==e.failTarget&&(e.failTarget=null!=(s=n.getAttribute("up-fail-target"))?s:i.toSelector(n)),null==e.reveal&&(e.reveal=null!=(a=i.booleanOrStringAttr(n,"up-reveal"))?a:!0),null==e.failReveal&&(e.failReveal=null!=(l=i.booleanOrStringAttr(n,"up-fail-reveal"))?l:!0),null==e.fallback&&(e.fallback=n.getAttribute("up-fallback")),null==e.history&&(e.history=null!=(c=i.booleanOrStringAttr(n,"up-history"))?c:!0),null==e.transition&&(e.transition=i.booleanOrStringAttr(n,"up-transition")),null==e.failTransition&&(e.failTransition=i.booleanOrStringAttr(n,"up-fail-transition")),null==e.method&&(e.method=b.normalizeMethod(null!=(p=null!=(h=null!=(f=n.getAttribute("up-method"))?f:n.getAttribute("data-method"))?h:n.getAttribute("method"))?p:"post")),null==e.cache&&(e.cache=i.booleanAttr(n,"up-cache")),null==e.restoreScroll&&(e.restoreScroll=i.booleanAttr(n,"up-restore-scroll")),null==e.origin&&(e.origin=n),null==e.layer&&(e.layer=n.getAttribute("up-layer")),null==e.failLayer&&(e.failLayer=n.getAttribute("up-fail-layer")),e.params=up.Params.fromForm(n).addAll(e.params),e=b.merge(e,up.motion.animateOptions(e,n)),e.validate&&(e.headers||(e.headers={}),e.transition=!1,e.failTransition=!1,e.headers[up.protocol.config.validateHeader]=e.validate),g=null!=(d=null!=(u=e.url)?u:n.getAttribute("action"))?d:up.browser.url(),"GET"===e.method&&(g=up.Params.stripURL(g)),up.event.whenEmitted("up:form:submit",{log:"Submitting form",target:n}).then(function(){var t;return up.feedback.start(n),up.browser.canPushState()||e.history===!1?(t=up.replace(m,g,e),b.always(t,function(){return up.feedback.stop(n)}),t):(n.submit(),b.unresolvablePromise())})},c=function(){var e,n,o,s,a,l,c,h,f,d;return o=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],o=i.list(o),s=b.flatMap(o,u),n=null!=(c=null!=(h=b.extractCallback(e))?h:p(o[0]))?c:up.fail("up.observe: No change callback given"),l=b.extractOptions(e),l.delay=null!=(f=null!=(d=l.delay)?d:i.numberAttr(o[0],"up-delay"))?f:r.observeDelay,a=new up.FieldObserver(s,l,n),a.start(),a.stop},p=function(t){var e;return(e=t.getAttribute("up-observe"))?new Function("value","name",e):void 0},e=function(t,e){return c(t,e,function(){return f(t)})},l=function(t,e){var n,o;return n=null!=(o=e.target)?o:t.getAttribute("up-validate"),n||(n=b.findResult(r.validateTargets,function(t){var n;return n=i.resolveSelector(t,e.origin),i.first(n)?n:void 0})),n||up.fail("Could not find validation target for %o (tried defaults %o)",t,r.validateTargets),i.resolveSelector(n,e.origin)},w=function(t,e){var n,r,o;return n=i.get(t),e=b.options(e),e.origin=n,e.target=l(n,e),e.failTarget=e.target,null==e.reveal&&(e.reveal=null!=(o=i.booleanOrStringAttr(n,"up-reveal"))?o:!1),e.history=!1,e.validate=n.getAttribute("name")||":none",e=b.merge(e,up.motion.animateOptions(e,n)),r=up.submit(n,e)},y=function(t){var e,r,o,u,s,a;return s=void 0,u=void 0,i.matches(t,"input[type=checkbox]")?t.checked?(s=t.value,u=":checked"):u=":unchecked":i.matches(t,"input[type=radio]")?(r=n(t),o=t.getAttribute("name"),e=r.querySelector("input[type=radio]"+i.attributeSelector("name",o)+":checked"),e?(u=":checked",s=e.value):u=":unchecked"):s=t.value,a=[],b.isPresent(s)?(a.push(s),a.push(":present")):a.push(":blank"),b.isPresent(u)&&a.push(u),a},v=function(t,e){var r,o,u,s;return null==e&&(e={}),s=null!=(u=e.target)?u:t.getAttribute("up-switch"),o=n(t),b.isPresent(s)||up.fail("No switch target given for %o",t),r=y(t),b.each(i.all(o,s),function(t){return g(t,r)})},g=function(t,e){var n,r,o;return e||(e=y(a(t))),(n=t.getAttribute("up-hide-for"))?(n=b.splitValues(n),r=0===b.intersect(e,n).length):(o=(o=t.getAttribute("up-show-for"))?b.splitValues(o):[":present",":checked"],r=b.intersect(e,o).length>0),i.toggle(t,r),t.classList.add("up-switched")},a=function(t){var e,r,o;return e=n(t),o=i.all(e,"[up-switch]"),r=b.find(o,function(e){var n;return n=e.getAttribute("up-switch"),i.matches(t,n)}),r||b.fail("Could not find [up-switch] field for %o",t)},n=function(t){return i.closest(t,"form, body")},up.on("submit","form[up-target]",function(t,e){return up.event.consumeAction(t),b.muteRejection(f(e))}),up.on("change","[up-validate]",function(t){var e;return e=u(t.target)[0],b.muteRejection(w(e))}),up.compiler("[up-switch]",function(t){return v(t)}),up.on("change","[up-switch]",function(t,e){return v(e)}),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",function(t){return g(t)}),up.compiler("[up-observe]",function(t){return c(t)}),up.compiler("[up-autosubmit]",function(t){return e(t)}),up.compiler("[autofocus]",{batch:!0},function(t){return b.last(t).focus()}),up.on("up:framework:reset",h),{config:r,submit:f,observe:c,validate:w,autosubmit:e,fieldSelector:o,fields:u,submissionFields:s}}(),up.submit=up.form.submit,up.observe=up.form.observe,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate}.call(this),function(){up.popup=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y;return v=up.util,c=up.element,u=new up.Config({openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:150,closeDuration:100,openEasing:null,closeEasing:null,position:"bottom",align:"left",history:!1}),d=new up.Config({phase:"closed",anchor:null,popup:null,content:null,tether:null,position:null,align:null,sticky:null,url:null,coveredUrl:null,coveredTitle:null}),r=new up.DivertibleChain,f=function(){var t;return null!=(t=d.tether)&&t.destroy(),d.reset(),r.reset(),u.reset()},l=function(){return d.coveredTitle=null,d.coveredUrl=null},a=function(t){return d.tether=new up.Tether(v.only(d,"anchor","position","align")),d.popup=c.affix(d.tether.root,".up-popup",{"up-position":d.position,"up-align":d.align}),d.content=c.affix(d.popup,".up-popup-content"),up.fragment.createPlaceholder(t,d.content),c.hide(d.popup)},y=function(){return c.show(d.popup)},m=function(){var t;return null!=(t=d.tether)?t.sync():void 0},p=function(){return"opened"===d.phase||"opening"===d.phase},t=function(t,n){return r.asap(o,function(){return e(t,n)})},e=function(t,e){var n,r,i,o,s,l,p,h,f,g,b,w,k,S,E,T,A,F,C;return r=c.get(t),null==e&&(e={}),C=null!=(p=null!=(h=v.pluckKey(e,"url"))?h:r.getAttribute("up-href"))?p:r.getAttribute("href"),s=v.pluckKey(e,"html"),C||s||up.fail("up.popup.attach() requires either an { url } or { html } option"),F=null!=(g=v.pluckKey(e,"target"))?g:r.getAttribute("up-popup")||up.fail("No target selector given for [up-popup]"),l=null!=(b=null!=(w=e.position)?w:r.getAttribute("up-position"))?b:u.position,n=null!=(k=null!=(S=e.align)?S:r.getAttribute("up-align"))?k:u.align,null==e.animation&&(e.animation=null!=(E=r.getAttribute("up-animation"))?E:u.openAnimation),null==e.sticky&&(e.sticky=null!=(T=c.booleanAttr(r,"up-sticky"))?T:u.sticky),e.history=up.browser.canPushState()?null!=(A=null!=(f=e.history)?f:c.booleanOrStringAttr(r,"up-history"))?A:u.history:!1,null==e.confirm&&(e.confirm=r.getAttribute("up-confirm")),e.method=up.link.followMethod(r,e),e.layer="popup",null==e.failTarget&&(e.failTarget=r.getAttribute("up-fail-target")),null==e.failLayer&&(e.failLayer=r.getAttribute("up-fail-layer")),e.provideTarget=function(){return a(F)},i=up.motion.animateOptions(e,r,{duration:u.openDuration,easing:u.openEasing}),o=v.merge(e,{animation:!1}),e.preload&&C?up.replace(F,C,e):up.browser.whenConfirmed(e).then(function(){return up.event.whenEmitted("up:popup:open",{url:C,anchor:r,log:"Opening popup"}).then(function(){var t;return d.phase="opening",d.anchor=r,d.position=l,d.align=n,e.history&&(d.coveredUrl=up.browser.url(),d.coveredTitle=document.title),d.sticky=e.sticky,t=s?up.extract(F,s,o):up.replace(F,C,o),t=t.then(function(){return y(),m(),up.animate(d.popup,e.animation,i)}),t=t.then(function(){return d.phase="opened",up.emit(d.popup,"up:popup:opened",{anchor:d.anchor,log:"Popup opened"})})})})},i=function(t){return r.asap(function(){return o(t)})},o=function(t){var e;return p()?(t=v.options(t,{animation:u.closeAnimation,history:d.coveredUrl,title:d.coveredTitle}),e=up.motion.animateOptions(t,{duration:u.closeDuration,easing:u.closeEasing}),v.assign(t,e),up.event.whenEmitted("up:popup:close",{anchor:d.anchor,log:"Closing popup"}).then(function(){return d.phase="closing",d.url=null,d.coveredUrl=null,d.coveredTitle=null,up.destroy(d.popup,t).then(function(){return d.phase="closed",d.tether.destroy(),d.tether=null,d.popup=null,d.content=null,d.anchor=null,d.sticky=null,up.emit("up:popup:closed",{anchor:d.anchor,log:"Popup closed"})})})):Promise.resolve()},h=function(t,n){return n=v.options(n),n.preload=!0,e(t,n)},g=function(e,n){return e.classList.contains("up-current")?i():t(e,n)},n=function(){return d.sticky?void 0:(l(),i())},s=function(t){var e;return e=c.get(t),!!c.closest(e,".up-popup")},up.link.addFollowVariant("[up-popup]",{follow:function(t,e){return g(t,e)},preload:function(t,e){return h(t,e)}}),up.on("click up:action:consumed",function(t){var e;return e=t.target,c.closest(e,".up-popup, [up-popup]")?void 0:v.muteRejection(i())}),up.on("up:fragment:inserted",function(t,e){var r;if(s(e)){if(r=e.getAttribute("up-source"))return d.url=r}else if(t.origin&&s(t.origin))return v.muteRejection(n())}),up.event.onEscape(function(){return v.muteRejection(i())}),up.on("click",".up-popup [up-close]",function(t){return v.muteRejection(i()),up.event.consumeAction(t)}),up.on("up:history:restore",function(){return v.muteRejection(i())}),up.on("up:framework:reset",f),{attach:t,close:i,url:function(){return d.url},coveredUrl:function(){return d.coveredUrl},config:u,contains:s,isOpen:p,sync:m}}()}.call(this),function(){up.modal=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y,b,w,k,S,E,T,A,F,C,x,P;return F=up.util,c=up.element,u=new up.Config({maxWidth:null,width:null,height:null,history:!0,openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:null,closeDuration:null,openEasing:null,closeEasing:null,backdropOpenAnimation:"fade-in",backdropCloseAnimation:"fade-out",closeLabel:"\xd7",closable:!0,sticky:!1,flavor:"default",position:null,template:function(t){return'<div class="up-modal">\n <div class="up-modal-backdrop"></div>\n <div class="up-modal-viewport">\n <div class="up-modal-dialog">\n <div class="up-modal-content"></div>\n <div class="up-modal-close" up-close>'+t.closeLabel+"</div>\n </div>\n </div>\n</div>"}}),m=new up.Config({"default":{}}),T=new up.Config({phase:"closed",anchorElement:null,modalElement:null,sticky:null,closable:null,flavor:null,url:null,coveredUrl:null,coveredTitle:null,position:null}),n=new up.BodyShifter,r=new up.DivertibleChain,E=function(){return T.modalElement&&c.remove(T.modalElement),n.unshift(),T.reset(),r.reset(),u.reset(),m.reset()},A=function(){var t;return t=f("template"),F.evalOption(t,{closeLabel:f("closeLabel")})},l=function(){return T.coveredTitle=null,T.coveredUrl=null},k=function(t){var e;return e=".up-modal-"+t,T.modalElement.querySelector(e)},a=function(t,e){var n,r,i,o,u;return o=A(),T.modalElement=u=c.createFromHtml(o),u.setAttribute("aria-modal","true"),u.setAttribute("up-flavor",T.flavor),F.isPresent(T.position)&&u.setAttribute("up-position",T.position),i=F.only(e,"width","maxWidth","height"),c.setStyle(k("dialog"),i),T.closable||(n=k("close"),c.remove(n)),r=k("content"),up.fragment.createPlaceholder(t,r),c.hide(u),document.body.appendChild(u)},C=function(){return c.show(T.modalElement)},v=function(){return"opened"===T.phase||"opening"===T.phase},g=function(t,e){return e=F.options(e),e.link=c.get(t),b(e)},S=function(t,e){return e=F.options(e),e.link=t,e.preload=!0,w(e)},P=function(t,e){return e=F.options(e),e.url=t,b(e)},p=function(t,e,n){return n=F.options(n),n.html=e,null==n.history&&(n.history=!1),n.target=t,b(n)},b=function(t){return r.asap(o,function(){return w(t)})},w=function(e){var r,i,o,s,l,p,h,d,m,g,v,y,b,w,k,S,E,A,P;return e=F.options(e),o=F.pluckKey(e,"link")||c.none(),P=null!=(s=null!=(l=F.pluckKey(e,"url"))?l:o.getAttribute("up-href"))?s:o.getAttribute("href"),i=F.pluckKey(e,"html"),A=null!=(g=F.pluckKey(e,"target"))?g:o.getAttribute("up-modal"),x(A),null==e.flavor&&(e.flavor=null!=(v=o.getAttribute("up-flavor"))?v:u.flavor),null==e.position&&(e.position=null!=(y=o.getAttribute("up-position"))?y:f("position",e.flavor)),e.position=F.evalOption(e.position,{link:o}),null==e.width&&(e.width=null!=(b=o.getAttribute("up-width"))?b:f("width",e.flavor)),null==e.maxWidth&&(e.maxWidth=null!=(w=o.getAttribute("up-max-width"))?w:f("maxWidth",e.flavor)),null==e.height&&(e.height=null!=(k=o.getAttribute("up-height"))?k:f("height")),null==e.animation&&(e.animation=null!=(S=o.getAttribute("up-animation"))?S:f("openAnimation",e.flavor)),e.animation=F.evalOption(e.animation,{position:e.position}),null==e.backdropAnimation&&(e.backdropAnimation=null!=(E=o.getAttribute("up-backdrop-animation"))?E:f("backdropOpenAnimation",e.flavor)),e.backdropAnimation=F.evalOption(e.backdropAnimation,{position:e.position}),null==e.sticky&&(e.sticky=null!=(p=c.booleanAttr(o,"up-sticky"))?p:f("sticky",e.flavor)),null==e.closable&&(e.closable=null!=(h=c.booleanAttr(o,"up-closable"))?h:f("closable",e.flavor)),null==e.confirm&&(e.confirm=o.getAttribute("up-confirm")),e.method=up.link.followMethod(o,e),e.layer="modal",null==e.failTarget&&(e.failTarget=o.getAttribute("up-fail-target")),null==e.failLayer&&(e.failLayer=null!=(d=o.getAttribute("up-fail-layer"))?d:"auto"),null==e.cache&&(e.cache=c.booleanAttr(o,"up-cache")),r=up.motion.animateOptions(e,o,{duration:f("openDuration",e.flavor),easing:f("openEasing",e.flavor)}),null==e.history&&(e.history=null!=(m=c.booleanOrStringAttr(o,"up-history"))?m:f("history",e.flavor)),up.browser.canPushState()||(e.history=!1),e.provideTarget=function(){return a(A,e)},e.preload?up.replace(A,P,e):up.browser.whenConfirmed(e).then(function(){return up.event.whenEmitted("up:modal:open",{url:P,log:"Opening modal"}).then(function(){var o,u;return T.phase="opening",T.flavor=e.flavor,T.sticky=e.sticky,T.closable=e.closable,T.position=e.position,e.history&&(T.coveredUrl=up.browser.url(),T.coveredTitle=document.title),o=F.merge(e,{animation:!1}),u=i?up.extract(A,i,o):up.replace(A,P,o),u=u.then(function(){return n.shift(),C(),t(e.animation,e.backdropAnimation,r)}),u=u.then(function(){return T.phase="opened",up.emit("up:modal:opened",{log:"Modal opened"})})})})},x=function(t){return F.isBlank(t)?up.fail("Cannot open a modal without a target selector"):"body"===t?up.fail("Cannot open the <body> in a modal"):void 0},i=function(t){return r.asap(function(){return o(t)})},o=function(e){var r,i,o,u,s,a;return e=F.options(e),v()?(a=null!=(u=e.animation)?u:f("closeAnimation"),a=F.evalOption(a,{position:T.position}),i=null!=(s=e.backdropAnimation)?s:f("backdropCloseAnimation"),i=F.evalOption(i,{position:T.position}),r=up.motion.animateOptions(e,{duration:f("closeDuration"),easing:f("closeEasing")}),o=F.options(F.except(e,"animation","duration","easing","delay"),{history:T.coveredUrl,title:T.coveredTitle}),up.event.whenEmitted(T.modalElement,"up:modal:close",{log:"Closing modal"}).then(function(){var e;return T.phase="closing",T.url=null,T.coveredUrl=null,T.coveredTitle=null,e=t(a,i,r),e=e.then(function(){return up.destroy(T.modalElement,o)}),e=e.then(function(){return n.unshift(),T.phase="closed",T.modalElement=null,T.flavor=null,T.sticky=null,T.closable=null,T.position=null,up.emit("up:modal:closed",{log:"Modal closed"})})})):Promise.resolve()},y=function(t){return null==t&&(t=!0),c.toggleClass(T.modalElement,"up-modal-animating",t)},t=function(t,e,n){var r;return up.motion.isNone(t)?Promise.resolve():(y(),r=Promise.all([up.animate(k("viewport"),t,n),up.animate(k("backdrop"),e,n)]),r=r.then(function(){return y(!1)}))},e=function(){return T.sticky?void 0:(l(),i())},s=function(t){var e;return e=c.get(t),!!c.closest(e,".up-modal")},h=function(t,e){return null==e&&(e={}),up.legacy.warn("up.modal.flavor() is deprecated. Use the up.modal.flavors property instead."),F.assign(d(t),e)},d=function(t){return m[t]||(m[t]={})},f=function(t,e){var n;return null==e&&(e=T.flavor),e&&(n=d(e)[t]),F.isMissing(n)&&(n=u[t]),n},up.link.addFollowVariant("[up-modal]",{follow:function(t,e){return g(t,e)},preload:function(t,e){return S(t,e)}}),up.on("click",".up-modal",function(t){var e;if(T.closable)return e=t.target,c.closest(e,".up-modal-dialog")||c.closest(e,"[up-modal]")?void 0:(up.event.consumeAction(t),F.muteRejection(i()))}),up.on("up:fragment:inserted",function(t,n){var r;if(s(n)){if(r=n.getAttribute("up-source"))return T.url=r}else if(t.origin&&s(t.origin)&&!up.popup.contains(n))return F.muteRejection(e())}),up.event.onEscape(function(){return T.closable?F.muteRejection(i()):void 0}),up.on("click",".up-modal [up-close]",function(t){return F.muteRejection(i()),up.event.consumeAction(t)}),up.macro("a[up-drawer], [up-href][up-drawer]",function(t){var e;return e=t.getAttribute("up-drawer"),c.setAttrs(t,{"up-modal":e,"up-flavor":"drawer"})}),m.drawer={openAnimation:function(t){switch(t.position){case"left":return"move-from-left";case"right":return"move-from-right"}},closeAnimation:function(t){switch(t.position){case"left":return"move-to-left";case"right":return"move-to-right"}},position:function(t){return F.isPresent(t.link)?F.horizontalScreenHalf(t.link):"left"}},up.on("up:history:restore",function(){return F.muteRejection(i())}),up.on("up:framework:reset",E),{visit:P,follow:g,extract:p,close:i,url:function(){return T.url},coveredUrl:function(){return T.coveredUrl},config:u,flavors:m,contains:s,isOpen:v,flavor:h}}()}.call(this),function(){up.tooltip=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h;return h=up.util,s=up.element,o=new up.Config({position:"top",align:"center",openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:100,closeDuration:50,openEasing:null,closeEasing:null}),c=new up.Config({phase:"closed",anchor:null,tooltip:null,content:null,tether:null,position:null,align:null}),n=new up.DivertibleChain,l=function(){var t;return null!=(t=c.tether)&&t.destroy(),c.reset(),n.reset(),o.reset()},u=function(t){return c.tether=new up.Tether(h.only(c,"anchor","position","align")),c.tooltip=s.affix(c.tether.root,".up-tooltip",{"up-position":c.position,"up-align":c.align}),c.content=s.affix(c.tooltip,".up-tooltip-content"),t.text?c.content.innerText=t.text:c.content.innerHTML=t.html},p=function(){var t;return null!=(t=c.tether)?t.sync():void 0},t=function(t,r){return n.asap(i,function(){return e(t,r)})},e=function(t,e){var n,r,i,a,l,h,f,d,m,g,v,y,b,w,k;return null==e&&(e={}),r=s.get(t),l=null!=(f=e.html)?f:r.getAttribute("up-tooltip-html"),k=null!=(d=e.text)?d:r.getAttribute("up-tooltip"),h=null!=(m=null!=(g=e.position)?g:r.getAttribute("up-position"))?m:o.position,n=null!=(v=null!=(y=e.align)?y:r.getAttribute("up-align"))?v:o.align,a=null!=(b=null!=(w=e.animation)?w:s.booleanOrStringAttr(r,"up-animation"))?b:o.openAnimation,i=up.motion.animateOptions(e,r,{duration:o.openDuration,easing:o.openEasing}),c.phase="opening",c.anchor=r,c.position=h,c.align=n,u({text:k,html:l}),p(),up.animate(c.tooltip,a,i).then(function(){return c.phase="opened"})},r=function(t){return n.asap(function(){return i(t)})},i=function(t){var e;return a()?(t=h.options(t,{animation:o.closeAnimation}),e=up.motion.animateOptions(t,{duration:o.closeDuration,easing:o.closeEasing}),h.assign(t,e),c.phase="closing",up.destroy(c.tooltip,t).then(function(){return c.phase="closed",c.tether.destroy(),c.tether=null,c.tooltip=null,c.content=null,c.anchor=null})):Promise.resolve()},a=function(){return"opening"===c.phase||"opened"===c.phase},up.compiler("[up-tooltip], [up-tooltip-html]",function(e){return e.addEventListener("mouseenter",function(){return t(e)}),e.addEventListener("mouseleave",function(){return r()})}),up.on("click up:action:consumed",function(){return r()}),up.on("up:framework:reset",l),up.event.onEscape(function(){return r()}),{config:o,attach:t,isOpen:a,close:r,sync:p}}()}.call(this),function(){up.feedback=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,g,v,y,b;return m=up.util,u=up.element,i=new up.Config({currentClasses:["up-current"],navs:["[up-nav]"]}),c=void 0,o=void 0,p=function(){return i.reset(),c=void 0,o=void 0},t="up-active",e="a, [up-href]",a=function(){return i.navs.join(",")},l=function(t){return m.isPresent(t)?m.normalizeUrl(t,{stripTrailingSlash:!0}):void 0},h=function(t){var e;return(e=t.upNormalizedUrls)||(e=r(t),t.upNormalizedUrls=e),e},r=function(t){var e,n,r,i,o,u,s,a,c,p;if(c=[],up.link.isSafe(t))for(u=["href","up-href","up-alias"],n=0,i=u.length;i>n;n++)if(e=u[n],p=t.getAttribute(e))for(s=m.splitValues(p),r=0,o=s.length;o>r;r++)a=s[r],"#"!==a&&(a=l(a),c.push(a));return c},n=function(){var t;return t=[up.browser.url(),up.modal.url(),up.modal.coveredUrl(),up.popup.url(),up.popup.coveredUrl()],new up.UrlSet(t,{normalizeUrl:l})},v=function(){return c=o,o=n(),m.isEqual(o,c)?void 0:g(document.body)},g=function(t){var n,r;return n=u.subtree(t,a()),r=m.flatMap(n,function(t){return u.subtree(t,e)}),y(r)},b=function(t){var n;return u.closest(t,a())?(n=u.subtree(t,e),y(n)):g(t)},y=function(t){return o||(o=n()),m.each(t,function(t){var e,n,r,u,s,a,l,c,p,f,d;if(d=h(t),e=t.classList,o.matchesAny(d)){for(l=i.currentClasses,p=[],n=0,s=l.length;s>n;n++)u=l[n],p.push(e.add(u));return p}for(c=i.currentClasses,f=[],r=0,a=c.length;a>r;r++)u=c[r],f.push(e.remove(u));return f})},s=function(t){return t=u.get(t),u.ancestor(t,e)||t},f=function(e){return s(e).classList.add(t)},d=function(e){return s(e).classList.remove(t)},up.on("up:history:pushed up:history:replaced up:history:restored up:modal:opened up:modal:closed up:popup:opened up:popup:closed",function(){return v()}),up.on("up:fragment:inserted",function(t,e){return b(e)}),up.on("up:framework:reset",p),{config:i,start:f,stop:d}}(),up.legacy.renamedModule("navigation","feedback")}.call(this),function(){up.radio=function(){var t,e,n,r;return r=up.util,t=new up.Config({hungry:["[up-hungry]"],hungryTransition:null}),n=function(){return t.reset()},e=function(){return t.hungry.join(",")},up.on("up:framework:reset",n),{config:t,hungrySelector:e}}()}.call(this),function(){up.rails=function(){var t,e,n;return n=up.util,t=up.element,e=function(){var t;return!!(window.Rails||(null!=(t=window.jQuery)?t.rails:void 0))},n.each(["method","confirm"],function(n){var r,i;return r="data-"+n,i="up-"+n,up.macro("["+r+"]",function(n){var o;return e()&&up.link.isFollowable(n)?(o={},o[i]=n.getAttribute(r),t.setMissingAttrs(n,o),n.removeAttribute(r)):void 0})})}()}.call(this),function(){up.framework.boot()}.call(this);
1
+ (function(){window.up={version:"2.0.0-rc2"}}).call(this),function(){up.mockable=function(t){var e,n;return n=null,(e=function(){return(n||t).apply(null,arguments)}).mock=function(){return n=jasmine.createSpy("mockable",t)},document.addEventListener("up:framework:reset",function(){return n=null}),e}}.call(this),function(){var n,r,e,i,s,t,o,u,a,p,l,c,h,f,d,m,y,g,v,b,w,k,E,S,L,C,_,O,T,F,R,A,x,P,q,D,M,H,j,N,z,B,V,K,U,I,W,Q,X,G,$,J,Y,Z,tt,et,nt,rt,ot,it,st,ut,at,pt,lt,ct,ht,ft,dt,mt,yt,gt,vt,bt,wt,kt,Et,St,Lt,Ct,_t,Ot,Tt,Ft,Rt,At,xt,Pt,qt,Dt,Mt,Ht,jt,Nt,zt,Bt,Vt,Kt,Ut,It,Wt,Qt,Xt,Gt,$t,Jt,Yt,Zt,te,ee,ne,re,oe,ie,se,ue,ae,pe,le,ce=[].slice,he={}.hasOwnProperty;up.util=(i={host:"cross-domain",stripTrailingSlash:(at=function(t,e){return(""===(e=e.toString())||"80"===e)&&"http:"===t||"443"===e&&"https:"===t},!(c=function(){return Promise.resolve()})),search:!0,hash:(bt=function(e){var n,r;return r=void 0,n=!1,function(){var t;return t=1<=arguments.length?ce.call(arguments,0):[],n?r:(n=!0,r=e.apply(this,t))}},!(Ot=function(){}))},Ft=function(t,e){var n,r,o;return e=Ct(e,i),r=Dt(t),n="","cross-domain"===e.host&&(e.host=B(r)),e.host&&(n+=r.protocol+"//"+r.hostname,at(r.protocol,r.port)||(n+=":"+r.port)),o=r.pathname,e.stripTrailingSlash&&(o=o.replace(/\/$/,"")),n+=o,e.search&&(n+=r.search),e.hash&&(n+=r.hash),n},ae=function(t){return Ft(t,{host:!1})},vt=function(t,e){return Ft(t)===Ft(e)},r=location.protocol,n=location.hostname,B=function(t){var e;return(!pt(t)||-1!==t.indexOf("//"))&&(e=Dt(t),n!==e.hostname||r!==e.protocol)},Dt=function(t){var e;return J(t)?e=up.element.get(t):t.pathname?e=t:(e=document.createElement("a")).href=t,e.hostname||(e.href=e.href),"/"!==e.pathname[0]&&((e=Mt(e,["protocol","hostname","port","pathname","search","hash"])).pathname="/"+e.pathname),e},Tt=function(t){return t?t.toUpperCase():"GET"},Et=function(t){return"GET"!==t&&"HEAD"!==t},l=function(t){var e,n,r,o,i,s,u;for(s=t,e=0,r=(i=2<=arguments.length?ce.call(arguments,1):[]).length;e<r;e++)for(n in o=i[e])he.call(o,n)&&(u=o[n],s[n]=u);return s},p=Object.assign||l,pe=function(t){var e,n,r;for(e in n=[],t)r=t[e],n.push(r);return n},xt=Object.values||pe,ht=function(e){return pt(e)?function(t){return t[e]}:e},gt=function(t,e){var n;return n=function(t,e){return t[e[0]]=e[1],t},yt(t,e).reduce(n,{})},w=yt=function(t,e){var n,r,o,i,s;if(0===t.length)return[];for(e=ht(e),s=[],n=o=0,i=t.length;o<i;n=++o)r=t[n],s.push(e(r,n));return s},k=function(t,e){var n,r;for(r=[];(n=t.next())&&!n.done;)r.push(e(n.value));return r},ee=function(t,e){var n,r,o,i;for(i=[],n=r=0,o=t-1;0<=o?r<=o:o<=r;n=0<=o?++r:--r)i.push(e(n));return i},et=function(t){return null===t},ct=function(t){return void 0===t},V=function(t){return!ct(t)},Z=function(t){return ct(t)||et(t)},G=function(t){return!Z(t)},(N=function(t){return!!Z(t)||(rt(t)&&t[N.key]?t[N.key]():pt(t)||Y(t)?0===t.length:!!ot(t)&&0===Object.keys(t).length)}).key="up.util.isBlank",zt=function(t,e){return null==e&&(e=it),e(t)?t:void 0},it=function(t){return!N(t)},X=function(t){return"function"==typeof t},pt=function(t){return"string"==typeof t||t instanceof String},z=function(t){return"boolean"==typeof t||t instanceof Boolean},nt=function(t){return"number"==typeof t||t instanceof Number},ot=function(t){return"object"==typeof t&&!et(t)&&(ct(t.constructor)||t.constructor===Object)},rt=function(t){var e;return"object"==(e=typeof t)&&!et(t)||"function"===e},K=function(t){return t instanceof Element},ut=function(t){return t instanceof RegExp},J=function(t){return!!(null!=t?t.jquery:void 0)},U=function(t){var e;return!(!t||!(t.addEventListener||(null!=(e=t[0])?e.addEventListener:void 0)))},st=function(t){return rt(t)&&X(t.then)},H=Array.isArray,Q=function(t){return t instanceof FormData},ne=function(t){return H(t)?t:g(t)},Y=function(t){return H(t)||tt(t)||M(t)||J(t)||$(t)},tt=function(t){return t instanceof NodeList},$=function(t){return t instanceof HTMLCollection},M=function(t){return"[object Arguments]"===Object.prototype.toString.call(t)},Rt=function(t){return et(t)?void 0:t},le=function(t){return Y(t)?t:Z(t)?[]:[t]},y=function(t){return rt(t)&&t[y.key]?t=t[y.key]():Y(t)?t=g(t):ot(t)&&(t=p({},t)),t},g=function(t){return Array.prototype.slice.call(t)},y.key="up.util.copy",Date.prototype[y.key]=function(){return new Date(+this)},wt=function(){var t;return t=1<=arguments.length?ce.call(arguments,0):[],p.apply(null,[{}].concat(ce.call(t)))},kt=function(){var t,e,n,r,o,i,s;for(r={},t=0,n=(i=1<=arguments.length?ce.call(arguments,0):[]).length;t<n;t++)if(o=i[t])for(e in o)s=o[e],V(s)&&(r[e]=s);return r},Ct=function(t,e){return e?wt(e,t):t?y(t):{}},qt=function(t,e){var n;return n=T(t),V(t[0])&&((n=y(n))[e]=t[0]),n},R=function(t,e){var n,r,o,i;for(e=ht(e),i=void 0,r=0,o=t.length;r<o;r++)if(e(n=t[r])){i=n;break}return i},$t=function(t,e){return!!A(t,e)},A=function(t,e){var n,r,o,i;for(e=ht(e),n=r=0,o=t.length;r<o;n=++r)if(i=e(t[n],n))return i},C=function(t,e){var n,r,o,i;for(e=ht(e),i=!0,n=r=0,o=t.length;r<o;n=++r)if(!e(t[n],n)){i=!1;break}return i},f=function(t){return F(t,G)},d=function(t){return Ht(t,G)},re=function(t){return t.length<2?t:Gt(a(t))},oe=function(t,r){var o;return t.length<2?t:(r=ht(r),o=new Set,F(t,function(t,e){var n;return n=r(t,e),!o.has(n)&&(o.add(n),!0)}))},Gt=function(t){var e;return e=[],t.forEach(function(t){return e.push(t)}),e},a=function(t){var e;return e=new Set,t.forEach(function(t){return e.add(t)}),e},F=function(t,n){var r;return n=ht(n),r=[],w(t,function(t,e){if(n(t,e))return r.push(t)}),r},Kt=function(t,n){return n=ht(n),F(t,function(t,e){return!n(t,e)})},D=function(t,e){return F(t,function(t){return m(e,t)})},Qt=function(t,e){return setTimeout(e,t)},Vt=function(t){return setTimeout(t,0)},Bt=function(t){return Promise.resolve().then(t)},t=function(t){var e;return e=!1,Bt(function(){if(!e)return t()}),function(){return e=!0}},ft=function(t){return t[t.length-1]},m=function(t,e){return 0<=t.indexOf(e)},At=function(t,e){var n;return n=Mt(t,Object.keys(e)),I(e,n)},Mt=function(t,e){var n,r,o,i;for(n={},r=0,i=e.length;r<i;r++)(o=e[r])in t&&(n[o]=t[o]);return n},Ht=function(t,e){var n,r;for(r in e=ht(e),n={},t)e(t[r],r,t)&&(n[r]=t[r]);return n},Pt=function(t,n){return Ht(t,function(t,e){return!m(n,e)})},se=function(){return new Promise(Ot)},Ut=function(t,e){var n;if(0<=(n=t.indexOf(e)))return t.splice(n,1),e},L=function(t){var e,n;return n=t,e=2<=arguments.length?ce.call(arguments,1):[],X(n)?n.apply(null,e):n},e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},E=function(t){return t.replace(/[&<>"']/g,function(t){return e[t]})},S=function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},jt=function(t,e){var n;return n=t[e],delete t[e],n},It=function(t,e,n){return t[n]=jt(t,e)},O=function(t,e){if(e(ft(t)))return t.pop()},_=function(t){return O(t,X)},T=function(t){return O(t,ot)||{}},q=function(t){return t},Xt=function(t){return 1===t.length?t[0]:function(){return yt(t,function(t){return t()})}},P=function(t){var e,n,r,o;for(e=[],n=0,r=t.length;n<r;n++)o=t[n],Y(o)?e.push.apply(e,o):e.push(o);return e},x=function(t,e){return P(yt(t,e))},lt=function(t){return!!t},u=function(t,e){return t.then(e,e)},St=function(t){return null!=t?t["catch"](Ot):void 0},Lt=function(){var t,n,r;return n=r=void 0,(t=new Promise(function(t,e){return r=t,n=e})).resolve=r,t.reject=n,t.promise=function(){return t},t},h=function(t){var e;try{return Promise.resolve(t())}catch(n){return e=n,Promise.reject(e)}},j=function(t){return Object.prototype.hasOwnProperty(t)},(I=function(e,n){var t,r;return(null!=e?e.valueOf:void 0)&&(e=e.valueOf()),(null!=n?n.valueOf:void 0)&&(n=n.valueOf()),typeof e==typeof n&&(Y(e)&&Y(n)?W(e,n):rt(e)&&e[I.key]?e[I.key](n):ot(e)&&ot(n)?(t=Object.keys(e),r=Object.keys(n),!!W(t,r)&&C(t,function(t){return I(e[t],n[t])})):e===n)}).key="up.util.isEqual",W=function(t,n){return t.length===n.length&&C(t,function(t,e){return I(t,n[e])})},Jt=function(t,e){return null==e&&(e=" "),pt(t)?(t=t.split(e),t=yt(t,function(t){return t.trim()}),t=F(t,it)):le(t)},_t=0,Wt=function(t){return y(t).reverse()},Nt=function(t,e){return e+ue(t)},ie=function(t,e){var n,r;if(r=new RegExp("^"+e+"(.+)$"),n=t.match(r))return mt(n[1])},v=function(t,e,r){return le(e).forEach(function(n){return Object.defineProperty(t,n,{get:function(){var t,e;return e=(t=r.call(this))[n],X(e)&&(e=e.bind(t)),e},set:function(t){return r.call(this)[n]=t}})})},dt=function(t){var e,n,r,o;for(e in n={},t)o=t[e],(r=ie(e,"get_"))?b(n,r,o):n[e]=o;return n},te=function(t){var e,n,r,o,i,s,u,a,p;if(s=200,n="",pt(t))a=(a=(a=t.replace(/[\n\r\t ]+/g," ")).replace(/^[\n\r\t ]+/,"")).replace(/[\n\r\t ]$/,"");else if(ct(t))a="undefined";else if(nt(t)||X(t))a=t.toString();else if(H(t))a="["+yt(t,te).join(", ")+"]",n="]";else if(J(t))a="$("+yt(t,te).join(", ")+")",n=")";else if(K(t)){for(a="<"+t.tagName.toLowerCase(),o=0,i=(u=["id","name","class"]).length;o<i;o++)e=u[o],(p=t.getAttribute(e))&&(a+=" "+e+'="'+p+'"');a+=">",n=">"}else if(ut(t))a=t.toString();else try{a=JSON.stringify(t)}catch(l){if("TypeError"!==(r=l).name)throw r;a="(circular structure)"}return a.length>s&&(a=a.substr(0,s)+" \u2026",a+=n),a},s=/\%[oOdisf]/g,Yt=function(t){var e,n;return n=t,e=2<=arguments.length?ce.call(arguments,1):[],Zt.apply(null,[q,n].concat(ce.call(e)))},o=function(t){return Promise.all(yt(t,St))},{parseURL:Dt,normalizeURL:Ft,urlWithoutHost:ae,matchURLs:vt,normalizeMethod:Tt,methodAllowsPayload:Et,assign:p,assignPolyfill:l,copy:y,copyArrayLike:g,merge:wt,mergeDefined:kt,options:Ct,parseArgIntoOptions:qt,each:w,eachIterator:k,map:yt,flatMap:x,mapObject:gt,times:ee,findResult:A,some:$t,every:C,find:R,filter:F,reject:Kt,intersect:D,compact:f,compactObject:d,uniq:re,uniqBy:oe,last:ft,isNull:et,isDefined:V,isUndefined:ct,isGiven:G,isMissing:Z,isPresent:it,isBlank:N,presence:zt,isObject:rt,isFunction:X,isString:pt,isBoolean:z,isNumber:nt,isElement:K,isJQuery:J,isElementish:U,isPromise:st,isOptions:ot,isArray:H,isFormData:Q,isNodeList:tt,isArguments:M,isList:Y,isRegExp:ut,timer:Qt,contains:m,objectContains:At,toArray:ne,pick:Mt,pickBy:Ht,omit:Pt,unresolvablePromise:se,remove:Ut,memoize:bt,pluckKey:jt,renameKey:It,extractOptions:T,extractCallback:_,noop:Ot,asyncNoop:c,identity:q,escapeHTML:E,escapeRegExp:S,sequence:Xt,evalOption:L,flatten:P,isTruthy:lt,newDeferred:Lt,always:u,muteRejection:St,asyncify:h,isBasicObjectProperty:j,isCrossOrigin:B,task:Vt,microtask:Bt,abortableMicrotask:t,isEqual:I,splitValues:Jt,endsWith:function(t,e){return!(e.length>t.length)&&t.substring(t.length-e.length)===e},wrapList:le,wrapValue:function(t){var e,n;return n=t,(e=2<=arguments.length?ce.call(arguments,1):[])[0]instanceof n?e[0]:function(t,e,n){n.prototype=t.prototype;var r=new n,o=t.apply(r,e);return Object(o)===o?o:r}(n,e,function(){})},simpleEase:function(t){return t<.5?2*t*t:t*(4-2*t)-1},values:xt,arrayToSet:a,setToArray:Gt,uid:function(){return _t++},upperCaseFirst:ue=function(t){return t[0].toUpperCase()+t.slice(1)},lowerCaseFirst:mt=function(t){return t[0].toLowerCase()+t.slice(1)},getter:b=function(t,e,n){return Object.defineProperty(t,e,{get:n})},delegate:v,literal:dt,reverse:Wt,prefixCamelCase:Nt,unprefixCamelCase:ie,camelToKebabCase:function(t){return t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()})},nullToUndefined:Rt,sprintf:Yt,sprintfWithFormattedArgs:Zt=function(t,e){var n,r,o,i;return r=t,i=e,n=3<=arguments.length?ce.call(arguments,2):[],i?(o=0,i.replace(s,function(){var t;return t=n[o],t=r(te(t)),o+=1,t})):""},renameKeys:function(t,e){var n,r,o;for(n in r={},t)o=t[n],r[e(n)]=o;return r},timestamp:function(){return Math.floor(.001*Date.now())},allSettled:o})}.call(this),function(){var t,o,e,n,r,i,s,u=[].slice;up.error=(s=up.util,o=function(t,e){var n;return null==e&&(e={}),s.isArray(t)&&(t=s.sprintf.apply(s,t)),n=new Error(t),s.assign(n,e),n},n=(e=function(n,r){var e;return null==r&&(r=o),(e=function(){var t,e;return t=1<=arguments.length?u.call(arguments,0):[],(e=r.apply(null,t)).name=n,e}).is=function(t){return t.name===n},e.async=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],Promise.reject(e.apply(null,t))},e})("up.Failed"),t=e("AbortError",function(t){return o(t||"Aborted")}),i=e("up.NotImplemented"),r=e("up.NotApplicable",function(t,e){return o("Cannot apply change: "+t+" ("+e+")")}),{failed:n,aborted:t,invalidSelector:e("up.InvalidSelector",function(t){return o("Cannot parse selector: "+t)}),notApplicable:r,notImplemented:i,emitGlobal:function(t){var e;return e=t.message,up.emit(window,"error",{message:e,error:t,log:!1})}})}.call(this),function(){up.migrate={config:{}}}.call(this),function(){var t,e,n,r,o,i,s,u,a,p,l,c,h,f=[].slice;up.browser=(h=up.util,p=function(t){return new up.Request(t).loadPage()},c=function(t){return t.submit()},u=h.memoize(function(){return"ActiveXObject"in window}),s=function(){return history.pushState&&"GET"===up.protocol.initialRequestMethod()},i=h.memoize(function(){return!!window.Promise}),n=h.memoize(function(){return!u()}),o=h.memoize(function(){return!u()}),r=function(){return!!window.jQuery},l=function(t){var e,n;return(n=null!=(e=document.cookie.match(new RegExp(t+"=(\\w+)")))?e[1]:void 0)&&(document.cookie=t+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/"),n},t=function(t){return!t.confirm||window.confirm(t.confirm)||function(){throw up.error.aborted("User canceled action")}()},a=function(){return i()},e=function(){var t;return t=1<=arguments.length?f.call(arguments,0):[],r()||up.fail("jQuery must be published as window.jQuery"),jQuery.apply(null,t)},h.literal({loadPage:p,submitForm:c,canPushState:s,canFormatLog:n,canPassiveEventListener:o,canJQuery:r,assertConfirmed:t,isSupported:a,popCookie:l,jQuery:e,isIE11:u}))}.call(this),function(){var n,r,e,o,t,i,s,u,a,p,l,c,h,f,d,m,y,g,v,b,w,k,E,S,L,C,_,O,T,F,R,A,x,P,q,D,M,H,j,N,z,B,V,K,U,I,W,Q,X,G,$,J,Y,Z,tt,et,nt,rt,ot,it,st,ut,at,pt,lt,ct=[].slice;up.element=(st=up.util,r=up.browser.isIE11()?"msMatchesSelector":"matches",S=function(){var t,e;return e=(t=1<=arguments.length?ct.call(arguments,0):[]).pop(),(t[0]||document).querySelector(e)},i=function(){var t,e;return e=(t=1<=arguments.length?ct.call(arguments,0):[]).pop(),(t[0]||document).querySelectorAll(e)},tt=function(t,e){var n;return n=[],N(t,e)&&n.push(t),n.push.apply(n,i(t,e)),n},q=function(t,e){var n;return n=_(e),t.contains(n)},h=function(t,e){return t.closest?t.closest(e):N(t,e)?t:s(t,e)},N=function(t,e){return"function"==typeof t[r]?t[r](e):void 0},s=function(t,e){var n;if(n=t.parentElement)return N(n,e)?n:s(n,e)},u=function(t,e){return C(h(t,e),tt(t,e))},_=function(){var t,e;return e=(t=1<=arguments.length?ct.call(arguments,0):[]).pop(),st.isElement(e)?e:st.isString(e)?S.apply(null,ct.call(t).concat([e])):st.isList(e)?(1<e.length&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",e),e[0]):e},C=function(){var t;return t=1<=arguments.length?ct.call(arguments,0):[],st.flatMap(t,pt)},pt=function(t){return st.isString(t)?i(t):st.wrapList(t)},U=function(t){var e;return t.remove?t.remove():(e=t.parentNode)?e.removeChild(t):void 0},F=function(t){return t.style.display="none"},Y=function(t){return t.style.display=""},nt=function(t,e){return null==e&&(e=!H(t)),e?Y(t):F(t)},ot=function(t,e,n){var r;return r=t.classList,null==n&&(n=!r.contains(e)),n?r.add(e):r.remove(e)},rt=function(t,e,n,r){return null==r&&(r=!t.hasAttribute(e)),r?t.setAttribute(e,n):t.removeAttribute(e)},W=function(t,e){var n,r,o;for(n in r=[],e)o=e[n],st.isGiven(o)?r.push(t.setAttribute(n,o)):r.push(t.removeAttribute(n));return r},$=function(t,e){var n,r,o,i,s;for(i={},n=0,o=(s=Object.keys(e)).length;n<o;n++)r=s[n],i[r]=t.getAttribute(r);return W(t,e),function(){return W(t,i)}},z=function(t){var e,n;return n="meta"+a("name",t),null!=(e=S(n))?e.getAttribute("content"):void 0},x=function(t,e){return t.insertAdjacentElement("beforebegin",e)},I=function(t,e){return t.parentElement.replaceChild(e,t)},b=function(t,e){var o,n,r,i,s,u,a,p,l,c,h,f,d,m,y,g,v;for(o=[],u=t.replace(/\[([\w-]+)(?:[\~\|\^\$\*]?=(["'])?([^\2\]]*?)\2)?\]/g,function(t,e,n,r){return o.push(r||""),"["+e+"]"}).split(/[ >]+/),f=i=m=void 0,a=0,c=u.length;a<c;a++){if(s=u[a],g=void 0,s=s.replace(/^[\w-]+/,function(t){return g=t,""}),i=document.createElement(g||"div"),m||(m=i),s=(s=s.replace(/\#([\w-]+)/,function(t,e){return i.id=e,""})).replace(/\.([\w-]+)/g,function(t,e){return i.classList.add(e),""}),o.length&&(s=s.replace(/\[([\w-]+)\]/g,function(t,e){return i.setAttribute(e,o.shift()),""})),""!==s)throw up.error.invalidSelector(t);null!=f&&f.appendChild(i),f=i}if(e){if(n=st.pluckKey(e,"class"))for(p=0,h=(d=st.wrapList(n)).length;p<h;p++)l=d[p],m.classList.add(l);(y=st.pluckKey(e,"style"))&&Q(m,y),(v=st.pluckKey(e,"text"))&&(m.textContent=v),(r=st.pluckKey(e,"content"))&&(m.innerHTML=r),W(m,e)}return m},t=function(t){var e,n,r,o,i,s;return o=t,e=2<=arguments.length?ct.call(arguments,1):[],n=st.extractOptions(e),2===e.length?(i=e[0],s=e[1]):(i="beforeend",s=e[0]),r=b(s,n),o.insertAdjacentElement(i,r),r},et=function(){var t,e;return t=1<=arguments.length?ct.call(arguments,0):[],(e=up.fragment).toTarget.apply(e,t)},o=["HTML","BODY","HEAD","TITLE"],e=new RegExp("\\b("+o.join("|")+")\\b","i"),D=up.mockable(function(t){return N(t,o.join(","))}),M=function(t){return e.test(t)},k=function(t){return t.tagName.toLowerCase()},a=function(t,e){return"["+t+'="'+(e=e.replace(/"/g,'\\"'))+'"]'},it=function(t){return"["+t+"]:not(["+t+"=false])"},R=function(t){return t.match(/^[a-z0-9\-_]+$/i)?"#"+t:a("id",t)},g=function(t){return(new DOMParser).parseFromString(t,"text/html")},v=function(t){var e;return(e=document.createRange()).setStart(document.body,0),e.createContextualFragment(t).childNodes[0]},O=function(){return document.documentElement},K=function(t){return t.offsetHeight},y=function(t){var e;return e=J(t,{transition:"none"}),K(t),e},T=function(t){var e,n,r;return n=(r=st.isOptions(t)?t:d(t)).transitionProperty,e=r.transitionDuration,!("none"===n||"all"===n&&0===e)},L=function(t){var e,n;return e=t.getBoundingClientRect(),t.style.position="absolute",n=t.offsetParent.getBoundingClientRect(),Q(t,{left:e.left-m(t,"margin-left")-n.left,top:e.top-m(t,"margin-top")-n.top,right:"",bottom:""})},G=function(t,e){var n,r,o;for(n in r=[],e)o=e[n],r.push(X(t,n,o));return r},X=function(t,e,n){if(st.isMissing(t.getAttribute(e)))return t.setAttribute(e,n)},ut=function(e){var n,t;return n=e.parentNode,t=st.toArray(e.childNodes),st.each(t,function(t){return n.insertBefore(t,e)}),n.removeChild(e)},lt=function(t,e){var n,r;for(null==e&&(e="up-wrapper"),r=b(e);n=t.firstChild;)r.appendChild(n);return t.appendChild(r),r},Z=function(t,e){return st.nullToUndefined(t.getAttribute(e))},p=function(t,e,n){var r;switch(r=Z(t,e)){case"false":return!1;case"true":case"":case e:return!0;default:if(n)return r}},l=function(t,e){return p(t,e,!0)},V=function(t,e){var n;if((n=t.getAttribute(e))&&(n=n.replace(/_/g,"")).match(/^[\d\.]+$/))return parseFloat(n)},j=function(t,e){var n,r;if(n="function"==typeof t.getAttribute&&null!=(r=t.getAttribute(e))?r.trim():void 0)return JSON.parse(n)},c=function(n,t,r){var o,e;if(null==r&&(r=[]),e=n.getAttribute(t))return o=function(t,e,n){n.prototype=t.prototype;var r=new n,o=t.apply(r,e);return Object(o)===o?o:r}(Function,["event"].concat(ct.call(r),[e]),function(){}),function(t){var e;return e=st.values(st.pick(t,r)),o.call.apply(o,[n,t].concat(ct.call(e)))}},f=function(t,e){var n;return null!=(n=h(t,"["+e+"]"))?n.getAttribute(e):void 0},J=function(t,e){var n;return n=A(t,Object.keys(e)),Q(t,e),function(){return Q(t,n)}},d=function(t,e){var n;return n=window.getComputedStyle(t),E(n,e)},m=function(t,e){var n;return n=d(t,e),st.isGiven(n)?parseFloat(n):void 0},A=function(t,e){var n;return n=t.style,E(n,e)},E=function(t,e){return st.isString(e)?t[e]:st.pick(t,e)},Q=function(t,e){var n,r,o,i;for(n in o=t.style,r=[],e)i=e[n],i=B(n,i),r.push(o[n]=i);return r},B=function(t,e){return st.isMissing(e)?e="":n.has(t.toLowerCase().replace(/-/,""))&&(e=w(e)),e},n=st.arrayToSet(["top","right","bottom","left","padding","paddingtop","paddingright","paddingbottom","paddingleft","margin","margintop","marginright","marginbottom","marginleft","borderwidth","bordertopwidth","borderrightwidth","borderbottomwidth","borderleftwidth","width","height","maxwidth","maxheight","minwidth","minheight"]),w=function(t){return st.isNumber(t)||st.isString(t)&&/^\d+$/.test(t)?t.toString()+"px":t},H=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},at=function(t){var e,n,r,o,i,s,u;for(u=/^up-/,n={},r=0,o=(s=t.attributes).length;r<o;r++)(i=(e=s[r]).name).match(u)&&(n[i]=e.value);return n},P=function(t){return t!==document&&!O().contains(t)},st.literal({all:i,subtree:tt,isInSubtree:q,closest:h,closestAttr:f,matches:N,ancestor:s,around:u,get:_,list:C,remove:U,toggle:nt,toggleClass:ot,hide:F,show:Y,metaContent:z,replace:I,insertBefore:x,createFromSelector:b,setAttrs:W,setTemporaryAttrs:$,affix:t,toSelector:et,idSelector:R,isSingleton:D,isSingletonSelector:M,attributeSelector:a,trueAttributeSelector:it,elementTagName:k,createDocumentFromHTML:g,createFromHTML:v,get_root:O,paint:K,concludeCSSTransition:y,hasCSSTransition:T,fixedToAbsolute:L,setMissingAttrs:G,setMissingAttr:X,unwrap:ut,wrapChildren:lt,attr:Z,booleanAttr:p,numberAttr:V,jsonAttr:j,callbackAttr:c,booleanOrStringAttr:l,setTemporaryStyle:J,style:d,styleNumber:m,inlineStyle:A,setStyle:Q,isVisible:H,upAttrs:at,toggleAttr:rt,isDetached:P}))}.call(this),function(){var n,e=[].slice;n=up.util,up.Class=function(){function t(){}return t.getter=function(t,e){return n.getter(this.prototype,t,e)},t.accessor=function(t,e){return Object.defineProperty(this.prototype,t,e)},t.delegate=function(t,e){return n.delegate(this.prototype,t,function(){return this[e]})},t.wrap=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],n.wrapValue.apply(n,[this].concat(e.call(t)))},t}()}.call(this),function(){var n,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=up.util,up.Record=function(t){function e(t){n.assign(this,this.defaults(t),this.attributes(t))}return r(e,t),e.prototype.keys=function(){throw"Return an array of keys"},e.prototype.defaults=function(){return{}},e.prototype.attributes=function(t){return null==t&&(t=this),n.pick(t,this.keys())},e.prototype[""+n.copy.key]=function(){return this.variant()},e.prototype.variant=function(t){return null==t&&(t={}),new this.constructor(n.merge(this.attributes(),t))},e.prototype[""+n.isEqual.key]=function(t){return this.constructor===t.constructor&&n.isEqual(this.attributes(),t.attributes())},e}(up.Class)}.call(this),function(){}.call(this),function(){var c;c=up.element,up.BodyShifter=function(){function t(){this.unshiftFns=[],this.reset()}return t.prototype.reset=function(){return this.unshiftNow(),this.shiftCount=0},t.prototype.shift=function(){var t,e,n,r,o,i,s,u,a,p,l;if(this.shiftCount++,!(1<this.shiftCount)&&(p=up.viewport.rootHasReducedWidthFromScrollbar(),s=up.viewport.rootOverflowElement(),this.changeStyle(s,{overflowY:"hidden"}),p)){for(e=document.body,n=(l=up.viewport.scrollbarWidth())+c.styleNumber(e,"paddingRight"),this.changeStyle(e,{paddingRight:n}),a=[],o=0,i=(u=up.viewport.anchoredRight()).length;o<i;o++)t=u[o],r=l+c.styleNumber(t,"right"),a.push(this.changeStyle(t,{right:r}));return a}},t.prototype.changeStyle=function(t,e){return this.unshiftFns.push(c.setTemporaryStyle(t,e))},t.prototype.unshift=function(){if(this.shiftCount--,!(0<this.shiftCount))return this.unshiftNow()},t.prototype.unshiftNow=function(){var t,e;for(t=[];e=this.unshiftFns.pop();)t.push(e());return t},t}()}.call(this),function(){var o,e=function(t,e){return function(){return t.apply(e,arguments)}},n=[].slice;o=up.util,up.Cache=function(){function t(t){this.config=null!=t?t:{},this.get=e(this.get,this),this.isFresh=e(this.isFresh,this),this.remove=e(this.remove,this),this.set=e(this.set,this),this.alias=e(this.alias,this),this.store=this.config.store||new up.store.Memory}return t.prototype.size=function(){return this.store.size()},t.prototype.maxSize=function(){return o.evalOption(this.config.size)},t.prototype.expiryMillis=function(){return o.evalOption(this.config.expiry)},t.prototype.normalizeStoreKey=function(t){return this.config.key?this.config.key(t):t.toString()},t.prototype.isEnabled=function(){return 0!==this.maxSize()&&0!==this.expiryMillis()},t.prototype.clear=function(){return this.store.clear()},t.prototype.log=function(){var t;if(t=1<=arguments.length?n.call(arguments,0):[],this.config.logPrefix)return t[0]="["+this.config.logPrefix+"] "+t[0],up.puts.apply(up,["up.Cache"].concat(n.call(t)))},t.prototype.keys=function(){return this.store.keys()},t.prototype.each=function(n){return o.each(this.keys(),(r=this,function(t){var e;return e=r.store.get(t),n(t,e.value,e.timestamp)}));var r},t.prototype.makeRoomForAnotherEntry=function(){var r,o;if(!this.hasRoomForAnotherEntry())return o=r=void 0,this.each(function(t,e,n){if(!o||n<o)return r=t,o=n}),r?this.store.remove(r):void 0},t.prototype.hasRoomForAnotherEntry=function(){var t;return!(t=this.maxSize())||this.size()<t},t.prototype.alias=function(t,e){var n;if(n=this.get(t,{silent:!0}),o.isDefined(n))return this.set(e,n)},t.prototype.timestamp=function(){return(new Date).valueOf()},t.prototype.set=function(t,e){var n,r;if(this.isEnabled())return this.makeRoomForAnotherEntry(),r=this.normalizeStoreKey(t),n={timestamp:this.timestamp(),value:e},this.store.set(r,n)},t.prototype.remove=function(t){var e;return e=this.normalizeStoreKey(t),this.store.remove(e)},t.prototype.isFresh=function(t){var e;return!(e=this.expiryMillis())||this.timestamp()-t.timestamp<e},t.prototype.get=function(t,e){var n,r;return null==e&&(e={}),r=this.normalizeStoreKey(t),(n=this.store.get(r))?this.isFresh(n)?(e.silent||this.log("Cache hit for '%s'",t),n.value):(e.silent||this.log("Discarding stale cache entry for '%s'",t),void this.remove(t)):void(e.silent||this.log("Cache miss for '%s'",t))},t}()}.call(this),function(){var n,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=up.util,up.Change=function(t){function e(t){this.options=t}return r(e,t),e.prototype.notApplicable=function(t){return up.error.notApplicable(this,t)},e.prototype.execute=function(){throw up.error.notImplemented()},e.prototype.onFinished=function(){var t;return"function"==typeof(t=this.options).onFinished?t.onFinished():void 0},e.prototype.improveHistoryValue=function(t,e){return!1===t||n.isString(t)?t:e},e}(up.Class)}.call(this),function(){var o,i,n=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;i=up.util,o=up.element,up.Change.Addition=function(t){function e(t){e.__super__.constructor.call(this,t),this.responseDoc=t.responseDoc,this.acceptLayer=t.acceptLayer,this.dismissLayer=t.dismissLayer,this.eventPlans=t.eventPlans||[]}return n(e,t),e.prototype.handleLayerChangeRequests=function(){return this.layer.isOverlay()&&(this.tryAcceptLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryAcceptForLocation(),this.abortWhenLayerClosed(),this.tryDismissLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryDismissForLocation(),this.abortWhenLayerClosed()),this.layer.asCurrent((i=this,function(){var t,e,n,r,o;for(o=[],e=0,n=(r=i.eventPlans).length;e<n;e++)t=r[e],up.emit(t),o.push(i.abortWhenLayerClosed());return o}));var i},e.prototype.tryAcceptLayerFromServer=function(){if(i.isDefined(this.acceptLayer)&&this.layer.isOverlay())return this.layer.accept(this.acceptLayer)},e.prototype.tryDismissLayerFromServer=function(){if(i.isDefined(this.dismissLayer)&&this.layer.isOverlay())return this.layer.dismiss(this.dismissLayer)},e.prototype.abortWhenLayerClosed=function(){if(this.layer.isClosed())throw up.error.aborted("Layer was closed")},e.prototype.setSource=function(t){var e,n,r;if(n=t.oldElement,e=t.newElement,"keep"===(r=t.source)&&(r=n&&up.fragment.source(n)),r)return o.setMissingAttr(e,"up-source",i.normalizeURL(r))},e}(up.Change)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.Change.Removal=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(up.Change)}.call(this),function(){var r,o,e=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;o=up.util,r=up.element,up.Change.CloseLayer=function(t){function n(t){var e;n.__super__.constructor.call(this,t),this.verb=t.verb,this.layer=up.layer.get(t),this.origin=t.origin,this.value=t.value,this.preventable=null==(e=t.preventable)||e}return e(n,t),n.prototype.execute=function(){var t,e,n;if(this.origin&&o.isUndefined(e)&&(e=r.jsonAttr(this.origin,"up-"+this.verb)),!this.layer.isOpen())return Promise.resolve();if(up.browser.assertConfirmed(this.options),up.network.abort((n=this,function(t){return t.layer===n.layer})),this.emitCloseEvent().defaultPrevented&&this.preventable)throw up.error.aborted("Close event was prevented");t=this.layer.parent,this.layer.peel(),this.layer.stack.remove(this.layer),t.restoreHistory(),this.handleFocus(t),this.layer.teardownHandlers(),this.layer.destroyElements(this.options),this.emitClosedEvent(t)},n.prototype.emitCloseEvent=function(){return this.layer.emit(this.buildEvent("up:layer:"+this.verb),{callback:this.layer.callback("on"+o.upperCaseFirst(this.verb)),log:"Will "+this.verb+" "+this.layer})},n.prototype.emitClosedEvent=function(t){var e,n;return e=this.verb+"ed",n=o.upperCaseFirst(e),this.layer.emit(this.buildEvent("up:layer:"+e),{baseLayer:t,callback:this.layer.callback("on"+n),ensureBubbles:!0,log:n+" "+this.layer})},n.prototype.buildEvent=function(t){return up.event.build(t,{layer:this.layer,value:this.value,origin:this.origin})},n.prototype.handleFocus=function(t){var e;return this.layer.overlayFocus.teardown(),null!=(e=t.overlayFocus)&&e.moveToFront(),(this.layer.origin||t.element).focus({preventScroll:!0})},n}(up.Change.Removal)}.call(this),function(){var n,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=up.element,up.Change.DestroyFragment=function(t){function e(t){e.__super__.constructor.call(this,t),this.layer=up.layer.get(t)||up.layer.current,this.element=this.options.element,this.animation=this.options.animation,this.log=this.options.log}return r(e,t),e.prototype.execute=function(){return this.parent=this.element.parentNode,up.fragment.markAsDestroying(this.element),up.motion.willAnimate(this.element,this.animation,this.options)?(this.emitDestroyed(),this.animate().then((e=this,function(){return e.wipe()})).then((t=this,function(){return t.onFinished()}))):(this.wipe(),this.emitDestroyed(),this.onFinished());var t,e},e.prototype.animate=function(){return up.motion.animate(this.element,this.animation,this.options)},e.prototype.wipe=function(){return this.layer.asCurrent((t=this,function(){return up.syntax.clean(t.element,{layer:t.layer}),up.browser.canJQuery()?jQuery(t.element).remove():n.remove(t.element)}));var t},e.prototype.emitDestroyed=function(){return up.fragment.emitDestroyed(this.element,{parent:this.parent,log:this.log})},e}(up.Change.Removal)}.call(this),function(){var p,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;p=up.util,up.element,up.Change.FromContent=function(t){function e(t){e.__super__.constructor.call(this,t),up.layer.normalizeOptions(this.options),this.layers=up.layer.getAll(this.options),this.origin=this.options.origin,this.preview=this.options.preview,this.mode=this.options.mode,this.origin&&(this.originLayer=up.layer.get(this.origin))}return n(e,t),e.prototype.getPlans=function(){return this.plans||(this.plans=[],this.options.fragment&&(this.options.target=this.getResponseDoc().rootSelector()),this.expandIntoPlans(this.layers,this.options.target),this.expandIntoPlans(this.layers,this.options.fallback)),this.plans},e.prototype.expandIntoPlans=function(t,o){var i,e,s,n,u,r,a;for(r=[],e=0,n=t.length;e<n;e++)s=t[e],r.push(function(){var t,e,n,r;for(r=[],t=0,e=(n=this.expandTargets(o,s)).length;t<e;t++
2
+ )a=n[t],u=p.merge(this.options,{target:a,layer:s,placement:this.defaultPlacement()}),i="new"===s?new up.Change.OpenLayer(u):new up.Change.UpdateLayer(u),r.push(this.plans.push(i));return r}.call(this));return r},e.prototype.expandTargets=function(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.mode,origin:this.origin})},e.prototype.execute=function(){var t,e;return this.options.preload?Promise.resolve():(t=function(t){return t.execute(e.getResponseDoc())},(e=this).seekPlan(t)||this.postflightTargetNotApplicable())},e.prototype.getResponseDoc=function(){var t,e;return this.preview||this.responseDoc||(e=p.pick(this.options,["target","content","fragment","document","html"]),"function"==typeof(t=up.migrate).handleResponseDocOptions&&t.handleResponseDocOptions(e),"content"===this.defaultPlacement()&&(e.target=this.firstExpandedTarget(e.target)),this.responseDoc=new up.ResponseDoc(e)),this.responseDoc},e.prototype.defaultPlacement=function(){if(!this.options.document&&!this.options.fragment)return"content"},e.prototype.firstExpandedTarget=function(t){return this.expandTargets(t||":main",this.layers[0])[0]},e.prototype.preflightProps=function(t){var e;return null==t&&(t={}),e=function(t){return t.preflightProps()},this.seekPlan(e)||t.optional||this.preflightTargetNotApplicable()},e.prototype.preflightTargetNotApplicable=function(){return this.targetNotApplicable("Could not find target in current page")},e.prototype.postflightTargetNotApplicable=function(){return this.targetNotApplicable("Could not find common target in current page and response")},e.prototype.targetNotApplicable=function(t){var e,n;return this.getPlans().length?(n=p.uniq(p.map(this.getPlans(),"target")),e=up.layer.optionToString(this.options.layer),up.fail(t+" (tried selectors %o in %s)",n,e)):this.layers.length?up.fail("No target selector given"):up.fail("Layer %o does not exist",this.options.layer)},e.prototype.seekPlan=function(t){var e,n,r,o,i;for(n=0,r=(i=this.getPlans()).length;n<r;n++){o=i[n];try{return t(o)}catch(s){e=s,up.error.notApplicable.is(e)||function(){throw e}()}}},e}(up.Change)}.call(this),function(){var i,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;i=up.util,up.Change.FromURL=function(t){function e(t){this.options=t,e.__super__.constructor.call(this,this.options),this.successOptions=this.options,this.failOptions=up.RenderOptions.deriveFailOptions(this.successOptions)}return n(e,t),e.prototype.execute=function(){var t,e,n;return(t=this.newPageReason())?(up.puts("up.render()",t),up.browser.loadPage(this.options),i.unresolvablePromise()):(e=this.makeRequest(),this.options.preload?e:i.always(e,(n=this,function(t){return n.onRequestSettled(t)})))},e.prototype.newPageReason=function(){return i.isCrossOrigin(this.options.url)?"Loading cross-origin content in new page":up.browser.canPushState()?void 0:"Loading content in new page to restore history support"},e.prototype.makeRequest=function(){var t,e,n;return n=this.preflightPropsForRenderOptions(this.successOptions),t=this.preflightPropsForRenderOptions(this.failOptions,{optional:!0}),e=i.merge(this.successOptions,n,i.renameKeys(t,up.fragment.failKey)),this.request=up.request(e),this.request},e.prototype.preflightPropsForRenderOptions=function(t,e){return new up.Change.FromContent(i.merge(t,{preview:!0})).preflightProps(e)},e.prototype.onRequestSettled=function(t){var e;if(this.response=t,this.response instanceof up.Response){if(this.isSuccessfulResponse())return this.updateContentFromResponse(["Loaded fragment from successful response to %s",this.request.description],this.successOptions);throw e=["Loaded fragment from failed response to %s (HTTP %d)",this.request.description,this.response.status],this.updateContentFromResponse(e,this.failOptions)}throw this.response},e.prototype.isSuccessfulResponse=function(){return!1===this.successOptions.fail||this.response.ok},e.prototype.buildEvent=function(t,e){var n;return n={request:this.request,response:this.response,renderOptions:this.options},up.event.build(t,i.merge(n,e))},e.prototype.updateContentFromResponse=function(t,e){var n;return n=this.buildEvent("up:fragment:loaded",{renderOptions:e}),this.request.assertEmitted(n,{log:t,callback:this.options.onLoaded}),this.augmentOptionsFromResponse(e),new up.Change.FromContent(e).execute()},e.prototype.augmentOptionsFromResponse=function(t){var e,n,r,o;return r=n=this.response.url,(e=this.request.hash)&&(r+=t.hash=e),"GET"===this.response.method?t.source=this.improveHistoryValue(t.source,n):(t.source=this.improveHistoryValue(t.source,"keep"),t.history=!!t.location),t.location=this.improveHistoryValue(t.location,r),t.title=this.improveHistoryValue(t.title,this.response.title),t.eventPlans=this.response.eventPlans,(o=this.response.target)&&(t.target=o),t.document=this.response.text,t.acceptLayer=this.response.acceptLayer,t.dismissLayer=this.response.dismissLayer,t.document||!i.isDefined(t.acceptLayer)&&!i.isDefined(t.dismissLayer)||(t.target=":none"),t.context=i.merge(t.context,this.response.context)},e}(up.Change)}.call(this),function(){var n,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=up.util,up.Change.OpenLayer=function(t){function e(t){e.__super__.constructor.call(this,t),this.target=t.target,this.origin=t.origin,this.baseLayer=t.baseLayer}return r(e,t),e.prototype.preflightProps=function(){return{layer:this.baseLayer,mode:this.options.mode,context:this.buildLayer().context,target:this.target}},e.prototype.bestPreflightSelector=function(){return this.target},e.prototype.execute=function(t){if(":none"===this.target?this.content=document.createElement("up-none"):this.content=t.select(this.target),!this.content||this.baseLayer.isClosed())throw this.notApplicable();if(up.puts("up.render()",'Opening element "'+this.target+'" in new overlay'),this.options.title=this.improveHistoryValue(this.options.title,t.getTitle()),this.emitOpenEvent().defaultPrevented)throw up.error.aborted("Open event was prevented");var e;return this.baseLayer.peel(),this.layer=this.buildLayer(),up.layer.stack.push(this.layer),this.layer.createElements(this.content),this.layer.setupHandlers(),this.handleHistory(),this.setSource({newElement:this.content,source:this.options.source}),t.finalizeElement(this.content),up.hello(this.layer.element,{layer:this.layer,origin:this.origin}),this.handleLayerChangeRequests(),this.handleScroll(),this.layer.startOpenAnimation().then((e=this,function(){return e.layer.isOpen()&&e.handleFocus(),e.onFinished()})),this.layer.opening=!1,this.emitOpenedEvent(),this.abortWhenLayerClosed(),new up.RenderResult({layer:this.layer,fragments:[this.content]})},e.prototype.buildLayer=function(){return up.layer.build(n.merge(this.options,{opening:!0}))},e.prototype.handleHistory=function(){return"auto"===this.layer.historyVisible&&(this.layer.historyVisible=up.fragment.hasAutoHistory(this.content)),this.layer.parent.saveHistory(),this.options.history=!0,this.layer.updateHistory(this.options)},e.prototype.handleFocus=function(){var t;return null!=(t=this.baseLayer.overlayFocus)&&t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.content,layer:this.layer,autoMeans:["autofocus","layer"]}).process(this.options.focus)},e.prototype.handleScroll=function(){var t;return t=n.merge(this.options,{fragment:this.content,layer:this.layer,autoMeans:["hash","layer"]}),new up.FragmentScrolling(t).process(this.options.scroll)},e.prototype.emitOpenEvent=function(){return up.emit("up:layer:open",{origin:this.origin,baseLayer:this.baseLayer,layerOptions:this.options,log:"Opening new "+this.layer})},e.prototype.emitOpenedEvent=function(){return this.layer.emit("up:layer:opened",{origin:this.origin,callback:this.layer.callback("onOpened"),log:"Opened new "+this.layer})},e}(up.Change.Addition)}.call(this),function(){var f,d,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;d=up.util,f=up.element,up.Change.UpdateLayer=function(t){function e(t){this.executeStep=n(this.executeStep,this),e.__super__.constructor.call(this,t),this.layer=t.layer,this.target=t.target,this.placement=t.placement,this.context=t.context,this.parseSteps()}return r(e,t),e.prototype.preflightProps=function(){return this.matchPreflight(),{layer:this.layer,mode:this.layer.mode,context:d.merge(this.layer.context,this.context),target:this.bestPreflightSelector()}},e.prototype.bestPreflightSelector=function(){return this.matchPreflight(),d.map(this.steps,"selector").join(", ")||":none"},e.prototype.execute=function(t){var e,n;return this.responseDoc=t,this.matchPostflight(),up.puts("up.render()",'Updating "'+this.bestPreflightSelector()+'" in '+this.layer),this.options.title=this.improveHistoryValue(this.options.title,this.responseDoc.getTitle()),this.setScrollAndFocusOptions(),this.options.saveScroll&&up.viewport.saveScroll({layer:this.layer}),this.options.peel&&this.layer.peel(),d.assign(this.layer.context,this.context),"auto"===this.options.history&&(this.options.history=this.hasAutoHistory()),this.layer.updateHistory(d.pick(this.options,["history","location","title"])),this.handleLayerChangeRequests(),e=this.steps.map(this.executeStep),Promise.all(e).then((n=this,function(){return n.abortWhenLayerClosed(),n.onFinished()})),new up.RenderResult({layer:this.layer,fragments:d.map(this.steps,"newElement")})},e.prototype.executeStep=function(t){var e,n,r,o,i,s,u,a,p,l,c,h;switch(this.setSource(t),t.placement){case"swap":return(e=this.findKeepPlan(t))?(up.fragment.emitKept(e),this.handleFocus(t.oldElement,t),this.handleScroll(t.oldElement,t)):(this.transferKeepableElements(t),i=t.oldElement.parentNode,n=d.merge(t,{beforeStart:function(){return up.fragment.markAsDestroying(t.oldElement)},afterInsert:(h=this,function(){return h.responseDoc.finalizeElement(t.newElement),up.hello(t.newElement,t)}),beforeDetach:(c=this,function(){return up.syntax.clean(t.oldElement,{layer:c.layer})}),afterDetach:function(){return f.remove(t.oldElement),up.fragment.emitDestroyed(t.oldElement,{parent:i,log:!1})},scrollNew:(l=this,function(){return l.handleFocus(t.newElement,t),l.handleScroll(t.newElement,t)})}),up.morph(t.oldElement,t.newElement,t.transition,n));case"content":return o=f.wrapChildren(t.oldElement),r=f.wrapChildren(t.newElement),a=d.merge(t,{placement:"swap",oldElement:o,newElement:r,focus:!1}),this.executeStep(a).then((p=this,function(){return f.unwrap(r),p.handleFocus(t.oldElement,t)}));case"before":case"after":return u=f.wrapChildren(t.newElement),s="before"===t.placement?"afterbegin":"beforeend",t.oldElement.insertAdjacentElement(s,u),this.responseDoc.finalizeElement(u),up.hello(u,t),this.handleFocus(u,t),this.handleScroll(u,t).then(function(){return up.animate(u,t.transition,t)}).then(function(){return f.unwrap(u)});default:return up.fail("Unknown placement: %o",t.placement)}},e.prototype.findKeepPlan=function(t){var e,n,r,o,i,s;if(t.keep)return r=t.oldElement,n=t.newElement,(i=f.booleanOrStringAttr(r,"up-keep"))&&(!0===i&&(i="&"),e={layer:this.layer,origin:r},(o=t.descendantsOnly?up.fragment.get(n,i,e):up.fragment.subtree(n,i,e)[0])&&f.matches(o,"[up-keep]")&&(s={oldElement:r,newElement:o,newData:up.syntax.data(o)},!up.fragment.emitKeep(s).defaultPrevented))?s:void 0},e.prototype.transferKeepableElements=function(t){var e,n,r,o,i,s,u;if(n=[],t.keep)for(e=0,i=(u=t.oldElement.querySelectorAll("[up-keep]")).length;e<i;e++)r=u[e],(s=this.findKeepPlan(d.merge(t,{oldElement:r,descendantsOnly:!0})))&&(o=r.cloneNode(!0),f.replace(r,o),f.replace(s.newElement,r),n.push(s));return t.keepPlans=n},e.prototype.parseSteps=function(){var t,e,n,r,o,i,s;for(this.steps=[],o=[],e=0,n=(r=d.splitValues(this.target,",")).length;e<n;e++)":none"!==(i=r[e])?(t=i.match(/^(.+?)(?:\:(before|after))?$/)||function(){throw up.error.invalidSelector(i)}(),s=d.merge(this.options,{selector:t[1],placement:t[2]||this.placement||"swap"}),o.push(this.steps.push(s))):o.push(void 0);return o},e.prototype.matchPreflight=function(){var t,e,n,r,o;if(!this.matchedPreflight){for(e=0,n=(r=this.steps).length;e<n;e++)o=r[e],t=new up.FragmentFinder(o),o.oldElement||(o.oldElement=t.find()||function(){throw this.notApplicable('Could not find element "'+this.target+'" in current page')}.call(this));return this.resolveOldNesting(),this.matchedPreflight=!0}},e.prototype.matchPostflight=function(){var t,e,n,r;if(!this.matchedPostflight){for(this.matchPreflight(),t=0,e=(n=this.steps).length;t<e;t++)(r=n[t]).newElement=this.responseDoc.select(r.selector)||function(){throw this.notApplicable('Could not find element "'+this.target+'" in server response')}.call(this);return this.options.hungry&&this.addHungrySteps(),this.resolveOldNesting(),this.matchedPostflight=!0}},e.prototype.addHungrySteps=function(){var t,e,n,r,o,i,s,u;for(i=[],e=0,n=(t=up.fragment.all(up.radio.hungrySelector(),this.options)).length;e<n;e++)o=t[e],s=up.fragment.toTarget(o),(r=this.responseDoc.select(s))?(u=f.booleanOrStringAttr(o,"transition"),i.push(this.steps.push({selector:s,oldElement:o,newElement:r,transition:u,placement:"swap"}))):i.push(void 0);return i},e.prototype.containedByRivalStep=function(t,e){return d.some(t,function(t){return t!==e&&("swap"===t.placement||"content"===t.placement)&&t.oldElement.contains(e.oldElement)})},e.prototype.resolveOldNesting=function(){var e,n;return e=d.uniqBy(this.steps,"oldElement"),e=d.reject(e,(n=this,function(t){return n.containedByRivalStep(e,t)})),this.steps=e},e.prototype.setScrollAndFocusOptions=function(){return this.steps.forEach((n=this,function(t,e){if(0<e&&(t.scroll=!1,t.focus=!1),"swap"===t.placement||"content"===t.placement)return t.scrollBehavior="auto",null!=n.focusCapsule?n.focusCapsule:n.focusCapsule=up.FocusCapsule.preserveWithin(t.oldElement)}));var n},e.prototype.handleFocus=function(t,e){return new up.FragmentFocus(d.merge(e,{fragment:t,layer:this.layer,focusCapsule:this.focusCapsule,autoMeans:up.fragment.config.autoFocus})).process(e.focus)},e.prototype.handleScroll=function(t,e){return new up.FragmentScrolling(d.merge(e,{fragment:t,layer:this.layer,autoMeans:up.fragment.config.autoScroll})).process(e.scroll)},e.prototype.hasAutoHistory=function(){var t;return t=d.map(this.steps,"oldElement"),d.some(t,function(t){return up.fragment.hasAutoHistory(t)})},e}(up.Change.Addition)}.call(this),function(){var n,l,r=function(t,e){return function(){return t.apply(e,arguments)}};l=up.util,n=up.element,up.CompilerPass=function(){function t(t,e,n){this.root=t,this.compilers=e,null==n&&(n={}),this.isInSkippedSubtree=r(this.isInSkippedSubtree,this),this.skipSubtrees=n.skip,this.skipSubtrees.length&&this.root.querySelector("[up-keep]")||(this.skipSubtrees=void 0),this.layer=n.layer||up.layer.get(this.root)||up.layer.current,this.errors=[]}return t.prototype.run=function(){var i;if(up.puts("up.hello()","Compiling fragment %o",this.root),this.layer.asCurrent((i=this,function(){var t,e,n,r,o;for(o=[],e=0,n=(r=i.compilers).length;e<n;e++)t=r[e],o.push(i.runCompiler(t));return o})),this.errors.length)throw up.error.failed("Errors while compiling",{errors:this.errors})},t.prototype.runCompiler=function(t){var e,n,r,o,i,s,u,a,p;if((u=this.select(t.selector)).length){if(t.isDefault||up.puts("up.hello()",'Compiling "%s" on %d element(s)',t.selector,u.length),t.batch)this.compileBatch(t,u);else for(e=0,o=u.length;e<o;e++)s=u[e],this.compileOneElement(t,s);if(r=t.keep){for(p=l.isString(r)?r:"",a=[],n=0,i=u.length;n<i;n++)s=u[n],a.push(s.setAttribute("up-keep",p));return a}}},t.prototype.compileOneElement=function(t,e){var n,r,o,i;if(n=[t.jQuery?up.browser.jQuery(e):e],1!==t.length&&(r=up.syntax.data(e),n.push(r)),i=this.applyCompilerFunction(t,e,n),o=this.destructorPresence(i))return up.destructor(e,o)},t.prototype.compileBatch=function(t,e){var n,r,o;if(n=[t.jQuery?up.browser.jQuery(e):e],1!==t.length&&(r=l.map(e,up.syntax.data),n.push(r)),o=this.applyCompilerFunction(t,e,n),this.destructorPresence(o))return up.fail("Compilers with { batch: true } cannot return destructors")},t.prototype.applyCompilerFunction=function(t,e,n){var r;try{return t.apply(e,n)}catch(o){return r=o,this.errors.push(r),up.log.error("up.hello()","While compiling %o: %o",e,r),up.error.emitGlobal(r)}},t.prototype.destructorPresence=function(t){if(l.isFunction(t)||l.isArray(t)&&l.every(t,l.isFunction))return t},t.prototype.select=function(t){var e;return e=n.subtree(this.root,l.evalOption(t)),this.skipSubtrees&&(e=l.reject(e,this.isInSkippedSubtree)),e},t.prototype.isInSkippedSubtree=function(t){var e;return!!l.contains(this.skipSubtrees,t)||!!(e=t.parentElement)&&this.isInSkippedSubtree(e)},t}()}.call(this),function(){var n,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=up.util,up.Config=function(t){function e(t){this.blueprintFn=null!=t?t:function(){return{}},this.reset()}return r(e,t),e.prototype.reset=function(){return n.assign(this,this.blueprintFn())},e}(up.Class)}.call(this),function(){var r,o,i=function(t,e){return function(){return t.apply(e,arguments)}};o=up.util,r=up.element,up.CSSTransition=function(){function t(t,e,n){this.element=t,this.lastFrameKebab=e,this.onTransitionEnd=i(this.onTransitionEnd,this),this.onFinishEvent=i(this.onFinishEvent,this),this.lastFrameKeysKebab=Object.keys(this.lastFrameKebab),o.some(this.lastFrameKeysKebab,function(t){return t.match(/A-Z/)})&&up.fail("Animation keys must be kebab-case"),this.finishEvent=n.finishEvent,this.duration=n.duration,this.easing=n.easing,this.finished=!1}return t.prototype.start=function(){return 0===this.lastFrameKeysKebab.length?(this.finished=!0,Promise.resolve()):(this.deferred=o.newDeferred(),this.pauseOldTransition(),this.startTime=new Date,this.startFallbackTimer(),this.listenToFinishEvent(),this.listenToTransitionEnd(),this.startMotion(),this.deferred.promise())},t.prototype.listenToFinishEvent=function(){if(this.finishEvent)return this.stopListenToFinishEvent=this.element.addEventListener(this.finishEvent,this.onFinishEvent)},t.prototype.onFinishEvent=function(t){return t.stopPropagation(),this.finish()},t.prototype.startFallbackTimer=function(){var t,e;return t=100,this.fallbackTimer=o.timer(this.duration+t,(e=this,function(){return e.finish()}))},t.prototype.stopFallbackTimer=function(){return clearTimeout(this.fallbackTimer)},t.prototype.listenToTransitionEnd=function(){return this.stopListenToTransitionEnd=up.on(this.element,"transitionend",this.onTransitionEnd)},t.prototype.onTransitionEnd=function(t){var e;if(t.target===this.element&&new Date-this.startTime>.25*this.duration&&(e=t.propertyName,o.contains(this.lastFrameKeysKebab,e)))return this.finish()},t.prototype.finish=function(){if(!this.finished)return this.finished=!0,this.stopFallbackTimer(),"function"==typeof this.stopListenToFinishEvent&&this.stopListenToFinishEvent(),"function"==typeof this.stopListenToTransitionEnd&&this.stopListenToTransitionEnd(),r.concludeCSSTransition(this.element),this.resumeOldTransition(),this.deferred.resolve()},t.prototype.pauseOldTransition=function(){var t,e,n;if(t=r.style(this.element,["transitionProperty","transitionDuration","transitionDelay","transitionTimingFunction"]),r.hasCSSTransition(t))return"all"!==t.transitionProperty&&(n=t.transitionProperty.split(/\s*,\s*/),e=r.style(this.element,n),this.setOldTransitionTargetFrame=r.setTemporaryStyle(this.element,e)),this.setOldTransition=r.concludeCSSTransition(this.element)},t.prototype.resumeOldTransition=function(){return"function"==typeof this.setOldTransitionTargetFrame&&this.setOldTransitionTargetFrame(),"function"==typeof this.setOldTransition?this.setOldTransition():void 0},t.prototype.startMotion=function(){return r.setStyle(this.element,{transitionProperty:Object.keys(this.lastFrameKebab).join(", "),transitionDuration:this.duration+"ms",transitionTimingFunction:this.easing}),r.setStyle(this.element,this.lastFrameKebab)},t}()}.call(this),function(){var a;a=up.util,up.element,up.DestructorPass=function(){function t(t,e){this.fragment=t,this.options=e,this.errors=[]}return t.prototype.run=function(){var t,e,n,r,o,i,s,u;for(r=0,i=(u=this.selectCleanables()).length;r<i;r++){if(t=u[r],n=a.pluckKey(t,"upDestructors"))for(o=0,s=n.length;o<s;o++)e=n[o],this.applyDestructorFunction(e,t);t.classList.remove("up-can-clean")}if(this.errors.length)throw up.error.failed("Errors while destroying",{errors:this.errors})},t.prototype.selectCleanables=function(){var t;return t=a.merge(this.options,{destroying:!0}),up.fragment.subtree(this.fragment,".up-can-clean",t)},t.prototype.applyDestructorFunction=function(t,e){var n;try{return t()}catch(r){return n=r,this.errors.push(n),up.log.error("up.destroy()","While destroying %o: %o",e,n),up.error.emitGlobal(n)}},t}()}.call(this),function(){var i,s,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,u=[].slice;s=up.util,i=up.element,up.EventEmitter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["target","event","baseLayer","callback","log","ensureBubbles"]},e.prototype.emit=function(){var t;return this.logEmission(),this.baseLayer?this.baseLayer.asCurrent((t=this,function(){return t.dispatchEvent()})):this.dispatchEvent(),this.event},e.prototype.dispatchEvent=function(){return this.target.dispatchEvent(this.event),this.ensureBubbles&&i.isDetached(this.target)&&document.dispatchEvent(this.event),"function"==typeof this.callback?this.callback(this.event):void 0},e.prototype.assertEmitted=function(){var t;return!(t=this.emit()).defaultPrevented||function(){throw up.error.aborted("Event "+t.type+" was prevented")}()},e.prototype.logEmission=function(){var t,e,n,r;if(up.log.isEnabled())return t=this.log,s.isArray(t)?(t=(n=t)[0],e=2<=n.length?u.call(n,1):[]):e=[],r=this.event.type,s.isString(t)?up.puts.apply(up,[r,t].concat(u.call(e))):!1!==t?up.puts(r,"Event "+r):void 0},e.fromEmitArgs=function(t,e){var n,r,o;return null==e&&(e={}),r=s.extractOptions(t),r=s.merge(e,r),s.isElementish(t[0])?r.target=i.get(t.shift()):t[0]instanceof up.Layer&&(r.layer=t.shift()),r.layer&&(n=up.layer.get(r.layer),null==r.target&&(r.target=n.element),null==r.baseLayer&&(r.baseLayer=n)),r.baseLayer&&(r.baseLayer=up.layer.get(r.baseLayer)),s.isString(r.target)?r.target=up.fragment.get(r.target,{layer:r.layer}):r.target||(r.target=document),(null!=(o=t[0])?o.preventDefault:void 0)?(r.event=t[0],null==r.log&&(r.log=t[0].log)):s.isString(t[0])?r.event=up.event.build(t[0],r):r.event=up.event.build(r),new this(r)},e}(up.Record)}.call(this),function(){var a,p,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;p=up.util,a=up.element,up.EventListener=function(t){function e(t){this.nativeCallback=n(this.nativeCallback,this),e.__super__.constructor.call(this,t),this.key=this.constructor.buildKey(t),this.isDefault=up.framework.isBooting()}return r(e,t),e.prototype.keys=function(){return["element","eventType","selector","callback","jQuery","guard","baseLayer","passive","once"]},e.prototype.bind=function(){var t,e,n;return(e=(t=this.element).upEventListeners||(t.upEventListeners={}))[this.key]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),(n=(e[this.key]=this).element).addEventListener.apply(n,this.addListenerArgs())},e.prototype.addListenerArgs=function(){var t;return t=[this.eventType,this.nativeCallback],this.passive&&up.browser.canPassiveEventListener()&&t.push({passive:!0}),t},e.prototype.unbind=function(){var t,e;return(t=this.element.upEventListeners)&&delete t[this.key],(e=this.element).removeEventListener.apply(e,this.addListenerArgs())},e.prototype.nativeCallback=function(t){var e,n,r,o,i,s,u;if(this.once&&this.unbind(),o=t.target,this.selector&&(o=a.closest(o,p.evalOption(this.selector))),!this.guard||this.guard(t))return o?(i=this.jQuery?up.browser.jQuery(o):o,n=[t,i],1!==(s=this.callback.length)&&2!==s&&(r=up.syntax.data(o),n.push(r)),e=function(){return u.callback.apply(o,n)},(u=this).baseLayer?this.baseLayer.asCurrent(e):e()):void 0},e.fromElement=function(t){var e;if(e=t.element.upEventListeners)return e[this.buildKey(t)]},e.buildKey=function(t){var e;return(e=t.callback).upUid||(e.upUid=p.uid()),[t.eventType,t.selector,t.callback.upUid].join("|")},e.unbindNonDefault=function(t){var e,n,r,o,i,s;if(i=t.upEventListeners){for(s=[],e=0,n=(o=p.values(i)).length;e<n;e++)(r=o[e]).isDefault?s.push(void 0):s.push(r.unbind());return s}},e}(up.Record)}.call(this),function(){var a,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;a=up.util,up.EventListenerGroup=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["elements","eventTypes","selector","callback","jQuery","guard","baseLayer","passive","once"]},e.prototype.bind=function(){var n;return n=[],this.eachListenerAttributes(function(t){var e;return(e=new up.EventListener(t)).bind(),n.push(function(){return e.unbind()})}),a.sequence(n)},e.prototype.eachListenerAttributes=function(o){var i,s,t,e,n,r;for(r=[],t=0,e=(n=this.elements).length;t<e;t++)i=n[t],r.push(function(){var t,e,n,r;for(r=[],t=0,e=(n=this.eventTypes).length;t<e;t++)s=n[t],r.push(o(this.listenerAttributes(i,s)));return r}.call(this));return r},e.prototype.listenerAttributes=function(t,e){return a.merge(this.attributes(),{element:t,eventType:e})},e.prototype.unbind=function(){return this.eachListenerAttributes(function(t){var e;if(e=up.EventListener.fromElement(t))return e.unbind()})},e.fromBindArgs=function(t,e){var n,r,o,i,s,u;return n=(t=a.copy(t)).pop(),r=t[0].addEventListener?[t.shift()]:a.isJQuery(t[0])||a.isList(t[0])&&t[0][0].addEventListener?t.shift():[document],o=a.splitValues(t.shift()),(i=up.migrate.fixEventTypes)&&(o=i(o)),s=a.extractOptions(t),u=t[0],new this(a.merge({elements:r,eventTypes:o,selector:u,callback:n},s,e))},e}(up.Record)}.call(this),function(){var r,p,o=function(t,e){return function(){return t.apply(e,arguments)}};p=up.util,r=up.element,up.FieldObserver=function(){function t(t,e,n){this.callback=n,this.isNewValues=o(this.isNewValues,this),this.scheduleValues=o(this.scheduleValues,this),this.fields=r.list(t),this.delay=e.delay,this.batch=e.batch}return t.prototype.start=function(){return this.scheduledValues=null,this.processedValues=this.readFieldValues(),this.currentTimer=void 0,this.callbackRunning=!1,this.unbind=up.on(this.fields,"input change",(t=this,function(){return t.check()}));var t},t.prototype.stop=function(){return this.unbind(),this.cancelTimer()},t.prototype.cancelTimer=function(){return clearTimeout(this.currentTimer),this.currentTimer=void 0},t.prototype.scheduleTimer=function(){return this.cancelTimer(),this.currentTimer=p.timer(this.delay,(t=this,function(){return t.currentTimer=void 0,t.requestCallback()}));var t},t.prototype.scheduleValues=function(t){return this.scheduledValues=t,this.scheduleTimer()},t.prototype.isNewValues=function(t){return!p.isEqual(t,this.processedValues)&&!p.isEqual(this.scheduledValues,t)},t.prototype.requestCallback=function(){var t,e,n,r,o;if(null!==this.scheduledValues&&!this.currentTimer&&!this.callbackRunning){if(e=this.changedValues(this.processedValues,this.scheduledValues),this.processedValues=this.scheduledValues,this.scheduledValues=null,this.callbackRunning=!0,t=[],this.batch)t.push(this.callback(e));else for(n in e)r=e[n],t.push(this.callback(r,n));return p.allSettled(t).then((o=this,function(){return o.callbackRunning=!1,o.requestCallback()}))}},t.prototype.changedValues=function(t,e){var n,r,o,i,s,u,a;for(n={},i=(i=Object.keys(t)).concat(Object.keys(e)),r=0,s=(i=p.uniq(i)).length;r<s;r++)a=t[o=i[r]],u=e[o],p.isEqual(a,u)||(n[o]=u);return n},t.prototype.readFieldValues=function(){return up.Params.fromFields(this.fields).toObject()},t.prototype.check=function(){var t;if(t=this.readFieldValues(),this.isNewValues(t))return this.scheduleValues(t)},t}()}.call(this),function(){var u,r,o,i,n=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;up.util,r=up.element,u=["selectionStart","selectionEnd","scrollLeft","scrollTop"],i=function(t,e){var n,r,o,i;for(i=[],n=0,o=u.length;n<o;n++){r=u[n];try{i.push(e[r]=t[r])}catch(s){s}}return i},o=function(t){var e;if(e=document.activeElement,r.isInSubtree(t,e))return e},up.FocusCapsule=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["selector","oldElement"].concat(u)},e.prototype.restore=function(t,e){var n;if(this.wasLost())return(n=r.get(t,this.selector))?(i(this,n),up.focus(n,e),!0):void 0},e.preserveWithin=function(t){var e,n;if(e=o(t))return n={oldElement:t,selector:up.fragment.toTarget(e)},i(e,n),new this(n)},e.prototype.wasLost=function(){return!o(this.oldElement)},e}(up.Record)}.call(this),function(){var n;n=/^([^ >+(]+) (.+)$/,up.FragmentFinder=function(){function t(t){this.options=t,this.origin=this.options.origin,this.selector=this.options.selector,this.layer=this.options.layer}return t.prototype.find=function(){return this.findAroundOrigin()||this.findInLayer()},t.prototype.findAroundOrigin=function(){if(this.origin&&up.fragment.config.matchAroundOrigin&&!up.element.isDetached(this.origin))return this.findClosest()||this.findInVicinity()},t.prototype.findClosest=function(){return up.fragment.closest(this.origin,this.selector,this.options)},t.prototype.findInVicinity=function(){var t,e;if((e=this.selector.match(n))&&(t=up.fragment.closest(this.origin,e[1],this.options)))return up.fragment.getDumb(t,e[2])},t.prototype.findInLayer=function(){return up.fragment.getDumb(this.selector,this.options)},t}()}.call(this),function(){var r,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;r=up.util,up.FragmentProcessor=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["fragment","autoMeans","origin","layer"]},e.prototype.process=function(t){return this.tryProcess(t)},e.prototype.tryProcess=function(t){var e,n;if(r.isArray(t))return r.find(t,(n=this,function(t){return n.tryProcess(t)}));if(r.isFunction(t))return this.tryProcess(t(this.fragment,this.attributes()));if(r.isElement(t))return this.processElement();if(r.isString(t)){if("auto"===t)return this.tryProcess(this.autoMeans);if(e=t.match(/^(.+?)-if-(.+?)$/))return this.resolveCondition(e[2])&&this.process(e[1])}return this.processPrimitive(t)},e.prototype.resolveCondition=function(t){if("main"===t)return up.fragment.contains(this.fragment,":main")},e.prototype.findSelector=function(t){var e,n;if(e={layer:this.layer,origin:this.origin},n=up.fragment.get(this.fragment,t,e)||up.fragment.get(t,e))return n;up.warn("up.render()",'Could not find an element matching "%s"',t)},e}(up.Record)}.call(this),function(){var n,r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;o=up.util,r=up.element,n={preventScroll:!0},up.FragmentFocus=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.keys=function(){return e.__super__.keys.call(this).concat(["hash","focusCapsule"])},e.prototype.processPrimitive=function(t){switch(t){case"keep":return this.restoreFocus();case"target":case!0:return this.focusElement(this.fragment);case"layer":return this.focusElement(this.layer.getFocusElement());case"main":return this.focusSelector(":main");case"hash":return this.focusHash();case"autofocus":return this.autofocus();default:if(o.isString(t))return this.focusSelector(t)}},
3
+ e.prototype.processElement=function(t){return this.focusElement(t)},e.prototype.resolveCondition=function(t){return"lost"===t?this.wasFocusLost():e.__super__.resolveCondition.call(this,t)},e.prototype.focusSelector=function(t){var e;if(e=this.findSelector(t))return this.focusElement(e)},e.prototype.restoreFocus=function(){var t;return null!=(t=this.focusCapsule)?t.restore(this.fragment,n):void 0},e.prototype.autofocus=function(){var t;if(t=r.subtree(this.fragment,"[autofocus]")[0])return up.focus(t,n),!0},e.prototype.focusElement=function(t){return up.viewport.makeFocusable(t),up.focus(t,n),!0},e.prototype.focusHash=function(){var t;if(t=up.viewport.firstHashTarget(this.hash,{layer:this.layer}))return this.focusElement(t)},e.prototype.wasFocusLost=function(){var t;return null!=(t=this.focusCapsule)?t.wasLost():void 0},e}(up.FragmentProcessor)}.call(this),function(){var e,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;e=up.util,up.element,up.FragmentScrolling=function(t){function n(t){var e;"function"==typeof(e=up.migrate).handleScrollOptions&&e.handleScrollOptions(t),n.__super__.constructor.call(this,t)}return r(n,t),n.prototype.keys=function(){return n.__super__.keys.apply(this,arguments).concat(["hash","mode","revealTop","revealMax","revealSnap","scrollBehavior","scrollSpeed"])},n.prototype.process=function(t){return n.__super__.process.call(this,t)||Promise.resolve()},n.prototype.processPrimitive=function(t){switch(t){case"reset":return this.reset();case"layer":return this.revealLayer();case"main":return this.revealSelector(":main");case"restore":return this.restore();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.revealElement(this.fragment);default:if(e.isString(t))return this.revealSelector(t)}},n.prototype.processElement=function(t){return this.revealElement(t)},n.prototype.revealElement=function(t){return up.reveal(t,this.attributes())},n.prototype.revealSelector=function(t){var e;if(e=this.findSelector(t))return this.revealElement(e)},n.prototype.revealLayer=function(){return this.revealElement(this.layer.getBoxElement())},n.prototype.reset=function(){return up.viewport.resetScroll(e.merge(this.attributes(),{around:this.fragment}))},n.prototype.restore=function(){return up.viewport.restoreScroll(e.merge(this.attributes(),{around:this.fragment}))},n}(up.FragmentProcessor)}.call(this),function(){var a,e,i=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,a=up.element,up.HTMLWrapper=function(){function t(t,e){var n,r,o;this.tagName=t,null==e&&(e={}),this.wrapMatch=i(this.wrapMatch,this),o="<"+this.tagName+"[^>]*>",n="</"+this.tagName+">",r="(.|\\s)*?",this.pattern=new RegExp(o+r+n,"ig"),this.attrName="up-wrapped-"+this.tagName}return t.prototype.strip=function(t){return t.replace(this.pattern,"")},t.prototype.wrap=function(t){return t.replace(this.pattern,this.wrapMatch)},t.prototype.wrapMatch=function(t){return this.didWrap=!0,'<meta name="'+this.attrName+'" value="'+e.escapeHTML(t)+'">'},t.prototype.unwrap=function(t){var e,n,r,o,i,s,u;if(this.didWrap){for(s=[],e=0,n=(o=t.querySelectorAll("meta[name='"+this.attrName+"']")).length;e<n;e++)r=(u=o[e]).getAttribute("value"),i=a.createFromHTML(r),s.push(a.replace(u,i));return s}},t}()}.call(this),function(){var n,r,o=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,u=[].slice;n=up.element,r=up.util,up.Layer=function(t){function e(t){if(null==t&&(t={}),this.containsEventTarget=o(this.containsEventTarget,this),this.contains=o(this.contains,this),e.__super__.constructor.call(this,t),!this.mode)throw"missing { mode } option"}return i(e,t),e.prototype.keys=function(){return["element","stack","historyVisible","mode","context","lastScrollTops"]},e.prototype.defaults=function(){return{context:{},lastScrollTops:new up.Cache({size:30,key:up.history.normalizeURL})}},e.prototype.setupHandlers=function(){return up.link.convertClicks(this)},e.prototype.teardownHandlers=function(){},e.prototype.mainTargets=function(){return up.layer.mainTargets(this.mode)},e.prototype.sync=function(){},e.prototype.accept=function(){throw up.error.notImplemented()},e.prototype.dismiss=function(){throw up.error.notImplemented()},e.prototype.peel=function(t){return this.stack.peel(this,t)},e.prototype.evalOption=function(t){return r.evalOption(t,this)},e.prototype.isCurrent=function(){return this.stack.isCurrent(this)},e.prototype.isFront=function(){return this.stack.isFront(this)},e.prototype.isRoot=function(){return this.stack.isRoot(this)},e.prototype.isOverlay=function(){return this.stack.isOverlay(this)},e.prototype.isOpen=function(){return this.stack.isOpen(this)},e.prototype.isClosed=function(){return this.stack.isClosed(this)},e.getter("parent",function(){return this.stack.parentOf(this)}),e.getter("child",function(){return this.stack.childOf(this)}),e.getter("ancestors",function(){return this.stack.ancestorsOf(this)}),e.getter("descendants",function(){return this.stack.descendantsOf(this)}),e.getter("index",function(){return this.stack.indexOf(this)}),e.prototype.getContentElement=function(){return this.contentElement||this.element},e.prototype.getBoxElement=function(){return this.boxElement||this.element},e.prototype.getFocusElement=function(){return this.getBoxElement()},e.prototype.getFirstSwappableElement=function(){throw up.error.notImplemented()},e.prototype.contains=function(t){return n.closest(t,up.layer.anySelector())===this.element},e.prototype.on=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],this.buildEventListenerGroup(t).bind()},e.prototype.off=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],this.buildEventListenerGroup(t).unbind()},e.prototype.buildEventListenerGroup=function(t){return up.EventListenerGroup.fromBindArgs(t,{guard:this.containsEventTarget,elements:[this.element],baseLayer:this})},e.prototype.containsEventTarget=function(t){return this.contains(t.target)},e.prototype.wasHitByMouseEvent=function(t){var e;return!(e=document.elementFromPoint(t.clientX,t.clientY))||this.contains(e)},e.prototype.buildEventEmitter=function(t){return up.EventEmitter.fromEmitArgs(t,{layer:this})},e.prototype.emit=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],this.buildEventEmitter(t).emit()},e.prototype.isDetached=function(){return n.isDetached(this.element)},e.prototype.saveHistory=function(){if(this.isHistoryVisible())return this.savedTitle=document.title,this.savedLocation=up.history.location},e.prototype.restoreHistory=function(){if(this.savedLocation&&(up.history.push(this.savedLocation),this.savedLocation=null),this.savedTitle)return document.title=this.savedTitle,this.savedTitle=null},e.prototype.asCurrent=function(t){return this.stack.asCurrent(this,t)},e.prototype.updateHistory=function(t){if(t.history)return r.isString(t.title)&&(this.title=t.title),r.isString(t.location)?this.location=t.location:void 0},e.accessor("title",{get:function(){return this.showsLiveHistory()?document.title:this.savedTitle},set:function(t){if(this.savedTitle=t,this.showsLiveHistory())return document.title=t}}),e.accessor("location",{get:function(){return this.showsLiveHistory()?up.history.location:this.savedLocation},set:function(t){if(this.savedLocation!==(t=up.history.normalizeURL(t))&&(this.savedLocation=t,this.emit("up:layer:location:changed",{location:t,log:!1}),this.showsLiveHistory()))return up.history.push(t)}}),e.prototype.isHistoryVisible=function(){return this.historyVisible&&(this.isRoot()||this.parent.isHistoryVisible())},e.prototype.showsLiveHistory=function(){return this.isHistoryVisible()&&this.isFront()&&(up.history.config.enabled||this.isRoot())},e.prototype.selector=function(t){return this.constructor.selector(t)},e.selector=function(){throw up.error.notImplemented()},e.prototype.toString=function(){throw up.error.notImplemented()},e.prototype.affix=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],n.affix.apply(n,[this.getFirstSwappableElement()].concat(u.call(t)))},e}(up.Record)}.call(this),function(){var u,a,e=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;u=up.element,a=up.util,up.Layer.Overlay=function(t){function s(t){s.__super__.constructor.call(this,t),!0===this.dismissable?this.dismissable=["button","key","outside"]:!1===this.dismissable?this.dismissable=[]:this.dismissable=a.splitValues(this.dismissable),this.acceptLocation&&(this.acceptLocation=new up.URLPattern(this.acceptLocation)),this.dismissLocation&&(this.dismissLocation=new up.URLPattern(this.dismissLocation))}return e(s,t),s.prototype.keys=function(){return s.__super__.keys.call(this).concat(["position","align","size","origin","class","backdrop","openAnimation","closeAnimation","openDuration","closeDuration","openEasing","closeEasing","backdropOpenAnimation","backdropCloseAnimation","dismissable","dismissLabel","dismissAriaLabel","onOpened","onAccept","onAccepted","onDismiss","onDismissed","acceptEvent","dismissEvent","acceptLocation","dismissLocation","opening"])},s.prototype.callback=function(t){var e;if(e=this[t])return e.bind(this)},s.prototype.createElement=function(t){var e;return this.nesting||(this.nesting=this.suggestVisualNesting()),e=a.compactObject({align:this.align,position:this.position,size:this.size,"class":this["class"],nesting:this.nesting}),this.element=this.affixPart(t,null,e)},s.prototype.createBackdropElement=function(t){return this.backdropElement=this.affixPart(t,"backdrop")},s.prototype.createViewportElement=function(t){return this.viewportElement=this.affixPart(t,"viewport",{"up-viewport":""})},s.prototype.createBoxElement=function(t){return this.boxElement=this.affixPart(t,"box")},s.prototype.createContentElement=function(t,e){return this.contentElement=this.affixPart(t,"content"),this.contentElement.appendChild(e)},s.prototype.createDismissElement=function(t){return this.dismissElement=this.affixPart(t,"dismiss",{"up-dismiss":'":button"',"aria-label":this.dismissAriaLabel}),u.affix(this.dismissElement,'span[aria-hidden="true"]',{text:this.dismissLabel})},s.prototype.affixPart=function(t,e,n){return null==n&&(n={}),u.affix(t,this.selector(e),n)},s.selector=function(t){return a.compact(["up",this.mode,t]).join("-")},s.prototype.suggestVisualNesting=function(){var t;return t=this.parent,this.mode===t.mode?1+t.suggestVisualNesting():0},s.prototype.setupHandlers=function(){var t,e,r,n,o,i;return s.__super__.setupHandlers.call(this),this.overlayFocus=new up.OverlayFocus(this),this.supportsDismissMethod("button")&&this.createDismissElement(this.getBoxElement()),this.supportsDismissMethod("outside")&&(this.unbindParentClicked=this.parent.on("up:click",(r=this,function(t,e){var n;return n=r.origin&&r.origin.contains(e),r.onOutsideClicked(t,n)})),this.viewportElement&&up.on(this.viewportElement,"up:click",(e=this,function(t){if(t.target===e.viewportElement)return e.onOutsideClicked(t,!0)}))),this.supportsDismissMethod("key")&&(this.unbindEscapePressed=up.event.onEscape((n=this,function(t){return n.onEscapePressed(t)}))),this.registerClickCloser("up-accept",(o=this,function(t,e){return o.accept(t,e)})),this.registerClickCloser("up-dismiss",(i=this,function(t,e){return i.dismiss(t,e)})),"function"==typeof(t=up.migrate).registerLayerCloser&&t.registerLayerCloser(this),this.registerEventCloser(this.acceptEvent,this.accept),this.registerEventCloser(this.dismissEvent,this.dismiss)},s.prototype.onOutsideClicked=function(t,e){return e&&up.event.halt(t),up.log.muteRejection(this.dismiss(":outside"))},s.prototype.onEscapePressed=function(t){var e;if(this.isFront()){if(e=up.form.focusedField())return e.blur();if(this.supportsDismissMethod("key"))return up.event.halt(t),up.log.muteRejection(this.dismiss(":key"))}},s.prototype.registerClickCloser=function(i,s){return this.on("up:click","["+i+"]",function(t){var e,n,r,o;return up.event.halt(t),n=t.target,o=u.jsonAttr(n,i),e={origin:n},(r=new up.OptionsParser(e,n)).booleanOrString("animation"),r.string("easing"),r.number("duration"),r.string("confirm"),up.log.muteRejection(s(o,e))})},s.prototype.registerEventCloser=function(t,e){var n;if(t)return this.on(t,(n=this,function(t){return t.preventDefault(),e.call(n,t)}))},s.prototype.tryAcceptForLocation=function(){return this.tryCloseForLocation(this.acceptLocation,this.accept)},s.prototype.tryDismissForLocation=function(){return this.tryCloseForLocation(this.dismissLocation,this.dismiss)},s.prototype.tryCloseForLocation=function(t,e){var n,r,o;if(t&&(r=this.location)&&(o=t.recognize(r)))return n=a.merge(o,{location:r}),e.call(this,n)},s.prototype.teardownHandlers=function(){return s.__super__.teardownHandlers.call(this),"function"==typeof this.unbindParentClicked&&this.unbindParentClicked(),"function"==typeof this.unbindEscapePressed&&this.unbindEscapePressed(),this.overlayFocus.teardown()},s.prototype.destroyElements=function(t){var e,n,r,o,i;return e=function(){return o.startCloseAnimation(t)},i=o=this,r=function(){return i.onElementsRemoved(),"function"==typeof t.onFinished?t.onFinished():void 0},n=a.merge(t,{animation:e,onFinished:r,log:!1}),up.destroy(this.element,n)},s.prototype.onElementsRemoved=function(){},s.prototype.startAnimation=function(t){var e,n;return null==t&&(t={}),n=up.animate(this.getBoxElement(),t.boxAnimation,t),this.backdrop&&!up.motion.isNone(t.boxAnimation)&&(e=up.animate(this.backdropElement,t.backdropAnimation,t)),Promise.all([n,e])},s.prototype.startOpenAnimation=function(t){var e,n;return null==t&&(t={}),this.startAnimation({boxAnimation:null!=(e=t.animation)?e:this.evalOption(this.openAnimation),backdropAnimation:"fade-in",easing:t.easing||this.openEasing,duration:t.duration||this.openDuration}).then((n=this,function(){return n.wasEverVisible=!0}))},s.prototype.startCloseAnimation=function(t){var e,n;return null==t&&(t={}),e=this.wasEverVisible&&(null!=(n=t.animation)?n:this.evalOption(this.closeAnimation)),this.startAnimation({boxAnimation:e,backdropAnimation:"fade-out",easing:t.easing||this.closeEasing,duration:t.duration||this.closeDuration})},s.prototype.accept=function(t,e){return null==t&&(t=null),null==e&&(e={}),this.executeCloseChange("accept",t,e)},s.prototype.dismiss=function(t,e){return null==t&&(t=null),null==e&&(e={}),this.executeCloseChange("dismiss",t,e)},s.prototype.supportsDismissMethod=function(t){return a.contains(this.dismissable,t)},s.prototype.executeCloseChange=function(t,e,n){return n=a.merge(n,{verb:t,value:e,layer:this}),new up.Change.CloseLayer(n).execute()},s.prototype.getFirstSwappableElement=function(){return this.getContentElement().children[0]},s.prototype.toString=function(){return this.mode+" overlay"},s}(up.Layer)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.element,up.Layer.OverlayWithViewport=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.bodyShifter=new up.BodyShifter,e.getParentElement=function(){return document.body},e.prototype.createElements=function(t){return this.shiftBody(),this.createElement(this.constructor.getParentElement()),this.backdrop&&this.createBackdropElement(this.element),this.createViewportElement(this.element),this.createBoxElement(this.viewportElement),this.createContentElement(this.boxElement,t)},e.prototype.onElementsRemoved=function(){return this.unshiftBody()},e.prototype.shiftBody=function(){return this.constructor.bodyShifter.shift()},e.prototype.unshiftBody=function(){return this.constructor.bodyShifter.unshift()},e.prototype.sync=function(){if(this.isDetached()&&this.isOpen())return this.constructor.getParentElement().appendChild(this.element)},e}(up.Layer.Overlay)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.Layer.Cover=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.mode="cover",e}(up.Layer.OverlayWithViewport)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.Layer.Drawer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.mode="drawer",e}(up.Layer.OverlayWithViewport)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.Layer.Modal=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.mode="modal",e}(up.Layer.OverlayWithViewport)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.element,up.Layer.OverlayWithTether=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.createElements=function(t){return this.origin||up.fail("Missing { origin } option"),this.tether=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.tether.parent),this.createContentElement(this.element,t),this.tether.start(this.element)},e.prototype.onElementsRemoved=function(){return this.tether.stop()},e.prototype.sync=function(){if(this.isOpen())return this.isDetached()||this.tether.isDetached()?this.dismiss(":detached",{animation:!1,preventable:!1}):this.tether.sync()},e}(up.Layer.Overlay)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.Layer.Popup=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.mode="popup",e}(up.Layer.OverlayWithTether)}.call(this),function(){var n,r,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;r=up.util,n=up.element,up.Layer.Root=function(t){function e(t){e.__super__.constructor.call(this,t),this.setupHandlers()}return o(e,t),e.mode="root",e.getter("element",function(){return n.root}),e.prototype.getFirstSwappableElement=function(){return document.body},e.selector=function(){return"html"},e.prototype.setupHandlers=function(){if(!this.element.upHandlersApplied)return this.element.upHandlersApplied=!0,e.__super__.setupHandlers.call(this)},e.prototype.sync=function(){return this.setupHandlers()},e.prototype.accept=function(){return this.cannotCloseRoot()},e.prototype.dismiss=function(){return this.cannotCloseRoot()},e.prototype.cannotCloseRoot=function(){throw up.error.failed("Cannot close the root layer")},e.prototype.reset=function(){return r.assign(this,this.defaults())},e.prototype.toString=function(){return"root layer"},e}(up.Layer)}.call(this),function(){var n,i,s=[].slice;i=up.util,n=up.element,up.LayerLookup=function(){function t(t){var e,n,r,o;o=t,e=2<=arguments.length?s.call(arguments,1):[],this.stack=o,!1!==(n=i.parseArgIntoOptions(e,"layer")).normalizeLayerOptions&&up.layer.normalizeOptions(n),this.values=i.splitValues(n.layer),this.origin=n.origin,this.baseLayer=n.baseLayer||this.stack.current,i.isString(this.baseLayer)&&(r=i.merge(n,{baseLayer:this.stack.current,normalizeLayerOptions:!1}),this.baseLayer=new this.constructor(this.stack,this.baseLayer,r).first())}return t.prototype.originLayer=function(){if(this.origin)return this.forElement(this.origin)},t.prototype.first=function(){return this.all()[0]},t.prototype.all=function(){var t,e;return t=i.flatMap(this.values,(e=this,function(t){return e.resolveValue(t)})),t=i.compact(t),t=i.uniq(t)},t.prototype.forElement=function(e){return e=n.get(e),i.find(this.stack.reversed(),function(t){return t.contains(e)})},t.prototype.forIndex=function(t){return this.stack[t]},t.prototype.resolveValue=function(t){if(t instanceof up.Layer)return t;if(i.isNumber(t))return this.forIndex(t);if(/^\d+$/.test(t))return this.forIndex(Number(t));if(i.isElementish(t))return this.forElement(t);switch(t){case"any":return[this.baseLayer].concat(s.call(this.stack.reversed()));case"current":return this.baseLayer;case"closest":return this.stack.selfAndAncestorsOf(this.baseLayer);case"parent":return this.baseLayer.parent;case"ancestor":case"ancestors":return this.baseLayer.ancestors;case"child":return this.baseLayer.child;case"descendant":case"descendants":return this.baseLayer.descendants;case"new":return"new";case"root":return this.stack.root;case"overlay":case"overlays":return i.reverse(this.stack.overlays);case"front":return this.stack.front;case"origin":return this.originLayer();default:return up.fail("Unknown { layer } option: %o",t)}},t}()}.call(this),function(){var u,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,r=[].slice;u=up.util,up.element,up.LayerStack=function(t){function e(){e.__super__.constructor.call(this),this.currentOverrides=[],this.push(this.buildRoot())}return n(e,t),e.prototype.buildRoot=function(){return up.layer.build({mode:"root",stack:this})},e.prototype.remove=function(t){return u.remove(this,t)},e.prototype.peel=function(t,e){var n,r,o,i;return n=u.reverse(t.descendants),o=u.merge(e,{preventable:!1}),r=function(t){return t.dismiss(":peel",o)},i=u.map(n,r),Promise.all(i)},e.prototype.reset=function(){return this.peel(this.root,{animation:!1}),this.currentOverrides=[],this.root.reset()},e.prototype.isOpen=function(t){return 0<=t.index},e.prototype.isClosed=function(t){return!this.isOpen(t)},e.prototype.parentOf=function(t){return this[t.index-1]},e.prototype.childOf=function(t){return this[t.index+1]},e.prototype.ancestorsOf=function(t){return u.reverse(this.slice(0,t.index))},e.prototype.selfAndAncestorsOf=function(t){return[t].concat(r.call(t.ancestors))},e.prototype.descendantsOf=function(t){return this.slice(t.index+1)},e.prototype.isRoot=function(t){return this[0]===t},e.prototype.isOverlay=function(t){return!this.isRoot(t)},e.prototype.isCurrent=function(t){return this.current===t},e.prototype.isFront=function(t){return this.front===t},e.prototype.get=function(){var t;return t=1<=arguments.length?r.call(arguments,0):[],this.getAll.apply(this,t)[0]},e.prototype.getAll=function(){var t;return t=1<=arguments.length?r.call(arguments,0):[],function(t,e,n){n.prototype=t.prototype;var r=new n,o=t.apply(r,e);return Object(o)===o?o:r}(up.LayerLookup,[this].concat(r.call(t)),function(){}).all()},e.prototype.sync=function(){var t,e,n,r,o;for(o=[],t=0,n=(r=this).length;t<n;t++)e=r[t],o.push(e.sync());return o},e.prototype.asCurrent=function(t,e){try{return this.currentOverrides.push(t),e()}finally{this.currentOverrides.pop()}},e.prototype.reversed=function(){return u.reverse(this)},e.prototype.dismissOverlays=function(t,e){var n,r,o,i,s;for(null==t&&(t=null),null==e&&(e={}),e.dismissable=!1,s=[],n=0,r=(i=u.reverse(this.overlays)).length;n<r;n++)o=i[n],s.push(o.dismiss(t,e));return s},e.prototype[""+u.copy.key]=function(){return u.copyArrayLike(this)},u.getter(e.prototype,"count",function(){return this.length}),u.getter(e.prototype,"root",function(){return this[0]}),u.getter(e.prototype,"overlays",function(){return this.root.descendants}),u.getter(e.prototype,"current",function(){return u.last(this.currentOverrides)||this.front}),u.getter(e.prototype,"front",function(){return u.last(this)}),e}(Array)}.call(this),function(){up.util,up.LinkFeedbackURLs=function(){function t(t){var e,n,r,o;r=up.feedback.normalizeURL,this.isSafe=up.link.isSafe(t),this.isSafe&&((n=t.getAttribute("href"))&&"#"!==n&&(this.href=r(n)),(o=t.getAttribute("up-href"))&&(this.upHREF=r(o)),(e=t.getAttribute("up-alias"))&&(this.aliasPattern=new up.URLPattern(e,r)))}return t.prototype.isCurrent=function(t){return this.isSafe&&!!(this.href&&this.href===t||this.upHREF&&this.upHREF===t||this.aliasPattern&&this.aliasPattern.test(t,!1))},t}()}.call(this),function(){var o,i,e=function(t,e){return function(){return t.apply(e,arguments)}};i=up.util,o=up.element,up.LinkPreloader=function(){function t(){this.considerPreload=e(this.considerPreload,this)}return t.prototype.observeLink=function(t){if(up.link.isSafe(t))return this.on(t,"mouseenter",(r=this,function(t){return r.considerPreload(t,!0)})),this.on(t,"mousedown touchstart",(n=this,function(t){return n.considerPreload(t)})),this.on(t,"mouseleave",(e=this,function(t){return e.stopPreload(t)}));var e,n,r},t.prototype.on=function(t,e,n){return up.on(t,e,{passive:!0},n)},t.prototype.considerPreload=function(t,e){var n;if((n=t.target)!==this.currentLink&&(this.reset(),this.currentLink=n,up.link.shouldFollowEvent(t,n)))return e?this.preloadAfterDelay(n):this.preloadNow(n)},t.prototype.stopPreload=function(t){if(t.target===this.currentLink)return this.reset()},t.prototype.reset=function(){var t;if(this.currentLink)return clearTimeout(this.timer),(null!=(t=this.currentRequest)?t.preload:void 0)&&this.currentRequest.abort(),this.currentLink=void 0,this.currentRequest=void 0},t.prototype.preloadAfterDelay=function(t){var e,n,r;return e=null!=(n=o.numberAttr(t,"up-delay"))?n:up.link.config.preloadDelay,this.timer=i.timer(e,(r=this,function(){return r.preloadNow(t)}))},t.prototype.preloadNow=function(t){var e,n;return n=this,e=function(t){return n.currentRequest=t},up.log.muteRejection(up.link.preload(t,{onQueued:e})),this.queued=!0},t}()}.call(this),function(){var s,u,e=function(t,e){return function(){return t.apply(e,arguments)}};u=up.util,s=up.element,up.MotionController=function(){function t(t){this.whileForwardingFinishEvent=e(this.whileForwardingFinishEvent,this),this.unmarkCluster=e(this.unmarkCluster,this),this.markCluster=e(this.markCluster,this),this.whenElementFinished=e(this.whenElementFinished,this),this.emitFinishEvent=e(this.emitFinishEvent,this),this.finishOneElement=e(this.finishOneElement,this),this.isActive=e(this.isActive,this),this.expandFinishRequest=e(this.expandFinishRequest,this),this.finish=e(this.finish,this),this.startFunction=e(this.startFunction,this),this.activeClass="up-"+t,this.dataKey="up-"+t+"-finished",this.selector="."+this.activeClass,this.finishEvent="up:"+t+":finish",this.finishCount=0,this.clusterCount=0}return t.prototype.startFunction=function(e,t,n){var r,o,i;return null==n&&(n={}),e=s.list(e),r=function(){return up.log.muteRejection(t())},n.trackMotion=null!=(o=n.trackMotion)?o:up.motion.isEnabled(),!1===n.trackMotion?u.microtask(r):(n.trackMotion=!1,this.finish(e).then((i=this,function(){var t;return t=(t=i.whileForwardingFinishEvent(e,r)).then(function(){return i.unmarkCluster(e)}),i.markCluster(e,t),t})))},t.prototype.startMotion=function(t,e,n){var r,o,i;return null==n&&(n={}),o=function(){return e.start()},r=function(){return e.finish()},i=up.on(t,this.finishEvent,r),this.startFunction(t,o,n).then(i)},t.prototype.finish=function(t){var e;return this.finishCount++,0!==this.clusterCount&&up.motion.isEnabled()?(t=this.expandFinishRequest(t),e=u.map(t,this.finishOneElement),Promise.all(e)):Promise.resolve()},t.prototype.expandFinishRequest=function(t){return t?u.flatMap(t,(e=this,function(t){return s.list(s.closest(t,e.selector),s.all(t,e.selector))})):s.all(this.selector);var e},t.prototype.isActive=function(t){return t.classList.contains(this.activeClass)},t.prototype.finishOneElement=function(t){return this.emitFinishEvent(t),this.whenElementFinished(t)},t.prototype.emitFinishEvent=function(t,e){return null==e&&(e={}),e=u.merge({target:t,log:!1},e),up.emit(this.finishEvent,e)},t.prototype.whenElementFinished=function(t){return t[this.dataKey]||Promise.resolve()},t.prototype.markCluster=function(t,e){var n,r,o,i;for(this.clusterCount++,i=[],r=0,o=t.length;r<o;r++)(n=t[r]).classList.add(this.activeClass),i.push(n[this.dataKey]=e);return i},t.prototype.unmarkCluster=function(t){var e,n,r,o;for(this.clusterCount--,o=[],n=0,r=t.length;n<r;n++)(e=t[n]).classList.remove(this.activeClass),o.push(delete e[this.dataKey]);return o},t.prototype.whileForwardingFinishEvent=function(t,e){var n,r,o;return t.length<2?e():(o=this,n=function(e){if(!e.forwarded)return u.each(t,function(t){if(t!==e.target&&o.isActive(t))return o.emitFinishEvent(t,{forwarded:!0})})},r=up.on(t,this.finishEvent,n),e().then(r))},t.prototype.reset=function(){return this.finish().then((t=this,function(){return t.finishCount=0,t.clusterCount=0}));var t},t}()}.call(this),function(){var n,f;f=up.util,n=up.element,up.OptionsParser=function(){function t(t,e,n){this.options=t,this.element=e,this.fail=null!=n?n.fail:void 0}return t.prototype.string=function(t,e){return this.parse(n.attr,t,e)},t.prototype["boolean"]=function(t,e){return this.parse(n.booleanAttr,t,e)},t.prototype.number=function(t,e){return this.parse(n.numberAttr,t,e)},t.prototype.booleanOrString=function(t,e){return this.parse(n.booleanOrStringAttr,t,e)},t.prototype.json=function(t,e){return this.parse(n.jsonAttr,t,e)},t.prototype.parse=function(t,e,n){var r,o,i,s,u,a,p,l,c,h;if(null==n&&(n={}),o=f.wrapList(null!=(c=n.attr)?c:this.attrNameForKey(e)),h=this.options[e],this.element)for(a=0,p=o.length;a<p;a++)r=o[a],null==h&&(h=t(this.element,r));if(null==h&&(h=n["default"]),(l=n.normalize)&&(h=l(h)),f.isDefined(h)&&(this.options[e]=h),(n.fail||this.fail)&&(s=up.fragment.failKey(e)))return i=f.compact(f.map(o,this.deriveFailAttrName)),u=f.merge(n,{attr:i,fail:!1}),this.parse(t,s,u)},t.prototype.deriveFailAttrName=function(t){if(0===t.indexOf("up-"))return"up-fail-"+t.slice(3)},t.prototype.attrNameForKey=function(t){return"up-"+f.camelToKebabCase(t)},t}()}.call(this),function(){var n,i;n=up.element,i=up.util,up.OverlayFocus=function(){function t(t){this.layer=t,this.focusElement=this.layer.getFocusElement()}return t.prototype.moveToFront=function(){var e;if(!this.enabled)return this.enabled=!0,this.untrapFocus=up.on("focusin",(e=this,function(t){return e.onFocus(t)})),this.unsetAttrs=n.setTemporaryAttrs(this.focusElement,{tabindex:"0",role:"dialog","aria-modal":"true"}),this.focusTrapBefore=n.affix(this.focusElement,"beforebegin","up-focus-trap[tabindex=0]"),this.focusTrapAfter=n.affix(this.focusElement,"afterend","up-focus-trap[tabindex=0]")},t.prototype.moveToBack=function(){return this.teardown()},t.prototype.teardown=function(){if(this.enabled)return this.enabled=!1,this.untrapFocus(),this.unsetAttrs(),n.remove(this.focusTrapBefore),n.remove(this.focusTrapAfter)},t.prototype.onFocus=function(t){var e;if(e=t.target,!this.processingFocusEvent)return this.processingFocusEvent=!0,e===this.focusTrapBefore?this.focusEnd():e!==this.focusTrapAfter&&this.layer.contains(e)||this.focusStart(),this.processingFocusEvent=!1},t.prototype.focusStart=function(t){return up.focus(this.focusElement,t)},t.prototype.focusEnd=function(){return this.focusLastDescendant(this.layer.getBoxElement())||this.focusStart()},t.prototype.focusLastDescendant=function(t){var e,n,r,o;for(n=0,r=(o=i.reverse(t.children)).length;n<r;n++)if(e=o[n],up.viewport.tryFocus(e)||this.focusLastDescendant(e))return!0},t}()}.call(this),function(){var d,p,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;p=up.util,d=up.element,up.Params=function(t){function e(t){this.arrayEntryToQuery=n(this.arrayEntryToQuery,this),this.clear(),this.addAll(t)}return r(e,t),e.prototype.clear=function(){return this.entries=[]},e.prototype[""+p.copy.key]=function(){return new up.Params(this)},e.prototype.toObject=function(){var t,e,n,r,o,i,s;for(o={},e=0,n=(i=this.entries).length;e<n;e++)r=(t=i[e]).name,s=t.value,p.isBasicObjectProperty(r)||(this.isArrayKey(r)?(o[r]||(o[r]=[]),o[r].push(s)):o[r]=s);return o},e.prototype.toArray=function(){return this.entries},e.prototype.toFormData=function(){var t,e
4
+ ,n,r,o;for(e=new FormData,n=0,r=(o=this.entries).length;n<r;n++)t=o[n],e.append(t.name,t.value);return e.entries||(e.originalArray=this.entries),e},e.prototype.toQuery=function(){var t;return t=p.map(this.entries,this.arrayEntryToQuery),(t=p.compact(t)).join("&")},e.prototype.arrayEntryToQuery=function(t){var e,n;if(n=t.value,!this.isBinaryValue(n))return e=encodeURIComponent(t.name),p.isGiven(n)&&(e+="=",e+=encodeURIComponent(n)),e},e.prototype.isBinaryValue=function(t){return t instanceof Blob},e.prototype.hasBinaryValues=function(){var t;return t=p.map(this.entries,"value"),p.some(t,this.isBinaryValue)},e.prototype.toURL=function(t){var e,n;return e=[t,this.toQuery()],e=p.filter(e,p.isPresent),n=p.contains(t,"?")?"&":"?",e.join(n)},e.prototype.add=function(t,e){return this.entries.push({name:t,value:e})},e.prototype.addAll=function(t){var e,n;if(!p.isMissing(t))return t instanceof this.constructor?(e=this.entries).push.apply(e,t.entries):p.isArray(t)?(n=this.entries).push.apply(n,t):p.isString(t)?this.addAllFromQuery(t):p.isFormData(t)?this.addAllFromFormData(t):p.isObject(t)?this.addAllFromObject(t):up.fail("Unsupport params type: %o",t)},e.prototype.addAllFromObject=function(t){var r,e,n,o,i;for(r in e=[],t)n=t[r],i=p.isArray(n)?n:[n],e.push(function(){var t,e,n;for(n=[],t=0,e=i.length;t<e;t++)o=i[t],n.push(this.add(r,o));return n}.call(this));return e},e.prototype.addAllFromQuery=function(t){var e,n,r,o,i,s,u,a;for(u=[],e=0,n=(i=t.split("&")).length;e<n;e++)(o=i[e])?(r=(s=o.split("="))[0],a=s[1],r=decodeURIComponent(r),a=p.isGiven(a)?decodeURIComponent(a):null,u.push(this.add(r,a))):u.push(void 0);return u},e.prototype.addAllFromFormData=function(t){return p.eachIterator(t.entries(),(e=this,function(t){return e.add.apply(e,t)}));var e},e.prototype.set=function(t,e){return this["delete"](t),this.add(t,e)},e.prototype["delete"]=function(t){return this.entries=p.reject(this.entries,this.matchEntryFn(t))},e.prototype.matchEntryFn=function(e){return function(t){return t.name===e}},e.prototype.get=function(t){return this.isArrayKey(t)?this.getAll(t):this.getFirst(t)},e.prototype.getFirst=function(t){var e;return null!=(e=p.find(this.entries,this.matchEntryFn(t)))?e.value:void 0},e.prototype.getAll=function(t){var e;return this.isArrayKey(t)?this.getAll(t):(e=p.map(this.entries,this.matchEntryFn(t)),p.map(e,"value"))},e.prototype.isArrayKey=function(t){return p.endsWith(t,"[]")},e.prototype[""+p.isBlank.key]=function(){return 0===this.entries.length},e.fromForm=function(t){return t=up.fragment.get(t),this.fromFields(up.form.fields(t))},e.fromFields=function(t){var e,n,r,o,i;for(o=new this,n=0,r=(i=p.wrapList(t)).length;n<r;n++)e=i[n],o.addField(e);return o},e.prototype.addField=function(t){var e,n,r,o,i,s,u,a,p,l,c,h,f;if(new this.constructor,(s=(t=d.get(t)).name)&&!t.disabled){if(h=t.tagName,f=t.type,"SELECT"===h){for(l=[],n=0,o=(a=t.querySelectorAll("option")).length;n<o;n++)(u=a[n]).selected?l.push(this.add(s,u.value)):l.push(void 0);return l}if("checkbox"!==f&&"radio"!==f){if("file"!==f)return this.add(s,t.value);for(c=[],r=0,i=(p=t.files).length;r<i;r++)e=p[r],c.push(this.add(s,e));return c}if(t.checked)return this.add(s,t.value)}},e.prototype[""+p.isEqual.key]=function(t){return t&&this.constructor===t.constructor&&p.isEqual(this.entries,t.entries)},e.fromURL=function(t){var e,n;return e=new this,(n=p.parseURL(t).search)&&(n=n.replace(/^\?/,""),e.addAll(n)),e},e.stripURL=function(t){return p.normalizeURL(t,{search:!1})},e}(up.Class)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.Rect=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["left","top","width","height"]},e.getter("bottom",function(){return this.top+this.height}),e.getter("right",function(){return this.left+this.width}),e.fromElement=function(t){return new this(t.getBoundingClientRect())},e}(up.Record)}.call(this),function(){var n,t,r,e,o,i,s,u,a,p;n=up.util,up.RenderOptions=(e={solo:(r={hungry:!0,keep:!0,source:!0,saveScroll:!0,fail:"auto"},!1),confirm:!1,feedback:!1},o=["url","method","origin","headers","params","cache","solo","confirm","feedback","origin","baseLayer","fail"].concat(["keep","hungry","history","source","saveScroll","fallback","navigate"]),t=["url","content","fragment","document"],u=function(t){if(t.navigate)return up.fragment.config.navigateOptions},a=function(t){if(t.preload)return e},s=function(t){var e,n,r,o;for(e in n={},t)o=t[e],(r=up.fragment.successKey(e))&&(n[r]=o);return n},i=function(t){var e;return e=n.merge(n.pick(t,o),s(t)),p(e)},{preprocess:p=function(t){var e;return"function"==typeof(e=up.migrate).handleRenderOptions&&e.handleRenderOptions(t),n.merge(r,u(t),t,a(t))},assertContentGiven:function(e){if(!n.some(t,function(t){return n.isGiven(e[t])}))return e.defaultToEmptyContent?e.content="":up.fail("up.render() needs either { "+t.join(", ")+" } option")},deriveFailOptions:i})}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.element,up.RenderResult=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["fragments","layer"]},e}(up.Record)}.call(this),function(){var s,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,r=[].slice;s=up.util,up.element,up.Request=function(t){function e(t){e.__super__.constructor.call(this,t),this.params=new up.Params(this.params),this.headers||(this.headers={}),this.preload&&(this.cache=!0),null==this.wrapMethod&&(this.wrapMethod=up.network.config.wrapMethod),this.normalizeForCaching(),t.basic||(this.layer=up.layer.get(this.layer),this.failLayer=up.layer.get(this.failLayer||this.layer),this.context||(this.context=this.layer.context||{}),this.failContext||(this.failContext=this.failLayer.context||{}),this.mode||(this.mode=this.layer.mode),this.failMode||(this.failMode=this.failLayer.mode),this.deferred=s.newDeferred(),this.state="new")}return n(e,t),e.prototype.keys=function(){return["method","url","hash","params","target","failTarget","headers","timeout","preload","cache","clearCache","layer","mode","context","failLayer","failMode","failContext","origin","solo","queueTime","wrapMethod","contentType","payload","onQueued"]},e.delegate(["then","catch","finally"],"deferred"),e.prototype.followState=function(t){return s.delegate(this,["deferred","state","preload"],function(){return t})},e.prototype.normalizeForCaching=function(){return this.method=s.normalizeMethod(this.method),this.extractHashFromURL(),this.transferParamsToURL()},e.prototype.evictExpensiveAttrs=function(){return s.task((t=this,function(){return t.layer=void 0,t.failLayer=void 0,t.origin=void 0}));var t},e.prototype.extractHashFromURL=function(){var t,e;if(t=null!=(e=this.url)?e.match(/^([^#]*)(#.+)$/):void 0)return this.url=t[1],this.hash=t[2]},e.prototype.transferParamsToURL=function(){if(this.url&&!this.allowsPayload()&&!s.isBlank(this.params))return this.url=this.params.toURL(this.url),this.params.clear()},e.prototype.isSafe=function(){return up.network.isSafeMethod(this.method)},e.prototype.allowsPayload=function(){return s.methodAllowsPayload(this.method)},e.prototype.will302RedirectWithGET=function(){return this.isSafe()||"POST"===this.method},e.prototype.willCache=function(){return"auto"===this.cache?up.network.config.autoCache(this):this.cache},e.prototype.runQueuedCallbacks=function(){var t;return s.always(this,(t=this,function(){return t.evictExpensiveAttrs()})),"function"==typeof this.onQueued?this.onQueued(this):void 0},e.prototype.load=function(){var t,e,n,r;if("new"===this.state)return this.state="loading",this.xhr=new up.Request.XHRRenderer(this).buildAndSend({onload:(r=this,function(){return r.onXHRLoad()}),onerror:(n=this,function(){return n.onXHRError()}),ontimeout:(e=this,function(){return e.onXHRTimeout()}),onabort:(t=this,function(){return t.onXHRAbort()})})},e.prototype.loadPage=function(){return up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()},e.prototype.onXHRLoad=function(){var t,e;return t=["Server responded HTTP %d to %s %s (%d characters)",(e=this.extractResponseFromXHR()).status,this.method,this.url,e.text.length],this.emit("up:request:loaded",{request:e.request,response:e,log:t}),this.respondWith(e)},e.prototype.onXHRError=function(){var t;return t="Fatal error during request",this.deferred.reject(up.error.failed(t)),this.emit("up:request:fatal",{log:t})},e.prototype.onXHRTimeout=function(){return this.setAbortedState("Requested timed out")},e.prototype.onXHRAbort=function(){return this.setAbortedState()},e.prototype.abort=function(){if(this.setAbortedState()&&this.xhr)return this.xhr.abort()},e.prototype.setAbortedState=function(t){if(null==t&&(t=["Request to %s %s was aborted",this.method,this.url]),"new"===this.state||"loading"===this.state)return this.state="aborted",this.emit("up:request:aborted",{log:t}),this.deferred.reject(up.error.aborted(t)),!0},e.prototype.respondWith=function(t){if("loading"===this.state)return this.state="loaded",t.ok?this.deferred.resolve(t):this.deferred.reject(t)},e.prototype.csrfHeader=function(){return up.protocol.csrfHeader()},e.prototype.csrfParam=function(){return up.protocol.csrfParam()},e.prototype.csrfToken=function(){if(!this.isSafe()&&!this.isCrossOrigin())return up.protocol.csrfToken()},e.prototype.isCrossOrigin=function(){return s.isCrossOrigin(this.url)},e.prototype.extractResponseFromXHR=function(){var t,e,n;return e={method:this.method,url:this.url,request:this,xhr:this.xhr,text:this.xhr.responseText,status:this.xhr.status,title:up.protocol.titleFromXHR(this.xhr),target:up.protocol.targetFromXHR(this.xhr),acceptLayer:up.protocol.acceptLayerFromXHR(this.xhr),dismissLayer:up.protocol.dismissLayerFromXHR(this.xhr),eventPlans:up.protocol.eventPlansFromXHR(this.xhr),context:up.protocol.contextFromXHR(this.xhr),clearCache:up.protocol.clearCacheFromXHR(this.xhr)},t=up.protocol.methodFromXHR(this.xhr),(n=up.protocol.locationFromXHR(this.xhr))&&(t||s.matchURLs(e.url,n)||(t="GET"),e.url=n),t&&(e.method=t),new up.Response(e)},e.prototype.cacheKey=function(){return JSON.stringify([this.method,this.url,this.params.toQuery(),this.metaProps()])},e.prototype.metaProps=function(){var t,e,n,r,o,i;for(r={},t=0,n=(o=s.evalOption(up.network.config.requestMetaKeys,this)).length;t<n;t++)i=this[e=o[t]],s.isGiven(i)&&(r[e]=i);return r},e.prototype.buildEventEmitter=function(t){return up.EventEmitter.fromEmitArgs(t,{request:this,layer:this.layer})},e.prototype.emit=function(){var t;return t=1<=arguments.length?r.call(arguments,0):[],this.buildEventEmitter(t).emit()},e.prototype.assertEmitted=function(){var t;return t=1<=arguments.length?r.call(arguments,0):[],this.buildEventEmitter(t).assertEmitted()},e.getter("description",function(){return this.method+" "+this.url}),e}(up.Record)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.Request.Cache=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.maxSize=function(){return up.network.config.cacheSize},e.prototype.expiryMillis=function(){return up.network.config.cacheExpiry},e.prototype.normalizeStoreKey=function(t){return up.Request.wrap(t).cacheKey()},e.prototype.clear=function(n){return n&&"*"!==n&&!0!==n?(n=new up.URLPattern(n),this.each((r=this,function(t,e){if(n.test(e.url))return r.store.remove(t)}))):e.__super__.clear.call(this);var r},e}(up.Cache)}.call(this),function(){var s,u,a;a=up.util,u=up.element,s=["GET","POST"],up.Request.FormRenderer=function(){function t(t){this.request=t}return t.prototype.buildAndSubmit=function(){var t,e,n,r,o,i;return this.params=a.copy(this.request.params),t=this.request.url,o=this.request.method,i=up.Params.fromURL(t),this.params.addAll(i),t=up.Params.stripURL(t),a.contains(s,o)||(o=up.protocol.wrapMethod(o,this.params)),this.form=u.affix(document.body,"form.up-request-loader",{method:o,action:t}),(e=this.request.contentType)&&this.form.setAttribute("enctype",e),(n=this.request.csrfParam())&&(r=this.request.csrfToken())&&this.params.add(n,r),a.each(this.params.toArray(),this.addField.bind(this)),up.browser.submitForm(this.form)},t.prototype.addField=function(t){return u.affix(this.form,"input[type=hidden]",t)},t}()}.call(this),function(){var i,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;i=up.util,up.Request.Queue=function(t){function e(t){var e,n;null==t&&(t={}),this.concurrency=null!=(e=t.concurrency)?e:function(){return up.network.config.concurrency},this.badResponseTime=null!=(n=t.badResponseTime)?n:function(){return up.network.config.badResponseTime},this.reset()}return n(e,t),e.prototype.reset=function(){return this.queuedRequests=[],this.currentRequests=[],clearTimeout(this.checkSlowTimout),this.emittedSlow=!1},e.getter("allRequests",function(){return this.currentRequests.concat(this.queuedRequests)}),e.prototype.asap=function(e){var n;return e.runQueuedCallbacks(),i.always(e,(n=this,function(t){return n.onRequestSettled(e,t)})),e.queueTime=new Date,this.setSlowTimer(),this.hasConcurrencyLeft()?this.sendRequestNow(e):this.queueRequest(e)},e.prototype.promoteToForeground=function(t){if(t.preload)return t.preload=!1,this.setSlowTimer()},e.prototype.setSlowTimer=function(){var t,e;return t=i.evalOption(this.badResponseTime),this.checkSlowTimout=i.timer(t,(e=this,function(){return e.checkSlow()}))},e.prototype.hasConcurrencyLeft=function(){var t;return-1===(t=i.evalOption(this.concurrency))||this.currentRequests.length<t},e.prototype.isBusy=function(){return 0<this.currentRequests.length},e.prototype.queueRequest=function(t){return this.queuedRequests.push(t)},e.prototype.pluckNextRequest=function(){var t;return(t=i.find(this.queuedRequests,function(t){return!t.preload}))||(t=this.queuedRequests[0]),i.remove(this.queuedRequests,t)},e.prototype.sendRequestNow=function(t){return t.emit("up:request:load",{log:["Loading %s %s",t.method,t.url]}).defaultPrevented?t.abort("Prevented by event listener"):(t.normalizeForCaching(),this.currentRequests.push(t),t.load())},e.prototype.onRequestSettled=function(t,e){return i.remove(this.currentRequests,t),e instanceof up.Response&&e.ok&&up.network.registerAliasForRedirect(t,e),this.checkSlow(),i.microtask((n=this,function(){return n.poke()}));var n},e.prototype.poke=function(){var t;if(this.hasConcurrencyLeft()&&(t=this.pluckNextRequest()))return this.sendRequestNow(t)},e.prototype.abort=function(n){var t,e,r,o;for(null==n&&(n=!0),t=0,e=(o=[this.currentRequests,this.queuedRequests]).length;t<e;t++)return r=o[t],void i.filter(r,function(e){return function(t){return e.requestMatches(t,n)}}(this)).forEach(function(t){return t.abort(),i.remove(r,t)})},e.prototype.abortExcept=function(t,e){var n;return null==e&&(e=!0),n=t.cacheKey(),this.abort(function(t){return t.cacheKey()!==n&&i.evalOption(e,t)})},e.prototype.requestMatches=function(t,e){return t===e||i.evalOption(e,t)},e.prototype.checkSlow=function(){var t;if(t=this.isSlow(),this.emittedSlow!==t)return(this.emittedSlow=t)?up.emit("up:request:late",{log:"Server is slow to respond"}):up.emit("up:request:recover",{log:"Slow requests were loaded"})},e.prototype.isSlow=function(){var t,e,n,r;return n=new Date,e=i.evalOption(this.badResponseTime),t=i.reject(this.allRequests,"preload"),r=1,i.some(t,function(t){return n-t.queueTime>=e-r})},e}(up.Class)}.call(this),function(){var e,n,p;n="application/x-www-form-urlencoded",e="multipart/form-data",p=up.util,up.Request.XHRRenderer=function(){function t(t){this.request=t}return t.prototype.buildAndSend=function(t){var e,n,r,o,i,s,u,a;for(i in this.xhr=new XMLHttpRequest,this.params=p.copy(this.request.params),this.request.timeout&&(this.xhr.timeout=this.request.timeout),this.xhr.open(this.getMethod(),this.request.url),s=this.request.metaProps())a=s[i],o=up.protocol.headerize(i),this.addHeader(o,a);for(o in u=this.request.headers)a=u[o],this.addHeader(o,a);return(n=this.request.csrfHeader())&&(r=this.request.csrfToken())&&this.addHeader(n,r),this.addHeader(up.protocol.headerize("version"),up.version),(e=this.getContentType())&&this.addHeader("Content-Type",e),p.assign(this.xhr,t),this.xhr.send(this.getPayload()),this.xhr},t.prototype.getMethod=function(){return this.method||(this.method=this.request.method,this.request.wrapMethod&&!this.request.will302RedirectWithGET()&&(this.method=up.protocol.wrapMethod(this.method,this.params))),this.method},t.prototype.getContentType=function(){return this.finalizePayload(),this.contentType},t.prototype.getPayload=function(){return this.finalizePayload(),this.payload},t.prototype.addHeader=function(t,e){return(p.isOptions(e)||p.isArray(e))&&(e=JSON.stringify(e)),this.xhr.setRequestHeader(t,e)},t.prototype.finalizePayload=function(){if(!this.payloadFinalized)return this.payloadFinalized=!0,this.payload=this.request.payload,this.contentType=this.request.contentType,!this.payload&&this.request.allowsPayload()?(this.contentType||(this.contentType=this.params.hasBinaryValues()?e:n),this.contentType===e?(this.contentType=null,this.payload=this.params.toFormData()):this.payload=this.params.toQuery().replace(/%20/g,"+")):void 0},t}()}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.Response=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["method","url","text","status","request","xhr","target","title","acceptLayer","dismissLayer","eventPlans","context","clearCache","headers"]},e.prototype.defaults=function(){return{headers:{}}},e.getter("ok",function(){return this.status&&200<=this.status&&this.status<=299}),e.prototype.getHeader=function(t){var e;return this.headers[t]||(null!=(e=this.xhr)?e.getResponseHeader(t):void 0)},e.getter("contentType",function(){return this.getHeader("Content-Type")}),e.getter("json",function(){return this.parsedJSON||(this.parsedJSON=JSON.parse(this.text))}),e}(up.Record)}.call(this),function(){var o,i;i=up.util,o=up.element,up.ResponseDoc=function(){function t(t){this.noscriptWrapper=new up.HTMLWrapper("noscript"),this.scriptWrapper=new up.HTMLWrapper("script"),this.root=this.parseDocument(t)||this.parseFragment(t)||this.parseContent(t)}return t.prototype.parseDocument=function(t){return this.parse(t.document,o.createDocumentFromHTML)},t.prototype.parseContent=function(t){var e,n,r;return e=t.content||"",r=t.target||up.fail("must pass a { target } when passing { content }"),n=o.createFromSelector(r),i.isString(e)?(e=this.wrapHTML(e),n.innerHTML=e):n.appendChild(e),n},t.prototype.parseFragment=function(t){return this.parse(t.fragment)},t.prototype.parse=function(t,e){return null==e&&(e=o.createFromHTML),i.isString(t)&&(t=e(t=this.wrapHTML(t))),t},t.prototype.rootSelector=function(){return up.fragment.toTarget(this.root)},t.prototype.wrapHTML=function(t){return t=this.noscriptWrapper.wrap(t),t=up.fragment.config.runScripts?this.scriptWrapper.wrap(t):this.scriptWrapper.strip(t)},t.prototype.getTitle=function(){var t;return this.titleParsed||(this.title=null!=(t=this.root.querySelector("head title"))?t.textContent:void 0,this.titleParsed=!0),this.title},t.prototype.select=function(t){return up.fragment.subtree(this.root,t,{layer:"any"})[0]},t.prototype.finalizeElement=function(t){return this.noscriptWrapper.unwrap(t),this.scriptWrapper.unwrap(t)},t}()}.call(this),function(){var c,i;c=up.element,i=up.util,up.RevealMotion=function(){function t(t,e){var n,r,o,i,s,u,a,p,l;this.element=t,this.options=null!=e?e:{},l=up.viewport.config,this.viewport=c.get(this.options.viewport)||up.viewport.get(this.element),this.obstructionsLayer=up.layer.get(this.viewport),this.snap=null!=(n=null!=(r=this.options.snap)?r:this.options.revealSnap)?n:l.revealSnap,this.padding=null!=(o=null!=(i=this.options.padding)?i:this.options.revealPadding)?o:l.revealPadding,this.top=null!=(s=null!=(u=this.options.top)?u:this.options.revealTop)?s:l.revealTop,this.max=null!=(a=null!=(p=this.options.max)?p:this.options.revealMax)?a:l.revealMax,this.topObstructions=l.fixedTop,this.bottomObstructions=l.fixedBottom}return t.prototype.start=function(){var t,e,n,r,o;return o=this.getViewportRect(this.viewport),t=up.Rect.fromElement(this.element),this.max&&(e=i.evalOption(this.max,this.element),t.height=Math.min(t.height,e)),this.addPadding(t),this.substractObstructions(o),o.height<0?up.error.failed.async("Viewport has no visible area"):(n=r=this.viewport.scrollTop,this.top||t.height>o.height?n+=t.top-o.top:t.top<o.top?n-=o.top-t.top:t.bottom>o.bottom&&(n+=t.bottom-o.bottom),i.isNumber(this.snap)&&n<this.snap&&t.top<.5*o.height&&(n=0),n!==r?this.scrollTo(n):Promise.resolve())},t.prototype.scrollTo=function(t){return this.scrollMotion=new up.ScrollMotion(this.viewport,t,this.options),this.scrollMotion.start()},t.prototype.getViewportRect=function(){return up.viewport.isRoot(this.viewport)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.viewport)},t.prototype.addPadding=function(t){return t.top-=this.padding,t.height+=2*this.padding},t.prototype.selectObstructions=function(t){return up.fragment.all(t.join(","),{layer:this.obstructionsLayer})},t.prototype.substractObstructions=function(t){var e,n,r,o,i,s,u,a,p,l;for(n=0,o=(a=this.selectObstructions(this.topObstructions)).length;n<o;n++)s=a[n],0<(e=(u=up.Rect.fromElement(s)).bottom-t.top)&&(t.top+=e,t.height-=e);for(l=[],r=0,i=(p=this.selectObstructions(this.bottomObstructions)).length;r<i;r++)s=p[r],u=up.Rect.fromElement(s),0<(e=t.bottom-u.top)?l.push(t.height-=e):l.push(void 0);return l},t.prototype.finish=function(){var t;return null!=(t=this.scrollMotion)?t.finish():void 0},t}()}.call(this),function(){var r,a=function(t,e){return function(){return t.apply(e,arguments)}};r=up.util,up.ScrollMotion=function(){function t(t,e,n){var r,o,i,s;this.scrollable=t,this.targetTop=e,null==n&&(n={}),this.abort=a(this.abort,this),this.behavior=null!=(r=null!=(o=n.behavior)?o:n.scrollBehavior)?r:"auto",this.speed=(null!=(i=null!=(s=n.speed)?s:n.scrollSpeed)?i:up.viewport.config.scrollSpeed)*u}var u;return u=.065,t.prototype.start=function(){return new Promise((n=this,function(t,e){return n.resolve=t,n.reject=e,"smooth"===n.behavior&&up.motion.isEnabled()?n.startAnimation():n.finish()}));var n},t.prototype.startAnimation=function(){return this.startTime=Date.now(),this.startTop=this.scrollable.scrollTop,this.topDiff=this.targetTop-this.startTop,this.duration=Math.sqrt(Math.abs(this.topDiff))/this.speed,requestAnimationFrame((t=this,function(){return t.animationFrame()}));var t},t.prototype.animationFrame=function(){var t,e,n;if(!this.settled)return this.frameTop&&1.5<Math.abs(this.frameTop-this.scrollable.scrollTop)&&this.abort("Animation aborted due to user intervention"),t=Date.now()-this.startTime,e=Math.min(t/this.duration,1),this.frameTop=this.startTop+r.simpleEase(e)*this.topDiff,Math.abs(this.targetTop-this.frameTop)<.3?this.finish():(this.scrollable.scrollTop=this.frameTop,requestAnimationFrame((n=this,function(){return n.animationFrame()})))},t.prototype.abort=function(t){return this.settled=!0,this.reject(up.error.aborted(t))},t.prototype.finish=function(){return this.settled=!0,this.scrollable.scrollTop=this.targetTop,this.resolve()},t}()}.call(this),function(){var r,o;r=up.element,o=up.util,up.Selector=function(){function t(t,e){this.selectors=t,this.filters=null!=e?e:[],this.unionSelector=this.selectors.join(",")||"match-none"}return t.prototype.matches=function(t){return r.matches(t,this.unionSelector)&&this.passesFilter(t)},t.prototype.closest=function(t){var e;return this.matches(t)?t:(e=t.parentElement)?this.closest(e):void 0},t.prototype.passesFilter=function(e){return o.every(this.filters,function(t){return t(e)})},t.prototype.descendants=function(e){var t,n;return t=o.flatMap(this.selectors,function(t){return r.all(e,t)}),o.filter(t,(n=this,function(t){return n.passesFilter(t)}))},t.prototype.subtree=function(t){var e;return e=[],this.matches(t)&&e.push(t),e.push.apply(e,this.descendants(t)),e},t}()}.call(this),function(){var e;up.store||(up.store={}),e=up.util,up.store.Memory=function(){function t(){this.clear()}return t.prototype.clear=function(){return this.data={}},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,e){return this.data[t]=e},t.prototype.remove=function(t){return delete this.data[t]},t.prototype.keys=function(){return Object.keys(this.data)},t.prototype.size=function(){return this.keys().length},t.prototype.values=function(){return e.values(this.data)},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.store.Session=function(t){function n(t){this.remove=e(this.remove,this),this.set=e(this.set,this),this.rootKey=t,this.loadFromSessionStorage()}return r(n,t),n.prototype.clear=function(){return n.__super__.clear.call(this),this.saveToSessionStorage()},n.prototype.set=function(t,e){return n.__super__.set.call(this,t,e),this.saveToSessionStorage()},n.prototype.remove=function(t){return n.__super__.remove.call(this,t),this.saveToSessionStorage()},n.prototype.loadFromSessionStorage=function(){var t;try{(t="undefined"!=typeof sessionStorage&&null!==sessionStorage?sessionStorage.getItem(this.rootKey):void 0)&&(this.data=JSON.parse(t))}catch(e){}return this.data||(this.data={})},n.prototype.saveToSessionStorage=function(){var t;t=JSON.stringify(this.data);try{return"undefined"!=typeof sessionStorage&&null!==sessionStorage?sessionStorage.setItem(this.rootKey,t):void 0}catch(e){}},n}(up.store.Memory)}.call(this),function(){var n,o;o=up.util,n=up.element,up.Tether=function(){function t(t){var e;"function"==typeof(e=up.migrate).handleTetherOptions&&e.handleTetherOptions(t),this.anchor=t.anchor,this.align=t.align,this.position=t.position,this.alignAxis="top"===this.position||"bottom"===this.position?"horizontal":"vertical",this.viewport=up.viewport.get(this.anchor),this.parent=this.viewport===n.root?document.body:this.viewport,this.syncOnScroll=!this.viewport.contains(this.anchor.offsetParent)}return t.prototype.start=function(t){return this.element=t,this.element.style.position="absolute",this.setOffset(0,0),this.sync(),this.changeEventSubscription("on")},t.prototype.stop=function(){return this.changeEventSubscription("off")},t.prototype.changeEventSubscription=function(t){if(up[t](window,"resize",this.scheduleSync),this.syncOnScroll)return up[t](this.viewport,"scroll",this.scheduleSync)},t.prototype.scheduleSync=function(){return clearTimeout(this.syncTimer),this.syncTimer=o.task(this.sync)},t.prototype.isDetached=function(){return n.isDetached(this.parent)||n.isDetached(this.anchor)},t.prototype.sync=function(){var t,e,n,r;switch(e=this.element.getBoundingClientRect(),t=this.anchor.getBoundingClientRect(),r=n=void 0,this.alignAxis){case"horizontal":r=function(){switch(this.position){case"top":return t.top-e.height;case"bottom":return t.top+t.height}}.call(this),n=function(){switch(this.align){case"left":return t.left;case"center":return t.left+.5*(t.width-e.width);case"right":return t.left+t.width-e.width}}.call(this);break;case"vertical":r=function(){switch(this.align){case"top":return t.top;case"center":return t.top+.5*(t.height-e.height);case"bottom":return t.top+t.height-e.height}}.call(this),n=function(){switch(this.position){case"left":return t.left-e.width;case"right":return t.left+t.width}}.call(this)}return o.isDefined(n)||o.isDefined(r)?this.moveTo(n,r):up.fail("Invalid tether constraints: %o",this.describeConstraints())},t.prototype.describeConstraints=function(){return{position:this.position,align:this.align}},t.prototype.moveTo=function(t,e){var n;return n=this.element.getBoundingClientRect(),this.setOffset(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)},t.prototype.setOffset=function(t,e){return this.offsetLeft=t,this.offsetTop=e,n.setStyle(this.element,{left:t,top:e})},t}()}.call(this),function(){var i;i=up.util,up.URLPattern=function(){function t(t,e){var n,r;this.normalizeURL=null!=e?e:i.normalizeURL,this.groups=[],r=[],n=[],i.splitValues(t).forEach(function(t){return"-"===t[0]?n.push(t.substring(1)):r.push(t)}),this.positiveRegexp=this.buildRegexp(r,!0),this.negativeRegexp=this.buildRegexp(n,!1)}return t.prototype.buildRegexp=function(t,r){var e,o;if(t.length)return e=(e=(e=t.map(this.normalizeURL).map(i.escapeRegExp).join("|")).replace(/\\\*/g,".*?")).replace(/(\:|\\\$)([a-z][\w-]*)/gi,(o=this,function(t,e,n){return"\\$"===e?(r&&o.groups.push({name:n,cast:Number}),"(\\d+)"):(r&&o.groups.push({name:n,cast:String}),"([^/?#]+)")})),new RegExp("^"+e+"$")},t.prototype.test=function(t,e){return null==e&&(e=!0),e&&(t=this.normalizeURL(t)),this.positiveRegexp.test(t)&&!this.isExcluded(t)},t.prototype.recognize=function(t,e){var r,o;if(null==e&&(e=!0),e&&(t=this.normalizeURL(t)),(r=this.positiveRegexp.exec(t))&&!this.isExcluded(t))return o={},this.groups.forEach(function(t,e){var n;if(n=r[e+1])return o[t.name]=t.cast(n)}),o},t.prototype.isExcluded=function(t){var e;return null!=(e=this.negativeRegexp)?e.test(t):void 0},t}()}.call(this),function(){var t;up.framework=(up.util,t=!0,{reset:function(){return up.emit("up:framework:reset",{log:!1})},boot:function(){return up.browser.isSupported()?(up.emit("up:framework:boot",{log:!1}),t=!1,up.event.onReady(function(){return up.emit("up:app:boot",{log:"Booting user application"})})):"function"==typeof console.log?console.log("Unpoly doesn't support this browser. Framework was not booted."):void 0},isBooting:function(){return t}})}.call(this),function(){var t,e,n,r,o,i,s,u,a,p,l,c,h,f,d,m,y,g,v=[].slice;up.event=(y=up.util,s=up.element,m=function(){var t,e,n,r,o;for(o=[],e=0,n=(r=[window,document,s.root,document.body]).length;e<n;e++)t=r[e],o.push(up.EventListener.unbindNonDefault(t));return o},n=function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],r(t)},t=function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],r(t,{jQuery:!0})},r=function(t,e){return up.EventListenerGroup.fromBindArgs(t,e).bind()},g=function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],up.EventListenerGroup.fromBindArgs(t).unbind()},i=function(t){return up.EventEmitter.fromEmitArgs(t)},u=function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],i(t).emit()},o=function(){var t,e,n,r,o;return t=1<=arguments.length?v.call(arguments,0):[],r=y.extractOptions(t),o=t[0]||r.type||up.fail("Expected event type to be passed as string argument or { type } property"),(e=document.createEvent("Event")).initEvent(o,!0,!0),y.assign(e,y.omit(r,["type","target"])),up.browser.isIE11()&&(n=e.preventDefault,e.preventDefault=function(){return n.call(e),y.getter(e,"defaultPrevented",function(){return!0})}),e},e=function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],i(t).assertEmitted()},f=function(e){return n("keydown",function(t){if(a(t))return e(t)})},a=function(t){var e;return"Escape"===(e=t.key)||"Esc"===e},l=function(t){return t.stopImmediatePropagation(),t.preventDefault()},d=function(t){return"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t)},h=["metaKey","shiftKey","ctrlKey","altKey"],c=function(e){return(y.isUndefined(e.button)||0===e.button)&&!y.some(h,function(t){return e[t]})},p=function(n,t,e){var r;return null==e&&(e=[]),(r=up.event.build(t,y.pick(n,e))).originalEvent=n,["stopPropagation","stopImmediatePropagation","preventDefault"].forEach(function(t){var e;return e=r[t],r[t]=function(){return n[t](),e.call(r)}}),n.defaultPrevented&&r.preventDefault(),r},n("up:click","a[up-emit]",function(t,e){var n,r,o;if(c(t))return r=s.attr(e,"up-emit"),n=s.jsonAttr(e,"up-emit-props"),o=p(t,r),y.assign(o,n),up.emit(e,o)}),n("up:framework:reset",m)
5
+ ,{on:n,$on:t,off:g,build:o,emit:u,assertEmitted:e,onEscape:f,halt:l,onReady:d,isUnmodified:c,fork:p,keyModifiers:h}),up.on=up.event.on,up.$on=up.event.$on,up.off=up.event.off,up.$off=up.event.off,up.emit=up.event.emit}.call(this),function(){var t,e,n,r,o,i,s,u,a,p,l,c,h,f,d,m,y,g,v,b;up.protocol=(v=up.util,a=up.element,c=function(t){return"X-Up"+t.replace(/(^.|[A-Z])/g,function(t){return"-"+t.toUpperCase()})},l=function(t,e,n){var r;if(null==n&&(n=v.identity),r=t.getResponseHeader(c(e)))return n(r)},e=function(t){return l(t,"clearCache",function(t){switch(t){case"true":return!0;case"false":return!1;default:return t}})},r=function(t){return l(t,"context",JSON.parse)},d=function(t){return l(t,"method",v.normalizeMethod)},p=function(t){return l(t,"events",JSON.parse)},t=function(t){return l(t,"acceptLayer",JSON.parse)},u=function(t){return l(t,"dismissLayer",JSON.parse)},h=v.memoize(function(){return v.normalizeMethod(up.browser.popCookie("_up_method"))}),f=function(t){return l(t,"location")||t.responseURL},g=function(t){return l(t,"title")},y=function(t){return l(t,"target")},n=new up.Config(function(){return{methodParam:"_method",csrfParam:function(){return a.metaContent("csrf-param")},csrfToken:function(){return a.metaContent("csrf-token")},csrfHeader:"X-CSRF-Token"}}),o=function(){return v.evalOption(n.csrfHeader)},i=function(){return v.evalOption(n.csrfParam)},s=function(){return v.evalOption(n.csrfToken)},b=function(t,e){return e.add(n.methodParam,t),"POST"},m=function(){return n.reset()},up.on("up:framework:reset",m),{config:n,reset:m,locationFromXHR:f,titleFromXHR:g,targetFromXHR:y,methodFromXHR:d,acceptLayerFromXHR:t,contextFromXHR:r,dismissLayerFromXHR:u,eventPlansFromXHR:p,clearCacheFromXHR:e,csrfHeader:o,csrfParam:i,csrfToken:s,initialRequestMethod:h,headerize:c,wrapMethod:b})}.call(this),function(){var r,t,e,n,o,i,s,u,a,p,l,c=[].slice;up.log=(l=up.util,a=new up.store.Session("up.log"),r=new up.Config(function(){return{enabled:a.get("enabled")}}),u=function(){return r.reset()},o=function(){var t;if(t=1<=arguments.length?c.call(arguments,0):[],r.enabled)return i.apply(null,["log"].concat(c.call(t)))},s=function(){var t;return t=1<=arguments.length?c.call(arguments,0):[],i.apply(null,["warn"].concat(c.call(t)))},n=function(){var t;return t=1<=arguments.length?c.call(arguments,0):[],i.apply(null,["error"].concat(c.call(t)))},i=function(t,e,n){var r,o,i,s;if(i=t,s=e,o=n,r=4<=arguments.length?c.call(arguments,3):[],o)return up.browser.canFormatLog()?(r.unshift(""),r.unshift("color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block"),o="%c"+s+"%c "+o):o="["+s+"] "+o,console[i].apply(console,[o].concat(c.call(r)))},e=function(){var t,e,n;return e=" __ _____ ___ ___ / /_ __\n/ // / _ \\/ _ \\/ _ \\/ / // / "+up.version+"\n\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n",n="",up.migrate.loaded||(n+="Load unpoly-migrate.js to enable deprecated APIs.\n\n"),r.enabled?n+="Call `up.log.disable()` to disable logging for this session.":n+="Call `up.log.enable()` to enable logging for this session.",t="color: #777777",up.browser.canFormatLog()?console.log("%c"+e+"%c"+n,"font-family: monospace;"+t,t):console.log(e+n)},up.on("up:framework:boot",e),up.on("up:framework:reset",u),p=function(t){return a.set("enabled",t),r.enabled=t},t=function(){var t;throw t=1<=arguments.length?c.call(arguments,0):[],n.apply(null,["error"].concat(c.call(t))),up.error.failed(t)},{puts:o,error:n,warn:s,config:r,enable:function(){return p(!0)},disable:function(){return p(!1)},fail:t,muteRejection:function(t){return r.enabled?t:l.muteRejection(t)},isEnabled:function(){return r.enabled}}),up.puts=up.log.puts,up.warn=up.log.warn,up.fail=up.log.fail}.call(this),function(){var r,n,t,e,o,i,s,u,a,p,l,c,h,f,d,m,y,g,v=[].slice;up.syntax=(g=up.util,s=up.element,r={"[up-back]":-100,"[up-content]":-200,"[up-drawer]":-200,"[up-modal]":-200,"[up-cover]":-200,"[up-popup]":-200,"[up-tooltip]":-200,"[up-dash]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400},o=[],a=[],c=function(){var t,e;return t=1<=arguments.length?v.call(arguments,0):[],e=n(t),u(o,e)},f=function(){var t,e;return t=1<=arguments.length?v.call(arguments,0):[],(e=c.apply(null,t)).jQuery=!0,e},m=function(){var t,e;return t=1<=arguments.length?v.call(arguments,0):[],e=n(t),up.framework.isBooting()&&(e.priority=i(e.selector)||up.fail("Unregistered priority for system macro %o",e.selector)),u(a,e)},d=function(){var t,e;return t=1<=arguments.length?v.call(arguments,0):[],(e=m.apply(null,t)).jQuery=!0,e},i=function(t){var e,n;for(n in t=g.evalOption(t),r)if(e=r[n],0<=t.indexOf(n))return e},p=function(t){var e,n;return n=t.shift(),e=t.pop(),[n,g.extractOptions(t),e]},n=function(t){var e,n,r,o;return o=(r=p(t))[0],n=r[1],e=r[2],n=g.options(n,{selector:o,isDefault:up.framework.isBooting(),priority:0,batch:!1,keep:!1,jQuery:!1}),g.assign(e,n)},u=function(t,e){var n,r;for(r=0;(n=t[r])&&n.priority>=e.priority;)r+=1;return t.splice(r,0,e),e},e=function(t,e){var n;return n=a.concat(o),new up.CompilerPass(t,n,e).run()},h=function(t,e){var n;return(n=t.upDestructors)||(n=[],t.upDestructors=n,t.classList.add("up-can-clean")),g.isArray(e)?n.push.apply(n,e):n.push(e)},t=function(t,e){return null==e&&(e={}),new up.DestructorPass(t,e).run()},l=function(t){return t=up.fragment.get(t),s.jsonAttr(t,"up-data")||{}},y=function(){return o=g.filter(o,"isDefault"),a=g.filter(a,"isDefault")},up.on("up:framework:reset",y),{compiler:c,macro:m,$compiler:f,$macro:d,destructor:h,compile:e,clean:t,data:l}),up.compiler=up.syntax.compiler,up.$compiler=up.syntax.$compiler,up.destructor=up.syntax.destructor,up.macro=up.syntax.macro,up.$macro=up.syntax.$macro,up.data=up.syntax.data}.call(this),function(){var r,o,n,e,i,s,u,a,p,l,c,t,h,f,d,m,y,g=[].slice;up.history=(y=up.util,e=up.element,o=new up.Config(function(){return{enabled:!0,restoreTargets:[":main"]}}),a=c=void 0,f=function(){return o.reset(),a=c=void 0,m()},p=function(t,e){return null==e&&(e={}),e.hash=!0,y.normalizeURL(t,e)},n=function(t){return p(location.href,t)},(m=function(){var t;if(t=n(),a!==t)return c=a,a=t})(),s=function(t){var e;return p(t,e={stripTrailingSlash:!0})===n(e)},h=function(t,e){if(null==e&&(e={}),u("replaceState",t)&&!1!==e.event)return i("up:location:changed",{url:t,reason:"replace",log:"Replaced state for "+y.urlWithoutHost(t)})},t=function(t){if(t=p(t),!s(t)&&u("pushState",t))return up.emit("up:location:changed",{url:t,reason:"push",log:"Advanced to location "+y.urlWithoutHost(t)})},u=function(t,e){var n;if(o.enabled)return n=r(),window.history[t](n,"",e),m(),n},r=function(){return{up:{}}},d=function(t){var e;return(null!=t?t.up:void 0)?(e=n(),up.render({url:e,history:!0,location:e,peel:!0,layer:"root",target:o.restoreTargets,cache:!0,keep:!1,scroll:"restore",saveScroll:!1}).then(function(){return e=n(),i("up:location:changed",{url:e,reason:"pop",log:"Restored location "+e})})):up.puts("pop","Ignoring a state not pushed by Unpoly (%o)",t)},l=function(t){var e;return m(),up.viewport.saveScroll({location:c}),e=t.state,d(e)},i=function(){var t,e;return t=1<=arguments.length?g.call(arguments,0):[],(e=y.find(up.layer.stack.reversed(),"historyVisible")).emit.apply(e,t)},up.on("up:app:boot",function(){var t;return t=function(){return window.history.scrollRestoration="manual",window.addEventListener("popstate",l),h(n(),{event:!1})},"undefined"!=typeof jasmine&&null!==jasmine?t():setTimeout(t,100)}),up.macro("a[up-back], [up-href][up-back]",function(t){if(c)return e.setMissingAttrs(t,{"up-href":c,"up-restore-scroll":""}),t.removeAttribute("up-back"),up.link.makeFollowable(t)}),up.on("up:framework:reset",f),y.literal({config:o,push:t,replace:h,get_location:n,get_previousLocation:function(){return c},isLocation:s,normalizeURL:p}))}.call(this),function(){var s,t,n,e,r,a,o,i,u,p,l,c,h,f,d,m,y,g,v,b,w,k,E,S,L,C,_,O,T,F,R,A,x,P,q,D,M,H,j,N=[].slice;up.fragment=(H=up.util,a=up.element,n=new up.Config(function(){return{badTargetClasses:[/^up-/],navigateOptions:{focus:"auto",scroll:"auto",solo:!0,feedback:!0,fallback:!0,history:"auto",peel:!0,cache:"auto"},matchAroundOrigin:!0,runScripts:!1,autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","target-if-lost"],autoScroll:["hash","layer-if-main"]}}),Object.defineProperty(n,"mainTargets",{get:function(){return up.layer.config.any.mainTargets},set:function(t){return up.layer.config.any.mainTargets=t}}),A=function(){return n.reset()},P=function(t,e){return null==e&&(e={}),t=m(t,e),a.closestAttr(t,"up-source")},D=function(t){return a.closestAttr(t,"up-time")||"0"},T=up.mockable(function(){var n;return n=1<=arguments.length?N.call(arguments,0):[],H.asyncify(function(){var t,e;return e=_(n),e=up.RenderOptions.preprocess(e),up.browser.assertConfirmed(e),(t=H.pluckKey(e,"guardEvent"))&&(t.renderOptions=e,up.event.assertEmitted(t,{target:e.origin})),up.RenderOptions.assertContentGiven(e),e.url?R(e):F(e)})}),R=function(t){return up.feedback.aroundForOptions(t,function(){return new up.Change.FromURL(t).execute()})},F=function(t){return up.network.mimicLocalRequest(t),new up.Change.FromContent(t).execute()},L=up.mockable(function(){var t,e;return t=1<=arguments.length?N.call(arguments,0):[],e=_(t),T(H.merge(e,{navigate:!0}))}),v=function(t,e){var n;return null==e&&(e={}),t=m(t),n=(e.keepPlans||[]).map(function(t){return p(t),t.oldElement}),up.syntax.compile(t,{skip:n,layer:e.layer}),i(t,e),t},i=function(t,e){return up.emit(t,"up:fragment:inserted",{log:["Inserted fragment %o",t],origin:e.origin})},u=function(t){var e,n;return n=["Keeping fragment %o",t.oldElement],e=a.callbackAttr(t.oldElement,"up-on-keep",["newFragment","newData"]),l(t,"up:fragment:keep",{log:n,callback:e})},p=function(t){var e;return e=["Kept fragment %o",t.oldElement],l(t,"up:fragment:kept",{log:e})},l=function(t,e,n){var r,o;return o=t.oldElement,r=up.event.build(e,{newFragment:t.newElement,newData:t.newData}),up.emit(o,r,n)},o=function(t,e){var n,r,o;return n=null!=(o=e.log)?o:["Destroyed fragment %o",t],r=e.parent||document,up.emit(r,"up:fragment:destroyed",{fragment:t,parent:r,log:n})},b=function(t){return!!a.closest(t,".up-destroying")},k=function(t){return!b(t)},m=function(){var t,e,n,r;return t=1<=arguments.length?N.call(arguments,0):[],e=H.extractOptions(t),r=t.pop(),n=t[0],H.isElementish(r)?a.get(r):n?d(n,r,e):new up.FragmentFinder({selector:r,origin:e.origin,layer:e.layer}).find()},d=function(){var t;return t=1<=arguments.length?N.call(arguments,0):[],f.apply(null,t)[0]},s=/\:has\(([^\)]+)\)$/,f=function(){var t,e,n,r;return t=1<=arguments.length?N.call(arguments,0):[],e=H.extractOptions(t),r=t.pop(),n=t[0],(r=C(r,n,e)).descendants(n||document)},y=function(t,e,n){return null==n&&(n={}),(e=C(e,t,n)).subtree(t)},e=function(t,e){return 0<y(t,e).length},t=function(t,e,n){return t=a.get(t),(e=C(e,t,n)).closest(t)},r=function(){var t,e,n;return t=1<=arguments.length?N.call(arguments,0):[],((n=_(t)).element=m(n.target,n))&&new up.Change.DestroyFragment(n).execute(),"function"==typeof(e=up.migrate).formerlyAsync?e.formerlyAsync("up.destroy()"):void 0},_=function(t){var e;return e=H.parseArgIntoOptions(t,"target"),H.isElement(e.target)&&(e.origin||(e.origin=e.target)),e},E=function(t){return t.classList.add("up-destroying"),t.setAttribute("aria-hidden","true")},O=function(){var t,e,n;return t=1<=arguments.length?N.call(arguments,0):[],(n=_(t)).target||(n.target=":main"),e=m(n.target,n),null==n.url&&(n.url=P(e)),n.headers||(n.headers={}),n.headers[up.protocol.headerize("reloadFromTime")]=D(e),T(n)},j=function(t,e){return L(H.merge({url:t},e))},q=function(t){return H.unprefixCamelCase(t,"fail")},h=function(t){if(!t.match(/^fail[A-Z]/))return H.prefixCamelCase(t,"fail")},M=function(t){var e,n,r,o,i,s,u;if(H.isString(t))return t;if(t=a.get(t),a.isSingleton(t))return a.elementTagName(t);if(u=t.getAttribute("up-id"))return a.attributeSelector("up-id",u);if(r=t.getAttribute("id"))return a.idSelector(r);if(i=t.getAttribute("name"))return a.elementTagName(t)+a.attributeSelector("name",i);if(e=H.presence(H.filter(t.classList,w))){for(s="",n=0,o=e.length;n<o;n++)s+="."+e[n];return s}return a.elementTagName(t)},w=function(e){var t;return t=function(t){return H.isRegExp(t)?t.test(e):t===e},!H.some(n.badTargetClasses,t)},x=function(e,t){var n;return null==t&&(t={}),n=t.origin,e.replace(/&|:origin\b/,function(t){return n?M(n):up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',t,e)})},c=function(t,e){var n,r,o,i;for(null==e&&(e={}),"new"===(r=e.layer)||r instanceof up.Layer||up.fail("Must pass an up.Layer as { layer } option, but got %o",r),t=H.copy(H.wrapList(t)),n=[];t.length;)":main"===(i=t.shift())||!0===i?(o="new"===r?e.mode:r.mode,t.unshift.apply(t,up.layer.mainTargets(o))):":layer"===i?"new"===r||r.opening||t.unshift(r.getFirstSwappableElement()):H.isElementish(i)?n.push(M(i)):H.isString(i)&&n.push(x(i,e));return H.uniq(n)},C=function(t,e,n){var r,o,i;return null==n&&(n={}),o=[],n.destroying||o.push(k),n.layer||(n.layer=e),i=up.layer.getAll(n),"any"===n.layer||e&&a.isDetached(e)||o.push(function(e){return H.some(i,function(t){return t.contains(e)})}),r=(r=up.fragment.expandTargets(t,H.merge(n,{layer:i[0]}))).map(function(t){return(t=t.replace(s,function(t,e){return o.push(function(t){return t.querySelector(e)}),""}))||"*"}),new up.Selector(r,o)},g=function(t){return!!e(t,n.autoHistoryTargets)||(up.puts("up.render()","Will not auto-update history because fragment doesn't contain a selector from up.fragment.config.autoHistoryTargets"),!1)},S=function(t,e,n){return null==n&&(n={}),t=a.get(t),(e=C(e,t,n)).matches(t)},up.on("up:app:boot",function(){var t;if((t=document.body).setAttribute("up-source",up.history.location),v(t),!up.browser.canPushState())return up.warn("Cannot push history changes. Next fragment update will load in a new page.")}),up.on("up:framework:reset",A),H.literal({config:n,reload:O,destroy:r,render:T,navigate:L,get:m,getDumb:d,all:f,subtree:y,contains:e,closest:t,source:P,hello:v,visit:j,markAsDestroying:E,emitInserted:i,emitDestroyed:o,emitKeep:u,emitKept:p,successKey:q,failKey:h,expandTargets:c,toTarget:M,matches:S,hasAutoHistory:g})),up.replace=up.fragment.replace,up.extract=up.fragment.extract,up.reload=up.fragment.reload,up.destroy=up.fragment.destroy,up.render=up.fragment.render,up.navigate=up.fragment.navigate,up.hello=up.fragment.hello,up.visit=up.fragment.visit}.call(this),function(){var t,r,e,n,a,o,i,p,s,u,l,c,h,f,d,m,y,g,v,b,w,k,E,S,L,C,_,O,T,F,R,A,x,P,q,D,M,H,j,N,z,B,V=[].slice;up.viewport=(N=up.util,p=up.element,s=up.fragment,o=new up.Config(function(){return{viewportSelectors:["[up-viewport]","[up-fixed]"],fixedTop:["[up-fixed~=top]"],fixedBottom:["[up-fixed~=bottom]"],anchoredRight:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],revealSnap:200,revealPadding:0,revealTop:!1,revealMax:function(){return.5*window.innerHeight},scrollSpeed:1}}),M=new up.MotionController("scrolling"),k=function(){return o.reset(),M.reset()},x=function(t,e,n){var r;return null==n&&(n={}),t=s.get(t,n),r=new up.ScrollMotion(t,e,n),M.startMotion(t,r,n)},e=function(){var t;return t=o.anchoredRight.join(","),s.all(t,{layer:"root"})},L=function(t,e){var n;return e=N.options(e,{peel:!0}),t=s.get(t,e),(e.layer=up.layer.get(t))?(e.peel&&e.layer.peel(),n=new up.RevealMotion(t,e),M.startMotion(t,n,e)):up.error.failed.async("Cannot reveal a detached element")},i=function(t,e){var n,r;if(null==e&&(e={}),up.browser.isIE11()?(n=(r=a(t)).scrollTop,t.focus(),r.scrollTop=n):t.focus({preventScroll:!0}),!e.preventScroll)return L(t)},j=function(t,e){return i(t,e),t===document.activeElement},n=function(t,e){var n;if(n=p.subtree(t,"[autofocus]")[0])return doDocus(n,e),!0},y=function(t){return p.matches(t,"a[href], button, textarea, input, select")},v=function(t){if(!t.hasAttribute("tabindex")&&!y(t))return t.setAttribute("tabindex","-1"),t.classList.add("up-focusable-content")},C=function(t,e){var n;if(null==t&&(t=location.hash),n=u(t,e))return up.reveal(n,{top:!0})},r=function(){return[F()].concat(V.call(o.viewportSelectors)).join(",")},a=function(t,e){var n;return null==e&&(e={}),n=s.get(t,e),p.closest(n,r())},m=function(t,e){return null==e&&(e={}),t=s.get(t,e),p.subtree(t,r())},h=function(t,e){return null==e&&(e={}),t=s.get(t,e),p.around(t,r())},c=function(t){return null==t&&(t={}),s.all(r(),t)},F=function(){var t;return(t=document.scrollingElement)?t.tagName:"html"},f=function(){return document.querySelector(F())},R=function(){return p.root.clientWidth},O=function(){return p.root.clientHeight},g=function(t){return p.matches(t,F())},_=function(){return window.innerWidth>document.documentElement.offsetWidth},T=function(){var t,e;return t=document.body,e=document.documentElement,N.find([e,t],B)||f()},B=function(t){var e;return"auto"===(e=p.style(t,"overflow-y"))||"scroll"===e},D=N.memoize(function(){var t,e,n;return e={position:"absolute",top:"0",left:"0",width:"100px",height:"100px",overflowY:"scroll"},n=(t=up.element.affix(document.body,"[up-viewport]",{style:e})).offsetWidth-t.clientWidth,up.element.remove(t),n}),P=function(t){return up.fragment.toTarget(t)},q=function(t){return null==t&&(t={}),N.mapObject(c(t),function(t){return[P(t),t.scrollTop]})},l=function(t){var e;return null==t&&(t=document),e=["[up-fixed]"].concat(o.fixedTop).concat(o.fixedBottom),t.querySelectorAll(e.join(","))},A=function(){var t,e,n,r,o,i,s;if(t=1<=arguments.length?V.call(arguments,0):[],s=(n=b(t))[0],i=(e=n[1]).location||e.layer.location)return o=null!=(r=e.tops)?r:d(s),e.layer.lastScrollTops.set(i,o)},d=function(t){return N.mapObject(t,function(t){return[P(t),t.scrollTop]})},S=function(){var t,e,n,r,o,i;return t=1<=arguments.length?V.call(arguments,0):[],i=(n=b(t))[0],o=(e=n[1]).layer.location,r=e.layer.lastScrollTops.get(o)||{},up.puts("up.viewport.restoreScroll()","Restoring scroll positions for URL %s to %o",N.urlWithoutHost(o),r),H(i,r)},b=function(t){var e;return(e=N.copy(N.extractOptions(t))).layer=up.layer.get(e),[t[0]?[a(t[0],e)]:e.around?h(e.around,e):c(e),e]},E=function(){var t,e,n;return t=1<=arguments.length?V.call(arguments,0):[],n=(e=b(t))[0],e[1],H(n,{})},H=function(t,r){var e;return e=N.map(t,function(t){var e,n;return e=P(t),n=r[e]||0,x(t,n,{duration:0})}),Promise.all(e)},t=function(t,e){var n,r,o,i,s,u;return null==e&&(e={}),u=a(t).getBoundingClientRect(),s=t.getBoundingClientRect(),r=new up.Rect({left:s.left-u.left,top:s.top-u.top,width:s.width,height:s.height}),"function"==typeof e.afterMeasure&&e.afterMeasure(),p.setStyle(t,{position:"static"===t.style.position?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"}),n=p.createFromSelector("up-bounds"),p.insertBefore(t,n),n.appendChild(t),(o=function(t,e){return r.left+=t,r.top+=e,p.setStyle(n,r)})(0,0),i=t.getBoundingClientRect(),o(s.left-i.left,s.top-i.top),N.each(l(t),p.fixedToAbsolute),{bounds:n,moveBounds:o}},u=function(t,e){var n;if(null==e&&(e={}),t=w(t))return n=[p.attributeSelector("id",t),"a"+p.attributeSelector("name",t)].join(","),s.get(n,e)},z=!(w=function(t){return null!=t?t.replace(/^#/,""):void 0}),up.on("scroll",{once:!0},function(){return z=!0}),up.on("up:app:boot",function(){return N.task(function(){if(!z)return C()})}),up.on(window,"hashchange",function(){return C()}),up.on("up:framework:reset",k),N.literal({reveal:L,revealHash:C,firstHashTarget:u,scroll:x,config:o,get:a,subtree:m,around:h,all:c,rootSelector:F,get_root:f,rootWidth:R,rootHeight:O,rootHasReducedWidthFromScrollbar:_,rootOverflowElement:T,isRoot:g,scrollbarWidth:D,scrollTops:q,saveScroll:A,restoreScroll:S,resetScroll:E,anchoredRight:e,fixedElements:l,absolutize:t,focus:i,tryFocus:j,autofocus:n,makeFocusable:v})),up.focus=up.viewport.focus,up.scroll=up.viewport.scroll,up.reveal=up.viewport.reveal}.call(this),function(){var t,i,m,n,e,r,o,y,s,u,g,a,p,l,c,v,h,f,d,b,w,k,E,S,L,C,_,O,T,F;up.motion=(O=up.util,y=up.element,h={},r={},f={},o={},v=new up.MotionController("motion"),e=new up.Config(function(){return{duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches}}),S=function(){return v.reset(),h=O.copy(r),f=O.copy(o),e.reset()},p=function(){return e.enabled},t=function(t,e,n){var r,o;return t=up.fragment.get(t),n=O.options(n),m(n),r=s(e),F(t,e,n)?(o=function(){return r(t,n)},v.startFunction(t,o,n)):L(t,e)},F=function(t,e,n){return p()&&!l(e)&&0<n.duration&&!y.isSingleton(t)},L=function(t,e){return O.isOptions(e)&&y.setStyle(t,e),Promise.resolve()},i=function(t,e,n){return n=O.merge(n,{finishEvent:v.finishEvent}),new up.CSSTransition(t,e,n).start()},m=function(t){return t.easing||(t.easing=e.easing),t.duration||(t.duration=e.duration)},u=function(t){return h[t]||up.fail("Unknown animation %o",t)},a=function(t){return v.finish(t)},c=function(e,n,t,r){var o,i,s,u,a,p,l,c,h,f,d;return r=O.options(r),m(r),e=up.fragment.get(e),n=up.fragment.get(n),h=g(t),d=F(e,h,r),u=O.pluckKey(r,"beforeStart")||O.noop,i=O.pluckKey(r,"afterInsert")||O.noop,s=O.pluckKey(r,"beforeDetach")||O.noop,o=O.pluckKey(r,"afterDetach")||O.noop,p=O.pluckKey(r,"scrollNew")||O.asyncNoop,u(),d?v.isActive(e)&&!1===r.trackMotion?h(e,n,r):(up.puts("up.morph()","Morphing %o to %o with transition %O",e,n,t),f=up.viewport.get(e),l=f.scrollTop,a=up.viewport.absolutize(e,{afterMeasure:function(){return y.insertBefore(e,n),i()}}),c=function(){return p().then(function(){var t;return t=f.scrollTop,a.moveBounds(0,t-l),h(e,n,r)}).then(function(){return s(),y.remove(a.bounds),o()})},v.startFunction([e,n],c,r)):(s(),C(e,n),i(),o(),p())},g=function(t){var e;if(!l(t))return O.isFunction(t)?t:O.isArray(t)?n.apply(null,t):O.isString(t)?0<=t.indexOf("/")?n.apply(null,t.split("/")):(e=f[t])?g(e):void 0:up.fail("Unknown transition %o",t)},n=function(t,e){var r,o;return l(t)&&l(t)?void 0:(o=s(t)||O.asyncNoop,r=s(e)||O.asyncNoop,function(t,e,n){return Promise.all([o(t,n),r(e,n)])})},s=function(n){return l(n)?void 0:O.isFunction(n)?n:O.isString(n)?u(n):O.isOptions(n)?function(t,e){return i(t,n,e)}:up.fail("Unknown animation %o",n)},C=up.mockable(function(t,e){return y.replace(t,e)}),E=function(t,e){return f[t]=g(e)},b=function(t,e){return h[t]=s(e)},d=function(){if(r=O.copy(h),o=O.copy(f),!p())return up.puts("up.motion","Animations are disabled")},l=function(t){return!t||"none"===t},(k=function(t,n,r){return b(t,function(t,e){return t.style.opacity=0,y.setStyle(t,{opacity:n}),i(t,{opacity:r},e)})})("fade-in",0,1),k("fade-out",1,0),_=function(t,e){return{transform:"translate("+t+"px, "+e+"px)"}},T=function(t){return y.setStyle(t,_(0,0)),t.getBoundingClientRect()},(w=function(t,o){var e;return e="move-from-"+t,b("move-to-"+t,function(t,e){var n,r;return n=T(t),r=o(n),i(t,r,e)}),b(e,function(t,e){var n,r;return n=T(t),r=o(n),y.setStyle(t,r),i(t,_(0,0),e)})})("top",function(t){var e;return e=t.top+t.height,_(0,-e)}),w("bottom",function(t){var e;return e=up.viewport.rootHeight()-t.top,_(0,e)}),w("left",function(t){var e;return e=t.left+t.width,_(-e,0)}),w("right",function(t){var e;return e=up.viewport.rootWidth()-t.left,_(e,0)}),E("cross-fade",["fade-out","fade-in"]),E("move-left",["move-to-left","move-from-right"]),E("move-right",["move-to-right","move-from-left"]),E("move-up",["move-to-top","move-from-bottom"]),E("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:boot",d),up.on("up:framework:reset",S),{morph:c,animate:t,finish:a,finishCount:function(){return v.finishCount},transition:E,animation:b,config:e,isEnabled:p,isNone:l,willAnimate:F,swapElementsDirectly:C}),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate}.call(this),function(){var r,o,i,s,e,t,n,u,a,p,l,c,h,f,d,m,y,g,v=[].slice;r=up.util,up.network=(s=new up.Config(function(){return{concurrency:4,wrapMethod:!0,cacheSize:70,cacheExpiry:3e5,badDownlink:.6,badRTT:750,badResponseTime:800,autoCache:function(t){return t.isSafe()},clearCache:function(t){return!t.isSafe()},requestMetaKeys:["target","failTarget","mode","failMode","context","failContext"]}}),h=new up.Request.Queue,i=new up.Request.Cache,m=function(){return o(),h.reset(),s.reset(),i.clear()},a=function(){var t,e,n;return t=1<=arguments.length?v.call(arguments,0):[],e=new up.Request(l(t)),g(e)||f(e),(n=e.solo)&&h.abortExcept(e,n),e},p=function(t){var e,n;if((n=t.solo)&&o(n),e=t.clearCache)return i.clear(e)},c=function(){var t,e,n;return t=1<=arguments.length?v.call(arguments,0):[],"function"==typeof(e=up.migrate).handleNetworkPreloadArgs&&e.handleNetworkPreloadArgs.apply(e,t),(n=l(t)).preload=!0,a(n)},l=function(t){var e,n;return(n=r.extractOptions(t)).url||(n.url=t[0]),"function"==typeof(e=up.migrate).handleRequestOptions&&e.handleRequestOptions(n),n},g=function(t){var e;if(t.willCache()&&(e=i.get(t)))return up.puts("up.request()","Re-using previous request to %s %s",t.method,t.url),t.preload||h.promoteToForeground(e),t.followState(e),!0},f=function(t){return t.preload&&!t.isSafe()&&up.fail("Will not preload request to %s",t.description),e(t),h.asap(t)},e=function(o){return o.willCache()&&i.set(o,o),r.always(o,function(t){var e,n,r;if((e=null!=(n=null!=(r=t.clearCache)?r:o.clearCache)?n:s.clearCache(o,t))&&i.clear(e),(o.willCache()||i.get(o))&&i.set(o,o),!t.ok)return i.remove(o)})},n=function(){return!t()},t=function(){return h.isBusy()},y=function(){var t;if(t=navigator.connection)return t.saveData||t.rtt&&t.rtt>s.badRTT||t.downlink&&t.downlink<s.badDownlink},o=function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],h.abort.apply(h,t)},d=function(t,e){var n;if(t.cache&&e.url&&t.url!==e.url)return n=t.variant({method:e.method,url:e.url}),i.alias(t,n)},u=function(t){return r.contains(["GET","OPTIONS","HEAD"],r.normalizeMethod(t))},up.on("up:framework:reset",m),{request:a,preload:c,cache:i,isIdle:n,isBusy:t,isSafeMethod:u,config:s,abort:o,registerAliasForRedirect:d,queue:h,shouldReduceRequests:y,mimicLocalRequest:p}),up.request=up.network.request,up.cache=up.network.cache}.call(this),function(){var n,i,o,t,e,r,s,u,a,p,l,c,h,f,d,m,y,g,v,b=[].slice;i=up.util,n=up.element,up.layer=(t=[up.Layer.Modal,up.Layer.Popup,up.Layer.Drawer,up.Layer.Cover],i.map(t,"mode"),o=[up.Layer.Root].concat(t),p=new up.Config(function(){var t,e,n,r;for(r={mode:"modal",any:{mainTargets:["[up-main='']","main",":layer"]},root:{mainTargets:["[up-main~=root]"],historyVisible:!0},overlay:{mainTargets:["[up-main~=overlay]"],openAnimation:"fade-in",closeAnimation:"fade-out",dismissLabel:"\xd7",dismissAriaLabel:"Dismiss dialog",dismissable:!0,historyVisible:"auto"},cover:{mainTargets:["[up-main~=cover]"]},drawer:{mainTargets:["[up-main~=drawer]"],backdrop:!0,position:"left",size:"medium",openAnimation:function(t){switch(t.position){case"left":return"move-from-left";case"right":return"move-from-right"}},closeAnimation:function(t){switch(t.position){case"left":return"move-to-left";case"right":return"move-to-right"}}},modal:{mainTargets:["[up-main~=modal]"],backdrop:!0,size:"medium"},popup:{mainTargets:["[up-main~=popup]"],position:"bottom",size:"medium",align:"left",dismissable:"outside key"}},e=0,n=o.length;e<n;e++)r[(t=o[e]).mode].Class=t;return r}),v=null,l=[],c=function(t){return i.flatMap(h(t),"mainTargets")},h=function(t){return"root"===t?[p.root,p.any]:[p[t],p.overlay,p.any]},f=function(t){var e,n,r,o;return"function"==typeof(e=up.migrate).handleLayerOptions&&e.handleLayerOptions(t),i.isGiven(t.layer)?(n=String(t.layer).match(/^(new|shatter|swap)( (\w+))?/))&&(t.layer="new",r=n[1],o=n[3],t.mode||(t.mode=o||p.mode),"swap"===r?up.layer.isOverlay()&&(t.baseLayer="parent"):"shatter"===r&&(t.baseLayer="root")):t.mode?t.layer="new":i.isElementish(t.target)?t.layer=v.get(t.target,{normalizeLayerOptions:!1}):t.origin?t.layer="origin":t.layer="current",t.context||(t.context={}),t.baseLayer=v.get("current",i.merge(t,{normalizeLayerOptions:!1}))},u=function(t){var e,n,r;return r=t.mode,e=p[r].Class,n=i.reverse(h(r)),new e(t=i.mergeDefined.apply(i,b.call(n).concat([{mode:r,stack:v}],[t])))},m=function(t,e){return n.callbackAttr(t,e,["layer"])},a=function(t,e){return n.callbackAttr(t,e,["layer","value"])},g=function(){return p.reset(),v.reset(),l=i.filter(l,"isDefault")},d=function(t){return t=i.options(t,{layer:"new",defaultToEmptyContent:!0,navigate:!0}),up.render(t).then(function(t){return t.layer})},s=function(t){return new Promise(function(e,n){return t=i.merge(t,{onAccepted:function(t){return e(t.value)},onDismissed:function(t){return n(t.value)}}),d(t)})},e=function(){return i.map(o,function(t){return t.selector()}).join(",")},y=function(t){return i.isString(t)?'layer "'+t+'"':t.toString()},up.on("up:fragment:destroyed",function(){return v.sync()}),up.on("up:framework:boot",function(){return v=new up.LayerStack}),up.on("up:framework:reset",g),r=i.literal({config:p,mainTargets:c,open:d,build:u,ask:s,normalizeOptions:f,openCallbackAttr:m,closeCallbackAttr:a,anySelector:e,optionToString:y,get_stack:function(){return v}}),i.delegate(r,["get","getAll","root","overlays","current","front","sync","count","dismissOverlays"],function(){return v}),i.delegate(r,["accept","dismiss","isRoot","isOverlay","isFront","on","off","emit","parent","historyVisible","location","mode","context","element","contains","size","affix"],function(){return v.current}),r),i.getter(up,"context",function(){return up.layer.context})}.call(this),function(){var t,e,n,r,o,i,s,u,a,p,l,c,h,f,d,m,y,g,v,b,w,k,E,S,L,C,_,O,T,F,R,A,x,P,q,D=[].slice;up.link=(P=up.util,u=up.element,L=new up.LinkPreloader,S=null,e=["a[up-content]","a[up-fragment]","a[up-document]"],n=["a[href]","[up-href]"],t=["[up-follow]","[up-target]","[up-layer]","[up-transition]","[up-preload]"],r=function(t,n){return P.flatMap(t,function(e){return n.map(function(t){return e+t})})},o=new up.Config(function(){return{followSelectors:r(n,t).concat(e),noFollowSelectors:["[up-follow=false]","a[rel=download]","a[target]",'a[href^="#"]:not([up-content]):not([up-fragment]):not([up-document])','a[href^="javascript:"]'],instantSelectors:["[up-instant]"],noInstantSelectors:["[up-instant=false]"],preloadSelectors:r(n,["[up-preload]"]),noPreloadSelectors:["[up-preload=false]"],clickableSelectors:e.concat(["[up-emit]","[up-accept]","[up-dismiss]","[up-clickable]"]),preloadDelay:90,preloadEnabled:"auto"}}),d=function(){return o.followSelectors.join(",")},y=function(){return o.preloadSelectors.join(",")},m=function(){return o.instantSelectors.join(",")},f=function(){return o.clickableSelectors.join(",")},g=function(t){return u.matches(t,o.noFollowSelectors.join(","))||P.isCrossOrigin(t)},k=function(t){return!up.browser.canPushState()||u.matches(t,o.noPreloadSelectors.join(","))||g(t)||!q(t)},q=function(t){var e;if((e=O(t)).url)return null==e.cache&&(e.cache="auto"),e.basic=!0,new up.Request(e).willCache()},w=function(t){return u.matches(t,o.noInstantSelectors.join(","))||g(t)},F=function(){return S=null,o.reset(),L.reset()},a=up.mockable(function(t,e){return up.render(l(t,e))}),O=function(t,e){var n;return e=P.options(e),n=new up.OptionsParser(e,t),e.url=c(t,e),e.method=p(t,e),n.json("headers"),n.json("params"),n.booleanOrString("cache"),n.booleanOrString("clearCache"),n["boolean"]("solo"),n.string("contentType",{attr:["enctype","up-content-type"]}),e},l=function(t,e){var n,r,o;return t=up.fragment.get(t),e=O(t,e),(o=new up.OptionsParser(e,t,{fail:!0}))["boolean"]("feedback"),o["boolean"]("fail"),null==(n=o.options).origin&&(n.origin=t),o["boolean"]("navigate",{"default":!0}),o.string("confirm"),o.string("target"),o.booleanOrString("fallback"),o.parse(function(t,e){return u.callbackAttr(t,e,["request","response","renderOptions"])},"onLoaded"),o.string("content"),o.string("fragment"),o.string("document"),o["boolean"]("peel"),o.string("layer"),o.string("baseLayer"),o.json("context"),o.string("mode"),o.string("align"),o.string("position"),o.string("class"),o.string("size"),o.booleanOrString("dismissable"),o.parse(up.layer.openCallbackAttr,"onOpened"),o.parse(up.layer.closeCallbackAttr,"onAccepted"),o.parse(up.layer.closeCallbackAttr,"onDismissed"),o.string("acceptEvent"),o.string("dismissEvent"),o.string("acceptLocation"),o.string("dismissLocation"),o.booleanOrString("historyVisible"),o.booleanOrString("focus"),o["boolean"]("saveScroll"),o.booleanOrString("scroll"),o["boolean"]("revealTop"),o.number("revealMax"),o.number("revealPadding"),o.number("revealSnap"),o.string("scrollBehavior"),o.booleanOrString("history"),o.booleanOrString("location"),o.booleanOrString("title"),o.booleanOrString("animation"),o.booleanOrString("transition"),o.string("easing"),o.number("duration"),"function"==typeof(r=up.migrate).parseFollowOptions&&r.parseFollowOptions(o),e.guardEvent||(e.guardEvent=up.event.build(
6
+ "up:link:follow",{log:"Following link"})),e},T=function(t,e){var n;return t=up.fragment.get(t),A()?(n=up.event.build("up:link:preload",{log:["Preloading link %o",t]}),a(t,P.merge(e,{preload:!0},{guardEvent:n}))):up.error.failed.async("Link preloading is disabled")},A=function(){var t;return"auto"===(t=o.preloadEnabled)?!up.network.shouldReduceRequests():t},p=function(t,e){return null==e&&(e={}),P.normalizeMethod(e.method||t.getAttribute("up-method")||t.getAttribute("data-method"))},c=function(t,e){var n;if(null==e&&(e={}),"#"!==(n=e.url||t.getAttribute("href")||t.getAttribute("up-href")))return n},v=function(t){return t=up.fragment.get(t),u.matches(t,d())&&!g(t)},_=function(t){if(!v(t))return t.setAttribute("up-follow","")},C=function(t){if(!u.matches(t,"a[href], button"))return u.setMissingAttrs(t,{tabindex:"0",role:"link"}),t.addEventListener("keydown",function(t){if("Enter"===t.key||"Space"===t.key)return h(t)})},up.macro(f,C),R=function(t,e){var n,r;return!t.defaultPrevented&&!g(e)&&(r="a, [up-href], "+up.form.fieldSelector(),!(n=u.closest(t.target,r))||n===e)},b=function(t){var e;return(e=u.closest(t,m()))&&!w(e)},i=function(n){return n.on("click",function(t,e){if(up.event.isUnmodified(t))return b(e)&&S?up.event.halt(t):n.wasHitByMouseEvent(t)&&!s(t)&&h(t),S=null}),n.on("mousedown",function(t,e){if(up.event.isUnmodified(t))return S=t.target,b(e)?h(t):void 0})},s=function(t){return S&&S!==t.target},h=function(t){var e;return e=up.event.fork(t,"up:click",["clientX","clientY","button"].concat(D.call(up.event.keyModifiers))),up.emit(t.target,e,{log:!1})},E=function(t){var e;return e=p(t),up.network.isSafeMethod(e)},x=function(r,o,i){return up.macro("["+r+"]",function(t){var e,n;return n=P.copy(o),(e=t.getAttribute(r))?n["up-target"]=e:n["up-follow"]="",u.setMissingAttrs(t,n),t.removeAttribute(r),"function"==typeof i?i():void 0})},up.on("up:click",d,function(t,e){if(R(t,e))return up.event.halt(t),up.log.muteRejection(a(e))}),x("up-dash",{"up-preload":"","up-instant":""}),up.macro("[up-expand]",function(t){var e,n,r;if(r=t.getAttribute("up-expand")||"a, [up-href]",n=u.get(t,r))return(e=u.upAttrs(n))["up-href"]||(e["up-href"]=n.getAttribute("href")),u.setMissingAttrs(t,e),_(t)}),up.compiler(y,function(t){if(!k(t))return L.observeLink(t)}),up.on("up:framework:reset",F),{follow:a,followOptions:l,preload:T,makeFollowable:_,makeClickable:C,isSafe:E,isFollowable:v,shouldFollowEvent:R,followMethod:p,targetMacro:x,convertClicks:i,config:o,combineFollowableSelectors:r}),up.follow=up.link.follow}.call(this),function(){var t,n,e,c,h,o,f,i,r,s,u,a,p,l,d,m,y,g,v,b,w,k,E,S,L,C,_=[].slice;up.form=(L=up.util,h=up.element,t=["[up-submit]","[up-target]","[up-layer]","[up-transition]"],c=new up.Config(function(){return{validateTargets:["[up-fieldset]:has(:origin)","fieldset:has(:origin)","label:has(:origin)","form:has(:origin)"],fieldSelectors:["select","input:not([type=submit]):not([type=image])","button[type]:not([type=submit])","textarea"],submitSelectors:up.link.combineFollowableSelectors(["form"],t),noSubmitSelectors:["[up-submit=false]","[target]"],submitButtonSelectors:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],observeDelay:0}}),a=function(){return c.submitSelectors.join(",")},n=null,y=function(){return c.reset()},o=function(e){return null==e&&(e=""),c.fieldSelectors.map(function(t){return t+e}).join(",")},f=function(t){var e,n,r;return t=h.get(t),e=h.subtree(t,o()),h.matches(t,"form[id]")&&(n=o(h.attributeSelector("form",t.getAttribute("id"))),r=h.all(n),e.push.apply(e,r),e=L.uniq(e)),e},w=function(t){var e,n;return n=v(),(e=document.activeElement)&&h.matches(e,n)&&t.contains(e)?e:h.get(t,n)},v=function(){return c.submitButtonSelectors.join(",")},g=up.mockable(function(t,e){return up.render(b(t,e))}),b=function(t,e){var n,r,o;return e=L.options(e),t=up.fragment.get(t),t=h.closest(t,"form"),r=new up.OptionsParser(e,t),n=up.Params.fromForm(t),(o=w(t))&&(n.addField(o),e.method||(e.method=o.getAttribute("formmethod")),e.url||(e.url=o.getAttribute("formaction"))),n.addAll(e.params),e.params=n,r.string("url",{attr:"action","default":up.fragment.source(t)}),r.string("method",{attr:["up-method","data-method","method"],"default":"GET",normalize:L.normalizeMethod}),"GET"===e.method&&(e.url=up.Params.stripURL(e.url)),r.string("failTarget",{"default":up.fragment.toTarget(t)}),e.guardEvent||(e.guardEvent=up.event.build("up:form:submit",{log:"Submitting form"})),L.assign(e,up.link.followOptions(t,e)),e},up.on("up:click",v,function(t,e){return e.focus()}),d=function(t){var e,n,r,o,i,s,u,a,p,l;return r=t,e=2<=arguments.length?_.call(arguments,1):[],r=h.list(r),o=L.flatMap(r,f),n=null!=(u=null!=(a=L.extractCallback(e))?a:m(r[0]))?u:up.fail("up.observe: No change callback given"),(s=L.extractOptions(e)).delay=null!=(p=null!=(l=s.delay)?l:h.numberAttr(r[0],"up-delay"))?p:c.observeDelay,(i=new up.FieldObserver(o,s,n)).start(),function(){return i.stop()}},m=function(t){var e;if(e=t.getAttribute("up-observe"))return new Function("value","name",e)},e=function(t,e){return d(t,e,function(){return g(t)})},r=function(t,e){var n,r;return n=p(t),L.isElementish(e.target)?up.fragment.toTarget(e.target):(r=e.target||t.getAttribute("up-validate")||n.getAttribute("up-validate"))?r:h.matches(t,"form")?up.fragment.toTarget(t):s(t,e)||up.fail("Could not find validation target for %o (tried defaults %o)",t,c.validateTargets)},s=function(t,e){var n;return n=up.layer.get(t),L.findResult(c.validateTargets,function(t){if(up.fragment.get(t,L.merge(e,{layer:n})))return t})},C=function(t,e){return t=up.fragment.get(t),(e=L.options(e)).navigate=!1,e.origin=t,e.history=!1,e.target=r(t,e),e.focus="keep",e.fail=!1,e.headers||(e.headers={}),e.headers[up.protocol.headerize("validate")]=t.getAttribute("name")||":unknown",e.guardEvent=up.event.build("up:form:validate",{field:t,log:"Validating form"}),g(t,e)},S=function(t){var e,n,r,o,i,s;return o=i=void 0,h.matches(t,"input[type=checkbox]")?t.checked?(i=t.value,o=":checked"):o=":unchecked":h.matches(t,"input[type=radio]")?(n=p(t),r=t.getAttribute("name"),(e=n.querySelector("input[type=radio]"+h.attributeSelector("name",r)+":checked"))?(o=":checked",i=e.value):o=":unchecked"):i=t.value,s=[],L.isPresent(i)?(s.push(i),s.push(":present")):s.push(":blank"),L.isPresent(o)&&s.push(o),s},E=function(t,e){var n,r,o,i;return null==e&&(e={}),i=null!=(o=e.target)?o:t.getAttribute("up-switch"),r=p(t),i||up.fail("No switch target given for %o",t),n=S(t),L.each(h.all(r,i),function(t){return k(t,n)})},k=up.mockable(function(t,e){var n,r,o;return e||(e=S(i(t))),(n=t.getAttribute("up-hide-for"))?(n=L.splitValues(n),r=0===L.intersect(e,n).length):(o=(o=t.getAttribute("up-show-for"))?L.splitValues(o):[":present",":checked"],r=0<L.intersect(e,o).length),h.toggle(t,r),t.classList.add("up-switched")}),i=function(n){var t,e;return t=p(n),e=h.all(t,"[up-switch]"),L.find(e,function(t){var e;return e=t.getAttribute("up-switch"),h.matches(n,e)})||up.fail("Could not find [up-switch] field for %o",n)},p=function(t){return t.form||h.closest(t,"form, "+up.layer.anySelector())},u=function(){var t;if((t=document.activeElement)&&h.matches(t,o()))return t},l=function(t){return h.matches(t,c.noSubmitSelectors.join(","))},up.on("submit",a,function(t,e){if(!t.defaultPrevented&&!l(e))return"function"==typeof n&&n(),up.event.halt(t),up.log.muteRejection(g(e))}),up.on("change","[up-validate]",function(t){var e;return e=f(t.target)[0],n=L.abortableMicrotask(function(){return up.log.muteRejection(C(e))})}),up.compiler("[up-switch]",function(t){return E(t)}),up.on("change","[up-switch]",function(t,e){return E(e)}),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",function(t){return k(t)}),up.compiler("[up-observe]",function(t){return d(t)}),up.compiler("[up-autosubmit]",function(t){return e(t)}),up.on("up:framework:reset",y),{config:c,submit:g,submitOptions:b,observe:d,validate:C,autosubmit:e,fieldSelector:o,fields:f,focusedField:u,switchTarget:k}),up.submit=up.form.submit,up.observe=up.form.observe,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate}.call(this),function(){var e,o,i,t,u,a,n,p,s,r,l,c,h,f,d,m,y,g,v;up.feedback=(d=up.util,a=up.element,u=new up.Config(function(){return{currentClasses:["up-current"],navSelectors:["[up-nav]"]}}),c=function(){return u.reset()},e="up-active",o="a, [up-href]",s=function(){return u.navSelectors.join(",")},r=function(t){if(t)return d.normalizeURL(t,{stripTrailingSlash:!0})},p=function(t){return t.upFeedbackURLs||(t.upFeedbackURLs=new up.LinkFeedbackURLs(t))},m=function(t,e){var n;return a.closest(t,s())?(n=a.subtree(t,o),g(n,e)):v(t,e)},v=function(t,e){var n,r;return r=a.subtree(t,s()),n=d.flatMap(r,function(t){return a.subtree(t,o)}),g(n,e)},g=function(t,e){var n,s;if(null==e&&(e={}),t.length)return n=e.layer||up.layer.get(t[0]),(s=n.feedbackLocation)?d.each(t,function(t){var e,n,r,o,i;for(r=p(t).isCurrent(s),n=0,o=(i=u.currentClasses).length;n<o;n++)e=i[n],a.toggleClass(t,e,r);return a.toggleAttr(t,"aria-current","page",r)}):void 0},n=function(t){return a.ancestor(t,o)||t},h=function(t){return n(t).classList.add(e)},f=function(t){return n(t).classList.remove(e)},i=function(t,e){var n;return h(t),n=e(),d.always(n,function(){return f(t)}),n},t=function(t,e){var n,r;return(r=t.feedback)&&(n=d.isBoolean(r)?t.origin:r),n?(n=up.fragment.get(n),i(n,e)):e()},y=function(t){var e,n;if(n=t.feedbackLocation,e=r(t.location),!n||n!==e)return t.feedbackLocation=e,v(t.element,{layer:t})},l=function(){var t;if((t=up.layer.front).showsLiveHistory())return y(t)},up.on("up:location:changed",function(){return l()}),up.on("up:fragment:inserted",function(t,e){return m(e,t)}),up.on("up:layer:location:changed",function(t){return y(t.layer)}),up.on("up:framework:reset",c),{config:u,start:h,stop:f,around:i,aroundForOptions:t,normalizeURL:r})}.call(this),function(){var l,c,t,e,h,n,r,f;up.radio=(f=up.util,c=up.element,l=new up.Config(function(){return{hungrySelectors:["[up-hungry]"],pollInterval:3e4,pollEnabled:"auto"}}),e=function(){return l.reset()},t=function(){return l.hungrySelectors.join(",")},n=function(t,e){var n,r,o,i,s,u,a,p;return null==e&&(e={}),i=null!=(u=null!=(a=e.interval)?a:c.numberAttr(t,"up-interval"))?u:l.pollInterval,p=!1,s=null,e.onQueued=function(t){return s=t},r=function(){if(!p)return h(t)?f.always(up.reload(t,e),o):(up.puts("[up-poll]","Polling is disabled"),o(Math.min(1e4,i)))},o=function(t){if(null==t&&(t=i),!p)return setTimeout(r,t)},n=function(){return p=!0,null!=s?s.abort():void 0},up.on(t,"up:poll:stop",n),o(),n},r=function(t){return up.emit(t,"up:poll:stop")},h=function(t){var e,n;return"auto"===(n=f.evalOption(l.pollEnabled,t))?!document.hidden&&!up.network.shouldReduceRequests()&&(null!=(e=up.layer.get(t))&&"function"==typeof e.isFront?e.isFront():void 0):n},up.compiler("[up-poll]",n),up.on("up:framework:reset",e),{config:l,hungrySelector:t,startPolling:n,stopPolling:r})}.call(this),function(){var r,o,t;up.rails=(t=up.util,r=up.element,o=function(){var t;return window._rails_loaded||window.Rails||(null!=(t=window.jQuery)?t.rails:void 0)},t.each(["method","confirm"],function(t){var e,n;return e="data-"+t,n="up-"+t,up.macro("a["+e+"]",function(t){if(o()&&up.link.isFollowable(t))return r.setMissingAttr(t,n,t.getAttribute(e)),t.removeAttribute(e)})}))}.call(this),function(){up.framework.boot()}.call(this);