From 7b16fece77d9f201d76db99955adf7acfcb1e7da Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Mon, 10 Apr 2017 16:00:12 -0700 Subject: [PATCH 01/38] added welcome controller and completed app foundation --- media_ranker/.gitignore | 17 ++ media_ranker/Gemfile | 63 ++++++ media_ranker/Gemfile.lock | 200 ++++++++++++++++++ media_ranker/README.md | 24 +++ media_ranker/Rakefile | 6 + media_ranker/app/assets/config/manifest.js | 3 + media_ranker/app/assets/images/.keep | 0 .../app/assets/javascripts/application.js | 16 ++ media_ranker/app/assets/javascripts/cable.js | 13 ++ .../app/assets/javascripts/channels/.keep | 0 .../app/assets/javascripts/medias.coffee | 3 + .../app/assets/javascripts/users.coffee | 3 + .../app/assets/javascripts/welcome.coffee | 3 + .../app/assets/stylesheets/application.css | 15 ++ .../app/assets/stylesheets/medias.scss | 3 + .../app/assets/stylesheets/users.scss | 3 + .../app/assets/stylesheets/welcome.scss | 3 + .../app/channels/application_cable/channel.rb | 4 + .../channels/application_cable/connection.rb | 4 + .../app/controllers/application_controller.rb | 3 + media_ranker/app/controllers/concerns/.keep | 0 .../app/controllers/users_controller.rb | 2 + .../app/controllers/welcome_controller.rb | 2 + .../app/controllers/works_controller.rb | 2 + .../app/helpers/application_helper.rb | 2 + media_ranker/app/helpers/medias_helper.rb | 2 + media_ranker/app/helpers/users_helper.rb | 2 + media_ranker/app/helpers/welcome_helper.rb | 2 + media_ranker/app/jobs/application_job.rb | 2 + .../app/mailers/application_mailer.rb | 4 + media_ranker/app/models/application_record.rb | 3 + media_ranker/app/models/concerns/.keep | 0 media_ranker/app/models/user.rb | 2 + media_ranker/app/models/work.rb | 2 + .../app/views/layouts/application.html.erb | 14 ++ .../app/views/layouts/mailer.html.erb | 13 ++ .../app/views/layouts/mailer.text.erb | 1 + media_ranker/bin/bundle | 3 + media_ranker/bin/rails | 9 + media_ranker/bin/rake | 9 + media_ranker/bin/setup | 34 +++ media_ranker/bin/spring | 17 ++ media_ranker/bin/update | 29 +++ media_ranker/config.ru | 5 + media_ranker/config/application.rb | 19 ++ media_ranker/config/boot.rb | 3 + media_ranker/config/cable.yml | 9 + media_ranker/config/database.yml | 85 ++++++++ media_ranker/config/environment.rb | 5 + .../config/environments/development.rb | 54 +++++ .../config/environments/production.rb | 86 ++++++++ media_ranker/config/environments/test.rb | 42 ++++ .../application_controller_renderer.rb | 6 + media_ranker/config/initializers/assets.rb | 11 + .../initializers/backtrace_silencers.rb | 7 + .../config/initializers/cookies_serializer.rb | 5 + .../initializers/filter_parameter_logging.rb | 4 + .../config/initializers/inflections.rb | 16 ++ .../config/initializers/mime_types.rb | 4 + .../initializers/new_framework_defaults.rb | 24 +++ .../config/initializers/session_store.rb | 3 + .../config/initializers/wrap_parameters.rb | 14 ++ media_ranker/config/locales/en.yml | 23 ++ media_ranker/config/puma.rb | 47 ++++ media_ranker/config/routes.rb | 3 + media_ranker/config/secrets.yml | 22 ++ media_ranker/config/spring.rb | 6 + .../db/migrate/20170410220905_create_users.rb | 9 + ...41_change_stringg_to_string_in_username.rb | 5 + .../db/migrate/20170410221612_create_media.rb | 13 ++ .../20170410225325_rename_media_to_works.rb | 5 + media_ranker/db/schema.rb | 34 +++ media_ranker/db/seeds.rb | 7 + media_ranker/lib/assets/.keep | 0 media_ranker/lib/tasks/.keep | 0 media_ranker/log/.keep | 0 media_ranker/public/404.html | 67 ++++++ media_ranker/public/422.html | 67 ++++++ media_ranker/public/500.html | 66 ++++++ .../public/apple-touch-icon-precomposed.png | 0 media_ranker/public/apple-touch-icon.png | 0 media_ranker/public/favicon.ico | 0 media_ranker/public/robots.txt | 5 + media_ranker/test/controllers/.keep | 0 .../controllers/medias_controller_test.rb | 7 + .../test/controllers/users_controller_test.rb | 7 + .../controllers/welcome_controller_test.rb | 7 + media_ranker/test/fixtures/.keep | 0 media_ranker/test/fixtures/files/.keep | 0 media_ranker/test/fixtures/media.yml | 15 ++ media_ranker/test/fixtures/users.yml | 7 + media_ranker/test/helpers/.keep | 0 media_ranker/test/integration/.keep | 0 media_ranker/test/mailers/.keep | 0 media_ranker/test/models/.keep | 0 media_ranker/test/models/medium_test.rb | 9 + media_ranker/test/models/user_test.rb | 9 + media_ranker/test/test_helper.rb | 26 +++ media_ranker/tmp/.keep | 0 media_ranker/vendor/assets/javascripts/.keep | 0 media_ranker/vendor/assets/stylesheets/.keep | 0 101 files changed, 1410 insertions(+) create mode 100644 media_ranker/.gitignore create mode 100644 media_ranker/Gemfile create mode 100644 media_ranker/Gemfile.lock create mode 100644 media_ranker/README.md create mode 100644 media_ranker/Rakefile create mode 100644 media_ranker/app/assets/config/manifest.js create mode 100644 media_ranker/app/assets/images/.keep create mode 100644 media_ranker/app/assets/javascripts/application.js create mode 100644 media_ranker/app/assets/javascripts/cable.js create mode 100644 media_ranker/app/assets/javascripts/channels/.keep create mode 100644 media_ranker/app/assets/javascripts/medias.coffee create mode 100644 media_ranker/app/assets/javascripts/users.coffee create mode 100644 media_ranker/app/assets/javascripts/welcome.coffee create mode 100644 media_ranker/app/assets/stylesheets/application.css create mode 100644 media_ranker/app/assets/stylesheets/medias.scss create mode 100644 media_ranker/app/assets/stylesheets/users.scss create mode 100644 media_ranker/app/assets/stylesheets/welcome.scss create mode 100644 media_ranker/app/channels/application_cable/channel.rb create mode 100644 media_ranker/app/channels/application_cable/connection.rb create mode 100644 media_ranker/app/controllers/application_controller.rb create mode 100644 media_ranker/app/controllers/concerns/.keep create mode 100644 media_ranker/app/controllers/users_controller.rb create mode 100644 media_ranker/app/controllers/welcome_controller.rb create mode 100644 media_ranker/app/controllers/works_controller.rb create mode 100644 media_ranker/app/helpers/application_helper.rb create mode 100644 media_ranker/app/helpers/medias_helper.rb create mode 100644 media_ranker/app/helpers/users_helper.rb create mode 100644 media_ranker/app/helpers/welcome_helper.rb create mode 100644 media_ranker/app/jobs/application_job.rb create mode 100644 media_ranker/app/mailers/application_mailer.rb create mode 100644 media_ranker/app/models/application_record.rb create mode 100644 media_ranker/app/models/concerns/.keep create mode 100644 media_ranker/app/models/user.rb create mode 100644 media_ranker/app/models/work.rb create mode 100644 media_ranker/app/views/layouts/application.html.erb create mode 100644 media_ranker/app/views/layouts/mailer.html.erb create mode 100644 media_ranker/app/views/layouts/mailer.text.erb create mode 100755 media_ranker/bin/bundle create mode 100755 media_ranker/bin/rails create mode 100755 media_ranker/bin/rake create mode 100755 media_ranker/bin/setup create mode 100755 media_ranker/bin/spring create mode 100755 media_ranker/bin/update create mode 100644 media_ranker/config.ru create mode 100644 media_ranker/config/application.rb create mode 100644 media_ranker/config/boot.rb create mode 100644 media_ranker/config/cable.yml create mode 100644 media_ranker/config/database.yml create mode 100644 media_ranker/config/environment.rb create mode 100644 media_ranker/config/environments/development.rb create mode 100644 media_ranker/config/environments/production.rb create mode 100644 media_ranker/config/environments/test.rb create mode 100644 media_ranker/config/initializers/application_controller_renderer.rb create mode 100644 media_ranker/config/initializers/assets.rb create mode 100644 media_ranker/config/initializers/backtrace_silencers.rb create mode 100644 media_ranker/config/initializers/cookies_serializer.rb create mode 100644 media_ranker/config/initializers/filter_parameter_logging.rb create mode 100644 media_ranker/config/initializers/inflections.rb create mode 100644 media_ranker/config/initializers/mime_types.rb create mode 100644 media_ranker/config/initializers/new_framework_defaults.rb create mode 100644 media_ranker/config/initializers/session_store.rb create mode 100644 media_ranker/config/initializers/wrap_parameters.rb create mode 100644 media_ranker/config/locales/en.yml create mode 100644 media_ranker/config/puma.rb create mode 100644 media_ranker/config/routes.rb create mode 100644 media_ranker/config/secrets.yml create mode 100644 media_ranker/config/spring.rb create mode 100644 media_ranker/db/migrate/20170410220905_create_users.rb create mode 100644 media_ranker/db/migrate/20170410220941_change_stringg_to_string_in_username.rb create mode 100644 media_ranker/db/migrate/20170410221612_create_media.rb create mode 100644 media_ranker/db/migrate/20170410225325_rename_media_to_works.rb create mode 100644 media_ranker/db/schema.rb create mode 100644 media_ranker/db/seeds.rb create mode 100644 media_ranker/lib/assets/.keep create mode 100644 media_ranker/lib/tasks/.keep create mode 100644 media_ranker/log/.keep create mode 100644 media_ranker/public/404.html create mode 100644 media_ranker/public/422.html create mode 100644 media_ranker/public/500.html create mode 100644 media_ranker/public/apple-touch-icon-precomposed.png create mode 100644 media_ranker/public/apple-touch-icon.png create mode 100644 media_ranker/public/favicon.ico create mode 100644 media_ranker/public/robots.txt create mode 100644 media_ranker/test/controllers/.keep create mode 100644 media_ranker/test/controllers/medias_controller_test.rb create mode 100644 media_ranker/test/controllers/users_controller_test.rb create mode 100644 media_ranker/test/controllers/welcome_controller_test.rb create mode 100644 media_ranker/test/fixtures/.keep create mode 100644 media_ranker/test/fixtures/files/.keep create mode 100644 media_ranker/test/fixtures/media.yml create mode 100644 media_ranker/test/fixtures/users.yml create mode 100644 media_ranker/test/helpers/.keep create mode 100644 media_ranker/test/integration/.keep create mode 100644 media_ranker/test/mailers/.keep create mode 100644 media_ranker/test/models/.keep create mode 100644 media_ranker/test/models/medium_test.rb create mode 100644 media_ranker/test/models/user_test.rb create mode 100644 media_ranker/test/test_helper.rb create mode 100644 media_ranker/tmp/.keep create mode 100644 media_ranker/vendor/assets/javascripts/.keep create mode 100644 media_ranker/vendor/assets/stylesheets/.keep diff --git a/media_ranker/.gitignore b/media_ranker/.gitignore new file mode 100644 index 0000000000..48fb168f64 --- /dev/null +++ b/media_ranker/.gitignore @@ -0,0 +1,17 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore Byebug command history file. +.byebug_history diff --git a/media_ranker/Gemfile b/media_ranker/Gemfile new file mode 100644 index 0000000000..d0e9da8aec --- /dev/null +++ b/media_ranker/Gemfile @@ -0,0 +1,63 @@ +source 'https://rubygems.org' + +git_source(:github) do |repo_name| + repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") + "https://github.com/#{repo_name}.git" +end + + +# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' +gem 'rails', '~> 5.0.2' +# Use postgresql as the database for Active Record +gem 'pg', '~> 0.18' +# Use Puma as the app server +gem 'puma', '~> 3.0' +# Use SCSS for stylesheets +gem 'sass-rails', '~> 5.0' +# Use Uglifier as compressor for JavaScript assets +gem 'uglifier', '>= 1.3.0' +# Use CoffeeScript for .coffee assets and views +gem 'coffee-rails', '~> 4.2' +# See https://github.com/rails/execjs#readme for more supported runtimes +# gem 'therubyracer', platforms: :ruby + +# Use jquery as the JavaScript library +gem 'jquery-rails' +# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks +gem 'turbolinks', '~> 5' +# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder +gem 'jbuilder', '~> 2.5' +# Use Redis adapter to run Action Cable in production +# gem 'redis', '~> 3.0' +# Use ActiveModel has_secure_password +# gem 'bcrypt', '~> 3.1.7' + +# Use Capistrano for deployment +# gem 'capistrano-rails', group: :development + +group :development, :test do + # Call 'byebug' anywhere in the code to stop execution and get a debugger console + gem 'byebug', platform: :mri +end + +group :development do + # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. + gem 'web-console', '>= 3.3.0' + gem 'listen', '~> 3.0.5' + # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring + gem 'spring' + gem 'spring-watcher-listen', '~> 2.0.0' +end + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] + +group :development do + gem 'better_errors' + gem 'pry-rails' +end + +group :test do + gem 'minitest-rails' + gem 'minitest-reporters' +end diff --git a/media_ranker/Gemfile.lock b/media_ranker/Gemfile.lock new file mode 100644 index 0000000000..6dffa9cd65 --- /dev/null +++ b/media_ranker/Gemfile.lock @@ -0,0 +1,200 @@ +GEM + remote: https://rubygems.org/ + specs: + actioncable (5.0.2) + actionpack (= 5.0.2) + nio4r (>= 1.2, < 3.0) + websocket-driver (~> 0.6.1) + actionmailer (5.0.2) + actionpack (= 5.0.2) + actionview (= 5.0.2) + activejob (= 5.0.2) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (5.0.2) + actionview (= 5.0.2) + activesupport (= 5.0.2) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.0.2) + activesupport (= 5.0.2) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (5.0.2) + activesupport (= 5.0.2) + globalid (>= 0.3.6) + activemodel (5.0.2) + activesupport (= 5.0.2) + activerecord (5.0.2) + activemodel (= 5.0.2) + activesupport (= 5.0.2) + arel (~> 7.0) + activesupport (5.0.2) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (~> 0.7) + minitest (~> 5.1) + tzinfo (~> 1.1) + ansi (1.5.0) + arel (7.1.4) + better_errors (2.1.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + rack (>= 0.9.0) + bindex (0.5.0) + builder (3.2.3) + byebug (9.0.6) + coderay (1.1.1) + coffee-rails (4.2.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.2.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.12.2) + concurrent-ruby (1.0.5) + erubis (2.7.0) + execjs (2.7.0) + ffi (1.9.18) + globalid (0.3.7) + activesupport (>= 4.1.0) + i18n (0.8.1) + jbuilder (2.6.3) + activesupport (>= 3.0.0, < 5.2) + multi_json (~> 1.2) + jquery-rails (4.3.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + loofah (2.0.3) + nokogiri (>= 1.5.9) + mail (2.6.4) + mime-types (>= 1.16, < 4) + method_source (0.8.2) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_portile2 (2.1.0) + minitest (5.10.1) + minitest-rails (3.0.0) + minitest (~> 5.8) + railties (~> 5.0) + minitest-reporters (1.1.14) + ansi + builder + minitest (>= 5.0) + ruby-progressbar + multi_json (1.12.1) + nio4r (2.0.0) + nokogiri (1.7.1) + mini_portile2 (~> 2.1.0) + pg (0.20.0) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + pry-rails (0.3.6) + pry (>= 0.10.4) + puma (3.8.2) + rack (2.0.1) + rack-test (0.6.3) + rack (>= 1.0) + rails (5.0.2) + actioncable (= 5.0.2) + actionmailer (= 5.0.2) + actionpack (= 5.0.2) + actionview (= 5.0.2) + activejob (= 5.0.2) + activemodel (= 5.0.2) + activerecord (= 5.0.2) + activesupport (= 5.0.2) + bundler (>= 1.3.0, < 2.0) + railties (= 5.0.2) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.2) + activesupport (>= 4.2.0, < 6.0) + nokogiri (~> 1.6) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (5.0.2) + actionpack (= 5.0.2) + activesupport (= 5.0.2) + method_source + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (12.0.0) + rb-fsevent (0.9.8) + rb-inotify (0.9.8) + ffi (>= 0.5.0) + ruby-progressbar (1.8.1) + sass (3.4.23) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + slop (3.6.0) + spring (2.0.1) + activesupport (>= 4.2) + spring-watcher-listen (2.0.1) + listen (>= 2.7, < 4.0) + spring (>= 1.2, < 3.0) + sprockets (3.7.1) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.0) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + thor (0.19.4) + thread_safe (0.3.6) + tilt (2.0.7) + turbolinks (5.0.1) + turbolinks-source (~> 5) + turbolinks-source (5.0.0) + tzinfo (1.2.3) + thread_safe (~> 0.1) + uglifier (3.2.0) + execjs (>= 0.3.0, < 3) + web-console (3.5.0) + actionview (>= 5.0) + activemodel (>= 5.0) + bindex (>= 0.4.0) + railties (>= 5.0) + websocket-driver (0.6.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + +PLATFORMS + ruby + +DEPENDENCIES + better_errors + byebug + coffee-rails (~> 4.2) + jbuilder (~> 2.5) + jquery-rails + listen (~> 3.0.5) + minitest-rails + minitest-reporters + pg (~> 0.18) + pry-rails + puma (~> 3.0) + rails (~> 5.0.2) + sass-rails (~> 5.0) + spring + spring-watcher-listen (~> 2.0.0) + turbolinks (~> 5) + tzinfo-data + uglifier (>= 1.3.0) + web-console (>= 3.3.0) + +BUNDLED WITH + 1.14.6 diff --git a/media_ranker/README.md b/media_ranker/README.md new file mode 100644 index 0000000000..7db80e4ca1 --- /dev/null +++ b/media_ranker/README.md @@ -0,0 +1,24 @@ +# README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... diff --git a/media_ranker/Rakefile b/media_ranker/Rakefile new file mode 100644 index 0000000000..e85f913914 --- /dev/null +++ b/media_ranker/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require_relative 'config/application' + +Rails.application.load_tasks diff --git a/media_ranker/app/assets/config/manifest.js b/media_ranker/app/assets/config/manifest.js new file mode 100644 index 0000000000..b16e53d6d5 --- /dev/null +++ b/media_ranker/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_tree ../images +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css diff --git a/media_ranker/app/assets/images/.keep b/media_ranker/app/assets/images/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/app/assets/javascripts/application.js b/media_ranker/app/assets/javascripts/application.js new file mode 100644 index 0000000000..b12018d099 --- /dev/null +++ b/media_ranker/app/assets/javascripts/application.js @@ -0,0 +1,16 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, +// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. JavaScript code in this file should be added after the last require_* statement. +// +// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require jquery +//= require jquery_ujs +//= require turbolinks +//= require_tree . diff --git a/media_ranker/app/assets/javascripts/cable.js b/media_ranker/app/assets/javascripts/cable.js new file mode 100644 index 0000000000..71ee1e66de --- /dev/null +++ b/media_ranker/app/assets/javascripts/cable.js @@ -0,0 +1,13 @@ +// Action Cable provides the framework to deal with WebSockets in Rails. +// You can generate new channels where WebSocket features live using the rails generate channel command. +// +//= require action_cable +//= require_self +//= require_tree ./channels + +(function() { + this.App || (this.App = {}); + + App.cable = ActionCable.createConsumer(); + +}).call(this); diff --git a/media_ranker/app/assets/javascripts/channels/.keep b/media_ranker/app/assets/javascripts/channels/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/app/assets/javascripts/medias.coffee b/media_ranker/app/assets/javascripts/medias.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/media_ranker/app/assets/javascripts/medias.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/media_ranker/app/assets/javascripts/users.coffee b/media_ranker/app/assets/javascripts/users.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/media_ranker/app/assets/javascripts/users.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/media_ranker/app/assets/javascripts/welcome.coffee b/media_ranker/app/assets/javascripts/welcome.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/media_ranker/app/assets/javascripts/welcome.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/media_ranker/app/assets/stylesheets/application.css b/media_ranker/app/assets/stylesheets/application.css new file mode 100644 index 0000000000..0ebd7fe829 --- /dev/null +++ b/media_ranker/app/assets/stylesheets/application.css @@ -0,0 +1,15 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, + * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS + * files in this directory. Styles in this file should be added after the last require_* statement. + * It is generally better to create a new file per style scope. + * + *= require_tree . + *= require_self + */ diff --git a/media_ranker/app/assets/stylesheets/medias.scss b/media_ranker/app/assets/stylesheets/medias.scss new file mode 100644 index 0000000000..ce8c348f12 --- /dev/null +++ b/media_ranker/app/assets/stylesheets/medias.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the medias controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/media_ranker/app/assets/stylesheets/users.scss b/media_ranker/app/assets/stylesheets/users.scss new file mode 100644 index 0000000000..1efc835ccd --- /dev/null +++ b/media_ranker/app/assets/stylesheets/users.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the users controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/media_ranker/app/assets/stylesheets/welcome.scss b/media_ranker/app/assets/stylesheets/welcome.scss new file mode 100644 index 0000000000..77ce11a740 --- /dev/null +++ b/media_ranker/app/assets/stylesheets/welcome.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the welcome controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/media_ranker/app/channels/application_cable/channel.rb b/media_ranker/app/channels/application_cable/channel.rb new file mode 100644 index 0000000000..d672697283 --- /dev/null +++ b/media_ranker/app/channels/application_cable/channel.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Channel < ActionCable::Channel::Base + end +end diff --git a/media_ranker/app/channels/application_cable/connection.rb b/media_ranker/app/channels/application_cable/connection.rb new file mode 100644 index 0000000000..0ff5442f47 --- /dev/null +++ b/media_ranker/app/channels/application_cable/connection.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Connection < ActionCable::Connection::Base + end +end diff --git a/media_ranker/app/controllers/application_controller.rb b/media_ranker/app/controllers/application_controller.rb new file mode 100644 index 0000000000..1c07694e9d --- /dev/null +++ b/media_ranker/app/controllers/application_controller.rb @@ -0,0 +1,3 @@ +class ApplicationController < ActionController::Base + protect_from_forgery with: :exception +end diff --git a/media_ranker/app/controllers/concerns/.keep b/media_ranker/app/controllers/concerns/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/app/controllers/users_controller.rb b/media_ranker/app/controllers/users_controller.rb new file mode 100644 index 0000000000..3e74dea87f --- /dev/null +++ b/media_ranker/app/controllers/users_controller.rb @@ -0,0 +1,2 @@ +class UsersController < ApplicationController +end diff --git a/media_ranker/app/controllers/welcome_controller.rb b/media_ranker/app/controllers/welcome_controller.rb new file mode 100644 index 0000000000..d8c85ab84b --- /dev/null +++ b/media_ranker/app/controllers/welcome_controller.rb @@ -0,0 +1,2 @@ +class WelcomeController < ApplicationController +end diff --git a/media_ranker/app/controllers/works_controller.rb b/media_ranker/app/controllers/works_controller.rb new file mode 100644 index 0000000000..56b02c9f2e --- /dev/null +++ b/media_ranker/app/controllers/works_controller.rb @@ -0,0 +1,2 @@ +class WorksController < ApplicationController +end diff --git a/media_ranker/app/helpers/application_helper.rb b/media_ranker/app/helpers/application_helper.rb new file mode 100644 index 0000000000..de6be7945c --- /dev/null +++ b/media_ranker/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/media_ranker/app/helpers/medias_helper.rb b/media_ranker/app/helpers/medias_helper.rb new file mode 100644 index 0000000000..e0f0d2997a --- /dev/null +++ b/media_ranker/app/helpers/medias_helper.rb @@ -0,0 +1,2 @@ +module MediasHelper +end diff --git a/media_ranker/app/helpers/users_helper.rb b/media_ranker/app/helpers/users_helper.rb new file mode 100644 index 0000000000..2310a240d7 --- /dev/null +++ b/media_ranker/app/helpers/users_helper.rb @@ -0,0 +1,2 @@ +module UsersHelper +end diff --git a/media_ranker/app/helpers/welcome_helper.rb b/media_ranker/app/helpers/welcome_helper.rb new file mode 100644 index 0000000000..eeead45fc9 --- /dev/null +++ b/media_ranker/app/helpers/welcome_helper.rb @@ -0,0 +1,2 @@ +module WelcomeHelper +end diff --git a/media_ranker/app/jobs/application_job.rb b/media_ranker/app/jobs/application_job.rb new file mode 100644 index 0000000000..a009ace51c --- /dev/null +++ b/media_ranker/app/jobs/application_job.rb @@ -0,0 +1,2 @@ +class ApplicationJob < ActiveJob::Base +end diff --git a/media_ranker/app/mailers/application_mailer.rb b/media_ranker/app/mailers/application_mailer.rb new file mode 100644 index 0000000000..286b2239d1 --- /dev/null +++ b/media_ranker/app/mailers/application_mailer.rb @@ -0,0 +1,4 @@ +class ApplicationMailer < ActionMailer::Base + default from: 'from@example.com' + layout 'mailer' +end diff --git a/media_ranker/app/models/application_record.rb b/media_ranker/app/models/application_record.rb new file mode 100644 index 0000000000..10a4cba84d --- /dev/null +++ b/media_ranker/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end diff --git a/media_ranker/app/models/concerns/.keep b/media_ranker/app/models/concerns/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/app/models/user.rb b/media_ranker/app/models/user.rb new file mode 100644 index 0000000000..379658a509 --- /dev/null +++ b/media_ranker/app/models/user.rb @@ -0,0 +1,2 @@ +class User < ApplicationRecord +end diff --git a/media_ranker/app/models/work.rb b/media_ranker/app/models/work.rb new file mode 100644 index 0000000000..95322dd45e --- /dev/null +++ b/media_ranker/app/models/work.rb @@ -0,0 +1,2 @@ +class Work < ApplicationRecord +end diff --git a/media_ranker/app/views/layouts/application.html.erb b/media_ranker/app/views/layouts/application.html.erb new file mode 100644 index 0000000000..6af511b830 --- /dev/null +++ b/media_ranker/app/views/layouts/application.html.erb @@ -0,0 +1,14 @@ + + + + MediaRanker + <%= csrf_meta_tags %> + + <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> + <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> + + + + <%= yield %> + + diff --git a/media_ranker/app/views/layouts/mailer.html.erb b/media_ranker/app/views/layouts/mailer.html.erb new file mode 100644 index 0000000000..cbd34d2e9d --- /dev/null +++ b/media_ranker/app/views/layouts/mailer.html.erb @@ -0,0 +1,13 @@ + + + + + + + + + <%= yield %> + + diff --git a/media_ranker/app/views/layouts/mailer.text.erb b/media_ranker/app/views/layouts/mailer.text.erb new file mode 100644 index 0000000000..37f0bddbd7 --- /dev/null +++ b/media_ranker/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/media_ranker/bin/bundle b/media_ranker/bin/bundle new file mode 100755 index 0000000000..66e9889e8b --- /dev/null +++ b/media_ranker/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/media_ranker/bin/rails b/media_ranker/bin/rails new file mode 100755 index 0000000000..5badb2fde0 --- /dev/null +++ b/media_ranker/bin/rails @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +APP_PATH = File.expand_path('../config/application', __dir__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/media_ranker/bin/rake b/media_ranker/bin/rake new file mode 100755 index 0000000000..d87d5f5781 --- /dev/null +++ b/media_ranker/bin/rake @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/media_ranker/bin/setup b/media_ranker/bin/setup new file mode 100755 index 0000000000..e620b4dadb --- /dev/null +++ b/media_ranker/bin/setup @@ -0,0 +1,34 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a starting point to setup your application. + # Add necessary setup steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + # puts "\n== Copying sample files ==" + # unless File.exist?('config/database.yml') + # cp 'config/database.yml.sample', 'config/database.yml' + # end + + puts "\n== Preparing database ==" + system! 'bin/rails db:setup' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/media_ranker/bin/spring b/media_ranker/bin/spring new file mode 100755 index 0000000000..fb2ec2ebb4 --- /dev/null +++ b/media_ranker/bin/spring @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby + +# This file loads spring without using Bundler, in order to be fast. +# It gets overwritten when you run the `spring binstub` command. + +unless defined?(Spring) + require 'rubygems' + require 'bundler' + + lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) + spring = lockfile.specs.detect { |spec| spec.name == "spring" } + if spring + Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path + gem 'spring', spring.version + require 'spring/binstub' + end +end diff --git a/media_ranker/bin/update b/media_ranker/bin/update new file mode 100755 index 0000000000..a8e4462f20 --- /dev/null +++ b/media_ranker/bin/update @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a way to update your development environment automatically. + # Add necessary update steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + puts "\n== Updating database ==" + system! 'bin/rails db:migrate' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/media_ranker/config.ru b/media_ranker/config.ru new file mode 100644 index 0000000000..f7ba0b527b --- /dev/null +++ b/media_ranker/config.ru @@ -0,0 +1,5 @@ +# This file is used by Rack-based servers to start the application. + +require_relative 'config/environment' + +run Rails.application diff --git a/media_ranker/config/application.rb b/media_ranker/config/application.rb new file mode 100644 index 0000000000..183a13c8e5 --- /dev/null +++ b/media_ranker/config/application.rb @@ -0,0 +1,19 @@ +require_relative 'boot' + +require 'rails/all' + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module MediaRanker + class Application < Rails::Application + # Force new test files to be generated in the minitest-spec style + config.generators do |g| + g.test_framework :minitest, spec: true + end + # Settings in config/environments/* take precedence over those specified here. + # Application configuration should go into files in config/initializers + # -- all .rb files in that directory are automatically loaded. + end +end diff --git a/media_ranker/config/boot.rb b/media_ranker/config/boot.rb new file mode 100644 index 0000000000..30f5120df6 --- /dev/null +++ b/media_ranker/config/boot.rb @@ -0,0 +1,3 @@ +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) + +require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/media_ranker/config/cable.yml b/media_ranker/config/cable.yml new file mode 100644 index 0000000000..0bbde6f74f --- /dev/null +++ b/media_ranker/config/cable.yml @@ -0,0 +1,9 @@ +development: + adapter: async + +test: + adapter: async + +production: + adapter: redis + url: redis://localhost:6379/1 diff --git a/media_ranker/config/database.yml b/media_ranker/config/database.yml new file mode 100644 index 0000000000..2cd1a9c2c2 --- /dev/null +++ b/media_ranker/config/database.yml @@ -0,0 +1,85 @@ +# PostgreSQL. Versions 9.1 and up are supported. +# +# Install the pg driver: +# gem install pg +# On OS X with Homebrew: +# gem install pg -- --with-pg-config=/usr/local/bin/pg_config +# On OS X with MacPorts: +# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config +# On Windows: +# gem install pg +# Choose the win32 build. +# Install PostgreSQL and put its /bin directory on your path. +# +# Configure Using Gemfile +# gem 'pg' +# +default: &default + adapter: postgresql + encoding: unicode + # For details on connection pooling, see rails configuration guide + # http://guides.rubyonrails.org/configuring.html#database-pooling + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + +development: + <<: *default + database: media_ranker_development + + # The specified database role being used to connect to postgres. + # To create additional roles in postgres see `$ createuser --help`. + # When left blank, postgres will use the default role. This is + # the same name as the operating system user that initialized the database. + #username: media_ranker + + # The password associated with the postgres role (username). + #password: + + # Connect on a TCP socket. Omitted by default since the client uses a + # domain socket that doesn't need configuration. Windows does not have + # domain sockets, so uncomment these lines. + #host: localhost + + # The TCP port the server listens on. Defaults to 5432. + # If your server runs on a different port number, change accordingly. + #port: 5432 + + # Schema search path. The server defaults to $user,public + #schema_search_path: myapp,sharedapp,public + + # Minimum log levels, in increasing order: + # debug5, debug4, debug3, debug2, debug1, + # log, notice, warning, error, fatal, and panic + # Defaults to warning. + #min_messages: notice + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: media_ranker_test + +# As with config/secrets.yml, you never want to store sensitive information, +# like your database password, in your source code. If your source code is +# ever seen by anyone, they now have access to your database. +# +# Instead, provide the password as a unix environment variable when you boot +# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database +# for a full rundown on how to provide these environment variables in a +# production deployment. +# +# On Heroku and other platform providers, you may have a full connection URL +# available as an environment variable. For example: +# +# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" +# +# You can use this database configuration with: +# +# production: +# url: <%= ENV['DATABASE_URL'] %> +# +production: + <<: *default + database: media_ranker_production + username: media_ranker + password: <%= ENV['MEDIA_RANKER_DATABASE_PASSWORD'] %> diff --git a/media_ranker/config/environment.rb b/media_ranker/config/environment.rb new file mode 100644 index 0000000000..426333bb46 --- /dev/null +++ b/media_ranker/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative 'application' + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/media_ranker/config/environments/development.rb b/media_ranker/config/environments/development.rb new file mode 100644 index 0000000000..6f7197045a --- /dev/null +++ b/media_ranker/config/environments/development.rb @@ -0,0 +1,54 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable/disable caching. By default caching is disabled. + if Rails.root.join('tmp/caching-dev.txt').exist? + config.action_controller.perform_caching = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => 'public, max-age=172800' + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true + + # Suppress logger output for asset requests. + config.assets.quiet = true + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true + + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + config.file_watcher = ActiveSupport::EventedFileUpdateChecker +end diff --git a/media_ranker/config/environments/production.rb b/media_ranker/config/environments/production.rb new file mode 100644 index 0000000000..ffe22e8997 --- /dev/null +++ b/media_ranker/config/environments/production.rb @@ -0,0 +1,86 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # Mount Action Cable outside main process or domain + # config.action_cable.mount_path = nil + # config.action_cable.url = 'wss://example.com/cable' + # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + config.log_level = :debug + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment) + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "media_ranker_#{Rails.env}" + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Use a different logger for distributed setups. + # require 'syslog/logger' + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false +end diff --git a/media_ranker/config/environments/test.rb b/media_ranker/config/environments/test.rb new file mode 100644 index 0000000000..30587ef6d5 --- /dev/null +++ b/media_ranker/config/environments/test.rb @@ -0,0 +1,42 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # The test environment is used exclusively to run your application's + # test suite. You never need to work with it otherwise. Remember that + # your test database is "scratch space" for the test suite and is wiped + # and recreated between test runs. Don't rely on the data there! + config.cache_classes = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + 'Cache-Control' => 'public, max-age=3600' + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true +end diff --git a/media_ranker/config/initializers/application_controller_renderer.rb b/media_ranker/config/initializers/application_controller_renderer.rb new file mode 100644 index 0000000000..51639b67a0 --- /dev/null +++ b/media_ranker/config/initializers/application_controller_renderer.rb @@ -0,0 +1,6 @@ +# Be sure to restart your server when you modify this file. + +# ApplicationController.renderer.defaults.merge!( +# http_host: 'example.org', +# https: false +# ) diff --git a/media_ranker/config/initializers/assets.rb b/media_ranker/config/initializers/assets.rb new file mode 100644 index 0000000000..01ef3e6630 --- /dev/null +++ b/media_ranker/config/initializers/assets.rb @@ -0,0 +1,11 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = '1.0' + +# Add additional assets to the asset load path +# Rails.application.config.assets.paths << Emoji.images_path + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. +# Rails.application.config.assets.precompile += %w( search.js ) diff --git a/media_ranker/config/initializers/backtrace_silencers.rb b/media_ranker/config/initializers/backtrace_silencers.rb new file mode 100644 index 0000000000..59385cdf37 --- /dev/null +++ b/media_ranker/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. +# Rails.backtrace_cleaner.remove_silencers! diff --git a/media_ranker/config/initializers/cookies_serializer.rb b/media_ranker/config/initializers/cookies_serializer.rb new file mode 100644 index 0000000000..5a6a32d371 --- /dev/null +++ b/media_ranker/config/initializers/cookies_serializer.rb @@ -0,0 +1,5 @@ +# Be sure to restart your server when you modify this file. + +# Specify a serializer for the signed and encrypted cookie jars. +# Valid options are :json, :marshal, and :hybrid. +Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/media_ranker/config/initializers/filter_parameter_logging.rb b/media_ranker/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000000..4a994e1e7b --- /dev/null +++ b/media_ranker/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/media_ranker/config/initializers/inflections.rb b/media_ranker/config/initializers/inflections.rb new file mode 100644 index 0000000000..ac033bf9dc --- /dev/null +++ b/media_ranker/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/media_ranker/config/initializers/mime_types.rb b/media_ranker/config/initializers/mime_types.rb new file mode 100644 index 0000000000..dc1899682b --- /dev/null +++ b/media_ranker/config/initializers/mime_types.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf diff --git a/media_ranker/config/initializers/new_framework_defaults.rb b/media_ranker/config/initializers/new_framework_defaults.rb new file mode 100644 index 0000000000..671abb69a3 --- /dev/null +++ b/media_ranker/config/initializers/new_framework_defaults.rb @@ -0,0 +1,24 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 5.0 upgrade. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +# Enable per-form CSRF tokens. Previous versions had false. +Rails.application.config.action_controller.per_form_csrf_tokens = true + +# Enable origin-checking CSRF mitigation. Previous versions had false. +Rails.application.config.action_controller.forgery_protection_origin_check = true + +# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. +# Previous versions had false. +ActiveSupport.to_time_preserves_timezone = true + +# Require `belongs_to` associations by default. Previous versions had false. +Rails.application.config.active_record.belongs_to_required_by_default = true + +# Do not halt callback chains when a callback returns false. Previous versions had true. +ActiveSupport.halt_callback_chains_on_return_false = false + +# Configure SSL options to enable HSTS with subdomains. Previous versions had false. +Rails.application.config.ssl_options = { hsts: { subdomains: true } } diff --git a/media_ranker/config/initializers/session_store.rb b/media_ranker/config/initializers/session_store.rb new file mode 100644 index 0000000000..f24c215ab4 --- /dev/null +++ b/media_ranker/config/initializers/session_store.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +Rails.application.config.session_store :cookie_store, key: '_media_ranker_session' diff --git a/media_ranker/config/initializers/wrap_parameters.rb b/media_ranker/config/initializers/wrap_parameters.rb new file mode 100644 index 0000000000..bbfc3961bf --- /dev/null +++ b/media_ranker/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] +end + +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/media_ranker/config/locales/en.yml b/media_ranker/config/locales/en.yml new file mode 100644 index 0000000000..0653957166 --- /dev/null +++ b/media_ranker/config/locales/en.yml @@ -0,0 +1,23 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/media_ranker/config/puma.rb b/media_ranker/config/puma.rb new file mode 100644 index 0000000000..c7f311f811 --- /dev/null +++ b/media_ranker/config/puma.rb @@ -0,0 +1,47 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum, this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests, default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. +# +# preload_app! + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted this block will be run, if you are using `preload_app!` +# option you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, Ruby +# cannot share connections between processes. +# +# on_worker_boot do +# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +# end + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/media_ranker/config/routes.rb b/media_ranker/config/routes.rb new file mode 100644 index 0000000000..787824f888 --- /dev/null +++ b/media_ranker/config/routes.rb @@ -0,0 +1,3 @@ +Rails.application.routes.draw do + # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html +end diff --git a/media_ranker/config/secrets.yml b/media_ranker/config/secrets.yml new file mode 100644 index 0000000000..98d5529e8a --- /dev/null +++ b/media_ranker/config/secrets.yml @@ -0,0 +1,22 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! + +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +# You can use `rails secret` to generate a secure secret key. + +# Make sure the secrets in this file are kept private +# if you're sharing your code publicly. + +development: + secret_key_base: f515cd1d5196ddf84d400ae6669d0f18fe6646a52a4aeabc293651d656815e74c12ac890e08caacc151b60c6694152ef3daad0cd3fcb1492439b3dd36769125d + +test: + secret_key_base: c77d3d7f99aa5ee31d063bd14046ca8ada76ca342eef940061fb87a96fe4380bb881436d7bd4f53122219e52b5c3d79d763849e630d78c53c470b18d978a1552 + +# Do not keep production secrets in the repository, +# instead read values from the environment. +production: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/media_ranker/config/spring.rb b/media_ranker/config/spring.rb new file mode 100644 index 0000000000..c9119b40c0 --- /dev/null +++ b/media_ranker/config/spring.rb @@ -0,0 +1,6 @@ +%w( + .ruby-version + .rbenv-vars + tmp/restart.txt + tmp/caching-dev.txt +).each { |path| Spring.watch(path) } diff --git a/media_ranker/db/migrate/20170410220905_create_users.rb b/media_ranker/db/migrate/20170410220905_create_users.rb new file mode 100644 index 0000000000..3b18e3275c --- /dev/null +++ b/media_ranker/db/migrate/20170410220905_create_users.rb @@ -0,0 +1,9 @@ +class CreateUsers < ActiveRecord::Migration[5.0] + def change + create_table :users do |t| + t.string :username + + t.timestamps + end + end +end diff --git a/media_ranker/db/migrate/20170410220941_change_stringg_to_string_in_username.rb b/media_ranker/db/migrate/20170410220941_change_stringg_to_string_in_username.rb new file mode 100644 index 0000000000..0fe5c6aaeb --- /dev/null +++ b/media_ranker/db/migrate/20170410220941_change_stringg_to_string_in_username.rb @@ -0,0 +1,5 @@ +class ChangeStringgToStringInUsername < ActiveRecord::Migration[5.0] + def change + change_column :users, :username, :string + end +end diff --git a/media_ranker/db/migrate/20170410221612_create_media.rb b/media_ranker/db/migrate/20170410221612_create_media.rb new file mode 100644 index 0000000000..a8480e7284 --- /dev/null +++ b/media_ranker/db/migrate/20170410221612_create_media.rb @@ -0,0 +1,13 @@ +class CreateMedia < ActiveRecord::Migration[5.0] + def change + create_table :media do |t| + t.string :category + t.string :title + t.string :created_by + t.string :description + t.string :published + + t.timestamps + end + end +end diff --git a/media_ranker/db/migrate/20170410225325_rename_media_to_works.rb b/media_ranker/db/migrate/20170410225325_rename_media_to_works.rb new file mode 100644 index 0000000000..89b0af70e3 --- /dev/null +++ b/media_ranker/db/migrate/20170410225325_rename_media_to_works.rb @@ -0,0 +1,5 @@ +class RenameMediaToWorks < ActiveRecord::Migration[5.0] + def change + rename_table :media, :works + end +end diff --git a/media_ranker/db/schema.rb b/media_ranker/db/schema.rb new file mode 100644 index 0000000000..045e2fe339 --- /dev/null +++ b/media_ranker/db/schema.rb @@ -0,0 +1,34 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20170410225325) do + + # These are extensions that must be enabled in order to support this database + enable_extension "plpgsql" + + create_table "users", force: :cascade do |t| + t.string "username" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "works", force: :cascade do |t| + t.string "category" + t.string "title" + t.string "created_by" + t.string "description" + t.string "published" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + +end diff --git a/media_ranker/db/seeds.rb b/media_ranker/db/seeds.rb new file mode 100644 index 0000000000..1beea2accd --- /dev/null +++ b/media_ranker/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) +# Character.create(name: 'Luke', movie: movies.first) diff --git a/media_ranker/lib/assets/.keep b/media_ranker/lib/assets/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/lib/tasks/.keep b/media_ranker/lib/tasks/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/log/.keep b/media_ranker/log/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/public/404.html b/media_ranker/public/404.html new file mode 100644 index 0000000000..b612547fc2 --- /dev/null +++ b/media_ranker/public/404.html @@ -0,0 +1,67 @@ + + + + The page you were looking for doesn't exist (404) + + + + + + +
+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/media_ranker/public/422.html b/media_ranker/public/422.html new file mode 100644 index 0000000000..a21f82b3bd --- /dev/null +++ b/media_ranker/public/422.html @@ -0,0 +1,67 @@ + + + + The change you wanted was rejected (422) + + + + + + +
+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/media_ranker/public/500.html b/media_ranker/public/500.html new file mode 100644 index 0000000000..061abc587d --- /dev/null +++ b/media_ranker/public/500.html @@ -0,0 +1,66 @@ + + + + We're sorry, but something went wrong (500) + + + + + + +
+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/media_ranker/public/apple-touch-icon-precomposed.png b/media_ranker/public/apple-touch-icon-precomposed.png new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/public/apple-touch-icon.png b/media_ranker/public/apple-touch-icon.png new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/public/favicon.ico b/media_ranker/public/favicon.ico new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/public/robots.txt b/media_ranker/public/robots.txt new file mode 100644 index 0000000000..3c9c7c01f3 --- /dev/null +++ b/media_ranker/public/robots.txt @@ -0,0 +1,5 @@ +# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file +# +# To ban all spiders from the entire site uncomment the next two lines: +# User-agent: * +# Disallow: / diff --git a/media_ranker/test/controllers/.keep b/media_ranker/test/controllers/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/test/controllers/medias_controller_test.rb b/media_ranker/test/controllers/medias_controller_test.rb new file mode 100644 index 0000000000..4f64b79dc9 --- /dev/null +++ b/media_ranker/test/controllers/medias_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +describe MediasController do + # it "must be a real test" do + # flunk "Need real tests" + # end +end diff --git a/media_ranker/test/controllers/users_controller_test.rb b/media_ranker/test/controllers/users_controller_test.rb new file mode 100644 index 0000000000..89decb54e0 --- /dev/null +++ b/media_ranker/test/controllers/users_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +describe UsersController do + # it "must be a real test" do + # flunk "Need real tests" + # end +end diff --git a/media_ranker/test/controllers/welcome_controller_test.rb b/media_ranker/test/controllers/welcome_controller_test.rb new file mode 100644 index 0000000000..877b7e7456 --- /dev/null +++ b/media_ranker/test/controllers/welcome_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +describe WelcomeController do + # it "must be a real test" do + # flunk "Need real tests" + # end +end diff --git a/media_ranker/test/fixtures/.keep b/media_ranker/test/fixtures/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/test/fixtures/files/.keep b/media_ranker/test/fixtures/files/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/test/fixtures/media.yml b/media_ranker/test/fixtures/media.yml new file mode 100644 index 0000000000..3fd8d6f559 --- /dev/null +++ b/media_ranker/test/fixtures/media.yml @@ -0,0 +1,15 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + category: + title: MyString + created_by: MyString + description: MyString + published: MyString + +two: + category: + title: MyString + created_by: MyString + description: MyString + published: MyString diff --git a/media_ranker/test/fixtures/users.yml b/media_ranker/test/fixtures/users.yml new file mode 100644 index 0000000000..ea8738f8da --- /dev/null +++ b/media_ranker/test/fixtures/users.yml @@ -0,0 +1,7 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + username: + +two: + username: diff --git a/media_ranker/test/helpers/.keep b/media_ranker/test/helpers/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/test/integration/.keep b/media_ranker/test/integration/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/test/mailers/.keep b/media_ranker/test/mailers/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/test/models/.keep b/media_ranker/test/models/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/test/models/medium_test.rb b/media_ranker/test/models/medium_test.rb new file mode 100644 index 0000000000..81052cf6ef --- /dev/null +++ b/media_ranker/test/models/medium_test.rb @@ -0,0 +1,9 @@ +require "test_helper" + +describe Medium do + let(:medium) { Medium.new } + + it "must be valid" do + value(medium).must_be :valid? + end +end diff --git a/media_ranker/test/models/user_test.rb b/media_ranker/test/models/user_test.rb new file mode 100644 index 0000000000..cc862ac2d9 --- /dev/null +++ b/media_ranker/test/models/user_test.rb @@ -0,0 +1,9 @@ +require "test_helper" + +describe User do + let(:user) { User.new } + + it "must be valid" do + value(user).must_be :valid? + end +end diff --git a/media_ranker/test/test_helper.rb b/media_ranker/test/test_helper.rb new file mode 100644 index 0000000000..10594a3248 --- /dev/null +++ b/media_ranker/test/test_helper.rb @@ -0,0 +1,26 @@ +ENV["RAILS_ENV"] = "test" +require File.expand_path("../../config/environment", __FILE__) +require "rails/test_help" +require "minitest/rails" +require "minitest/reporters" # for Colorized output + +# For colorful output! +Minitest::Reporters.use!( + Minitest::Reporters::SpecReporter.new, + ENV, + Minitest.backtrace_filter +) + + +# To add Capybara feature tests add `gem "minitest-rails-capybara"` +# to the test group in the Gemfile and uncomment the following: +# require "minitest/rails/capybara" + +# Uncomment for awesome colorful output +# require "minitest/pride" + +class ActiveSupport::TestCase + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + # Add more helper methods to be used by all tests here... +end diff --git a/media_ranker/tmp/.keep b/media_ranker/tmp/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/vendor/assets/javascripts/.keep b/media_ranker/vendor/assets/javascripts/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/media_ranker/vendor/assets/stylesheets/.keep b/media_ranker/vendor/assets/stylesheets/.keep new file mode 100644 index 0000000000..e69de29bb2 From 049b6842c8d06719b4f586fd8ccf5ccea68af932 Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Tue, 11 Apr 2017 14:35:45 -0700 Subject: [PATCH 02/38] created MediaRanker header image --- .gitignore | 44 ++++++++ media_ranker/Gemfile => Gemfile | 0 media_ranker/Gemfile.lock => Gemfile.lock | 0 README.md | 102 +++--------------- media_ranker/Rakefile => Rakefile | 0 .../app => app}/assets/config/manifest.js | 0 {media_ranker/app => app}/assets/images/.keep | 0 .../assets/javascripts/application.js | 0 .../app => app}/assets/javascripts/cable.js | 0 .../assets/javascripts/channels/.keep | 0 .../assets/javascripts/medias.coffee | 0 .../assets/javascripts/users.coffee | 0 .../assets/javascripts/welcome.coffee | 0 .../assets/stylesheets/application.css | 19 ++++ .../assets/stylesheets/medias.scss | 0 .../app => app}/assets/stylesheets/users.scss | 0 .../assets/stylesheets/welcome.scss | 0 .../channels/application_cable/channel.rb | 0 .../channels/application_cable/connection.rb | 0 .../controllers/application_controller.rb | 0 .../app => app}/controllers/concerns/.keep | 0 .../controllers/users_controller.rb | 0 .../controllers/welcome_controller.rb | 2 + .../controllers/works_controller.rb | 0 .../app => app}/helpers/application_helper.rb | 0 .../app => app}/helpers/medias_helper.rb | 0 .../app => app}/helpers/users_helper.rb | 0 .../app => app}/helpers/welcome_helper.rb | 0 .../app => app}/jobs/application_job.rb | 0 .../app => app}/mailers/application_mailer.rb | 0 .../app => app}/models/application_record.rb | 0 .../app => app}/models/concerns/.keep | 0 {media_ranker/app => app}/models/user.rb | 0 {media_ranker/app => app}/models/work.rb | 0 .../views/layouts/application.html.erb | 8 ++ .../app => app}/views/layouts/mailer.html.erb | 0 .../app => app}/views/layouts/mailer.text.erb | 0 .../.keep => app/views/welcome/index.html.erb | 0 {media_ranker/bin => bin}/bundle | 0 {media_ranker/bin => bin}/rails | 0 {media_ranker/bin => bin}/rake | 0 {media_ranker/bin => bin}/setup | 0 {media_ranker/bin => bin}/spring | 0 {media_ranker/bin => bin}/update | 0 media_ranker/config.ru => config.ru | 0 .../config => config}/application.rb | 0 {media_ranker/config => config}/boot.rb | 0 {media_ranker/config => config}/cable.yml | 0 {media_ranker/config => config}/database.yml | 0 .../config => config}/environment.rb | 0 .../environments/development.rb | 0 .../environments/production.rb | 0 .../config => config}/environments/test.rb | 0 .../application_controller_renderer.rb | 0 .../config => config}/initializers/assets.rb | 0 .../initializers/backtrace_silencers.rb | 0 .../initializers/cookies_serializer.rb | 0 .../initializers/filter_parameter_logging.rb | 0 .../initializers/inflections.rb | 0 .../initializers/mime_types.rb | 0 .../initializers/new_framework_defaults.rb | 0 .../initializers/session_store.rb | 0 .../initializers/wrap_parameters.rb | 0 .../config => config}/locales/en.yml | 0 {media_ranker/config => config}/puma.rb | 0 {media_ranker/config => config}/routes.rb | 3 + {media_ranker/config => config}/secrets.yml | 0 {media_ranker/config => config}/spring.rb | 0 .../migrate/20170410220905_create_users.rb | 0 ...41_change_stringg_to_string_in_username.rb | 0 .../migrate/20170410221612_create_media.rb | 0 .../20170410225325_rename_media_to_works.rb | 0 {media_ranker/db => db}/schema.rb | 0 {media_ranker/db => db}/seeds.rb | 0 {media_ranker/lib/tasks => lib/assets}/.keep | 0 {media_ranker/log => lib/tasks}/.keep | 0 media_ranker/.gitignore | 17 --- media_ranker/README.md | 24 ----- media_ranker/vendor/assets/stylesheets/.keep | 0 {media_ranker/public => public}/404.html | 0 {media_ranker/public => public}/422.html | 0 {media_ranker/public => public}/500.html | 0 .../apple-touch-icon-precomposed.png | 0 .../public => public}/apple-touch-icon.png | 0 {media_ranker/public => public}/favicon.ico | 0 {media_ranker/public => public}/robots.txt | 0 {media_ranker/test => test}/controllers/.keep | 0 .../controllers/medias_controller_test.rb | 0 .../controllers/users_controller_test.rb | 0 .../controllers/welcome_controller_test.rb | 0 {media_ranker/test => test}/fixtures/.keep | 0 .../test => test}/fixtures/files/.keep | 0 .../test => test}/fixtures/media.yml | 0 .../test => test}/fixtures/users.yml | 0 {media_ranker/test => test}/helpers/.keep | 0 {media_ranker/test => test}/integration/.keep | 0 {media_ranker/test => test}/mailers/.keep | 0 {media_ranker/test => test}/models/.keep | 0 .../test => test}/models/medium_test.rb | 0 .../test => test}/models/user_test.rb | 0 {media_ranker/test => test}/test_helper.rb | 0 .../tmp => vendor/assets/javascripts}/.keep | 0 .../assets/stylesheets}/.keep | 0 103 files changed, 89 insertions(+), 130 deletions(-) create mode 100644 .gitignore rename media_ranker/Gemfile => Gemfile (100%) rename media_ranker/Gemfile.lock => Gemfile.lock (100%) rename media_ranker/Rakefile => Rakefile (100%) rename {media_ranker/app => app}/assets/config/manifest.js (100%) rename {media_ranker/app => app}/assets/images/.keep (100%) rename {media_ranker/app => app}/assets/javascripts/application.js (100%) rename {media_ranker/app => app}/assets/javascripts/cable.js (100%) rename {media_ranker/app => app}/assets/javascripts/channels/.keep (100%) rename {media_ranker/app => app}/assets/javascripts/medias.coffee (100%) rename {media_ranker/app => app}/assets/javascripts/users.coffee (100%) rename {media_ranker/app => app}/assets/javascripts/welcome.coffee (100%) rename {media_ranker/app => app}/assets/stylesheets/application.css (58%) rename {media_ranker/app => app}/assets/stylesheets/medias.scss (100%) rename {media_ranker/app => app}/assets/stylesheets/users.scss (100%) rename {media_ranker/app => app}/assets/stylesheets/welcome.scss (100%) rename {media_ranker/app => app}/channels/application_cable/channel.rb (100%) rename {media_ranker/app => app}/channels/application_cable/connection.rb (100%) rename {media_ranker/app => app}/controllers/application_controller.rb (100%) rename {media_ranker/app => app}/controllers/concerns/.keep (100%) rename {media_ranker/app => app}/controllers/users_controller.rb (100%) rename {media_ranker/app => app}/controllers/welcome_controller.rb (78%) rename {media_ranker/app => app}/controllers/works_controller.rb (100%) rename {media_ranker/app => app}/helpers/application_helper.rb (100%) rename {media_ranker/app => app}/helpers/medias_helper.rb (100%) rename {media_ranker/app => app}/helpers/users_helper.rb (100%) rename {media_ranker/app => app}/helpers/welcome_helper.rb (100%) rename {media_ranker/app => app}/jobs/application_job.rb (100%) rename {media_ranker/app => app}/mailers/application_mailer.rb (100%) rename {media_ranker/app => app}/models/application_record.rb (100%) rename {media_ranker/app => app}/models/concerns/.keep (100%) rename {media_ranker/app => app}/models/user.rb (100%) rename {media_ranker/app => app}/models/work.rb (100%) rename {media_ranker/app => app}/views/layouts/application.html.erb (60%) rename {media_ranker/app => app}/views/layouts/mailer.html.erb (100%) rename {media_ranker/app => app}/views/layouts/mailer.text.erb (100%) rename media_ranker/lib/assets/.keep => app/views/welcome/index.html.erb (100%) rename {media_ranker/bin => bin}/bundle (100%) rename {media_ranker/bin => bin}/rails (100%) rename {media_ranker/bin => bin}/rake (100%) rename {media_ranker/bin => bin}/setup (100%) rename {media_ranker/bin => bin}/spring (100%) rename {media_ranker/bin => bin}/update (100%) rename media_ranker/config.ru => config.ru (100%) rename {media_ranker/config => config}/application.rb (100%) rename {media_ranker/config => config}/boot.rb (100%) rename {media_ranker/config => config}/cable.yml (100%) rename {media_ranker/config => config}/database.yml (100%) rename {media_ranker/config => config}/environment.rb (100%) rename {media_ranker/config => config}/environments/development.rb (100%) rename {media_ranker/config => config}/environments/production.rb (100%) rename {media_ranker/config => config}/environments/test.rb (100%) rename {media_ranker/config => config}/initializers/application_controller_renderer.rb (100%) rename {media_ranker/config => config}/initializers/assets.rb (100%) rename {media_ranker/config => config}/initializers/backtrace_silencers.rb (100%) rename {media_ranker/config => config}/initializers/cookies_serializer.rb (100%) rename {media_ranker/config => config}/initializers/filter_parameter_logging.rb (100%) rename {media_ranker/config => config}/initializers/inflections.rb (100%) rename {media_ranker/config => config}/initializers/mime_types.rb (100%) rename {media_ranker/config => config}/initializers/new_framework_defaults.rb (100%) rename {media_ranker/config => config}/initializers/session_store.rb (100%) rename {media_ranker/config => config}/initializers/wrap_parameters.rb (100%) rename {media_ranker/config => config}/locales/en.yml (100%) rename {media_ranker/config => config}/puma.rb (100%) rename {media_ranker/config => config}/routes.rb (70%) rename {media_ranker/config => config}/secrets.yml (100%) rename {media_ranker/config => config}/spring.rb (100%) rename {media_ranker/db => db}/migrate/20170410220905_create_users.rb (100%) rename {media_ranker/db => db}/migrate/20170410220941_change_stringg_to_string_in_username.rb (100%) rename {media_ranker/db => db}/migrate/20170410221612_create_media.rb (100%) rename {media_ranker/db => db}/migrate/20170410225325_rename_media_to_works.rb (100%) rename {media_ranker/db => db}/schema.rb (100%) rename {media_ranker/db => db}/seeds.rb (100%) rename {media_ranker/lib/tasks => lib/assets}/.keep (100%) rename {media_ranker/log => lib/tasks}/.keep (100%) delete mode 100644 media_ranker/.gitignore delete mode 100644 media_ranker/README.md delete mode 100644 media_ranker/vendor/assets/stylesheets/.keep rename {media_ranker/public => public}/404.html (100%) rename {media_ranker/public => public}/422.html (100%) rename {media_ranker/public => public}/500.html (100%) rename {media_ranker/public => public}/apple-touch-icon-precomposed.png (100%) rename {media_ranker/public => public}/apple-touch-icon.png (100%) rename {media_ranker/public => public}/favicon.ico (100%) rename {media_ranker/public => public}/robots.txt (100%) rename {media_ranker/test => test}/controllers/.keep (100%) rename {media_ranker/test => test}/controllers/medias_controller_test.rb (100%) rename {media_ranker/test => test}/controllers/users_controller_test.rb (100%) rename {media_ranker/test => test}/controllers/welcome_controller_test.rb (100%) rename {media_ranker/test => test}/fixtures/.keep (100%) rename {media_ranker/test => test}/fixtures/files/.keep (100%) rename {media_ranker/test => test}/fixtures/media.yml (100%) rename {media_ranker/test => test}/fixtures/users.yml (100%) rename {media_ranker/test => test}/helpers/.keep (100%) rename {media_ranker/test => test}/integration/.keep (100%) rename {media_ranker/test => test}/mailers/.keep (100%) rename {media_ranker/test => test}/models/.keep (100%) rename {media_ranker/test => test}/models/medium_test.rb (100%) rename {media_ranker/test => test}/models/user_test.rb (100%) rename {media_ranker/test => test}/test_helper.rb (100%) rename {media_ranker/tmp => vendor/assets/javascripts}/.keep (100%) rename {media_ranker/vendor/assets/javascripts => vendor/assets/stylesheets}/.keep (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..42aeb55000 --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +*.rbc +capybara-*.html +.rspec +/log +/tmp +/db/*.sqlite3 +/db/*.sqlite3-journal +/public/system +/coverage/ +/spec/tmp +*.orig +rerun.txt +pickle-email-*.html + +# TODO Comment out this rule if you are OK with secrets being uploaded to the repo +config/initializers/secret_token.rb + +# Only include if you have production secrets in this file, which is no longer a Rails default +# config/secrets.yml + +# dotenv +# TODO Comment out this rule if environment variables can be committed +.env + +## Environment normalization: +/.bundle +/vendor/bundle + +# these should all be checked in to normalize the environment: +# Gemfile.lock, .ruby-version, .ruby-gemset + +# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: +.rvmrc + +# if using bower-rails ignore default bower_components path bower.json files +/vendor/assets/bower_components +*.bowerrc +bower.json + +# Ignore pow environment settings +.powenv + +# Ignore Byebug command history file. +.byebug_history diff --git a/media_ranker/Gemfile b/Gemfile similarity index 100% rename from media_ranker/Gemfile rename to Gemfile diff --git a/media_ranker/Gemfile.lock b/Gemfile.lock similarity index 100% rename from media_ranker/Gemfile.lock rename to Gemfile.lock diff --git a/README.md b/README.md index f1fbe6d420..7db80e4ca1 100644 --- a/README.md +++ b/README.md @@ -1,100 +1,24 @@ -# Media Ranker +# README -## Introduction +This README would normally document whatever steps are necessary to get the +application up and running. -In this project, you will build a webapp where users can vote for their favorite pieces of media. +Things you may want to cover: -In contrast to previous projects, instead of implementing a pre-defined spec you will be imitating an existing site: http://media-ranker-2-0.herokuapp.com. Your job is to match the functionality and styling of this site as closely as possible. +* Ruby version -This is an individual, [stage 2](https://github.com/Ada-Developers-Academy/pedagogy/blob/master/rule-of-three.md) project. +* System dependencies -## Learning Goals +* Configuration -The purpose of this assignment is to reinforce the following concepts: +* Database creation -- Previous Rails learning, including MVC, RESTful routing, and the request cycle -- Testing Rails applications -- Building complex model logic -- Using `session` and `flash` to track data between requests -- DRYing up Rails code -- Working with a CSS framework -- Styling a page based on an existing design +* Database initialization -## Before You Begin +* How to run the test suite -### Provided Files +* Services (job queues, cache servers, search engines, etc.) -- `db/media_seeds.csv`: Some starter media to work with -- `app/assets/images/owl.jpg`: The owl picture from the site +* Deployment instructions -### Regarding the Word "Media" - -The Rails inflector considers "media" to be the plural of "medium", which is not really what we mean here. You may want to choose a different word to represent "a book, movie or album" internally. The instructor-proved example site uses the word "work". - -## Project Requirements - -### Core Requirements - -Regardless of how you choose to implement this project or how much of it gets done, you should exhibit - -- Squeaky-clean **git hygiene**, including - - A fresh branch for each new feature - - Regular commits - - Descriptive commit messages -- Fanatical devotion to **test-driven development** - - Pseudocode first, then write the tests, then write code to make them pass -- Steadfast adherence to **agile development practices** - - User stories should be listed and prioritized using a Trello board - - The finished application should be deployed to Heroku (deploy early, deploy often) -- Unrelenting use of **semantic HTML** - -### Baseline - -We will begin with some in-class work, exploring the site and pondering implementation details. Before you start writing _any_ code, you should: - -- Explore the existing Media Ranker site to become familiar with the necessary functionality -- Create a Trello board to manage user stories -- Create an ERD for the models - -Then, once you have a solid plan for how to structure your project: - -- Fork and clone the repo -- Use `rails new .` to generate a new Rails project in the cloned directory - - Verify that the changes we've made to Rails' defaults (postgres as the DB, spec-style testing) have been applied -- `git init`, `git add .` and `git commit -m "Initial Rails setup"` - -### Wave 1 - -Mimic the site's basic functionality around Media, without worrying (yet) about Users or Votes: -- Build a main page, with a list of the top 10 media of each category, as well as a spotlight section for the top media overall -- Build an index page for each media category -- Build a details page for each piece of media -- Make sure any models and controllers you've built so far are well-tested - -### Wave 2 - -Mimic the site's functionality around Users and Voting: -- Allow users to "log in" to the site, and use the `session` to keep track of which user is currently logged in for a given browser -- Allow users to vote for media, and sort media by vote count whenever a list of media is displayed -- Add a list of voting users to the details page for each media -- Don't allow a user to vote for the same media more than once -- Add a page for each user, as well as a page showing a summary of all users -- Make sure any models and controllers you've built so far are well-tested - -#### A note on logging in - -Passwords and security are tricky! We'll talk about that sort of thing a little in the coming weeks, but for now you don't need to provide any sort of security. The user gives you a username, and your site should just trust them. - -### Wave 3 - -Use Foundation to style the site to match the example. The layout as well as the look and feel should match as close as possible. - -### Optional Enhancement Ideas - -Once your test coverage is comprehensive, your HTML is semantic, your user stories have all been moved to the `Done` column and your application has been deployed to Heroku, you may consider the following enhancements. - -1. DRY up your code as much as you can! Techniques worth investigating: - - Helper methods - - Controller filters - - Polymorphic routes -1. Add a [recommendation system](https://www.toptal.com/algorithms/predicting-likes-inside-a-simple-recommendation-engine) that suggests media to a user based on what they have previously voted for. +* ... diff --git a/media_ranker/Rakefile b/Rakefile similarity index 100% rename from media_ranker/Rakefile rename to Rakefile diff --git a/media_ranker/app/assets/config/manifest.js b/app/assets/config/manifest.js similarity index 100% rename from media_ranker/app/assets/config/manifest.js rename to app/assets/config/manifest.js diff --git a/media_ranker/app/assets/images/.keep b/app/assets/images/.keep similarity index 100% rename from media_ranker/app/assets/images/.keep rename to app/assets/images/.keep diff --git a/media_ranker/app/assets/javascripts/application.js b/app/assets/javascripts/application.js similarity index 100% rename from media_ranker/app/assets/javascripts/application.js rename to app/assets/javascripts/application.js diff --git a/media_ranker/app/assets/javascripts/cable.js b/app/assets/javascripts/cable.js similarity index 100% rename from media_ranker/app/assets/javascripts/cable.js rename to app/assets/javascripts/cable.js diff --git a/media_ranker/app/assets/javascripts/channels/.keep b/app/assets/javascripts/channels/.keep similarity index 100% rename from media_ranker/app/assets/javascripts/channels/.keep rename to app/assets/javascripts/channels/.keep diff --git a/media_ranker/app/assets/javascripts/medias.coffee b/app/assets/javascripts/medias.coffee similarity index 100% rename from media_ranker/app/assets/javascripts/medias.coffee rename to app/assets/javascripts/medias.coffee diff --git a/media_ranker/app/assets/javascripts/users.coffee b/app/assets/javascripts/users.coffee similarity index 100% rename from media_ranker/app/assets/javascripts/users.coffee rename to app/assets/javascripts/users.coffee diff --git a/media_ranker/app/assets/javascripts/welcome.coffee b/app/assets/javascripts/welcome.coffee similarity index 100% rename from media_ranker/app/assets/javascripts/welcome.coffee rename to app/assets/javascripts/welcome.coffee diff --git a/media_ranker/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css similarity index 58% rename from media_ranker/app/assets/stylesheets/application.css rename to app/assets/stylesheets/application.css index 0ebd7fe829..462d45f3ff 100644 --- a/media_ranker/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -13,3 +13,22 @@ *= require_tree . *= require_self */ + +header{ +border-bottom-width:medium; +border-bottom-style: inset; +/*border-bottom-color: grey;*/ +} +#heading { +background-image:url(https://raw.githubusercontent.com/Ada-C7/MediaRanker/master/app/assets/images/owl.jpg); +height:90px; +width: 150px; +float: left; +border-bottom-width:medium; +border-bottom-style: inset; +border-bottom-color: grey; +} + +#logo{font-size: 30px; color:gray;display:inline-block;font-family: sans-serif;} + +#logo-2{font-size: 20px; color:#1779ba;display:inline-block;font-family: sans-serif;} diff --git a/media_ranker/app/assets/stylesheets/medias.scss b/app/assets/stylesheets/medias.scss similarity index 100% rename from media_ranker/app/assets/stylesheets/medias.scss rename to app/assets/stylesheets/medias.scss diff --git a/media_ranker/app/assets/stylesheets/users.scss b/app/assets/stylesheets/users.scss similarity index 100% rename from media_ranker/app/assets/stylesheets/users.scss rename to app/assets/stylesheets/users.scss diff --git a/media_ranker/app/assets/stylesheets/welcome.scss b/app/assets/stylesheets/welcome.scss similarity index 100% rename from media_ranker/app/assets/stylesheets/welcome.scss rename to app/assets/stylesheets/welcome.scss diff --git a/media_ranker/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb similarity index 100% rename from media_ranker/app/channels/application_cable/channel.rb rename to app/channels/application_cable/channel.rb diff --git a/media_ranker/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb similarity index 100% rename from media_ranker/app/channels/application_cable/connection.rb rename to app/channels/application_cable/connection.rb diff --git a/media_ranker/app/controllers/application_controller.rb b/app/controllers/application_controller.rb similarity index 100% rename from media_ranker/app/controllers/application_controller.rb rename to app/controllers/application_controller.rb diff --git a/media_ranker/app/controllers/concerns/.keep b/app/controllers/concerns/.keep similarity index 100% rename from media_ranker/app/controllers/concerns/.keep rename to app/controllers/concerns/.keep diff --git a/media_ranker/app/controllers/users_controller.rb b/app/controllers/users_controller.rb similarity index 100% rename from media_ranker/app/controllers/users_controller.rb rename to app/controllers/users_controller.rb diff --git a/media_ranker/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb similarity index 78% rename from media_ranker/app/controllers/welcome_controller.rb rename to app/controllers/welcome_controller.rb index d8c85ab84b..d6cde7107b 100644 --- a/media_ranker/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -1,2 +1,4 @@ class WelcomeController < ApplicationController +def index +end end diff --git a/media_ranker/app/controllers/works_controller.rb b/app/controllers/works_controller.rb similarity index 100% rename from media_ranker/app/controllers/works_controller.rb rename to app/controllers/works_controller.rb diff --git a/media_ranker/app/helpers/application_helper.rb b/app/helpers/application_helper.rb similarity index 100% rename from media_ranker/app/helpers/application_helper.rb rename to app/helpers/application_helper.rb diff --git a/media_ranker/app/helpers/medias_helper.rb b/app/helpers/medias_helper.rb similarity index 100% rename from media_ranker/app/helpers/medias_helper.rb rename to app/helpers/medias_helper.rb diff --git a/media_ranker/app/helpers/users_helper.rb b/app/helpers/users_helper.rb similarity index 100% rename from media_ranker/app/helpers/users_helper.rb rename to app/helpers/users_helper.rb diff --git a/media_ranker/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb similarity index 100% rename from media_ranker/app/helpers/welcome_helper.rb rename to app/helpers/welcome_helper.rb diff --git a/media_ranker/app/jobs/application_job.rb b/app/jobs/application_job.rb similarity index 100% rename from media_ranker/app/jobs/application_job.rb rename to app/jobs/application_job.rb diff --git a/media_ranker/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb similarity index 100% rename from media_ranker/app/mailers/application_mailer.rb rename to app/mailers/application_mailer.rb diff --git a/media_ranker/app/models/application_record.rb b/app/models/application_record.rb similarity index 100% rename from media_ranker/app/models/application_record.rb rename to app/models/application_record.rb diff --git a/media_ranker/app/models/concerns/.keep b/app/models/concerns/.keep similarity index 100% rename from media_ranker/app/models/concerns/.keep rename to app/models/concerns/.keep diff --git a/media_ranker/app/models/user.rb b/app/models/user.rb similarity index 100% rename from media_ranker/app/models/user.rb rename to app/models/user.rb diff --git a/media_ranker/app/models/work.rb b/app/models/work.rb similarity index 100% rename from media_ranker/app/models/work.rb rename to app/models/work.rb diff --git a/media_ranker/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb similarity index 60% rename from media_ranker/app/views/layouts/application.html.erb rename to app/views/layouts/application.html.erb index 6af511b830..2e409b9dd4 100644 --- a/media_ranker/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -9,6 +9,14 @@ +
+
+
+
+ +

Ranking the Best of Everything

+
+
<%= yield %> diff --git a/media_ranker/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb similarity index 100% rename from media_ranker/app/views/layouts/mailer.html.erb rename to app/views/layouts/mailer.html.erb diff --git a/media_ranker/app/views/layouts/mailer.text.erb b/app/views/layouts/mailer.text.erb similarity index 100% rename from media_ranker/app/views/layouts/mailer.text.erb rename to app/views/layouts/mailer.text.erb diff --git a/media_ranker/lib/assets/.keep b/app/views/welcome/index.html.erb similarity index 100% rename from media_ranker/lib/assets/.keep rename to app/views/welcome/index.html.erb diff --git a/media_ranker/bin/bundle b/bin/bundle similarity index 100% rename from media_ranker/bin/bundle rename to bin/bundle diff --git a/media_ranker/bin/rails b/bin/rails similarity index 100% rename from media_ranker/bin/rails rename to bin/rails diff --git a/media_ranker/bin/rake b/bin/rake similarity index 100% rename from media_ranker/bin/rake rename to bin/rake diff --git a/media_ranker/bin/setup b/bin/setup similarity index 100% rename from media_ranker/bin/setup rename to bin/setup diff --git a/media_ranker/bin/spring b/bin/spring similarity index 100% rename from media_ranker/bin/spring rename to bin/spring diff --git a/media_ranker/bin/update b/bin/update similarity index 100% rename from media_ranker/bin/update rename to bin/update diff --git a/media_ranker/config.ru b/config.ru similarity index 100% rename from media_ranker/config.ru rename to config.ru diff --git a/media_ranker/config/application.rb b/config/application.rb similarity index 100% rename from media_ranker/config/application.rb rename to config/application.rb diff --git a/media_ranker/config/boot.rb b/config/boot.rb similarity index 100% rename from media_ranker/config/boot.rb rename to config/boot.rb diff --git a/media_ranker/config/cable.yml b/config/cable.yml similarity index 100% rename from media_ranker/config/cable.yml rename to config/cable.yml diff --git a/media_ranker/config/database.yml b/config/database.yml similarity index 100% rename from media_ranker/config/database.yml rename to config/database.yml diff --git a/media_ranker/config/environment.rb b/config/environment.rb similarity index 100% rename from media_ranker/config/environment.rb rename to config/environment.rb diff --git a/media_ranker/config/environments/development.rb b/config/environments/development.rb similarity index 100% rename from media_ranker/config/environments/development.rb rename to config/environments/development.rb diff --git a/media_ranker/config/environments/production.rb b/config/environments/production.rb similarity index 100% rename from media_ranker/config/environments/production.rb rename to config/environments/production.rb diff --git a/media_ranker/config/environments/test.rb b/config/environments/test.rb similarity index 100% rename from media_ranker/config/environments/test.rb rename to config/environments/test.rb diff --git a/media_ranker/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb similarity index 100% rename from media_ranker/config/initializers/application_controller_renderer.rb rename to config/initializers/application_controller_renderer.rb diff --git a/media_ranker/config/initializers/assets.rb b/config/initializers/assets.rb similarity index 100% rename from media_ranker/config/initializers/assets.rb rename to config/initializers/assets.rb diff --git a/media_ranker/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb similarity index 100% rename from media_ranker/config/initializers/backtrace_silencers.rb rename to config/initializers/backtrace_silencers.rb diff --git a/media_ranker/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb similarity index 100% rename from media_ranker/config/initializers/cookies_serializer.rb rename to config/initializers/cookies_serializer.rb diff --git a/media_ranker/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb similarity index 100% rename from media_ranker/config/initializers/filter_parameter_logging.rb rename to config/initializers/filter_parameter_logging.rb diff --git a/media_ranker/config/initializers/inflections.rb b/config/initializers/inflections.rb similarity index 100% rename from media_ranker/config/initializers/inflections.rb rename to config/initializers/inflections.rb diff --git a/media_ranker/config/initializers/mime_types.rb b/config/initializers/mime_types.rb similarity index 100% rename from media_ranker/config/initializers/mime_types.rb rename to config/initializers/mime_types.rb diff --git a/media_ranker/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb similarity index 100% rename from media_ranker/config/initializers/new_framework_defaults.rb rename to config/initializers/new_framework_defaults.rb diff --git a/media_ranker/config/initializers/session_store.rb b/config/initializers/session_store.rb similarity index 100% rename from media_ranker/config/initializers/session_store.rb rename to config/initializers/session_store.rb diff --git a/media_ranker/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb similarity index 100% rename from media_ranker/config/initializers/wrap_parameters.rb rename to config/initializers/wrap_parameters.rb diff --git a/media_ranker/config/locales/en.yml b/config/locales/en.yml similarity index 100% rename from media_ranker/config/locales/en.yml rename to config/locales/en.yml diff --git a/media_ranker/config/puma.rb b/config/puma.rb similarity index 100% rename from media_ranker/config/puma.rb rename to config/puma.rb diff --git a/media_ranker/config/routes.rb b/config/routes.rb similarity index 70% rename from media_ranker/config/routes.rb rename to config/routes.rb index 787824f888..40b9081bc4 100644 --- a/media_ranker/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,6 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + + root "welcome#index", as:'welcome' + resources :welcome end diff --git a/media_ranker/config/secrets.yml b/config/secrets.yml similarity index 100% rename from media_ranker/config/secrets.yml rename to config/secrets.yml diff --git a/media_ranker/config/spring.rb b/config/spring.rb similarity index 100% rename from media_ranker/config/spring.rb rename to config/spring.rb diff --git a/media_ranker/db/migrate/20170410220905_create_users.rb b/db/migrate/20170410220905_create_users.rb similarity index 100% rename from media_ranker/db/migrate/20170410220905_create_users.rb rename to db/migrate/20170410220905_create_users.rb diff --git a/media_ranker/db/migrate/20170410220941_change_stringg_to_string_in_username.rb b/db/migrate/20170410220941_change_stringg_to_string_in_username.rb similarity index 100% rename from media_ranker/db/migrate/20170410220941_change_stringg_to_string_in_username.rb rename to db/migrate/20170410220941_change_stringg_to_string_in_username.rb diff --git a/media_ranker/db/migrate/20170410221612_create_media.rb b/db/migrate/20170410221612_create_media.rb similarity index 100% rename from media_ranker/db/migrate/20170410221612_create_media.rb rename to db/migrate/20170410221612_create_media.rb diff --git a/media_ranker/db/migrate/20170410225325_rename_media_to_works.rb b/db/migrate/20170410225325_rename_media_to_works.rb similarity index 100% rename from media_ranker/db/migrate/20170410225325_rename_media_to_works.rb rename to db/migrate/20170410225325_rename_media_to_works.rb diff --git a/media_ranker/db/schema.rb b/db/schema.rb similarity index 100% rename from media_ranker/db/schema.rb rename to db/schema.rb diff --git a/media_ranker/db/seeds.rb b/db/seeds.rb similarity index 100% rename from media_ranker/db/seeds.rb rename to db/seeds.rb diff --git a/media_ranker/lib/tasks/.keep b/lib/assets/.keep similarity index 100% rename from media_ranker/lib/tasks/.keep rename to lib/assets/.keep diff --git a/media_ranker/log/.keep b/lib/tasks/.keep similarity index 100% rename from media_ranker/log/.keep rename to lib/tasks/.keep diff --git a/media_ranker/.gitignore b/media_ranker/.gitignore deleted file mode 100644 index 48fb168f64..0000000000 --- a/media_ranker/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# See https://help.github.com/articles/ignoring-files for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' - -# Ignore bundler config. -/.bundle - -# Ignore all logfiles and tempfiles. -/log/* -/tmp/* -!/log/.keep -!/tmp/.keep - -# Ignore Byebug command history file. -.byebug_history diff --git a/media_ranker/README.md b/media_ranker/README.md deleted file mode 100644 index 7db80e4ca1..0000000000 --- a/media_ranker/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... diff --git a/media_ranker/vendor/assets/stylesheets/.keep b/media_ranker/vendor/assets/stylesheets/.keep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/media_ranker/public/404.html b/public/404.html similarity index 100% rename from media_ranker/public/404.html rename to public/404.html diff --git a/media_ranker/public/422.html b/public/422.html similarity index 100% rename from media_ranker/public/422.html rename to public/422.html diff --git a/media_ranker/public/500.html b/public/500.html similarity index 100% rename from media_ranker/public/500.html rename to public/500.html diff --git a/media_ranker/public/apple-touch-icon-precomposed.png b/public/apple-touch-icon-precomposed.png similarity index 100% rename from media_ranker/public/apple-touch-icon-precomposed.png rename to public/apple-touch-icon-precomposed.png diff --git a/media_ranker/public/apple-touch-icon.png b/public/apple-touch-icon.png similarity index 100% rename from media_ranker/public/apple-touch-icon.png rename to public/apple-touch-icon.png diff --git a/media_ranker/public/favicon.ico b/public/favicon.ico similarity index 100% rename from media_ranker/public/favicon.ico rename to public/favicon.ico diff --git a/media_ranker/public/robots.txt b/public/robots.txt similarity index 100% rename from media_ranker/public/robots.txt rename to public/robots.txt diff --git a/media_ranker/test/controllers/.keep b/test/controllers/.keep similarity index 100% rename from media_ranker/test/controllers/.keep rename to test/controllers/.keep diff --git a/media_ranker/test/controllers/medias_controller_test.rb b/test/controllers/medias_controller_test.rb similarity index 100% rename from media_ranker/test/controllers/medias_controller_test.rb rename to test/controllers/medias_controller_test.rb diff --git a/media_ranker/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb similarity index 100% rename from media_ranker/test/controllers/users_controller_test.rb rename to test/controllers/users_controller_test.rb diff --git a/media_ranker/test/controllers/welcome_controller_test.rb b/test/controllers/welcome_controller_test.rb similarity index 100% rename from media_ranker/test/controllers/welcome_controller_test.rb rename to test/controllers/welcome_controller_test.rb diff --git a/media_ranker/test/fixtures/.keep b/test/fixtures/.keep similarity index 100% rename from media_ranker/test/fixtures/.keep rename to test/fixtures/.keep diff --git a/media_ranker/test/fixtures/files/.keep b/test/fixtures/files/.keep similarity index 100% rename from media_ranker/test/fixtures/files/.keep rename to test/fixtures/files/.keep diff --git a/media_ranker/test/fixtures/media.yml b/test/fixtures/media.yml similarity index 100% rename from media_ranker/test/fixtures/media.yml rename to test/fixtures/media.yml diff --git a/media_ranker/test/fixtures/users.yml b/test/fixtures/users.yml similarity index 100% rename from media_ranker/test/fixtures/users.yml rename to test/fixtures/users.yml diff --git a/media_ranker/test/helpers/.keep b/test/helpers/.keep similarity index 100% rename from media_ranker/test/helpers/.keep rename to test/helpers/.keep diff --git a/media_ranker/test/integration/.keep b/test/integration/.keep similarity index 100% rename from media_ranker/test/integration/.keep rename to test/integration/.keep diff --git a/media_ranker/test/mailers/.keep b/test/mailers/.keep similarity index 100% rename from media_ranker/test/mailers/.keep rename to test/mailers/.keep diff --git a/media_ranker/test/models/.keep b/test/models/.keep similarity index 100% rename from media_ranker/test/models/.keep rename to test/models/.keep diff --git a/media_ranker/test/models/medium_test.rb b/test/models/medium_test.rb similarity index 100% rename from media_ranker/test/models/medium_test.rb rename to test/models/medium_test.rb diff --git a/media_ranker/test/models/user_test.rb b/test/models/user_test.rb similarity index 100% rename from media_ranker/test/models/user_test.rb rename to test/models/user_test.rb diff --git a/media_ranker/test/test_helper.rb b/test/test_helper.rb similarity index 100% rename from media_ranker/test/test_helper.rb rename to test/test_helper.rb diff --git a/media_ranker/tmp/.keep b/vendor/assets/javascripts/.keep similarity index 100% rename from media_ranker/tmp/.keep rename to vendor/assets/javascripts/.keep diff --git a/media_ranker/vendor/assets/javascripts/.keep b/vendor/assets/stylesheets/.keep similarity index 100% rename from media_ranker/vendor/assets/javascripts/.keep rename to vendor/assets/stylesheets/.keep From 3a23f466e1c5a06e95b96ec464a2bda98b0a1d3a Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Tue, 11 Apr 2017 15:37:26 -0700 Subject: [PATCH 03/38] added validation tests for model and descriptions of relationship tests --- test/models/work_test.rb | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 test/models/work_test.rb diff --git a/test/models/work_test.rb b/test/models/work_test.rb new file mode 100644 index 0000000000..6f1a7ba9ac --- /dev/null +++ b/test/models/work_test.rb @@ -0,0 +1,55 @@ +require "test_helper" +describe Work do + let(:work) {Work.new } + + describe "validations" do + it "can be created with all attributes" do + a = Work.create!(title: "kissed by a rose", category: "album", created_by: "SEAL", description: "best love song of the 90s", published: "london") + result = a.valid? + result.must_equal true + end + + it "requires a title" do + a = Work.new(category: "album", created_by: "seal") + result = a.valid? + result.must_equal false + end + + it "requires a unique title" do + a = Work.create!(title: "kissed by a rose", category: "album", created_by: "SEAL", description: "best love song of the 90s", published: "london") + b = Work.new(title: "kissed by a rose", category: "album", created_by: "seal") + result = b.valid? + result.must_equal false + end + + it "requires an author" do + a = Work.new(category: "album") + result = a.valid? + result.must_equal false + end + + it "does not require a unique author" do + a = Work.create!(title: "rose kisses", category: "album", created_by: "SEAL", description: "best love song of the 90s", published: "london") + b = Work.new(title: "kissed by a rose", category: "album", created_by: "seal") + result = b.valid? + result.must_equal true + end + + end + + + describe "testing relations" do + +it "can count how many votes it has" do + #this is where that test would go +end + +it "can find a user's name through their vote" do + #this is where that test would go +end + + + end + + +end From f1ce01fca8f1599a079d09971a82622f03313e4e Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Tue, 11 Apr 2017 16:07:45 -0700 Subject: [PATCH 04/38] created votes join table and wrote relationships on users, works and votes models --- app/models/user.rb | 1 + app/models/vote.rb | 4 ++++ app/models/work.rb | 7 +++++++ db/migrate/20170411225030_create_votes.rb | 11 +++++++++++ db/migrate/20170411225046_create_join_table.rb | 6 ++++++ db/schema.rb | 11 ++++++++++- test/controllers/works_controller.rb | 7 +++++++ test/fixtures/votes.yml | 11 +++++++++++ test/fixtures/works.yml | 15 +++++++++++++++ test/models/vote_test.rb | 9 +++++++++ 10 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 app/models/vote.rb create mode 100644 db/migrate/20170411225030_create_votes.rb create mode 100644 db/migrate/20170411225046_create_join_table.rb create mode 100644 test/controllers/works_controller.rb create mode 100644 test/fixtures/votes.yml create mode 100644 test/fixtures/works.yml create mode 100644 test/models/vote_test.rb diff --git a/app/models/user.rb b/app/models/user.rb index 379658a509..db11855600 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,2 +1,3 @@ class User < ApplicationRecord + has_many :votes end diff --git a/app/models/vote.rb b/app/models/vote.rb new file mode 100644 index 0000000000..02a6df4eba --- /dev/null +++ b/app/models/vote.rb @@ -0,0 +1,4 @@ +class Vote < ApplicationRecord + belongs_to :users + belongs_to :works +end diff --git a/app/models/work.rb b/app/models/work.rb index 95322dd45e..302cecc5a4 100644 --- a/app/models/work.rb +++ b/app/models/work.rb @@ -1,2 +1,9 @@ class Work < ApplicationRecord +has_many :votes + + validates :title, presence: true, uniqueness: true + validates :created_by, presence: true + + validates :category, presence: true , inclusion: { in: %w(album movie book)} + end diff --git a/db/migrate/20170411225030_create_votes.rb b/db/migrate/20170411225030_create_votes.rb new file mode 100644 index 0000000000..ba67b5f76a --- /dev/null +++ b/db/migrate/20170411225030_create_votes.rb @@ -0,0 +1,11 @@ +class CreateVotes < ActiveRecord::Migration[5.0] + def change + #i didn't create this as a join table through rails generate model + #I'm editing the migration before typing db:migrate + create_join_table :users, :works, table_name: :votes do |t| + t.index :user_id + t.index :work_id + t.timestamps + end + end +end diff --git a/db/migrate/20170411225046_create_join_table.rb b/db/migrate/20170411225046_create_join_table.rb new file mode 100644 index 0000000000..e29e4b20af --- /dev/null +++ b/db/migrate/20170411225046_create_join_table.rb @@ -0,0 +1,6 @@ +class CreateJoinTable < ActiveRecord::Migration[5.0] + def change + #no changes, re-wrote the create Votes table before + #running migration + end +end diff --git a/db/schema.rb b/db/schema.rb index 045e2fe339..6f3545ecdf 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170410225325) do +ActiveRecord::Schema.define(version: 20170411225046) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -21,6 +21,15 @@ t.datetime "updated_at", null: false end + create_table "votes", id: false, force: :cascade do |t| + t.integer "user_id", null: false + t.integer "work_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["user_id"], name: "index_votes_on_user_id", using: :btree + t.index ["work_id"], name: "index_votes_on_work_id", using: :btree + end + create_table "works", force: :cascade do |t| t.string "category" t.string "title" diff --git a/test/controllers/works_controller.rb b/test/controllers/works_controller.rb new file mode 100644 index 0000000000..d95073c22e --- /dev/null +++ b/test/controllers/works_controller.rb @@ -0,0 +1,7 @@ +require "test_helper" + +describe WorksController do + # it "must be a real test" do + # flunk "Need real tests" + # end +end diff --git a/test/fixtures/votes.yml b/test/fixtures/votes.yml new file mode 100644 index 0000000000..dc3ee79b5d --- /dev/null +++ b/test/fixtures/votes.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +# This model initially had no columns defined. If you add columns to the +# model remove the "{}" from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/fixtures/works.yml b/test/fixtures/works.yml new file mode 100644 index 0000000000..3fd8d6f559 --- /dev/null +++ b/test/fixtures/works.yml @@ -0,0 +1,15 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + category: + title: MyString + created_by: MyString + description: MyString + published: MyString + +two: + category: + title: MyString + created_by: MyString + description: MyString + published: MyString diff --git a/test/models/vote_test.rb b/test/models/vote_test.rb new file mode 100644 index 0000000000..fc15947bd3 --- /dev/null +++ b/test/models/vote_test.rb @@ -0,0 +1,9 @@ +require "test_helper" + +describe Vote do + let(:vote) { Vote.new } + + it "must be valid" do + value(vote).must_be :valid? + end +end From 353078f93959805e695e129594935cd931a6fc4c Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 06:19:30 -0700 Subject: [PATCH 05/38] completed relationship unit tests for work --- db/media_seeds.csv | 2 +- db/seeds.rb | 12 +++++ test/fixtures/users.yml | 11 ++++- test/fixtures/votes.yml | 14 ++++-- test/fixtures/works.yml | 104 ++++++++++++++++++++++++++++++++++----- test/models/work_test.rb | 13 +++-- 6 files changed, 132 insertions(+), 24 deletions(-) diff --git a/db/media_seeds.csv b/db/media_seeds.csv index b5101408d0..eb9ef1e985 100644 --- a/db/media_seeds.csv +++ b/db/media_seeds.csv @@ -24,4 +24,4 @@ book,Hidden Figures,Margot Lee Shetterly,2016,Good book that came before the mov book,Practical Object-Oriented Design in Ruby,Sandi Metz,2012,Good programming book book,Kindred,Octavia E. Butler,1979,Good sci-fi book book,Parable of the Sower,Octavia E. Butler,1993, -book,A Wizard of Earthsea,Ursula K. Leguin,1968, \ No newline at end of file +book,A Wizard of Earthsea,Ursula K. Leguin,1968, diff --git a/db/seeds.rb b/db/seeds.rb index 1beea2accd..51eb06e909 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -5,3 +5,15 @@ # # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) # Character.create(name: 'Luke', movie: movies.first) +require 'csv' +csv_text = File.read(Rails.root.join('db', 'media_seeds.csv')) +csv = CSV.parse(csv_text, :headers => true, :encoding => 'ISO-8859-1') +csv.each do |row| + d = Work.new + d.category = row['category'] + d.title= row['title'] + d.created_by = row['creator'] + d.published = row['publication_year'] + d.description = row['description'] + d.save +end diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index ea8738f8da..64c99f687f 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -1,7 +1,14 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html one: - username: + username: sara + id: 1 + two: - username: + username: beza + id: 2 + +three: + username: chucha + id: 3 diff --git a/test/fixtures/votes.yml b/test/fixtures/votes.yml index dc3ee79b5d..ab4d0b5b56 100644 --- a/test/fixtures/votes.yml +++ b/test/fixtures/votes.yml @@ -4,8 +4,14 @@ # model remove the "{}" from the fixture names and add the columns immediately # below each fixture, per the syntax in the comments below # -one: {} -# column: value +one: + user_id: 1 + work_id: 2 # -two: {} -# column: value +two: + user_id: 2 + work_id: 2 + +three: + user_id: 2 + work_id: 1 diff --git a/test/fixtures/works.yml b/test/fixtures/works.yml index 3fd8d6f559..086b1dd78a 100644 --- a/test/fixtures/works.yml +++ b/test/fixtures/works.yml @@ -1,15 +1,93 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - +--- one: - category: - title: MyString - created_by: MyString - description: MyString - published: MyString - + category: album + title: 'Can''t Buy a Thrill' + created_by: Steely Dan + published: 1972 + description: + id: 1 two: - category: - title: MyString - created_by: MyString - description: MyString - published: MyString + category: album + title: Countdown to Ecstasy + created_by: Steely Dan + published: 1973 + description: + id: 2 +three: + category: album + title: Pretzel Logic + created_by: Steely Dan + published: 1974 + description: +four: + category: album + title: Katy Lied + created_by: Steely Dan + published: 1975 + description: +five: + category: album + title: The Royal Scam + created_by: Steely Dan + published: 1976 + description: +six: + category: album + title: Aja + created_by: Steely Dan + published: 1977 + description: +seven: + category: album + title: Gaucho + created_by: Steely Dan + published: 1980 + description: +eight: + category: album + title: Silence Yourself + created_by: Savages + published: 2013 + description: +nine: + category: album + title: Adore Life + created_by: Savages + published: 2016 + description: +ten: + category: album + title: NVM + created_by: Tacocat + published: 2014 + description: +eleven: + category: album + title: Lost Time + created_by: Tacocat + published: 2016 + description: +twelve: + category: album + title: No Regrets + created_by: Chastity Belt + published: 2013 + description: +thirteen: + category: album + title: Time to Go Home + created_by: Chastity Belt + published: 2015 + description: +fourteen: + category: album + title: Sleater-Kinney + created_by: Sleater-Kinney + published: 1995 + description: +fifteen: + category: album + title: Call the Doctor + created_by: Sleater-Kinney + published: 1996 + description: diff --git a/test/models/work_test.rb b/test/models/work_test.rb index 6f1a7ba9ac..40f84ac183 100644 --- a/test/models/work_test.rb +++ b/test/models/work_test.rb @@ -1,6 +1,6 @@ require "test_helper" describe Work do - let(:work) {Work.new } + describe "validations" do it "can be created with all attributes" do @@ -38,14 +38,19 @@ end - describe "testing relations" do +describe "testing relations" do it "can count how many votes it has" do - #this is where that test would go +work= Work.find(2) +work.votes.length.must_equal 2 end it "can find a user's name through their vote" do - #this is where that test would go + work= Work.find(2) + a = work.votes[0].user_id + b = User.find(a).username + b.must_equal "sara" + end From f00160222d76d48474a38cf5b780c71584d44a40 Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 06:57:10 -0700 Subject: [PATCH 06/38] wrote works controller tests and config file --- app/models/work.rb | 6 +++ config/routes.rb | 3 ++ test/controllers/works_controller.rb | 62 ++++++++++++++++++++++++++-- test/models/work_test.rb | 8 ++++ 4 files changed, 75 insertions(+), 4 deletions(-) diff --git a/app/models/work.rb b/app/models/work.rb index 302cecc5a4..752466220c 100644 --- a/app/models/work.rb +++ b/app/models/work.rb @@ -6,4 +6,10 @@ class Work < ApplicationRecord validates :category, presence: true , inclusion: { in: %w(album movie book)} +def show_category(type) + all = Work.all + all.select!{|item| item.category == type} + return all +end + end diff --git a/config/routes.rb b/config/routes.rb index 40b9081bc4..2f87d6d745 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,4 +3,7 @@ root "welcome#index", as:'welcome' resources :welcome + resources :works + resources :votes + resources :users end diff --git a/test/controllers/works_controller.rb b/test/controllers/works_controller.rb index d95073c22e..fee6ceaf05 100644 --- a/test/controllers/works_controller.rb +++ b/test/controllers/works_controller.rb @@ -1,7 +1,61 @@ -require "test_helper" +require 'test_helper' describe WorksController do - # it "must be a real test" do - # flunk "Need real tests" - # end + describe "index" do + it "lists all the books" do +#must_be is a method with two arguments the symbolized version of what you're +#doing and whatever you expect the value to be + Work.count.must_be :>, 0 + get books_path + must_respond_with :success + end + end + it "still responds successfully when there are no books" do + Work.destroy_all + get works_path + must_respond_with :success + end + describe "new" do + #you can probably get away with one test "if i send a new request do I get a new item" + + end + + describe "create" do + it "adds a book to the database" do + work_data = { + work: { + title: "test book", + created_by: "keith sweat", + published: "1998", + } + } + post works_path, params: work_data + must_redirect_to :works_path + end + + it "re-renders the new book form if the book is invalid" do + work_data = {work:{title: "test work"} } + post works_path, params: work_data + must_respond_with :bad_request + end + end + + describe "show" do + it "retrieves books that exist" do + work = Work.first + get works_path(work) + must_respond_with :success + end + + it "returns 404 not found if the book id doesn't exist" do + #you can set the id randomly but you can also get the last one + # book_id = 1337 + work_id = Work.last.id + work_id += 1 + get work_path(work_id) + + must_respond_with :not_found + end + end + end diff --git a/test/models/work_test.rb b/test/models/work_test.rb index 40f84ac183..ba19d23e03 100644 --- a/test/models/work_test.rb +++ b/test/models/work_test.rb @@ -54,6 +54,14 @@ end +describe "testing model method" do + it "can display a single category" do + a = Work.all +#not sure how to write this without writing the controller + end +end + + end From 1573c31e59940c266e629512294e30ec295b4d1c Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 06:57:42 -0700 Subject: [PATCH 07/38] commiting deleted media files --- test/controllers/medias_controller_test.rb | 7 ------- test/fixtures/media.yml | 15 --------------- test/models/medium_test.rb | 9 --------- 3 files changed, 31 deletions(-) delete mode 100644 test/controllers/medias_controller_test.rb delete mode 100644 test/fixtures/media.yml delete mode 100644 test/models/medium_test.rb diff --git a/test/controllers/medias_controller_test.rb b/test/controllers/medias_controller_test.rb deleted file mode 100644 index 4f64b79dc9..0000000000 --- a/test/controllers/medias_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -describe MediasController do - # it "must be a real test" do - # flunk "Need real tests" - # end -end diff --git a/test/fixtures/media.yml b/test/fixtures/media.yml deleted file mode 100644 index 3fd8d6f559..0000000000 --- a/test/fixtures/media.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - category: - title: MyString - created_by: MyString - description: MyString - published: MyString - -two: - category: - title: MyString - created_by: MyString - description: MyString - published: MyString diff --git a/test/models/medium_test.rb b/test/models/medium_test.rb deleted file mode 100644 index 81052cf6ef..0000000000 --- a/test/models/medium_test.rb +++ /dev/null @@ -1,9 +0,0 @@ -require "test_helper" - -describe Medium do - let(:medium) { Medium.new } - - it "must be valid" do - value(medium).must_be :valid? - end -end From 3930b7dddaeac27f91a0d4962ccf3a34d80982f3 Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 08:06:37 -0700 Subject: [PATCH 08/38] wrote crud controller methods on works controller and configured index method to show and separate all three category types --- app/controllers/works_controller.rb | 51 ++++++++++++++++++++++++++++ app/models/work.rb | 7 ++-- test/controllers/works_controller.rb | 18 +++++----- 3 files changed, 64 insertions(+), 12 deletions(-) diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index 56b02c9f2e..fda9ff6dd4 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -1,2 +1,53 @@ class WorksController < ApplicationController + def index + @works = Work.all + @albums = Work.show_category("album") + @books = Work.show_category("book") + @movies = Work.show_category("movie") + end + + def new + @work = Work.new + end + + def create + @work = Work.new(work_params) + + if @work.save + redirect_to works_path + else + render :new, status: :bad_request + end + end + + def show + @work = Work.find_by(params[:id]) + if @work.nil? + head :not_found + end + end + + def edit + @work =Work.find(params[:id]) + end + + def update + work = Work.find(params[:id]) + work.update_attributes(work_params) + work.save + + redirect_to work_path(work) + end + + def destroy + work = Work.find(params[:id]) + work.destroy_all + redirect_to works_path + end + + private + + def work_params + return params.require(:work).permit(:title, :created_by, :published, :description) + end end diff --git a/app/models/work.rb b/app/models/work.rb index 752466220c..336f9f61c1 100644 --- a/app/models/work.rb +++ b/app/models/work.rb @@ -6,10 +6,11 @@ class Work < ApplicationRecord validates :category, presence: true , inclusion: { in: %w(album movie book)} -def show_category(type) +def self.show_category(cat) + chosen = [] all = Work.all - all.select!{|item| item.category == type} - return all + all.each{|item| item.category == cat ? (chosen << item ): next} + return chosen end end diff --git a/test/controllers/works_controller.rb b/test/controllers/works_controller.rb index fee6ceaf05..01aa8167f4 100644 --- a/test/controllers/works_controller.rb +++ b/test/controllers/works_controller.rb @@ -2,15 +2,15 @@ describe WorksController do describe "index" do - it "lists all the books" do + it "lists all the works" do #must_be is a method with two arguments the symbolized version of what you're #doing and whatever you expect the value to be Work.count.must_be :>, 0 - get books_path + get works_path must_respond_with :success end end - it "still responds successfully when there are no books" do + it "still responds successfully when there are no works" do Work.destroy_all get works_path must_respond_with :success @@ -21,10 +21,10 @@ end describe "create" do - it "adds a book to the database" do + it "adds a work to the database" do work_data = { work: { - title: "test book", + title: "test work", created_by: "keith sweat", published: "1998", } @@ -33,7 +33,7 @@ must_redirect_to :works_path end - it "re-renders the new book form if the book is invalid" do + it "re-renders the new work form if the work is invalid" do work_data = {work:{title: "test work"} } post works_path, params: work_data must_respond_with :bad_request @@ -41,15 +41,15 @@ end describe "show" do - it "retrieves books that exist" do + it "retrieves works that exist" do work = Work.first get works_path(work) must_respond_with :success end - it "returns 404 not found if the book id doesn't exist" do + it "returns 404 not found if the work id doesn't exist" do #you can set the id randomly but you can also get the last one - # book_id = 1337 + # work_id = 1337 work_id = Work.last.id work_id += 1 get work_path(work_id) From c0b2700b2c1a7a38e715227a68dbc9d4e756144a Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 10:23:39 -0700 Subject: [PATCH 09/38] formatted and styled views for works#index --- app/assets/stylesheets/works.scss | 32 +++++++++++++++++++++++++++++++ app/views/works/_list.html.erb | 4 ++++ app/views/works/index.html.erb | 25 ++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 app/assets/stylesheets/works.scss create mode 100644 app/views/works/_list.html.erb create mode 100644 app/views/works/index.html.erb diff --git a/app/assets/stylesheets/works.scss b/app/assets/stylesheets/works.scss new file mode 100644 index 0000000000..a495a20087 --- /dev/null +++ b/app/assets/stylesheets/works.scss @@ -0,0 +1,32 @@ +body { + margin: 0px; + padding: 0px; + +#top { + color: black; + font-weight: lighter; + font-family: sans-serif; +} +} +#books, #albums, #movies{ +font-family: sans-serif; + display: inline-block; + width: 30%; + vertical-align: top; + margin-left: 5px; + margin-right: 5px; +} +#books, #albums, #movies, h2{ + color: black; + font-weight: lighter; +} +#books, #albums, #movies, a{ + text-decoration: none; + color: #4a96c9; + font-stretch: semi-expanded; +} + +.author {color: gray; font-style: normal;font-weight: 100;} + + +.link {color: gray; font-style: normal;} diff --git a/app/views/works/_list.html.erb b/app/views/works/_list.html.erb new file mode 100644 index 0000000000..be3633c381 --- /dev/null +++ b/app/views/works/_list.html.erb @@ -0,0 +1,4 @@ +<%= link_to item.title, works_path %> +<%="by #{item.created_by}"%> + + <%= "#{item.votes.length} votes"%> diff --git a/app/views/works/index.html.erb b/app/views/works/index.html.erb new file mode 100644 index 0000000000..d790c1ad02 --- /dev/null +++ b/app/views/works/index.html.erb @@ -0,0 +1,25 @@ +
+

Media Spotlight

+ +

+
+

Top Albums

+<% @albums.each do |item| %> +<%=render partial: 'list' , locals:{item:item}%> + +<%end%> +
+ +
+

Top Books

+<% @books.each do |item| %> +<%=render partial: 'list', locals:{item:item} %> +<%end%> +
+ +
+

Top Movies

+<% @movies.each do |item| %> +<%=render partial: 'list' , locals:{item:item}%> +<%end%> +
From 4c6acc13b0e9a5d09bd1ec96486654c4bbe4d37c Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 12:46:57 -0700 Subject: [PATCH 10/38] added login functionality and view --- app/assets/stylesheets/application.css | 19 ++++++++++++++++++- app/assets/stylesheets/sessions.scss | 3 +++ app/controllers/sessions_controller.rb | 20 ++++++++++++++++++++ app/helpers/sessions_helper.rb | 2 ++ app/models/user.rb | 1 + app/models/vote.rb | 1 + app/models/work.rb | 7 ++++--- app/views/layouts/application.html.erb | 8 ++++++++ app/views/sessions/new.html.erb | 8 ++++++++ config/routes.rb | 4 ++++ test/controllers/sessions_controller_test.rb | 7 +++++++ 11 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 app/assets/stylesheets/sessions.scss create mode 100644 app/controllers/sessions_controller.rb create mode 100644 app/helpers/sessions_helper.rb create mode 100644 app/views/sessions/new.html.erb create mode 100644 test/controllers/sessions_controller_test.rb diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 462d45f3ff..e67fe6211b 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -19,6 +19,7 @@ border-bottom-width:medium; border-bottom-style: inset; /*border-bottom-color: grey;*/ } +/*Owl image*/ #heading { background-image:url(https://raw.githubusercontent.com/Ada-C7/MediaRanker/master/app/assets/images/owl.jpg); height:90px; @@ -28,7 +29,23 @@ border-bottom-width:medium; border-bottom-style: inset; border-bottom-color: grey; } - +/*MediaRanker*/ #logo{font-size: 30px; color:gray;display:inline-block;font-family: sans-serif;} +/*ranking the best of everything*/ #logo-2{font-size: 20px; color:#1779ba;display:inline-block;font-family: sans-serif;} + +/*Owl and text section*/ +#heading_text{width:50%;display:inline-block;} + +/*Login section*/ +#login{text-align: right;width:30%; display: inline-block;} +#login em{display:block;} +#login a{ + text-align:center; + background-color:#4a96c9; + color:white; + padding: 3px; + font-family: sans-serif; + font-weight: 100; +} diff --git a/app/assets/stylesheets/sessions.scss b/app/assets/stylesheets/sessions.scss new file mode 100644 index 0000000000..7bef9cf826 --- /dev/null +++ b/app/assets/stylesheets/sessions.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the sessions controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb new file mode 100644 index 0000000000..1a6dddaef0 --- /dev/null +++ b/app/controllers/sessions_controller.rb @@ -0,0 +1,20 @@ +class SessionsController < ApplicationController + def new + end + + def create + user = User.find_by(username: params[:username]) + + if user + session[:user_id] = user.id + flash[:success] = "#{user.username} is successfully logged in" + redirect_to root_path + end + end + + def destroy + session[:user_id] = nil + redirect_to root_path + flash[:logout] = "You were successfully logged out" + end +end diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb new file mode 100644 index 0000000000..309f8b2eb3 --- /dev/null +++ b/app/helpers/sessions_helper.rb @@ -0,0 +1,2 @@ +module SessionsHelper +end diff --git a/app/models/user.rb b/app/models/user.rb index db11855600..6b928e98d2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,3 +1,4 @@ class User < ApplicationRecord has_many :votes + has_many :works, through: :user_votes end diff --git a/app/models/vote.rb b/app/models/vote.rb index 02a6df4eba..7b6f4a780d 100644 --- a/app/models/vote.rb +++ b/app/models/vote.rb @@ -1,4 +1,5 @@ class Vote < ApplicationRecord belongs_to :users belongs_to :works + #ask if the coloring of belongs_to is a problem end diff --git a/app/models/work.rb b/app/models/work.rb index 336f9f61c1..56896cd3ae 100644 --- a/app/models/work.rb +++ b/app/models/work.rb @@ -1,10 +1,11 @@ class Work < ApplicationRecord has_many :votes +has_many :users, through: :votes - validates :title, presence: true, uniqueness: true - validates :created_by, presence: true +validates :title, presence: true, uniqueness: true +validates :created_by, presence: true - validates :category, presence: true , inclusion: { in: %w(album movie book)} +validates :category, presence: true , inclusion: { in: %w(album movie book)} def self.show_category(cat) chosen = [] diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 2e409b9dd4..07676d0dcb 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -16,6 +16,14 @@

Ranking the Best of Everything

+
+ <% if session[:user_id]%> + <%= "You are logged in as #{User.find(session[:user_id]).username}"%> + <%=link_to "logout", logout_path, method: :delete %> + <%else%> + <%=link_to "login", login_path %> + <%end%> +
<%= yield %> diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb new file mode 100644 index 0000000000..25a6cc8d87 --- /dev/null +++ b/app/views/sessions/new.html.erb @@ -0,0 +1,8 @@ +
+<%=form_tag do %> + <%=label_tag(:username, "Username")%> + <%=text_field_tag(:username)%> + + <%= submit_tag("Log In", class:"button")%> + <%end%> +
diff --git a/config/routes.rb b/config/routes.rb index 2f87d6d745..1673b5a711 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,4 +6,8 @@ resources :works resources :votes resources :users + + get 'login', to:'sessions#new' + post 'login', to:'sessions#create' + delete 'logout', to: 'sessions#destroy' end diff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rb new file mode 100644 index 0000000000..c2632a720b --- /dev/null +++ b/test/controllers/sessions_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +describe SessionsController do + # it "must be a real test" do + # flunk "Need real tests" + # end +end From f14ee18b8f3e77cfe045c810e429a6aa73c16ff8 Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 12:47:51 -0700 Subject: [PATCH 11/38] part of login funcationality --- app/controllers/sessions_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 1a6dddaef0..5af45d41e1 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -8,7 +8,9 @@ def create if user session[:user_id] = user.id flash[:success] = "#{user.username} is successfully logged in" - redirect_to root_path + redirect_to works_path + else + redirect_to login_path end end From 07e85a9e03cc71aae841a9a11168184f0b8607f6 Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 15:26:36 -0700 Subject: [PATCH 12/38] created routes, controller methods and views for eah category show page --- app/controllers/works_controller.rb | 12 ++++++++++++ app/views/works/_list.html.erb | 3 +++ app/views/works/albums_index.html.erb | 7 +++++++ app/views/works/books_index.html.erb | 7 +++++++ app/views/works/movies_index.html.erb | 7 +++++++ config/routes.rb | 9 +++++---- 6 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 app/views/works/albums_index.html.erb create mode 100644 app/views/works/books_index.html.erb create mode 100644 app/views/works/movies_index.html.erb diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index fda9ff6dd4..f6d6d747be 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -6,6 +6,18 @@ def index @movies = Work.show_category("movie") end +def books_index + @books = Work.show_category("book") +end + +def albums_index + @albums = Work.show_category("album") +end + +def movies_index + @movies = Work.show_category("movie") +end + def new @work = Work.new end diff --git a/app/views/works/_list.html.erb b/app/views/works/_list.html.erb index be3633c381..736ee7d10b 100644 --- a/app/views/works/_list.html.erb +++ b/app/views/works/_list.html.erb @@ -1,4 +1,7 @@ + <%= link_to item.title, works_path %> + <%="by #{item.created_by}"%> <%= "#{item.votes.length} votes"%> +
diff --git a/app/views/works/albums_index.html.erb b/app/views/works/albums_index.html.erb new file mode 100644 index 0000000000..2e85459ba3 --- /dev/null +++ b/app/views/works/albums_index.html.erb @@ -0,0 +1,7 @@ + +
+

Top Albums

+<% @albums.each do |item| %> +<%=render partial: 'list', locals:{item:item} %> +<%end%> +
diff --git a/app/views/works/books_index.html.erb b/app/views/works/books_index.html.erb new file mode 100644 index 0000000000..e0ad2d7575 --- /dev/null +++ b/app/views/works/books_index.html.erb @@ -0,0 +1,7 @@ + +
+

Top Books

+<% @books.each do |item| %> +<%=render partial: 'list', locals:{item:item} %> +<%end%> +
diff --git a/app/views/works/movies_index.html.erb b/app/views/works/movies_index.html.erb new file mode 100644 index 0000000000..4ec47f31fc --- /dev/null +++ b/app/views/works/movies_index.html.erb @@ -0,0 +1,7 @@ + +
+

Top Movies

+<% @movies.each do |item| %> +<%=render partial: 'list', locals:{item:item} %> +<%end%> +
diff --git a/config/routes.rb b/config/routes.rb index 1673b5a711..d5dee57855 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,10 +2,11 @@ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html root "welcome#index", as:'welcome' - resources :welcome - resources :works - resources :votes - resources :users + resources :welcome,:works, :votes,:users + + get 'books', to: 'works#books_index' + get 'albums', to: 'works#albums_index' + get 'movies', to: 'works#movies_index' get 'login', to:'sessions#new' post 'login', to:'sessions#create' From eab7d05f37d735aab7cf91ed40885ed6e8b18e12 Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 18:34:25 -0700 Subject: [PATCH 13/38] edited belongs_to on vote model --- Gemfile | 2 ++ Gemfile.lock | 4 ++++ app/controllers/sessions_controller.rb | 2 +- app/controllers/users_controller.rb | 4 ++++ app/controllers/works_controller.rb | 12 +++++++++++- app/models/vote.rb | 4 ++-- app/views/works/show.html.erb | 11 +++++++++++ config/routes.rb | 6 ++++-- 8 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 app/views/works/show.html.erb diff --git a/Gemfile b/Gemfile index d0e9da8aec..917573e3a9 100644 --- a/Gemfile +++ b/Gemfile @@ -38,6 +38,7 @@ gem 'jbuilder', '~> 2.5' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platform: :mri + gem 'binding_of_caller' end group :development do @@ -54,6 +55,7 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] group :development do gem 'better_errors' + gem 'binding_of_caller' gem 'pry-rails' end diff --git a/Gemfile.lock b/Gemfile.lock index 6dffa9cd65..576d377d04 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,6 +45,8 @@ GEM erubis (>= 2.6.6) rack (>= 0.9.0) bindex (0.5.0) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) builder (3.2.3) byebug (9.0.6) coderay (1.1.1) @@ -56,6 +58,7 @@ GEM execjs coffee-script-source (1.12.2) concurrent-ruby (1.0.5) + debug_inspector (0.0.2) erubis (2.7.0) execjs (2.7.0) ffi (1.9.18) @@ -177,6 +180,7 @@ PLATFORMS DEPENDENCIES better_errors + binding_of_caller byebug coffee-rails (~> 4.2) jbuilder (~> 2.5) diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 5af45d41e1..0b3033a341 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -16,7 +16,7 @@ def create def destroy session[:user_id] = nil - redirect_to root_path + redirect_to works_path flash[:logout] = "You were successfully logged out" end end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3e74dea87f..31cb70fa3e 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,2 +1,6 @@ class UsersController < ApplicationController + + def show + + end end diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index f6d6d747be..6270952292 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -33,7 +33,7 @@ def create end def show - @work = Work.find_by(params[:id]) + @work = Work.find_by(id: params[:id]) if @work.nil? head :not_found end @@ -57,6 +57,16 @@ def destroy redirect_to works_path end + def vote + works_vote = Vote.create!(user_id: session[:user_id], work_id:params[:id]) + + if works_vote + flash[:success] = "Your vote has been recorded!" + redirect_to work_path(params[:id]) + end + + end + private def work_params diff --git a/app/models/vote.rb b/app/models/vote.rb index 7b6f4a780d..69ff2c7f24 100644 --- a/app/models/vote.rb +++ b/app/models/vote.rb @@ -1,5 +1,5 @@ class Vote < ApplicationRecord - belongs_to :users - belongs_to :works + belongs_to :user + belongs_to :work #ask if the coloring of belongs_to is a problem end diff --git a/app/views/works/show.html.erb b/app/views/works/show.html.erb new file mode 100644 index 0000000000..dcaa68bff8 --- /dev/null +++ b/app/views/works/show.html.erb @@ -0,0 +1,11 @@ + +
+

Show

+<%= @work.title%> +<%if session[:user_id]%> +<%= link_to "Upvote", vote_path(@work.id), method: :post%> +<%= flash[:success]%> + +<%end%> + +
diff --git a/config/routes.rb b/config/routes.rb index d5dee57855..548d711763 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,8 +1,10 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html - root "welcome#index", as:'welcome' - resources :welcome,:works, :votes,:users + root "works#index", as:'home' + resources :welcome,:works,:users + + post 'works/:id/vote', to: 'works#vote', as:'vote' get 'books', to: 'works#books_index' get 'albums', to: 'works#albums_index' From 4453155e5849313ee03168bd4d11c96f95a9c6dd Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 19:25:03 -0700 Subject: [PATCH 14/38] made header into link and made links on index items --- app/assets/stylesheets/medias.scss | 3 --- app/views/layouts/application.html.erb | 2 ++ app/views/works/_list.html.erb | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 app/assets/stylesheets/medias.scss diff --git a/app/assets/stylesheets/medias.scss b/app/assets/stylesheets/medias.scss deleted file mode 100644 index ce8c348f12..0000000000 --- a/app/assets/stylesheets/medias.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the medias controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 07676d0dcb..76b26fc7b1 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -10,8 +10,10 @@
+ +

Ranking the Best of Everything

diff --git a/app/views/works/_list.html.erb b/app/views/works/_list.html.erb index 736ee7d10b..dc34f8127c 100644 --- a/app/views/works/_list.html.erb +++ b/app/views/works/_list.html.erb @@ -1,5 +1,5 @@ -<%= link_to item.title, works_path %> +<%= link_to item.title, work_path(item.id) %> <%="by #{item.created_by}"%> From 30957f24daac14c50067638f7369df969a4b9f3a Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 20:36:40 -0700 Subject: [PATCH 15/38] added user_votes method to works model and created table to view votes in show --- app/controllers/users_controller.rb | 2 +- app/controllers/works_controller.rb | 1 + app/models/user.rb | 3 ++- app/models/work.rb | 9 +++++++++ app/views/users/show.html.erb | 0 app/views/works/show.html.erb | 21 +++++++++++++++++++++ 6 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 app/views/users/show.html.erb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 31cb70fa3e..5d9b8a8d9b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,6 +1,6 @@ class UsersController < ApplicationController def show - + @user = User.find(params[:id]) end end diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index 6270952292..908c453fda 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -34,6 +34,7 @@ def create def show @work = Work.find_by(id: params[:id]) + @votes = @work.user_votes if @work.nil? head :not_found end diff --git a/app/models/user.rb b/app/models/user.rb index 6b928e98d2..d087b46b22 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,4 +1,5 @@ class User < ApplicationRecord has_many :votes - has_many :works, through: :user_votes + has_many :works, through: :votes + end diff --git a/app/models/work.rb b/app/models/work.rb index 56896cd3ae..0f486207ac 100644 --- a/app/models/work.rb +++ b/app/models/work.rb @@ -14,4 +14,13 @@ def self.show_category(cat) return chosen end +def user_votes + final_votes = {} + all_votes = self.votes + + all_votes.each do |vote| + final_votes[User.find(vote.user_id).username] = vote.created_at.to_date + end + return final_votes +end end diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/views/works/show.html.erb b/app/views/works/show.html.erb index dcaa68bff8..c6543bd1b9 100644 --- a/app/views/works/show.html.erb +++ b/app/views/works/show.html.erb @@ -8,4 +8,25 @@ <%end%> + +<% case @work.category%> + <% when "book" %> + <%= link_to "Back to #{@work.category}s", books_path%> + <% when "album" %> + <%= link_to "Back to #{@work.category}s", albums_path%> + <% when "movie" %> + <%= link_to "Back to #{@work.category}s", movies_path%> + <%end%> +
+
+ + <%counter = 0 %> + <%@votes.each do |voter,date|%> + + + + <%counter += 1 %> + + <%end%> +
<%=link_to "#{voter}", user_path(@work.votes[counter].user_id)%> <%=date%>
From 85578bf498a1198fec9b966e84bdda44ff371c5a Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 22:10:46 -0700 Subject: [PATCH 16/38] added create media feature and added link to item show pages --- app/controllers/works_controller.rb | 5 +++-- app/views/works/edit.html.erb | 23 +++++++++++++++++++ app/views/works/new.html.erb | 29 ++++++++++++++++++++++++ app/views/works/show.html.erb | 34 ++++++++++++++++++++++------- 4 files changed, 81 insertions(+), 10 deletions(-) create mode 100644 app/views/works/edit.html.erb create mode 100644 app/views/works/new.html.erb diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index 908c453fda..cc717c9a93 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -24,11 +24,12 @@ def new def create @work = Work.new(work_params) - + @work.save if @work.save redirect_to works_path else render :new, status: :bad_request + flash[:failure] = "Could not save your item" end end @@ -71,6 +72,6 @@ def vote private def work_params - return params.require(:work).permit(:title, :created_by, :published, :description) + return params.require(:work).permit(:title, :created_by, :published, :description, :category) end end diff --git a/app/views/works/edit.html.erb b/app/views/works/edit.html.erb new file mode 100644 index 0000000000..3e78f045b9 --- /dev/null +++ b/app/views/works/edit.html.erb @@ -0,0 +1,23 @@ +<%= form_for @work do |f|%> +<%=f.label :title%> +<%=f.text_field :title%> + +<%=f.label :created_by%> +<%=f.text_field :created_by%> + +<%=f.label :published%> +<%=f.text_field :published%> + +<%= f.submit value:"Edit"%> +<%end%> + + + +<% case @work.category%> + <% when "book" %> + <%= link_to "Back to #{@work.category.capitalize}s", books_path%> + <% when "album" %> + <%= link_to "Back to #{@work.category.capitalize}s", albums_path%> + <% when "movie" %> + <%= link_to "Back to #{@work.category.capitalize}s", movies_path%> + <%end%> diff --git a/app/views/works/new.html.erb b/app/views/works/new.html.erb new file mode 100644 index 0000000000..8b0d8d86c6 --- /dev/null +++ b/app/views/works/new.html.erb @@ -0,0 +1,29 @@ +<%= form_for @work do |f|%> +<%=f.label :title%> +<%=f.text_field :title%> + +<%=f.label :created_by%> +<%=f.text_field :created_by%> + +<%=f.label :published%> +<%=f.text_field :published%> + +<%=f.label :category%> +<%=f.text_field :category%> + +<%=f.label :description%> +<%=f.text_area :description%> + +<%= f.submit value:"submit"%> +<%end%> + + + +<% case @work.category%> + <% when "book" %> + <%= link_to "Back to #{@work.category.capitalize}s", books_path%> + <% when "album" %> + <%= link_to "Back to #{@work.category.capitalize}s", albums_path%> + <% when "movie" %> + <%= link_to "Back to #{@work.category.capitalize}s", movies_path%> + <%end%> diff --git a/app/views/works/show.html.erb b/app/views/works/show.html.erb index c6543bd1b9..5d9b3f1cea 100644 --- a/app/views/works/show.html.erb +++ b/app/views/works/show.html.erb @@ -1,23 +1,41 @@
-

Show

-<%= @work.title%> + +

<%=@work.title%>

+
+Created By:<%= @work.created_by%> +
+Published:<%= @work.published%> +
+<%=@work.description%> + + <%if session[:user_id]%> -<%= link_to "Upvote", vote_path(@work.id), method: :post%> +<%= link_to " Upvote ", vote_path(@work.id), method: :post%> <%= flash[:success]%> - <%end%> - + <% case @work.category%> <% when "book" %> - <%= link_to "Back to #{@work.category}s", books_path%> + <%= link_to "Back to #{@work.category.capitalize}s", books_path%> <% when "album" %> - <%= link_to "Back to #{@work.category}s", albums_path%> + <%= link_to "Back to #{@work.category.capitalize}s", albums_path%> <% when "movie" %> - <%= link_to "Back to #{@work.category}s", movies_path%> + <%= link_to "Back to #{@work.category.capitalize}s", movies_path%> <%end%> + + +<%= link_to "Edit #{@work.category.capitalize}", edit_work_path%> + + +<%= link_to "Delete #{@work.category.capitalize}", works_path(@work.id), method: :delete, data:{confirm: "Are you sure?"} %>
+ + +<%= link_to "Add new media", new_work_path%> + +
<%counter = 0 %> From c74a38f6932c61023a55fd13f786fd88a3b77380 Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 22:21:46 -0700 Subject: [PATCH 17/38] changed root, deployment debugging --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 548d711763..19dd1c02b1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,7 +1,7 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html - root "works#index", as:'home' + root "works#index", as:'welcome' resources :welcome,:works,:users post 'works/:id/vote', to: 'works#vote', as:'vote' From 9dc7f918c4a0ff5abc39f32f39787c9538e4f77b Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 22:23:45 -0700 Subject: [PATCH 18/38] changed root, deployment debugging --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 19dd1c02b1..9cae5c97ac 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,7 +1,7 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html - root "works#index", as:'welcome' + root "welcome#index", as:'welcome' resources :welcome,:works,:users post 'works/:id/vote', to: 'works#vote', as:'vote' From 40bffaeefd0d39668a2325c0b66bde76ea7eecb4 Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Wed, 12 Apr 2017 22:25:52 -0700 Subject: [PATCH 19/38] changed root, deployment debugging --- config/routes.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 9cae5c97ac..73fee6998a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,7 +2,9 @@ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html root "welcome#index", as:'welcome' - resources :welcome,:works,:users + resources :welcome + resources :works + resources :users post 'works/:id/vote', to: 'works#vote', as:'vote' From 6799255d10c14027c5016a0d82dc0b83820d74b3 Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Thu, 13 Apr 2017 09:01:57 -0700 Subject: [PATCH 20/38] cleaning up routes for heroku debugging --- app/views/works/edit.html.erb | 1 + config/routes.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/works/edit.html.erb b/app/views/works/edit.html.erb index 3e78f045b9..75d600ce04 100644 --- a/app/views/works/edit.html.erb +++ b/app/views/works/edit.html.erb @@ -2,6 +2,7 @@ <%=f.label :title%> <%=f.text_field :title%> + <%=f.label :created_by%> <%=f.text_field :created_by%> diff --git a/config/routes.rb b/config/routes.rb index 73fee6998a..828be61116 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,7 +4,7 @@ root "welcome#index", as:'welcome' resources :welcome resources :works - resources :users + resources :users post 'works/:id/vote', to: 'works#vote', as:'vote' From 6898eda1ad7657de9f6153bfd6f784e662de16aa Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Thu, 13 Apr 2017 23:50:58 -0700 Subject: [PATCH 21/38] model and controller tests on the works table --- app/assets/stylesheets/application.css | 5 +- config/routes.rb | 4 +- test/controllers/works_controller.rb | 66 ++++++++++++++++++++++---- test/fixtures/users.yml | 2 +- test/fixtures/votes.yml | 2 +- test/models/work_test.rb | 19 ++++++-- 6 files changed, 78 insertions(+), 20 deletions(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index e67fe6211b..4b67ac5ecd 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -13,11 +13,12 @@ *= require_tree . *= require_self */ - +@import url('foundation.css'); header{ border-bottom-width:medium; border-bottom-style: inset; -/*border-bottom-color: grey;*/ +border-bottom-color: grey; +height:90px; } /*Owl image*/ #heading { diff --git a/config/routes.rb b/config/routes.rb index 828be61116..90a49a61bd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,7 +2,9 @@ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html root "welcome#index", as:'welcome' - resources :welcome + resources :welcome #look up how to use "only get" here. Have unnecceary routes + #i think i can just write it the "handroll" way but dont want to risk breaking + #things just yet resources :works resources :users diff --git a/test/controllers/works_controller.rb b/test/controllers/works_controller.rb index 01aa8167f4..ebe2f6b358 100644 --- a/test/controllers/works_controller.rb +++ b/test/controllers/works_controller.rb @@ -1,23 +1,30 @@ require 'test_helper' describe WorksController do + describe "index" do it "lists all the works" do -#must_be is a method with two arguments the symbolized version of what you're -#doing and whatever you expect the value to be + #must_be is a method with two arguments the symbolized version of what you're + #doing and whatever you expect the value to be Work.count.must_be :>, 0 get works_path must_respond_with :success + end + + it "still responds successfully when there are no works" do + Work.destroy_all + get works_path + must_respond_with :success + end end - end - it "still responds successfully when there are no works" do - Work.destroy_all - get works_path - must_respond_with :success - end + + describe "new" do - #you can probably get away with one test "if i send a new request do I get a new item" + it "successfully loads the new work page" do + get new_work_path + must_respond_with :success + end end describe "create" do @@ -26,11 +33,12 @@ work: { title: "test work", created_by: "keith sweat", + category: "album", published: "1998", } } post works_path, params: work_data - must_redirect_to :works_path + must_redirect_to works_path end it "re-renders the new work form if the work is invalid" do @@ -40,6 +48,23 @@ end end + describe "update" do + it "changes a record in the database" do + a = Work.find(1) + work_data = {work: {title: "test work",id: 1}} + patch work_path(a), params: work_data + must_redirect_to work_path(a) + end + + it "redirects to edit work path if invalid" do + a = Work.find(1) + work_data = {work: {title: "",id: 1}} + patch work_path(a), params: work_data + must_redirect_to edit_work_path + + end + end + describe "show" do it "retrieves works that exist" do work = Work.first @@ -58,4 +83,25 @@ end end + describe "destroy" do + it "destorys a record in the database" do + a = Work.last + delete work_path(a) + must_redirect_to works_path + end + end + + describe "vote" do + # I'm worried that the way my method is written, I must pass a session hash + #with user_id value and a params hash with id value for a vote to be created. + + #code below as written in controller: + # works_vote = Vote.create!(user_id: session[:user_id], work_id:params[:id]) + it "creates a vote" do + vote_data = {id: 2} + + post vote_path(:sara), params: vote_data + end + end + end diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index 64c99f687f..c8ed229172 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -1,6 +1,6 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html -one: +sara: username: sara id: 1 diff --git a/test/fixtures/votes.yml b/test/fixtures/votes.yml index ab4d0b5b56..1e22a52568 100644 --- a/test/fixtures/votes.yml +++ b/test/fixtures/votes.yml @@ -14,4 +14,4 @@ two: three: user_id: 2 - work_id: 1 + work_id: 2 diff --git a/test/models/work_test.rb b/test/models/work_test.rb index ba19d23e03..bb409b5a83 100644 --- a/test/models/work_test.rb +++ b/test/models/work_test.rb @@ -3,7 +3,7 @@ describe "validations" do - it "can be created with all attributes" do + it "can be created with all attributes" do a = Work.create!(title: "kissed by a rose", category: "album", created_by: "SEAL", description: "best love song of the 90s", published: "london") result = a.valid? result.must_equal true @@ -54,15 +54,24 @@ end -describe "testing model method" do +describe "testing model methods" do it "can display a single category" do - a = Work.all -#not sure how to write this without writing the controller + books = Work.show_category("book") + books.each{|book| book.category.must_equal "book"} end -end + it "can count and return how many votes a work has accumulated" + a = Work.find(2).user_votes.length + print a + # a.must_equal 2 + #this print "2" and works in the console but the test keeps calling it nil end +end + + + + end From 94f7d7ed48bf36b418a47f4c8612ffb1ce514e8b Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Thu, 13 Apr 2017 23:51:55 -0700 Subject: [PATCH 22/38] changed the controller to reflect things I learned during tests --- app/controllers/works_controller.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index cc717c9a93..1ff11aebb3 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -35,9 +35,11 @@ def create def show @work = Work.find_by(id: params[:id]) - @votes = @work.user_votes + if @work.nil? head :not_found + else + @votes = @work.votes end end @@ -50,12 +52,17 @@ def update work.update_attributes(work_params) work.save - redirect_to work_path(work) + if work.save + redirect_to work_path(work) + else + redirect_to edit_work_path + end + end def destroy work = Work.find(params[:id]) - work.destroy_all + work.destroy redirect_to works_path end From 5f1ff0a27cfe420cf3fefe7ab3aa2d65abba103f Mon Sep 17 00:00:00 2001 From: Tehut Getahun Date: Thu, 13 Apr 2017 23:52:24 -0700 Subject: [PATCH 23/38] added foundation --- .../foundation-6.3.1-complete/css/app.css | 0 .../css/foundation.css | 4398 +++++++ .../css/foundation.min.css | 2 + .../foundation-6.3.1-complete/index.html | 169 + .../foundation-6.3.1-complete/js/app.js | 1 + .../js/vendor/foundation.js | 10207 ++++++++++++++++ .../js/vendor/foundation.min.js | 4 + .../js/vendor/jquery.js | 9814 +++++++++++++++ .../js/vendor/what-input.js | 335 + 9 files changed, 24930 insertions(+) create mode 100644 app/assets/stylesheets/foundation-6.3.1-complete/css/app.css create mode 100644 app/assets/stylesheets/foundation-6.3.1-complete/css/foundation.css create mode 100644 app/assets/stylesheets/foundation-6.3.1-complete/css/foundation.min.css create mode 100644 app/assets/stylesheets/foundation-6.3.1-complete/index.html create mode 100644 app/assets/stylesheets/foundation-6.3.1-complete/js/app.js create mode 100644 app/assets/stylesheets/foundation-6.3.1-complete/js/vendor/foundation.js create mode 100644 app/assets/stylesheets/foundation-6.3.1-complete/js/vendor/foundation.min.js create mode 100644 app/assets/stylesheets/foundation-6.3.1-complete/js/vendor/jquery.js create mode 100644 app/assets/stylesheets/foundation-6.3.1-complete/js/vendor/what-input.js diff --git a/app/assets/stylesheets/foundation-6.3.1-complete/css/app.css b/app/assets/stylesheets/foundation-6.3.1-complete/css/app.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/assets/stylesheets/foundation-6.3.1-complete/css/foundation.css b/app/assets/stylesheets/foundation-6.3.1-complete/css/foundation.css new file mode 100644 index 0000000000..dd9aabd0db --- /dev/null +++ b/app/assets/stylesheets/foundation-6.3.1-complete/css/foundation.css @@ -0,0 +1,4398 @@ +@charset "UTF-8"; +/** + * Foundation for Sites by ZURB + * Version 6.3.1 + * foundation.zurb.com + * Licensed under MIT Open Source + */ +/*! normalize-scss | MIT/GPLv2 License | bit.ly/normalize-scss */ +/* Document + ========================================================================== */ +/** + * 1. Change the default font family in all browsers (opinionated). + * 2. Correct the line height in all browsers. + * 3. Prevent adjustments of font size after orientation changes in + * IE on Windows Phone and in iOS. + */ +html { + font-family: sans-serif; + /* 1 */ + line-height: 1.15; + /* 2 */ + -ms-text-size-adjust: 100%; + /* 3 */ + -webkit-text-size-adjust: 100%; + /* 3 */ } + +/* Sections + ========================================================================== */ +/** + * Remove the margin in all browsers (opinionated). + */ +body { + margin: 0; } + +/** + * Add the correct display in IE 9-. + */ +article, +aside, +footer, +header, +nav, +section { + display: block; } + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ +h1 { + font-size: 2em; + margin: 0.67em 0; } + +/* Grouping content + ========================================================================== */ +/** + * Add the correct display in IE 9-. + */ +figcaption, +figure { + display: block; } + +/** + * Add the correct margin in IE 8. + */ +figure { + margin: 1em 40px; } + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ +hr { + box-sizing: content-box; + /* 1 */ + height: 0; + /* 1 */ + overflow: visible; + /* 2 */ } + +/** + * Add the correct display in IE. + */ +main { + display: block; } + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ +pre { + font-family: monospace, monospace; + /* 1 */ + font-size: 1em; + /* 2 */ } + +/* Links + ========================================================================== */ +/** + * 1. Remove the gray background on active links in IE 10. + * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + */ +a { + background-color: transparent; + /* 1 */ + -webkit-text-decoration-skip: objects; + /* 2 */ } + +/** + * Remove the outline on focused links when they are also active or hovered + * in all browsers (opinionated). + */ +a:active, +a:hover { + outline-width: 0; } + +/* Text-level semantics + ========================================================================== */ +/** + * 1. Remove the bottom border in Firefox 39-. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ +abbr[title] { + border-bottom: none; + /* 1 */ + text-decoration: underline; + /* 2 */ + text-decoration: underline dotted; + /* 2 */ } + +/** + * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + */ +b, +strong { + font-weight: inherit; } + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ +b, +strong { + font-weight: bolder; } + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ +code, +kbd, +samp { + font-family: monospace, monospace; + /* 1 */ + font-size: 1em; + /* 2 */ } + +/** + * Add the correct font style in Android 4.3-. + */ +dfn { + font-style: italic; } + +/** + * Add the correct background and color in IE 9-. + */ +mark { + background-color: #ff0; + color: #000; } + +/** + * Add the correct font size in all browsers. + */ +small { + font-size: 80%; } + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } + +sub { + bottom: -0.25em; } + +sup { + top: -0.5em; } + +/* Embedded content + ========================================================================== */ +/** + * Add the correct display in IE 9-. + */ +audio, +video { + display: inline-block; } + +/** + * Add the correct display in iOS 4-7. + */ +audio:not([controls]) { + display: none; + height: 0; } + +/** + * Remove the border on images inside links in IE 10-. + */ +img { + border-style: none; } + +/** + * Hide the overflow in IE. + */ +svg:not(:root) { + overflow: hidden; } + +/* Forms + ========================================================================== */ +/** + * 1. Change the font styles in all browsers (opinionated). + * 2. Remove the margin in Firefox and Safari. + */ +button, +input, +optgroup, +select, +textarea { + font-family: sans-serif; + /* 1 */ + font-size: 100%; + /* 1 */ + line-height: 1.15; + /* 1 */ + margin: 0; + /* 2 */ } + +/** + * Show the overflow in IE. + */ +button { + overflow: visible; } + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ +button, +select { + /* 1 */ + text-transform: none; } + +/** + * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` + * controls in Android 4. + * 2. Correct the inability to style clickable types in iOS and Safari. + */ +button, +html [type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; + /* 2 */ } + +button, +[type="button"], +[type="reset"], +[type="submit"] { + /** + * Remove the inner border and padding in Firefox. + */ + /** + * Restore the focus styles unset by the previous rule. + */ } + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; } + button:-moz-focusring, + [type="button"]:-moz-focusring, + [type="reset"]:-moz-focusring, + [type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; } + +/** + * Show the overflow in Edge. + */ +input { + overflow: visible; } + +/** + * 1. Add the correct box sizing in IE 10-. + * 2. Remove the padding in IE 10-. + */ +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ } + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; } + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ +[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + outline-offset: -2px; + /* 2 */ + /** + * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + */ } + [type="search"]::-webkit-search-cancel-button, [type="search"]::-webkit-search-decoration { + -webkit-appearance: none; } + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ +::-webkit-file-upload-button { + -webkit-appearance: button; + /* 1 */ + font: inherit; + /* 2 */ } + +/** + * Change the border, margin, and padding in all browsers (opinionated). + */ +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; } + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ +legend { + box-sizing: border-box; + /* 1 */ + display: table; + /* 1 */ + max-width: 100%; + /* 1 */ + padding: 0; + /* 3 */ + color: inherit; + /* 2 */ + white-space: normal; + /* 1 */ } + +/** + * 1. Add the correct display in IE 9-. + * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ +progress { + display: inline-block; + /* 1 */ + vertical-align: baseline; + /* 2 */ } + +/** + * Remove the default vertical scrollbar in IE. + */ +textarea { + overflow: auto; } + +/* Interactive + ========================================================================== */ +/* + * Add the correct display in Edge, IE, and Firefox. + */ +details { + display: block; } + +/* + * Add the correct display in all browsers. + */ +summary { + display: list-item; } + +/* + * Add the correct display in IE 9-. + */ +menu { + display: block; } + +/* Scripting + ========================================================================== */ +/** + * Add the correct display in IE 9-. + */ +canvas { + display: inline-block; } + +/** + * Add the correct display in IE. + */ +template { + display: none; } + +/* Hidden + ========================================================================== */ +/** + * Add the correct display in IE 10-. + */ +[hidden] { + display: none; } + +.foundation-mq { + font-family: "small=0em&medium=40em&large=64em&xlarge=75em&xxlarge=90em"; } + +html { + box-sizing: border-box; + font-size: 100%; } + +*, +*::before, +*::after { + box-sizing: inherit; } + +body { + margin: 0; + padding: 0; + background: #fefefe; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + font-weight: normal; + line-height: 1.5; + color: #0a0a0a; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } + +img { + display: inline-block; + vertical-align: middle; + max-width: 100%; + height: auto; + -ms-interpolation-mode: bicubic; } + +textarea { + height: auto; + min-height: 50px; + border-radius: 0; } + +select { + box-sizing: border-box; + width: 100%; + border-radius: 0; } + +.map_canvas img, +.map_canvas embed, +.map_canvas object, +.mqa-display img, +.mqa-display embed, +.mqa-display object { + max-width: none !important; } + +button { + padding: 0; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border: 0; + border-radius: 0; + background: transparent; + line-height: 1; } + [data-whatinput='mouse'] button { + outline: 0; } + +pre { + overflow: auto; } + +.is-visible { + display: block !important; } + +.is-hidden { + display: none !important; } + +.row { + max-width: 75rem; + margin-right: auto; + margin-left: auto; } + .row::before, .row::after { + display: table; + content: ' '; } + .row::after { + clear: both; } + .row.collapse > .column, .row.collapse > .columns { + padding-right: 0; + padding-left: 0; } + .row .row { + margin-right: -0.625rem; + margin-left: -0.625rem; } + @media print, screen and (min-width: 40em) { + .row .row { + margin-right: -0.9375rem; + margin-left: -0.9375rem; } } + @media print, screen and (min-width: 64em) { + .row .row { + margin-right: -0.9375rem; + margin-left: -0.9375rem; } } + .row .row.collapse { + margin-right: 0; + margin-left: 0; } + .row.expanded { + max-width: none; } + .row.expanded .row { + margin-right: auto; + margin-left: auto; } + .row:not(.expanded) .row { + max-width: none; } + .row.gutter-small > .column, .row.gutter-small > .columns { + padding-right: 0.625rem; + padding-left: 0.625rem; } + .row.gutter-medium > .column, .row.gutter-medium > .columns { + padding-right: 0.9375rem; + padding-left: 0.9375rem; } + +.column, .columns { + width: 100%; + float: left; + padding-right: 0.625rem; + padding-left: 0.625rem; } + @media print, screen and (min-width: 40em) { + .column, .columns { + padding-right: 0.9375rem; + padding-left: 0.9375rem; } } + .column:last-child:not(:first-child), .columns:last-child:not(:first-child) { + float: right; } + .column.end:last-child:last-child, .end.columns:last-child:last-child { + float: left; } + +.column.row.row, .row.row.columns { + float: none; } + +.row .column.row.row, .row .row.row.columns { + margin-right: 0; + margin-left: 0; + padding-right: 0; + padding-left: 0; } + +.small-1 { + width: 8.33333%; } + +.small-push-1 { + position: relative; + left: 8.33333%; } + +.small-pull-1 { + position: relative; + left: -8.33333%; } + +.small-offset-0 { + margin-left: 0%; } + +.small-2 { + width: 16.66667%; } + +.small-push-2 { + position: relative; + left: 16.66667%; } + +.small-pull-2 { + position: relative; + left: -16.66667%; } + +.small-offset-1 { + margin-left: 8.33333%; } + +.small-3 { + width: 25%; } + +.small-push-3 { + position: relative; + left: 25%; } + +.small-pull-3 { + position: relative; + left: -25%; } + +.small-offset-2 { + margin-left: 16.66667%; } + +.small-4 { + width: 33.33333%; } + +.small-push-4 { + position: relative; + left: 33.33333%; } + +.small-pull-4 { + position: relative; + left: -33.33333%; } + +.small-offset-3 { + margin-left: 25%; } + +.small-5 { + width: 41.66667%; } + +.small-push-5 { + position: relative; + left: 41.66667%; } + +.small-pull-5 { + position: relative; + left: -41.66667%; } + +.small-offset-4 { + margin-left: 33.33333%; } + +.small-6 { + width: 50%; } + +.small-push-6 { + position: relative; + left: 50%; } + +.small-pull-6 { + position: relative; + left: -50%; } + +.small-offset-5 { + margin-left: 41.66667%; } + +.small-7 { + width: 58.33333%; } + +.small-push-7 { + position: relative; + left: 58.33333%; } + +.small-pull-7 { + position: relative; + left: -58.33333%; } + +.small-offset-6 { + margin-left: 50%; } + +.small-8 { + width: 66.66667%; } + +.small-push-8 { + position: relative; + left: 66.66667%; } + +.small-pull-8 { + position: relative; + left: -66.66667%; } + +.small-offset-7 { + margin-left: 58.33333%; } + +.small-9 { + width: 75%; } + +.small-push-9 { + position: relative; + left: 75%; } + +.small-pull-9 { + position: relative; + left: -75%; } + +.small-offset-8 { + margin-left: 66.66667%; } + +.small-10 { + width: 83.33333%; } + +.small-push-10 { + position: relative; + left: 83.33333%; } + +.small-pull-10 { + position: relative; + left: -83.33333%; } + +.small-offset-9 { + margin-left: 75%; } + +.small-11 { + width: 91.66667%; } + +.small-push-11 { + position: relative; + left: 91.66667%; } + +.small-pull-11 { + position: relative; + left: -91.66667%; } + +.small-offset-10 { + margin-left: 83.33333%; } + +.small-12 { + width: 100%; } + +.small-offset-11 { + margin-left: 91.66667%; } + +.small-up-1 > .column, .small-up-1 > .columns { + float: left; + width: 100%; } + .small-up-1 > .column:nth-of-type(1n), .small-up-1 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-1 > .column:nth-of-type(1n+1), .small-up-1 > .columns:nth-of-type(1n+1) { + clear: both; } + .small-up-1 > .column:last-child, .small-up-1 > .columns:last-child { + float: left; } + +.small-up-2 > .column, .small-up-2 > .columns { + float: left; + width: 50%; } + .small-up-2 > .column:nth-of-type(1n), .small-up-2 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-2 > .column:nth-of-type(2n+1), .small-up-2 > .columns:nth-of-type(2n+1) { + clear: both; } + .small-up-2 > .column:last-child, .small-up-2 > .columns:last-child { + float: left; } + +.small-up-3 > .column, .small-up-3 > .columns { + float: left; + width: 33.33333%; } + .small-up-3 > .column:nth-of-type(1n), .small-up-3 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-3 > .column:nth-of-type(3n+1), .small-up-3 > .columns:nth-of-type(3n+1) { + clear: both; } + .small-up-3 > .column:last-child, .small-up-3 > .columns:last-child { + float: left; } + +.small-up-4 > .column, .small-up-4 > .columns { + float: left; + width: 25%; } + .small-up-4 > .column:nth-of-type(1n), .small-up-4 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-4 > .column:nth-of-type(4n+1), .small-up-4 > .columns:nth-of-type(4n+1) { + clear: both; } + .small-up-4 > .column:last-child, .small-up-4 > .columns:last-child { + float: left; } + +.small-up-5 > .column, .small-up-5 > .columns { + float: left; + width: 20%; } + .small-up-5 > .column:nth-of-type(1n), .small-up-5 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-5 > .column:nth-of-type(5n+1), .small-up-5 > .columns:nth-of-type(5n+1) { + clear: both; } + .small-up-5 > .column:last-child, .small-up-5 > .columns:last-child { + float: left; } + +.small-up-6 > .column, .small-up-6 > .columns { + float: left; + width: 16.66667%; } + .small-up-6 > .column:nth-of-type(1n), .small-up-6 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-6 > .column:nth-of-type(6n+1), .small-up-6 > .columns:nth-of-type(6n+1) { + clear: both; } + .small-up-6 > .column:last-child, .small-up-6 > .columns:last-child { + float: left; } + +.small-up-7 > .column, .small-up-7 > .columns { + float: left; + width: 14.28571%; } + .small-up-7 > .column:nth-of-type(1n), .small-up-7 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-7 > .column:nth-of-type(7n+1), .small-up-7 > .columns:nth-of-type(7n+1) { + clear: both; } + .small-up-7 > .column:last-child, .small-up-7 > .columns:last-child { + float: left; } + +.small-up-8 > .column, .small-up-8 > .columns { + float: left; + width: 12.5%; } + .small-up-8 > .column:nth-of-type(1n), .small-up-8 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-8 > .column:nth-of-type(8n+1), .small-up-8 > .columns:nth-of-type(8n+1) { + clear: both; } + .small-up-8 > .column:last-child, .small-up-8 > .columns:last-child { + float: left; } + +.small-collapse > .column, .small-collapse > .columns { + padding-right: 0; + padding-left: 0; } + +.small-collapse .row { + margin-right: 0; + margin-left: 0; } + +.expanded.row .small-collapse.row { + margin-right: 0; + margin-left: 0; } + +.small-uncollapse > .column, .small-uncollapse > .columns { + padding-right: 0.625rem; + padding-left: 0.625rem; } + +.small-centered { + margin-right: auto; + margin-left: auto; } + .small-centered, .small-centered:last-child:not(:first-child) { + float: none; + clear: both; } + +.small-uncentered, +.small-push-0, +.small-pull-0 { + position: static; + float: left; + margin-right: 0; + margin-left: 0; } + +@media print, screen and (min-width: 40em) { + .medium-1 { + width: 8.33333%; } + .medium-push-1 { + position: relative; + left: 8.33333%; } + .medium-pull-1 { + position: relative; + left: -8.33333%; } + .medium-offset-0 { + margin-left: 0%; } + .medium-2 { + width: 16.66667%; } + .medium-push-2 { + position: relative; + left: 16.66667%; } + .medium-pull-2 { + position: relative; + left: -16.66667%; } + .medium-offset-1 { + margin-left: 8.33333%; } + .medium-3 { + width: 25%; } + .medium-push-3 { + position: relative; + left: 25%; } + .medium-pull-3 { + position: relative; + left: -25%; } + .medium-offset-2 { + margin-left: 16.66667%; } + .medium-4 { + width: 33.33333%; } + .medium-push-4 { + position: relative; + left: 33.33333%; } + .medium-pull-4 { + position: relative; + left: -33.33333%; } + .medium-offset-3 { + margin-left: 25%; } + .medium-5 { + width: 41.66667%; } + .medium-push-5 { + position: relative; + left: 41.66667%; } + .medium-pull-5 { + position: relative; + left: -41.66667%; } + .medium-offset-4 { + margin-left: 33.33333%; } + .medium-6 { + width: 50%; } + .medium-push-6 { + position: relative; + left: 50%; } + .medium-pull-6 { + position: relative; + left: -50%; } + .medium-offset-5 { + margin-left: 41.66667%; } + .medium-7 { + width: 58.33333%; } + .medium-push-7 { + position: relative; + left: 58.33333%; } + .medium-pull-7 { + position: relative; + left: -58.33333%; } + .medium-offset-6 { + margin-left: 50%; } + .medium-8 { + width: 66.66667%; } + .medium-push-8 { + position: relative; + left: 66.66667%; } + .medium-pull-8 { + position: relative; + left: -66.66667%; } + .medium-offset-7 { + margin-left: 58.33333%; } + .medium-9 { + width: 75%; } + .medium-push-9 { + position: relative; + left: 75%; } + .medium-pull-9 { + position: relative; + left: -75%; } + .medium-offset-8 { + margin-left: 66.66667%; } + .medium-10 { + width: 83.33333%; } + .medium-push-10 { + position: relative; + left: 83.33333%; } + .medium-pull-10 { + position: relative; + left: -83.33333%; } + .medium-offset-9 { + margin-left: 75%; } + .medium-11 { + width: 91.66667%; } + .medium-push-11 { + position: relative; + left: 91.66667%; } + .medium-pull-11 { + position: relative; + left: -91.66667%; } + .medium-offset-10 { + margin-left: 83.33333%; } + .medium-12 { + width: 100%; } + .medium-offset-11 { + margin-left: 91.66667%; } + .medium-up-1 > .column, .medium-up-1 > .columns { + float: left; + width: 100%; } + .medium-up-1 > .column:nth-of-type(1n), .medium-up-1 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-1 > .column:nth-of-type(1n+1), .medium-up-1 > .columns:nth-of-type(1n+1) { + clear: both; } + .medium-up-1 > .column:last-child, .medium-up-1 > .columns:last-child { + float: left; } + .medium-up-2 > .column, .medium-up-2 > .columns { + float: left; + width: 50%; } + .medium-up-2 > .column:nth-of-type(1n), .medium-up-2 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-2 > .column:nth-of-type(2n+1), .medium-up-2 > .columns:nth-of-type(2n+1) { + clear: both; } + .medium-up-2 > .column:last-child, .medium-up-2 > .columns:last-child { + float: left; } + .medium-up-3 > .column, .medium-up-3 > .columns { + float: left; + width: 33.33333%; } + .medium-up-3 > .column:nth-of-type(1n), .medium-up-3 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-3 > .column:nth-of-type(3n+1), .medium-up-3 > .columns:nth-of-type(3n+1) { + clear: both; } + .medium-up-3 > .column:last-child, .medium-up-3 > .columns:last-child { + float: left; } + .medium-up-4 > .column, .medium-up-4 > .columns { + float: left; + width: 25%; } + .medium-up-4 > .column:nth-of-type(1n), .medium-up-4 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-4 > .column:nth-of-type(4n+1), .medium-up-4 > .columns:nth-of-type(4n+1) { + clear: both; } + .medium-up-4 > .column:last-child, .medium-up-4 > .columns:last-child { + float: left; } + .medium-up-5 > .column, .medium-up-5 > .columns { + float: left; + width: 20%; } + .medium-up-5 > .column:nth-of-type(1n), .medium-up-5 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-5 > .column:nth-of-type(5n+1), .medium-up-5 > .columns:nth-of-type(5n+1) { + clear: both; } + .medium-up-5 > .column:last-child, .medium-up-5 > .columns:last-child { + float: left; } + .medium-up-6 > .column, .medium-up-6 > .columns { + float: left; + width: 16.66667%; } + .medium-up-6 > .column:nth-of-type(1n), .medium-up-6 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-6 > .column:nth-of-type(6n+1), .medium-up-6 > .columns:nth-of-type(6n+1) { + clear: both; } + .medium-up-6 > .column:last-child, .medium-up-6 > .columns:last-child { + float: left; } + .medium-up-7 > .column, .medium-up-7 > .columns { + float: left; + width: 14.28571%; } + .medium-up-7 > .column:nth-of-type(1n), .medium-up-7 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-7 > .column:nth-of-type(7n+1), .medium-up-7 > .columns:nth-of-type(7n+1) { + clear: both; } + .medium-up-7 > .column:last-child, .medium-up-7 > .columns:last-child { + float: left; } + .medium-up-8 > .column, .medium-up-8 > .columns { + float: left; + width: 12.5%; } + .medium-up-8 > .column:nth-of-type(1n), .medium-up-8 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-8 > .column:nth-of-type(8n+1), .medium-up-8 > .columns:nth-of-type(8n+1) { + clear: both; } + .medium-up-8 > .column:last-child, .medium-up-8 > .columns:last-child { + float: left; } + .medium-collapse > .column, .medium-collapse > .columns { + padding-right: 0; + padding-left: 0; } + .medium-collapse .row { + margin-right: 0; + margin-left: 0; } + .expanded.row .medium-collapse.row { + margin-right: 0; + margin-left: 0; } + .medium-uncollapse > .column, .medium-uncollapse > .columns { + padding-right: 0.9375rem; + padding-left: 0.9375rem; } + .medium-centered { + margin-right: auto; + margin-left: auto; } + .medium-centered, .medium-centered:last-child:not(:first-child) { + float: none; + clear: both; } + .medium-uncentered, + .medium-push-0, + .medium-pull-0 { + position: static; + float: left; + margin-right: 0; + margin-left: 0; } } + +@media print, screen and (min-width: 64em) { + .large-1 { + width: 8.33333%; } + .large-push-1 { + position: relative; + left: 8.33333%; } + .large-pull-1 { + position: relative; + left: -8.33333%; } + .large-offset-0 { + margin-left: 0%; } + .large-2 { + width: 16.66667%; } + .large-push-2 { + position: relative; + left: 16.66667%; } + .large-pull-2 { + position: relative; + left: -16.66667%; } + .large-offset-1 { + margin-left: 8.33333%; } + .large-3 { + width: 25%; } + .large-push-3 { + position: relative; + left: 25%; } + .large-pull-3 { + position: relative; + left: -25%; } + .large-offset-2 { + margin-left: 16.66667%; } + .large-4 { + width: 33.33333%; } + .large-push-4 { + position: relative; + left: 33.33333%; } + .large-pull-4 { + position: relative; + left: -33.33333%; } + .large-offset-3 { + margin-left: 25%; } + .large-5 { + width: 41.66667%; } + .large-push-5 { + position: relative; + left: 41.66667%; } + .large-pull-5 { + position: relative; + left: -41.66667%; } + .large-offset-4 { + margin-left: 33.33333%; } + .large-6 { + width: 50%; } + .large-push-6 { + position: relative; + left: 50%; } + .large-pull-6 { + position: relative; + left: -50%; } + .large-offset-5 { + margin-left: 41.66667%; } + .large-7 { + width: 58.33333%; } + .large-push-7 { + position: relative; + left: 58.33333%; } + .large-pull-7 { + position: relative; + left: -58.33333%; } + .large-offset-6 { + margin-left: 50%; } + .large-8 { + width: 66.66667%; } + .large-push-8 { + position: relative; + left: 66.66667%; } + .large-pull-8 { + position: relative; + left: -66.66667%; } + .large-offset-7 { + margin-left: 58.33333%; } + .large-9 { + width: 75%; } + .large-push-9 { + position: relative; + left: 75%; } + .large-pull-9 { + position: relative; + left: -75%; } + .large-offset-8 { + margin-left: 66.66667%; } + .large-10 { + width: 83.33333%; } + .large-push-10 { + position: relative; + left: 83.33333%; } + .large-pull-10 { + position: relative; + left: -83.33333%; } + .large-offset-9 { + margin-left: 75%; } + .large-11 { + width: 91.66667%; } + .large-push-11 { + position: relative; + left: 91.66667%; } + .large-pull-11 { + position: relative; + left: -91.66667%; } + .large-offset-10 { + margin-left: 83.33333%; } + .large-12 { + width: 100%; } + .large-offset-11 { + margin-left: 91.66667%; } + .large-up-1 > .column, .large-up-1 > .columns { + float: left; + width: 100%; } + .large-up-1 > .column:nth-of-type(1n), .large-up-1 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-1 > .column:nth-of-type(1n+1), .large-up-1 > .columns:nth-of-type(1n+1) { + clear: both; } + .large-up-1 > .column:last-child, .large-up-1 > .columns:last-child { + float: left; } + .large-up-2 > .column, .large-up-2 > .columns { + float: left; + width: 50%; } + .large-up-2 > .column:nth-of-type(1n), .large-up-2 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-2 > .column:nth-of-type(2n+1), .large-up-2 > .columns:nth-of-type(2n+1) { + clear: both; } + .large-up-2 > .column:last-child, .large-up-2 > .columns:last-child { + float: left; } + .large-up-3 > .column, .large-up-3 > .columns { + float: left; + width: 33.33333%; } + .large-up-3 > .column:nth-of-type(1n), .large-up-3 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-3 > .column:nth-of-type(3n+1), .large-up-3 > .columns:nth-of-type(3n+1) { + clear: both; } + .large-up-3 > .column:last-child, .large-up-3 > .columns:last-child { + float: left; } + .large-up-4 > .column, .large-up-4 > .columns { + float: left; + width: 25%; } + .large-up-4 > .column:nth-of-type(1n), .large-up-4 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-4 > .column:nth-of-type(4n+1), .large-up-4 > .columns:nth-of-type(4n+1) { + clear: both; } + .large-up-4 > .column:last-child, .large-up-4 > .columns:last-child { + float: left; } + .large-up-5 > .column, .large-up-5 > .columns { + float: left; + width: 20%; } + .large-up-5 > .column:nth-of-type(1n), .large-up-5 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-5 > .column:nth-of-type(5n+1), .large-up-5 > .columns:nth-of-type(5n+1) { + clear: both; } + .large-up-5 > .column:last-child, .large-up-5 > .columns:last-child { + float: left; } + .large-up-6 > .column, .large-up-6 > .columns { + float: left; + width: 16.66667%; } + .large-up-6 > .column:nth-of-type(1n), .large-up-6 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-6 > .column:nth-of-type(6n+1), .large-up-6 > .columns:nth-of-type(6n+1) { + clear: both; } + .large-up-6 > .column:last-child, .large-up-6 > .columns:last-child { + float: left; } + .large-up-7 > .column, .large-up-7 > .columns { + float: left; + width: 14.28571%; } + .large-up-7 > .column:nth-of-type(1n), .large-up-7 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-7 > .column:nth-of-type(7n+1), .large-up-7 > .columns:nth-of-type(7n+1) { + clear: both; } + .large-up-7 > .column:last-child, .large-up-7 > .columns:last-child { + float: left; } + .large-up-8 > .column, .large-up-8 > .columns { + float: left; + width: 12.5%; } + .large-up-8 > .column:nth-of-type(1n), .large-up-8 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-8 > .column:nth-of-type(8n+1), .large-up-8 > .columns:nth-of-type(8n+1) { + clear: both; } + .large-up-8 > .column:last-child, .large-up-8 > .columns:last-child { + float: left; } + .large-collapse > .column, .large-collapse > .columns { + padding-right: 0; + padding-left: 0; } + .large-collapse .row { + margin-right: 0; + margin-left: 0; } + .expanded.row .large-collapse.row { + margin-right: 0; + margin-left: 0; } + .large-uncollapse > .column, .large-uncollapse > .columns { + padding-right: 0.9375rem; + padding-left: 0.9375rem; } + .large-centered { + margin-right: auto; + margin-left: auto; } + .large-centered, .large-centered:last-child:not(:first-child) { + float: none; + clear: both; } + .large-uncentered, + .large-push-0, + .large-pull-0 { + position: static; + float: left; + margin-right: 0; + margin-left: 0; } } + +.column-block { + margin-bottom: 1.25rem; } + .column-block > :last-child { + margin-bottom: 0; } + @media print, screen and (min-width: 40em) { + .column-block { + margin-bottom: 1.875rem; } + .column-block > :last-child { + margin-bottom: 0; } } + +div, +dl, +dt, +dd, +ul, +ol, +li, +h1, +h2, +h3, +h4, +h5, +h6, +pre, +form, +p, +blockquote, +th, +td { + margin: 0; + padding: 0; } + +p { + margin-bottom: 1rem; + font-size: inherit; + line-height: 1.6; + text-rendering: optimizeLegibility; } + +em, +i { + font-style: italic; + line-height: inherit; } + +strong, +b { + font-weight: bold; + line-height: inherit; } + +small { + font-size: 80%; + line-height: inherit; } + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + font-style: normal; + font-weight: normal; + color: inherit; + text-rendering: optimizeLegibility; } + h1 small, + h2 small, + h3 small, + h4 small, + h5 small, + h6 small { + line-height: 0; + color: #cacaca; } + +h1 { + font-size: 1.5rem; + line-height: 1.4; + margin-top: 0; + margin-bottom: 0.5rem; } + +h2 { + font-size: 1.25rem; + line-height: 1.4; + margin-top: 0; + margin-bottom: 0.5rem; } + +h3 { + font-size: 1.1875rem; + line-height: 1.4; + margin-top: 0; + margin-bottom: 0.5rem; } + +h4 { + font-size: 1.125rem; + line-height: 1.4; + margin-top: 0; + margin-bottom: 0.5rem; } + +h5 { + font-size: 1.0625rem; + line-height: 1.4; + margin-top: 0; + margin-bottom: 0.5rem; } + +h6 { + font-size: 1rem; + line-height: 1.4; + margin-top: 0; + margin-bottom: 0.5rem; } + +@media print, screen and (min-width: 40em) { + h1 { + font-size: 3rem; } + h2 { + font-size: 2.5rem; } + h3 { + font-size: 1.9375rem; } + h4 { + font-size: 1.5625rem; } + h5 { + font-size: 1.25rem; } + h6 { + font-size: 1rem; } } + +a { + line-height: inherit; + color: #1779ba; + text-decoration: none; + cursor: pointer; } + a:hover, a:focus { + color: #1468a0; } + a img { + border: 0; } + +hr { + clear: both; + max-width: 75rem; + height: 0; + margin: 1.25rem auto; + border-top: 0; + border-right: 0; + border-bottom: 1px solid #cacaca; + border-left: 0; } + +ul, +ol, +dl { + margin-bottom: 1rem; + list-style-position: outside; + line-height: 1.6; } + +li { + font-size: inherit; } + +ul { + margin-left: 1.25rem; + list-style-type: disc; } + +ol { + margin-left: 1.25rem; } + +ul ul, ol ul, ul ol, ol ol { + margin-left: 1.25rem; + margin-bottom: 0; } + +dl { + margin-bottom: 1rem; } + dl dt { + margin-bottom: 0.3rem; + font-weight: bold; } + +blockquote { + margin: 0 0 1rem; + padding: 0.5625rem 1.25rem 0 1.1875rem; + border-left: 1px solid #cacaca; } + blockquote, blockquote p { + line-height: 1.6; + color: #8a8a8a; } + +cite { + display: block; + font-size: 0.8125rem; + color: #8a8a8a; } + cite:before { + content: "— "; } + +abbr { + border-bottom: 1px dotted #0a0a0a; + color: #0a0a0a; + cursor: help; } + +figure { + margin: 0; } + +code { + padding: 0.125rem 0.3125rem 0.0625rem; + border: 1px solid #cacaca; + background-color: #e6e6e6; + font-family: Consolas, "Liberation Mono", Courier, monospace; + font-weight: normal; + color: #0a0a0a; } + +kbd { + margin: 0; + padding: 0.125rem 0.25rem 0; + background-color: #e6e6e6; + font-family: Consolas, "Liberation Mono", Courier, monospace; + color: #0a0a0a; } + +.subheader { + margin-top: 0.2rem; + margin-bottom: 0.5rem; + font-weight: normal; + line-height: 1.4; + color: #8a8a8a; } + +.lead { + font-size: 125%; + line-height: 1.6; } + +.stat { + font-size: 2.5rem; + line-height: 1; } + p + .stat { + margin-top: -1rem; } + +.no-bullet { + margin-left: 0; + list-style: none; } + +.text-left { + text-align: left; } + +.text-right { + text-align: right; } + +.text-center { + text-align: center; } + +.text-justify { + text-align: justify; } + +@media print, screen and (min-width: 40em) { + .medium-text-left { + text-align: left; } + .medium-text-right { + text-align: right; } + .medium-text-center { + text-align: center; } + .medium-text-justify { + text-align: justify; } } + +@media print, screen and (min-width: 64em) { + .large-text-left { + text-align: left; } + .large-text-right { + text-align: right; } + .large-text-center { + text-align: center; } + .large-text-justify { + text-align: justify; } } + +.show-for-print { + display: none !important; } + +@media print { + * { + background: transparent !important; + box-shadow: none !important; + color: black !important; + text-shadow: none !important; } + .show-for-print { + display: block !important; } + .hide-for-print { + display: none !important; } + table.show-for-print { + display: table !important; } + thead.show-for-print { + display: table-header-group !important; } + tbody.show-for-print { + display: table-row-group !important; } + tr.show-for-print { + display: table-row !important; } + td.show-for-print { + display: table-cell !important; } + th.show-for-print { + display: table-cell !important; } + a, + a:visited { + text-decoration: underline; } + a[href]:after { + content: " (" attr(href) ")"; } + .ir a:after, + a[href^='javascript:']:after, + a[href^='#']:after { + content: ''; } + abbr[title]:after { + content: " (" attr(title) ")"; } + pre, + blockquote { + border: 1px solid #8a8a8a; + page-break-inside: avoid; } + thead { + display: table-header-group; } + tr, + img { + page-break-inside: avoid; } + img { + max-width: 100% !important; } + @page { + margin: 0.5cm; } + p, + h2, + h3 { + orphans: 3; + widows: 3; } + h2, + h3 { + page-break-after: avoid; } } + +.button { + display: inline-block; + vertical-align: middle; + margin: 0 0 1rem 0; + padding: 0.85em 1em; + -webkit-appearance: none; + border: 1px solid transparent; + border-radius: 0; + transition: background-color 0.25s ease-out, color 0.25s ease-out; + font-size: 0.9rem; + line-height: 1; + text-align: center; + cursor: pointer; + background-color: #1779ba; + color: #fefefe; } + [data-whatinput='mouse'] .button { + outline: 0; } + .button:hover, .button:focus { + background-color: #14679e; + color: #fefefe; } + .button.tiny { + font-size: 0.6rem; } + .button.small { + font-size: 0.75rem; } + .button.large { + font-size: 1.25rem; } + .button.expanded { + display: block; + width: 100%; + margin-right: 0; + margin-left: 0; } + .button.primary { + background-color: #1779ba; + color: #fefefe; } + .button.primary:hover, .button.primary:focus { + background-color: #126195; + color: #fefefe; } + .button.secondary { + background-color: #767676; + color: #fefefe; } + .button.secondary:hover, .button.secondary:focus { + background-color: #5e5e5e; + color: #fefefe; } + .button.success { + background-color: #3adb76; + color: #0a0a0a; } + .button.success:hover, .button.success:focus { + background-color: #22bb5b; + color: #0a0a0a; } + .button.warning { + background-color: #ffae00; + color: #0a0a0a; } + .button.warning:hover, .button.warning:focus { + background-color: #cc8b00; + color: #0a0a0a; } + .button.alert { + background-color: #cc4b37; + color: #fefefe; } + .button.alert:hover, .button.alert:focus { + background-color: #a53b2a; + color: #fefefe; } + .button.hollow { + border: 1px solid #1779ba; + color: #1779ba; } + .button.hollow, .button.hollow:hover, .button.hollow:focus { + background-color: transparent; } + .button.hollow:hover, .button.hollow:focus { + border-color: #0c3d5d; + color: #0c3d5d; } + .button.hollow.primary { + border: 1px solid #1779ba; + color: #1779ba; } + .button.hollow.primary:hover, .button.hollow.primary:focus { + border-color: #0c3d5d; + color: #0c3d5d; } + .button.hollow.secondary { + border: 1px solid #767676; + color: #767676; } + .button.hollow.secondary:hover, .button.hollow.secondary:focus { + border-color: #3b3b3b; + color: #3b3b3b; } + .button.hollow.success { + border: 1px solid #3adb76; + color: #3adb76; } + .button.hollow.success:hover, .button.hollow.success:focus { + border-color: #157539; + color: #157539; } + .button.hollow.warning { + border: 1px solid #ffae00; + color: #ffae00; } + .button.hollow.warning:hover, .button.hollow.warning:focus { + border-color: #805700; + color: #805700; } + .button.hollow.alert { + border: 1px solid #cc4b37; + color: #cc4b37; } + .button.hollow.alert:hover, .button.hollow.alert:focus { + border-color: #67251a; + color: #67251a; } + .button.disabled, .button[disabled] { + opacity: 0.25; + cursor: not-allowed; } + .button.disabled, .button.disabled:hover, .button.disabled:focus, .button[disabled], .button[disabled]:hover, .button[disabled]:focus { + background-color: #1779ba; + color: #fefefe; } + .button.disabled.primary, .button[disabled].primary { + opacity: 0.25; + cursor: not-allowed; } + .button.disabled.primary, .button.disabled.primary:hover, .button.disabled.primary:focus, .button[disabled].primary, .button[disabled].primary:hover, .button[disabled].primary:focus { + background-color: #1779ba; + color: #fefefe; } + .button.disabled.secondary, .button[disabled].secondary { + opacity: 0.25; + cursor: not-allowed; } + .button.disabled.secondary, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary, .button[disabled].secondary:hover, .button[disabled].secondary:focus { + background-color: #767676; + color: #fefefe; } + .button.disabled.success, .button[disabled].success { + opacity: 0.25; + cursor: not-allowed; } + .button.disabled.success, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success, .button[disabled].success:hover, .button[disabled].success:focus { + background-color: #3adb76; + color: #0a0a0a; } + .button.disabled.warning, .button[disabled].warning { + opacity: 0.25; + cursor: not-allowed; } + .button.disabled.warning, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning, .button[disabled].warning:hover, .button[disabled].warning:focus { + background-color: #ffae00; + color: #0a0a0a; } + .button.disabled.alert, .button[disabled].alert { + opacity: 0.25; + cursor: not-allowed; } + .button.disabled.alert, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert, .button[disabled].alert:hover, .button[disabled].alert:focus { + background-color: #cc4b37; + color: #fefefe; } + .button.dropdown::after { + display: block; + width: 0; + height: 0; + border: inset 0.4em; + content: ''; + border-bottom-width: 0; + border-top-style: solid; + border-color: #fefefe transparent transparent; + position: relative; + top: 0.4em; + display: inline-block; + float: right; + margin-left: 1em; } + .button.arrow-only::after { + top: -0.1em; + float: none; + margin-left: 0; } + +[type='text'], [type='password'], [type='date'], [type='datetime'], [type='datetime-local'], [type='month'], [type='week'], [type='email'], [type='number'], [type='search'], [type='tel'], [type='time'], [type='url'], [type='color'], +textarea { + display: block; + box-sizing: border-box; + width: 100%; + height: 2.4375rem; + margin: 0 0 1rem; + padding: 0.5rem; + border: 1px solid #cacaca; + border-radius: 0; + background-color: #fefefe; + box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1); + font-family: inherit; + font-size: 1rem; + font-weight: normal; + color: #0a0a0a; + transition: box-shadow 0.5s, border-color 0.25s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; } + [type='text']:focus, [type='password']:focus, [type='date']:focus, [type='datetime']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='week']:focus, [type='email']:focus, [type='number']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='url']:focus, [type='color']:focus, + textarea:focus { + outline: none; + border: 1px solid #8a8a8a; + background-color: #fefefe; + box-shadow: 0 0 5px #cacaca; + transition: box-shadow 0.5s, border-color 0.25s ease-in-out; } + +textarea { + max-width: 100%; } + textarea[rows] { + height: auto; } + +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #cacaca; } + +input::-moz-placeholder, +textarea::-moz-placeholder { + color: #cacaca; } + +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #cacaca; } + +input::placeholder, +textarea::placeholder { + color: #cacaca; } + +input:disabled, input[readonly], +textarea:disabled, +textarea[readonly] { + background-color: #e6e6e6; + cursor: not-allowed; } + +[type='submit'], +[type='button'] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0; } + +input[type='search'] { + box-sizing: border-box; } + +[type='file'], +[type='checkbox'], +[type='radio'] { + margin: 0 0 1rem; } + +[type='checkbox'] + label, +[type='radio'] + label { + display: inline-block; + vertical-align: baseline; + margin-left: 0.5rem; + margin-right: 1rem; + margin-bottom: 0; } + [type='checkbox'] + label[for], + [type='radio'] + label[for] { + cursor: pointer; } + +label > [type='checkbox'], +label > [type='radio'] { + margin-right: 0.5rem; } + +[type='file'] { + width: 100%; } + +label { + display: block; + margin: 0; + font-size: 0.875rem; + font-weight: normal; + line-height: 1.8; + color: #0a0a0a; } + label.middle { + margin: 0 0 1rem; + padding: 0.5625rem 0; } + +.help-text { + margin-top: -0.5rem; + font-size: 0.8125rem; + font-style: italic; + color: #0a0a0a; } + +.input-group { + display: table; + width: 100%; + margin-bottom: 1rem; } + .input-group > :first-child { + border-radius: 0 0 0 0; } + .input-group > :last-child > * { + border-radius: 0 0 0 0; } + +.input-group-label, .input-group-field, .input-group-button, .input-group-button a, +.input-group-button input, +.input-group-button button, +.input-group-button label { + margin: 0; + white-space: nowrap; + display: table-cell; + vertical-align: middle; } + +.input-group-label { + padding: 0 1rem; + border: 1px solid #cacaca; + background: #e6e6e6; + color: #0a0a0a; + text-align: center; + white-space: nowrap; + width: 1%; + height: 100%; } + .input-group-label:first-child { + border-right: 0; } + .input-group-label:last-child { + border-left: 0; } + +.input-group-field { + border-radius: 0; + height: 2.5rem; } + +.input-group-button { + padding-top: 0; + padding-bottom: 0; + text-align: center; + width: 1%; + height: 100%; } + .input-group-button a, + .input-group-button input, + .input-group-button button, + .input-group-button label { + height: 2.5rem; + padding-top: 0; + padding-bottom: 0; + font-size: 1rem; } + +.input-group .input-group-button { + display: table-cell; } + +fieldset { + margin: 0; + padding: 0; + border: 0; } + +legend { + max-width: 100%; + margin-bottom: 0.5rem; } + +.fieldset { + margin: 1.125rem 0; + padding: 1.25rem; + border: 1px solid #cacaca; } + .fieldset legend { + margin: 0; + margin-left: -0.1875rem; + padding: 0 0.1875rem; + background: #fefefe; } + +select { + height: 2.4375rem; + margin: 0 0 1rem; + padding: 0.5rem; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border: 1px solid #cacaca; + border-radius: 0; + background-color: #fefefe; + font-family: inherit; + font-size: 1rem; + line-height: normal; + color: #0a0a0a; + background-image: url("data:image/svg+xml;utf8,"); + background-origin: content-box; + background-position: right -1rem center; + background-repeat: no-repeat; + background-size: 9px 6px; + padding-right: 1.5rem; + transition: box-shadow 0.5s, border-color 0.25s ease-in-out; } + @media screen and (min-width: 0\0) { + select { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAYCAYAAACbU/80AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIpJREFUeNrEkckNgDAMBBfRkEt0ObRBBdsGXUDgmQfK4XhH2m8czQAAy27R3tsw4Qfe2x8uOO6oYLb6GlOor3GF+swURAOmUJ+RwtEJs9WvTGEYxBXqI1MQAZhCfUQKRzDMVj+TwrAIV6jvSUEkYAr1LSkcyTBb/V+KYfX7xAeusq3sLDtGH3kEGACPWIflNZfhRQAAAABJRU5ErkJggg=="); } } + select:focus { + outline: none; + border: 1px solid #8a8a8a; + background-color: #fefefe; + box-shadow: 0 0 5px #cacaca; + transition: box-shadow 0.5s, border-color 0.25s ease-in-out; } + select:disabled { + background-color: #e6e6e6; + cursor: not-allowed; } + select::-ms-expand { + display: none; } + select[multiple] { + height: auto; + background-image: none; } + +.is-invalid-input:not(:focus) { + border-color: #cc4b37; + background-color: #f9ecea; } + .is-invalid-input:not(:focus)::-webkit-input-placeholder { + color: #cc4b37; } + .is-invalid-input:not(:focus)::-moz-placeholder { + color: #cc4b37; } + .is-invalid-input:not(:focus):-ms-input-placeholder { + color: #cc4b37; } + .is-invalid-input:not(:focus)::placeholder { + color: #cc4b37; } + +.is-invalid-label { + color: #cc4b37; } + +.form-error { + display: none; + margin-top: -0.5rem; + margin-bottom: 1rem; + font-size: 0.75rem; + font-weight: bold; + color: #cc4b37; } + .form-error.is-visible { + display: block; } + +.accordion { + margin-left: 0; + background: #fefefe; + list-style-type: none; } + +.accordion-item:first-child > :first-child { + border-radius: 0 0 0 0; } + +.accordion-item:last-child > :last-child { + border-radius: 0 0 0 0; } + +.accordion-title { + position: relative; + display: block; + padding: 1.25rem 1rem; + border: 1px solid #e6e6e6; + border-bottom: 0; + font-size: 0.75rem; + line-height: 1; + color: #1779ba; } + :last-child:not(.is-active) > .accordion-title { + border-bottom: 1px solid #e6e6e6; + border-radius: 0 0 0 0; } + .accordion-title:hover, .accordion-title:focus { + background-color: #e6e6e6; } + .accordion-title::before { + position: absolute; + top: 50%; + right: 1rem; + margin-top: -0.5rem; + content: '+'; } + .is-active > .accordion-title::before { + content: '\2013'; } + +.accordion-content { + display: none; + padding: 1rem; + border: 1px solid #e6e6e6; + border-bottom: 0; + background-color: #fefefe; + color: #0a0a0a; } + :last-child > .accordion-content:last-child { + border-bottom: 1px solid #e6e6e6; } + +.is-accordion-submenu-parent > a { + position: relative; } + .is-accordion-submenu-parent > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-bottom-width: 0; + border-top-style: solid; + border-color: #1779ba transparent transparent; + position: absolute; + top: 50%; + margin-top: -3px; + right: 1rem; } + +.is-accordion-submenu-parent[aria-expanded='true'] > a::after { + -ms-transform: rotate(180deg); + transform: rotate(180deg); + -ms-transform-origin: 50% 50%; + transform-origin: 50% 50%; } + +.badge { + display: inline-block; + min-width: 2.1em; + padding: 0.3em; + border-radius: 50%; + font-size: 0.6rem; + text-align: center; + background: #1779ba; + color: #fefefe; } + .badge.primary { + background: #1779ba; + color: #fefefe; } + .badge.secondary { + background: #767676; + color: #fefefe; } + .badge.success { + background: #3adb76; + color: #0a0a0a; } + .badge.warning { + background: #ffae00; + color: #0a0a0a; } + .badge.alert { + background: #cc4b37; + color: #fefefe; } + +.breadcrumbs { + margin: 0 0 1rem 0; + list-style: none; } + .breadcrumbs::before, .breadcrumbs::after { + display: table; + content: ' '; } + .breadcrumbs::after { + clear: both; } + .breadcrumbs li { + float: left; + font-size: 0.6875rem; + color: #0a0a0a; + cursor: default; + text-transform: uppercase; } + .breadcrumbs li:not(:last-child)::after { + position: relative; + top: 1px; + margin: 0 0.75rem; + opacity: 1; + content: "/"; + color: #cacaca; } + .breadcrumbs a { + color: #1779ba; } + .breadcrumbs a:hover { + text-decoration: underline; } + .breadcrumbs .disabled { + color: #cacaca; + cursor: not-allowed; } + +.button-group { + margin-bottom: 1rem; + font-size: 0; } + .button-group::before, .button-group::after { + display: table; + content: ' '; } + .button-group::after { + clear: both; } + .button-group .button { + margin: 0; + margin-right: 1px; + margin-bottom: 1px; + font-size: 0.9rem; } + .button-group .button:last-child { + margin-right: 0; } + .button-group.tiny .button { + font-size: 0.6rem; } + .button-group.small .button { + font-size: 0.75rem; } + .button-group.large .button { + font-size: 1.25rem; } + .button-group.expanded { + margin-right: -1px; } + .button-group.expanded::before, .button-group.expanded::after { + display: none; } + .button-group.expanded .button:first-child:last-child { + width: 100%; } + .button-group.expanded .button:first-child:nth-last-child(2), .button-group.expanded .button:first-child:nth-last-child(2):first-child:nth-last-child(2) ~ .button { + display: inline-block; + width: calc(50% - 1px); + margin-right: 1px; } + .button-group.expanded .button:first-child:nth-last-child(2):last-child, .button-group.expanded .button:first-child:nth-last-child(2):first-child:nth-last-child(2) ~ .button:last-child { + margin-right: -6px; } + .button-group.expanded .button:first-child:nth-last-child(3), .button-group.expanded .button:first-child:nth-last-child(3):first-child:nth-last-child(3) ~ .button { + display: inline-block; + width: calc(33.33333% - 1px); + margin-right: 1px; } + .button-group.expanded .button:first-child:nth-last-child(3):last-child, .button-group.expanded .button:first-child:nth-last-child(3):first-child:nth-last-child(3) ~ .button:last-child { + margin-right: -6px; } + .button-group.expanded .button:first-child:nth-last-child(4), .button-group.expanded .button:first-child:nth-last-child(4):first-child:nth-last-child(4) ~ .button { + display: inline-block; + width: calc(25% - 1px); + margin-right: 1px; } + .button-group.expanded .button:first-child:nth-last-child(4):last-child, .button-group.expanded .button:first-child:nth-last-child(4):first-child:nth-last-child(4) ~ .button:last-child { + margin-right: -6px; } + .button-group.expanded .button:first-child:nth-last-child(5), .button-group.expanded .button:first-child:nth-last-child(5):first-child:nth-last-child(5) ~ .button { + display: inline-block; + width: calc(20% - 1px); + margin-right: 1px; } + .button-group.expanded .button:first-child:nth-last-child(5):last-child, .button-group.expanded .button:first-child:nth-last-child(5):first-child:nth-last-child(5) ~ .button:last-child { + margin-right: -6px; } + .button-group.expanded .button:first-child:nth-last-child(6), .button-group.expanded .button:first-child:nth-last-child(6):first-child:nth-last-child(6) ~ .button { + display: inline-block; + width: calc(16.66667% - 1px); + margin-right: 1px; } + .button-group.expanded .button:first-child:nth-last-child(6):last-child, .button-group.expanded .button:first-child:nth-last-child(6):first-child:nth-last-child(6) ~ .button:last-child { + margin-right: -6px; } + .button-group.primary .button { + background-color: #1779ba; + color: #fefefe; } + .button-group.primary .button:hover, .button-group.primary .button:focus { + background-color: #126195; + color: #fefefe; } + .button-group.secondary .button { + background-color: #767676; + color: #fefefe; } + .button-group.secondary .button:hover, .button-group.secondary .button:focus { + background-color: #5e5e5e; + color: #fefefe; } + .button-group.success .button { + background-color: #3adb76; + color: #0a0a0a; } + .button-group.success .button:hover, .button-group.success .button:focus { + background-color: #22bb5b; + color: #0a0a0a; } + .button-group.warning .button { + background-color: #ffae00; + color: #0a0a0a; } + .button-group.warning .button:hover, .button-group.warning .button:focus { + background-color: #cc8b00; + color: #0a0a0a; } + .button-group.alert .button { + background-color: #cc4b37; + color: #fefefe; } + .button-group.alert .button:hover, .button-group.alert .button:focus { + background-color: #a53b2a; + color: #fefefe; } + .button-group.stacked .button, .button-group.stacked-for-small .button, .button-group.stacked-for-medium .button { + width: 100%; } + .button-group.stacked .button:last-child, .button-group.stacked-for-small .button:last-child, .button-group.stacked-for-medium .button:last-child { + margin-bottom: 0; } + @media print, screen and (min-width: 40em) { + .button-group.stacked-for-small .button { + width: auto; + margin-bottom: 0; } } + @media print, screen and (min-width: 64em) { + .button-group.stacked-for-medium .button { + width: auto; + margin-bottom: 0; } } + @media screen and (max-width: 39.9375em) { + .button-group.stacked-for-small.expanded { + display: block; } + .button-group.stacked-for-small.expanded .button { + display: block; + margin-right: 0; } } + +.card { + margin-bottom: 1rem; + border: 1px solid #e6e6e6; + border-radius: 0; + background: #fefefe; + box-shadow: none; + overflow: hidden; + color: #0a0a0a; } + .card > :last-child { + margin-bottom: 0; } + +.card-divider { + padding: 1rem; + background: #e6e6e6; } + .card-divider > :last-child { + margin-bottom: 0; } + +.card-section { + padding: 1rem; } + .card-section > :last-child { + margin-bottom: 0; } + +.callout { + position: relative; + margin: 0 0 1rem 0; + padding: 1rem; + border: 1px solid rgba(10, 10, 10, 0.25); + border-radius: 0; + background-color: white; + color: #0a0a0a; } + .callout > :first-child { + margin-top: 0; } + .callout > :last-child { + margin-bottom: 0; } + .callout.primary { + background-color: #d7ecfa; + color: #0a0a0a; } + .callout.secondary { + background-color: #eaeaea; + color: #0a0a0a; } + .callout.success { + background-color: #e1faea; + color: #0a0a0a; } + .callout.warning { + background-color: #fff3d9; + color: #0a0a0a; } + .callout.alert { + background-color: #f7e4e1; + color: #0a0a0a; } + .callout.small { + padding-top: 0.5rem; + padding-right: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 0.5rem; } + .callout.large { + padding-top: 3rem; + padding-right: 3rem; + padding-bottom: 3rem; + padding-left: 3rem; } + +.close-button { + position: absolute; + color: #8a8a8a; + cursor: pointer; } + [data-whatinput='mouse'] .close-button { + outline: 0; } + .close-button:hover, .close-button:focus { + color: #0a0a0a; } + .close-button.small { + right: 0.66rem; + top: 0.33em; + font-size: 1.5em; + line-height: 1; } + .close-button, .close-button.medium { + right: 1rem; + top: 0.5rem; + font-size: 2em; + line-height: 1; } + +.menu { + margin: 0; + list-style-type: none; } + .menu > li { + display: table-cell; + vertical-align: middle; } + [data-whatinput='mouse'] .menu > li { + outline: 0; } + .menu > li > a { + display: block; + padding: 0.7rem 1rem; + line-height: 1; } + .menu input, + .menu select, + .menu a, + .menu button { + margin-bottom: 0; } + .menu > li > a img, + .menu > li > a i, + .menu > li > a svg { + vertical-align: middle; } + .menu > li > a img + span, + .menu > li > a i + span, + .menu > li > a svg + span { + vertical-align: middle; } + .menu > li > a img, + .menu > li > a i, + .menu > li > a svg { + margin-right: 0.25rem; + display: inline-block; } + .menu > li, .menu.horizontal > li { + display: table-cell; } + .menu.expanded { + display: table; + width: 100%; + table-layout: fixed; } + .menu.expanded > li:first-child:last-child { + width: 100%; } + .menu.vertical > li { + display: block; } + @media print, screen and (min-width: 40em) { + .menu.medium-horizontal > li { + display: table-cell; } + .menu.medium-expanded { + display: table; + width: 100%; + table-layout: fixed; } + .menu.medium-expanded > li:first-child:last-child { + width: 100%; } + .menu.medium-vertical > li { + display: block; } } + @media print, screen and (min-width: 64em) { + .menu.large-horizontal > li { + display: table-cell; } + .menu.large-expanded { + display: table; + width: 100%; + table-layout: fixed; } + .menu.large-expanded > li:first-child:last-child { + width: 100%; } + .menu.large-vertical > li { + display: block; } } + .menu.simple li { + display: inline-block; + vertical-align: top; + line-height: 1; } + .menu.simple a { + padding: 0; } + .menu.simple li { + margin-left: 0; + margin-right: 1rem; } + .menu.simple.align-right li { + margin-right: 0; + margin-left: 1rem; } + .menu.align-right::before, .menu.align-right::after { + display: table; + content: ' '; } + .menu.align-right::after { + clear: both; } + .menu.align-right > li { + float: right; } + .menu.icon-top > li > a { + text-align: center; } + .menu.icon-top > li > a img, + .menu.icon-top > li > a i, + .menu.icon-top > li > a svg { + display: block; + margin: 0 auto 0.25rem; } + .menu.icon-top.vertical a > span { + margin: auto; } + .menu.nested { + margin-left: 1rem; } + .menu .active > a { + background: #1779ba; + color: #fefefe; } + .menu.menu-bordered li { + border: 1px solid #e6e6e6; } + .menu.menu-bordered li:not(:first-child) { + border-top: 0; } + .menu.menu-hover li:hover { + background-color: #e6e6e6; } + +.menu-text { + padding-top: 0; + padding-bottom: 0; + padding: 0.7rem 1rem; + font-weight: bold; + line-height: 1; + color: inherit; } + +.menu-centered { + text-align: center; } + .menu-centered > .menu { + display: inline-block; + vertical-align: top; } + +.no-js [data-responsive-menu] ul { + display: none; } + +.menu-icon { + position: relative; + display: inline-block; + vertical-align: middle; + width: 20px; + height: 16px; + cursor: pointer; } + .menu-icon::after { + position: absolute; + top: 0; + left: 0; + display: block; + width: 100%; + height: 2px; + background: #fefefe; + box-shadow: 0 7px 0 #fefefe, 0 14px 0 #fefefe; + content: ''; } + .menu-icon:hover::after { + background: #cacaca; + box-shadow: 0 7px 0 #cacaca, 0 14px 0 #cacaca; } + +.menu-icon.dark { + position: relative; + display: inline-block; + vertical-align: middle; + width: 20px; + height: 16px; + cursor: pointer; } + .menu-icon.dark::after { + position: absolute; + top: 0; + left: 0; + display: block; + width: 100%; + height: 2px; + background: #0a0a0a; + box-shadow: 0 7px 0 #0a0a0a, 0 14px 0 #0a0a0a; + content: ''; } + .menu-icon.dark:hover::after { + background: #8a8a8a; + box-shadow: 0 7px 0 #8a8a8a, 0 14px 0 #8a8a8a; } + +.is-drilldown { + position: relative; + overflow: hidden; } + .is-drilldown li { + display: block; } + .is-drilldown.animate-height { + transition: height 0.5s; } + +.is-drilldown-submenu { + position: absolute; + top: 0; + left: 100%; + z-index: -1; + width: 100%; + background: #fefefe; + transition: transform 0.15s linear; } + .is-drilldown-submenu.is-active { + z-index: 1; + display: block; + -ms-transform: translateX(-100%); + transform: translateX(-100%); } + .is-drilldown-submenu.is-closing { + -ms-transform: translateX(100%); + transform: translateX(100%); } + +.drilldown-submenu-cover-previous { + min-height: 100%; } + +.is-drilldown-submenu-parent > a { + position: relative; } + .is-drilldown-submenu-parent > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-right-width: 0; + border-left-style: solid; + border-color: transparent transparent transparent #1779ba; + position: absolute; + top: 50%; + margin-top: -6px; + right: 1rem; } + +.js-drilldown-back > a::before { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-left-width: 0; + border-right-style: solid; + border-color: transparent #1779ba transparent transparent; + border-left-width: 0; + display: inline-block; + vertical-align: middle; + margin-right: 0.75rem; + border-left-width: 0; } + +.dropdown-pane { + position: absolute; + z-index: 10; + display: block; + width: 300px; + padding: 1rem; + visibility: hidden; + border: 1px solid #cacaca; + border-radius: 0; + background-color: #fefefe; + font-size: 1rem; } + .dropdown-pane.is-open { + visibility: visible; } + +.dropdown-pane.tiny { + width: 100px; } + +.dropdown-pane.small { + width: 200px; } + +.dropdown-pane.large { + width: 400px; } + +.dropdown.menu > li.opens-left > .is-dropdown-submenu { + top: 100%; + right: 0; + left: auto; } + +.dropdown.menu > li.opens-right > .is-dropdown-submenu { + top: 100%; + right: auto; + left: 0; } + +.dropdown.menu > li.is-dropdown-submenu-parent > a { + position: relative; + padding-right: 1.5rem; } + +.dropdown.menu > li.is-dropdown-submenu-parent > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-bottom-width: 0; + border-top-style: solid; + border-color: #1779ba transparent transparent; + right: 5px; + margin-top: -3px; } + +[data-whatinput='mouse'] .dropdown.menu a { + outline: 0; } + +.no-js .dropdown.menu ul { + display: none; } + +.dropdown.menu.vertical > li .is-dropdown-submenu { + top: 0; } + +.dropdown.menu.vertical > li.opens-left > .is-dropdown-submenu { + right: 100%; + left: auto; } + +.dropdown.menu.vertical > li.opens-right > .is-dropdown-submenu { + right: auto; + left: 100%; } + +.dropdown.menu.vertical > li > a::after { + right: 14px; } + +.dropdown.menu.vertical > li.opens-left > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-left-width: 0; + border-right-style: solid; + border-color: transparent #1779ba transparent transparent; } + +.dropdown.menu.vertical > li.opens-right > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-right-width: 0; + border-left-style: solid; + border-color: transparent transparent transparent #1779ba; } + +@media print, screen and (min-width: 40em) { + .dropdown.menu.medium-horizontal > li.opens-left > .is-dropdown-submenu { + top: 100%; + right: 0; + left: auto; } + .dropdown.menu.medium-horizontal > li.opens-right > .is-dropdown-submenu { + top: 100%; + right: auto; + left: 0; } + .dropdown.menu.medium-horizontal > li.is-dropdown-submenu-parent > a { + position: relative; + padding-right: 1.5rem; } + .dropdown.menu.medium-horizontal > li.is-dropdown-submenu-parent > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-bottom-width: 0; + border-top-style: solid; + border-color: #1779ba transparent transparent; + right: 5px; + margin-top: -3px; } + .dropdown.menu.medium-vertical > li .is-dropdown-submenu { + top: 0; } + .dropdown.menu.medium-vertical > li.opens-left > .is-dropdown-submenu { + right: 100%; + left: auto; } + .dropdown.menu.medium-vertical > li.opens-right > .is-dropdown-submenu { + right: auto; + left: 100%; } + .dropdown.menu.medium-vertical > li > a::after { + right: 14px; } + .dropdown.menu.medium-vertical > li.opens-left > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-left-width: 0; + border-right-style: solid; + border-color: transparent #1779ba transparent transparent; } + .dropdown.menu.medium-vertical > li.opens-right > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-right-width: 0; + border-left-style: solid; + border-color: transparent transparent transparent #1779ba; } } + +@media print, screen and (min-width: 64em) { + .dropdown.menu.large-horizontal > li.opens-left > .is-dropdown-submenu { + top: 100%; + right: 0; + left: auto; } + .dropdown.menu.large-horizontal > li.opens-right > .is-dropdown-submenu { + top: 100%; + right: auto; + left: 0; } + .dropdown.menu.large-horizontal > li.is-dropdown-submenu-parent > a { + position: relative; + padding-right: 1.5rem; } + .dropdown.menu.large-horizontal > li.is-dropdown-submenu-parent > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-bottom-width: 0; + border-top-style: solid; + border-color: #1779ba transparent transparent; + right: 5px; + margin-top: -3px; } + .dropdown.menu.large-vertical > li .is-dropdown-submenu { + top: 0; } + .dropdown.menu.large-vertical > li.opens-left > .is-dropdown-submenu { + right: 100%; + left: auto; } + .dropdown.menu.large-vertical > li.opens-right > .is-dropdown-submenu { + right: auto; + left: 100%; } + .dropdown.menu.large-vertical > li > a::after { + right: 14px; } + .dropdown.menu.large-vertical > li.opens-left > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-left-width: 0; + border-right-style: solid; + border-color: transparent #1779ba transparent transparent; } + .dropdown.menu.large-vertical > li.opens-right > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-right-width: 0; + border-left-style: solid; + border-color: transparent transparent transparent #1779ba; } } + +.dropdown.menu.align-right .is-dropdown-submenu.first-sub { + top: 100%; + right: 0; + left: auto; } + +.is-dropdown-menu.vertical { + width: 100px; } + .is-dropdown-menu.vertical.align-right { + float: right; } + +.is-dropdown-submenu-parent { + position: relative; } + .is-dropdown-submenu-parent a::after { + position: absolute; + top: 50%; + right: 5px; + margin-top: -6px; } + .is-dropdown-submenu-parent.opens-inner > .is-dropdown-submenu { + top: 100%; + left: auto; } + .is-dropdown-submenu-parent.opens-left > .is-dropdown-submenu { + right: 100%; + left: auto; } + .is-dropdown-submenu-parent.opens-right > .is-dropdown-submenu { + right: auto; + left: 100%; } + +.is-dropdown-submenu { + position: absolute; + top: 0; + left: 100%; + z-index: 1; + display: none; + min-width: 200px; + border: 1px solid #cacaca; + background: #fefefe; } + .is-dropdown-submenu .is-dropdown-submenu-parent > a::after { + right: 14px; } + .is-dropdown-submenu .is-dropdown-submenu-parent.opens-left > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-left-width: 0; + border-right-style: solid; + border-color: transparent #1779ba transparent transparent; } + .is-dropdown-submenu .is-dropdown-submenu-parent.opens-right > a::after { + display: block; + width: 0; + height: 0; + border: inset 6px; + content: ''; + border-right-width: 0; + border-left-style: solid; + border-color: transparent transparent transparent #1779ba; } + .is-dropdown-submenu .is-dropdown-submenu { + margin-top: -1px; } + .is-dropdown-submenu > li { + width: 100%; } + .is-dropdown-submenu.js-dropdown-active { + display: block; } + +.responsive-embed, +.flex-video { + position: relative; + height: 0; + margin-bottom: 1rem; + padding-bottom: 75%; + overflow: hidden; } + .responsive-embed iframe, + .responsive-embed object, + .responsive-embed embed, + .responsive-embed video, + .flex-video iframe, + .flex-video object, + .flex-video embed, + .flex-video video { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; } + .responsive-embed.widescreen, + .flex-video.widescreen { + padding-bottom: 56.25%; } + +.label { + display: inline-block; + padding: 0.33333rem 0.5rem; + border-radius: 0; + font-size: 0.8rem; + line-height: 1; + white-space: nowrap; + cursor: default; + background: #1779ba; + color: #fefefe; } + .label.primary { + background: #1779ba; + color: #fefefe; } + .label.secondary { + background: #767676; + color: #fefefe; } + .label.success { + background: #3adb76; + color: #0a0a0a; } + .label.warning { + background: #ffae00; + color: #0a0a0a; } + .label.alert { + background: #cc4b37; + color: #fefefe; } + +.media-object { + display: block; + margin-bottom: 1rem; } + .media-object img { + max-width: none; } + @media screen and (max-width: 39.9375em) { + .media-object.stack-for-small .media-object-section { + padding: 0; + padding-bottom: 1rem; + display: block; } + .media-object.stack-for-small .media-object-section img { + width: 100%; } } + +.media-object-section { + display: table-cell; + vertical-align: top; } + .media-object-section:first-child { + padding-right: 1rem; } + .media-object-section:last-child:not(:nth-child(2)) { + padding-left: 1rem; } + .media-object-section > :last-child { + margin-bottom: 0; } + .media-object-section.middle { + vertical-align: middle; } + .media-object-section.bottom { + vertical-align: bottom; } + +.is-off-canvas-open { + overflow: hidden; } + +.js-off-canvas-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + transition: opacity 0.5s ease, visibility 0.5s ease; + background: rgba(254, 254, 254, 0.25); + opacity: 0; + visibility: hidden; + overflow: hidden; } + .js-off-canvas-overlay.is-visible { + opacity: 1; + visibility: visible; } + .js-off-canvas-overlay.is-closable { + cursor: pointer; } + .js-off-canvas-overlay.is-overlay-absolute { + position: absolute; } + .js-off-canvas-overlay.is-overlay-fixed { + position: fixed; } + +.off-canvas-wrapper { + position: relative; + overflow: hidden; } + +.off-canvas { + position: fixed; + z-index: 1; + transition: transform 0.5s ease; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + background: #e6e6e6; } + [data-whatinput='mouse'] .off-canvas { + outline: 0; } + .off-canvas.is-transition-overlap { + z-index: 10; } + .off-canvas.is-transition-overlap.is-open { + box-shadow: 0 0 10px rgba(10, 10, 10, 0.7); } + .off-canvas.is-open { + -ms-transform: translate(0, 0); + transform: translate(0, 0); } + +.off-canvas-absolute { + position: absolute; + z-index: 1; + transition: transform 0.5s ease; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + background: #e6e6e6; } + [data-whatinput='mouse'] .off-canvas-absolute { + outline: 0; } + .off-canvas-absolute.is-transition-overlap { + z-index: 10; } + .off-canvas-absolute.is-transition-overlap.is-open { + box-shadow: 0 0 10px rgba(10, 10, 10, 0.7); } + .off-canvas-absolute.is-open { + -ms-transform: translate(0, 0); + transform: translate(0, 0); } + +.position-left { + top: 0; + left: 0; + width: 250px; + height: 100%; + -ms-transform: translateX(-250px); + transform: translateX(-250px); + overflow-y: auto; } + .position-left.is-open ~ .off-canvas-content { + -ms-transform: translateX(250px); + transform: translateX(250px); } + .position-left.is-transition-push::after { + position: absolute; + top: 0; + right: 0; + height: 100%; + width: 1px; + box-shadow: 0 0 10px rgba(10, 10, 10, 0.7); + content: " "; } + .position-left.is-transition-overlap.is-open ~ .off-canvas-content { + -ms-transform: none; + transform: none; } + +.position-right { + top: 0; + right: 0; + width: 250px; + height: 100%; + -ms-transform: translateX(250px); + transform: translateX(250px); + overflow-y: auto; } + .position-right.is-open ~ .off-canvas-content { + -ms-transform: translateX(-250px); + transform: translateX(-250px); } + .position-right.is-transition-push::after { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 1px; + box-shadow: 0 0 10px rgba(10, 10, 10, 0.7); + content: " "; } + .position-right.is-transition-overlap.is-open ~ .off-canvas-content { + -ms-transform: none; + transform: none; } + +.position-top { + top: 0; + left: 0; + width: 100%; + height: 250px; + -ms-transform: translateY(-250px); + transform: translateY(-250px); + overflow-x: auto; } + .position-top.is-open ~ .off-canvas-content { + -ms-transform: translateY(250px); + transform: translateY(250px); } + .position-top.is-transition-push::after { + position: absolute; + bottom: 0; + left: 0; + height: 1px; + width: 100%; + box-shadow: 0 0 10px rgba(10, 10, 10, 0.7); + content: " "; } + .position-top.is-transition-overlap.is-open ~ .off-canvas-content { + -ms-transform: none; + transform: none; } + +.position-bottom { + bottom: 0; + left: 0; + width: 100%; + height: 250px; + -ms-transform: translateY(250px); + transform: translateY(250px); + overflow-x: auto; } + .position-bottom.is-open ~ .off-canvas-content { + -ms-transform: translateY(-250px); + transform: translateY(-250px); } + .position-bottom.is-transition-push::after { + position: absolute; + top: 0; + left: 0; + height: 1px; + width: 100%; + box-shadow: 0 0 10px rgba(10, 10, 10, 0.7); + content: " "; } + .position-bottom.is-transition-overlap.is-open ~ .off-canvas-content { + -ms-transform: none; + transform: none; } + +.off-canvas-content { + transition: transform 0.5s ease; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +@media print, screen and (min-width: 40em) { + .position-left.reveal-for-medium { + -ms-transform: none; + transform: none; + z-index: 1; } + .position-left.reveal-for-medium ~ .off-canvas-content { + margin-left: 250px; } + .position-right.reveal-for-medium { + -ms-transform: none; + transform: none; + z-index: 1; } + .position-right.reveal-for-medium ~ .off-canvas-content { + margin-right: 250px; } + .position-top.reveal-for-medium { + -ms-transform: none; + transform: none; + z-index: 1; } + .position-top.reveal-for-medium ~ .off-canvas-content { + margin-top: 250px; } + .position-bottom.reveal-for-medium { + -ms-transform: none; + transform: none; + z-index: 1; } + .position-bottom.reveal-for-medium ~ .off-canvas-content { + margin-bottom: 250px; } } + +@media print, screen and (min-width: 64em) { + .position-left.reveal-for-large { + -ms-transform: none; + transform: none; + z-index: 1; } + .position-left.reveal-for-large ~ .off-canvas-content { + margin-left: 250px; } + .position-right.reveal-for-large { + -ms-transform: none; + transform: none; + z-index: 1; } + .position-right.reveal-for-large ~ .off-canvas-content { + margin-right: 250px; } + .position-top.reveal-for-large { + -ms-transform: none; + transform: none; + z-index: 1; } + .position-top.reveal-for-large ~ .off-canvas-content { + margin-top: 250px; } + .position-bottom.reveal-for-large { + -ms-transform: none; + transform: none; + z-index: 1; } + .position-bottom.reveal-for-large ~ .off-canvas-content { + margin-bottom: 250px; } } + +.orbit { + position: relative; } + +.orbit-container { + position: relative; + height: 0; + margin: 0; + list-style: none; + overflow: hidden; } + +.orbit-slide { + width: 100%; } + .orbit-slide.no-motionui.is-active { + top: 0; + left: 0; } + +.orbit-figure { + margin: 0; } + +.orbit-image { + width: 100%; + max-width: 100%; + margin: 0; } + +.orbit-caption { + position: absolute; + bottom: 0; + width: 100%; + margin-bottom: 0; + padding: 1rem; + background-color: rgba(10, 10, 10, 0.5); + color: #fefefe; } + +.orbit-previous, .orbit-next { + position: absolute; + top: 50%; + -ms-transform: translateY(-50%); + transform: translateY(-50%); + z-index: 10; + padding: 1rem; + color: #fefefe; } + [data-whatinput='mouse'] .orbit-previous, [data-whatinput='mouse'] .orbit-next { + outline: 0; } + .orbit-previous:hover, .orbit-next:hover, .orbit-previous:active, .orbit-next:active, .orbit-previous:focus, .orbit-next:focus { + background-color: rgba(10, 10, 10, 0.5); } + +.orbit-previous { + left: 0; } + +.orbit-next { + left: auto; + right: 0; } + +.orbit-bullets { + position: relative; + margin-top: 0.8rem; + margin-bottom: 0.8rem; + text-align: center; } + [data-whatinput='mouse'] .orbit-bullets { + outline: 0; } + .orbit-bullets button { + width: 1.2rem; + height: 1.2rem; + margin: 0.1rem; + border-radius: 50%; + background-color: #cacaca; } + .orbit-bullets button:hover { + background-color: #8a8a8a; } + .orbit-bullets button.is-active { + background-color: #8a8a8a; } + +.pagination { + margin-left: 0; + margin-bottom: 1rem; } + .pagination::before, .pagination::after { + display: table; + content: ' '; } + .pagination::after { + clear: both; } + .pagination li { + margin-right: 0.0625rem; + border-radius: 0; + font-size: 0.875rem; + display: none; } + .pagination li:last-child, .pagination li:first-child { + display: inline-block; } + @media print, screen and (min-width: 40em) { + .pagination li { + display: inline-block; } } + .pagination a, + .pagination button { + display: block; + padding: 0.1875rem 0.625rem; + border-radius: 0; + color: #0a0a0a; } + .pagination a:hover, + .pagination button:hover { + background: #e6e6e6; } + .pagination .current { + padding: 0.1875rem 0.625rem; + background: #1779ba; + color: #fefefe; + cursor: default; } + .pagination .disabled { + padding: 0.1875rem 0.625rem; + color: #cacaca; + cursor: not-allowed; } + .pagination .disabled:hover { + background: transparent; } + .pagination .ellipsis::after { + padding: 0.1875rem 0.625rem; + content: '\2026'; + color: #0a0a0a; } + +.pagination-previous a::before, +.pagination-previous.disabled::before { + display: inline-block; + margin-right: 0.5rem; + content: '\00ab'; } + +.pagination-next a::after, +.pagination-next.disabled::after { + display: inline-block; + margin-left: 0.5rem; + content: '\00bb'; } + +.progress { + height: 1rem; + margin-bottom: 1rem; + border-radius: 0; + background-color: #cacaca; } + .progress.primary .progress-meter { + background-color: #1779ba; } + .progress.secondary .progress-meter { + background-color: #767676; } + .progress.success .progress-meter { + background-color: #3adb76; } + .progress.warning .progress-meter { + background-color: #ffae00; } + .progress.alert .progress-meter { + background-color: #cc4b37; } + +.progress-meter { + position: relative; + display: block; + width: 0%; + height: 100%; + background-color: #1779ba; } + +.progress-meter-text { + position: absolute; + top: 50%; + left: 50%; + -ms-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + position: absolute; + margin: 0; + font-size: 0.75rem; + font-weight: bold; + color: #fefefe; + white-space: nowrap; } + +body.is-reveal-open { + overflow: hidden; } + +html.is-reveal-open, +html.is-reveal-open body { + min-height: 100%; + overflow: hidden; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + +.reveal-overlay { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1005; + display: none; + background-color: rgba(10, 10, 10, 0.45); + overflow-y: scroll; } + +.reveal { + z-index: 1006; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + display: none; + padding: 1rem; + border: 1px solid #cacaca; + border-radius: 0; + background-color: #fefefe; + position: relative; + top: 100px; + margin-right: auto; + margin-left: auto; + overflow-y: auto; } + [data-whatinput='mouse'] .reveal { + outline: 0; } + @media print, screen and (min-width: 40em) { + .reveal { + min-height: 0; } } + .reveal .column, .reveal .columns, + .reveal .columns { + min-width: 0; } + .reveal > :last-child { + margin-bottom: 0; } + @media print, screen and (min-width: 40em) { + .reveal { + width: 600px; + max-width: 75rem; } } + @media print, screen and (min-width: 40em) { + .reveal .reveal { + right: auto; + left: auto; + margin: 0 auto; } } + .reveal.collapse { + padding: 0; } + @media print, screen and (min-width: 40em) { + .reveal.tiny { + width: 30%; + max-width: 75rem; } } + @media print, screen and (min-width: 40em) { + .reveal.small { + width: 50%; + max-width: 75rem; } } + @media print, screen and (min-width: 40em) { + .reveal.large { + width: 90%; + max-width: 75rem; } } + .reveal.full { + top: 0; + left: 0; + width: 100%; + max-width: none; + height: 100%; + height: 100vh; + min-height: 100vh; + margin-left: 0; + border: 0; + border-radius: 0; } + @media screen and (max-width: 39.9375em) { + .reveal { + top: 0; + left: 0; + width: 100%; + max-width: none; + height: 100%; + height: 100vh; + min-height: 100vh; + margin-left: 0; + border: 0; + border-radius: 0; } } + .reveal.without-overlay { + position: fixed; } + +.slider { + position: relative; + height: 0.5rem; + margin-top: 1.25rem; + margin-bottom: 2.25rem; + background-color: #e6e6e6; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -ms-touch-action: none; + touch-action: none; } + +.slider-fill { + position: absolute; + top: 0; + left: 0; + display: inline-block; + max-width: 100%; + height: 0.5rem; + background-color: #cacaca; + transition: all 0.2s ease-in-out; } + .slider-fill.is-dragging { + transition: all 0s linear; } + +.slider-handle { + position: absolute; + top: 50%; + -ms-transform: translateY(-50%); + transform: translateY(-50%); + position: absolute; + left: 0; + z-index: 1; + display: inline-block; + width: 1.4rem; + height: 1.4rem; + border-radius: 0; + background-color: #1779ba; + transition: all 0.2s ease-in-out; + -ms-touch-action: manipulation; + touch-action: manipulation; } + [data-whatinput='mouse'] .slider-handle { + outline: 0; } + .slider-handle:hover { + background-color: #14679e; } + .slider-handle.is-dragging { + transition: all 0s linear; } + +.slider.disabled, +.slider[disabled] { + opacity: 0.25; + cursor: not-allowed; } + +.slider.vertical { + display: inline-block; + width: 0.5rem; + height: 12.5rem; + margin: 0 1.25rem; + -ms-transform: scale(1, -1); + transform: scale(1, -1); } + .slider.vertical .slider-fill { + top: 0; + width: 0.5rem; + max-height: 100%; } + .slider.vertical .slider-handle { + position: absolute; + top: 0; + left: 50%; + width: 1.4rem; + height: 1.4rem; + -ms-transform: translateX(-50%); + transform: translateX(-50%); } + +.sticky-container { + position: relative; } + +.sticky { + position: relative; + z-index: 0; + transform: translate3d(0, 0, 0); } + +.sticky.is-stuck { + position: fixed; + z-index: 5; } + .sticky.is-stuck.is-at-top { + top: 0; } + .sticky.is-stuck.is-at-bottom { + bottom: 0; } + +.sticky.is-anchored { + position: relative; + right: auto; + left: auto; } + .sticky.is-anchored.is-at-bottom { + bottom: 0; } + +.switch { + height: 2rem; + position: relative; + margin-bottom: 1rem; + outline: 0; + font-size: 0.875rem; + font-weight: bold; + color: #fefefe; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + +.switch-input { + position: absolute; + margin-bottom: 0; + opacity: 0; } + +.switch-paddle { + position: relative; + display: block; + width: 4rem; + height: 2rem; + border-radius: 0; + background: #cacaca; + transition: all 0.25s ease-out; + font-weight: inherit; + color: inherit; + cursor: pointer; } + input + .switch-paddle { + margin: 0; } + .switch-paddle::after { + position: absolute; + top: 0.25rem; + left: 0.25rem; + display: block; + width: 1.5rem; + height: 1.5rem; + transform: translate3d(0, 0, 0); + border-radius: 0; + background: #fefefe; + transition: all 0.25s ease-out; + content: ''; } + input:checked ~ .switch-paddle { + background: #1779ba; } + input:checked ~ .switch-paddle::after { + left: 2.25rem; } + [data-whatinput='mouse'] input:focus ~ .switch-paddle { + outline: 0; } + +.switch-active, .switch-inactive { + position: absolute; + top: 50%; + -ms-transform: translateY(-50%); + transform: translateY(-50%); } + +.switch-active { + left: 8%; + display: none; } + input:checked + label > .switch-active { + display: block; } + +.switch-inactive { + right: 15%; } + input:checked + label > .switch-inactive { + display: none; } + +.switch.tiny { + height: 1.5rem; } + .switch.tiny .switch-paddle { + width: 3rem; + height: 1.5rem; + font-size: 0.625rem; } + .switch.tiny .switch-paddle::after { + top: 0.25rem; + left: 0.25rem; + width: 1rem; + height: 1rem; } + .switch.tiny input:checked ~ .switch-paddle::after { + left: 1.75rem; } + +.switch.small { + height: 1.75rem; } + .switch.small .switch-paddle { + width: 3.5rem; + height: 1.75rem; + font-size: 0.75rem; } + .switch.small .switch-paddle::after { + top: 0.25rem; + left: 0.25rem; + width: 1.25rem; + height: 1.25rem; } + .switch.small input:checked ~ .switch-paddle::after { + left: 2rem; } + +.switch.large { + height: 2.5rem; } + .switch.large .switch-paddle { + width: 5rem; + height: 2.5rem; + font-size: 1rem; } + .switch.large .switch-paddle::after { + top: 0.25rem; + left: 0.25rem; + width: 2rem; + height: 2rem; } + .switch.large input:checked ~ .switch-paddle::after { + left: 2.75rem; } + +table { + width: 100%; + margin-bottom: 1rem; + border-radius: 0; } + table thead, + table tbody, + table tfoot { + border: 1px solid #f1f1f1; + background-color: #fefefe; } + table caption { + padding: 0.5rem 0.625rem 0.625rem; + font-weight: bold; } + table thead { + background: #f8f8f8; + color: #0a0a0a; } + table tfoot { + background: #f1f1f1; + color: #0a0a0a; } + table thead tr, + table tfoot tr { + background: transparent; } + table thead th, + table thead td, + table tfoot th, + table tfoot td { + padding: 0.5rem 0.625rem 0.625rem; + font-weight: bold; + text-align: left; } + table tbody th, + table tbody td { + padding: 0.5rem 0.625rem 0.625rem; } + table tbody tr:nth-child(even) { + border-bottom: 0; + background-color: #f1f1f1; } + table.unstriped tbody { + background-color: #fefefe; } + table.unstriped tbody tr { + border-bottom: 0; + border-bottom: 1px solid #f1f1f1; + background-color: #fefefe; } + +@media screen and (max-width: 63.9375em) { + table.stack thead { + display: none; } + table.stack tfoot { + display: none; } + table.stack tr, + table.stack th, + table.stack td { + display: block; } + table.stack td { + border-top: 0; } } + +table.scroll { + display: block; + width: 100%; + overflow-x: auto; } + +table.hover thead tr:hover { + background-color: #f3f3f3; } + +table.hover tfoot tr:hover { + background-color: #ececec; } + +table.hover tbody tr:hover { + background-color: #f9f9f9; } + +table.hover:not(.unstriped) tr:nth-of-type(even):hover { + background-color: #ececec; } + +.table-scroll { + overflow-x: auto; } + .table-scroll table { + width: auto; } + +.tabs { + margin: 0; + border: 1px solid #e6e6e6; + background: #fefefe; + list-style-type: none; } + .tabs::before, .tabs::after { + display: table; + content: ' '; } + .tabs::after { + clear: both; } + +.tabs.vertical > li { + display: block; + float: none; + width: auto; } + +.tabs.simple > li > a { + padding: 0; } + .tabs.simple > li > a:hover { + background: transparent; } + +.tabs.primary { + background: #1779ba; } + .tabs.primary > li > a { + color: #fefefe; } + .tabs.primary > li > a:hover, .tabs.primary > li > a:focus { + background: #1673b1; } + +.tabs-title { + float: left; } + .tabs-title > a { + display: block; + padding: 1.25rem 1.5rem; + font-size: 0.75rem; + line-height: 1; + color: #1779ba; } + .tabs-title > a:hover { + background: #fefefe; + color: #1468a0; } + .tabs-title > a:focus, .tabs-title > a[aria-selected='true'] { + background: #e6e6e6; + color: #1779ba; } + +.tabs-content { + border: 1px solid #e6e6e6; + border-top: 0; + background: #fefefe; + color: #0a0a0a; + transition: all 0.5s ease; } + +.tabs-content.vertical { + border: 1px solid #e6e6e6; + border-left: 0; } + +.tabs-panel { + display: none; + padding: 1rem; } + .tabs-panel[aria-hidden="false"] { + display: block; } + +.thumbnail { + display: inline-block; + max-width: 100%; + margin-bottom: 1rem; + border: solid 4px #fefefe; + border-radius: 0; + box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.2); + line-height: 0; } + +a.thumbnail { + transition: box-shadow 200ms ease-out; } + a.thumbnail:hover, a.thumbnail:focus { + box-shadow: 0 0 6px 1px rgba(23, 121, 186, 0.5); } + a.thumbnail image { + box-shadow: none; } + +.title-bar { + padding: 0.5rem; + background: #0a0a0a; + color: #fefefe; } + .title-bar::before, .title-bar::after { + display: table; + content: ' '; } + .title-bar::after { + clear: both; } + .title-bar .menu-icon { + margin-left: 0.25rem; + margin-right: 0.25rem; } + +.title-bar-left { + float: left; } + +.title-bar-right { + float: right; + text-align: right; } + +.title-bar-title { + display: inline-block; + vertical-align: middle; + font-weight: bold; } + +.has-tip { + position: relative; + display: inline-block; + border-bottom: dotted 1px #8a8a8a; + font-weight: bold; + cursor: help; } + +.tooltip { + position: absolute; + top: calc(100% + 0.6495rem); + z-index: 1200; + max-width: 10rem; + padding: 0.75rem; + border-radius: 0; + background-color: #0a0a0a; + font-size: 80%; + color: #fefefe; } + .tooltip::before { + display: block; + width: 0; + height: 0; + border: inset 0.75rem; + content: ''; + border-top-width: 0; + border-bottom-style: solid; + border-color: transparent transparent #0a0a0a; + position: absolute; + bottom: 100%; + left: 50%; + -ms-transform: translateX(-50%); + transform: translateX(-50%); } + .tooltip.top::before { + display: block; + width: 0; + height: 0; + border: inset 0.75rem; + content: ''; + border-bottom-width: 0; + border-top-style: solid; + border-color: #0a0a0a transparent transparent; + top: 100%; + bottom: auto; } + .tooltip.left::before { + display: block; + width: 0; + height: 0; + border: inset 0.75rem; + content: ''; + border-right-width: 0; + border-left-style: solid; + border-color: transparent transparent transparent #0a0a0a; + top: 50%; + bottom: auto; + left: 100%; + -ms-transform: translateY(-50%); + transform: translateY(-50%); } + .tooltip.right::before { + display: block; + width: 0; + height: 0; + border: inset 0.75rem; + content: ''; + border-left-width: 0; + border-right-style: solid; + border-color: transparent #0a0a0a transparent transparent; + top: 50%; + right: 100%; + bottom: auto; + left: auto; + -ms-transform: translateY(-50%); + transform: translateY(-50%); } + +.top-bar { + padding: 0.5rem; } + .top-bar::before, .top-bar::after { + display: table; + content: ' '; } + .top-bar::after { + clear: both; } + .top-bar, + .top-bar ul { + background-color: #e6e6e6; } + .top-bar input { + max-width: 200px; + margin-right: 1rem; } + .top-bar .input-group-field { + width: 100%; + margin-right: 0; } + .top-bar input.button { + width: auto; } + .top-bar .top-bar-left, + .top-bar .top-bar-right { + width: 100%; } + @media print, screen and (min-width: 40em) { + .top-bar .top-bar-left, + .top-bar .top-bar-right { + width: auto; } } + @media screen and (max-width: 63.9375em) { + .top-bar.stacked-for-medium .top-bar-left, + .top-bar.stacked-for-medium .top-bar-right { + width: 100%; } } + @media screen and (max-width: 74.9375em) { + .top-bar.stacked-for-large .top-bar-left, + .top-bar.stacked-for-large .top-bar-right { + width: 100%; } } + +.top-bar-title { + display: inline-block; + float: left; + padding: 0.5rem 1rem 0.5rem 0; } + .top-bar-title .menu-icon { + bottom: 2px; } + +.top-bar-left { + float: left; } + +.top-bar-right { + float: right; } + +.hide { + display: none !important; } + +.invisible { + visibility: hidden; } + +@media screen and (max-width: 39.9375em) { + .hide-for-small-only { + display: none !important; } } + +@media screen and (max-width: 0em), screen and (min-width: 40em) { + .show-for-small-only { + display: none !important; } } + +@media print, screen and (min-width: 40em) { + .hide-for-medium { + display: none !important; } } + +@media screen and (max-width: 39.9375em) { + .show-for-medium { + display: none !important; } } + +@media screen and (min-width: 40em) and (max-width: 63.9375em) { + .hide-for-medium-only { + display: none !important; } } + +@media screen and (max-width: 39.9375em), screen and (min-width: 64em) { + .show-for-medium-only { + display: none !important; } } + +@media print, screen and (min-width: 64em) { + .hide-for-large { + display: none !important; } } + +@media screen and (max-width: 63.9375em) { + .show-for-large { + display: none !important; } } + +@media screen and (min-width: 64em) and (max-width: 74.9375em) { + .hide-for-large-only { + display: none !important; } } + +@media screen and (max-width: 63.9375em), screen and (min-width: 75em) { + .show-for-large-only { + display: none !important; } } + +.show-for-sr, +.show-on-focus { + position: absolute !important; + width: 1px; + height: 1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); } + +.show-on-focus:active, .show-on-focus:focus { + position: static !important; + width: auto; + height: auto; + overflow: visible; + clip: auto; } + +.show-for-landscape, +.hide-for-portrait { + display: block !important; } + @media screen and (orientation: landscape) { + .show-for-landscape, + .hide-for-portrait { + display: block !important; } } + @media screen and (orientation: portrait) { + .show-for-landscape, + .hide-for-portrait { + display: none !important; } } + +.hide-for-landscape, +.show-for-portrait { + display: none !important; } + @media screen and (orientation: landscape) { + .hide-for-landscape, + .show-for-portrait { + display: none !important; } } + @media screen and (orientation: portrait) { + .hide-for-landscape, + .show-for-portrait { + display: block !important; } } + +.float-left { + float: left !important; } + +.float-right { + float: right !important; } + +.float-center { + display: block; + margin-right: auto; + margin-left: auto; } + +.clearfix::before, .clearfix::after { + display: table; + content: ' '; } + +.clearfix::after { + clear: both; } + +.slide-in-down.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: translateY(-100%); + transform: translateY(-100%); + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-in-down.mui-enter.mui-enter-active { + -ms-transform: translateY(0); + transform: translateY(0); } + +.slide-in-left.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: translateX(-100%); + transform: translateX(-100%); + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-in-left.mui-enter.mui-enter-active { + -ms-transform: translateX(0); + transform: translateX(0); } + +.slide-in-up.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: translateY(100%); + transform: translateY(100%); + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-in-up.mui-enter.mui-enter-active { + -ms-transform: translateY(0); + transform: translateY(0); } + +.slide-in-right.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: translateX(100%); + transform: translateX(100%); + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-in-right.mui-enter.mui-enter-active { + -ms-transform: translateX(0); + transform: translateX(0); } + +.slide-out-down.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: translateY(0); + transform: translateY(0); + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-out-down.mui-leave.mui-leave-active { + -ms-transform: translateY(100%); + transform: translateY(100%); } + +.slide-out-right.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: translateX(0); + transform: translateX(0); + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-out-right.mui-leave.mui-leave-active { + -ms-transform: translateX(100%); + transform: translateX(100%); } + +.slide-out-up.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: translateY(0); + transform: translateY(0); + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-out-up.mui-leave.mui-leave-active { + -ms-transform: translateY(-100%); + transform: translateY(-100%); } + +.slide-out-left.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: translateX(0); + transform: translateX(0); + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-out-left.mui-leave.mui-leave-active { + -ms-transform: translateX(-100%); + transform: translateX(-100%); } + +.fade-in.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + opacity: 0; + transition-property: opacity; } + +.fade-in.mui-enter.mui-enter-active { + opacity: 1; } + +.fade-out.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + opacity: 1; + transition-property: opacity; } + +.fade-out.mui-leave.mui-leave-active { + opacity: 0; } + +.hinge-in-from-top.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotateX(-90deg); + -ms-transform-origin: top; + transform-origin: top; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-top.mui-enter.mui-enter-active { + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-in-from-right.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotateY(-90deg); + -ms-transform-origin: right; + transform-origin: right; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-right.mui-enter.mui-enter-active { + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-in-from-bottom.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotateX(90deg); + -ms-transform-origin: bottom; + transform-origin: bottom; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-bottom.mui-enter.mui-enter-active { + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-in-from-left.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotateY(90deg); + -ms-transform-origin: left; + transform-origin: left; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-left.mui-enter.mui-enter-active { + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-in-from-middle-x.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotateX(-90deg); + -ms-transform-origin: center; + transform-origin: center; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-middle-x.mui-enter.mui-enter-active { + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-in-from-middle-y.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotateY(-90deg); + -ms-transform-origin: center; + transform-origin: center; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-middle-y.mui-enter.mui-enter-active { + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-out-from-top.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotate(0deg); + -ms-transform-origin: top; + transform-origin: top; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-top.mui-leave.mui-leave-active { + transform: perspective(2000px) rotateX(-90deg); + opacity: 0; } + +.hinge-out-from-right.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotate(0deg); + -ms-transform-origin: right; + transform-origin: right; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-right.mui-leave.mui-leave-active { + transform: perspective(2000px) rotateY(-90deg); + opacity: 0; } + +.hinge-out-from-bottom.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotate(0deg); + -ms-transform-origin: bottom; + transform-origin: bottom; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-bottom.mui-leave.mui-leave-active { + transform: perspective(2000px) rotateX(90deg); + opacity: 0; } + +.hinge-out-from-left.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotate(0deg); + -ms-transform-origin: left; + transform-origin: left; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-left.mui-leave.mui-leave-active { + transform: perspective(2000px) rotateY(90deg); + opacity: 0; } + +.hinge-out-from-middle-x.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotate(0deg); + -ms-transform-origin: center; + transform-origin: center; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-middle-x.mui-leave.mui-leave-active { + transform: perspective(2000px) rotateX(-90deg); + opacity: 0; } + +.hinge-out-from-middle-y.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + transform: perspective(2000px) rotate(0deg); + -ms-transform-origin: center; + transform-origin: center; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-middle-y.mui-leave.mui-leave-active { + transform: perspective(2000px) rotateY(-90deg); + opacity: 0; } + +.scale-in-up.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: scale(0.5); + transform: scale(0.5); + transition-property: transform, opacity; + opacity: 0; } + +.scale-in-up.mui-enter.mui-enter-active { + -ms-transform: scale(1); + transform: scale(1); + opacity: 1; } + +.scale-in-down.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: scale(1.5); + transform: scale(1.5); + transition-property: transform, opacity; + opacity: 0; } + +.scale-in-down.mui-enter.mui-enter-active { + -ms-transform: scale(1); + transform: scale(1); + opacity: 1; } + +.scale-out-up.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: scale(1); + transform: scale(1); + transition-property: transform, opacity; + opacity: 1; } + +.scale-out-up.mui-leave.mui-leave-active { + -ms-transform: scale(1.5); + transform: scale(1.5); + opacity: 0; } + +.scale-out-down.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: scale(1); + transform: scale(1); + transition-property: transform, opacity; + opacity: 1; } + +.scale-out-down.mui-leave.mui-leave-active { + -ms-transform: scale(0.5); + transform: scale(0.5); + opacity: 0; } + +.spin-in.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: rotate(-0.75turn); + transform: rotate(-0.75turn); + transition-property: transform, opacity; + opacity: 0; } + +.spin-in.mui-enter.mui-enter-active { + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; } + +.spin-out.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: rotate(0); + transform: rotate(0); + transition-property: transform, opacity; + opacity: 1; } + +.spin-out.mui-leave.mui-leave-active { + -ms-transform: rotate(0.75turn); + transform: rotate(0.75turn); + opacity: 0; } + +.spin-in-ccw.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: rotate(0.75turn); + transform: rotate(0.75turn); + transition-property: transform, opacity; + opacity: 0; } + +.spin-in-ccw.mui-enter.mui-enter-active { + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; } + +.spin-out-ccw.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -ms-transform: rotate(0); + transform: rotate(0); + transition-property: transform, opacity; + opacity: 1; } + +.spin-out-ccw.mui-leave.mui-leave-active { + -ms-transform: rotate(-0.75turn); + transform: rotate(-0.75turn); + opacity: 0; } + +.slow { + transition-duration: 750ms !important; } + +.fast { + transition-duration: 250ms !important; } + +.linear { + transition-timing-function: linear !important; } + +.ease { + transition-timing-function: ease !important; } + +.ease-in { + transition-timing-function: ease-in !important; } + +.ease-out { + transition-timing-function: ease-out !important; } + +.ease-in-out { + transition-timing-function: ease-in-out !important; } + +.bounce-in { + transition-timing-function: cubic-bezier(0.485, 0.155, 0.24, 1.245) !important; } + +.bounce-out { + transition-timing-function: cubic-bezier(0.485, 0.155, 0.515, 0.845) !important; } + +.bounce-in-out { + transition-timing-function: cubic-bezier(0.76, -0.245, 0.24, 1.245) !important; } + +.short-delay { + transition-delay: 300ms !important; } + +.long-delay { + transition-delay: 700ms !important; } + +.shake { + animation-name: shake-7; } + +@keyframes shake-7 { + 0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90% { + transform: translateX(7%); } + 5%, 15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95% { + transform: translateX(-7%); } } + +.spin-cw { + animation-name: spin-cw-1turn; } + +@keyframes spin-cw-1turn { + 0% { + transform: rotate(-1turn); } + 100% { + transform: rotate(0); } } + +.spin-ccw { + animation-name: spin-cw-1turn; } + +@keyframes spin-cw-1turn { + 0% { + transform: rotate(0); } + 100% { + transform: rotate(1turn); } } + +.wiggle { + animation-name: wiggle-7deg; } + +@keyframes wiggle-7deg { + 40%, 50%, 60% { + transform: rotate(7deg); } + 35%, 45%, 55%, 65% { + transform: rotate(-7deg); } + 0%, 30%, 70%, 100% { + transform: rotate(0); } } + +.shake, +.spin-cw, +.spin-ccw, +.wiggle { + animation-duration: 500ms; } + +.infinite { + animation-iteration-count: infinite; } + +.slow { + animation-duration: 750ms !important; } + +.fast { + animation-duration: 250ms !important; } + +.linear { + animation-timing-function: linear !important; } + +.ease { + animation-timing-function: ease !important; } + +.ease-in { + animation-timing-function: ease-in !important; } + +.ease-out { + animation-timing-function: ease-out !important; } + +.ease-in-out { + animation-timing-function: ease-in-out !important; } + +.bounce-in { + animation-timing-function: cubic-bezier(0.485, 0.155, 0.24, 1.245) !important; } + +.bounce-out { + animation-timing-function: cubic-bezier(0.485, 0.155, 0.515, 0.845) !important; } + +.bounce-in-out { + animation-timing-function: cubic-bezier(0.76, -0.245, 0.24, 1.245) !important; } + +.short-delay { + animation-delay: 300ms !important; } + +.long-delay { + animation-delay: 700ms !important; } diff --git a/app/assets/stylesheets/foundation-6.3.1-complete/css/foundation.min.css b/app/assets/stylesheets/foundation-6.3.1-complete/css/foundation.min.css new file mode 100644 index 0000000000..34ff612eb3 --- /dev/null +++ b/app/assets/stylesheets/foundation-6.3.1-complete/css/foundation.min.css @@ -0,0 +1,2 @@ +@charset "UTF-8"; +/*! normalize-scss | MIT/GPLv2 License | bit.ly/normalize-scss */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}main{display:block}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}input{overflow:visible}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;display:table;max-width:100%;padding:0;color:inherit;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}details{display:block}summary{display:list-item}menu{display:block}canvas{display:inline-block}[hidden],template{display:none}.foundation-mq{font-family:"small=0em&medium=40em&large=64em&xlarge=75em&xxlarge=90em"}html{box-sizing:border-box;font-size:100%}*,:after,:before{box-sizing:inherit}body{margin:0;padding:0;background:#fefefe;font-family:Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-weight:400;line-height:1.5;color:#0a0a0a;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img{display:inline-block;vertical-align:middle;max-width:100%;height:auto;-ms-interpolation-mode:bicubic}textarea{height:auto;min-height:50px;border-radius:0}select{box-sizing:border-box;width:100%;border-radius:0}.map_canvas embed,.map_canvas img,.map_canvas object,.mqa-display embed,.mqa-display img,.mqa-display object{max-width:none!important}button{padding:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:0;background:transparent;line-height:1}[data-whatinput=mouse] button{outline:0}pre{overflow:auto}.is-visible{display:block!important}.is-hidden{display:none!important}.row{max-width:75rem;margin-right:auto;margin-left:auto}.row:after,.row:before{display:table;content:" "}.row:after{clear:both}.row.collapse>.column,.row.collapse>.columns{padding-right:0;padding-left:0}.row .row{margin-right:-.625rem;margin-left:-.625rem}@media print,screen and (min-width:40em){.row .row{margin-right:-.9375rem;margin-left:-.9375rem}}@media print,screen and (min-width:64em){.row .row{margin-right:-.9375rem;margin-left:-.9375rem}}.row .row.collapse{margin-right:0;margin-left:0}.row.expanded{max-width:none}.row.expanded .row{margin-right:auto;margin-left:auto}.row:not(.expanded) .row{max-width:none}.row.gutter-small>.column,.row.gutter-small>.columns{padding-right:.625rem;padding-left:.625rem}.row.gutter-medium>.column,.row.gutter-medium>.columns{padding-right:.9375rem;padding-left:.9375rem}.column,.columns{width:100%;float:left;padding-right:.625rem;padding-left:.625rem}@media print,screen and (min-width:40em){.column,.columns{padding-right:.9375rem;padding-left:.9375rem}}.column:last-child:not(:first-child),.columns:last-child:not(:first-child){float:right}.column.end:last-child:last-child,.end.columns:last-child:last-child{float:left}.column.row.row,.row.row.columns{float:none}.row .column.row.row,.row .row.row.columns{margin-right:0;margin-left:0;padding-right:0;padding-left:0}.small-1{width:8.33333%}.small-push-1{position:relative;left:8.33333%}.small-pull-1{position:relative;left:-8.33333%}.small-offset-0{margin-left:0}.small-2{width:16.66667%}.small-push-2{position:relative;left:16.66667%}.small-pull-2{position:relative;left:-16.66667%}.small-offset-1{margin-left:8.33333%}.small-3{width:25%}.small-push-3{position:relative;left:25%}.small-pull-3{position:relative;left:-25%}.small-offset-2{margin-left:16.66667%}.small-4{width:33.33333%}.small-push-4{position:relative;left:33.33333%}.small-pull-4{position:relative;left:-33.33333%}.small-offset-3{margin-left:25%}.small-5{width:41.66667%}.small-push-5{position:relative;left:41.66667%}.small-pull-5{position:relative;left:-41.66667%}.small-offset-4{margin-left:33.33333%}.small-6{width:50%}.small-push-6{position:relative;left:50%}.small-pull-6{position:relative;left:-50%}.small-offset-5{margin-left:41.66667%}.small-7{width:58.33333%}.small-push-7{position:relative;left:58.33333%}.small-pull-7{position:relative;left:-58.33333%}.small-offset-6{margin-left:50%}.small-8{width:66.66667%}.small-push-8{position:relative;left:66.66667%}.small-pull-8{position:relative;left:-66.66667%}.small-offset-7{margin-left:58.33333%}.small-9{width:75%}.small-push-9{position:relative;left:75%}.small-pull-9{position:relative;left:-75%}.small-offset-8{margin-left:66.66667%}.small-10{width:83.33333%}.small-push-10{position:relative;left:83.33333%}.small-pull-10{position:relative;left:-83.33333%}.small-offset-9{margin-left:75%}.small-11{width:91.66667%}.small-push-11{position:relative;left:91.66667%}.small-pull-11{position:relative;left:-91.66667%}.small-offset-10{margin-left:83.33333%}.small-12{width:100%}.small-offset-11{margin-left:91.66667%}.small-up-1>.column,.small-up-1>.columns{float:left;width:100%}.small-up-1>.column:nth-of-type(1n),.small-up-1>.columns:nth-of-type(1n){clear:none}.small-up-1>.column:nth-of-type(1n+1),.small-up-1>.columns:nth-of-type(1n+1){clear:both}.small-up-1>.column:last-child,.small-up-1>.columns:last-child{float:left}.small-up-2>.column,.small-up-2>.columns{float:left;width:50%}.small-up-2>.column:nth-of-type(1n),.small-up-2>.columns:nth-of-type(1n){clear:none}.small-up-2>.column:nth-of-type(2n+1),.small-up-2>.columns:nth-of-type(2n+1){clear:both}.small-up-2>.column:last-child,.small-up-2>.columns:last-child{float:left}.small-up-3>.column,.small-up-3>.columns{float:left;width:33.33333%}.small-up-3>.column:nth-of-type(1n),.small-up-3>.columns:nth-of-type(1n){clear:none}.small-up-3>.column:nth-of-type(3n+1),.small-up-3>.columns:nth-of-type(3n+1){clear:both}.small-up-3>.column:last-child,.small-up-3>.columns:last-child{float:left}.small-up-4>.column,.small-up-4>.columns{float:left;width:25%}.small-up-4>.column:nth-of-type(1n),.small-up-4>.columns:nth-of-type(1n){clear:none}.small-up-4>.column:nth-of-type(4n+1),.small-up-4>.columns:nth-of-type(4n+1){clear:both}.small-up-4>.column:last-child,.small-up-4>.columns:last-child{float:left}.small-up-5>.column,.small-up-5>.columns{float:left;width:20%}.small-up-5>.column:nth-of-type(1n),.small-up-5>.columns:nth-of-type(1n){clear:none}.small-up-5>.column:nth-of-type(5n+1),.small-up-5>.columns:nth-of-type(5n+1){clear:both}.small-up-5>.column:last-child,.small-up-5>.columns:last-child{float:left}.small-up-6>.column,.small-up-6>.columns{float:left;width:16.66667%}.small-up-6>.column:nth-of-type(1n),.small-up-6>.columns:nth-of-type(1n){clear:none}.small-up-6>.column:nth-of-type(6n+1),.small-up-6>.columns:nth-of-type(6n+1){clear:both}.small-up-6>.column:last-child,.small-up-6>.columns:last-child{float:left}.small-up-7>.column,.small-up-7>.columns{float:left;width:14.28571%}.small-up-7>.column:nth-of-type(1n),.small-up-7>.columns:nth-of-type(1n){clear:none}.small-up-7>.column:nth-of-type(7n+1),.small-up-7>.columns:nth-of-type(7n+1){clear:both}.small-up-7>.column:last-child,.small-up-7>.columns:last-child{float:left}.small-up-8>.column,.small-up-8>.columns{float:left;width:12.5%}.small-up-8>.column:nth-of-type(1n),.small-up-8>.columns:nth-of-type(1n){clear:none}.small-up-8>.column:nth-of-type(8n+1),.small-up-8>.columns:nth-of-type(8n+1){clear:both}.small-up-8>.column:last-child,.small-up-8>.columns:last-child{float:left}.small-collapse>.column,.small-collapse>.columns{padding-right:0;padding-left:0}.expanded.row .small-collapse.row,.small-collapse .row{margin-right:0;margin-left:0}.small-uncollapse>.column,.small-uncollapse>.columns{padding-right:.625rem;padding-left:.625rem}.small-centered{margin-right:auto;margin-left:auto}.small-centered,.small-centered:last-child:not(:first-child){float:none;clear:both}.small-pull-0,.small-push-0,.small-uncentered{position:static;float:left;margin-right:0;margin-left:0}@media print,screen and (min-width:40em){.medium-1{width:8.33333%}.medium-push-1{position:relative;left:8.33333%}.medium-pull-1{position:relative;left:-8.33333%}.medium-offset-0{margin-left:0}.medium-2{width:16.66667%}.medium-push-2{position:relative;left:16.66667%}.medium-pull-2{position:relative;left:-16.66667%}.medium-offset-1{margin-left:8.33333%}.medium-3{width:25%}.medium-push-3{position:relative;left:25%}.medium-pull-3{position:relative;left:-25%}.medium-offset-2{margin-left:16.66667%}.medium-4{width:33.33333%}.medium-push-4{position:relative;left:33.33333%}.medium-pull-4{position:relative;left:-33.33333%}.medium-offset-3{margin-left:25%}.medium-5{width:41.66667%}.medium-push-5{position:relative;left:41.66667%}.medium-pull-5{position:relative;left:-41.66667%}.medium-offset-4{margin-left:33.33333%}.medium-6{width:50%}.medium-push-6{position:relative;left:50%}.medium-pull-6{position:relative;left:-50%}.medium-offset-5{margin-left:41.66667%}.medium-7{width:58.33333%}.medium-push-7{position:relative;left:58.33333%}.medium-pull-7{position:relative;left:-58.33333%}.medium-offset-6{margin-left:50%}.medium-8{width:66.66667%}.medium-push-8{position:relative;left:66.66667%}.medium-pull-8{position:relative;left:-66.66667%}.medium-offset-7{margin-left:58.33333%}.medium-9{width:75%}.medium-push-9{position:relative;left:75%}.medium-pull-9{position:relative;left:-75%}.medium-offset-8{margin-left:66.66667%}.medium-10{width:83.33333%}.medium-push-10{position:relative;left:83.33333%}.medium-pull-10{position:relative;left:-83.33333%}.medium-offset-9{margin-left:75%}.medium-11{width:91.66667%}.medium-push-11{position:relative;left:91.66667%}.medium-pull-11{position:relative;left:-91.66667%}.medium-offset-10{margin-left:83.33333%}.medium-12{width:100%}.medium-offset-11{margin-left:91.66667%}.medium-up-1>.column,.medium-up-1>.columns{float:left;width:100%}.medium-up-1>.column:nth-of-type(1n),.medium-up-1>.columns:nth-of-type(1n){clear:none}.medium-up-1>.column:nth-of-type(1n+1),.medium-up-1>.columns:nth-of-type(1n+1){clear:both}.medium-up-1>.column:last-child,.medium-up-1>.columns:last-child{float:left}.medium-up-2>.column,.medium-up-2>.columns{float:left;width:50%}.medium-up-2>.column:nth-of-type(1n),.medium-up-2>.columns:nth-of-type(1n){clear:none}.medium-up-2>.column:nth-of-type(2n+1),.medium-up-2>.columns:nth-of-type(2n+1){clear:both}.medium-up-2>.column:last-child,.medium-up-2>.columns:last-child{float:left}.medium-up-3>.column,.medium-up-3>.columns{float:left;width:33.33333%}.medium-up-3>.column:nth-of-type(1n),.medium-up-3>.columns:nth-of-type(1n){clear:none}.medium-up-3>.column:nth-of-type(3n+1),.medium-up-3>.columns:nth-of-type(3n+1){clear:both}.medium-up-3>.column:last-child,.medium-up-3>.columns:last-child{float:left}.medium-up-4>.column,.medium-up-4>.columns{float:left;width:25%}.medium-up-4>.column:nth-of-type(1n),.medium-up-4>.columns:nth-of-type(1n){clear:none}.medium-up-4>.column:nth-of-type(4n+1),.medium-up-4>.columns:nth-of-type(4n+1){clear:both}.medium-up-4>.column:last-child,.medium-up-4>.columns:last-child{float:left}.medium-up-5>.column,.medium-up-5>.columns{float:left;width:20%}.medium-up-5>.column:nth-of-type(1n),.medium-up-5>.columns:nth-of-type(1n){clear:none}.medium-up-5>.column:nth-of-type(5n+1),.medium-up-5>.columns:nth-of-type(5n+1){clear:both}.medium-up-5>.column:last-child,.medium-up-5>.columns:last-child{float:left}.medium-up-6>.column,.medium-up-6>.columns{float:left;width:16.66667%}.medium-up-6>.column:nth-of-type(1n),.medium-up-6>.columns:nth-of-type(1n){clear:none}.medium-up-6>.column:nth-of-type(6n+1),.medium-up-6>.columns:nth-of-type(6n+1){clear:both}.medium-up-6>.column:last-child,.medium-up-6>.columns:last-child{float:left}.medium-up-7>.column,.medium-up-7>.columns{float:left;width:14.28571%}.medium-up-7>.column:nth-of-type(1n),.medium-up-7>.columns:nth-of-type(1n){clear:none}.medium-up-7>.column:nth-of-type(7n+1),.medium-up-7>.columns:nth-of-type(7n+1){clear:both}.medium-up-7>.column:last-child,.medium-up-7>.columns:last-child{float:left}.medium-up-8>.column,.medium-up-8>.columns{float:left;width:12.5%}.medium-up-8>.column:nth-of-type(1n),.medium-up-8>.columns:nth-of-type(1n){clear:none}.medium-up-8>.column:nth-of-type(8n+1),.medium-up-8>.columns:nth-of-type(8n+1){clear:both}.medium-up-8>.column:last-child,.medium-up-8>.columns:last-child{float:left}.medium-collapse>.column,.medium-collapse>.columns{padding-right:0;padding-left:0}.expanded.row .medium-collapse.row,.medium-collapse .row{margin-right:0;margin-left:0}.medium-uncollapse>.column,.medium-uncollapse>.columns{padding-right:.9375rem;padding-left:.9375rem}.medium-centered{margin-right:auto;margin-left:auto}.medium-centered,.medium-centered:last-child:not(:first-child){float:none;clear:both}.medium-pull-0,.medium-push-0,.medium-uncentered{position:static;float:left;margin-right:0;margin-left:0}}@media print,screen and (min-width:64em){.large-1{width:8.33333%}.large-push-1{position:relative;left:8.33333%}.large-pull-1{position:relative;left:-8.33333%}.large-offset-0{margin-left:0}.large-2{width:16.66667%}.large-push-2{position:relative;left:16.66667%}.large-pull-2{position:relative;left:-16.66667%}.large-offset-1{margin-left:8.33333%}.large-3{width:25%}.large-push-3{position:relative;left:25%}.large-pull-3{position:relative;left:-25%}.large-offset-2{margin-left:16.66667%}.large-4{width:33.33333%}.large-push-4{position:relative;left:33.33333%}.large-pull-4{position:relative;left:-33.33333%}.large-offset-3{margin-left:25%}.large-5{width:41.66667%}.large-push-5{position:relative;left:41.66667%}.large-pull-5{position:relative;left:-41.66667%}.large-offset-4{margin-left:33.33333%}.large-6{width:50%}.large-push-6{position:relative;left:50%}.large-pull-6{position:relative;left:-50%}.large-offset-5{margin-left:41.66667%}.large-7{width:58.33333%}.large-push-7{position:relative;left:58.33333%}.large-pull-7{position:relative;left:-58.33333%}.large-offset-6{margin-left:50%}.large-8{width:66.66667%}.large-push-8{position:relative;left:66.66667%}.large-pull-8{position:relative;left:-66.66667%}.large-offset-7{margin-left:58.33333%}.large-9{width:75%}.large-push-9{position:relative;left:75%}.large-pull-9{position:relative;left:-75%}.large-offset-8{margin-left:66.66667%}.large-10{width:83.33333%}.large-push-10{position:relative;left:83.33333%}.large-pull-10{position:relative;left:-83.33333%}.large-offset-9{margin-left:75%}.large-11{width:91.66667%}.large-push-11{position:relative;left:91.66667%}.large-pull-11{position:relative;left:-91.66667%}.large-offset-10{margin-left:83.33333%}.large-12{width:100%}.large-offset-11{margin-left:91.66667%}.large-up-1>.column,.large-up-1>.columns{float:left;width:100%}.large-up-1>.column:nth-of-type(1n),.large-up-1>.columns:nth-of-type(1n){clear:none}.large-up-1>.column:nth-of-type(1n+1),.large-up-1>.columns:nth-of-type(1n+1){clear:both}.large-up-1>.column:last-child,.large-up-1>.columns:last-child{float:left}.large-up-2>.column,.large-up-2>.columns{float:left;width:50%}.large-up-2>.column:nth-of-type(1n),.large-up-2>.columns:nth-of-type(1n){clear:none}.large-up-2>.column:nth-of-type(2n+1),.large-up-2>.columns:nth-of-type(2n+1){clear:both}.large-up-2>.column:last-child,.large-up-2>.columns:last-child{float:left}.large-up-3>.column,.large-up-3>.columns{float:left;width:33.33333%}.large-up-3>.column:nth-of-type(1n),.large-up-3>.columns:nth-of-type(1n){clear:none}.large-up-3>.column:nth-of-type(3n+1),.large-up-3>.columns:nth-of-type(3n+1){clear:both}.large-up-3>.column:last-child,.large-up-3>.columns:last-child{float:left}.large-up-4>.column,.large-up-4>.columns{float:left;width:25%}.large-up-4>.column:nth-of-type(1n),.large-up-4>.columns:nth-of-type(1n){clear:none}.large-up-4>.column:nth-of-type(4n+1),.large-up-4>.columns:nth-of-type(4n+1){clear:both}.large-up-4>.column:last-child,.large-up-4>.columns:last-child{float:left}.large-up-5>.column,.large-up-5>.columns{float:left;width:20%}.large-up-5>.column:nth-of-type(1n),.large-up-5>.columns:nth-of-type(1n){clear:none}.large-up-5>.column:nth-of-type(5n+1),.large-up-5>.columns:nth-of-type(5n+1){clear:both}.large-up-5>.column:last-child,.large-up-5>.columns:last-child{float:left}.large-up-6>.column,.large-up-6>.columns{float:left;width:16.66667%}.large-up-6>.column:nth-of-type(1n),.large-up-6>.columns:nth-of-type(1n){clear:none}.large-up-6>.column:nth-of-type(6n+1),.large-up-6>.columns:nth-of-type(6n+1){clear:both}.large-up-6>.column:last-child,.large-up-6>.columns:last-child{float:left}.large-up-7>.column,.large-up-7>.columns{float:left;width:14.28571%}.large-up-7>.column:nth-of-type(1n),.large-up-7>.columns:nth-of-type(1n){clear:none}.large-up-7>.column:nth-of-type(7n+1),.large-up-7>.columns:nth-of-type(7n+1){clear:both}.large-up-7>.column:last-child,.large-up-7>.columns:last-child{float:left}.large-up-8>.column,.large-up-8>.columns{float:left;width:12.5%}.large-up-8>.column:nth-of-type(1n),.large-up-8>.columns:nth-of-type(1n){clear:none}.large-up-8>.column:nth-of-type(8n+1),.large-up-8>.columns:nth-of-type(8n+1){clear:both}.large-up-8>.column:last-child,.large-up-8>.columns:last-child{float:left}.large-collapse>.column,.large-collapse>.columns{padding-right:0;padding-left:0}.expanded.row .large-collapse.row,.large-collapse .row{margin-right:0;margin-left:0}.large-uncollapse>.column,.large-uncollapse>.columns{padding-right:.9375rem;padding-left:.9375rem}.large-centered{margin-right:auto;margin-left:auto}.large-centered,.large-centered:last-child:not(:first-child){float:none;clear:both}.large-pull-0,.large-push-0,.large-uncentered{position:static;float:left;margin-right:0;margin-left:0}}.column-block{margin-bottom:1.25rem}.column-block>:last-child{margin-bottom:0}@media print,screen and (min-width:40em){.column-block{margin-bottom:1.875rem}.column-block>:last-child{margin-bottom:0}}blockquote,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,li,ol,p,pre,td,th,ul{margin:0;padding:0}p{margin-bottom:1rem;font-size:inherit;line-height:1.6;text-rendering:optimizeLegibility}em,i{font-style:italic}b,em,i,strong{line-height:inherit}b,strong{font-weight:700}small{font-size:80%;line-height:inherit}h1,h2,h3,h4,h5,h6{font-family:Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-style:normal;font-weight:400;color:inherit;text-rendering:optimizeLegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{line-height:0;color:#cacaca}h1{font-size:1.5rem}h1,h2{line-height:1.4;margin-top:0;margin-bottom:.5rem}h2{font-size:1.25rem}h3{font-size:1.1875rem}h3,h4{line-height:1.4;margin-top:0;margin-bottom:.5rem}h4{font-size:1.125rem}h5{font-size:1.0625rem}h5,h6{line-height:1.4;margin-top:0;margin-bottom:.5rem}h6{font-size:1rem}@media print,screen and (min-width:40em){h1{font-size:3rem}h2{font-size:2.5rem}h3{font-size:1.9375rem}h4{font-size:1.5625rem}h5{font-size:1.25rem}h6{font-size:1rem}}a{line-height:inherit;color:#1779ba;text-decoration:none;cursor:pointer}a:focus,a:hover{color:#1468a0}a img{border:0}hr{clear:both;max-width:75rem;height:0;margin:1.25rem auto;border-top:0;border-right:0;border-bottom:1px solid #cacaca;border-left:0}dl,ol,ul{margin-bottom:1rem;list-style-position:outside;line-height:1.6}li{font-size:inherit}ul{list-style-type:disc}ol,ul{margin-left:1.25rem}ol ol,ol ul,ul ol,ul ul{margin-left:1.25rem;margin-bottom:0}dl{margin-bottom:1rem}dl dt{margin-bottom:.3rem;font-weight:700}blockquote{margin:0 0 1rem;padding:.5625rem 1.25rem 0 1.1875rem;border-left:1px solid #cacaca}blockquote,blockquote p{line-height:1.6;color:#8a8a8a}cite{display:block;font-size:.8125rem;color:#8a8a8a}cite:before{content:"— "}abbr{border-bottom:1px dotted #0a0a0a;color:#0a0a0a;cursor:help}figure{margin:0}code{padding:.125rem .3125rem .0625rem;border:1px solid #cacaca;font-weight:400}code,kbd{background-color:#e6e6e6;font-family:Consolas,Liberation Mono,Courier,monospace;color:#0a0a0a}kbd{margin:0;padding:.125rem .25rem 0}.subheader{margin-top:.2rem;margin-bottom:.5rem;font-weight:400;line-height:1.4;color:#8a8a8a}.lead{font-size:125%;line-height:1.6}.stat{font-size:2.5rem;line-height:1}p+.stat{margin-top:-1rem}.no-bullet{margin-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}@media print,screen and (min-width:40em){.medium-text-left{text-align:left}.medium-text-right{text-align:right}.medium-text-center{text-align:center}.medium-text-justify{text-align:justify}}@media print,screen and (min-width:64em){.large-text-left{text-align:left}.large-text-right{text-align:right}.large-text-center{text-align:center}.large-text-justify{text-align:justify}}.show-for-print{display:none!important}@media print{*{background:transparent!important;box-shadow:none!important;color:#000!important;text-shadow:none!important}.show-for-print{display:block!important}.hide-for-print{display:none!important}table.show-for-print{display:table!important}thead.show-for-print{display:table-header-group!important}tbody.show-for-print{display:table-row-group!important}tr.show-for-print{display:table-row!important}td.show-for-print,th.show-for-print{display:table-cell!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}abbr[title]:after{content:" (" attr(title) ")"}blockquote,pre{border:1px solid #8a8a8a;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}.button{display:inline-block;vertical-align:middle;margin:0 0 1rem;padding:.85em 1em;-webkit-appearance:none;border:1px solid transparent;border-radius:0;transition:background-color .25s ease-out,color .25s ease-out;font-size:.9rem;line-height:1;text-align:center;cursor:pointer;background-color:#1779ba;color:#fefefe}[data-whatinput=mouse] .button{outline:0}.button:focus,.button:hover{background-color:#14679e;color:#fefefe}.button.tiny{font-size:.6rem}.button.small{font-size:.75rem}.button.large{font-size:1.25rem}.button.expanded{display:block;width:100%;margin-right:0;margin-left:0}.button.primary{background-color:#1779ba;color:#fefefe}.button.primary:focus,.button.primary:hover{background-color:#126195;color:#fefefe}.button.secondary{background-color:#767676;color:#fefefe}.button.secondary:focus,.button.secondary:hover{background-color:#5e5e5e;color:#fefefe}.button.success{background-color:#3adb76;color:#0a0a0a}.button.success:focus,.button.success:hover{background-color:#22bb5b;color:#0a0a0a}.button.warning{background-color:#ffae00;color:#0a0a0a}.button.warning:focus,.button.warning:hover{background-color:#cc8b00;color:#0a0a0a}.button.alert{background-color:#cc4b37;color:#fefefe}.button.alert:focus,.button.alert:hover{background-color:#a53b2a;color:#fefefe}.button.hollow{border:1px solid #1779ba;color:#1779ba}.button.hollow,.button.hollow:focus,.button.hollow:hover{background-color:transparent}.button.hollow:focus,.button.hollow:hover{border-color:#0c3d5d;color:#0c3d5d}.button.hollow.primary{border:1px solid #1779ba;color:#1779ba}.button.hollow.primary:focus,.button.hollow.primary:hover{border-color:#0c3d5d;color:#0c3d5d}.button.hollow.secondary{border:1px solid #767676;color:#767676}.button.hollow.secondary:focus,.button.hollow.secondary:hover{border-color:#3b3b3b;color:#3b3b3b}.button.hollow.success{border:1px solid #3adb76;color:#3adb76}.button.hollow.success:focus,.button.hollow.success:hover{border-color:#157539;color:#157539}.button.hollow.warning{border:1px solid #ffae00;color:#ffae00}.button.hollow.warning:focus,.button.hollow.warning:hover{border-color:#805700;color:#805700}.button.hollow.alert{border:1px solid #cc4b37;color:#cc4b37}.button.hollow.alert:focus,.button.hollow.alert:hover{border-color:#67251a;color:#67251a}.button.disabled,.button[disabled]{opacity:.25;cursor:not-allowed}.button.disabled,.button.disabled:focus,.button.disabled:hover,.button[disabled],.button[disabled]:focus,.button[disabled]:hover{background-color:#1779ba;color:#fefefe}.button.disabled.primary,.button[disabled].primary{opacity:.25;cursor:not-allowed}.button.disabled.primary,.button.disabled.primary:focus,.button.disabled.primary:hover,.button[disabled].primary,.button[disabled].primary:focus,.button[disabled].primary:hover{background-color:#1779ba;color:#fefefe}.button.disabled.secondary,.button[disabled].secondary{opacity:.25;cursor:not-allowed}.button.disabled.secondary,.button.disabled.secondary:focus,.button.disabled.secondary:hover,.button[disabled].secondary,.button[disabled].secondary:focus,.button[disabled].secondary:hover{background-color:#767676;color:#fefefe}.button.disabled.success,.button[disabled].success{opacity:.25;cursor:not-allowed}.button.disabled.success,.button.disabled.success:focus,.button.disabled.success:hover,.button[disabled].success,.button[disabled].success:focus,.button[disabled].success:hover{background-color:#3adb76;color:#0a0a0a}.button.disabled.warning,.button[disabled].warning{opacity:.25;cursor:not-allowed}.button.disabled.warning,.button.disabled.warning:focus,.button.disabled.warning:hover,.button[disabled].warning,.button[disabled].warning:focus,.button[disabled].warning:hover{background-color:#ffae00;color:#0a0a0a}.button.disabled.alert,.button[disabled].alert{opacity:.25;cursor:not-allowed}.button.disabled.alert,.button.disabled.alert:focus,.button.disabled.alert:hover,.button[disabled].alert,.button[disabled].alert:focus,.button[disabled].alert:hover{background-color:#cc4b37;color:#fefefe}.button.dropdown:after{display:block;width:0;height:0;border:.4em inset;content:"";border-bottom-width:0;border-top-style:solid;border-color:#fefefe transparent transparent;position:relative;top:.4em;display:inline-block;float:right;margin-left:1em}.button.arrow-only:after{top:-.1em;float:none;margin-left:0}[type=color],[type=date],[type=datetime-local],[type=datetime],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],textarea{display:block;box-sizing:border-box;width:100%;height:2.4375rem;margin:0 0 1rem;padding:.5rem;border:1px solid #cacaca;border-radius:0;background-color:#fefefe;box-shadow:inset 0 1px 2px hsla(0,0%,4%,.1);font-family:inherit;font-size:1rem;font-weight:400;color:#0a0a0a;transition:box-shadow .5s,border-color .25s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}[type=color]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=datetime]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,textarea:focus{outline:none;border:1px solid #8a8a8a;background-color:#fefefe;box-shadow:0 0 5px #cacaca;transition:box-shadow .5s,border-color .25s ease-in-out}textarea{max-width:100%}textarea[rows]{height:auto}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#cacaca}input::-moz-placeholder,textarea::-moz-placeholder{color:#cacaca}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#cacaca}input::placeholder,textarea::placeholder{color:#cacaca}input:disabled,input[readonly],textarea:disabled,textarea[readonly]{background-color:#e6e6e6;cursor:not-allowed}[type=button],[type=submit]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0}input[type=search]{box-sizing:border-box}[type=checkbox],[type=file],[type=radio]{margin:0 0 1rem}[type=checkbox]+label,[type=radio]+label{display:inline-block;vertical-align:baseline;margin-left:.5rem;margin-right:1rem;margin-bottom:0}[type=checkbox]+label[for],[type=radio]+label[for]{cursor:pointer}label>[type=checkbox],label>[type=radio]{margin-right:.5rem}[type=file]{width:100%}label{display:block;margin:0;font-size:.875rem;font-weight:400;line-height:1.8;color:#0a0a0a}label.middle{margin:0 0 1rem;padding:.5625rem 0}.help-text{margin-top:-.5rem;font-size:.8125rem;font-style:italic;color:#0a0a0a}.input-group{display:table;width:100%;margin-bottom:1rem}.input-group>:first-child,.input-group>:last-child>*{border-radius:0 0 0 0}.input-group-button,.input-group-button a,.input-group-button button,.input-group-button input,.input-group-button label,.input-group-field,.input-group-label{margin:0;white-space:nowrap;display:table-cell;vertical-align:middle}.input-group-label{padding:0 1rem;border:1px solid #cacaca;background:#e6e6e6;color:#0a0a0a;text-align:center;white-space:nowrap;width:1%;height:100%}.input-group-label:first-child{border-right:0}.input-group-label:last-child{border-left:0}.input-group-field{border-radius:0;height:2.5rem}.input-group-button{padding-top:0;padding-bottom:0;text-align:center;width:1%;height:100%}.input-group-button a,.input-group-button button,.input-group-button input,.input-group-button label{height:2.5rem;padding-top:0;padding-bottom:0;font-size:1rem}.input-group .input-group-button{display:table-cell}fieldset{margin:0;padding:0;border:0}legend{max-width:100%;margin-bottom:.5rem}.fieldset{margin:1.125rem 0;padding:1.25rem;border:1px solid #cacaca}.fieldset legend{margin:0;margin-left:-.1875rem;padding:0 .1875rem;background:#fefefe}select{height:2.4375rem;margin:0 0 1rem;padding:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid #cacaca;border-radius:0;background-color:#fefefe;font-family:inherit;font-size:1rem;line-height:normal;color:#0a0a0a;background-image:url("data:image/svg+xml;utf8,");background-origin:content-box;background-position:right -1rem center;background-repeat:no-repeat;background-size:9px 6px;padding-right:1.5rem;transition:box-shadow .5s,border-color .25s ease-in-out}@media screen and (min-width:0\0){select{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAYCAYAAACbU/80AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIpJREFUeNrEkckNgDAMBBfRkEt0ObRBBdsGXUDgmQfK4XhH2m8czQAAy27R3tsw4Qfe2x8uOO6oYLb6GlOor3GF+swURAOmUJ+RwtEJs9WvTGEYxBXqI1MQAZhCfUQKRzDMVj+TwrAIV6jvSUEkYAr1LSkcyTBb/V+KYfX7xAeusq3sLDtGH3kEGACPWIflNZfhRQAAAABJRU5ErkJggg==")}}select:focus{outline:none;border:1px solid #8a8a8a;background-color:#fefefe;box-shadow:0 0 5px #cacaca;transition:box-shadow .5s,border-color .25s ease-in-out}select:disabled{background-color:#e6e6e6;cursor:not-allowed}select::-ms-expand{display:none}select[multiple]{height:auto;background-image:none}.is-invalid-input:not(:focus){border-color:#cc4b37;background-color:#f9ecea}.is-invalid-input:not(:focus)::-webkit-input-placeholder{color:#cc4b37}.is-invalid-input:not(:focus)::-moz-placeholder{color:#cc4b37}.is-invalid-input:not(:focus):-ms-input-placeholder{color:#cc4b37}.form-error,.is-invalid-input:not(:focus)::placeholder,.is-invalid-label{color:#cc4b37}.form-error{display:none;margin-top:-.5rem;margin-bottom:1rem;font-size:.75rem;font-weight:700}.form-error.is-visible{display:block}.accordion{margin-left:0;background:#fefefe;list-style-type:none}.accordion-item:first-child>:first-child,.accordion-item:last-child>:last-child{border-radius:0 0 0 0}.accordion-title{position:relative;display:block;padding:1.25rem 1rem;border:1px solid #e6e6e6;border-bottom:0;font-size:.75rem;line-height:1;color:#1779ba}:last-child:not(.is-active)>.accordion-title{border-bottom:1px solid #e6e6e6;border-radius:0 0 0 0}.accordion-title:focus,.accordion-title:hover{background-color:#e6e6e6}.accordion-title:before{position:absolute;top:50%;right:1rem;margin-top:-.5rem;content:"+"}.is-active>.accordion-title:before{content:"\2013"}.accordion-content{display:none;padding:1rem;border:1px solid #e6e6e6;border-bottom:0;background-color:#fefefe;color:#0a0a0a}:last-child>.accordion-content:last-child{border-bottom:1px solid #e6e6e6}.is-accordion-submenu-parent>a{position:relative}.is-accordion-submenu-parent>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-bottom-width:0;border-top-style:solid;border-color:#1779ba transparent transparent;position:absolute;top:50%;margin-top:-3px;right:1rem}.is-accordion-submenu-parent[aria-expanded=true]>a:after{transform:rotate(180deg);transform-origin:50% 50%}.badge{display:inline-block;min-width:2.1em;padding:.3em;border-radius:50%;font-size:.6rem;text-align:center}.badge,.badge.primary{background:#1779ba;color:#fefefe}.badge.secondary{background:#767676;color:#fefefe}.badge.success{background:#3adb76;color:#0a0a0a}.badge.warning{background:#ffae00;color:#0a0a0a}.badge.alert{background:#cc4b37;color:#fefefe}.breadcrumbs{margin:0 0 1rem;list-style:none}.breadcrumbs:after,.breadcrumbs:before{display:table;content:" "}.breadcrumbs:after{clear:both}.breadcrumbs li{float:left;font-size:.6875rem;color:#0a0a0a;cursor:default;text-transform:uppercase}.breadcrumbs li:not(:last-child):after{position:relative;top:1px;margin:0 .75rem;opacity:1;content:"/";color:#cacaca}.breadcrumbs a{color:#1779ba}.breadcrumbs a:hover{text-decoration:underline}.breadcrumbs .disabled{color:#cacaca;cursor:not-allowed}.button-group{margin-bottom:1rem;font-size:0}.button-group:after,.button-group:before{display:table;content:" "}.button-group:after{clear:both}.button-group .button{margin:0;margin-right:1px;margin-bottom:1px;font-size:.9rem}.button-group .button:last-child{margin-right:0}.button-group.tiny .button{font-size:.6rem}.button-group.small .button{font-size:.75rem}.button-group.large .button{font-size:1.25rem}.button-group.expanded{margin-right:-1px}.button-group.expanded:after,.button-group.expanded:before{display:none}.button-group.expanded .button:first-child:last-child{width:100%}.button-group.expanded .button:first-child:nth-last-child(2),.button-group.expanded .button:first-child:nth-last-child(2):first-child:nth-last-child(2)~.button{display:inline-block;width:calc(50% - 1px);margin-right:1px}.button-group.expanded .button:first-child:nth-last-child(2):first-child:nth-last-child(2)~.button:last-child,.button-group.expanded .button:first-child:nth-last-child(2):last-child{margin-right:-6px}.button-group.expanded .button:first-child:nth-last-child(3),.button-group.expanded .button:first-child:nth-last-child(3):first-child:nth-last-child(3)~.button{display:inline-block;width:calc(33.33333% - 1px);margin-right:1px}.button-group.expanded .button:first-child:nth-last-child(3):first-child:nth-last-child(3)~.button:last-child,.button-group.expanded .button:first-child:nth-last-child(3):last-child{margin-right:-6px}.button-group.expanded .button:first-child:nth-last-child(4),.button-group.expanded .button:first-child:nth-last-child(4):first-child:nth-last-child(4)~.button{display:inline-block;width:calc(25% - 1px);margin-right:1px}.button-group.expanded .button:first-child:nth-last-child(4):first-child:nth-last-child(4)~.button:last-child,.button-group.expanded .button:first-child:nth-last-child(4):last-child{margin-right:-6px}.button-group.expanded .button:first-child:nth-last-child(5),.button-group.expanded .button:first-child:nth-last-child(5):first-child:nth-last-child(5)~.button{display:inline-block;width:calc(20% - 1px);margin-right:1px}.button-group.expanded .button:first-child:nth-last-child(5):first-child:nth-last-child(5)~.button:last-child,.button-group.expanded .button:first-child:nth-last-child(5):last-child{margin-right:-6px}.button-group.expanded .button:first-child:nth-last-child(6),.button-group.expanded .button:first-child:nth-last-child(6):first-child:nth-last-child(6)~.button{display:inline-block;width:calc(16.66667% - 1px);margin-right:1px}.button-group.expanded .button:first-child:nth-last-child(6):first-child:nth-last-child(6)~.button:last-child,.button-group.expanded .button:first-child:nth-last-child(6):last-child{margin-right:-6px}.button-group.primary .button{background-color:#1779ba;color:#fefefe}.button-group.primary .button:focus,.button-group.primary .button:hover{background-color:#126195;color:#fefefe}.button-group.secondary .button{background-color:#767676;color:#fefefe}.button-group.secondary .button:focus,.button-group.secondary .button:hover{background-color:#5e5e5e;color:#fefefe}.button-group.success .button{background-color:#3adb76;color:#0a0a0a}.button-group.success .button:focus,.button-group.success .button:hover{background-color:#22bb5b;color:#0a0a0a}.button-group.warning .button{background-color:#ffae00;color:#0a0a0a}.button-group.warning .button:focus,.button-group.warning .button:hover{background-color:#cc8b00;color:#0a0a0a}.button-group.alert .button{background-color:#cc4b37;color:#fefefe}.button-group.alert .button:focus,.button-group.alert .button:hover{background-color:#a53b2a;color:#fefefe}.button-group.stacked-for-medium .button,.button-group.stacked-for-small .button,.button-group.stacked .button{width:100%}.button-group.stacked-for-medium .button:last-child,.button-group.stacked-for-small .button:last-child,.button-group.stacked .button:last-child{margin-bottom:0}@media print,screen and (min-width:40em){.button-group.stacked-for-small .button{width:auto;margin-bottom:0}}@media print,screen and (min-width:64em){.button-group.stacked-for-medium .button{width:auto;margin-bottom:0}}@media screen and (max-width:39.9375em){.button-group.stacked-for-small.expanded{display:block}.button-group.stacked-for-small.expanded .button{display:block;margin-right:0}}.card{margin-bottom:1rem;border:1px solid #e6e6e6;border-radius:0;background:#fefefe;box-shadow:none;overflow:hidden;color:#0a0a0a}.card>:last-child{margin-bottom:0}.card-divider{padding:1rem;background:#e6e6e6}.card-divider>:last-child{margin-bottom:0}.card-section{padding:1rem}.card-section>:last-child{margin-bottom:0}.callout{position:relative;margin:0 0 1rem;padding:1rem;border:1px solid hsla(0,0%,4%,.25);border-radius:0;background-color:#fff;color:#0a0a0a}.callout>:first-child{margin-top:0}.callout>:last-child{margin-bottom:0}.callout.primary{background-color:#d7ecfa;color:#0a0a0a}.callout.secondary{background-color:#eaeaea;color:#0a0a0a}.callout.success{background-color:#e1faea;color:#0a0a0a}.callout.warning{background-color:#fff3d9;color:#0a0a0a}.callout.alert{background-color:#f7e4e1;color:#0a0a0a}.callout.small{padding:.5rem}.callout.large{padding:3rem}.close-button{position:absolute;color:#8a8a8a;cursor:pointer}[data-whatinput=mouse] .close-button{outline:0}.close-button:focus,.close-button:hover{color:#0a0a0a}.close-button.small{right:.66rem;top:.33em;font-size:1.5em;line-height:1}.close-button,.close-button.medium{right:1rem;top:.5rem;font-size:2em;line-height:1}.menu{margin:0;list-style-type:none}.menu>li{display:table-cell;vertical-align:middle}[data-whatinput=mouse] .menu>li{outline:0}.menu>li>a{display:block;padding:.7rem 1rem;line-height:1}.menu a,.menu button,.menu input,.menu select{margin-bottom:0}.menu>li>a i,.menu>li>a i+span,.menu>li>a img,.menu>li>a img+span,.menu>li>a svg,.menu>li>a svg+span{vertical-align:middle}.menu>li>a i,.menu>li>a img,.menu>li>a svg{margin-right:.25rem;display:inline-block}.menu.horizontal>li,.menu>li{display:table-cell}.menu.expanded{display:table;width:100%;table-layout:fixed}.menu.expanded>li:first-child:last-child{width:100%}.menu.vertical>li{display:block}@media print,screen and (min-width:40em){.menu.medium-horizontal>li{display:table-cell}.menu.medium-expanded{display:table;width:100%;table-layout:fixed}.menu.medium-expanded>li:first-child:last-child{width:100%}.menu.medium-vertical>li{display:block}}@media print,screen and (min-width:64em){.menu.large-horizontal>li{display:table-cell}.menu.large-expanded{display:table;width:100%;table-layout:fixed}.menu.large-expanded>li:first-child:last-child{width:100%}.menu.large-vertical>li{display:block}}.menu.simple li{display:inline-block;vertical-align:top;line-height:1}.menu.simple a{padding:0}.menu.simple li{margin-left:0;margin-right:1rem}.menu.simple.align-right li{margin-right:0;margin-left:1rem}.menu.align-right:after,.menu.align-right:before{display:table;content:" "}.menu.align-right:after{clear:both}.menu.align-right>li{float:right}.menu.icon-top>li>a{text-align:center}.menu.icon-top>li>a i,.menu.icon-top>li>a img,.menu.icon-top>li>a svg{display:block;margin:0 auto .25rem}.menu.icon-top.vertical a>span{margin:auto}.menu.nested{margin-left:1rem}.menu .active>a{background:#1779ba;color:#fefefe}.menu.menu-bordered li{border:1px solid #e6e6e6}.menu.menu-bordered li:not(:first-child){border-top:0}.menu.menu-hover li:hover{background-color:#e6e6e6}.menu-text{padding-top:0;padding-bottom:0;padding:.7rem 1rem;font-weight:700;line-height:1;color:inherit}.menu-centered{text-align:center}.menu-centered>.menu{display:inline-block;vertical-align:top}.no-js [data-responsive-menu] ul{display:none}.menu-icon{position:relative;display:inline-block;vertical-align:middle;width:20px;height:16px;cursor:pointer}.menu-icon:after{position:absolute;top:0;left:0;display:block;width:100%;height:2px;background:#fefefe;box-shadow:0 7px 0 #fefefe,0 14px 0 #fefefe;content:""}.menu-icon:hover:after{background:#cacaca;box-shadow:0 7px 0 #cacaca,0 14px 0 #cacaca}.menu-icon.dark{position:relative;display:inline-block;vertical-align:middle;width:20px;height:16px;cursor:pointer}.menu-icon.dark:after{position:absolute;top:0;left:0;display:block;width:100%;height:2px;background:#0a0a0a;box-shadow:0 7px 0 #0a0a0a,0 14px 0 #0a0a0a;content:""}.menu-icon.dark:hover:after{background:#8a8a8a;box-shadow:0 7px 0 #8a8a8a,0 14px 0 #8a8a8a}.is-drilldown{position:relative;overflow:hidden}.is-drilldown li{display:block}.is-drilldown.animate-height{transition:height .5s}.is-drilldown-submenu{position:absolute;top:0;left:100%;z-index:-1;width:100%;background:#fefefe;transition:transform .15s linear}.is-drilldown-submenu.is-active{z-index:1;display:block;transform:translateX(-100%)}.is-drilldown-submenu.is-closing{transform:translateX(100%)}.drilldown-submenu-cover-previous{min-height:100%}.is-drilldown-submenu-parent>a{position:relative}.is-drilldown-submenu-parent>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #1779ba;position:absolute;top:50%;margin-top:-6px;right:1rem}.js-drilldown-back>a:before{display:block;width:0;height:0;border:6px inset;content:"";border-right-style:solid;border-color:transparent #1779ba transparent transparent;display:inline-block;vertical-align:middle;margin-right:.75rem;border-left-width:0}.dropdown-pane{position:absolute;z-index:10;display:block;width:300px;padding:1rem;visibility:hidden;border:1px solid #cacaca;border-radius:0;background-color:#fefefe;font-size:1rem}.dropdown-pane.is-open{visibility:visible}.dropdown-pane.tiny{width:100px}.dropdown-pane.small{width:200px}.dropdown-pane.large{width:400px}.dropdown.menu>li.opens-left>.is-dropdown-submenu{top:100%;right:0;left:auto}.dropdown.menu>li.opens-right>.is-dropdown-submenu{top:100%;right:auto;left:0}.dropdown.menu>li.is-dropdown-submenu-parent>a{position:relative;padding-right:1.5rem}.dropdown.menu>li.is-dropdown-submenu-parent>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-bottom-width:0;border-top-style:solid;border-color:#1779ba transparent transparent;right:5px;margin-top:-3px}[data-whatinput=mouse] .dropdown.menu a{outline:0}.no-js .dropdown.menu ul{display:none}.dropdown.menu.vertical>li .is-dropdown-submenu{top:0}.dropdown.menu.vertical>li.opens-left>.is-dropdown-submenu{right:100%;left:auto}.dropdown.menu.vertical>li.opens-right>.is-dropdown-submenu{right:auto;left:100%}.dropdown.menu.vertical>li>a:after{right:14px}.dropdown.menu.vertical>li.opens-left>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-left-width:0;border-right-style:solid;border-color:transparent #1779ba transparent transparent}.dropdown.menu.vertical>li.opens-right>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #1779ba}@media print,screen and (min-width:40em){.dropdown.menu.medium-horizontal>li.opens-left>.is-dropdown-submenu{top:100%;right:0;left:auto}.dropdown.menu.medium-horizontal>li.opens-right>.is-dropdown-submenu{top:100%;right:auto;left:0}.dropdown.menu.medium-horizontal>li.is-dropdown-submenu-parent>a{position:relative;padding-right:1.5rem}.dropdown.menu.medium-horizontal>li.is-dropdown-submenu-parent>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-bottom-width:0;border-top-style:solid;border-color:#1779ba transparent transparent;right:5px;margin-top:-3px}.dropdown.menu.medium-vertical>li .is-dropdown-submenu{top:0}.dropdown.menu.medium-vertical>li.opens-left>.is-dropdown-submenu{right:100%;left:auto}.dropdown.menu.medium-vertical>li.opens-right>.is-dropdown-submenu{right:auto;left:100%}.dropdown.menu.medium-vertical>li>a:after{right:14px}.dropdown.menu.medium-vertical>li.opens-left>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-left-width:0;border-right-style:solid;border-color:transparent #1779ba transparent transparent}.dropdown.menu.medium-vertical>li.opens-right>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #1779ba}}@media print,screen and (min-width:64em){.dropdown.menu.large-horizontal>li.opens-left>.is-dropdown-submenu{top:100%;right:0;left:auto}.dropdown.menu.large-horizontal>li.opens-right>.is-dropdown-submenu{top:100%;right:auto;left:0}.dropdown.menu.large-horizontal>li.is-dropdown-submenu-parent>a{position:relative;padding-right:1.5rem}.dropdown.menu.large-horizontal>li.is-dropdown-submenu-parent>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-bottom-width:0;border-top-style:solid;border-color:#1779ba transparent transparent;right:5px;margin-top:-3px}.dropdown.menu.large-vertical>li .is-dropdown-submenu{top:0}.dropdown.menu.large-vertical>li.opens-left>.is-dropdown-submenu{right:100%;left:auto}.dropdown.menu.large-vertical>li.opens-right>.is-dropdown-submenu{right:auto;left:100%}.dropdown.menu.large-vertical>li>a:after{right:14px}.dropdown.menu.large-vertical>li.opens-left>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-left-width:0;border-right-style:solid;border-color:transparent #1779ba transparent transparent}.dropdown.menu.large-vertical>li.opens-right>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #1779ba}}.dropdown.menu.align-right .is-dropdown-submenu.first-sub{top:100%;right:0;left:auto}.is-dropdown-menu.vertical{width:100px}.is-dropdown-menu.vertical.align-right{float:right}.is-dropdown-submenu-parent{position:relative}.is-dropdown-submenu-parent a:after{position:absolute;top:50%;right:5px;margin-top:-6px}.is-dropdown-submenu-parent.opens-inner>.is-dropdown-submenu{top:100%;left:auto}.is-dropdown-submenu-parent.opens-left>.is-dropdown-submenu{right:100%;left:auto}.is-dropdown-submenu-parent.opens-right>.is-dropdown-submenu{right:auto;left:100%}.is-dropdown-submenu{position:absolute;top:0;left:100%;z-index:1;display:none;min-width:200px;border:1px solid #cacaca;background:#fefefe}.is-dropdown-submenu .is-dropdown-submenu-parent>a:after{right:14px}.is-dropdown-submenu .is-dropdown-submenu-parent.opens-left>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-left-width:0;border-right-style:solid;border-color:transparent #1779ba transparent transparent}.is-dropdown-submenu .is-dropdown-submenu-parent.opens-right>a:after{display:block;width:0;height:0;border:6px inset;content:"";border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #1779ba}.is-dropdown-submenu .is-dropdown-submenu{margin-top:-1px}.is-dropdown-submenu>li{width:100%}.is-dropdown-submenu.js-dropdown-active{display:block}.flex-video,.responsive-embed{position:relative;height:0;margin-bottom:1rem;padding-bottom:75%;overflow:hidden}.flex-video embed,.flex-video iframe,.flex-video object,.flex-video video,.responsive-embed embed,.responsive-embed iframe,.responsive-embed object,.responsive-embed video{position:absolute;top:0;left:0;width:100%;height:100%}.flex-video.widescreen,.responsive-embed.widescreen{padding-bottom:56.25%}.label{display:inline-block;padding:.33333rem .5rem;border-radius:0;font-size:.8rem;line-height:1;white-space:nowrap;cursor:default}.label,.label.primary{background:#1779ba;color:#fefefe}.label.secondary{background:#767676;color:#fefefe}.label.success{background:#3adb76;color:#0a0a0a}.label.warning{background:#ffae00;color:#0a0a0a}.label.alert{background:#cc4b37;color:#fefefe}.media-object{display:block;margin-bottom:1rem}.media-object img{max-width:none}@media screen and (max-width:39.9375em){.media-object.stack-for-small .media-object-section{padding:0;padding-bottom:1rem;display:block}.media-object.stack-for-small .media-object-section img{width:100%}}.media-object-section{display:table-cell;vertical-align:top}.media-object-section:first-child{padding-right:1rem}.media-object-section:last-child:not(:nth-child(2)){padding-left:1rem}.media-object-section>:last-child{margin-bottom:0}.media-object-section.middle{vertical-align:middle}.media-object-section.bottom{vertical-align:bottom}.is-off-canvas-open{overflow:hidden}.js-off-canvas-overlay{position:absolute;top:0;left:0;width:100%;height:100%;transition:opacity .5s ease,visibility .5s ease;background:hsla(0,0%,100%,.25);opacity:0;visibility:hidden;overflow:hidden}.js-off-canvas-overlay.is-visible{opacity:1;visibility:visible}.js-off-canvas-overlay.is-closable{cursor:pointer}.js-off-canvas-overlay.is-overlay-absolute{position:absolute}.js-off-canvas-overlay.is-overlay-fixed{position:fixed}.off-canvas-wrapper{position:relative;overflow:hidden}.off-canvas{position:fixed;z-index:1;transition:transform .5s ease;-webkit-backface-visibility:hidden;backface-visibility:hidden;background:#e6e6e6}[data-whatinput=mouse] .off-canvas{outline:0}.off-canvas.is-transition-overlap{z-index:10}.off-canvas.is-transition-overlap.is-open{box-shadow:0 0 10px hsla(0,0%,4%,.7)}.off-canvas.is-open{transform:translate(0)}.off-canvas-absolute{position:absolute;z-index:1;transition:transform .5s ease;-webkit-backface-visibility:hidden;backface-visibility:hidden;background:#e6e6e6}[data-whatinput=mouse] .off-canvas-absolute{outline:0}.off-canvas-absolute.is-transition-overlap{z-index:10}.off-canvas-absolute.is-transition-overlap.is-open{box-shadow:0 0 10px hsla(0,0%,4%,.7)}.off-canvas-absolute.is-open{transform:translate(0)}.position-left{top:0;left:0;width:250px;height:100%;transform:translateX(-250px);overflow-y:auto}.position-left.is-open~.off-canvas-content{transform:translateX(250px)}.position-left.is-transition-push:after{position:absolute;top:0;right:0;height:100%;width:1px;box-shadow:0 0 10px hsla(0,0%,4%,.7);content:" "}.position-left.is-transition-overlap.is-open~.off-canvas-content{transform:none}.position-right{top:0;right:0;width:250px;height:100%;transform:translateX(250px);overflow-y:auto}.position-right.is-open~.off-canvas-content{transform:translateX(-250px)}.position-right.is-transition-push:after{position:absolute;top:0;left:0;height:100%;width:1px;box-shadow:0 0 10px hsla(0,0%,4%,.7);content:" "}.position-right.is-transition-overlap.is-open~.off-canvas-content{transform:none}.position-top{top:0;left:0;width:100%;height:250px;transform:translateY(-250px);overflow-x:auto}.position-top.is-open~.off-canvas-content{transform:translateY(250px)}.position-top.is-transition-push:after{position:absolute;bottom:0;left:0;height:1px;width:100%;box-shadow:0 0 10px hsla(0,0%,4%,.7);content:" "}.position-top.is-transition-overlap.is-open~.off-canvas-content{transform:none}.position-bottom{bottom:0;left:0;width:100%;height:250px;transform:translateY(250px);overflow-x:auto}.position-bottom.is-open~.off-canvas-content{transform:translateY(-250px)}.position-bottom.is-transition-push:after{position:absolute;top:0;left:0;height:1px;width:100%;box-shadow:0 0 10px hsla(0,0%,4%,.7);content:" "}.position-bottom.is-transition-overlap.is-open~.off-canvas-content{transform:none}.off-canvas-content{transition:transform .5s ease;-webkit-backface-visibility:hidden;backface-visibility:hidden}@media print,screen and (min-width:40em){.position-left.reveal-for-medium{transform:none;z-index:1}.position-left.reveal-for-medium~.off-canvas-content{margin-left:250px}.position-right.reveal-for-medium{transform:none;z-index:1}.position-right.reveal-for-medium~.off-canvas-content{margin-right:250px}.position-top.reveal-for-medium{transform:none;z-index:1}.position-top.reveal-for-medium~.off-canvas-content{margin-top:250px}.position-bottom.reveal-for-medium{transform:none;z-index:1}.position-bottom.reveal-for-medium~.off-canvas-content{margin-bottom:250px}}@media print,screen and (min-width:64em){.position-left.reveal-for-large{transform:none;z-index:1}.position-left.reveal-for-large~.off-canvas-content{margin-left:250px}.position-right.reveal-for-large{transform:none;z-index:1}.position-right.reveal-for-large~.off-canvas-content{margin-right:250px}.position-top.reveal-for-large{transform:none;z-index:1}.position-top.reveal-for-large~.off-canvas-content{margin-top:250px}.position-bottom.reveal-for-large{transform:none;z-index:1}.position-bottom.reveal-for-large~.off-canvas-content{margin-bottom:250px}}.orbit,.orbit-container{position:relative}.orbit-container{height:0;margin:0;list-style:none;overflow:hidden}.orbit-slide{width:100%}.orbit-slide.no-motionui.is-active{top:0;left:0}.orbit-figure{margin:0}.orbit-image{width:100%;max-width:100%;margin:0}.orbit-caption{bottom:0;width:100%;margin-bottom:0;background-color:hsla(0,0%,4%,.5)}.orbit-caption,.orbit-next,.orbit-previous{position:absolute;padding:1rem;color:#fefefe}.orbit-next,.orbit-previous{top:50%;transform:translateY(-50%);z-index:10}[data-whatinput=mouse] .orbit-next,[data-whatinput=mouse] .orbit-previous{outline:0}.orbit-next:active,.orbit-next:focus,.orbit-next:hover,.orbit-previous:active,.orbit-previous:focus,.orbit-previous:hover{background-color:hsla(0,0%,4%,.5)}.orbit-previous{left:0}.orbit-next{left:auto;right:0}.orbit-bullets{position:relative;margin-top:.8rem;margin-bottom:.8rem;text-align:center}[data-whatinput=mouse] .orbit-bullets{outline:0}.orbit-bullets button{width:1.2rem;height:1.2rem;margin:.1rem;border-radius:50%;background-color:#cacaca}.orbit-bullets button.is-active,.orbit-bullets button:hover{background-color:#8a8a8a}.pagination{margin-left:0;margin-bottom:1rem}.pagination:after,.pagination:before{display:table;content:" "}.pagination:after{clear:both}.pagination li{margin-right:.0625rem;border-radius:0;font-size:.875rem;display:none}.pagination li:first-child,.pagination li:last-child{display:inline-block}@media print,screen and (min-width:40em){.pagination li{display:inline-block}}.pagination a,.pagination button{display:block;padding:.1875rem .625rem;border-radius:0;color:#0a0a0a}.pagination a:hover,.pagination button:hover{background:#e6e6e6}.pagination .current{padding:.1875rem .625rem;background:#1779ba;color:#fefefe;cursor:default}.pagination .disabled{padding:.1875rem .625rem;color:#cacaca;cursor:not-allowed}.pagination .disabled:hover{background:transparent}.pagination .ellipsis:after{padding:.1875rem .625rem;content:"\2026";color:#0a0a0a}.pagination-previous.disabled:before,.pagination-previous a:before{display:inline-block;margin-right:.5rem;content:"\00ab"}.pagination-next.disabled:after,.pagination-next a:after{display:inline-block;margin-left:.5rem;content:"\00bb"}.progress{height:1rem;margin-bottom:1rem;border-radius:0;background-color:#cacaca}.progress.primary .progress-meter{background-color:#1779ba}.progress.secondary .progress-meter{background-color:#767676}.progress.success .progress-meter{background-color:#3adb76}.progress.warning .progress-meter{background-color:#ffae00}.progress.alert .progress-meter{background-color:#cc4b37}.progress-meter{position:relative;display:block;width:0;height:100%;background-color:#1779ba}.progress-meter-text{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;margin:0;font-size:.75rem;font-weight:700;color:#fefefe;white-space:nowrap}body.is-reveal-open{overflow:hidden}html.is-reveal-open,html.is-reveal-open body{min-height:100%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.reveal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1005;display:none;background-color:hsla(0,0%,4%,.45);overflow-y:scroll}.reveal{z-index:1006;-webkit-backface-visibility:hidden;backface-visibility:hidden;display:none;padding:1rem;border:1px solid #cacaca;border-radius:0;background-color:#fefefe;position:relative;top:100px;margin-right:auto;margin-left:auto;overflow-y:auto}[data-whatinput=mouse] .reveal{outline:0}@media print,screen and (min-width:40em){.reveal{min-height:0}}.reveal .column,.reveal .columns{min-width:0}.reveal>:last-child{margin-bottom:0}@media print,screen and (min-width:40em){.reveal{width:600px;max-width:75rem}}@media print,screen and (min-width:40em){.reveal .reveal{right:auto;left:auto;margin:0 auto}}.reveal.collapse{padding:0}@media print,screen and (min-width:40em){.reveal.tiny{width:30%;max-width:75rem}}@media print,screen and (min-width:40em){.reveal.small{width:50%;max-width:75rem}}@media print,screen and (min-width:40em){.reveal.large{width:90%;max-width:75rem}}.reveal.full{top:0;left:0;width:100%;max-width:none;height:100%;height:100vh;min-height:100vh;margin-left:0;border:0;border-radius:0}@media screen and (max-width:39.9375em){.reveal{top:0;left:0;width:100%;max-width:none;height:100%;height:100vh;min-height:100vh;margin-left:0;border:0;border-radius:0}}.reveal.without-overlay{position:fixed}.slider{position:relative;height:.5rem;margin-top:1.25rem;margin-bottom:2.25rem;background-color:#e6e6e6;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:none;touch-action:none}.slider-fill{position:absolute;top:0;left:0;display:inline-block;max-width:100%;height:.5rem;background-color:#cacaca;transition:all .2s ease-in-out}.slider-fill.is-dragging{transition:all 0s linear}.slider-handle{top:50%;transform:translateY(-50%);position:absolute;left:0;z-index:1;display:inline-block;width:1.4rem;height:1.4rem;border-radius:0;background-color:#1779ba;transition:all .2s ease-in-out;-ms-touch-action:manipulation;touch-action:manipulation}[data-whatinput=mouse] .slider-handle{outline:0}.slider-handle:hover{background-color:#14679e}.slider-handle.is-dragging{transition:all 0s linear}.slider.disabled,.slider[disabled]{opacity:.25;cursor:not-allowed}.slider.vertical{display:inline-block;width:.5rem;height:12.5rem;margin:0 1.25rem;transform:scaleY(-1)}.slider.vertical .slider-fill{top:0;width:.5rem;max-height:100%}.slider.vertical .slider-handle{position:absolute;top:0;left:50%;width:1.4rem;height:1.4rem;transform:translateX(-50%)}.sticky,.sticky-container{position:relative}.sticky{z-index:0;transform:translateZ(0)}.sticky.is-stuck{position:fixed;z-index:5}.sticky.is-stuck.is-at-top{top:0}.sticky.is-stuck.is-at-bottom{bottom:0}.sticky.is-anchored{position:relative;right:auto;left:auto}.sticky.is-anchored.is-at-bottom{bottom:0}.switch{height:2rem;position:relative;margin-bottom:1rem;outline:0;font-size:.875rem;font-weight:700;color:#fefefe;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.switch-input{position:absolute;margin-bottom:0;opacity:0}.switch-paddle{position:relative;display:block;width:4rem;height:2rem;border-radius:0;background:#cacaca;transition:all .25s ease-out;font-weight:inherit;color:inherit;cursor:pointer}input+.switch-paddle{margin:0}.switch-paddle:after{position:absolute;top:.25rem;left:.25rem;display:block;width:1.5rem;height:1.5rem;transform:translateZ(0);border-radius:0;background:#fefefe;transition:all .25s ease-out;content:""}input:checked~.switch-paddle{background:#1779ba}input:checked~.switch-paddle:after{left:2.25rem}[data-whatinput=mouse] input:focus~.switch-paddle{outline:0}.switch-active,.switch-inactive{position:absolute;top:50%;transform:translateY(-50%)}.switch-active{left:8%;display:none}input:checked+label>.switch-active{display:block}.switch-inactive{right:15%}input:checked+label>.switch-inactive{display:none}.switch.tiny{height:1.5rem}.switch.tiny .switch-paddle{width:3rem;height:1.5rem;font-size:.625rem}.switch.tiny .switch-paddle:after{top:.25rem;left:.25rem;width:1rem;height:1rem}.switch.tiny input:checked~.switch-paddle:after{left:1.75rem}.switch.small{height:1.75rem}.switch.small .switch-paddle{width:3.5rem;height:1.75rem;font-size:.75rem}.switch.small .switch-paddle:after{top:.25rem;left:.25rem;width:1.25rem;height:1.25rem}.switch.small input:checked~.switch-paddle:after{left:2rem}.switch.large{height:2.5rem}.switch.large .switch-paddle{width:5rem;height:2.5rem;font-size:1rem}.switch.large .switch-paddle:after{top:.25rem;left:.25rem;width:2rem;height:2rem}.switch.large input:checked~.switch-paddle:after{left:2.75rem}table{width:100%;margin-bottom:1rem;border-radius:0}table tbody,table tfoot,table thead{border:1px solid #f1f1f1;background-color:#fefefe}table caption{padding:.5rem .625rem .625rem;font-weight:700}table thead{background:#f8f8f8;color:#0a0a0a}table tfoot{background:#f1f1f1;color:#0a0a0a}table tfoot tr,table thead tr{background:transparent}table tfoot td,table tfoot th,table thead td,table thead th{padding:.5rem .625rem .625rem;font-weight:700;text-align:left}table tbody td,table tbody th{padding:.5rem .625rem .625rem}table tbody tr:nth-child(even){border-bottom:0;background-color:#f1f1f1}table.unstriped tbody{background-color:#fefefe}table.unstriped tbody tr{border-bottom:0;border-bottom:1px solid #f1f1f1;background-color:#fefefe}@media screen and (max-width:63.9375em){table.stack tfoot,table.stack thead{display:none}table.stack td,table.stack th,table.stack tr{display:block}table.stack td{border-top:0}}table.scroll{display:block;width:100%;overflow-x:auto}table.hover thead tr:hover{background-color:#f3f3f3}table.hover tfoot tr:hover{background-color:#ececec}table.hover tbody tr:hover{background-color:#f9f9f9}table.hover:not(.unstriped) tr:nth-of-type(even):hover{background-color:#ececec}.table-scroll{overflow-x:auto}.table-scroll table{width:auto}.tabs{margin:0;border:1px solid #e6e6e6;background:#fefefe;list-style-type:none}.tabs:after,.tabs:before{display:table;content:" "}.tabs:after{clear:both}.tabs.vertical>li{display:block;float:none;width:auto}.tabs.simple>li>a{padding:0}.tabs.simple>li>a:hover{background:transparent}.tabs.primary{background:#1779ba}.tabs.primary>li>a{color:#fefefe}.tabs.primary>li>a:focus,.tabs.primary>li>a:hover{background:#1673b1}.tabs-title{float:left}.tabs-title>a{display:block;padding:1.25rem 1.5rem;font-size:.75rem;line-height:1;color:#1779ba}.tabs-title>a:hover{background:#fefefe;color:#1468a0}.tabs-title>a:focus,.tabs-title>a[aria-selected=true]{background:#e6e6e6;color:#1779ba}.tabs-content{border:1px solid #e6e6e6;border-top:0;background:#fefefe;color:#0a0a0a;transition:all .5s ease}.tabs-content.vertical{border:1px solid #e6e6e6;border-left:0}.tabs-panel{display:none;padding:1rem}.tabs-panel[aria-hidden=false]{display:block}.thumbnail{display:inline-block;max-width:100%;margin-bottom:1rem;border:4px solid #fefefe;border-radius:0;box-shadow:0 0 0 1px hsla(0,0%,4%,.2);line-height:0}a.thumbnail{transition:box-shadow .2s ease-out}a.thumbnail:focus,a.thumbnail:hover{box-shadow:0 0 6px 1px rgba(23,121,186,.5)}a.thumbnail image{box-shadow:none}.title-bar{padding:.5rem;background:#0a0a0a;color:#fefefe}.title-bar:after,.title-bar:before{display:table;content:" "}.title-bar:after{clear:both}.title-bar .menu-icon{margin-left:.25rem;margin-right:.25rem}.title-bar-left{float:left}.title-bar-right{float:right;text-align:right}.title-bar-title{vertical-align:middle}.has-tip,.title-bar-title{display:inline-block;font-weight:700}.has-tip{position:relative;border-bottom:1px dotted #8a8a8a;cursor:help}.tooltip{position:absolute;top:calc(100% + .6495rem);z-index:1200;max-width:10rem;padding:.75rem;border-radius:0;background-color:#0a0a0a;font-size:80%;color:#fefefe}.tooltip:before{border:.75rem inset;border-top-width:0;border-bottom-style:solid;border-color:transparent transparent #0a0a0a;position:absolute;bottom:100%;left:50%;transform:translateX(-50%)}.tooltip.top:before,.tooltip:before{display:block;width:0;height:0;content:""}.tooltip.top:before{border:.75rem inset;border-bottom-width:0;border-top-style:solid;border-color:#0a0a0a transparent transparent;top:100%;bottom:auto}.tooltip.left:before{border:.75rem inset;border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #0a0a0a;left:100%}.tooltip.left:before,.tooltip.right:before{display:block;width:0;height:0;content:"";top:50%;bottom:auto;transform:translateY(-50%)}.tooltip.right:before{border:.75rem inset;border-left-width:0;border-right-style:solid;border-color:transparent #0a0a0a transparent transparent;right:100%;left:auto}.top-bar{padding:.5rem}.top-bar:after,.top-bar:before{display:table;content:" "}.top-bar:after{clear:both}.top-bar,.top-bar ul{background-color:#e6e6e6}.top-bar input{max-width:200px;margin-right:1rem}.top-bar .input-group-field{width:100%;margin-right:0}.top-bar input.button{width:auto}.top-bar .top-bar-left,.top-bar .top-bar-right{width:100%}@media print,screen and (min-width:40em){.top-bar .top-bar-left,.top-bar .top-bar-right{width:auto}}@media screen and (max-width:63.9375em){.top-bar.stacked-for-medium .top-bar-left,.top-bar.stacked-for-medium .top-bar-right{width:100%}}@media screen and (max-width:74.9375em){.top-bar.stacked-for-large .top-bar-left,.top-bar.stacked-for-large .top-bar-right{width:100%}}.top-bar-title{display:inline-block;float:left;padding:.5rem 1rem .5rem 0}.top-bar-title .menu-icon{bottom:2px}.top-bar-left{float:left}.top-bar-right{float:right}.hide{display:none!important}.invisible{visibility:hidden}@media screen and (max-width:39.9375em){.hide-for-small-only{display:none!important}}@media screen and (max-width:0em),screen and (min-width:40em){.show-for-small-only{display:none!important}}@media print,screen and (min-width:40em){.hide-for-medium{display:none!important}}@media screen and (max-width:39.9375em){.show-for-medium{display:none!important}}@media screen and (min-width:40em) and (max-width:63.9375em){.hide-for-medium-only{display:none!important}}@media screen and (max-width:39.9375em),screen and (min-width:64em){.show-for-medium-only{display:none!important}}@media print,screen and (min-width:64em){.hide-for-large{display:none!important}}@media screen and (max-width:63.9375em){.show-for-large{display:none!important}}@media screen and (min-width:64em) and (max-width:74.9375em){.hide-for-large-only{display:none!important}}@media screen and (max-width:63.9375em),screen and (min-width:75em){.show-for-large-only{display:none!important}}.show-for-sr,.show-on-focus{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.show-on-focus:active,.show-on-focus:focus{position:static!important;width:auto;height:auto;overflow:visible;clip:auto}.hide-for-portrait,.show-for-landscape{display:block!important}@media screen and (orientation:landscape){.hide-for-portrait,.show-for-landscape{display:block!important}}@media screen and (orientation:portrait){.hide-for-portrait,.show-for-landscape{display:none!important}}.hide-for-landscape,.show-for-portrait{display:none!important}@media screen and (orientation:landscape){.hide-for-landscape,.show-for-portrait{display:none!important}}@media screen and (orientation:portrait){.hide-for-landscape,.show-for-portrait{display:block!important}}.float-left{float:left!important}.float-right{float:right!important}.float-center{display:block;margin-right:auto;margin-left:auto}.clearfix:after,.clearfix:before{display:table;content:" "}.clearfix:after{clear:both}.slide-in-down.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:translateY(-100%);transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-in-down.mui-enter.mui-enter-active{transform:translateY(0)}.slide-in-left.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:translateX(-100%);transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-in-left.mui-enter.mui-enter-active{transform:translateX(0)}.slide-in-up.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:translateY(100%);transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-in-up.mui-enter.mui-enter-active{transform:translateY(0)}.slide-in-right.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:translateX(100%);transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-in-right.mui-enter.mui-enter-active{transform:translateX(0)}.slide-out-down.mui-leave{transition-duration:.5s;transition-timing-function:linear;transform:translateY(0);transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-out-down.mui-leave.mui-leave-active{transform:translateY(100%)}.slide-out-right.mui-leave{transition-duration:.5s;transition-timing-function:linear;transform:translateX(0);transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-out-right.mui-leave.mui-leave-active{transform:translateX(100%)}.slide-out-up.mui-leave{transition-duration:.5s;transition-timing-function:linear;transform:translateY(0);transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-out-up.mui-leave.mui-leave-active{transform:translateY(-100%)}.slide-out-left.mui-leave{transition-duration:.5s;transition-timing-function:linear;transform:translateX(0);transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-out-left.mui-leave.mui-leave-active{transform:translateX(-100%)}.fade-in.mui-enter{transition-duration:.5s;transition-timing-function:linear;opacity:0;transition-property:opacity}.fade-in.mui-enter.mui-enter-active{opacity:1}.fade-out.mui-leave{transition-duration:.5s;transition-timing-function:linear;opacity:1;transition-property:opacity}.fade-out.mui-leave.mui-leave-active{opacity:0}.hinge-in-from-top.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:perspective(2000px) rotateX(-90deg);transform-origin:top;transition-property:transform,opacity;opacity:0}.hinge-in-from-top.mui-enter.mui-enter-active{transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-in-from-right.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:perspective(2000px) rotateY(-90deg);transform-origin:right;transition-property:transform,opacity;opacity:0}.hinge-in-from-right.mui-enter.mui-enter-active{transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-in-from-bottom.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:perspective(2000px) rotateX(90deg);transform-origin:bottom;transition-property:transform,opacity;opacity:0}.hinge-in-from-bottom.mui-enter.mui-enter-active{transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-in-from-left.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:perspective(2000px) rotateY(90deg);transform-origin:left;transition-property:transform,opacity;opacity:0}.hinge-in-from-left.mui-enter.mui-enter-active{transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-in-from-middle-x.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:perspective(2000px) rotateX(-90deg);transform-origin:center;transition-property:transform,opacity;opacity:0}.hinge-in-from-middle-x.mui-enter.mui-enter-active{transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-in-from-middle-y.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:perspective(2000px) rotateY(-90deg);transform-origin:center;transition-property:transform,opacity;opacity:0}.hinge-in-from-middle-y.mui-enter.mui-enter-active,.hinge-out-from-top.mui-leave{transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-out-from-top.mui-leave{transition-duration:.5s;transition-timing-function:linear;transform-origin:top;transition-property:transform,opacity}.hinge-out-from-top.mui-leave.mui-leave-active{transform:perspective(2000px) rotateX(-90deg);opacity:0}.hinge-out-from-right.mui-leave{transition-duration:.5s;transition-timing-function:linear;transform:perspective(2000px) rotate(0deg);transform-origin:right;transition-property:transform,opacity;opacity:1}.hinge-out-from-right.mui-leave.mui-leave-active{transform:perspective(2000px) rotateY(-90deg);opacity:0}.hinge-out-from-bottom.mui-leave{transition-duration:.5s;transition-timing-function:linear;transform:perspective(2000px) rotate(0deg);transform-origin:bottom;transition-property:transform,opacity;opacity:1}.hinge-out-from-bottom.mui-leave.mui-leave-active{transform:perspective(2000px) rotateX(90deg);opacity:0}.hinge-out-from-left.mui-leave{transition-duration:.5s;transition-timing-function:linear;transform:perspective(2000px) rotate(0deg);transform-origin:left;transition-property:transform,opacity;opacity:1}.hinge-out-from-left.mui-leave.mui-leave-active{transform:perspective(2000px) rotateY(90deg);opacity:0}.hinge-out-from-middle-x.mui-leave{transition-duration:.5s;transition-timing-function:linear;transform:perspective(2000px) rotate(0deg);transform-origin:center;transition-property:transform,opacity;opacity:1}.hinge-out-from-middle-x.mui-leave.mui-leave-active{transform:perspective(2000px) rotateX(-90deg);opacity:0}.hinge-out-from-middle-y.mui-leave{transition-duration:.5s;transition-timing-function:linear;transform:perspective(2000px) rotate(0deg);transform-origin:center;transition-property:transform,opacity;opacity:1}.hinge-out-from-middle-y.mui-leave.mui-leave-active{transform:perspective(2000px) rotateY(-90deg);opacity:0}.scale-in-up.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:scale(.5);transition-property:transform,opacity;opacity:0}.scale-in-up.mui-enter.mui-enter-active{transform:scale(1);opacity:1}.scale-in-down.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:scale(1.5);transition-property:transform,opacity;opacity:0}.scale-in-down.mui-enter.mui-enter-active,.scale-out-up.mui-leave{transform:scale(1);opacity:1}.scale-out-up.mui-leave{transition-duration:.5s;transition-timing-function:linear;transition-property:transform,opacity}.scale-out-up.mui-leave.mui-leave-active{transform:scale(1.5);opacity:0}.scale-out-down.mui-leave{transition-duration:.5s;transition-timing-function:linear;transform:scale(1);transition-property:transform,opacity;opacity:1}.scale-out-down.mui-leave.mui-leave-active{transform:scale(.5);opacity:0}.spin-in.mui-enter{transition-duration:.5s;transition-timing-function:linear;transform:rotate(-270deg);transition-property:transform,opacity;opacity:0}.spin-in.mui-enter.mui-enter-active,.spin-out.mui-leave{transform:rotate(0);opacity:1}.spin-out.mui-leave{transition-duration:.5s;transition-timing-function:linear;transition-property:transform,opacity}.spin-in-ccw.mui-enter,.spin-out.mui-leave.mui-leave-active{transform:rotate(270deg);opacity:0}.spin-in-ccw.mui-enter{transition-duration:.5s;transition-timing-function:linear;transition-property:transform,opacity}.spin-in-ccw.mui-enter.mui-enter-active,.spin-out-ccw.mui-leave{transform:rotate(0);opacity:1}.spin-out-ccw.mui-leave{transition-duration:.5s;transition-timing-function:linear;transition-property:transform,opacity}.spin-out-ccw.mui-leave.mui-leave-active{transform:rotate(-270deg);opacity:0}.slow{transition-duration:.75s!important}.fast{transition-duration:.25s!important}.linear{transition-timing-function:linear!important}.ease{transition-timing-function:ease!important}.ease-in{transition-timing-function:ease-in!important}.ease-out{transition-timing-function:ease-out!important}.ease-in-out{transition-timing-function:ease-in-out!important}.bounce-in{transition-timing-function:cubic-bezier(.485,.155,.24,1.245)!important}.bounce-out{transition-timing-function:cubic-bezier(.485,.155,.515,.845)!important}.bounce-in-out{transition-timing-function:cubic-bezier(.76,-.245,.24,1.245)!important}.short-delay{transition-delay:.3s!important}.long-delay{transition-delay:.7s!important}.shake{animation-name:a}@keyframes a{0%,10%,20%,30%,40%,50%,60%,70%,80%,90%{transform:translateX(7%)}5%,15%,25%,35%,45%,55%,65%,75%,85%,95%{transform:translateX(-7%)}}.spin-ccw,.spin-cw{animation-name:b}@keyframes b{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.wiggle{animation-name:c}@keyframes c{40%,50%,60%{transform:rotate(7deg)}35%,45%,55%,65%{transform:rotate(-7deg)}0%,30%,70%,to{transform:rotate(0)}}.shake,.spin-ccw,.spin-cw,.wiggle{animation-duration:.5s}.infinite{animation-iteration-count:infinite}.slow{animation-duration:.75s!important}.fast{animation-duration:.25s!important}.linear{animation-timing-function:linear!important}.ease{animation-timing-function:ease!important}.ease-in{animation-timing-function:ease-in!important}.ease-out{animation-timing-function:ease-out!important}.ease-in-out{animation-timing-function:ease-in-out!important}.bounce-in{animation-timing-function:cubic-bezier(.485,.155,.24,1.245)!important}.bounce-out{animation-timing-function:cubic-bezier(.485,.155,.515,.845)!important}.bounce-in-out{animation-timing-function:cubic-bezier(.76,-.245,.24,1.245)!important}.short-delay{animation-delay:.3s!important}.long-delay{animation-delay:.7s!important} \ No newline at end of file diff --git a/app/assets/stylesheets/foundation-6.3.1-complete/index.html b/app/assets/stylesheets/foundation-6.3.1-complete/index.html new file mode 100644 index 0000000000..486ac94ed9 --- /dev/null +++ b/app/assets/stylesheets/foundation-6.3.1-complete/index.html @@ -0,0 +1,169 @@ + + + + + + + Foundation for Sites + + + + +
+
+

Welcome to Foundation

+
+
+ +
+
+
+

We’re stoked you want to try Foundation!

+

To get going, this file (index.html) includes some basic styles you can modify, play around with, or totally destroy to get going.

+

Once you've exhausted the fun in this document, you should check out:

+
+
+

Foundation Documentation
Everything you need to know about using the framework.

+
+
+

Foundation Code Skills
These online courses offer you a chance to better understand how Foundation works and how you can master it to create awesome projects.

+
+
+

Foundation Forum
Join the Foundation community to ask a question or show off your knowlege.

+
+
+
+
+

Foundation on Github
Latest code, issue reports, feature requests and more.

+
+
+

@zurbfoundation
Ping us on Twitter if you have questions. When you build something with this we'd love to see it (and send you a totally boss sticker).

+
+
+
+
+
+ +
+
+
Here’s your basic grid:
+ + +
+
+
+

This is a twelve column section in a row. Each of these includes a div.callout element so you can see where the columns are - it's not required at all for the grid.

+
+
+
+
+
+
+

Six columns

+
+
+
+
+

Six columns

+
+
+
+
+
+
+

Four columns

+
+
+
+
+

Four columns

+
+
+
+
+

Four columns

+
+
+
+ +
+ +
We bet you’ll need a form somewhere:
+
+
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ +
+ + .com +
+
+
+
+
+
+ + +
+
+
+
+ + + +
+
+ + + +
+
+
+
+ + +
+
+ +
+ +
+
Try one of these buttons:
+

Simple Button
+ Success Btn
+ Alert Btn
+ Secondary Btn

+
+
So many components, girl!
+

A whole kitchen sink of goodies comes with Foundation. Check out the docs to see them all, along with details on making them your own.

+ Go to Foundation Docs +
+
+
+ + + + + + + diff --git a/app/assets/stylesheets/foundation-6.3.1-complete/js/app.js b/app/assets/stylesheets/foundation-6.3.1-complete/js/app.js new file mode 100644 index 0000000000..5b80fd1351 --- /dev/null +++ b/app/assets/stylesheets/foundation-6.3.1-complete/js/app.js @@ -0,0 +1 @@ +$(document).foundation() diff --git a/app/assets/stylesheets/foundation-6.3.1-complete/js/vendor/foundation.js b/app/assets/stylesheets/foundation-6.3.1-complete/js/vendor/foundation.js new file mode 100644 index 0000000000..dfe0a84f37 --- /dev/null +++ b/app/assets/stylesheets/foundation-6.3.1-complete/js/vendor/foundation.js @@ -0,0 +1,10207 @@ +!function ($) { + + "use strict"; + + var FOUNDATION_VERSION = '6.3.1'; + + // Global Foundation object + // This is attached to the window, or used as a module for AMD/Browserify + var Foundation = { + version: FOUNDATION_VERSION, + + /** + * Stores initialized plugins. + */ + _plugins: {}, + + /** + * Stores generated unique ids for plugin instances + */ + _uuids: [], + + /** + * Returns a boolean for RTL support + */ + rtl: function () { + return $('html').attr('dir') === 'rtl'; + }, + /** + * Defines a Foundation plugin, adding it to the `Foundation` namespace and the list of plugins to initialize when reflowing. + * @param {Object} plugin - The constructor of the plugin. + */ + plugin: function (plugin, name) { + // Object key to use when adding to global Foundation object + // Examples: Foundation.Reveal, Foundation.OffCanvas + var className = name || functionName(plugin); + // Object key to use when storing the plugin, also used to create the identifying data attribute for the plugin + // Examples: data-reveal, data-off-canvas + var attrName = hyphenate(className); + + // Add to the Foundation object and the plugins list (for reflowing) + this._plugins[attrName] = this[className] = plugin; + }, + /** + * @function + * Populates the _uuids array with pointers to each individual plugin instance. + * Adds the `zfPlugin` data-attribute to programmatically created plugins to allow use of $(selector).foundation(method) calls. + * Also fires the initialization event for each plugin, consolidating repetitive code. + * @param {Object} plugin - an instance of a plugin, usually `this` in context. + * @param {String} name - the name of the plugin, passed as a camelCased string. + * @fires Plugin#init + */ + registerPlugin: function (plugin, name) { + var pluginName = name ? hyphenate(name) : functionName(plugin.constructor).toLowerCase(); + plugin.uuid = this.GetYoDigits(6, pluginName); + + if (!plugin.$element.attr('data-' + pluginName)) { + plugin.$element.attr('data-' + pluginName, plugin.uuid); + } + if (!plugin.$element.data('zfPlugin')) { + plugin.$element.data('zfPlugin', plugin); + } + /** + * Fires when the plugin has initialized. + * @event Plugin#init + */ + plugin.$element.trigger('init.zf.' + pluginName); + + this._uuids.push(plugin.uuid); + + return; + }, + /** + * @function + * Removes the plugins uuid from the _uuids array. + * Removes the zfPlugin data attribute, as well as the data-plugin-name attribute. + * Also fires the destroyed event for the plugin, consolidating repetitive code. + * @param {Object} plugin - an instance of a plugin, usually `this` in context. + * @fires Plugin#destroyed + */ + unregisterPlugin: function (plugin) { + var pluginName = hyphenate(functionName(plugin.$element.data('zfPlugin').constructor)); + + this._uuids.splice(this._uuids.indexOf(plugin.uuid), 1); + plugin.$element.removeAttr('data-' + pluginName).removeData('zfPlugin') + /** + * Fires when the plugin has been destroyed. + * @event Plugin#destroyed + */ + .trigger('destroyed.zf.' + pluginName); + for (var prop in plugin) { + plugin[prop] = null; //clean up script to prep for garbage collection. + } + return; + }, + + /** + * @function + * Causes one or more active plugins to re-initialize, resetting event listeners, recalculating positions, etc. + * @param {String} plugins - optional string of an individual plugin key, attained by calling `$(element).data('pluginName')`, or string of a plugin class i.e. `'dropdown'` + * @default If no argument is passed, reflow all currently active plugins. + */ + reInit: function (plugins) { + var isJQ = plugins instanceof $; + try { + if (isJQ) { + plugins.each(function () { + $(this).data('zfPlugin')._init(); + }); + } else { + var type = typeof plugins, + _this = this, + fns = { + 'object': function (plgs) { + plgs.forEach(function (p) { + p = hyphenate(p); + $('[data-' + p + ']').foundation('_init'); + }); + }, + 'string': function () { + plugins = hyphenate(plugins); + $('[data-' + plugins + ']').foundation('_init'); + }, + 'undefined': function () { + this['object'](Object.keys(_this._plugins)); + } + }; + fns[type](plugins); + } + } catch (err) { + console.error(err); + } finally { + return plugins; + } + }, + + /** + * returns a random base-36 uid with namespacing + * @function + * @param {Number} length - number of random base-36 digits desired. Increase for more random strings. + * @param {String} namespace - name of plugin to be incorporated in uid, optional. + * @default {String} '' - if no plugin name is provided, nothing is appended to the uid. + * @returns {String} - unique id + */ + GetYoDigits: function (length, namespace) { + length = length || 6; + return Math.round(Math.pow(36, length + 1) - Math.random() * Math.pow(36, length)).toString(36).slice(1) + (namespace ? '-' + namespace : ''); + }, + /** + * Initialize plugins on any elements within `elem` (and `elem` itself) that aren't already initialized. + * @param {Object} elem - jQuery object containing the element to check inside. Also checks the element itself, unless it's the `document` object. + * @param {String|Array} plugins - A list of plugins to initialize. Leave this out to initialize everything. + */ + reflow: function (elem, plugins) { + + // If plugins is undefined, just grab everything + if (typeof plugins === 'undefined') { + plugins = Object.keys(this._plugins); + } + // If plugins is a string, convert it to an array with one item + else if (typeof plugins === 'string') { + plugins = [plugins]; + } + + var _this = this; + + // Iterate through each plugin + $.each(plugins, function (i, name) { + // Get the current plugin + var plugin = _this._plugins[name]; + + // Localize the search to all elements inside elem, as well as elem itself, unless elem === document + var $elem = $(elem).find('[data-' + name + ']').addBack('[data-' + name + ']'); + + // For each plugin found, initialize it + $elem.each(function () { + var $el = $(this), + opts = {}; + // Don't double-dip on plugins + if ($el.data('zfPlugin')) { + console.warn("Tried to initialize " + name + " on an element that already has a Foundation plugin."); + return; + } + + if ($el.attr('data-options')) { + var thing = $el.attr('data-options').split(';').forEach(function (e, i) { + var opt = e.split(':').map(function (el) { + return el.trim(); + }); + if (opt[0]) opts[opt[0]] = parseValue(opt[1]); + }); + } + try { + $el.data('zfPlugin', new plugin($(this), opts)); + } catch (er) { + console.error(er); + } finally { + return; + } + }); + }); + }, + getFnName: functionName, + transitionend: function ($elem) { + var transitions = { + 'transition': 'transitionend', + 'WebkitTransition': 'webkitTransitionEnd', + 'MozTransition': 'transitionend', + 'OTransition': 'otransitionend' + }; + var elem = document.createElement('div'), + end; + + for (var t in transitions) { + if (typeof elem.style[t] !== 'undefined') { + end = transitions[t]; + } + } + if (end) { + return end; + } else { + end = setTimeout(function () { + $elem.triggerHandler('transitionend', [$elem]); + }, 1); + return 'transitionend'; + } + } + }; + + Foundation.util = { + /** + * Function for applying a debounce effect to a function call. + * @function + * @param {Function} func - Function to be called at end of timeout. + * @param {Number} delay - Time in ms to delay the call of `func`. + * @returns function + */ + throttle: function (func, delay) { + var timer = null; + + return function () { + var context = this, + args = arguments; + + if (timer === null) { + timer = setTimeout(function () { + func.apply(context, args); + timer = null; + }, delay); + } + }; + } + }; + + // TODO: consider not making this a jQuery function + // TODO: need way to reflow vs. re-initialize + /** + * The Foundation jQuery method. + * @param {String|Array} method - An action to perform on the current jQuery object. + */ + var foundation = function (method) { + var type = typeof method, + $meta = $('meta.foundation-mq'), + $noJS = $('.no-js'); + + if (!$meta.length) { + $('').appendTo(document.head); + } + if ($noJS.length) { + $noJS.removeClass('no-js'); + } + + if (type === 'undefined') { + //needs to initialize the Foundation object, or an individual plugin. + Foundation.MediaQuery._init(); + Foundation.reflow(this); + } else if (type === 'string') { + //an individual method to invoke on a plugin or group of plugins + var args = Array.prototype.slice.call(arguments, 1); //collect all the arguments, if necessary + var plugClass = this.data('zfPlugin'); //determine the class of plugin + + if (plugClass !== undefined && plugClass[method] !== undefined) { + //make sure both the class and method exist + if (this.length === 1) { + //if there's only one, call it directly. + plugClass[method].apply(plugClass, args); + } else { + this.each(function (i, el) { + //otherwise loop through the jQuery collection and invoke the method on each + plugClass[method].apply($(el).data('zfPlugin'), args); + }); + } + } else { + //error for no class or no method + throw new ReferenceError("We're sorry, '" + method + "' is not an available method for " + (plugClass ? functionName(plugClass) : 'this element') + '.'); + } + } else { + //error for invalid argument type + throw new TypeError('We\'re sorry, ' + type + ' is not a valid parameter. You must use a string representing the method you wish to invoke.'); + } + return this; + }; + + window.Foundation = Foundation; + $.fn.foundation = foundation; + + // Polyfill for requestAnimationFrame + (function () { + if (!Date.now || !window.Date.now) window.Date.now = Date.now = function () { + return new Date().getTime(); + }; + + var vendors = ['webkit', 'moz']; + for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) { + var vp = vendors[i]; + window.requestAnimationFrame = window[vp + 'RequestAnimationFrame']; + window.cancelAnimationFrame = window[vp + 'CancelAnimationFrame'] || window[vp + 'CancelRequestAnimationFrame']; + } + if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) { + var lastTime = 0; + window.requestAnimationFrame = function (callback) { + var now = Date.now(); + var nextTime = Math.max(lastTime + 16, now); + return setTimeout(function () { + callback(lastTime = nextTime); + }, nextTime - now); + }; + window.cancelAnimationFrame = clearTimeout; + } + /** + * Polyfill for performance.now, required by rAF + */ + if (!window.performance || !window.performance.now) { + window.performance = { + start: Date.now(), + now: function () { + return Date.now() - this.start; + } + }; + } + })(); + if (!Function.prototype.bind) { + Function.prototype.bind = function (oThis) { + if (typeof this !== 'function') { + // closest thing possible to the ECMAScript 5 + // internal IsCallable function + throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); + } + + var aArgs = Array.prototype.slice.call(arguments, 1), + fToBind = this, + fNOP = function () {}, + fBound = function () { + return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); + }; + + if (this.prototype) { + // native functions don't have a prototype + fNOP.prototype = this.prototype; + } + fBound.prototype = new fNOP(); + + return fBound; + }; + } + // Polyfill to get the name of a function in IE9 + function functionName(fn) { + if (Function.prototype.name === undefined) { + var funcNameRegex = /function\s([^(]{1,})\(/; + var results = funcNameRegex.exec(fn.toString()); + return results && results.length > 1 ? results[1].trim() : ""; + } else if (fn.prototype === undefined) { + return fn.constructor.name; + } else { + return fn.prototype.constructor.name; + } + } + function parseValue(str) { + if ('true' === str) return true;else if ('false' === str) return false;else if (!isNaN(str * 1)) return parseFloat(str); + return str; + } + // Convert PascalCase to kebab-case + // Thank you: http://stackoverflow.com/a/8955580 + function hyphenate(str) { + return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); + } +}(jQuery); +'use strict'; + +!function ($) { + + // Default set of media queries + var defaultQueries = { + 'default': 'only screen', + landscape: 'only screen and (orientation: landscape)', + portrait: 'only screen and (orientation: portrait)', + retina: 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 'only screen and (min--moz-device-pixel-ratio: 2),' + 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 'only screen and (min-device-pixel-ratio: 2),' + 'only screen and (min-resolution: 192dpi),' + 'only screen and (min-resolution: 2dppx)' + }; + + var MediaQuery = { + queries: [], + + current: '', + + /** + * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher. + * @function + * @private + */ + _init: function () { + var self = this; + var extractedStyles = $('.foundation-mq').css('font-family'); + var namedQueries; + + namedQueries = parseStyleToObject(extractedStyles); + + for (var key in namedQueries) { + if (namedQueries.hasOwnProperty(key)) { + self.queries.push({ + name: key, + value: 'only screen and (min-width: ' + namedQueries[key] + ')' + }); + } + } + + this.current = this._getCurrentSize(); + + this._watcher(); + }, + + + /** + * Checks if the screen is at least as wide as a breakpoint. + * @function + * @param {String} size - Name of the breakpoint to check. + * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller. + */ + atLeast: function (size) { + var query = this.get(size); + + if (query) { + return window.matchMedia(query).matches; + } + + return false; + }, + + + /** + * Checks if the screen matches to a breakpoint. + * @function + * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method. + * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not. + */ + is: function (size) { + size = size.trim().split(' '); + if (size.length > 1 && size[1] === 'only') { + if (size[0] === this._getCurrentSize()) return true; + } else { + return this.atLeast(size[0]); + } + return false; + }, + + + /** + * Gets the media query of a breakpoint. + * @function + * @param {String} size - Name of the breakpoint to get. + * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist. + */ + get: function (size) { + for (var i in this.queries) { + if (this.queries.hasOwnProperty(i)) { + var query = this.queries[i]; + if (size === query.name) return query.value; + } + } + + return null; + }, + + + /** + * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one). + * @function + * @private + * @returns {String} Name of the current breakpoint. + */ + _getCurrentSize: function () { + var matched; + + for (var i = 0; i < this.queries.length; i++) { + var query = this.queries[i]; + + if (window.matchMedia(query.value).matches) { + matched = query; + } + } + + if (typeof matched === 'object') { + return matched.name; + } else { + return matched; + } + }, + + + /** + * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes. + * @function + * @private + */ + _watcher: function () { + var _this = this; + + $(window).on('resize.zf.mediaquery', function () { + var newSize = _this._getCurrentSize(), + currentSize = _this.current; + + if (newSize !== currentSize) { + // Change the current media query + _this.current = newSize; + + // Broadcast the media query change on the window + $(window).trigger('changed.zf.mediaquery', [newSize, currentSize]); + } + }); + } + }; + + Foundation.MediaQuery = MediaQuery; + + // matchMedia() polyfill - Test a CSS media type/query in JS. + // Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license + window.matchMedia || (window.matchMedia = function () { + 'use strict'; + + // For browsers that support matchMedium api such as IE 9 and webkit + + var styleMedia = window.styleMedia || window.media; + + // For those that don't support matchMedium + if (!styleMedia) { + var style = document.createElement('style'), + script = document.getElementsByTagName('script')[0], + info = null; + + style.type = 'text/css'; + style.id = 'matchmediajs-test'; + + script && script.parentNode && script.parentNode.insertBefore(style, script); + + // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers + info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle; + + styleMedia = { + matchMedium: function (media) { + var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; + + // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers + if (style.styleSheet) { + style.styleSheet.cssText = text; + } else { + style.textContent = text; + } + + // Test if media query is true or false + return info.width === '1px'; + } + }; + } + + return function (media) { + return { + matches: styleMedia.matchMedium(media || 'all'), + media: media || 'all' + }; + }; + }()); + + // Thank you: https://github.com/sindresorhus/query-string + function parseStyleToObject(str) { + var styleObject = {}; + + if (typeof str !== 'string') { + return styleObject; + } + + str = str.trim().slice(1, -1); // browsers re-quote string style values + + if (!str) { + return styleObject; + } + + styleObject = str.split('&').reduce(function (ret, param) { + var parts = param.replace(/\+/g, ' ').split('='); + var key = parts[0]; + var val = parts[1]; + key = decodeURIComponent(key); + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeURIComponent(val); + + if (!ret.hasOwnProperty(key)) { + ret[key] = val; + } else if (Array.isArray(ret[key])) { + ret[key].push(val); + } else { + ret[key] = [ret[key], val]; + } + return ret; + }, {}); + + return styleObject; + } + + Foundation.MediaQuery = MediaQuery; +}(jQuery); +/******************************************* + * * + * This util was created by Marius Olbertz * + * Please thank Marius on GitHub /owlbertz * + * or the web http://www.mariusolbertz.de/ * + * * + ******************************************/ + +'use strict'; + +!function ($) { + + var keyCodes = { + 9: 'TAB', + 13: 'ENTER', + 27: 'ESCAPE', + 32: 'SPACE', + 37: 'ARROW_LEFT', + 38: 'ARROW_UP', + 39: 'ARROW_RIGHT', + 40: 'ARROW_DOWN' + }; + + var commands = {}; + + var Keyboard = { + keys: getKeyCodes(keyCodes), + + /** + * Parses the (keyboard) event and returns a String that represents its key + * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE + * @param {Event} event - the event generated by the event handler + * @return String key - String that represents the key pressed + */ + parseKey: function (event) { + var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase(); + + // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events + key = key.replace(/\W+/, ''); + + if (event.shiftKey) key = 'SHIFT_' + key; + if (event.ctrlKey) key = 'CTRL_' + key; + if (event.altKey) key = 'ALT_' + key; + + // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`) + key = key.replace(/_$/, ''); + + return key; + }, + + + /** + * Handles the given (keyboard) event + * @param {Event} event - the event generated by the event handler + * @param {String} component - Foundation component's name, e.g. Slider or Reveal + * @param {Objects} functions - collection of functions that are to be executed + */ + handleKey: function (event, component, functions) { + var commandList = commands[component], + keyCode = this.parseKey(event), + cmds, + command, + fn; + + if (!commandList) return console.warn('Component not defined!'); + + if (typeof commandList.ltr === 'undefined') { + // this component does not differentiate between ltr and rtl + cmds = commandList; // use plain list + } else { + // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa + if (Foundation.rtl()) cmds = $.extend({}, commandList.ltr, commandList.rtl);else cmds = $.extend({}, commandList.rtl, commandList.ltr); + } + command = cmds[keyCode]; + + fn = functions[command]; + if (fn && typeof fn === 'function') { + // execute function if exists + var returnValue = fn.apply(); + if (functions.handled || typeof functions.handled === 'function') { + // execute function when event was handled + functions.handled(returnValue); + } + } else { + if (functions.unhandled || typeof functions.unhandled === 'function') { + // execute function when event was not handled + functions.unhandled(); + } + } + }, + + + /** + * Finds all focusable elements within the given `$element` + * @param {jQuery} $element - jQuery object to search within + * @return {jQuery} $focusable - all focusable elements within `$element` + */ + findFocusable: function ($element) { + if (!$element) { + return false; + } + return $element.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]').filter(function () { + if (!$(this).is(':visible') || $(this).attr('tabindex') < 0) { + return false; + } //only have visible elements and those that have a tabindex greater or equal 0 + return true; + }); + }, + + + /** + * Returns the component name name + * @param {Object} component - Foundation component, e.g. Slider or Reveal + * @return String componentName + */ + + register: function (componentName, cmds) { + commands[componentName] = cmds; + }, + + + /** + * Traps the focus in the given element. + * @param {jQuery} $element jQuery object to trap the foucs into. + */ + trapFocus: function ($element) { + var $focusable = Foundation.Keyboard.findFocusable($element), + $firstFocusable = $focusable.eq(0), + $lastFocusable = $focusable.eq(-1); + + $element.on('keydown.zf.trapfocus', function (event) { + if (event.target === $lastFocusable[0] && Foundation.Keyboard.parseKey(event) === 'TAB') { + event.preventDefault(); + $firstFocusable.focus(); + } else if (event.target === $firstFocusable[0] && Foundation.Keyboard.parseKey(event) === 'SHIFT_TAB') { + event.preventDefault(); + $lastFocusable.focus(); + } + }); + }, + + /** + * Releases the trapped focus from the given element. + * @param {jQuery} $element jQuery object to release the focus for. + */ + releaseFocus: function ($element) { + $element.off('keydown.zf.trapfocus'); + } + }; + + /* + * Constants for easier comparing. + * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE + */ + function getKeyCodes(kcs) { + var k = {}; + for (var kc in kcs) { + k[kcs[kc]] = kcs[kc]; + }return k; + } + + Foundation.Keyboard = Keyboard; +}(jQuery); +'use strict'; + +!function ($) { + + /** + * Motion module. + * @module foundation.motion + */ + + var initClasses = ['mui-enter', 'mui-leave']; + var activeClasses = ['mui-enter-active', 'mui-leave-active']; + + var Motion = { + animateIn: function (element, animation, cb) { + animate(true, element, animation, cb); + }, + + animateOut: function (element, animation, cb) { + animate(false, element, animation, cb); + } + }; + + function Move(duration, elem, fn) { + var anim, + prog, + start = null; + // console.log('called'); + + if (duration === 0) { + fn.apply(elem); + elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]); + return; + } + + function move(ts) { + if (!start) start = ts; + // console.log(start, ts); + prog = ts - start; + fn.apply(elem); + + if (prog < duration) { + anim = window.requestAnimationFrame(move, elem); + } else { + window.cancelAnimationFrame(anim); + elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]); + } + } + anim = window.requestAnimationFrame(move); + } + + /** + * Animates an element in or out using a CSS transition class. + * @function + * @private + * @param {Boolean} isIn - Defines if the animation is in or out. + * @param {Object} element - jQuery or HTML object to animate. + * @param {String} animation - CSS class to use. + * @param {Function} cb - Callback to run when animation is finished. + */ + function animate(isIn, element, animation, cb) { + element = $(element).eq(0); + + if (!element.length) return; + + var initClass = isIn ? initClasses[0] : initClasses[1]; + var activeClass = isIn ? activeClasses[0] : activeClasses[1]; + + // Set up the animation + reset(); + + element.addClass(animation).css('transition', 'none'); + + requestAnimationFrame(function () { + element.addClass(initClass); + if (isIn) element.show(); + }); + + // Start the animation + requestAnimationFrame(function () { + element[0].offsetWidth; + element.css('transition', '').addClass(activeClass); + }); + + // Clean up the animation when it finishes + element.one(Foundation.transitionend(element), finish); + + // Hides the element (for out animations), resets the element, and runs a callback + function finish() { + if (!isIn) element.hide(); + reset(); + if (cb) cb.apply(element); + } + + // Resets transitions and removes motion-specific classes + function reset() { + element[0].style.transitionDuration = 0; + element.removeClass(initClass + ' ' + activeClass + ' ' + animation); + } + } + + Foundation.Move = Move; + Foundation.Motion = Motion; +}(jQuery); +'use strict'; + +!function ($) { + + var Nest = { + Feather: function (menu) { + var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'zf'; + + menu.attr('role', 'menubar'); + + var items = menu.find('li').attr({ 'role': 'menuitem' }), + subMenuClass = 'is-' + type + '-submenu', + subItemClass = subMenuClass + '-item', + hasSubClass = 'is-' + type + '-submenu-parent'; + + items.each(function () { + var $item = $(this), + $sub = $item.children('ul'); + + if ($sub.length) { + $item.addClass(hasSubClass).attr({ + 'aria-haspopup': true, + 'aria-label': $item.children('a:first').text() + }); + // Note: Drilldowns behave differently in how they hide, and so need + // additional attributes. We should look if this possibly over-generalized + // utility (Nest) is appropriate when we rework menus in 6.4 + if (type === 'drilldown') { + $item.attr({ 'aria-expanded': false }); + } + + $sub.addClass('submenu ' + subMenuClass).attr({ + 'data-submenu': '', + 'role': 'menu' + }); + if (type === 'drilldown') { + $sub.attr({ 'aria-hidden': true }); + } + } + + if ($item.parent('[data-submenu]').length) { + $item.addClass('is-submenu-item ' + subItemClass); + } + }); + + return; + }, + Burn: function (menu, type) { + var //items = menu.find('li'), + subMenuClass = 'is-' + type + '-submenu', + subItemClass = subMenuClass + '-item', + hasSubClass = 'is-' + type + '-submenu-parent'; + + menu.find('>li, .menu, .menu > li').removeClass(subMenuClass + ' ' + subItemClass + ' ' + hasSubClass + ' is-submenu-item submenu is-active').removeAttr('data-submenu').css('display', ''); + + // console.log( menu.find('.' + subMenuClass + ', .' + subItemClass + ', .has-submenu, .is-submenu-item, .submenu, [data-submenu]') + // .removeClass(subMenuClass + ' ' + subItemClass + ' has-submenu is-submenu-item submenu') + // .removeAttr('data-submenu')); + // items.each(function(){ + // var $item = $(this), + // $sub = $item.children('ul'); + // if($item.parent('[data-submenu]').length){ + // $item.removeClass('is-submenu-item ' + subItemClass); + // } + // if($sub.length){ + // $item.removeClass('has-submenu'); + // $sub.removeClass('submenu ' + subMenuClass).removeAttr('data-submenu'); + // } + // }); + } + }; + + Foundation.Nest = Nest; +}(jQuery); +'use strict'; + +!function ($) { + + Foundation.Box = { + ImNotTouchingYou: ImNotTouchingYou, + GetDimensions: GetDimensions, + GetOffsets: GetOffsets + }; + + /** + * Compares the dimensions of an element to a container and determines collision events with container. + * @function + * @param {jQuery} element - jQuery object to test for collisions. + * @param {jQuery} parent - jQuery object to use as bounding container. + * @param {Boolean} lrOnly - set to true to check left and right values only. + * @param {Boolean} tbOnly - set to true to check top and bottom values only. + * @default if no parent object passed, detects collisions with `window`. + * @returns {Boolean} - true if collision free, false if a collision in any direction. + */ + function ImNotTouchingYou(element, parent, lrOnly, tbOnly) { + var eleDims = GetDimensions(element), + top, + bottom, + left, + right; + + if (parent) { + var parDims = GetDimensions(parent); + + bottom = eleDims.offset.top + eleDims.height <= parDims.height + parDims.offset.top; + top = eleDims.offset.top >= parDims.offset.top; + left = eleDims.offset.left >= parDims.offset.left; + right = eleDims.offset.left + eleDims.width <= parDims.width + parDims.offset.left; + } else { + bottom = eleDims.offset.top + eleDims.height <= eleDims.windowDims.height + eleDims.windowDims.offset.top; + top = eleDims.offset.top >= eleDims.windowDims.offset.top; + left = eleDims.offset.left >= eleDims.windowDims.offset.left; + right = eleDims.offset.left + eleDims.width <= eleDims.windowDims.width; + } + + var allDirs = [bottom, top, left, right]; + + if (lrOnly) { + return left === right === true; + } + + if (tbOnly) { + return top === bottom === true; + } + + return allDirs.indexOf(false) === -1; + }; + + /** + * Uses native methods to return an object of dimension values. + * @function + * @param {jQuery || HTML} element - jQuery object or DOM element for which to get the dimensions. Can be any element other that document or window. + * @returns {Object} - nested object of integer pixel values + * TODO - if element is window, return only those values. + */ + function GetDimensions(elem, test) { + elem = elem.length ? elem[0] : elem; + + if (elem === window || elem === document) { + throw new Error("I'm sorry, Dave. I'm afraid I can't do that."); + } + + var rect = elem.getBoundingClientRect(), + parRect = elem.parentNode.getBoundingClientRect(), + winRect = document.body.getBoundingClientRect(), + winY = window.pageYOffset, + winX = window.pageXOffset; + + return { + width: rect.width, + height: rect.height, + offset: { + top: rect.top + winY, + left: rect.left + winX + }, + parentDims: { + width: parRect.width, + height: parRect.height, + offset: { + top: parRect.top + winY, + left: parRect.left + winX + } + }, + windowDims: { + width: winRect.width, + height: winRect.height, + offset: { + top: winY, + left: winX + } + } + }; + } + + /** + * Returns an object of top and left integer pixel values for dynamically rendered elements, + * such as: Tooltip, Reveal, and Dropdown + * @function + * @param {jQuery} element - jQuery object for the element being positioned. + * @param {jQuery} anchor - jQuery object for the element's anchor point. + * @param {String} position - a string relating to the desired position of the element, relative to it's anchor + * @param {Number} vOffset - integer pixel value of desired vertical separation between anchor and element. + * @param {Number} hOffset - integer pixel value of desired horizontal separation between anchor and element. + * @param {Boolean} isOverflow - if a collision event is detected, sets to true to default the element to full width - any desired offset. + * TODO alter/rewrite to work with `em` values as well/instead of pixels + */ + function GetOffsets(element, anchor, position, vOffset, hOffset, isOverflow) { + var $eleDims = GetDimensions(element), + $anchorDims = anchor ? GetDimensions(anchor) : null; + + switch (position) { + case 'top': + return { + left: Foundation.rtl() ? $anchorDims.offset.left - $eleDims.width + $anchorDims.width : $anchorDims.offset.left, + top: $anchorDims.offset.top - ($eleDims.height + vOffset) + }; + break; + case 'left': + return { + left: $anchorDims.offset.left - ($eleDims.width + hOffset), + top: $anchorDims.offset.top + }; + break; + case 'right': + return { + left: $anchorDims.offset.left + $anchorDims.width + hOffset, + top: $anchorDims.offset.top + }; + break; + case 'center top': + return { + left: $anchorDims.offset.left + $anchorDims.width / 2 - $eleDims.width / 2, + top: $anchorDims.offset.top - ($eleDims.height + vOffset) + }; + break; + case 'center bottom': + return { + left: isOverflow ? hOffset : $anchorDims.offset.left + $anchorDims.width / 2 - $eleDims.width / 2, + top: $anchorDims.offset.top + $anchorDims.height + vOffset + }; + break; + case 'center left': + return { + left: $anchorDims.offset.left - ($eleDims.width + hOffset), + top: $anchorDims.offset.top + $anchorDims.height / 2 - $eleDims.height / 2 + }; + break; + case 'center right': + return { + left: $anchorDims.offset.left + $anchorDims.width + hOffset + 1, + top: $anchorDims.offset.top + $anchorDims.height / 2 - $eleDims.height / 2 + }; + break; + case 'center': + return { + left: $eleDims.windowDims.offset.left + $eleDims.windowDims.width / 2 - $eleDims.width / 2, + top: $eleDims.windowDims.offset.top + $eleDims.windowDims.height / 2 - $eleDims.height / 2 + }; + break; + case 'reveal': + return { + left: ($eleDims.windowDims.width - $eleDims.width) / 2, + top: $eleDims.windowDims.offset.top + vOffset + }; + case 'reveal full': + return { + left: $eleDims.windowDims.offset.left, + top: $eleDims.windowDims.offset.top + }; + break; + case 'left bottom': + return { + left: $anchorDims.offset.left, + top: $anchorDims.offset.top + $anchorDims.height + vOffset + }; + break; + case 'right bottom': + return { + left: $anchorDims.offset.left + $anchorDims.width + hOffset - $eleDims.width, + top: $anchorDims.offset.top + $anchorDims.height + vOffset + }; + break; + default: + return { + left: Foundation.rtl() ? $anchorDims.offset.left - $eleDims.width + $anchorDims.width : $anchorDims.offset.left + hOffset, + top: $anchorDims.offset.top + $anchorDims.height + vOffset + }; + } + } +}(jQuery); +'use strict'; + +!function ($) { + + var MutationObserver = function () { + var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; + for (var i = 0; i < prefixes.length; i++) { + if (prefixes[i] + 'MutationObserver' in window) { + return window[prefixes[i] + 'MutationObserver']; + } + } + return false; + }(); + + var triggers = function (el, type) { + el.data(type).split(' ').forEach(function (id) { + $('#' + id)[type === 'close' ? 'trigger' : 'triggerHandler'](type + '.zf.trigger', [el]); + }); + }; + // Elements with [data-open] will reveal a plugin that supports it when clicked. + $(document).on('click.zf.trigger', '[data-open]', function () { + triggers($(this), 'open'); + }); + + // Elements with [data-close] will close a plugin that supports it when clicked. + // If used without a value on [data-close], the event will bubble, allowing it to close a parent component. + $(document).on('click.zf.trigger', '[data-close]', function () { + var id = $(this).data('close'); + if (id) { + triggers($(this), 'close'); + } else { + $(this).trigger('close.zf.trigger'); + } + }); + + // Elements with [data-toggle] will toggle a plugin that supports it when clicked. + $(document).on('click.zf.trigger', '[data-toggle]', function () { + var id = $(this).data('toggle'); + if (id) { + triggers($(this), 'toggle'); + } else { + $(this).trigger('toggle.zf.trigger'); + } + }); + + // Elements with [data-closable] will respond to close.zf.trigger events. + $(document).on('close.zf.trigger', '[data-closable]', function (e) { + e.stopPropagation(); + var animation = $(this).data('closable'); + + if (animation !== '') { + Foundation.Motion.animateOut($(this), animation, function () { + $(this).trigger('closed.zf'); + }); + } else { + $(this).fadeOut().trigger('closed.zf'); + } + }); + + $(document).on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', function () { + var id = $(this).data('toggle-focus'); + $('#' + id).triggerHandler('toggle.zf.trigger', [$(this)]); + }); + + /** + * Fires once after all other scripts have loaded + * @function + * @private + */ + $(window).on('load', function () { + checkListeners(); + }); + + function checkListeners() { + eventsListener(); + resizeListener(); + scrollListener(); + mutateListener(); + closemeListener(); + } + + //******** only fires this function once on load, if there's something to watch ******** + function closemeListener(pluginName) { + var yetiBoxes = $('[data-yeti-box]'), + plugNames = ['dropdown', 'tooltip', 'reveal']; + + if (pluginName) { + if (typeof pluginName === 'string') { + plugNames.push(pluginName); + } else if (typeof pluginName === 'object' && typeof pluginName[0] === 'string') { + plugNames.concat(pluginName); + } else { + console.error('Plugin names must be strings'); + } + } + if (yetiBoxes.length) { + var listeners = plugNames.map(function (name) { + return 'closeme.zf.' + name; + }).join(' '); + + $(window).off(listeners).on(listeners, function (e, pluginId) { + var plugin = e.namespace.split('.')[0]; + var plugins = $('[data-' + plugin + ']').not('[data-yeti-box="' + pluginId + '"]'); + + plugins.each(function () { + var _this = $(this); + + _this.triggerHandler('close.zf.trigger', [_this]); + }); + }); + } + } + + function resizeListener(debounce) { + var timer = void 0, + $nodes = $('[data-resize]'); + if ($nodes.length) { + $(window).off('resize.zf.trigger').on('resize.zf.trigger', function (e) { + if (timer) { + clearTimeout(timer); + } + + timer = setTimeout(function () { + + if (!MutationObserver) { + //fallback for IE 9 + $nodes.each(function () { + $(this).triggerHandler('resizeme.zf.trigger'); + }); + } + //trigger all listening elements and signal a resize event + $nodes.attr('data-events', "resize"); + }, debounce || 10); //default time to emit resize event + }); + } + } + + function scrollListener(debounce) { + var timer = void 0, + $nodes = $('[data-scroll]'); + if ($nodes.length) { + $(window).off('scroll.zf.trigger').on('scroll.zf.trigger', function (e) { + if (timer) { + clearTimeout(timer); + } + + timer = setTimeout(function () { + + if (!MutationObserver) { + //fallback for IE 9 + $nodes.each(function () { + $(this).triggerHandler('scrollme.zf.trigger'); + }); + } + //trigger all listening elements and signal a scroll event + $nodes.attr('data-events', "scroll"); + }, debounce || 10); //default time to emit scroll event + }); + } + } + + function mutateListener(debounce) { + var $nodes = $('[data-mutate]'); + if ($nodes.length && MutationObserver) { + //trigger all listening elements and signal a mutate event + //no IE 9 or 10 + $nodes.each(function () { + $(this).triggerHandler('mutateme.zf.trigger'); + }); + } + } + + function eventsListener() { + if (!MutationObserver) { + return false; + } + var nodes = document.querySelectorAll('[data-resize], [data-scroll], [data-mutate]'); + + //element callback + var listeningElementsMutation = function (mutationRecordsList) { + var $target = $(mutationRecordsList[0].target); + + //trigger the event handler for the element depending on type + switch (mutationRecordsList[0].type) { + + case "attributes": + if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") { + $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]); + } + if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") { + $target.triggerHandler('resizeme.zf.trigger', [$target]); + } + if (mutationRecordsList[0].attributeName === "style") { + $target.closest("[data-mutate]").attr("data-events", "mutate"); + $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); + } + break; + + case "childList": + $target.closest("[data-mutate]").attr("data-events", "mutate"); + $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); + break; + + default: + return false; + //nothing + } + }; + + if (nodes.length) { + //for each element that needs to listen for resizing, scrolling, or mutation add a single observer + for (var i = 0; i <= nodes.length - 1; i++) { + var elementObserver = new MutationObserver(listeningElementsMutation); + elementObserver.observe(nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: ["data-events", "style"] }); + } + } + } + + // ------------------------------------ + + // [PH] + // Foundation.CheckWatchers = checkWatchers; + Foundation.IHearYou = checkListeners; + // Foundation.ISeeYou = scrollListener; + // Foundation.IFeelYou = closemeListener; +}(jQuery); + +// function domMutationObserver(debounce) { +// // !!! This is coming soon and needs more work; not active !!! // +// var timer, +// nodes = document.querySelectorAll('[data-mutate]'); +// // +// if (nodes.length) { +// // var MutationObserver = (function () { +// // var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; +// // for (var i=0; i < prefixes.length; i++) { +// // if (prefixes[i] + 'MutationObserver' in window) { +// // return window[prefixes[i] + 'MutationObserver']; +// // } +// // } +// // return false; +// // }()); +// +// +// //for the body, we need to listen for all changes effecting the style and class attributes +// var bodyObserver = new MutationObserver(bodyMutation); +// bodyObserver.observe(document.body, { attributes: true, childList: true, characterData: false, subtree:true, attributeFilter:["style", "class"]}); +// +// +// //body callback +// function bodyMutation(mutate) { +// //trigger all listening elements and signal a mutation event +// if (timer) { clearTimeout(timer); } +// +// timer = setTimeout(function() { +// bodyObserver.disconnect(); +// $('[data-mutate]').attr('data-events',"mutate"); +// }, debounce || 150); +// } +// } +// } +'use strict'; + +!function ($) { + + function Timer(elem, options, cb) { + var _this = this, + duration = options.duration, + //options is an object for easily adding features later. + nameSpace = Object.keys(elem.data())[0] || 'timer', + remain = -1, + start, + timer; + + this.isPaused = false; + + this.restart = function () { + remain = -1; + clearTimeout(timer); + this.start(); + }; + + this.start = function () { + this.isPaused = false; + // if(!elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things. + clearTimeout(timer); + remain = remain <= 0 ? duration : remain; + elem.data('paused', false); + start = Date.now(); + timer = setTimeout(function () { + if (options.infinite) { + _this.restart(); //rerun the timer. + } + if (cb && typeof cb === 'function') { + cb(); + } + }, remain); + elem.trigger('timerstart.zf.' + nameSpace); + }; + + this.pause = function () { + this.isPaused = true; + //if(elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things. + clearTimeout(timer); + elem.data('paused', true); + var end = Date.now(); + remain = remain - (end - start); + elem.trigger('timerpaused.zf.' + nameSpace); + }; + } + + /** + * Runs a callback function when images are fully loaded. + * @param {Object} images - Image(s) to check if loaded. + * @param {Func} callback - Function to execute when image is fully loaded. + */ + function onImagesLoaded(images, callback) { + var self = this, + unloaded = images.length; + + if (unloaded === 0) { + callback(); + } + + images.each(function () { + // Check if image is loaded + if (this.complete || this.readyState === 4 || this.readyState === 'complete') { + singleImageLoaded(); + } + // Force load the image + else { + // fix for IE. See https://css-tricks.com/snippets/jquery/fixing-load-in-ie-for-cached-images/ + var src = $(this).attr('src'); + $(this).attr('src', src + (src.indexOf('?') >= 0 ? '&' : '?') + new Date().getTime()); + $(this).one('load', function () { + singleImageLoaded(); + }); + } + }); + + function singleImageLoaded() { + unloaded--; + if (unloaded === 0) { + callback(); + } + } + } + + Foundation.Timer = Timer; + Foundation.onImagesLoaded = onImagesLoaded; +}(jQuery); +//************************************************** +//**Work inspired by multiple jquery swipe plugins** +//**Done by Yohai Ararat *************************** +//************************************************** +(function ($) { + + $.spotSwipe = { + version: '1.0.0', + enabled: 'ontouchstart' in document.documentElement, + preventDefault: false, + moveThreshold: 75, + timeThreshold: 200 + }; + + var startPosX, + startPosY, + startTime, + elapsedTime, + isMoving = false; + + function onTouchEnd() { + // alert(this); + this.removeEventListener('touchmove', onTouchMove); + this.removeEventListener('touchend', onTouchEnd); + isMoving = false; + } + + function onTouchMove(e) { + if ($.spotSwipe.preventDefault) { + e.preventDefault(); + } + if (isMoving) { + var x = e.touches[0].pageX; + var y = e.touches[0].pageY; + var dx = startPosX - x; + var dy = startPosY - y; + var dir; + elapsedTime = new Date().getTime() - startTime; + if (Math.abs(dx) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) { + dir = dx > 0 ? 'left' : 'right'; + } + // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) { + // dir = dy > 0 ? 'down' : 'up'; + // } + if (dir) { + e.preventDefault(); + onTouchEnd.call(this); + $(this).trigger('swipe', dir).trigger('swipe' + dir); + } + } + } + + function onTouchStart(e) { + if (e.touches.length == 1) { + startPosX = e.touches[0].pageX; + startPosY = e.touches[0].pageY; + isMoving = true; + startTime = new Date().getTime(); + this.addEventListener('touchmove', onTouchMove, false); + this.addEventListener('touchend', onTouchEnd, false); + } + } + + function init() { + this.addEventListener && this.addEventListener('touchstart', onTouchStart, false); + } + + function teardown() { + this.removeEventListener('touchstart', onTouchStart); + } + + $.event.special.swipe = { setup: init }; + + $.each(['left', 'up', 'down', 'right'], function () { + $.event.special['swipe' + this] = { setup: function () { + $(this).on('swipe', $.noop); + } }; + }); +})(jQuery); +/**************************************************** + * Method for adding psuedo drag events to elements * + ***************************************************/ +!function ($) { + $.fn.addTouch = function () { + this.each(function (i, el) { + $(el).bind('touchstart touchmove touchend touchcancel', function () { + //we pass the original event object because the jQuery event + //object is normalized to w3c specs and does not provide the TouchList + handleTouch(event); + }); + }); + + var handleTouch = function (event) { + var touches = event.changedTouches, + first = touches[0], + eventTypes = { + touchstart: 'mousedown', + touchmove: 'mousemove', + touchend: 'mouseup' + }, + type = eventTypes[event.type], + simulatedEvent; + + if ('MouseEvent' in window && typeof window.MouseEvent === 'function') { + simulatedEvent = new window.MouseEvent(type, { + 'bubbles': true, + 'cancelable': true, + 'screenX': first.screenX, + 'screenY': first.screenY, + 'clientX': first.clientX, + 'clientY': first.clientY + }); + } else { + simulatedEvent = document.createEvent('MouseEvent'); + simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0 /*left*/, null); + } + first.target.dispatchEvent(simulatedEvent); + }; + }; +}(jQuery); + +//********************************** +//**From the jQuery Mobile Library** +//**need to recreate functionality** +//**and try to improve if possible** +//********************************** + +/* Removing the jQuery function **** +************************************ + +(function( $, window, undefined ) { + + var $document = $( document ), + // supportTouch = $.mobile.support.touch, + touchStartEvent = 'touchstart'//supportTouch ? "touchstart" : "mousedown", + touchStopEvent = 'touchend'//supportTouch ? "touchend" : "mouseup", + touchMoveEvent = 'touchmove'//supportTouch ? "touchmove" : "mousemove"; + + // setup new event shortcuts + $.each( ( "touchstart touchmove touchend " + + "swipe swipeleft swiperight" ).split( " " ), function( i, name ) { + + $.fn[ name ] = function( fn ) { + return fn ? this.bind( name, fn ) : this.trigger( name ); + }; + + // jQuery < 1.8 + if ( $.attrFn ) { + $.attrFn[ name ] = true; + } + }); + + function triggerCustomEvent( obj, eventType, event, bubble ) { + var originalType = event.type; + event.type = eventType; + if ( bubble ) { + $.event.trigger( event, undefined, obj ); + } else { + $.event.dispatch.call( obj, event ); + } + event.type = originalType; + } + + // also handles taphold + + // Also handles swipeleft, swiperight + $.event.special.swipe = { + + // More than this horizontal displacement, and we will suppress scrolling. + scrollSupressionThreshold: 30, + + // More time than this, and it isn't a swipe. + durationThreshold: 1000, + + // Swipe horizontal displacement must be more than this. + horizontalDistanceThreshold: window.devicePixelRatio >= 2 ? 15 : 30, + + // Swipe vertical displacement must be less than this. + verticalDistanceThreshold: window.devicePixelRatio >= 2 ? 15 : 30, + + getLocation: function ( event ) { + var winPageX = window.pageXOffset, + winPageY = window.pageYOffset, + x = event.clientX, + y = event.clientY; + + if ( event.pageY === 0 && Math.floor( y ) > Math.floor( event.pageY ) || + event.pageX === 0 && Math.floor( x ) > Math.floor( event.pageX ) ) { + + // iOS4 clientX/clientY have the value that should have been + // in pageX/pageY. While pageX/page/ have the value 0 + x = x - winPageX; + y = y - winPageY; + } else if ( y < ( event.pageY - winPageY) || x < ( event.pageX - winPageX ) ) { + + // Some Android browsers have totally bogus values for clientX/Y + // when scrolling/zooming a page. Detectable since clientX/clientY + // should never be smaller than pageX/pageY minus page scroll + x = event.pageX - winPageX; + y = event.pageY - winPageY; + } + + return { + x: x, + y: y + }; + }, + + start: function( event ) { + var data = event.originalEvent.touches ? + event.originalEvent.touches[ 0 ] : event, + location = $.event.special.swipe.getLocation( data ); + return { + time: ( new Date() ).getTime(), + coords: [ location.x, location.y ], + origin: $( event.target ) + }; + }, + + stop: function( event ) { + var data = event.originalEvent.touches ? + event.originalEvent.touches[ 0 ] : event, + location = $.event.special.swipe.getLocation( data ); + return { + time: ( new Date() ).getTime(), + coords: [ location.x, location.y ] + }; + }, + + handleSwipe: function( start, stop, thisObject, origTarget ) { + if ( stop.time - start.time < $.event.special.swipe.durationThreshold && + Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.horizontalDistanceThreshold && + Math.abs( start.coords[ 1 ] - stop.coords[ 1 ] ) < $.event.special.swipe.verticalDistanceThreshold ) { + var direction = start.coords[0] > stop.coords[ 0 ] ? "swipeleft" : "swiperight"; + + triggerCustomEvent( thisObject, "swipe", $.Event( "swipe", { target: origTarget, swipestart: start, swipestop: stop }), true ); + triggerCustomEvent( thisObject, direction,$.Event( direction, { target: origTarget, swipestart: start, swipestop: stop } ), true ); + return true; + } + return false; + + }, + + // This serves as a flag to ensure that at most one swipe event event is + // in work at any given time + eventInProgress: false, + + setup: function() { + var events, + thisObject = this, + $this = $( thisObject ), + context = {}; + + // Retrieve the events data for this element and add the swipe context + events = $.data( this, "mobile-events" ); + if ( !events ) { + events = { length: 0 }; + $.data( this, "mobile-events", events ); + } + events.length++; + events.swipe = context; + + context.start = function( event ) { + + // Bail if we're already working on a swipe event + if ( $.event.special.swipe.eventInProgress ) { + return; + } + $.event.special.swipe.eventInProgress = true; + + var stop, + start = $.event.special.swipe.start( event ), + origTarget = event.target, + emitted = false; + + context.move = function( event ) { + if ( !start || event.isDefaultPrevented() ) { + return; + } + + stop = $.event.special.swipe.stop( event ); + if ( !emitted ) { + emitted = $.event.special.swipe.handleSwipe( start, stop, thisObject, origTarget ); + if ( emitted ) { + + // Reset the context to make way for the next swipe event + $.event.special.swipe.eventInProgress = false; + } + } + // prevent scrolling + if ( Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.scrollSupressionThreshold ) { + event.preventDefault(); + } + }; + + context.stop = function() { + emitted = true; + + // Reset the context to make way for the next swipe event + $.event.special.swipe.eventInProgress = false; + $document.off( touchMoveEvent, context.move ); + context.move = null; + }; + + $document.on( touchMoveEvent, context.move ) + .one( touchStopEvent, context.stop ); + }; + $this.on( touchStartEvent, context.start ); + }, + + teardown: function() { + var events, context; + + events = $.data( this, "mobile-events" ); + if ( events ) { + context = events.swipe; + delete events.swipe; + events.length--; + if ( events.length === 0 ) { + $.removeData( this, "mobile-events" ); + } + } + + if ( context ) { + if ( context.start ) { + $( this ).off( touchStartEvent, context.start ); + } + if ( context.move ) { + $document.off( touchMoveEvent, context.move ); + } + if ( context.stop ) { + $document.off( touchStopEvent, context.stop ); + } + } + } + }; + $.each({ + swipeleft: "swipe.left", + swiperight: "swipe.right" + }, function( event, sourceEvent ) { + + $.event.special[ event ] = { + setup: function() { + $( this ).bind( sourceEvent, $.noop ); + }, + teardown: function() { + $( this ).unbind( sourceEvent ); + } + }; + }); +})( jQuery, this ); +*/ +'use strict'; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +!function ($) { + + /** + * Abide module. + * @module foundation.abide + */ + + var Abide = function () { + /** + * Creates a new instance of Abide. + * @class + * @fires Abide#init + * @param {Object} element - jQuery object to add the trigger to. + * @param {Object} options - Overrides to the default plugin settings. + */ + function Abide(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Abide); + + this.$element = element; + this.options = $.extend({}, Abide.defaults, this.$element.data(), options); + + this._init(); + + Foundation.registerPlugin(this, 'Abide'); + } + + /** + * Initializes the Abide plugin and calls functions to get Abide functioning on load. + * @private + */ + + + _createClass(Abide, [{ + key: '_init', + value: function _init() { + this.$inputs = this.$element.find('input, textarea, select'); + + this._events(); + } + + /** + * Initializes events for Abide. + * @private + */ + + }, { + key: '_events', + value: function _events() { + var _this2 = this; + + this.$element.off('.abide').on('reset.zf.abide', function () { + _this2.resetForm(); + }).on('submit.zf.abide', function () { + return _this2.validateForm(); + }); + + if (this.options.validateOn === 'fieldChange') { + this.$inputs.off('change.zf.abide').on('change.zf.abide', function (e) { + _this2.validateInput($(e.target)); + }); + } + + if (this.options.liveValidate) { + this.$inputs.off('input.zf.abide').on('input.zf.abide', function (e) { + _this2.validateInput($(e.target)); + }); + } + + if (this.options.validateOnBlur) { + this.$inputs.off('blur.zf.abide').on('blur.zf.abide', function (e) { + _this2.validateInput($(e.target)); + }); + } + } + + /** + * Calls necessary functions to update Abide upon DOM change + * @private + */ + + }, { + key: '_reflow', + value: function _reflow() { + this._init(); + } + + /** + * Checks whether or not a form element has the required attribute and if it's checked or not + * @param {Object} element - jQuery object to check for required attribute + * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty + */ + + }, { + key: 'requiredCheck', + value: function requiredCheck($el) { + if (!$el.attr('required')) return true; + + var isGood = true; + + switch ($el[0].type) { + case 'checkbox': + isGood = $el[0].checked; + break; + + case 'select': + case 'select-one': + case 'select-multiple': + var opt = $el.find('option:selected'); + if (!opt.length || !opt.val()) isGood = false; + break; + + default: + if (!$el.val() || !$el.val().length) isGood = false; + } + + return isGood; + } + + /** + * Based on $el, get the first element with selector in this order: + * 1. The element's direct sibling('s). + * 3. The element's parent's children. + * + * This allows for multiple form errors per input, though if none are found, no form errors will be shown. + * + * @param {Object} $el - jQuery object to use as reference to find the form error selector. + * @returns {Object} jQuery object with the selector. + */ + + }, { + key: 'findFormError', + value: function findFormError($el) { + var $error = $el.siblings(this.options.formErrorSelector); + + if (!$error.length) { + $error = $el.parent().find(this.options.formErrorSelector); + } + + return $error; + } + + /** + * Get the first element in this order: + * 2. The
or other required elements. + thead: [ 1, "
", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] +}; + +// Support: IE9 +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + + +function getAll( context, tag ) { + + // Support: IE9-11+ + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== "undefined" ? + context.querySelectorAll( tag || "*" ) : + []; + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], ret ) : + ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, contains, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + + // Support: Android<4.1, PhantomJS<2 + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android<4.1, PhantomJS<2 + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0-4.3, Safari<=5.1 + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Safari<=5.1, Android<4.2 + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<=11+ + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; +} )(); + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE9 +// See #13393 for more info +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = {}; + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, j, ret, matched, handleObj, + handlerQueue = [], + args = slice.call( arguments ), + handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). + if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Support (at least): Chrome, IE9 + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // + // Support: Firefox<=42+ + // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) + if ( delegateCount && cur.nodeType && + ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push( { elem: cur, handlers: matches } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + + "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split( " " ), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " + + "screenX screenY toElement" ).split( " " ), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - + ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - + ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: Cordova 2.5 (WebKit) (#13255) + // All events should have a target; Cordova deviceready doesn't + if ( !event.target ) { + event.target = document; + } + + // Support: Safari 6.0+, Chrome<28 + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + this.focus(); + return false; + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android<4.0 + src.returnValue === false ? + returnTrue : + returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://code.google.com/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, + + // Support: IE 10-11, Edge 10240+ + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName( "tbody" )[ 0 ] || + elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.access( src ); + pdataCur = dataPriv.set( dest, pdataOld ); + events = pdataOld.events; + + if ( events ) { + delete pdataCur.handle; + pdataCur.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android<4.1, PhantomJS<2 + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html.replace( rxhtmlTag, "<$1>" ); + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = jQuery.contains( elem.ownerDocument, elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <= 35-45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <= 35-45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + + // Keep domManip exposed until 3.0 (gh-2225) + domManip: domManip, + + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: QtWebKit + // .get() because push.apply(_, arraylike) throws + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); + + +var iframe, + elemdisplay = { + + // Support: Firefox + // We have to pre-define these values for FF (#10227) + HTML: "block", + BODY: "block" + }; + +/** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ + +// Called only from within defaultDisplay +function actualDisplay( name, doc ) { + var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + display = jQuery.css( elem[ 0 ], "display" ); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; +} + +/** + * Try to determine the default display value of an element + * @param {String} nodeName + */ +function defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + + // Use the already-created iframe if possible + iframe = ( iframe || jQuery( "