Commit 7fc92681548bb3c55bfe3eb78c0aa38967a1c7ae

Authored by Victor Costa
2 parents 2adb85fc a58f6544

Merge branch 'stable' into hotfixes

Showing 151 changed files with 4809 additions and 6871 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 151 files displayed.

Gemfile
... ... @@ -13,7 +13,7 @@ gem 'ruby-feedparser', '~> 0.7'
13 13 gem 'daemons', '~> 1.1.5'
14 14 gem 'thin', '~> 1.3.1'
15 15 gem 'hpricot', '~> 0.8.6'
16   -gem 'nokogiri', '~> 1.5.5'
  16 +gem 'nokogiri', '~> 1.6.0'
17 17 gem 'rake', :require => false
18 18 gem 'grape', '~> 0.2.1'
19 19 gem 'rest-client', '~> 1.6.7'
... ... @@ -33,6 +33,7 @@ group :production do
33 33 end
34 34  
35 35 group :test do
  36 + gem 'test-unit', '~> 1.2.3'
36 37 gem 'rspec', '~> 2.10.0'
37 38 gem 'rspec-rails', '~> 2.10.1'
38 39 gem 'mocha', '~> 1.1.0', :require => false
... ... @@ -46,8 +47,9 @@ group :cucumber do
46 47 gem 'selenium-webdriver', '~> 2.39.0'
47 48 end
48 49  
49   -# include plugin gemfiles
50   -Dir.glob(File.join('config', 'plugins', '*')).each do |plugin|
51   - plugin_gemfile = File.join(plugin, 'Gemfile')
52   - eval File.read(plugin_gemfile) if File.exists?(plugin_gemfile)
  50 +# include gemfiles from enabled plugins
  51 +# plugins in baseplugins/ are not included on purpose. They should not have any
  52 +# dependencies.
  53 +Dir.glob('config/plugins/*/Gemfile').each do |gemfile|
  54 + eval File.read(gemfile)
53 55 end
... ...
app/controllers/public/account_controller.rb
... ... @@ -200,7 +200,7 @@ class AccountController < ApplicationController
200 200 else
201 201 @change_password.errors[:base] << _('Could not find any user with %s equal to "%s".') % [fields_label, params[:value]]
202 202 end
203   - rescue ActiveRecord::RecordInvald
  203 + rescue ActiveRecord::RecordInvalid
204 204 @change_password.errors[:base] << _('Could not perform password recovery for the user.')
205 205 end
206 206 end
... ...
app/controllers/public/profile_controller.rb
... ... @@ -17,8 +17,11 @@ class ProfileController &lt; PublicController
17 17 end
18 18 @tags = profile.article_tags
19 19 unless profile.display_info_to?(user)
20   - profile.visible? ? private_profile : invisible_profile
21   - render :action => 'index', :status => 403
  20 + if profile.visible?
  21 + private_profile
  22 + else
  23 + invisible_profile
  24 + end
22 25 end
23 26 end
24 27  
... ... @@ -395,6 +398,7 @@ class ProfileController &lt; PublicController
395 398  
396 399 def private_profile
397 400 private_profile_partial_parameters
  401 + render :action => 'index', :status => 403
398 402 end
399 403  
400 404 def invisible_profile
... ...
app/controllers/public/search_controller.rb
... ... @@ -90,10 +90,14 @@ class SearchController &lt; PublicController
90 90 end
91 91  
92 92 def events
93   - year = (params[:year] ? params[:year].to_i : Date.today.year)
94   - month = (params[:month] ? params[:month].to_i : Date.today.month)
95   - day = (params[:day] ? params[:day].to_i : Date.today.day)
96   - @date = build_date(year, month, day)
  93 + if params[:year].blank? && params[:year].blank? && params[:day].blank?
  94 + @date = Date.today
  95 + else
  96 + year = (params[:year] ? params[:year].to_i : Date.today.year)
  97 + month = (params[:month] ? params[:month].to_i : Date.today.month)
  98 + day = (params[:day] ? params[:day].to_i : 1)
  99 + @date = build_date(year, month, day)
  100 + end
97 101 date_range = (@date - 1.month).at_beginning_of_month..(@date + 1.month).at_end_of_month
98 102  
99 103 @events = []
... ...
app/helpers/application_helper.rb
... ... @@ -1321,7 +1321,9 @@ module ApplicationHelper
1321 1321 end
1322 1322 else
1323 1323 options = options_for_select(templates.collect{ |template| [template.name, template.id]})
1324   - content_tag('div', content_tag('label', _('Profile organization'), :class => 'formlabel') + (select_tag 'profile_data[template_id]', options, :onchange => 'show_fields_for_template(this);'))
  1324 + content_tag('div',
  1325 + content_tag('div', content_tag('label', _('Profile organization'), :class => 'formlabel') + (select_tag 'profile_data[template_id]', options, :onchange => 'show_fields_for_template(this);')),
  1326 + :id => 'template-options')
1325 1327 end
1326 1328 end
1327 1329  
... ...
app/helpers/sweeper_helper.rb
... ... @@ -56,12 +56,12 @@ module SweeperHelper
56 56 if profile
57 57 profile.blocks.each {|block|
58 58 conditions = block.class.expire_on
59   - blocks_to_expire << block unless (conditions[:profile] & causes).empty?
  59 + blocks_to_expire << block unless (conditions[:profile] & causes).blank?
60 60 }
61 61 end
62 62 environment.blocks.each {|block|
63 63 conditions = block.class.expire_on
64   - blocks_to_expire << block unless (conditions[:environment] & causes).empty?
  64 + blocks_to_expire << block unless (conditions[:environment] & causes).blank?
65 65 }
66 66  
67 67 blocks_to_expire.uniq!
... ...
app/models/comment.rb
... ... @@ -46,7 +46,7 @@ class Comment &lt; ActiveRecord::Base
46 46  
47 47 acts_as_having_settings :field => :setting
48 48  
49   - xss_terminate :only => [ :body, :title, :name ], :with => 'white_list', :on => 'validation'
  49 + xss_terminate :only => [ :body, :title, :name ], :on => 'validation'
50 50  
51 51 def comment_root
52 52 (reply_of && reply_of.comment_root) || self
... ...
app/models/task.rb
... ... @@ -285,8 +285,9 @@ class Task &lt; ActiveRecord::Base
285 285 # If
286 286 def send_notification(action)
287 287 if sends_email?
288   - if self.requestor
289   - TaskMailer.generic_message("task_#{action}", self)
  288 + if self.requestor && !self.requestor.notification_emails.empty?
  289 + message = TaskMailer.generic_message("task_#{action}", self)
  290 + message.deliver if message
290 291 end
291 292 end
292 293 end
... ...
app/sweepers/role_assignment_sweeper.rb
... ... @@ -13,7 +13,7 @@ class RoleAssignmentSweeper &lt; ActiveRecord::Observer
13 13 protected
14 14  
15 15 def expire_caches(role_assignment)
16   - expire_cache(role_assignment.accessor)
  16 + expire_cache(role_assignment.accessor) if role_assignment.accessor.kind_of?(Profile)
17 17 expire_cache(role_assignment.resource) if role_assignment.resource.kind_of?(Profile)
18 18 end
19 19  
... ...
app/views/cms/why_categorize.html.erb
... ... @@ -5,5 +5,5 @@
5 5 </p>
6 6  
7 7 <% button_bar do %>
8   - <%= colorbox_close_button _('Close') %>
  8 + <%= lightbox_close_button _('Close') %>
9 9 <% end %>
... ...
app/views/profile/_profile_comment_form.html.erb
... ... @@ -10,8 +10,8 @@
10 10 :rows => 1,
11 11 :class => 'submit-with-keypress',
12 12 :title => _('Leave your comment'),
13   - :onfocus => ('if(this.value==this.title){this.value="";this.style.color="#000"};this.style.backgroundImage="url(' + profile_icon(current_person, :icon, false) + ')"' if logged_in?),
14   - :onblur => ('if(this.value==""){this.value=this.title;this.style.color="#ccc"};this.style.backgroundImage="none"' if logged_in?),
  13 + :onfocus => ("if(this.value==this.title){this.value='';this.style.color='#000'};this.style.backgroundImage='url(" + profile_icon(current_person, :icon, false) + ")'" if logged_in?),
  14 + :onblur => ("if(this.value==''){this.value=this.title;this.style.color='#ccc'};this.style.backgroundImage='none'" if logged_in?),
15 15 :value => _('Leave your comment'),
16 16 :style => 'color: #ccc' %>
17 17 <%= hidden_field_tag :source_id, activity.id, :id => "activity_id_#{activity.id}" %>
... ...
app/views/profile/_profile_scrap_reply_form.html.erb
... ... @@ -9,9 +9,9 @@
9 9 :rows => 1,
10 10 :class => 'submit-with-keypress',
11 11 :title => _('Leave your comment'),
12   - :onfocus => ('if(this.value==this.title){this.value="";this.style.color="#000"};this.style.backgroundImage="url(' + profile_icon(current_person, :icon, false) + ')"' if logged_in?),
13   - :onblur => ('if(this.value==""){this.value=this.title;this.style.color="#ccc"};this.style.backgroundImage="none"' if logged_in?),
14   - :value => _('Leave your comment') %>
  12 + :onfocus => ("if(this.value==this.title){this.value='';this.style.color='#000'};this.style.backgroundImage='url(" + profile_icon(current_person, :icon, false) + ")'" if logged_in?),
  13 + :onblur => ("if(this.value==''){this.value=this.title;this.style.color='#ccc'};this.style.backgroundImage='none'" if logged_in?),
  14 + :value => _('Leave your comment'), %>
15 15 <%= hidden_field_tag 'scrap[scrap_id]', scrap.id %>
16 16 <%= hidden_field_tag 'receiver_id', scrap.sender.id %>
17 17 <% end %>
... ...
app/views/shared/logged_in/xmpp_chat.html.erb
... ... @@ -87,7 +87,7 @@
87 87 <li class='%{presence_status}'>
88 88 <a data-id='%{jid_id}' class='icon-menu-%{presence_status}-11' href='#'>
89 89 %{avatar}
90   - <span class="name">%{name}<span>
  90 + <span class="name">%{name}</span>
91 91 </a>
92 92 </li>
93 93 </div>
... ...
app/views/task_mailer/generic_message.text.erb 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +<%= _('Dear %s,') % @requestor %>
  2 +
  3 +<%= word_wrap(@message) %>
  4 +
  5 +<%= _('Greetings,') %>
  6 +
  7 +--
  8 +<%= _('%s team.') % @environment %>
  9 +<%= @url %>
... ...
app/views/task_mailer/task_activated.text.erb
... ... @@ -1 +0,0 @@
1   -task_cancelled.text.erb
2 0 \ No newline at end of file
app/views/task_mailer/task_cancelled.text.erb
... ... @@ -1,9 +0,0 @@
1   -<%= _('Dear %s,') % @requestor %>
2   -
3   -<%= word_wrap(@message) %>
4   -
5   -<%= _('Greetings,') %>
6   -
7   ---
8   -<%= _('%s team.') % @environment %>
9   -<%= @url %>
app/views/task_mailer/task_created.text.erb
... ... @@ -1 +0,0 @@
1   -task_cancelled.text.erb
2 0 \ No newline at end of file
app/views/task_mailer/task_finished.text.erb
... ... @@ -1 +0,0 @@
1   -task_cancelled.text.erb
2 0 \ No newline at end of file
config/initializers/i18n.rb
1 1 # necessary for I18n.default_locale to work
2 2 require 'i18n/backend/fallbacks'
3 3 I18n.backend.class.send :include, I18n::Backend::Fallbacks
4   -
  4 +I18n.enforce_available_locales = false
... ...
debian/control
... ... @@ -50,6 +50,7 @@ Depends:
50 50 ruby-hpricot,
51 51 ruby-nokogiri,
52 52 ruby-acts-as-taggable-on,
  53 + ruby-progressbar,
53 54 ruby-prototype-rails,
54 55 ruby-rails-autolink,
55 56 memcached,
... ...
debian/noosfero.links
... ... @@ -15,4 +15,4 @@ var/lib/noosfero-data/public/thumbnails usr/share/noosfero/public/th
15 15 usr/share/noosfero/public/designs/themes/noosfero usr/share/noosfero/public/designs/themes/default
16 16 usr/share/noosfero/public/designs/icons/tango usr/share/noosfero/public/designs/icons/default
17 17 usr/share/noosfero/script/noosfero-plugins usr/sbin/noosfero-plugins
18   -usr/share/noosfero/Gemfile.lock /dev/null
  18 +/dev/null usr/share/noosfero/Gemfile.lock
... ...
features/change_organization_name.feature
... ... @@ -1,36 +0,0 @@
1   -Feature: change organization name
2   - As an organization's admin
3   - I want to change it's name
4   - In order to keep it's name consistent
5   -
6   - Scenario: changing community's name
7   - Given the following communities
8   - | identifier | name |
9   - | sample-community | Sample Community |
10   - And the following users
11   - | login | name |
12   - | joaosilva | Joao Silva |
13   - And "Joao Silva" is admin of "Sample Community"
14   - And I am logged in as "joaosilva"
15   - And I am on sample-community's control panel
16   - And I follow "Community Info and settings"
17   - And I fill in "Name" with "New Sample Community"
18   - When I press "Save"
19   - Then I should be on sample-community's control panel
20   - And I should see "New Sample Community" within "title"
21   -
22   - Scenario: changing enterprise's name
23   - Given the following enterprises
24   - | identifier | name |
25   - | sample-enterprise | Sample Enterprise |
26   - And the following users
27   - | login | name |
28   - | joaosilva | Joao Silva |
29   - And "Joao Silva" is admin of "Sample Enterprise"
30   - And I am logged in as "joaosilva"
31   - And I am on sample-enterprise's control panel
32   - And I follow "Enterprise Info and settings"
33   - And I fill in "Name" with "New Sample Enterprise"
34   - When I press "Save"
35   - Then I should be on sample-enterprise's control panel
36   - And I should see "New Sample Enterprise" within "title"
features/chat.feature
... ... @@ -1,145 +0,0 @@
1   -Feature: chat
2   - As a Noosfero user
3   - I want to chat with my friends
4   -
5   - Background:
6   - Given the following users
7   - | login | name |
8   - | tame | Tame |
9   - | mariasilva | Maria Silva |
10   - | josesilva | Jose Silva |
11   - And "tame" is online in chat
12   - And "mariasilva" is online in chat
13   - And "josesilva" is online in chat
14   - And "tame" is friend of "mariasilva"
15   - And "tame" is friend of "josesilva"
16   -
17   - @selenium
18   - Scenario: provide link to open chat
19   - Given feature "xmpp_chat" is enabled on environment
20   - And I am logged in as "tame"
21   - Then I should see "Open chat" within "#user"
22   -
23   - @selenium
24   - Scenario: provide the chat online users content
25   - Given feature "xmpp_chat" is enabled on environment
26   - And I am logged in as "tame"
27   - Then I should see "Friends in chat "
28   -
29   - @selenium
30   - Scenario: provide the chat online users list
31   - Given the profile "tame" has no blocks
32   - And feature "xmpp_chat" is enabled on environment
33   - And I am logged in as "tame"
34   - And I go to tame's profile
35   - When I follow "chat-online-users-title"
36   - Then I should see "Maria Silva"
37   - And I should see "Jose Silva"
38   -
39   - Scenario: not provide link to chat when environment not support that
40   - Given I am logged in as "tame"
41   - Then I should not see "Open chat" within "#user"
42   -
43   - Scenario: not provide link to chat when the user is logged out
44   - Given I am on tame's homepage
45   - Then I should not see "Open chat" within "#user"
46   -
47   - @selenium
48   - Scenario: not provide the chat online users list when environment not support that
49   - Given I am logged in as "tame"
50   - Then I should not see "Friends in chat "
51   -
52   - Scenario: block access to chat when environment not support that
53   - Given I am logged in as "tame"
54   - When I go to chat
55   - Then I should see "There is no such page"
56   -
57   - Scenario: block access to chat for guest users
58   - Given feature "xmpp_chat" is enabled on environment
59   - When I go to chat
60   - Then I should be on login page
61   -
62   - @selenium
63   - Scenario: open chat in a new window
64   - Given feature "xmpp_chat" is enabled on environment
65   - And I am logged in as "tame"
66   - When I follow "Open chat"
67   - And I select window "noosfero_chat"
68   - Then I should see "Chat - Colivre.net - Friends online (0)"
69   -
70   - @selenium
71   - Scenario: open chat with an online user in a new window
72   - Given the profile "tame" has no blocks
73   - And feature "xmpp_chat" is enabled on environment
74   - And I am logged in as "tame"
75   - And I go to tame's profile
76   - When I follow "chat-online-users-title"
77   - And I follow "Maria Silva"
78   - And I select window "noosfero_chat"
79   - Then I should see "Chat - Colivre.net - Friends online (0)"
80   -
81   - @selenium
82   - Scenario: chat starts disconnected by default
83   - Given feature "xmpp_chat" is enabled on environment
84   - And I am logged in as "tame"
85   - When I follow "Open chat"
86   - And I select window "noosfero_chat"
87   - Then I should see "Offline" within "a"
88   -
89   - @selenium
90   - Scenario: view options to change my chat status through menu
91   - Given feature "xmpp_chat" is enabled on environment
92   - And I am logged in as "tame"
93   - And I follow "Open chat"
94   - When I select window "noosfero_chat"
95   - Then "Online" should not be visible within "#user-status"
96   - And "Busy" should not be visible within "#user-status"
97   - And "Sign out of chat" should not be visible within "#user-status"
98   - When I follow "Offline"
99   - Then "Online" should be visible within "#user-status"
100   - And "Busy" should be visible within "#user-status"
101   - And "Sign out of chat" should be visible within "#user-status"
102   -
103   - @selenium
104   - Scenario: link to open chatroom of a community
105   - Given the following communities
106   - | identifier | name |
107   - | autoramas | Autoramas |
108   - And "Tame" is a member of "Autoramas"
109   - And feature "xmpp_chat" is enabled on environment
110   - And I am logged in as "tame"
111   - When I go to autoramas's profile
112   - Then I should see "Enter chat room"
113   -
114   - @selenium
115   - Scenario: not see link to open chatroom of a community if not a member
116   - Given the following communities
117   - | identifier | name |
118   - | autoramas | Autoramas |
119   - And feature "xmpp_chat" is enabled on environment
120   - And I am logged in as "tame"
121   - When I go to autoramas's profile
122   - Then I should not see "Enter chat room" within "a"
123   -
124   - @selenium
125   - Scenario: not see link to open chatroom of a community if xmpp_chat disabled
126   - Given the following communities
127   - | identifier | name |
128   - | autoramas | Autoramas |
129   - And "Tame" is a member of "Autoramas"
130   - And I am logged in as "tame"
131   - When I go to autoramas's profile
132   - Then I should not see "Enter chat room" within "a"
133   -
134   - @selenium
135   - Scenario: open chatroom of a community in a new window
136   - Given feature "xmpp_chat" is enabled on environment
137   - And the following communities
138   - | identifier | name |
139   - | autoramas | Autoramas |
140   - And "Tame" is a member of "Autoramas"
141   - And I am logged in as "tame"
142   - When I go to autoramas's profile
143   - And I follow "Enter chat room"
144   - And I select window "noosfero_chat"
145   - Then I should see "Chat - Colivre.net - Friends online (0)"
features/edit_profile.feature
... ... @@ -27,44 +27,3 @@ Feature: edit profile
27 27 And I press "Save"
28 28 Then I should not see "Birth date is invalid"
29 29 And I should not see "Birth date is mandatory"
30   -
31   - @selenium
32   - Scenario: Alert about url change
33   - Given the following community
34   - | identifier | name | owner |
35   - | o-rappa | O Rappa | joao |
36   - And feature "enable_organization_url_change" is enabled on environment
37   - And I go to o-rappa's control panel
38   - When I follow "Community Info and settings"
39   - Then I should not see "WARNING" within "#identifier-change-confirmation"
40   - And I fill in "Address" with "banda-o-rappa"
41   - When I leave the "#profile_data_identifier" field
42   - Then I should see "WARNING" within "#identifier-change-confirmation"
43   -
44   - @selenium
45   - Scenario: Confirm url change
46   - Given the following community
47   - | identifier | name | owner |
48   - | o-rappa | O Rappa | joao |
49   - And feature "enable_organization_url_change" is enabled on environment
50   - And I go to o-rappa's control panel
51   - And I follow "Community Info and settings"
52   - And I fill in "Address" with "banda-o-rappa"
53   - When I leave the "#profile_data_identifier" field
54   - Then I should see "WARNING" within "#identifier-change-confirmation"
55   - When I follow "Yes"
56   - Then I should not see "WARNING" within "#identifier-change-confirmation"
57   -
58   - @selenium
59   - Scenario: Cancel url change
60   - Given the following community
61   - | identifier | name | owner |
62   - | o-rappa | O Rappa | joao |
63   - And feature "enable_organization_url_change" is enabled on environment
64   - And I go to o-rappa's control panel
65   - And I follow "Community Info and settings"
66   - And I fill in "Address" with "banda-o-rappa"
67   - When I leave the "#profile_data_identifier" field
68   - Then I should see "WARNING" within "#identifier-change-confirmation"
69   - When I follow "No"
70   - Then I should not see "WARNING" within "#identifier-change-confirmation"
... ...
features/highlights_block.feature
... ... @@ -1,44 +0,0 @@
1   -Feature: Edit Highlight Block
2   - As a user
3   - I want to edit the highlight block
4   -
5   - Background:
6   - Given I am on the homepage
7   - And the following users
8   - | login | name |
9   - | jose | Jose Silva |
10   - And I am logged in as "jose"
11   -
12   - @selenium
13   - Scenario: Add new highlight
14   - Given I follow "Control panel"
15   - And I follow "Edit sideboxes"
16   - And I follow "Add a block"
17   - And I choose "Highlights"
18   - And I press "Add"
19   - And I follow "Edit" within ".highlights-block"#Need to hover the mouse on the box
20   - And I follow "New highlight"
21   - And I fill in "block_images__address" with "/"
22   - And I fill in "block_images__position" with "0"
23   - And I fill in "block_images__title" with "test highlights"
24   - And I press "Save"
25   - And I follow "Edit" within ".highlights-block"
26   - Then I should see "Title"
27   -
28   - @selenium-fixme
29   - Scenario: Remove one saved highlight
30   - Given I follow "Control panel"
31   - And I follow "Edit sideboxes"
32   - And I follow "Add a block"
33   - And I choose "Highlights"
34   - And I press "Add"
35   - And I follow "Edit" within ".highlights-block"
36   - And I follow "New highlight"
37   - And I fill in "block_images__address" with "/"
38   - And I fill in "block_images__position" with "0"
39   - And I fill in "block_images__title" with "test highlights"#Need to hover the mouse on the box
40   - And I press "Save"
41   - And I follow "Edit" within ".highlights-block"
42   - And I follow "" within ".delete-highlight"
43   - And I confirm the browser dialog
44   - Then I should not see "Title"
45 0 \ No newline at end of file
features/manage_inputs.feature
... ... @@ -1,247 +0,0 @@
1   -Feature: manage inputs
2   - As an enterprise owner
3   - I want to manage my product's inputs
4   -
5   - Background:
6   - Given the following users
7   - | login | name |
8   - | joaosilva | Joao Silva |
9   - And the following enterprises
10   - | identifier | owner | name | enabled |
11   - | redemoinho | joaosilva | Rede Moinho | true |
12   - Given the following product_category
13   - | name |
14   - | Music |
15   - And the following product_categories
16   - | name | parent |
17   - | Rock | music |
18   - | CD Player | music |
19   - And the following product
20   - | owner | category | name |
21   - | redemoinho | rock | Abbey Road |
22   - And feature "products_for_enterprises" is enabled on environment
23   - And the following units
24   - | singular | plural |
25   - | Meter | Meters |
26   - | Litre | Litres |
27   -
28   - @selenium
29   - Scenario: add first input to a product
30   - Given I am logged in as "joaosilva"
31   - When I go to Rede Moinho's page of product Abbey Road
32   - And I follow "Inputs"
33   - Then I should not see "Add new input or raw material"
34   - And I follow "Add the inputs or raw material used by this product"
35   - And I select "Music »" from "category_id" within "#categories_container_level0"
36   - And I select "Rock" from "category_id" within "#categories_container_level1"
37   - And I press "Save and continue"
38   - Then I should see "Rock"
39   -
40   - @selenium
41   - Scenario: add input to a product that already has inputs
42   - Given the following input
43   - | product | category |
44   - | Abbey Road | music |
45   - And I am logged in as "joaosilva"
46   - When I go to Rede Moinho's page of product Abbey Road
47   - And I follow "Inputs"
48   - And I should not see "Add the inputs or raw material used by this product"
49   - And I follow "Add new input or raw material"
50   - And I select "Music »" from "category_id" within "#categories_container_level0"
51   - And I select "Rock" from "category_id" within "#categories_container_level1"
52   - And I press "Save and continue"
53   - Then I should see "Rock"
54   -
55   - @selenium
56   - Scenario: cancel addition of a product input
57   - Given I am logged in as "joaosilva"
58   - When I go to Rede Moinho's page of product Abbey Road
59   - And I follow "Inputs"
60   - And I follow "Add the inputs or raw material used by this product"
61   - And I should see "Cancel" within "#categories_selection_actionbar"
62   - And I follow "Cancel" within "#categories_selection_actionbar"
63   - Then I should see "Abbey Road"
64   - And I should see "Add the inputs or raw material used by this product"
65   -
66   - Scenario: show input name and link to add details
67   - Given the following input
68   - | product | category |
69   - | Abbey Road | music |
70   - And I am logged in as "joaosilva"
71   - When I go to Rede Moinho's page of product Abbey Road
72   - And I follow "Inputs and raw material"
73   - Then I should see "Music" within ".input-name"
74   - And I should see "Click here to add price and the amount used"
75   -
76   - Scenario: Not show input edit button when dont have details yet
77   - Given the following input
78   - | product | category |
79   - | Abbey Road | music |
80   - And I am logged in as "joaosilva"
81   - When I go to Rede Moinho's page of product Abbey Road
82   - And I follow "Inputs and raw material"
83   - Then I should not see "Edit" within ".input-item"
84   -
85   - Scenario: Show button to edit input
86   - Given the following input
87   - | product | category | price_per_unit |
88   - | Abbey Road | music | 10.0 |
89   - And I am logged in as "joaosilva"
90   - When I go to Rede Moinho's page of product Abbey Road
91   - And I follow "Inputs and raw material"
92   - Then I should see "Edit" within ".input-item"
93   -
94   - @selenium-fixme
95   - Scenario: Order inputs by position
96   - Given the following product_categories
97   - | name |
98   - | Instrumental |
99   - And the following inputs
100   - | product | category | position |
101   - | Abbey Road | Instrumental | 2 |
102   - | Abbey Road | Rock | 1 |
103   - | Abbey Road | CD Player | 3 |
104   - And I am logged in as "joaosilva"
105   - When I go to Rede Moinho's page of product Abbey Road
106   - And I follow "Inputs"
107   - Then I should see "Rock" above of "Instrumental"
108   - And I should see "Instrumental" above of "CD Player"
109   -
110   - @selenium
111   - Scenario: Save price of input
112   - Given the following input
113   - | product | category |
114   - | Abbey Road | music |
115   - And I am logged in as "joaosilva"
116   - When I go to Rede Moinho's page of product Abbey Road
117   - And I follow "Inputs"
118   - Then I should see "Music"
119   - When I follow "Click here to add price and the amount used"
120   - And I should see "Price"
121   - And I fill in "Price" with "10.50"
122   - And I press "Save"
123   - Then I should not see "Save"
124   -
125   - @selenium
126   - Scenario: Update label of input price with selected unit
127   - Given the following input
128   - | product | category |
129   - | Abbey Road | music |
130   - And I am logged in as "joaosilva"
131   - When I go to Rede Moinho's page of product Abbey Road
132   - And I follow "Inputs"
133   - And I follow "Click here to add price and the amount used"
134   - And I should not see "Price by Meter ($)"
135   - When I select "Meter" from "input_unit_id" within ".edit_input"
136   - Then I should see "Price by Meter ($)"
137   -
138   - @selenium
139   - Scenario: Save all price details of input
140   - Given the following input
141   - | product | category |
142   - | Abbey Road | music |
143   - And I am logged in as "joaosilva"
144   - When I go to Rede Moinho's page of product Abbey Road
145   - And I follow "Inputs"
146   - And I follow "Click here to add price and the amount used"
147   - And I fill in "Amount used" with "2.5"
148   - And I fill in "Price" with "11.50"
149   - And I select "Meter" from "input_unit_id" within ".edit_input"
150   - And I press "Save"
151   - Then I should see "2.5"
152   - And I should see "Meter"
153   - And I should not see "$ 11.50"
154   -
155   - @selenium
156   - Scenario: Save and then edit price details of input
157   - Given the following input
158   - | product | category |
159   - | Abbey Road | music |
160   - And I am logged in as "joaosilva"
161   - When I go to Rede Moinho's page of product Abbey Road
162   - And I follow "Inputs"
163   - And I follow "Click here to add price and the amount used"
164   - And I fill in "Amount used" with "2.5"
165   - And I fill in "Price" with "11.50"
166   - And I select "Meter" from "input_unit_id" within ".edit_input"
167   - And I press "Save"
168   - Then I should see "2.5"
169   - And I should see "Meter"
170   - When I follow "Edit" within ".input-details"
171   - And I fill in "Amount used" with "3.0"
172   - And I fill in "Price" with "23.31"
173   - And I select "Litre" from "input_unit_id" within ".edit_input"
174   - And I press "Save"
175   - Then I should see "3"
176   - And I should see "Litre"
177   -
178   - @selenium
179   - Scenario: Cancel edition of a input
180   - Given the following input
181   - | product | category |
182   - | Abbey Road | music |
183   - And I am logged in as "joaosilva"
184   - When I go to Rede Moinho's page of product Abbey Road
185   - And I follow "Inputs"
186   - And I follow "Click here to add price and the amount used"
187   - Then I should see "Cancel"
188   - And I should see "Amount used"
189   - And I should see "Price"
190   - And I should see "This input or raw material inpact on the final price of the product?"
191   - When I follow "Cancel" within ".edit_input"
192   - Then I should see "Click here to add price and the amount used"
193   -
194   - @selenium
195   - Scenario: Cancel edition of an input then edit again
196   - Given the following input
197   - | product | category | price_per_unit | unit |
198   - | Abbey Road | music | 10.0 | Meter |
199   - And I am logged in as "joaosilva"
200   - When I go to Rede Moinho's page of product Abbey Road
201   - And I follow "Inputs"
202   - And I follow "Edit" within ".input-details"
203   - And I should see "Cancel" within ".edit_input"
204   - And I follow "Cancel" within ".edit_input"
205   - And I follow "Edit" within ".input-details"
206   - Then I should see "Amount used"
207   - And I should see "Price by Meter"
208   -
209   - @selenium
210   - Scenario: remove input
211   - Given the following input
212   - | product | category |
213   - | Abbey Road | rock |
214   - And I am logged in as "joaosilva"
215   - And I go to Rede Moinho's page of product Abbey Road
216   - And I follow "Inputs"
217   - Then I should see "Rock"
218   - And I should not see "Add the inputs or raw material used by this product"
219   - When I follow "Remove"
220   - And I confirm the browser dialog
221   - Then I should see "Add the inputs or raw material used by this product"
222   -
223   - @selenium-fixme
224   - Scenario: Order input list
225   - Given the following product_category
226   - | name |
227   - | Movie |
228   - And the following product
229   - | owner | category | name |
230   - | redemoinho | Movie | Ramones |
231   - And the following inputs
232   - | product | category |
233   - | Ramones | Rock |
234   - | Ramones | Music |
235   - | Ramones | CD Player |
236   - And I am logged in as "joaosilva"
237   - When I go to Rede Moinho's page of product Ramones
238   - And I follow "Inputs"
239   - Then I should see "Rock" above of "Music"
240   - And I should see "Music" above of "CD Player"
241   - When I drag "Rock" to "Music"
242   - Then I should see "Music" above of "Rock"
243   - And I should see "Rock" above of "CD Player"
244   - When I follow "Back to the product listing"
245   - And I go to Rede Moinho's page of product Ramones
246   - Then I should see "Music" above of "Rock"
247   - And I should see "Rock" above of "CD Player"
features/manage_product_price_details.feature
... ... @@ -1,179 +0,0 @@
1   -Feature: manage product price details
2   - As an enterprise owner
3   - I want to manage the details of product's price
4   -
5   - Background:
6   - Given the following users
7   - | login | name |
8   - | joaosilva | Joao Silva |
9   - And the following enterprises
10   - | identifier | owner | name | enabled |
11   - | redemoinho | joaosilva | Rede Moinho | true |
12   - Given the following product_category
13   - | name |
14   - | Music |
15   - And the following product_categories
16   - | name | parent |
17   - | Rock | music |
18   - | CD Player | music |
19   - And the following product
20   - | owner | category | name | price |
21   - | redemoinho | rock | Abbey Road | 80.0 |
22   - And feature "products_for_enterprises" is enabled on environment
23   - And the following inputs
24   - | product | category | price_per_unit | amount_used |
25   - | Abbey Road | Rock | 10.0 | 2 |
26   - | Abbey Road | CD Player | 20.0 | 2 |
27   - And the following production cost
28   - | name | owner |
29   - | Taxes | environment |
30   - And I am logged in as "joaosilva"
31   -
32   - @selenium
33   - Scenario: list total value of inputs as price details
34   - Given I go to Rede Moinho's page of product Abbey Road
35   - And I follow "Price composition"
36   - And I follow "Describe here the cost of production"
37   - Then I should see "Inputs"
38   - And I should see "60.0" within ".inputs-cost"
39   -
40   - @selenium
41   - Scenario: return to product after save
42   - Given I go to Rede Moinho's page of product Abbey Road
43   - And I follow "Price composition"
44   - And I follow "Describe here the cost of production"
45   - And I press "Save"
46   - Then I should be on Rede Moinho's page of product Abbey Road
47   -
48   - @selenium
49   - Scenario: add first item on price details
50   - Given I go to Rede Moinho's page of product Abbey Road
51   - And I follow "Price composition"
52   - And I follow "Describe here the cost of production"
53   - And I follow "New cost"
54   - And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details"
55   - And I fill in "$" with "5.00"
56   - And I leave the "#price_details__price" field
57   - And I press "Save"
58   - Then I should not see "Save"
59   - And I should see "Describe here the cost of production"
60   -
61   - @selenium
62   - Scenario: edit a production cost
63   - Given the following production cost
64   - | name | owner |
65   - | Energy | environment |
66   - When I go to Rede Moinho's page of product Abbey Road
67   - And I follow "Price composition"
68   - And I follow "Describe here the cost of production"
69   - And I follow "New cost"
70   - And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details"
71   - And I fill in "$" with "20.00"
72   - And I leave the ".price-details-price" field
73   - And I press "Save"
74   - Then I should not see "Save"
75   - And I should see "Taxes" within "#display-price-details"
76   - When I follow "Describe here the cost of production"
77   - And I select "Energy" from "price_details__production_cost_id" within "#display-product-price-details"
78   - And I leave the "#price_details__price" field
79   - And I press "Save"
80   - And I should not see "Taxes" within "#display-price-details"
81   - And I should see "Energy" within "#display-price-details"
82   -
83   - Scenario: not display price composition if product does not have input
84   - Given the following product
85   - | owner | category | name |
86   - | redemoinho | rock | Yellow Submarine |
87   - And the following user
88   - | login | name |
89   - | mariasouza | Maria Souza |
90   - And I am logged in as "mariasouza"
91   - When I go to Rede Moinho's page of product Yellow Submarine
92   - Then I should not see "Price composition"
93   -
94   - Scenario: not display price composition if price is not fully described
95   - Given I am not logged in
96   - And I go to Rede Moinho's page of product Abbey Road
97   - Then I should not see "Price composition"
98   -
99   - @selenium
100   - Scenario: display price details if price is fully described
101   - Given I go to Rede Moinho's page of product Abbey Road
102   - And I follow "Price composition"
103   - And I follow "Describe here the cost of production"
104   - And I follow "New cost"
105   - And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details"
106   - And I fill in "$" with "20.00"
107   - And I press "Save"
108   - And I go to Rede Moinho's page of product Abbey Road
109   - Then I should see "Inputs" within ".price-detail-name"
110   - And I should see "60.0" within ".price-detail-price"
111   -
112   - @selenium
113   - Scenario: create a new cost clicking on select
114   - Given I go to Rede Moinho's page of product Abbey Road
115   - And I follow "Price composition"
116   - And I follow "Describe here the cost of production"
117   - And I follow "New cost"
118   - And I select "Other cost" from "price_details__production_cost_id" within "#display-product-price-details"
119   - And I want to add "Energy" as cost
120   - And I fill in "$" with "10.00"
121   - And I leave the "#price_details__price" field
122   - And I press "Save"
123   - When I follow "Describe here the cost of production"
124   - Then I should see "Energy" within ".production-cost-selection"
125   -
126   - @selenium
127   - Scenario: add created cost on new-cost-fields
128   - Given I go to Rede Moinho's page of product Abbey Road
129   - And I follow "Price composition"
130   - And I follow "Describe here the cost of production"
131   - And I follow "New cost"
132   - And I select "Other cost" from "price_details__production_cost_id" within "#display-product-price-details"
133   - And I want to add "Energy" as cost
134   - Then I should see "Energy" within "#display-product-price-details"
135   -
136   - @selenium
137   - Scenario: remove price detail
138   - Given the following price detail
139   - | product | production_cost | price |
140   - | Abbey Road | Taxes | 20.0 |
141   - And I go to Rede Moinho's page of product Abbey Road
142   - And I follow "Price composition"
143   - And I follow "Describe here the cost of production"
144   - And I should see "Taxes" within "#manage-product-details-form"
145   - When I follow "Remove" within "#manage-product-details-form"
146   - And I confirm the browser dialog
147   - And I press "Save"
148   - And I follow "Describe here the cost of production"
149   - Then I should not see "Taxes" within "#manage-product-details-form"
150   -
151   - Scenario: display progressbar
152   - Given I go to Rede Moinho's page of product Abbey Road
153   - And I follow "Price composition"
154   - And I follow "Describe here the cost of production"
155   - Then I should see "$ 60.00 of $ 80.00" within "#progressbar-text"
156   -
157   - @selenium
158   - Scenario: update value on progressbar after addition of new cost
159   - Given I go to Rede Moinho's page of product Abbey Road
160   - And I follow "Price composition"
161   - And I follow "Describe here the cost of production"
162   - Then I should see "$ 60.00 of $ 80.00" within "#progressbar-text"
163   - And I follow "New cost"
164   - And I fill in "$" with "10.00"
165   - And I leave the "#price_details__price" field
166   - Then I should see "$ 70.00 of $ 80.00" within "#progressbar-text"
167   -
168   - @selenium
169   - Scenario: update value on progressbar after editing an input
170   - Given I go to Rede Moinho's page of product Abbey Road
171   - And I follow "Price composition"
172   - And I follow "Describe here the cost of production"
173   - Then I should see "$ 60.00 of $ 80.00" within "#progressbar-text"
174   - When I follow "Inputs"
175   - And I follow "Edit" within ".input-details"
176   - And I fill in "Price" with "23.31"
177   - And I press "Save"
178   - Then I follow "Price composition"
179   - And I should see "$ 86.62 of $ 80.00" within "#progressbar-text"
features/manage_products.feature
... ... @@ -1,520 +0,0 @@
1   -Feature: manage products
2   - As an enterprise owner
3   - I want to manage my products
4   -
5   - Background:
6   - Given the following users
7   - | login | name |
8   - | joaosilva | Joao Silva |
9   - And the following enterprises
10   - | identifier | owner | name | enabled |
11   - | redemoinho | joaosilva | Rede Moinho | true |
12   - And feature "products_for_enterprises" is enabled on environment
13   -
14   - Scenario: display "create new product" button
15   - Given I am logged in as "joaosilva"
16   - And I am on redemoinho's control panel
17   - When I follow "Manage Products/Services"
18   - Then I should see "New product or service"
19   -
20   - Scenario: paginate public listing products and services
21   - Given the following product_category
22   - | name |
23   - | Bicycle |
24   - And the following products
25   - | owner | category | name | description | created_at |
26   - | redemoinho | bicycle | Bike A | bicycle 1 | 2014-04-01 01:00:00 |
27   - | redemoinho | bicycle | Bike B | bicycle 2 | 2014-04-01 02:00:00 |
28   - | redemoinho | bicycle | Bike C | bicycle 3 | 2014-04-01 03:00:00 |
29   - | redemoinho | bicycle | Bike D | bicycle 4 | 2014-04-01 04:00:00 |
30   - | redemoinho | bicycle | Bike E | bicycle 5 | 2014-04-01 05:00:00 |
31   - | redemoinho | bicycle | Bike F | bicycle 6 | 2014-04-01 06:00:00 |
32   - | redemoinho | bicycle | Bike G | bicycle 7 | 2014-04-01 07:00:00 |
33   - | redemoinho | bicycle | Bike H | bicycle 8 | 2014-04-01 08:00:00 |
34   - | redemoinho | bicycle | Bike I | bicycle 9 | 2014-04-01 09:00:00 |
35   - | redemoinho | bicycle | Bike J | bicycle 10 | 2014-04-01 10:00:00 |
36   - | redemoinho | bicycle | Bike K | bicycle 11 | 2014-04-01 11:00:00 |
37   - When I go to redemoinho's products page
38   - Then I should see "Bike A" within "#product-list"
39   - And I should see "Bike B" within "#product-list"
40   - And I should see "Bike C" within "#product-list"
41   - And I should see "Bike D" within "#product-list"
42   - And I should see "Bike E" within "#product-list"
43   - And I should see "Bike F" within "#product-list"
44   - And I should not see "Bike G" within "#product-list"
45   - And I should not see "Bike H" within "#product-list"
46   - And I should not see "Bike I" within "#product-list"
47   - And I should not see "Bike J" within "#product-list"
48   - And I should not see "Bike K" within "#product-list"
49   - When I follow "Next"
50   - Then I should see "Bike G" within "#product-list"
51   - Then I should see "Bike H" within "#product-list"
52   - Then I should see "Bike I" within "#product-list"
53   - Then I should see "Bike J" within "#product-list"
54   - Then I should see "Bike K" within "#product-list"
55   -
56   - Scenario: listing products and services
57   - Given I am logged in as "joaosilva"
58   - And I am on redemoinho's control panel
59   - And I follow "Manage Products/Services"
60   - Then I should see "Listing products and services"
61   -
62   - Scenario: see button to back in categories hierarchy
63   - Given I am logged in as "joaosilva"
64   - And I am on redemoinho's control panel
65   - And I follow "Manage Products/Services"
66   - When I follow "New product or service"
67   - Then I should see "Back to the product listing" link
68   -
69   - Scenario: see toplevel categories
70   - Given the following product_categories
71   - | name |
72   - | Products |
73   - | Services |
74   - Given I am logged in as "joaosilva"
75   - And I go to redemoinho's new product page
76   - Then I should see "Products"
77   - And I should see "Service"
78   -
79   - @selenium
80   - Scenario: select a toplevel category and see subcategories
81   - Given the following product_categories
82   - | name |
83   - | Products level0 |
84   - And the following product_categories
85   - | name | parent |
86   - | Computers level1 | products-level0 |
87   - | DVDs level1 | products-level0 |
88   - Given I am logged in as "joaosilva"
89   - And I go to redemoinho's new product page
90   - And I select "Products level0 »" from "category_id" within "#categories_container_level0"
91   - Then I should see "Computers level1"
92   - And I should see "DVDs level1"
93   -
94   - @selenium
95   - Scenario: hide subcategories when select other toplevel category
96   - Given the following product_categories
97   - | name |
98   - | Products level0 |
99   - | Services level0 |
100   - And the following product_categories
101   - | name | parent |
102   - | Computers level1 | products-level0 |
103   - | Software development level1 | services-level0 |
104   - Given I am logged in as "joaosilva"
105   - And I go to redemoinho's new product page
106   - And I should not see /Computers level/
107   - And I select "Products level0 »" from "category_id" within "#categories_container_wrapper"
108   - And I should see /Computers level/
109   - And I should not see /Software develop/
110   - And I select "Services level0 »" from "category_id" within "#categories_container_wrapper"
111   - Then I should see /Software develop/
112   - And I should not see /Computers level/
113   -
114   - @selenium
115   - Scenario: show hierarchy of categories
116   - Given the following product_categories
117   - | name |
118   - | Products |
119   - And the following product_category
120   - | name | parent |
121   - | Computers | products |
122   - Given I am logged in as "joaosilva"
123   - And I go to redemoinho's new product page
124   - And I select "Products »" from "category_id" within "#categories_container_level0"
125   - And I select "Computers" from "category_id" within "#categories_container_level1"
126   - Then I should see "Products → Computers"
127   -
128   - @selenium
129   - Scenario: show links in hierarchy of categories and not link current category
130   - Given the following product_category
131   - | name |
132   - | Toplevel Product Categories |
133   - Given the following product_category
134   - | name | parent |
135   - | Category Level 1 | toplevel-product-categories |
136   - Given I am logged in as "joaosilva"
137   - And I go to redemoinho's new product page
138   - And I select "Toplevel Product Categories »" from "category_id" within "#categories_container_level0"
139   - And I select "Category Level 1" from "category_id" within "#categories_container_level1"
140   - Then I should see "Toplevel Product Categories" link
141   - And I should not see "Category Level 1" link
142   -
143   - @selenium
144   - Scenario: save button come initialy disabled
145   - Given the following product_category
146   - | name |
147   - | Only for test |
148   - And I am logged in as "joaosilva"
149   - When I go to redemoinho's new product page
150   - Then the "#save_and_continue" button should be disabled
151   -
152   - @selenium
153   - Scenario: enable save button when select one category
154   - Given I am logged in as "joaosilva"
155   - And the following product_category
156   - | name |
157   - | Browsers (accept categories) |
158   - When I go to redemoinho's new product page
159   - And I select "Browsers (accept categories)" from "category_id" within "#categories_container_wrapper"
160   - Then the "#save_and_continue" button should be enabled
161   -
162   - @selenium
163   - Scenario: dont enable save button when select category with not accept products
164   - Given the following product_category
165   - | name | accept_products |
166   - | Browsers | false |
167   - Given I am logged in as "joaosilva"
168   - When I go to redemoinho's new product page
169   - And I select "Browsers" from "category_id" within "#categories_container_wrapper"
170   - Then the "#save_and_continue" button should be disabled
171   -
172   - @selenium
173   - Scenario: save product
174   - Given the following product_category
175   - | name |
176   - | Bicycle |
177   - Given I am logged in as "joaosilva"
178   - When I go to redemoinho's new product page
179   - And I select "Bicycle" from "category_id" within "#categories_container_wrapper"
180   - And I press "Save and continue"
181   - When I go to redemoinho's products page
182   - And I follow "Bicycle" within "#product-list"
183   - Then I should see "Bicycle" within "#show_product"
184   - And I should see "Change category"
185   -
186   - Scenario: a user with permission can see edit links
187   - Given the following product_category
188   - | name |
189   - | Bicycle |
190   - And the following products
191   - | owner | category | name | description |
192   - | redemoinho | bicycle | Bike | Red bicycle |
193   - And I am logged in as "joaosilva"
194   - When I go to Rede Moinho's page of product Bike
195   - Then I should see "Change category"
196   - And I should see "Edit name"
197   - And I should see "Edit description"
198   - And I should see "Change image"
199   -
200   - Scenario: an allowed user will see a different button when has no description
201   - Given the following product_category
202   - | name |
203   - | Bicycle |
204   - And the following products
205   - | owner | category | name |
206   - | redemoinho | bicycle | Bike |
207   - And I am logged in as "joaosilva"
208   - When I go to Rede Moinho's page of product Bike
209   - Then I should see "Change category"
210   - And I should see "Edit name"
211   - And I should see "Add some description to your product"
212   - And I should see "Add price and other basic information"
213   - And I should see "Change image"
214   -
215   - Scenario: an allowed user will see a different button when has no basic info
216   - Given the following product_category
217   - | name |
218   - | Bicycle |
219   - And the following products
220   - | owner | category | name |
221   - | redemoinho | bicycle | Bike |
222   - And I am logged in as "joaosilva"
223   - When I go to Rede Moinho's page of product Bike
224   - Then I should see "Change category"
225   - And I should see "Edit name"
226   - And I should see "Add price and other basic information"
227   - And I should see "Change image"
228   -
229   - Scenario: a not logged user cannot see edit links
230   - Given I am not logged in
231   - And the following product_category
232   - | name |
233   - | Bicycle |
234   - And the following products
235   - | owner | category | name | description |
236   - | redemoinho | bicycle | Bike | Red bicycle |
237   - When I go to Rede Moinho's page of product Bike
238   - Then I should not see "Change category"
239   - And I should not see "Edit name"
240   - And I should not see "Edit description"
241   - And I should not see "Edit basic information"
242   - And I should not see "Change image"
243   -
244   - Scenario: a not allowed user cannot see edit links
245   - Given the following users
246   - | login | name |
247   - | mariasantos | Maria Santos |
248   - And the following product_category
249   - | name |
250   - | Bicycle |
251   - And the following products
252   - | owner | category | name | description |
253   - | redemoinho | bicycle | Bike | Red bicycle |
254   - And I am logged in as "mariasantos"
255   - When I go to Rede Moinho's page of product Bike
256   - Then I should not see "Change category"
257   - And I should not see "Edit name"
258   - And I should not see "Edit description"
259   - And I should not see "Edit basic information"
260   - And I should not see "Change image"
261   -
262   - @selenium
263   - Scenario: edit name of a product
264   - Given the following product_category
265   - | name |
266   - | Bicycle |
267   - And the following products
268   - | owner | category | name |
269   - | redemoinho | bicycle | Bike |
270   - And I am logged in as "joaosilva"
271   - When I go to Rede Moinho's page of product Bike
272   - And I follow "Edit name"
273   - And I fill in "Red bicycle" for "product_name"
274   - And I press "Save"
275   - Then I should see "Red bicycle"
276   - And I should be on Rede Moinho's page of product Red bicycle
277   -
278   - @selenium
279   - Scenario: cancel edition of a product name
280   - Given the following product_category
281   - | name |
282   - | Bicycle |
283   - And the following products
284   - | owner | category | name |
285   - | redemoinho | bicycle | Bike |
286   - And I am logged in as "joaosilva"
287   - When I go to Rede Moinho's page of product Bike
288   - And I follow "Edit name"
289   - When I follow "Cancel"
290   - Then I should see "Bike"
291   -
292   - @selenium
293   - Scenario: edit category of a product
294   - Given the following product_category
295   - | name |
296   - | Eletronics |
297   - And the following product_categories
298   - | name | parent |
299   - | Computers | eletronics |
300   - | DVDs | eletronics |
301   - And the following products
302   - | owner | category | name |
303   - | redemoinho | computers | Generic pc |
304   - And I am logged in as "joaosilva"
305   - When I go to Rede Moinho's page of product Generic pc
306   - And I follow "Change category"
307   - And I select "Eletronics »" from "category_id" within "#categories_container_level0"
308   - Then I select "DVDs" from "category_id" within "#categories_container_level1"
309   - And I press "Save and continue"
310   - When I go to Rede Moinho's page of product Generic pc
311   - Then I should see "Eletronics → DVDs" within ".hierarchy-category"
312   -
313   - @selenium
314   - Scenario: cancel edition of a product category
315   - Given the following product_category
316   - | name |
317   - | Eletronics |
318   - And the following product_categories
319   - | name | parent |
320   - | Computers | eletronics |
321   - | DVDs | eletronics |
322   - And the following products
323   - | owner | category | name |
324   - | redemoinho | computers | Generic pc |
325   - And I am logged in as "joaosilva"
326   - When I go to Rede Moinho's page of product Generic pc
327   - And I follow "Change category"
328   - When I follow "Back to product"
329   - Then I should see "Eletronics → Computers"
330   -
331   -
332   - @selenium
333   - Scenario: edit image of a product
334   - Given the following product_category
335   - | name |
336   - | Eletronics |
337   - And the following product_categories
338   - | name | parent |
339   - | Computers | eletronics |
340   - | DVDs | eletronics |
341   - And the following products
342   - | owner | category | name |
343   - | redemoinho | computers | Generic pc |
344   - And I am logged in as "joaosilva"
345   - When I go to Rede Moinho's page of product Generic pc
346   - And I follow "Change image"
347   - When I follow "Cancel"
348   - Then I should be on Rede Moinho's page of product Generic pc
349   -
350   - # FIXME Not working because of tinyMCE plus selenium
351   - # @selenium
352   - # Scenario: edit description of a product
353   - # Given the following product_category
354   - # | name |
355   - # | Bicycle |
356   - # And the following products
357   - # | owner | category | name | description |
358   - # | redemoinho | bicycle | Bike | A new red bicycle |
359   - # And I am logged in as "joaosilva"
360   - # When I go to Rede Moinho's page of product Bike
361   - # Then I should see "A new red bicycle"
362   - # And I follow "Edit basic information"
363   - # And I type in tinyMCE field "Description" the text "An used red bicycle"
364   - # And I press "Save"
365   - # Then I should not see "A new red bicycle"
366   - # And I should see "An used red bicycle"
367   - # And I should be on Rede Moinho's page of product Bike
368   -
369   - @selenium
370   - Scenario: cancel edition of a product description
371   - Given the following product_category
372   - | name |
373   - | Bicycle |
374   - And the following products
375   - | owner | category | name | description |
376   - | redemoinho | bicycle | Bike | A new red bicycle |
377   - And I am logged in as "joaosilva"
378   - When I go to Rede Moinho's page of product Bike
379   - Then I should see "A new red bicycle"
380   - And I follow "Edit description"
381   - When I follow "Cancel"
382   - Then I should see "A new red bicycle"
383   - And I should be on Rede Moinho's page of product Bike
384   -
385   - @selenium
386   - Scenario: Edit product category and save without select any category
387   - Given the following product_category
388   - | name |
389   - | Eletronics |
390   - And the following product_category
391   - | name | parent |
392   - | Computers | eletronics |
393   - And the following products
394   - | owner | category | name |
395   - | redemoinho | computers | Generic pc |
396   - And I am logged in as "joaosilva"
397   - When I go to Rede Moinho's page of product Generic pc
398   - And I follow "Change category"
399   - And I press "Save and continue"
400   - Then I should not see "Product category can't be blank"
401   - When I go to Rede Moinho's page of product Generic pc
402   - Then I should see "Eletronics → Computers" within ".hierarchy-category"
403   -
404   - And I should see "Generic pc"
405   -
406   - @selenium
407   - Scenario: Scroll categories selection to right when editing
408   - Given the following product_category
409   - | name |
410   - | Eletronics |
411   - And the following product_category
412   - | name | parent |
413   - | Quantum Computers | eletronics |
414   - And the following product_category
415   - | name | parent |
416   - | Laptops from Mars | Quantum Computers |
417   - And the following product_category
418   - | name | parent |
419   - | Netbook from Venus | Laptops from Mars |
420   - And the following product_category
421   - | name | parent |
422   - | Nanonote nanotech with long name | Netbook from Venus |
423   - And the following products
424   - | owner | category | name |
425   - | redemoinho | Nanonote nanotech with long name | Generic pc |
426   - And I am logged in as "joaosilva"
427   - When I go to Rede Moinho's page of product Generic pc
428   - And I follow "Change category"
429   - Then "Netbook from Venus" should be visible within "#categories_container_wrapper"
430   -
431   - @selenium
432   - Scenario: Truncate long category name in selection of category
433   - Given the following product_category
434   - | name |
435   - | Super Quantum Computers with teraflops |
436   - | Nanonote nanotech with long long name |
437   - And the following product_category
438   - | name | parent |
439   - | Netbook Quantum | Super Quantum Computers with teraflops |
440   - And I am logged in as "joaosilva"
441   - When I go to redemoinho's new product page
442   - Then I should see "Nanonote nanotech with long lo..."
443   - And I should see "Super Quantum Computers with t... »"
444   -
445   - @selenium
446   - Scenario: Edit unit of a product together your name
447   - Given the following product_category
448   - | name |
449   - | Bicycle |
450   - And the following products
451   - | owner | category | name |
452   - | redemoinho | bicycle | Bike |
453   - And the following units
454   - | singular | plural |
455   - | Kilo | Kilos |
456   - And I am logged in as "joaosilva"
457   - When I go to Rede Moinho's page of product Bike
458   - And I follow "Edit name and unit"
459   - And I fill in "Red bicycle" for "product_name"
460   - And I select "Kilo" from "product_unit_id" within "#product-name-form"
461   - And I press "Save"
462   - Then I should see "Red bicycle - kilo"
463   -
464   - @selenium
465   - Scenario: Show info about unavailable product
466   - Given the following product_category
467   - | name |
468   - | Bicycle |
469   - And the following products
470   - | owner | category | name |
471   - | redemoinho | bicycle | Bike |
472   - And I am logged in as "joaosilva"
473   - When I go to Rede Moinho's page of product Bike
474   - And I follow "Add price and other basic information"
475   - And I fill in "10" for "product_price"
476   - And I choose "No"
477   - And I press "Save"
478   - Then I should see "Product not available!"
479   -
480   - @selenium
481   - Scenario: Add and remove some qualifiers
482   - Given the following product_category
483   - | name |
484   - | Bicycle |
485   - And the following products
486   - | owner | category | name |
487   - | redemoinho | bicycle | Bike |
488   - And the following qualifiers
489   - | name |
490   - | Organic |
491   - And the following certifiers
492   - | name | qualifiers |
493   - | Colivre | Organic |
494   - And I am logged in as "joaosilva"
495   - When I go to Rede Moinho's page of product Bike
496   - And I follow "Add price and other basic information"
497   - And I follow "Add new qualifier"
498   - And I select "Organic" from "selected_qualifier" within "#product-qualifiers-list"
499   - And I press "Save"
500   - And I go to Rede Moinho's page of product Bike
501   - Then I should see "Organic (Self declared)"
502   - When I follow "Edit basic information"
503   - And I follow "Delete qualifier"
504   - And I press "Save"
505   - And I go to Rede Moinho's page of product Bike
506   - Then I should not see "Organic (Self declared)"
507   -
508   - @selenium
509   - Scenario: Show checkbox to mark product as highlight
510   - Given the following product_category
511   - | name |
512   - | Bicycle |
513   - And the following products
514   - | owner | category | name |
515   - | redemoinho | bicycle | Bike |
516   - And I am logged in as "joaosilva"
517   - When I go to Rede Moinho's page of product Bike
518   - And I follow "Add price and other basic information"
519   - Then I should see "Highlight this product?"
520   - And I check "Highlight this product?"
features/my_network_block.feature
... ... @@ -1,79 +0,0 @@
1   -Feature: my_network_block
2   - As a blog owner
3   - I want to see a summary of my network
4   -
5   - Background:
6   - Given the following users
7   - | login | name |
8   - | joaosilva | Joao Silva |
9   - And the following blocks
10   - | owner | type |
11   - | joaosilva | MyNetworkBlock |
12   - | joaosilva | FriendsBlock |
13   - And the following communities
14   - | identifier | name | public_profile |
15   - | public-community | Public Community | true |
16   - And plugin FriendsBlock is enabled on environment
17   -
18   - @selenium
19   - Scenario: display how many public/private communities I am member
20   - Given I am logged in as "joaosilva"
21   - And the following communities
22   - | identifier | name | owner | public_profile |
23   - | other-public-community | Other Public Community | joaosilva | true |
24   - | private-community | Private Community | joaosilva | false |
25   - And I am on joaosilva's homepage
26   - And I should see "2 communities"
27   - When I go to public-community's homepage
28   - And I follow "Join"
29   - And I go to joaosilva's homepage
30   - Then I should see "3 communities"
31   -
32   - @selenium
33   - Scenario: not display how many invisible communities I am member
34   - Given I am logged in as "joaosilva"
35   - And the following communities
36   - | identifier | name | owner | visible |
37   - | visible-community | Visible Community | joaosilva | true |
38   - | not-visible-community | Not Visible Community | joaosilva | false |
39   - And I am on joaosilva's homepage
40   - And I should see "One community"
41   - When I go to public-community's homepage
42   - And I follow "Join"
43   - And I go to joaosilva's homepage
44   - Then I should see "2 communities"
45   -
46   - Scenario: display how many public/private friends I have
47   - Given the following users
48   - | login | name | public_profile |
49   - | mariasilva | Maria Silva | true |
50   - | josesilva | Jose Silva | false |
51   - And the following blocks
52   - | owner | type |
53   - | mariasilva | FriendsBlock |
54   - | josesilva | FriendsBlock |
55   - And "joaosilva" is friend of "mariasilva"
56   - And I am logged in as "joaosilva"
57   - And I am on joaosilva's homepage
58   - Then I should see "1 friend"
59   - And "joaosilva" is friend of "josesilva"
60   - When I go to joaosilva's homepage
61   - Then I should see "2 friends"
62   -
63   - Scenario: not display how many invisible friends I have
64   - Given the following users
65   - | login | name |
66   - | mariasilva | Maria Silva |
67   - | josesilva | Jose Silva |
68   - And the following blocks
69   - | owner | type |
70   - | mariasilva | FriendsBlock |
71   - | josesilva | FriendsBlock |
72   - And "josesilva" is invisible
73   - And "joaosilva" is friend of "mariasilva"
74   - And I am logged in as "joaosilva"
75   - When I go to joaosilva's homepage
76   - Then I should see "1 friend"
77   - And "joaosilva" is friend of "josesilva"
78   - When I go to joaosilva's homepage
79   - Then I should see "1 friend"
features/session_and_cookies_handling.feature
... ... @@ -1,40 +0,0 @@
1   -Feature: session and cookies handling
2   -
3   - As a Noosfero system administrator
4   - I want Noosfero to manage well it usage of sessions and cookies
5   - So that we can use HTTP caching effectively
6   -
7   - @fixme
8   - Scenario: home page, logged in
9   - Given the following users
10   - | login |
11   - | joaosilva |
12   - When I am logged in as "joaosilva"
13   - And I go to the homepage
14   - Then there must be a cookie "_noosfero_session"
15   -
16   - Scenario: home page, not logged in
17   - When I go to the homepage
18   - Then there must be no cookies
19   -
20   - @fixme
21   - Scenario: user_data, not logged in
22   - When I make a AJAX request to the user data path
23   - Then there must be no cookies
24   -
25   - @fixme
26   - Scenario: user_data, logged in
27   - Given I am logged in as admin
28   - When I make a AJAX request to the user data path
29   - Then there must be a cookie "_noosfero_session"
30   -
31   - # FIXME for some reason I could not test this scenario, although manual tests
32   - # indicate this works!
33   - # Scenario: logout
34   - # Given the following users
35   - # | login |
36   - # | joao |
37   - # When I am logged in as "joao"
38   - # And I log off
39   - # And I go to the homepage
40   - # Then there must be no cookies
features/signup.feature
... ... @@ -297,7 +297,8 @@ Feature: signup
297 297 | Full name | José da Silva |
298 298 And wait for the captcha signup time
299 299 And I press "Create my account"
300   - Then "José da Silva" should be a member of "Free Software"
  300 + Then I should see "Control panel"
  301 + And "José da Silva" should be a member of "Free Software"
301 302  
302 303 @selenium
303 304 Scenario: user registration is moderated by admin
... ... @@ -349,4 +350,4 @@ Feature: signup
349 350 And I fill in "Username / Email" with "teste"
350 351 And I fill in "Password" with "123456"
351 352 And I press "Log in"
352   - Then I should not see "teste"
353 353 \ No newline at end of file
  354 + Then I should not see "teste"
... ...
features/step_definitions/noosfero_steps.rb
... ... @@ -692,11 +692,6 @@ Given /^the cache is turned (on|off)$/ do |state|
692 692 ActionController::Base.perform_caching = (state == 'on')
693 693 end
694 694  
695   -When /^I make a AJAX request to (.*)$/ do |page|
696   - header 'X-Requested-With', 'XMLHttpRequest'
697   - visit(path_to(page))
698   -end
699   -
700 695 Given /^the environment is configured to (.*) after login$/ do |option|
701 696 redirection = case option
702 697 when 'stay on the same page'
... ...
lib/api/api.rb
... ... @@ -3,6 +3,11 @@ Dir[&quot;#{Rails.root}/lib/api/*.rb&quot;].each {|file| require file}
3 3  
4 4 module API
5 5 class API < Grape::API
  6 + before { start_log }
  7 + before { setup_multitenancy }
  8 + before { detect_stuff_by_domain }
  9 + after { end_log }
  10 +
6 11 version 'v1'
7 12 prefix "api"
8 13 format :json
... ... @@ -19,5 +24,15 @@ module API
19 24 mount V1::Categories
20 25 mount Session
21 26  
  27 + # hook point which allow plugins to add Grape::API extensions to API::API
  28 + #finds for plugins which has api mount points classes defined (the class should extends Grape::API)
  29 + @plugins = Noosfero::Plugin.all.map { |p| p.constantize }
  30 + @plugins.each do |klass|
  31 + if klass.public_methods.include? 'api_mount_points'
  32 + klass.api_mount_points.each do |mount_class|
  33 + mount mount_class if mount_class && ( mount_class < Grape::API )
  34 + end
  35 + end
  36 + end
22 37 end
23 38 end
... ...
lib/api/entities.rb
1 1 module API
2 2 module Entities
3 3  
  4 + Grape::Entity.format_with :timestamp do |date|
  5 + date.strftime('%Y/%m/%d %H:%M:%S') if date
  6 + end
  7 +
4 8 class Image < Grape::Entity
5 9 root 'images', 'image'
6 10  
... ... @@ -22,7 +26,8 @@ module API
22 26 end
23 27  
24 28 class Profile < Grape::Entity
25   - expose :identifier, :name, :created_at, :id
  29 + expose :identifier, :name, :id
  30 + expose :created_at, :format_with => :timestamp
26 31 expose :image, :using => Image
27 32 end
28 33  
... ... @@ -42,7 +47,8 @@ module API
42 47  
43 48 class Article < Grape::Entity
44 49 root 'articles', 'article'
45   - expose :id, :body, :created_at
  50 + expose :id, :body
  51 + expose :created_at, :format_with => :timestamp
46 52 expose :title, :documentation => {:type => "String", :desc => "Title of the article"}
47 53 expose :author, :using => Profile
48 54 expose :profile, :using => Profile
... ... @@ -51,8 +57,8 @@ module API
51 57  
52 58 class Comment < Grape::Entity
53 59 root 'comments', 'comment'
54   - expose :body, :title, :created_at, :id
55   -
  60 + expose :body, :title, :id
  61 + expose :created_at, :format_with => :timestamp
56 62 expose :author, :using => Profile
57 63 end
58 64  
... ...
lib/api/helpers.rb
... ... @@ -3,7 +3,7 @@ module API
3 3 PRIVATE_TOKEN_PARAM = :private_token
4 4  
5 5 def logger
6   - API.logger
  6 + @logger ||= Logger.new(File.join(Rails.root, 'log', "#{ENV['RAILS_ENV']}_api.log"))
7 7 end
8 8  
9 9 def current_user
... ... @@ -166,6 +166,17 @@ module API
166 166 end
167 167 protected
168 168  
  169 + def start_log
  170 + logger.info "Started #{request.path} #{request.params.except('password')}"
  171 + end
  172 + def end_log
  173 + logger.info "Completed #{request.path}"
  174 + end
  175 +
  176 + def setup_multitenancy
  177 + Noosfero::MultiTenancy.setup!(request.host)
  178 + end
  179 +
169 180 def detect_stuff_by_domain
170 181 @domain = Domain.find_by_name(request.host)
171 182 if @domain.nil?
... ...
lib/api/v1/articles.rb
1 1 module API
2 2 module V1
3 3 class Articles < Grape::API
4   - before { detect_stuff_by_domain }
5 4 before { authenticate! }
6 5  
7 6 resource :articles do
... ... @@ -14,12 +13,11 @@ module API
14 13 # limit - amount of comments returned. The default value is 20
15 14 #
16 15 # Example Request:
17   - # GET /articles?from=2013-04-04-14:41:43&until=2014-04-04-14:41:43&limit=10&content_type=Hub
  16 + # GET /api/v1/articles?from=2013-04-04-14:41:43&until=2014-04-04-14:41:43&limit=10&content_type=Hub
18 17 # desc 'Articles.', {
19 18 # :params => API::Entities::Article.documentation
20 19 # }
21 20 get do
22   -
23 21 articles = select_filtered_collection_of(environment, 'articles', params)
24 22 present articles, :with => Entities::Article
25 23 end
... ...
lib/api/v1/categories.rb
1 1 module API
2 2 module V1
3 3 class Categories < Grape::API
4   - before { detect_stuff_by_domain }
5 4 before { authenticate! }
6 5  
7 6 resource :categories do
... ...
lib/api/v1/comments.rb
1 1 module API
2 2 module V1
3 3 class Comments < Grape::API
4   -
5   - before { detect_stuff_by_domain }
6 4 before { authenticate! }
7 5  
8 6 resource :articles do
... ... @@ -20,9 +18,9 @@ module API
20 18 conditions = make_conditions_with_parameter(params)
21 19  
22 20 if params[:reference_id]
23   - comments = environment.articles.find(params[:id]).comments.send("#{params.key?(:oldest) ? 'older_than' : 'newer_than'}", params[:reference_id]).find(:all, :conditions => conditions, :limit => limit, :order => "created_at DESC")
  21 + comments = environment.articles.find(params[:id]).comments.send("#{params.key?(:oldest) ? 'older_than' : 'newer_than'}", params[:reference_id]).reorder("created_at DESC").find(:all, :conditions => conditions, :limit => limit)
24 22 else
25   - comments = environment.articles.find(params[:id]).comments.find(:all, :conditions => conditions, :limit => limit, :order => "created_at DESC")
  23 + comments = environment.articles.find(params[:id]).comments.reorder("created_at DESC").find(:all, :conditions => conditions, :limit => limit)
26 24 end
27 25 present comments, :with => Entities::Comment
28 26  
... ...
lib/api/v1/communities.rb
1 1 module API
2 2 module V1
3 3 class Communities < Grape::API
4   - before { detect_stuff_by_domain }
5 4 before { authenticate! }
6 5  
7 6 resource :communities do
... ...
lib/api/v1/enterprises.rb
1 1 module API
2 2 module V1
3 3 class Enterprises < Grape::API
4   - before { detect_stuff_by_domain }
5 4 before { authenticate! }
6 5  
7 6 resource :enterprises do
... ...
lib/api/v1/people.rb
1 1 module API
2 2 module V1
3 3 class People < Grape::API
4   - before { detect_stuff_by_domain }
5 4 before { authenticate! }
6 5  
7 6 resource :people do
... ...
lib/api/v1/users.rb
1 1 module API
2 2 module V1
3 3 class Users < Grape::API
4   -
5   - before { detect_stuff_by_domain }
6 4 before { authenticate! }
7 5  
8 6 resource :users do
... ...
lib/noosfero/plugin.rb
... ... @@ -161,6 +161,10 @@ class Noosfero::Plugin
161 161 def has_admin_url?
162 162 File.exists?(File.join(root_path, 'controllers', "#{name.underscore}_admin_controller.rb"))
163 163 end
  164 +
  165 + # -> define grape class used to map resource api provided by the plugin
  166 + def api_mount_points
  167 + end
164 168 end
165 169  
166 170 def expanded_template(file_path, locals = {})
... ...
lib/tasks/ci.rake
... ... @@ -6,11 +6,18 @@ namespace :ci do
6 6 current_branch = `git rev-parse --abbrev-ref HEAD`.strip
7 7 from = ENV['PREV_HEAD'] || "origin/#{current_branch}"
8 8 to = ENV['HEAD'] || current_branch
9   - changed_files = `git diff --name-only #{from}..#{to}`.split
  9 + changed_files = `git diff --name-only #{from}..#{to}`.split.select do |f|
  10 + File.exist?(f)
  11 + end
10 12  
11   - unless $stdout.isatty
12   - sh "git", "log", "--name-status", "#{from}..#{to}"
  13 + changed_plugin_files = changed_files.select do |f|
  14 + f.split(File::SEPARATOR).first == 'plugins'
13 15 end
  16 + changed_plugins = changed_plugin_files.map do |f|
  17 + f.split(File::SEPARATOR)[1]
  18 + end.uniq
  19 +
  20 + changed_files -= changed_plugin_files
14 21  
15 22 # explicitly changed tests
16 23 tests = changed_files.select { |f| f =~ /test\/.*_test\.rb$/ }
... ... @@ -26,9 +33,16 @@ namespace :ci do
26 33 end
27 34 end
28 35  
29   - sh 'testrb', *tests unless tests.empty?
  36 + sh 'testrb', '-Itest', *tests unless tests.empty?
30 37 sh 'cucumber', *features unless features.empty?
31 38 sh 'cucumber', '-p', 'selenium', *features unless features.empty?
  39 +
  40 + changed_plugins.each do |plugin|
  41 + task = "test:noosfero_plugins:#{plugin}"
  42 + puts "Running #{task}"
  43 + Rake::Task[task].execute
  44 + end
  45 +
32 46 end
33 47  
34 48 end
... ...
lib/tasks/plugins_tests.rake
... ... @@ -104,7 +104,7 @@ def run_test(name, files)
104 104 end
105 105  
106 106 def run_testrb(files)
107   - sh 'testrb', '-Itest', *files
  107 + sh 'testrb', '-I.:test', *files
108 108 end
109 109  
110 110 def run_cucumber(profile, files)
... ...
plugins/comment_group/views/comment_group_plugin_profile/view_comments.rjs
... ... @@ -8,5 +8,5 @@ page.replace_html &quot;comment-count-#{@group_id}&quot;, @comments_count
8 8 if @no_more_pages
9 9 page.replace_html "comments_list_group_#{@group_id}_more", ""
10 10 else
11   - page.replace_html "comments_list_group_#{@group_id}_more", link_to_remote(_('More'), :url => { :profile => profile.identifier, :controller => 'comment_group_plugin_profile', :action => 'view_comments', :group_id => @group_id, :article_id => @article_id, :group_comment_page => @group_comment_page + 1}, :loaded => visual_effect(:highlight, "comments_list_group_#{@group_id}"), :method => :post, :complete => "loadCompleted(#{@group_id})")
  11 + page.replace_html "comments_list_group_#{@group_id}_more", link_to_remote(_('More'), :url => { :profile => profile.identifier, :controller => 'comment_group_plugin_profile', :action => 'view_comments', :group_id => @group_id, :article_id => @article_id, :group_comment_page => @group_comment_page + 1}, :method => :get)
12 12 end
... ...
plugins/comment_paragraph/public/comment_paragraph_macro.js
... ... @@ -51,9 +51,7 @@ jQuery(document).ready(function($) {
51 51 div.addClass('opened');
52 52 }
53 53 }
54   -
55   - //Hides old style ballons
56   - $("img[alt|=Comments]").hide();
  54 +
57 55 rangy.init();
58 56 cssApplier = rangy.createCssClassApplier("commented-area", {normalize: false});
59 57 //Add marked text bubble
... ...
plugins/comment_paragraph/public/images/comments.gif

1.66 KB

plugins/comment_paragraph/views/comment_paragraph_plugin_profile/_comment_paragraph.html.erb
1 1 <div class="comments">
2 2 <table border="0">
3   - <tr>
4   - <td width="90%">
5   - <div class="comment_paragraph" id="comment_paragraph_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>">
6   - <%= inner_html %>
7   - </div>
8   - </td>
  3 + <tr>
  4 + <td width="90%">
  5 + <div class="comment_paragraph" id="comment_paragraph_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>">
  6 + <%= inner_html %>
  7 + </div>
  8 + </td>
9 9 <td>
10 10 <div align="center" class="side-comments-counter" id="side_comments_counter_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>" style="vertical-align: middle; padding-left: 3px; padding-right: 5px;">
11 11 <span id="comment-count-<%= paragraph_id %>" class='comment-count'>
... ... @@ -18,7 +18,7 @@
18 18 <%=
19 19 url = { :profile => profile_identifier, :controller => 'comment_paragraph_plugin_profile', :action => 'view_comments', :paragraph_id => paragraph_id, :article_id => article_id}
20 20 link_to_remote(
21   - image_tag("/plugins/comment_paragraph/images/comments.gif"),
  21 + '',
22 22 {
23 23 :url => url,
24 24 :method => :post,
... ...
plugins/community_block/test/functional/commmunity_block_plugin_profile_controller_test.rb 0 → 100644
... ... @@ -0,0 +1,83 @@
  1 +require File.dirname(__FILE__) + '/../test_helper'
  2 +
  3 +# Re-raise errors caught by the controller.
  4 +class ProfileController
  5 + append_view_path File.join(File.dirname(__FILE__) + '/../../views')
  6 + def rescue_action(e)
  7 + raise e
  8 + end
  9 +end
  10 +
  11 +class ProfileControllerTest < ActionController::TestCase
  12 +
  13 + def setup
  14 + @user = create_user('testinguser').person
  15 + login_as(@user.identifier)
  16 +
  17 + @community = fast_create(Community, :environment_id => Environment.default)
  18 + @community.add_member @user
  19 + @community.add_admin @user
  20 +
  21 + @environment = @community.environment
  22 + @environment.enabled_plugins = ['CommunityBlock']
  23 + @environment.save!
  24 +
  25 + CommunityBlock.delete_all
  26 + @box1 = create(Box, :owner => @community)
  27 + @community.boxes = [@box1]
  28 +
  29 + @block = CommunityBlock.new
  30 + @block.box = @box1
  31 + @block.save!
  32 +
  33 + @community.blocks<<@block
  34 + @community.save!
  35 + end
  36 +
  37 + should 'display community-block' do
  38 + get :index, :profile => @community.identifier
  39 + assert_tag :div, :attributes => {:class => 'community-block-logo'}
  40 + assert_tag :div, :attributes => {:class => 'community-block-info'}
  41 + assert_tag :div, :attributes => {:class => 'community-block-title'}
  42 + assert_tag :div, :attributes => {:class => 'community-block-description'}
  43 + end
  44 +
  45 + should 'display *leave* button when the user is logged in and is a member of the community' do
  46 + get :index, :profile => @community.identifier
  47 + assert_tag :span, :attributes => {:class => 'community-block-button icon-remove'}
  48 + end
  49 +
  50 + should 'display *send email to administrators* button when the user is logged in and is a member of the community' do
  51 + get :index, :profile => @community.identifier
  52 + assert_match /\{&quot;Send an e-mail&quot;:\{&quot;href&quot;:&quot;\/contact\/#{@community.identifier}\/new&quot;\}\}/, @response.body
  53 + end
  54 +
  55 + should 'display *report* button when the user is logged in and is a member of the community' do
  56 + get :index, :profile => @community.identifier
  57 + assert_match /\{&quot;Report abuse&quot;:\{&quot;href&quot;:&quot;\/profile\/#{@community.identifier}\/report_abuse&quot;\}\}/, @response.body
  58 + end
  59 +
  60 + should 'display *join* button when the user is logged in and is not a member of the community' do
  61 + @community.remove_member @user
  62 + get :index, :profile => @community.identifier
  63 + assert_tag :span, :attributes => {:class => 'community-block-button icon-add'}
  64 + end
  65 +
  66 + should 'display *control panel* link option when the user is logged in and is community admin' do
  67 + get :index, :profile => @community.identifier
  68 + assert_match /\{&quot;Control panel&quot;:\{&quot;href&quot;:&quot;\/myprofile\/#{@community.identifier}&quot;\}\}/, @response.body
  69 + end
  70 +
  71 + should 'display *join* button when the user is not logged in' do
  72 + logout
  73 + get :index, :profile => @community.identifier
  74 + assert_tag :span, :attributes => {:class => 'community-block-button icon-add'}
  75 + end
  76 +
  77 + should 'not display *arrow* button when the user is not logged in' do
  78 + logout
  79 + get :index, :profile => @community.identifier
  80 + assert_no_tag :span, :attributes => {:class => 'community-block-button icon-arrow'}
  81 + end
  82 +
  83 +end
... ...
plugins/community_block/test/functional/commmunity_block_plugin_profile_design_controller_test.rb
... ... @@ -1,87 +0,0 @@
1   -require File.dirname(__FILE__) + '/../test_helper'
2   -
3   -# Re-raise errors caught by the controller.
4   -class ProfileController
5   - append_view_path File.join(File.dirname(__FILE__) + '/../../views')
6   - def rescue_action(e)
7   - raise e
8   - end
9   -end
10   -
11   -class ProfileControllerTest < ActionController::TestCase
12   -
13   - def setup
14   - @controller = ProfileController.new
15   - @request = ActionController::TestRequest.new
16   - @response = ActionController::TestResponse.new
17   -
18   - @user = create_user('testinguser').person
19   - login_as(@user.identifier)
20   -
21   - @community = fast_create(Community, :environment_id => Environment.default)
22   - @community.add_member @user
23   - @community.add_admin @user
24   -
25   - @environment = @community.environment
26   - @environment.enabled_plugins = ['CommunityBlock']
27   - @environment.save!
28   -
29   - CommunityBlock.delete_all
30   - @box1 = create(Box, :owner => @community)
31   - @community.boxes = [@box1]
32   -
33   - @block = CommunityBlock.new
34   - @block.box = @box1
35   - @block.save!
36   -
37   - @community.blocks<<@block
38   - @community.save!
39   - end
40   -
41   - should 'display community-block' do
42   - get :index, :profile => @community.identifier
43   - assert_tag :div, :attributes => {:class => 'community-block-logo'}
44   - assert_tag :div, :attributes => {:class => 'community-block-info'}
45   - assert_tag :div, :attributes => {:class => 'community-block-title'}
46   - assert_tag :div, :attributes => {:class => 'community-block-description'}
47   - end
48   -
49   - should 'display *leave* button when the user is logged in and is a member of the community' do
50   - get :index, :profile => @community.identifier
51   - assert_tag :span, :attributes => {:class => 'community-block-button icon-remove'}
52   - end
53   -
54   - should 'display *send email to administrators* button when the user is logged in and is a member of the community' do
55   - get :index, :profile => @community.identifier
56   - assert_match /\{&quot;Send an e-mail&quot;:\{&quot;href&quot;:&quot;\/contact\/#{@community.identifier}\/new&quot;\}\}/, @response.body
57   - end
58   -
59   - should 'display *report* button when the user is logged in and is a member of the community' do
60   - get :index, :profile => @community.identifier
61   - assert_match /\{&quot;Report abuse&quot;:\{&quot;href&quot;:&quot;\/profile\/#{@community.identifier}\/report_abuse&quot;\}\}/, @response.body
62   - end
63   -
64   - should 'display *join* button when the user is logged in and is not a member of the community' do
65   - @community.remove_member @user
66   - get :index, :profile => @community.identifier
67   - assert_tag :span, :attributes => {:class => 'community-block-button icon-add'}
68   - end
69   -
70   - should 'display *control panel* link option when the user is logged in and is community admin' do
71   - get :index, :profile => @community.identifier
72   - assert_match /\{&quot;Control panel&quot;:\{&quot;href&quot;:&quot;\/myprofile\/#{@community.identifier}&quot;\}\}/, @response.body
73   - end
74   -
75   - should 'display *join* button when the user is not logged in' do
76   - logout
77   - get :index, :profile => @community.identifier
78   - assert_tag :span, :attributes => {:class => 'community-block-button icon-add'}
79   - end
80   -
81   - should 'not display *arrow* button when the user is not logged in' do
82   - logout
83   - get :index, :profile => @community.identifier
84   - assert_no_tag :span, :attributes => {:class => 'community-block-button icon-arrow'}
85   - end
86   -
87   -end
plugins/community_block/views/community_block.html.erb
... ... @@ -23,7 +23,7 @@
23 23 <%= link_to(
24 24 content_tag('span','',:class => 'community-block-button icon-arrow'),
25 25 '#',
26   - :onclick => "toggleSubmenu(this,'',#{j links.to_json}); return false;",
  26 + :onclick => "toggleSubmenu(this,'',#{CGI::escapeHTML(links.to_json)}); return false;",
27 27 :class => 'simplemenu-trigger') %>
28 28  
29 29 <% end %>
... ... @@ -32,11 +32,11 @@
32 32 <% if profile.members.include?(user) || profile.already_request_membership?(user) %>
33 33 <%= link_to(
34 34 content_tag('span', '', :class => 'community-block-button icon-remove'),
35   - profile.leave_url) %>
  35 + profile.leave_url, :class => 'join-community') %>
36 36 <% else %>
37 37 <%= link_to(
38 38 content_tag('span', '', :class => 'community-block-button icon-add'),
39   - profile.join_url) %>
  39 + profile.join_url, :class => 'join-community') %>
40 40 <% end %>
41 41 <% else %>
42 42 <%= link_to(
... ...
plugins/community_hub/lib/community_hub_plugin.rb
... ... @@ -13,10 +13,10 @@ class CommunityHubPlugin &lt; Noosfero::Plugin
13 13 end
14 14  
15 15 def content_types
  16 + return [] if !context.kind_of?(CmsController)
16 17 if context.respond_to?(:params) && context.params
17 18 types = []
18   - parent_id = context.params[:parent_id]
19   - types << CommunityHubPlugin::Hub if context.profile.community? && !parent_id
  19 + types << CommunityHubPlugin::Hub if context.profile.community?
20 20 types
21 21 else
22 22 [CommunityHubPlugin::Hub]
... ...
plugins/community_track/test/functional/community_track_plugin_content_viewer_controller_test.rb
... ... @@ -101,9 +101,6 @@ class ContentViewerControllerTest &lt; ActionController::TestCase
101 101 should 'render tracks in track list block' do
102 102 @block = CommunityTrackPlugin::TrackListBlock.create!(:box => @profile.boxes.last)
103 103 get :view_page, @step.url
104   - file = File.open('result.html', 'w+')
105   - file.write(@response.body)
106   - file.close
107 104 assert_tag :tag => 'div', :attributes => { :class => "item category_#{@track.category_name}" }, :descendant => { :tag => 'div', :attributes => { :class => 'steps' }, :descendant => { :tag => 'span', :attributes => { :class => "step #{@block.status_class(@step)}" } } }
108 105 end
109 106  
... ...
plugins/community_track/test/unit/community_track_plugin_test.rb
... ... @@ -6,10 +6,13 @@ class CommunityTrackPluginTest &lt; ActiveSupport::TestCase
6 6 @plugin = CommunityTrackPlugin.new
7 7 @profile = fast_create(Community)
8 8 @params = {}
9   - @plugin.stubs(:context).returns(self)
  9 + @context = mock
  10 + @context.stubs(:profile).returns(@profile)
  11 + @context.stubs(:params).returns(@params)
  12 + @plugin.stubs(:context).returns(@context)
10 13 end
11 14  
12   - attr_reader :profile, :params
  15 + attr_reader :profile, :params, :context
13 16  
14 17 should 'has name' do
15 18 assert CommunityTrackPlugin.plugin_name
... ... @@ -28,37 +31,37 @@ class CommunityTrackPluginTest &lt; ActiveSupport::TestCase
28 31 end
29 32  
30 33 should 'do not return Track as a content type if profile is not a community' do
31   - @profile = Organization.new
  34 + context.stubs(:profile).returns(Organization.new)
32 35 assert_not_includes @plugin.content_types, CommunityTrackPlugin::Track
33 36 end
34 37  
35 38 should 'do not return Track as a content type if there is a parent' do
36   - parent = fast_create(Blog, :profile_id => @profile.id)
37   - @params[:parent_id] = parent.id
  39 + parent = fast_create(Blog, :profile_id => profile.id)
  40 + params[:parent_id] = parent.id
38 41 assert_not_includes @plugin.content_types, CommunityTrackPlugin::Track
39 42 end
40 43  
41 44 should 'return Step as a content type if parent is a Track' do
42   - parent = fast_create(CommunityTrackPlugin::Track, :profile_id => @profile.id)
43   - @params[:parent_id] = parent.id
  45 + parent = fast_create(CommunityTrackPlugin::Track, :profile_id => profile.id)
  46 + params[:parent_id] = parent.id
44 47 assert_includes @plugin.content_types, CommunityTrackPlugin::Step
45 48 end
46 49  
47 50 should 'do not return Step as a content type if parent is not a Track' do
48   - parent = fast_create(Blog, :profile_id => @profile.id)
49   - @params[:parent_id] = parent.id
  51 + parent = fast_create(Blog, :profile_id => profile.id)
  52 + params[:parent_id] = parent.id
50 53 assert_not_includes @plugin.content_types, CommunityTrackPlugin::Step
51 54 end
52 55  
53 56 should 'return Track and Step as a content type if context has no params' do
54   - parent = fast_create(Blog, :profile_id => @profile.id)
55   - expects(:respond_to?).with(:params).returns(false)
  57 + parent = fast_create(Blog, :profile_id => profile.id)
  58 + context.expects(:respond_to?).with(:params).returns(false)
56 59 assert_equivalent [CommunityTrackPlugin::Step, CommunityTrackPlugin::Track], @plugin.content_types
57 60 end
58 61  
59 62 should 'return Track and Step as a content type if params is nil' do
60   - parent = fast_create(Blog, :profile_id => @profile.id)
61   - @params = nil
  63 + parent = fast_create(Blog, :profile_id => profile.id)
  64 + context.stubs(:params).returns(nil)
62 65 assert_equivalent [CommunityTrackPlugin::Step, CommunityTrackPlugin::Track], @plugin.content_types
63 66 end
64 67  
... ...
plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb
... ... @@ -23,7 +23,7 @@ class CustomFormsPluginMyprofileController &lt; MyProfileController
23 23  
24 24 respond_to do |format|
25 25 if @form.save
26   - flash[:notice] = _("Custom form #{@form.name} was successfully created.")
  26 + flash[:notice] = _("Custom form %s was successfully created.") % @form.name
27 27 format.html { redirect_to(:action=>'index') }
28 28 else
29 29 format.html { render :action => 'new' }
... ... @@ -43,7 +43,7 @@ class CustomFormsPluginMyprofileController &lt; MyProfileController
43 43  
44 44 respond_to do |format|
45 45 if @form.save
46   - flash[:notice] = _("Custom form #{@form.name} was successfully updated.")
  46 + flash[:notice] = _("Custom form %s was successfully updated.") % @form.name
47 47 format.html { redirect_to(:action=>'index') }
48 48 else
49 49 session['notice'] = _('Form could not be updated')
... ...
plugins/custom_forms/test/functional/custom_forms_plugin_myprofile_controller_test.rb
... ... @@ -226,7 +226,7 @@ class CustomFormsPluginMyprofileControllerTest &lt; ActionController::TestCase
226 226 end
227 227  
228 228 should 'list pending submissions for a form' do
229   - person = fast_create(Person)
  229 + person = create_user('john').person
230 230 form = CustomFormsPlugin::Form.create!(:profile => profile, :name => 'Free Software', :for_admission => true)
231 231 task = CustomFormsPlugin::AdmissionSurvey.create!(:form_id => form.id, :target => person, :requestor => profile)
232 232  
... ...
plugins/custom_forms/test/unit/custom_forms_plugin/admission_survey_test.rb
... ... @@ -3,7 +3,7 @@ require File.dirname(__FILE__) + &#39;/../../../../../test/test_helper&#39;
3 3 class CustomFormsPlugin::AdmissionSurveyTest < ActiveSupport::TestCase
4 4 should 'add member to community on perform' do
5 5 profile = fast_create(Community)
6   - person = fast_create(Person)
  6 + person = create_user('john').person
7 7 form = CustomFormsPlugin::Form.create!(:name => 'Simple Form', :profile => profile)
8 8 task = CustomFormsPlugin::AdmissionSurvey.create!(:form_id => form.id, :target => person, :requestor => profile)
9 9  
... ...
plugins/custom_forms/test/unit/custom_forms_plugin/form_test.rb
... ... @@ -244,7 +244,7 @@ class CustomFormsPlugin::FormTest &lt; ActiveSupport::TestCase
244 244  
245 245 should 'cancel survey tasks after removing a form' do
246 246 profile = fast_create(Profile)
247   - person = fast_create(Person)
  247 + person = create_user('john').person
248 248  
249 249 form1 = CustomFormsPlugin::Form.create!(:name => 'Free Software', :profile => profile)
250 250 form2 = CustomFormsPlugin::Form.create!(:name => 'Operation System', :profile => profile)
... ...
plugins/custom_forms/test/unit/custom_forms_plugin/membership_survey_test.rb
... ... @@ -13,7 +13,7 @@ class CustomFormsPlugin::MembershipSurveyTest &lt; ActiveSupport::TestCase
13 13  
14 14 should 'create submission with answers on perform' do
15 15 profile = fast_create(Profile)
16   - person = fast_create(Person)
  16 + person = create_user('john').person
17 17 form = CustomFormsPlugin::Form.create!(:name => 'Simple Form', :profile => profile)
18 18 field = CustomFormsPlugin::Field.create!(:name => 'Name', :form => form)
19 19 task = CustomFormsPlugin::MembershipSurvey.create!(:form_id => form.id, :submission => {field.id.to_s => 'Jack'}, :target => person, :requestor => profile)
... ... @@ -31,7 +31,7 @@ class CustomFormsPlugin::MembershipSurveyTest &lt; ActiveSupport::TestCase
31 31  
32 32 should 'have a scope that retrieves all tasks requested by profile' do
33 33 profile = fast_create(Profile)
34   - person = fast_create(Person)
  34 + person = create_user('john').person
35 35 form = CustomFormsPlugin::Form.create!(:name => 'Simple Form', :profile => profile)
36 36 task1 = CustomFormsPlugin::MembershipSurvey.create!(:form_id => form.id, :target => person, :requestor => profile)
37 37 task2 = CustomFormsPlugin::MembershipSurvey.create!(:form_id => form.id, :target => person, :requestor => fast_create(Profile))
... ...
plugins/custom_forms/test/unit/ext/role_assingment_test.rb
... ... @@ -5,7 +5,7 @@ class RoleAssignmentsTest &lt; ActiveSupport::TestCase
5 5 environment = Environment.default
6 6 environment.enable_plugin(CustomFormsPlugin)
7 7 organization = fast_create(Organization)
8   - person = fast_create(Person)
  8 + person = create_user('john').person
9 9 f1 = CustomFormsPlugin::Form.create!(:profile => organization, :name => 'Form 1', :on_membership => true)
10 10 f2 = CustomFormsPlugin::Form.create!(:profile => organization, :name => 'Form 2', :on_membership => true)
11 11 f3 = CustomFormsPlugin::Form.create!(:profile => organization, :name => 'Form 3', :on_membership => false)
... ... @@ -19,7 +19,7 @@ class RoleAssignmentsTest &lt; ActiveSupport::TestCase
19 19 environment = Environment.default
20 20 environment.enable_plugin(CustomFormsPlugin)
21 21 organization = fast_create(Organization)
22   - person = fast_create(Person)
  22 + person = create_user('john').person
23 23 form = CustomFormsPlugin::Form.create!(:profile => organization, :name => 'Form', :on_membership => true, :access => 'associated')
24 24  
25 25 assert_difference 'CustomFormsPlugin::MembershipSurvey.count', 1 do
... ... @@ -31,7 +31,7 @@ class RoleAssignmentsTest &lt; ActiveSupport::TestCase
31 31 environment = Environment.default
32 32 environment.enable_plugin(CustomFormsPlugin)
33 33 organization = fast_create(Organization)
34   - person = fast_create(Person)
  34 + person = create_user('john').person
35 35 form1 = CustomFormsPlugin::Form.create!(:profile => organization, :name => 'Form 1', :on_membership => true)
36 36 organization.add_member(person)
37 37  
... ... @@ -59,7 +59,7 @@ class RoleAssignmentsTest &lt; ActiveSupport::TestCase
59 59 environment = Environment.default
60 60 environment.enable_plugin(CustomFormsPlugin)
61 61 organization = fast_create(Organization)
62   - person = fast_create(Person)
  62 + person = create_user('john').person
63 63 f1 = CustomFormsPlugin::Form.create!(:profile => organization, :name => 'Form 1', :for_admission => true)
64 64 f2 = CustomFormsPlugin::Form.create!(:profile => organization, :name => 'Form 2', :for_admission => true)
65 65 f3 = CustomFormsPlugin::Form.create!(:profile => organization, :name => 'Form 3', :for_admission => false)
... ...
plugins/dspace/lib/dspace_plugin.rb
... ... @@ -9,6 +9,7 @@ class DspacePlugin &lt; Noosfero::Plugin
9 9 end
10 10  
11 11 def content_types
  12 + return [] if !context.kind_of?(CmsController)
12 13 if context.respond_to?(:params) && context.params
13 14 types = []
14 15 parent_id = context.params[:parent_id]
... ...
plugins/ldap/install.rb
... ... @@ -1,10 +0,0 @@
1   -begin
2   - gem "net-ldap", '=0.3.1'
3   -rescue Gem::LoadError => exception
4   - system "gem install --user-install net-ldap -v 0.3.1"
5   -end
6   -
7   -puts "WARNING: This plugin is not setting up a ldap test server automatically.
8   -Some tests may not be running. If you want to fully test this plugin, please
9   -setup the ldap test server and make the proper configurations on
10   -fixtures/ldap.yml.\n\n"
plugins/people_block/test/unit/friends_block_test.rb
1 1 require File.dirname(__FILE__) + '/../test_helper'
2 2  
3   -class FriendsBlockTest < ActiveSupport::TestCase
  3 +class FriendsBlockTest < ActionView::TestCase
4 4  
5 5 should 'inherit from Block' do
6 6 assert_kind_of Block, FriendsBlock.new
... ... @@ -8,6 +8,7 @@ class FriendsBlockTest &lt; ActiveSupport::TestCase
8 8  
9 9  
10 10 should 'declare its default title' do
  11 + FriendsBlock.any_instance.expects(:profile_count).returns(0)
11 12 assert_not_equal Block.new.default_title, FriendsBlock.new.default_title
12 13 end
13 14  
... ... @@ -60,7 +61,7 @@ class FriendsBlockTest &lt; ActiveSupport::TestCase
60 61  
61 62  
62 63 should 'prioritize profiles with image by default' do
63   - assert FriendsBlock.new.prioritize_people_with_image
  64 + assert FriendsBlock.new.prioritize_profiles_with_image
64 65 end
65 66  
66 67  
... ... @@ -98,10 +99,10 @@ class FriendsBlockTest &lt; ActiveSupport::TestCase
98 99 block = FriendsBlock.new
99 100 block.expects(:owner).returns(person1).at_least_once
100 101  
101   - expects(:_).with('View all').returns('View all')
102   - expects(:link_to).with('View all', :profile => 'mytestperson', :controller => 'profile', :action => 'friends').returns('link-to-friends')
103   -
104   - assert_equal 'link-to-friends', instance_eval(&block.footer)
  102 + instance_eval(&block.footer)
  103 + assert_select 'a.view-all' do |elements|
  104 + assert_select '[href=/profile/mytestperson/friends]'
  105 + end
105 106 end
106 107  
107 108  
... ...
plugins/people_block/test/unit/members_block_test.rb
1 1 require File.dirname(__FILE__) + '/../test_helper'
2 2  
3   -class MembersBlockTest < ActiveSupport::TestCase
  3 +class MembersBlockTest < ActionView::TestCase
4 4  
5 5 should 'inherit from Block' do
6 6 assert_kind_of Block, MembersBlock.new
... ... @@ -60,7 +60,7 @@ class MembersBlockTest &lt; ActiveSupport::TestCase
60 60  
61 61  
62 62 should 'prioritize profiles with image by default' do
63   - assert MembersBlock.new.prioritize_people_with_image
  63 + assert MembersBlock.new.prioritize_profiles_with_image
64 64 end
65 65  
66 66  
... ... @@ -145,10 +145,10 @@ class MembersBlockTest &lt; ActiveSupport::TestCase
145 145 block.box = profile.boxes.first
146 146 block.save!
147 147  
148   - expects(:_).with('View all').returns('View all')
149   - expects(:link_to).with('View all' , :profile => 'mytestuser', :controller => 'people_block_plugin_profile', :action => 'members', :role_key => block.visible_role).returns('link-to-members')
150   -
151   - assert_equal 'link-to-members', instance_eval(&block.footer)
  148 + instance_eval(&block.footer)
  149 + assert_select 'a.view-all' do |elements|
  150 + assert_select '[href=/profile/mytestuser/plugin/people_block/members]'
  151 + end
152 152 end
153 153  
154 154 should 'provide link to members page with a selected role' do
... ... @@ -158,10 +158,10 @@ class MembersBlockTest &lt; ActiveSupport::TestCase
158 158 block.visible_role = 'profile_member'
159 159 block.save!
160 160  
161   - expects(:_).with('View all').returns('View all')
162   - expects(:link_to).with('View all' , :profile => 'mytestuser', :controller => 'people_block_plugin_profile', :action => 'members', :role_key => block.visible_role).returns('link-to-members')
163   -
164   - assert_equal 'link-to-members', instance_eval(&block.footer)
  161 + instance_eval(&block.footer)
  162 + assert_select 'a.view-all' do |elements|
  163 + assert_select '[href=/profile/mytestuser/plugin/people_block/members?role_key=profile_member]'
  164 + end
165 165 end
166 166  
167 167 should 'provide a role to be displayed (and default to nil)' do
... ...
plugins/people_block/test/unit/people_block_test.rb
1 1 require File.dirname(__FILE__) + '/../test_helper'
2 2  
3   -class PeopleBlockTest < ActiveSupport::TestCase
  3 +class PeopleBlockTest < ActionView::TestCase
4 4  
5 5 should 'inherit from Block' do
6 6 assert_kind_of Block, PeopleBlock.new
... ... @@ -106,14 +106,12 @@ class PeopleBlockTest &lt; ActiveSupport::TestCase
106 106  
107 107 should 'link to "all people"' do
108 108 env = fast_create(Environment)
109   -
110 109 block = PeopleBlock.new
111 110  
112   - stubs(:_).with('View all').returns('View all')
113   - stubs(:link_to).returns('link-to-people')
114   - stubs(:url_for).returns(' ')
115   -
116   - assert_equal 'link-to-people', instance_exec(&block.footer)
  111 + instance_eval(&block.footer)
  112 + assert_select 'a.view-all' do |elements|
  113 + assert_select '[href=/search/people]'
  114 + end
117 115 end
118 116  
119 117  
... ...
plugins/remote_user/lib/remote_user_plugin.rb
... ... @@ -13,17 +13,27 @@ class RemoteUserPlugin &lt; Noosfero::Plugin
13 13  
14 14 begin
15 15 remote_user = request.headers["HTTP_REMOTE_USER"]
  16 + user_data = request.env['HTTP_REMOTE_USER_DATA']
16 17  
17   - if remote_user.nil?
  18 + if remote_user.blank?
18 19 if logged_in?
19 20 self.current_user.forget_me
20 21 reset_session
21 22 end
22 23 else
  24 + if user_data.blank?
  25 + remote_user_email = remote_user + '@remote.user'
  26 + remote_user_name = remote_user
  27 + else
  28 + user_data = JSON.parse(user_data)
  29 + remote_user_email = user_data['email']
  30 + remote_user_name = user_data['name']
  31 + end
  32 +
23 33 if !logged_in?
24 34 self.current_user = User.find_by_login(remote_user)
25 35 unless self.current_user
26   - self.current_user = User.create!(:login => remote_user, :email => (remote_user + '@remote.user'), :password => ('pw4'+remote_user), :password_confirmation => ('pw4'+remote_user))
  36 + self.current_user = User.create!(:login => remote_user, :email => remote_user_email, :name => remote_user_name, :password => ('pw4'+remote_user), :password_confirmation => ('pw4'+remote_user))
27 37 self.current_user.activate
28 38 end
29 39 self.current_user.save!
... ... @@ -34,7 +44,7 @@ class RemoteUserPlugin &lt; Noosfero::Plugin
34 44  
35 45 self.current_user = User.find_by_login(remote_user)
36 46 unless self.current_user
37   - self.current_user = User.create!(:login => remote_user, :email => (remote_user + '@remote.user'), :password => ('pw4'+remote_user), :password_confirmation => ('pw4'+remote_user))
  47 + self.current_user = User.create!(:login => remote_user, :email => remote_user_email, :name => remote_user_name, :password => ('pw4'+remote_user), :password_confirmation => ('pw4'+remote_user))
38 48 self.current_user.activate
39 49 end
40 50 self.current_user.save!
... ...
plugins/remote_user/test/functional/remote_user_plugin_test.rb
... ... @@ -42,26 +42,64 @@ class AccountControllerTest &lt; ActionController::TestCase
42 42 assert_equal user2.id, session[:user]
43 43 end
44 44  
45   - should 'create a new user if the remote user does not exist' do
  45 + should 'create a new user with remote_user_data if the remote user does not exist' do
46 46 User.destroy_all
47 47  
48 48 assert_equal 0, User.count
49 49  
50 50 @request.env["HTTP_REMOTE_USER"] = "testuser"
  51 + @request.env["CONTENT_TYPE"] = "application/json"
  52 + @request.env["HTTP_REMOTE_USER_DATA"] = '{"email":"testuser@domain.com", "name":"Test User"}'
51 53 get :index
52 54  
53 55 assert_equal 1, User.count
54 56 assert_equal "testuser", User.last.login
55 57 assert_equal true, User.last.activated?
56 58 assert_equal User.last.id, session[:user]
  59 + assert_equal "Test User", User.last.name
  60 + assert_equal "testuser@domain.com", User.last.email
57 61 end
58 62  
59   - should 'create a new user even if there is a logged user but the remote user is different' do
  63 + should 'create a new user with remote_user_data even if there is a logged user but the remote user is different' do
60 64 user = create_user('testuser', :email => 'testuser@example.com', :password => 'test', :password_confirmation => 'test')
61 65 user.activate
62 66  
63 67 login_as user.login
64 68  
  69 + @request.env["HTTP_REMOTE_USER"] = 'another_user'
  70 + @request.env["CONTENT_TYPE"] = "application/json"
  71 + @request.env["HTTP_REMOTE_USER_DATA"] = '{"email":"another_user@domain.com", "name":"Another User"}'
  72 + get :index
  73 +
  74 + assert_equal 2, User.count
  75 + assert_equal "another_user", User.last.login
  76 + assert_equal true, User.last.activated?
  77 + assert_equal User.last.id, session[:user]
  78 + assert_equal "Another User", User.last.name
  79 + assert_equal "another_user@domain.com", User.last.email
  80 + end
  81 +
  82 + should 'create a new user without remote_user_data if the remote user does not exist' do
  83 + User.destroy_all
  84 +
  85 + assert_equal 0, User.count
  86 +
  87 + @request.env["HTTP_REMOTE_USER"] = "testuser"
  88 + get :index
  89 +
  90 + assert_equal 1, User.count
  91 + assert_equal "testuser", User.last.login
  92 + assert_equal true, User.last.activated?
  93 + assert_equal User.last.id, session[:user]
  94 + assert_equal "testuser", User.last.name
  95 + assert_equal "testuser@remote.user", User.last.email
  96 + end
  97 +
  98 + should 'create a new user without remote_user_data even if there is a logged user but the remote user is different' do
  99 + user = create_user('testuser', :email => 'testuser@example.com', :password => 'test', :password_confirmation => 'test')
  100 + user.activate
  101 +
  102 + login_as user.login
65 103  
66 104 @request.env["HTTP_REMOTE_USER"] = 'another_user'
67 105 get :index
... ... @@ -70,5 +108,23 @@ class AccountControllerTest &lt; ActionController::TestCase
70 108 assert_equal "another_user", User.last.login
71 109 assert_equal true, User.last.activated?
72 110 assert_equal User.last.id, session[:user]
  111 + assert_equal "another_user", User.last.name
  112 + assert_equal "another_user@remote.user", User.last.email
  113 + end
  114 +
  115 + should 'logout if there is a current logged user but not a remote user' do
  116 + user1 = create_user('testuser', :email => 'testuser@example.com', :password => 'test', :password_confirmation => 'test')
  117 + user1.activate
  118 +
  119 + login_as user1.login
  120 +
  121 + get :index
  122 +
  123 + assert session[:user].blank?
  124 +
  125 + @request.env["HTTP_REMOTE_USER"] = ""
  126 + get :index
  127 +
  128 + assert session[:user].blank?
73 129 end
74 130 end
... ...
plugins/solr/install.rb
... ... @@ -8,7 +8,6 @@ Dir[tasks_dir].each do |file|
8 8 load file
9 9 end
10 10  
11   -begin
12   - Rake::Task['solr:download'].invoke
13   -rescue Exception => exception
14   -end
  11 +puts 'To download solr:'
  12 +puts '$ cd plugins/solr'
  13 +puts '$ rake solr:download'
... ...
plugins/spaminator/test/unit/spaminator_plugin/spaminator_test.rb
... ... @@ -50,6 +50,7 @@ class SpaminatorPlugin::SpaminatorTest &lt; ActiveSupport::TestCase
50 50 end
51 51  
52 52 should 'process only people from the environment and that are not abusers' do
  53 + Person.delete_all
53 54 p1 = fast_create(Person)
54 55 p2 = fast_create(Person)
55 56 p3 = fast_create(Person, :environment_id => fast_create(Environment))
... ...
plugins/video/lib/ext/article.rb
... ... @@ -5,9 +5,9 @@ class Article
5 5 def self.folder_types_with_video
6 6 self.folder_types_without_video << 'VideoGallery'
7 7 end
8   -
  8 +
9 9 class << self
10 10 alias_method_chain :folder_types, :video
11 11 end
12   -
  12 +
13 13 end
... ...
plugins/video/lib/video.rb
... ... @@ -47,11 +47,11 @@ class Video &lt; Article
47 47 def fitted_width
48 48 499
49 49 end
50   -
  50 +
51 51 def fitted_height
52 52 ((fitted_width * self.video_height) / self.video_width).to_i
53 53 end
54   -
  54 +
55 55 def thumbnail_fitted_width
56 56 80
57 57 end
... ... @@ -59,17 +59,17 @@ class Video &lt; Article
59 59 def thumbnail_fitted_height
60 60 ((thumbnail_fitted_width * self.video_thumbnail_height) / self.video_thumbnail_width).to_i
61 61 end
62   -
  62 +
63 63 def no_browser_support_message
64   - '<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>'
  64 + '<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>'
65 65 end
66   -
  66 +
67 67 private
68   -
  68 +
69 69 YOUTUBE_ID_FORMAT = '\w-'
70   -
  70 +
71 71 def detect_video
72   - if is_youtube?
  72 + if is_youtube?
73 73 self.video_provider = 'youtube'
74 74 self.video_id = extract_youtube_id
75 75 url = "http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3D#{self.video_id}&format=json"
... ... @@ -78,7 +78,7 @@ class Video &lt; Article
78 78 vid = JSON.parse(buffer)
79 79 self.video_thumbnail_url = vid['thumbnail_url']
80 80 self.video_width = vid['width']
81   - self.video_height = vid['height']
  81 + self.video_height = vid['height']
82 82 self.video_thumbnail_width = vid['thumbnail_width']
83 83 self.video_thumbnail_height = vid['thumbnail_height']
84 84 url = "http://gdata.youtube.com/feeds/api/videos/#{self.video_id}?alt=json";
... ... @@ -86,7 +86,7 @@ class Video &lt; Article
86 86 buffer = resp.body
87 87 vid = JSON.parse(buffer)
88 88 self.video_duration = vid['entry']['media$group']['media$content'][0]['duration']
89   - elsif is_vimeo?
  89 + elsif is_vimeo?
90 90 self.video_provider = 'vimeo'
91 91 self.video_id = extract_vimeo_id
92 92 url = "http://vimeo.com/api/v2/video/#{self.video_id}.json"
... ... @@ -97,7 +97,7 @@ class Video &lt; Article
97 97 #raise vid.to_yaml
98 98 self.video_thumbnail_url = vid['thumbnail_large']
99 99 self.video_width = vid['width']
100   - self.video_height = vid['height']
  100 + self.video_height = vid['height']
101 101 self.video_thumbnail_width = 640
102 102 self.video_thumbnail_height = 360
103 103 elsif true
... ... @@ -105,19 +105,19 @@ class Video &lt; Article
105 105 self.video_provider = 'file'
106 106 end
107 107 end
108   -
  108 +
109 109 def detect_format
110 110 video_type = 'video/unknown'
111   - if /.mp4/i =~ self.video_url or /.mov/i =~ self.video_url
  111 + if /.mp4/i =~ self.video_url or /.mov/i =~ self.video_url
112 112 video_type='video/mp4'
113 113 elsif /.webm/i =~ self.video_url
114 114 video_type='video/webm'
115   - elsif /.og[vg]/i =~ self.video_url
  115 + elsif /.og[vg]/i =~ self.video_url
116 116 video_type='video/ogg'
117 117 end
118 118 video_type
119 119 end
120   -
  120 +
121 121 def is_youtube?
122 122 video_url.match(/.*(youtube.com.*v=[#{YOUTUBE_ID_FORMAT}]+|youtu.be\/[#{YOUTUBE_ID_FORMAT}]+).*/) ? true : false
123 123 end
... ... @@ -129,7 +129,7 @@ class Video &lt; Article
129 129 def is_video_file?
130 130 video_url.match(/\.(mp4|ogg|ogv|webm)/) ? true : false
131 131 end
132   -
  132 +
133 133 def extract_youtube_id
134 134 return nil unless is_youtube?
135 135 youtube_match = video_url.match("v=([#{YOUTUBE_ID_FORMAT}]*)")
... ... @@ -142,26 +142,4 @@ class Video &lt; Article
142 142 vimeo_match = video_url.match('([[:digit:]]*)$')
143 143 vimeo_match[1] unless vimeo_match.nil?
144 144 end
145   -end
146   -
147   -#To be used for the duration
148   -#function formatSecondsAsTime(secs) {
149   -# var hr = Math.floor(secs / 3600);
150   -# var min = Math.floor((secs - (hr * 3600)) / 60);
151   -# var sec = Math.floor(secs - (hr * 3600) - (min * 60));
152   -#
153   -# if (hr < 10) {
154   -# hr = "0" + hr;
155   -# }
156   -# if (min < 10) {
157   -# min = "0" + min;
158   -# }
159   -# if (sec < 10) {
160   -# sec = "0" + sec;
161   -# }
162   -# if (hr) {
163   -# hr = "00";
164   -# }
165   -#
166   -# return hr + ':' + min + ':' + sec;
167   -#}
  145 +end
168 146 \ No newline at end of file
... ...
plugins/video/lib/video_block.rb
1 1 class VideoBlock < Block
2 2  
3 3 attr_accessible :url, :width, :height
4   -
  4 +
5 5 settings_items :url, :type => :string, :default => ""
6 6 settings_items :width, :type => :integer, :default => 400
7 7 settings_items :height, :type => :integer, :default => 315
... ...
plugins/video/lib/video_gallery_helper.rb
1 1 module VideoGalleryHelper
2   -
  2 +
3 3 def list_videos(configure={})
4 4 configure[:recursive] ||= false
5 5 configure[:list_type] ||= :folder
... ... @@ -13,6 +13,6 @@ module VideoGalleryHelper
13 13 else
14 14 content_tag('em', _('(empty folder)'))
15 15 end
16   - end
17   -
  16 + end
  17 +
18 18 end
19 19 \ No newline at end of file
... ...
plugins/video/lib/video_plugin.rb
... ... @@ -17,14 +17,14 @@ class VideoPlugin &lt; Noosfero::Plugin
17 17 VideoBlock => {}
18 18 }
19 19 end
20   -
  20 +
21 21 def stylesheet?
22 22 true
23 23 end
24   -
  24 +
25 25 def content_types
26 26 [VideoPlugin::VideoGallery, VideoPlugin::Video]
27   - end
  27 + end
28 28  
29 29 def content_remove_new(content)
30 30 if content.kind_of?(VideoPlugin::VideoGallery) or content.kind_of?(VideoPlugin::Video)
... ... @@ -36,8 +36,8 @@ class VideoPlugin &lt; Noosfero::Plugin
36 36 if content.kind_of?(VideoPlugin::VideoGallery) or content.kind_of?(VideoPlugin::Video)
37 37 true
38 38 end
39   - end
40   -
  39 + end
  40 +
41 41 def article_extra_toolbar_buttons(content)
42 42 if content.kind_of?(VideoPlugin::VideoGallery)
43 43 proc do
... ... @@ -47,8 +47,8 @@ class VideoPlugin &lt; Noosfero::Plugin
47 47 :href=>url_for(:action => 'new', :type=>'Video', :controller=>'cms', :parent_id => content.id),
48 48 :title=>_("New Video")
49 49 })
50   - end
  50 + end
51 51 end
52 52 end
53   -
  53 +
54 54 end
... ...
plugins/video/public/css/video-js-4.5.1.css 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +/*!
  2 +Video.js Default Styles (http://videojs.com)
  3 +Version 4.5.1
  4 +Create your own skin at http://designer.videojs.com
  5 +*/.vjs-default-skin{color:#ccc}@font-face{font-family:VideoJS;src:url(../f/2/vjs.eot);src:url(../f/2/vjs.eot?#iefix) format('embedded-opentype'),url(../f/2/vjs.woff) format('woff'),url(../f/2/vjs.ttf) format('truetype');font-weight:400;font-style:normal}.vjs-default-skin .vjs-slider{outline:0;position:relative;cursor:pointer;padding:0;background-color:#333;background-color:rgba(51,51,51,.9)}.vjs-default-skin .vjs-slider:focus{-webkit-box-shadow:0 0 2em #fff;-moz-box-shadow:0 0 2em #fff;box-shadow:0 0 2em #fff}.vjs-default-skin .vjs-slider-handle{position:absolute;left:0;top:0}.vjs-default-skin .vjs-slider-handle:before{content:"\e009";font-family:VideoJS;font-size:1em;line-height:1;text-align:center;text-shadow:0 0 1em #fff;position:absolute;top:0;left:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.vjs-default-skin .vjs-control-bar{display:none;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#07141e;background-color:rgba(7,20,30,.7)}.vjs-default-skin.vjs-has-started .vjs-control-bar{display:block;visibility:visible;opacity:1;-webkit-transition:visibility .1s,opacity .1s;-moz-transition:visibility .1s,opacity .1s;-o-transition:visibility .1s,opacity .1s;transition:visibility .1s,opacity .1s}.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{display:block;visibility:hidden;opacity:0;-webkit-transition:visibility 1s,opacity 1s;-moz-transition:visibility 1s,opacity 1s;-o-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.vjs-default-skin.vjs-controls-disabled .vjs-control-bar{display:none}.vjs-default-skin.vjs-using-native-controls .vjs-control-bar{display:none}@media \0screen{.vjs-default-skin.vjs-user-inactive.vjs-playing .vjs-control-bar :before{content:""}}.vjs-default-skin .vjs-control{outline:0;position:relative;float:left;text-align:center;margin:0;padding:0;height:3em;width:4em}.vjs-default-skin .vjs-control:before{font-family:VideoJS;font-size:1.5em;line-height:2;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.5)}.vjs-default-skin .vjs-control:focus:before,.vjs-default-skin .vjs-control:hover:before{text-shadow:0 0 1em #fff}.vjs-default-skin .vjs-control:focus{}.vjs-default-skin .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-default-skin .vjs-play-control{width:5em;cursor:pointer}.vjs-default-skin .vjs-play-control:before{content:"\e001"}.vjs-default-skin.vjs-playing .vjs-play-control:before{content:"\e002"}.vjs-default-skin .vjs-mute-control,.vjs-default-skin .vjs-volume-menu-button{cursor:pointer;float:right}.vjs-default-skin .vjs-mute-control:before,.vjs-default-skin .vjs-volume-menu-button:before{content:"\e006"}.vjs-default-skin .vjs-mute-control.vjs-vol-0:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-0:before{content:"\e003"}.vjs-default-skin .vjs-mute-control.vjs-vol-1:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-1:before{content:"\e004"}.vjs-default-skin .vjs-mute-control.vjs-vol-2:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-2:before{content:"\e005"}.vjs-default-skin .vjs-volume-control{width:5em;float:right}.vjs-default-skin .vjs-volume-bar{width:5em;height:.6em;margin:1.1em auto 0}.vjs-default-skin .vjs-volume-menu-button .vjs-menu-content{height:2.9em}.vjs-default-skin .vjs-volume-level{position:absolute;top:0;left:0;height:.5em;background:#66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat}.vjs-default-skin .vjs-volume-bar .vjs-volume-handle{width:.5em;height:.5em}.vjs-default-skin .vjs-volume-handle:before{font-size:.9em;top:-.2em;left:-.2em;width:1em;height:1em}.vjs-default-skin .vjs-volume-menu-button .vjs-menu .vjs-menu-content{width:6em;left:-4em}.vjs-default-skin .vjs-progress-control{position:absolute;left:0;right:0;width:auto;font-size:.3em;height:1em;top:-1em;-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-default-skin:hover .vjs-progress-control{font-size:.9em;-webkit-transition:all .2s;-moz-transition:all .2s;-o-transition:all .2s;transition:all .2s}.vjs-default-skin .vjs-progress-holder{height:100%}.vjs-default-skin .vjs-progress-holder .vjs-play-progress,.vjs-default-skin .vjs-progress-holder .vjs-load-progress{position:absolute;display:block;height:100%;margin:0;padding:0;left:0;top:0}.vjs-default-skin .vjs-play-progress{background:#66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat}.vjs-default-skin .vjs-load-progress{background:#646464;background:rgba(255,255,255,.4)}.vjs-default-skin .vjs-seek-handle{width:1.5em;height:100%}.vjs-default-skin .vjs-seek-handle:before{padding-top:.1em}.vjs-default-skin .vjs-time-controls{font-size:1em;line-height:3em}.vjs-default-skin .vjs-current-time{float:left}.vjs-default-skin .vjs-duration{float:left}.vjs-default-skin .vjs-remaining-time{display:none;float:left}.vjs-time-divider{float:left;line-height:3em}.vjs-default-skin .vjs-fullscreen-control{width:3.8em;cursor:pointer;float:right}.vjs-default-skin .vjs-fullscreen-control:before{content:"\e000"}.vjs-default-skin.vjs-fullscreen .vjs-fullscreen-control:before{content:"\e00b"}.vjs-default-skin .vjs-big-play-button{left:.5em;top:.5em;font-size:3em;display:block;z-index:2;position:absolute;width:4em;height:2.6em;text-align:center;vertical-align:middle;cursor:pointer;opacity:1;background-color:#07141e;background-color:rgba(7,20,30,.7);border:.1em solid #3b4249;-webkit-border-radius:.8em;-moz-border-radius:.8em;border-radius:.8em;-webkit-box-shadow:0 0 1em rgba(255,255,255,.25);-moz-box-shadow:0 0 1em rgba(255,255,255,.25);box-shadow:0 0 1em rgba(255,255,255,.25);-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-default-skin.vjs-big-play-centered .vjs-big-play-button{left:50%;margin-left:-2.1em;top:50%;margin-top:-1.4000000000000001em}.vjs-default-skin.vjs-controls-disabled .vjs-big-play-button{display:none}.vjs-default-skin.vjs-has-started .vjs-big-play-button{display:none}.vjs-default-skin.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-default-skin:hover .vjs-big-play-button,.vjs-default-skin .vjs-big-play-button:focus{outline:0;border-color:#fff;background-color:#505050;background-color:rgba(50,50,50,.75);-webkit-box-shadow:0 0 3em #fff;-moz-box-shadow:0 0 3em #fff;box-shadow:0 0 3em #fff;-webkit-transition:all 0s;-moz-transition:all 0s;-o-transition:all 0s;transition:all 0s}.vjs-default-skin .vjs-big-play-button:before{content:"\e001";font-family:VideoJS;line-height:2.6em;text-shadow:.05em .05em .1em #000;text-align:center;position:absolute;left:0;width:100%;height:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;font-size:4em;line-height:1;width:1em;height:1em;margin-left:-.5em;margin-top:-.5em;opacity:.75;-webkit-animation:spin 1.5s infinite linear;-moz-animation:spin 1.5s infinite linear;-o-animation:spin 1.5s infinite linear;animation:spin 1.5s infinite linear}.vjs-default-skin .vjs-loading-spinner:before{content:"\e01e";font-family:VideoJS;position:absolute;top:0;left:0;width:1em;height:1em;text-align:center;text-shadow:0 0 .1em #000}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.vjs-default-skin .vjs-menu-button{float:right;cursor:pointer}.vjs-default-skin .vjs-menu{display:none;position:absolute;bottom:0;left:0;width:0;height:0;margin-bottom:3em;border-left:2em solid transparent;border-right:2em solid transparent;border-top:1.55em solid #000;border-top-color:rgba(7,40,50,.5)}.vjs-default-skin .vjs-menu-button .vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;position:absolute;width:10em;bottom:1.5em;max-height:15em;overflow:auto;left:-5em;background-color:#07141e;background-color:rgba(7,20,30,.7);-webkit-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);-moz-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);box-shadow:-.2em -.2em .3em rgba(255,255,255,.2)}.vjs-default-skin .vjs-menu-button:hover .vjs-menu{display:block}.vjs-default-skin .vjs-menu-button ul li{list-style:none;margin:0;padding:.3em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-default-skin .vjs-menu-button ul li.vjs-selected{background-color:#000}.vjs-default-skin .vjs-menu-button ul li:focus,.vjs-default-skin .vjs-menu-button ul li:hover,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:focus,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:hover{outline:0;color:#111;background-color:#fff;background-color:rgba(255,255,255,.75);-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.vjs-default-skin .vjs-menu-button ul li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-default-skin .vjs-subtitles-button:before{content:"\e00c"}.vjs-default-skin .vjs-captions-button:before{content:"\e008"}.vjs-default-skin .vjs-captions-button:focus .vjs-control-content:before,.vjs-default-skin .vjs-captions-button:hover .vjs-control-content:before{-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js{background-color:#000;position:relative;padding:0;font-size:10px;vertical-align:middle;font-weight:400;font-style:normal;font-family:Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js:-moz-full-screen{position:absolute}body.vjs-full-window{padding:0;margin:0;height:100%;overflow-y:auto}.video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0;width:100%!important;height:100%!important;_position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-poster{background-repeat:no-repeat;background-position:50% 50%;background-size:contain;cursor:pointer;height:100%;margin:0;padding:0;position:relative;width:100%}.vjs-poster img{display:block;margin:0 auto;max-height:100%;padding:0;width:100%}.video-js.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-text-track-display{text-align:center;position:absolute;bottom:4em;left:1em;right:1em}.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{display:none;font-size:1.4em;text-align:center;margin-bottom:.1em;background-color:#000;background-color:rgba(0,0,0,.5)}.video-js .vjs-subtitles{color:#fff}.video-js .vjs-captions{color:#fc6}.vjs-tt-cue{display:block}.vjs-default-skin .vjs-hidden{display:none}.vjs-lock-showing{display:block!important;opacity:1;visibility:visible}
0 6 \ No newline at end of file
... ...
plugins/video/public/css/video-js-4.8.5.css 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +/*!
  2 +Video.js Default Styles (http://videojs.com)
  3 +Version 4.8.5
  4 +Create your own skin at http://designer.videojs.com
  5 +*/.vjs-default-skin{color:#ccc}@font-face{font-family:VideoJS;src:url(../f/3/vjs.eot);src:url(../f/3/vjs.eot?#iefix) format('embedded-opentype'),url(../f/3/vjs.woff) format('woff'),url(../f/3/vjs.ttf) format('truetype'),url(../f/3/vjs.svg#icomoon) format('svg');font-weight:400;font-style:normal}.vjs-default-skin .vjs-slider{outline:0;position:relative;cursor:pointer;padding:0;background-color:#333;background-color:rgba(51,51,51,.9)}.vjs-default-skin .vjs-slider:focus{-webkit-box-shadow:0 0 2em #fff;-moz-box-shadow:0 0 2em #fff;box-shadow:0 0 2em #fff}.vjs-default-skin .vjs-slider-handle{position:absolute;left:0;top:0}.vjs-default-skin .vjs-slider-handle:before{content:"\e009";font-family:VideoJS;font-size:1em;line-height:1;text-align:center;text-shadow:0 0 1em #fff;position:absolute;top:0;left:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.vjs-default-skin .vjs-control-bar{display:none;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#07141e;background-color:rgba(7,20,30,.7)}.vjs-default-skin.vjs-has-started .vjs-control-bar{display:block;visibility:visible;opacity:1;-webkit-transition:visibility .1s,opacity .1s;-moz-transition:visibility .1s,opacity .1s;-o-transition:visibility .1s,opacity .1s;transition:visibility .1s,opacity .1s}.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{display:block;visibility:hidden;opacity:0;-webkit-transition:visibility 1s,opacity 1s;-moz-transition:visibility 1s,opacity 1s;-o-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.vjs-default-skin.vjs-controls-disabled .vjs-control-bar{display:none}.vjs-default-skin.vjs-using-native-controls .vjs-control-bar{display:none}.vjs-default-skin.vjs-error .vjs-control-bar{display:none}@media \0screen{.vjs-default-skin.vjs-user-inactive.vjs-playing .vjs-control-bar :before{content:""}}.vjs-default-skin .vjs-control{outline:0;position:relative;float:left;text-align:center;margin:0;padding:0;height:3em;width:4em}.vjs-default-skin .vjs-control:before{font-family:VideoJS;font-size:1.5em;line-height:2;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.5)}.vjs-default-skin .vjs-control:focus:before,.vjs-default-skin .vjs-control:hover:before{text-shadow:0 0 1em #fff}.vjs-default-skin .vjs-control:focus{}.vjs-default-skin .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-default-skin .vjs-play-control{width:5em;cursor:pointer}.vjs-default-skin .vjs-play-control:before{content:"\e001"}.vjs-default-skin.vjs-playing .vjs-play-control:before{content:"\e002"}.vjs-default-skin .vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.5)}.vjs-default-skin .vjs-playback-rate.vjs-menu-button .vjs-menu .vjs-menu-content{width:4em;left:-2em;list-style:none}.vjs-default-skin .vjs-mute-control,.vjs-default-skin .vjs-volume-menu-button{cursor:pointer;float:right}.vjs-default-skin .vjs-mute-control:before,.vjs-default-skin .vjs-volume-menu-button:before{content:"\e006"}.vjs-default-skin .vjs-mute-control.vjs-vol-0:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-0:before{content:"\e003"}.vjs-default-skin .vjs-mute-control.vjs-vol-1:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-1:before{content:"\e004"}.vjs-default-skin .vjs-mute-control.vjs-vol-2:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-2:before{content:"\e005"}.vjs-default-skin .vjs-volume-control{width:5em;float:right}.vjs-default-skin .vjs-volume-bar{width:5em;height:.6em;margin:1.1em auto 0}.vjs-default-skin .vjs-volume-menu-button .vjs-menu-content{height:2.9em}.vjs-default-skin .vjs-volume-level{position:absolute;top:0;left:0;height:.5em;width:100%;background:#66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat}.vjs-default-skin .vjs-volume-bar .vjs-volume-handle{width:.5em;height:.5em;left:4.5em}.vjs-default-skin .vjs-volume-handle:before{font-size:.9em;top:-.2em;left:-.2em;width:1em;height:1em}.vjs-default-skin .vjs-volume-menu-button .vjs-menu .vjs-menu-content{width:6em;left:-4em}.vjs-default-skin .vjs-progress-control{position:absolute;left:0;right:0;width:auto;font-size:.3em;height:1em;top:-1em;-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-default-skin:hover .vjs-progress-control{font-size:.9em;-webkit-transition:all .2s;-moz-transition:all .2s;-o-transition:all .2s;transition:all .2s}.vjs-default-skin .vjs-progress-holder{height:100%}.vjs-default-skin .vjs-progress-holder .vjs-play-progress,.vjs-default-skin .vjs-progress-holder .vjs-load-progress,.vjs-default-skin .vjs-progress-holder .vjs-load-progress div{position:absolute;display:block;height:100%;margin:0;padding:0;width:0;left:0;top:0}.vjs-default-skin .vjs-play-progress{background:#66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat}.vjs-default-skin .vjs-load-progress{background:#646464;background:rgba(255,255,255,.2)}.vjs-default-skin .vjs-load-progress div{background:#787878;background:rgba(255,255,255,.1)}.vjs-default-skin .vjs-seek-handle{width:1.5em;height:100%}.vjs-default-skin .vjs-seek-handle:before{padding-top:.1em}.vjs-default-skin.vjs-live .vjs-time-controls,.vjs-default-skin.vjs-live .vjs-time-divider,.vjs-default-skin.vjs-live .vjs-progress-control{display:none}.vjs-default-skin.vjs-live .vjs-live-display{display:block}.vjs-default-skin .vjs-live-display{display:none;font-size:1em;line-height:3em}.vjs-default-skin .vjs-time-controls{font-size:1em;line-height:3em}.vjs-default-skin .vjs-current-time{float:left}.vjs-default-skin .vjs-duration{float:left}.vjs-default-skin .vjs-remaining-time{display:none;float:left}.vjs-time-divider{float:left;line-height:3em}.vjs-default-skin .vjs-fullscreen-control{width:3.8em;cursor:pointer;float:right}.vjs-default-skin .vjs-fullscreen-control:before{content:"\e000"}.vjs-default-skin.vjs-fullscreen .vjs-fullscreen-control:before{content:"\e00b"}.vjs-default-skin .vjs-big-play-button{left:.5em;top:.5em;font-size:3em;display:block;z-index:2;position:absolute;width:4em;height:2.6em;text-align:center;vertical-align:middle;cursor:pointer;opacity:1;background-color:#07141e;background-color:rgba(7,20,30,.7);border:.1em solid #3b4249;-webkit-border-radius:.8em;-moz-border-radius:.8em;border-radius:.8em;-webkit-box-shadow:0 0 1em rgba(255,255,255,.25);-moz-box-shadow:0 0 1em rgba(255,255,255,.25);box-shadow:0 0 1em rgba(255,255,255,.25);-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-default-skin.vjs-big-play-centered .vjs-big-play-button{left:50%;margin-left:-2.1em;top:50%;margin-top:-1.4000000000000001em}.vjs-default-skin.vjs-controls-disabled .vjs-big-play-button{display:none}.vjs-default-skin.vjs-has-started .vjs-big-play-button{display:none}.vjs-default-skin.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-default-skin:hover .vjs-big-play-button,.vjs-default-skin .vjs-big-play-button:focus{outline:0;border-color:#fff;background-color:#505050;background-color:rgba(50,50,50,.75);-webkit-box-shadow:0 0 3em #fff;-moz-box-shadow:0 0 3em #fff;box-shadow:0 0 3em #fff;-webkit-transition:all 0s;-moz-transition:all 0s;-o-transition:all 0s;transition:all 0s}.vjs-default-skin .vjs-big-play-button:before{content:"\e001";font-family:VideoJS;line-height:2.6em;text-shadow:.05em .05em .1em #000;text-align:center;position:absolute;left:0;width:100%;height:100%}.vjs-error .vjs-big-play-button{display:none}.vjs-error-display{display:none}.vjs-error .vjs-error-display{display:block;position:absolute;left:0;top:0;width:100%;height:100%}.vjs-error .vjs-error-display:before{content:'X';font-family:Arial;font-size:4em;color:#666;line-height:1;text-shadow:.05em .05em .1em #000;text-align:center;vertical-align:middle;position:absolute;left:0;top:50%;margin-top:-.5em;width:100%}.vjs-error-display div{position:absolute;bottom:1em;right:0;left:0;font-size:1.4em;text-align:center;padding:3px;background:#000;background:rgba(0,0,0,.5)}.vjs-error-display a,.vjs-error-display a:visited{color:#F4A460}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;font-size:4em;line-height:1;width:1em;height:1em;margin-left:-.5em;margin-top:-.5em;opacity:.75}.vjs-waiting .vjs-loading-spinner,.vjs-seeking .vjs-loading-spinner{display:block;-webkit-animation:spin 1.5s infinite linear;-moz-animation:spin 1.5s infinite linear;-o-animation:spin 1.5s infinite linear;animation:spin 1.5s infinite linear}.vjs-error .vjs-loading-spinner{display:none;-webkit-animation:none;-moz-animation:none;-o-animation:none;animation:none}.vjs-default-skin .vjs-loading-spinner:before{content:"\e01e";font-family:VideoJS;position:absolute;top:0;left:0;width:1em;height:1em;text-align:center;text-shadow:0 0 .1em #000}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.vjs-default-skin .vjs-menu-button{float:right;cursor:pointer}.vjs-default-skin .vjs-menu{display:none;position:absolute;bottom:0;left:0;width:0;height:0;margin-bottom:3em;border-left:2em solid transparent;border-right:2em solid transparent;border-top:1.55em solid #000;border-top-color:rgba(7,40,50,.5)}.vjs-default-skin .vjs-menu-button .vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;position:absolute;width:10em;bottom:1.5em;max-height:15em;overflow:auto;left:-5em;background-color:#07141e;background-color:rgba(7,20,30,.7);-webkit-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);-moz-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);box-shadow:-.2em -.2em .3em rgba(255,255,255,.2)}.vjs-default-skin .vjs-menu-button:hover .vjs-menu{display:block}.vjs-default-skin .vjs-menu-button ul li{list-style:none;margin:0;padding:.3em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-default-skin .vjs-menu-button ul li.vjs-selected{background-color:#000}.vjs-default-skin .vjs-menu-button ul li:focus,.vjs-default-skin .vjs-menu-button ul li:hover,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:focus,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:hover{outline:0;color:#111;background-color:#fff;background-color:rgba(255,255,255,.75);-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.vjs-default-skin .vjs-menu-button ul li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-default-skin .vjs-subtitles-button:before{content:"\e00c"}.vjs-default-skin .vjs-captions-button:before{content:"\e008"}.vjs-default-skin .vjs-chapters-button:before{content:"\e00c"}.vjs-default-skin .vjs-chapters-button.vjs-menu-button .vjs-menu .vjs-menu-content{width:24em;left:-12em}.vjs-default-skin .vjs-captions-button:focus .vjs-control-content:before,.vjs-default-skin .vjs-captions-button:hover .vjs-control-content:before{-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js{background-color:#000;position:relative;padding:0;font-size:10px;vertical-align:middle;font-weight:400;font-style:normal;font-family:Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js:-moz-full-screen{position:absolute}body.vjs-full-window{padding:0;margin:0;height:100%;overflow-y:auto}.video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0;width:100%!important;height:100%!important;_position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-poster{background-repeat:no-repeat;background-position:50% 50%;background-size:contain;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0}.vjs-poster img{display:block;margin:0 auto;max-height:100%;padding:0;width:100%}.video-js.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-text-track-display{text-align:center;position:absolute;bottom:4em;left:1em;right:1em}.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{display:none;font-size:1.4em;text-align:center;margin-bottom:.1em;background-color:#000;background-color:rgba(0,0,0,.5)}.video-js .vjs-subtitles{color:#fff}.video-js .vjs-captions{color:#fc6}.vjs-tt-cue{display:block}.vjs-default-skin .vjs-hidden{display:none}.vjs-lock-showing{display:block!important;opacity:1;visibility:visible}.vjs-no-js{padding:20px;color:#ccc;background-color:#333;font-size:18px;font-family:Arial,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#F4A460}
0 6 \ No newline at end of file
... ...
plugins/video/public/f/2/vjs.eot 0 → 100644
No preview for this file type
plugins/video/public/f/2/vjs.svg 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +<?xml version="1.0" standalone="no"?>
  2 +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
  3 +<svg xmlns="http://www.w3.org/2000/svg">
  4 +<metadata>Generated by IcoMoon</metadata>
  5 +<defs>
  6 +<font id="icomoon" horiz-adv-x="1024">
  7 +<font-face units-per-em="1024" ascent="960" descent="-64" />
  8 +<missing-glyph horiz-adv-x="1024" />
  9 +<glyph unicode="&#x20;" d="" horiz-adv-x="512" />
  10 +<glyph unicode="&#xe000;" d="M1024 960v-416l-160 160-192-192-96 96 192 192-160 160zM448 288l-192-192 160-160h-416v416l160-160 192 192z" />
  11 +<glyph unicode="&#xe001;" d="M192 832l640-384-640-384z" />
  12 +<glyph unicode="&#xe002;" d="M128 832h320v-768h-320zM576 832h320v-768h-320z" />
  13 +<glyph unicode="&#xe003;" d="M401.332 881.332c25.668 25.668 46.668 16.968 46.668-19.332v-828c0-36.3-21-44.998-46.668-19.33l-241.332 241.33h-160v384h160l241.332 241.332z" />
  14 +<glyph unicode="&#xe004;" d="M549.020 218.98c-12.286 0-24.568 4.686-33.942 14.058-18.746 18.746-18.746 49.136 0 67.882 81.1 81.1 81.1 213.058 0 294.156-18.746 18.746-18.746 49.138 0 67.882 18.746 18.744 49.136 18.744 67.882 0 118.53-118.53 118.53-311.392 0-429.922-9.372-9.37-21.656-14.056-33.94-14.056zM401.332 881.332c25.668 25.668 46.668 16.968 46.668-19.332v-828c0-36.3-21-44.998-46.668-19.33l-241.332 241.33h-160v384h160l241.332 241.332z" />
  15 +<glyph unicode="&#xe005;" d="M719.53 128.47c-12.286 0-24.568 4.686-33.942 14.058-18.744 18.744-18.744 49.136 0 67.882 131.006 131.006 131.006 344.17 0 475.176-18.744 18.746-18.744 49.138 0 67.882 18.744 18.742 49.138 18.744 67.882 0 81.594-81.592 126.53-190.076 126.53-305.468 0-115.39-44.936-223.876-126.53-305.47-9.372-9.374-21.656-14.060-33.94-14.060zM549.020 218.98c-12.286 0-24.568 4.686-33.942 14.058-18.746 18.746-18.746 49.136 0 67.882 81.1 81.1 81.1 213.058 0 294.156-18.746 18.746-18.746 49.138 0 67.882 18.746 18.744 49.136 18.744 67.882 0 118.53-118.53 118.53-311.392 0-429.922-9.372-9.37-21.656-14.056-33.94-14.056zM401.332 881.332c25.668 25.668 46.668 16.968 46.668-19.332v-828c0-36.3-21-44.998-46.668-19.33l-241.332 241.33h-160v384h160l241.332 241.332z" />
  16 +<glyph unicode="&#xe006;" d="M890.040 37.96c-12.286 0-24.568 4.686-33.942 14.058-18.744 18.746-18.744 49.136 0 67.882 87.638 87.642 135.904 204.16 135.904 328.1 0 123.938-48.266 240.458-135.904 328.098-18.744 18.746-18.744 49.138 0 67.882 18.744 18.744 49.138 18.744 67.882 0 105.77-105.772 164.022-246.4 164.022-395.98 0-149.582-58.252-290.208-164.022-395.98-9.372-9.374-21.656-14.060-33.94-14.060zM719.53 128.47c-12.286 0-24.568 4.686-33.942 14.058-18.744 18.744-18.744 49.136 0 67.882 131.006 131.006 131.006 344.17 0 475.176-18.744 18.746-18.744 49.138 0 67.882 18.744 18.742 49.138 18.744 67.882 0 81.594-81.592 126.53-190.076 126.53-305.468 0-115.39-44.936-223.876-126.53-305.47-9.372-9.374-21.656-14.060-33.94-14.060zM549.020 218.98c-12.286 0-24.568 4.686-33.942 14.058-18.746 18.746-18.746 49.136 0 67.882 81.1 81.1 81.1 213.058 0 294.156-18.746 18.746-18.746 49.138 0 67.882 18.746 18.744 49.136 18.744 67.882 0 118.53-118.53 118.53-311.392 0-429.922-9.372-9.37-21.656-14.056-33.94-14.056zM401.332 881.332c25.668 25.668 46.668 16.968 46.668-19.332v-828c0-36.3-21-44.998-46.668-19.33l-241.332 241.33h-160v384h160l241.332 241.332z" horiz-adv-x="1088" />
  17 +<glyph unicode="&#xe007;" d="M512 960l-320-512 320-512 320 512z" />
  18 +<glyph unicode="&#xe008;" d="M0 960h1374.316v-1030.414h-1374.316v1030.414zM1245.462 449.276c-1.706 180.052-8.542 258.568-51.2 314.036-7.68 11.946-22.186 18.772-34.132 27.296-41.814 30.73-238.944 41.814-467.636 41.814-228.702 0-435.21-11.084-476.17-41.814-12.8-8.524-27.316-15.35-35.84-27.296-41.822-55.468-47.786-133.984-50.346-314.036 2.56-180.062 8.524-258.57 50.346-314.036 8.524-12.8 23.040-18.774 35.84-27.306 40.96-31.574 247.468-41.814 476.17-43.52 228.692 1.706 425.822 11.946 467.636 43.52 11.946 8.532 26.452 14.506 34.132 27.306 42.658 55.466 49.494 133.974 51.2 314.036zM662.358 495.904c-11.58 140.898-86.51 223.906-220.556 223.906-122.458 0-218.722-110.432-218.722-287.88 0-178.212 87.73-289.396 232.734-289.396 115.766 0 196.798 85.298 209.588 226.95h-138.302c-5.48-52.548-27.414-92.914-73.72-92.914-73.108 0-86.51 72.354-86.51 149.27 0 105.868 30.46 159.932 81.032 159.932 45.082 0 73.718-32.75 77.976-89.868h136.48zM1140.026 495.904c-11.57 140.898-86.51 223.906-220.546 223.906-122.466 0-218.722-110.432-218.722-287.88 0-178.212 87.73-289.396 232.734-289.396 115.758 0 196.788 85.298 209.58 226.95h-138.304c-5.47-52.548-27.404-92.914-73.71-92.914-73.116 0-86.518 72.354-86.518 149.27 0 105.868 30.468 159.932 81.030 159.932 45.084 0 73.728-32.75 77.986-89.868h136.47z" horiz-adv-x="1374" />
  19 +<glyph unicode="&#xe009;" d="M128 832h768v-768h-768z" />
  20 +<glyph unicode="&#xe00a;" d="M384 832c0-70.692 57.308-128 128-128s128 57.308 128 128c0 70.692-57.308 128-128 128-70.692 0-128-57.308-128-128zM655.53 719.53c0-70.692 57.308-128 128-128s128 57.308 128 128c0 70.692-57.308 128-128 128-70.692 0-128-57.308-128-128zM832 448c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64zM719.53 176.47c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64zM448.002 64c0 0 0 0 0 0 0-35.346 28.654-64 64-64 35.346 0 64 28.654 64 64 0 0 0 0 0 0 0 0 0 0 0 0 0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64s0 0 0 0zM176.472 176.47c0 0 0 0 0 0 0-35.346 28.654-64 64-64 35.346 0 64 28.654 64 64 0 0 0 0 0 0 0 0 0 0 0 0 0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64s0 0 0 0zM144.472 719.53c0 0 0 0 0 0 0-53.019 42.981-96 96-96 53.019 0 96 42.981 96 96 0 0 0 0 0 0 0 0 0 0 0 0 0 53.019-42.981 96-96 96-53.019 0-96-42.981-96-96s0 0 0 0zM56 448c0-39.765 32.235-72 72-72s72 32.235 72 72c0 39.765-32.235 72-72 72-39.765 0-72-32.235-72-72z" />
  21 +<glyph unicode="&#xe00b;" d="M448 384v-416l-160 160-192-192-96 96 192 192-160 160zM1024 864l-192-192 160-160h-416v416l160-160 192 192z" />
  22 +<glyph unicode="&#xe00c;" d="M512 896c282.77 0 512-186.25 512-416 0-229.752-229.23-416-512-416-27.156 0-53.81 1.734-79.824 5.044-109.978-109.978-241.25-129.7-368.176-132.596v26.916c68.536 33.578 128 94.74 128 164.636 0 9.754-0.758 19.33-2.164 28.696-115.796 76.264-189.836 192.754-189.836 323.304 0 229.75 229.23 416 512 416z" />
  23 +<glyph unicode="&#xe00d;" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 704c141.384 0 256-114.616 256-256s-114.616-256-256-256-256 114.616-256 256 114.616 256 256 256zM817.47 142.53c-81.594-81.594-190.080-126.53-305.47-126.53-115.392 0-223.876 44.936-305.47 126.53-81.594 81.594-126.53 190.078-126.53 305.47 0 115.39 44.936 223.876 126.53 305.47l67.882-67.882c0 0 0 0 0 0-131.006-131.006-131.006-344.17 0-475.176 63.462-63.462 147.838-98.412 237.588-98.412 89.748 0 174.124 34.95 237.588 98.412 131.006 131.006 131.006 344.168 0 475.176l67.882 67.882c81.594-81.594 126.53-190.080 126.53-305.47 0-115.392-44.936-223.876-126.53-305.47z" />
  24 +<glyph unicode="&#xe00e;" d="M864 256c-45.16 0-85.92-18.738-115.012-48.83l-431.004 215.502c1.314 8.252 2.016 16.706 2.016 25.328s-0.702 17.076-2.016 25.326l431.004 215.502c29.092-30.090 69.852-48.828 115.012-48.828 88.366 0 160 71.634 160 160s-71.634 160-160 160-160-71.634-160-160c0-8.622 0.704-17.076 2.016-25.326l-431.004-215.504c-29.092 30.090-69.852 48.83-115.012 48.83-88.366 0-160-71.636-160-160 0-88.368 71.634-160 160-160 45.16 0 85.92 18.738 115.012 48.828l431.004-215.502c-1.312-8.25-2.016-16.704-2.016-25.326 0-88.368 71.634-160 160-160s160 71.632 160 160c0 88.364-71.634 160-160 160z" />
  25 +<glyph unicode="&#xe01e;" d="M1024 448c-1.278 66.862-15.784 133.516-42.576 194.462-26.704 61-65.462 116.258-113.042 161.92-47.552 45.696-103.944 81.82-164.984 105.652-61.004 23.924-126.596 35.352-191.398 33.966-64.81-1.282-129.332-15.374-188.334-41.356-59.048-25.896-112.542-63.47-156.734-109.576-44.224-46.082-79.16-100.708-102.186-159.798-23.114-59.062-34.128-122.52-32.746-185.27 1.286-62.76 14.964-125.148 40.134-182.206 25.088-57.1 61.476-108.828 106.11-151.548 44.61-42.754 97.472-76.504 154.614-98.72 57.118-22.304 118.446-32.902 179.142-31.526 60.708 1.29 120.962 14.554 176.076 38.914 55.15 24.282 105.116 59.48 146.366 102.644 41.282 43.14 73.844 94.236 95.254 149.43 13.034 33.458 21.88 68.4 26.542 103.798 1.246-0.072 2.498-0.12 3.762-0.12 35.346 0 64 28.652 64 64 0 1.796-0.094 3.572-0.238 5.332h0.238zM922.306 278.052c-23.472-53.202-57.484-101.4-99.178-141.18-41.67-39.81-91-71.186-144.244-91.79-53.228-20.678-110.29-30.452-166.884-29.082-56.604 1.298-112.596 13.736-163.82 36.474-51.25 22.666-97.684 55.49-135.994 95.712-38.338 40.198-68.528 87.764-88.322 139.058-19.87 51.284-29.228 106.214-27.864 160.756 1.302 54.552 13.328 108.412 35.254 157.69 21.858 49.3 53.498 93.97 92.246 130.81 38.73 36.868 84.53 65.87 133.874 84.856 49.338 19.060 102.136 28.006 154.626 26.644 52.5-1.306 104.228-12.918 151.562-34.034 47.352-21.050 90.256-51.502 125.624-88.782 35.396-37.258 63.21-81.294 81.39-128.688 18.248-47.392 26.782-98.058 25.424-148.496h0.238c-0.144-1.76-0.238-3.536-0.238-5.332 0-33.012 24.992-60.174 57.086-63.624-6.224-34.822-16.53-68.818-30.78-100.992z" />
  26 +<glyph unicode="&#xe01f;" d="M512 960c-278.748 0-505.458-222.762-511.848-499.974 5.92 241.864 189.832 435.974 415.848 435.974 229.75 0 416-200.576 416-448 0-53.020 42.98-96 96-96 53.020 0 96 42.98 96 96 0 282.77-229.23 512-512 512zM512-64c278.748 0 505.458 222.762 511.848 499.974-5.92-241.864-189.832-435.974-415.848-435.974-229.75 0-416 200.576-416 448 0 53.020-42.98 96-96 96-53.020 0-96-42.98-96-96 0-282.77 229.23-512 512-512z" />
  27 +<glyph unicode="&#xe600;" d="M1024 351.906v192.188l-146.774 24.462c-5.958 18.132-13.222 35.668-21.694 52.5l86.454 121.034-135.896 135.898-120.826-86.304c-16.91 8.554-34.538 15.888-52.768 21.902l-24.402 146.414h-192.188l-24.402-146.416c-18.23-6.014-35.858-13.348-52.766-21.902l-120.828 86.304-135.898-135.898 86.454-121.036c-8.47-16.83-15.734-34.366-21.692-52.498l-146.774-24.46v-192.188l147.118-24.52c5.96-17.968 13.21-35.348 21.642-52.030l-86.748-121.448 135.898-135.896 121.654 86.894c16.602-8.35 33.89-15.528 51.764-21.434l24.578-147.472h192.188l24.578 147.474c17.874 5.906 35.162 13.084 51.766 21.432l121.652-86.892 135.896 135.896-86.744 121.446c8.432 16.682 15.678 34.062 21.64 52.032l147.118 24.518zM512 320c-70.692 0-128 57.306-128 128 0 70.692 57.308 128 128 128 70.694 0 128-57.308 128-128 0-70.694-57.306-128-128-128z" />
  28 +</font></defs></svg>
0 29 \ No newline at end of file
... ...
plugins/video/public/f/2/vjs.ttf 0 → 100644
No preview for this file type
plugins/video/public/f/2/vjs.woff 0 → 100644
No preview for this file type
plugins/video/public/f/3 0 → 120000
No preview for this file type
plugins/video/public/javascripts/videojs/video-4.5.1.js 0 → 100644
... ... @@ -0,0 +1,139 @@
  1 +/*! Video.js v4.5.1 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */
  2 +(function() {var b=void 0,f=!0,h=null,l=!1;function m(){return function(){}}function p(a){return function(){return this[a]}}function q(a){return function(){return a}}var t;document.createElement("video");document.createElement("audio");document.createElement("track");function u(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(u.va[a])return u.va[a];a=u.u(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new u.Player(a,c,d)}
  3 +var videojs=u;window.Wd=window.Xd=u;u.Rb="4.5";u.Fc="https:"==document.location.protocol?"https://":"http://";u.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{}},notSupportedMessage:'Sorry, no compatible source and playback technology were found for this video. Try using another browser like <a href="http://bit.ly/ccMUEC">Chrome</a> or download the latest <a href="http://adobe.ly/mwfN1">Adobe Flash Player</a>.'};
  4 +"GENERATED_CDN_VSN"!==u.Rb&&(videojs.options.flash.swf=u.Fc+"vjs.zencdn.net/"+u.Rb+"/video-js.swf");u.va={};"function"===typeof define&&define.amd?define([],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);u.ka=u.CoreObject=m();
  5 +u.ka.extend=function(a){var c,d;a=a||{};c=a.init||a.j||this.prototype.init||this.prototype.j||m();d=function(){c.apply(this,arguments)};d.prototype=u.l.create(this.prototype);d.prototype.constructor=d;d.extend=u.ka.extend;d.create=u.ka.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};u.ka.create=function(){var a=u.l.create(this.prototype);this.apply(a,arguments);return a};
  6 +u.d=function(a,c,d){var e=u.getData(a);e.z||(e.z={});e.z[c]||(e.z[c]=[]);d.s||(d.s=u.s++);e.z[c].push(d);e.V||(e.disabled=l,e.V=function(c){if(!e.disabled){c=u.ic(c);var d=e.z[c.type];if(d)for(var d=d.slice(0),k=0,r=d.length;k<r&&!c.pc();k++)d[k].call(a,c)}});1==e.z[c].length&&(document.addEventListener?a.addEventListener(c,e.V,l):document.attachEvent&&a.attachEvent("on"+c,e.V))};
  7 +u.o=function(a,c,d){if(u.mc(a)){var e=u.getData(a);if(e.z)if(c){var g=e.z[c];if(g){if(d){if(d.s)for(e=0;e<g.length;e++)g[e].s===d.s&&g.splice(e--,1)}else e.z[c]=[];u.ec(a,c)}}else for(g in e.z)c=g,e.z[c]=[],u.ec(a,c)}};u.ec=function(a,c){var d=u.getData(a);0===d.z[c].length&&(delete d.z[c],document.removeEventListener?a.removeEventListener(c,d.V,l):document.detachEvent&&a.detachEvent("on"+c,d.V));u.zb(d.z)&&(delete d.z,delete d.V,delete d.disabled);u.zb(d)&&u.uc(a)};
  8 +u.ic=function(a){function c(){return f}function d(){return l}if(!a||!a.Ab){var e=a||window.event;a={};for(var g in e)"layerX"!==g&&("layerY"!==g&&"keyboardEvent.keyLocation"!==g)&&("returnValue"==g&&e.preventDefault||(a[g]=e[g]));a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=l;a.fd=c;a.defaultPrevented=f};a.fd=d;a.defaultPrevented=l;a.stopPropagation=function(){e.stopPropagation&&
  9 +e.stopPropagation();a.cancelBubble=f;a.Ab=c};a.Ab=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation();a.pc=c;a.stopPropagation()};a.pc=d;if(a.clientX!=h){g=document.documentElement;var j=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||j&&j.scrollLeft||0)-(g&&g.clientLeft||j&&j.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||j&&j.scrollTop||0)-(g&&g.clientTop||j&&j.clientTop||0)}a.which=a.charCode||a.keyCode;a.button!=h&&(a.button=a.button&1?0:a.button&
  10 +4?1:a.button&2?2:0)}return a};u.k=function(a,c){var d=u.mc(a)?u.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=u.ic(c);d.V&&d.V.call(a,c);if(e&&!c.Ab()&&c.bubbles!==l)u.k(e,c);else if(!e&&!c.defaultPrevented&&(d=u.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=l}return!c.defaultPrevented};
  11 +u.U=function(a,c,d){function e(){u.o(a,c,e);d.apply(this,arguments)}e.s=d.s=d.s||u.s++;u.d(a,c,e)};var v=Object.prototype.hasOwnProperty;u.e=function(a,c){var d,e;d=document.createElement(a||"div");for(e in c)v.call(c,e)&&(-1!==e.indexOf("aria-")||"role"==e?d.setAttribute(e,c[e]):d[e]=c[e]);return d};u.Z=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};u.l={};u.l.create=Object.create||function(a){function c(){}c.prototype=a;return new c};
  12 +u.l.ra=function(a,c,d){for(var e in a)v.call(a,e)&&c.call(d||this,e,a[e])};u.l.B=function(a,c){if(!c)return a;for(var d in c)v.call(c,d)&&(a[d]=c[d]);return a};u.l.Wc=function(a,c){var d,e,g;a=u.l.copy(a);for(d in c)v.call(c,d)&&(e=a[d],g=c[d],a[d]=u.l.Na(e)&&u.l.Na(g)?u.l.Wc(e,g):c[d]);return a};u.l.copy=function(a){return u.l.B({},a)};u.l.Na=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};
  13 +u.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.s||(c.s=u.s++);e.s=d?d+"_"+c.s:c.s;return e};u.pa={};u.s=1;u.expando="vdata"+(new Date).getTime();u.getData=function(a){var c=a[u.expando];c||(c=a[u.expando]=u.s++,u.pa[c]={});return u.pa[c]};u.mc=function(a){a=a[u.expando];return!(!a||u.zb(u.pa[a]))};u.uc=function(a){var c=a[u.expando];if(c){delete u.pa[c];try{delete a[u.expando]}catch(d){a.removeAttribute?a.removeAttribute(u.expando):a[u.expando]=h}}};
  14 +u.zb=function(a){for(var c in a)if(a[c]!==h)return l;return f};u.n=function(a,c){-1==(" "+a.className+" ").indexOf(" "+c+" ")&&(a.className=""===a.className?c:a.className+" "+c)};u.t=function(a,c){var d,e;if(-1!=a.className.indexOf(c)){d=a.className.split(" ");for(e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};u.F=u.e("video");u.J=navigator.userAgent;u.Kc=/iPhone/i.test(u.J);u.Jc=/iPad/i.test(u.J);u.Lc=/iPod/i.test(u.J);u.Ic=u.Kc||u.Jc||u.Lc;var aa=u,w;var x=u.J.match(/OS (\d+)_/i);
  15 +w=x&&x[1]?x[1]:b;aa.Kd=w;u.Hc=/Android/i.test(u.J);var ba=u,y;var z=u.J.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),A,B;z?(A=z[1]&&parseFloat(z[1]),B=z[2]&&parseFloat(z[2]),y=A&&B?parseFloat(z[1]+"."+z[2]):A?A:h):y=h;ba.Qb=y;u.Mc=u.Hc&&/webkit/i.test(u.J)&&2.3>u.Qb;u.Ub=/Firefox/i.test(u.J);u.Ld=/Chrome/i.test(u.J);u.$b=!!("ontouchstart"in window||window.Gc&&document instanceof window.Gc);
  16 +u.wb=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0<a.attributes.length){d=a.attributes;for(var j=d.length-1;0<=j;j--){e=d[j].name;g=d[j].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==h?f:l;c[e]=g}}return c};
  17 +u.Pd=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};u.yb=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};u.Nb={};u.u=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};
  18 +u.ta=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),j=Math.floor(c/60%60),k=Math.floor(c/3600);if(isNaN(a)||Infinity===a)g=e=d="-";g=0<g||0<k?g+":":"";return g+(((g||10<=j)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};u.Sc=function(){document.body.focus();document.onselectstart=q(l)};u.Ed=function(){document.onselectstart=q(f)};u.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};u.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};
  19 +u.sb=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}};
  20 +u.get=function(a,c,d){var e,g;"undefined"===typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");});g=new XMLHttpRequest;try{g.open("GET",a)}catch(j){d(j)}e=0===a.indexOf("file:")||0===window.location.href.indexOf("file:")&&-1===a.indexOf("http");
  21 +g.onreadystatechange=function(){4===g.readyState&&(200===g.status||e&&0===g.status?c(g.responseText):d&&d())};try{g.send()}catch(k){d&&d(k)}};u.wd=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?u.log("LocalStorage Full (VideoJS)",d):18==d.code?u.log("LocalStorage not allowed (VideoJS)",d):u.log("LocalStorage Error (VideoJS)",d)}};u.kc=function(a){a.match(/^https?:\/\//)||(a=u.e("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};
  22 +u.log=function(){u.log.history=u.log.history||[];u.log.history.push(arguments);window.console&&window.console.log(Array.prototype.slice.call(arguments))};u.cd=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:u.round(c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0)),top:u.round(c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0))}};
  23 +u.ja={};u.ja.Eb=function(a,c){var d,e,g;a=u.l.copy(a);for(d in c)c.hasOwnProperty(d)&&(e=a[d],g=c[d],a[d]=u.l.Na(e)&&u.l.Na(g)?u.ja.Eb(e,g):c[d]);return a};
  24 +u.b=u.ka.extend({j:function(a,c,d){this.c=a;this.h=u.l.copy(this.h);c=this.options(c);this.R=c.id||(c.el&&c.el.id?c.el.id:a.id()+"_component_"+u.s++);this.ld=c.name||h;this.a=c.el||this.e();this.K=[];this.Ja={};this.Ka={};this.nc();this.I(d);if(c.vc!==l){var e,g;e=u.bind(this.C(),this.C().reportUserActivity);this.d("touchstart",function(){e();clearInterval(g);g=setInterval(e,250)});a=function(){e();clearInterval(g)};this.d("touchmove",e);this.d("touchend",a);this.d("touchcancel",a)}}});t=u.b.prototype;
  25 +t.dispose=function(){this.k({type:"dispose",bubbles:l});if(this.K)for(var a=this.K.length-1;0<=a;a--)this.K[a].dispose&&this.K[a].dispose();this.Ka=this.Ja=this.K=h;this.o();this.a.parentNode&&this.a.parentNode.removeChild(this.a);u.uc(this.a);this.a=h};t.c=f;t.C=p("c");t.options=function(a){return a===b?this.h:this.h=u.ja.Eb(this.h,a)};t.e=function(a,c){return u.e(a,c)};t.u=p("a");t.La=function(){return this.G||this.a};t.id=p("R");t.name=p("ld");t.children=p("K");t.ed=function(a){return this.Ja[a]};
  26 +t.fa=function(a){return this.Ka[a]};t.Y=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||u.Z(e),c.name=e,d=new window.videojs[d](this.c||this,c)):d=a;this.K.push(d);"function"===typeof d.id&&(this.Ja[d.id()]=d);(e=e||d.name&&d.name())&&(this.Ka[e]=d);"function"===typeof d.el&&d.el()&&this.La().appendChild(d.el());return d};
  27 +t.removeChild=function(a){"string"===typeof a&&(a=this.fa(a));if(a&&this.K){for(var c=l,d=this.K.length-1;0<=d;d--)if(this.K[d]===a){c=f;this.K.splice(d,1);break}c&&(this.Ja[a.id]=h,this.Ka[a.name]=h,(c=a.u())&&c.parentNode===this.La()&&this.La().removeChild(a.u()))}};t.nc=function(){var a=this.h;if(a&&a.children){var c=this;u.l.ra(a.children,function(a,e){e!==l&&!e.loadEvent&&(c[a]=c.Y(a,e))})}};t.Q=q("");t.d=function(a,c){u.d(this.a,a,u.bind(this,c));return this};
  28 +t.o=function(a,c){u.o(this.a,a,c);return this};t.U=function(a,c){u.U(this.a,a,u.bind(this,c));return this};t.k=function(a,c){u.k(this.a,a,c);return this};t.I=function(a){a&&(this.aa?a.call(this):(this.Ua===b&&(this.Ua=[]),this.Ua.push(a)));return this};t.za=function(){this.aa=f;var a=this.Ua;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.Ua=[];this.k("ready")}};t.n=function(a){u.n(this.a,a);return this};t.t=function(a){u.t(this.a,a);return this};
  29 +t.show=function(){this.a.style.display="block";return this};t.D=function(){this.a.style.display="none";return this};function C(a){a.t("vjs-lock-showing")}t.disable=function(){this.D();this.show=m()};t.width=function(a,c){return E(this,"width",a,c)};t.height=function(a,c){return E(this,"height",a,c)};t.Yc=function(a,c){return this.width(a,f).height(c)};
  30 +function E(a,c,d,e){if(d!==b)return a.a.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px",e||a.k("resize"),a;if(!a.a)return 0;d=a.a.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.a["offset"+u.Z(c)],10)}
  31 +u.q=u.b.extend({j:function(a,c){u.b.call(this,a,c);var d=l;this.d("touchstart",function(a){a.preventDefault();d=f});this.d("touchmove",function(){d=l});var e=this;this.d("touchend",function(a){d&&e.p(a);a.preventDefault()});this.d("click",this.p);this.d("focus",this.Qa);this.d("blur",this.Pa)}});t=u.q.prototype;
  32 +t.e=function(a,c){c=u.l.B({className:this.Q(),innerHTML:'<div class="vjs-control-content"><span class="vjs-control-text">'+(this.oa||"Need Text")+"</span></div>",role:"button","aria-live":"polite",tabIndex:0},c);return u.b.prototype.e.call(this,a,c)};t.Q=function(){return"vjs-control "+u.b.prototype.Q.call(this)};t.p=m();t.Qa=function(){u.d(document,"keyup",u.bind(this,this.ba))};t.ba=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.p()};
  33 +t.Pa=function(){u.o(document,"keyup",u.bind(this,this.ba))};u.O=u.b.extend({j:function(a,c){u.b.call(this,a,c);this.Rc=this.fa(this.h.barName);this.handle=this.fa(this.h.handleName);a.d(this.sc,u.bind(this,this.update));this.d("mousedown",this.Ra);this.d("touchstart",this.Ra);this.d("focus",this.Qa);this.d("blur",this.Pa);this.d("click",this.p);this.c.d("controlsvisible",u.bind(this,this.update));a.I(u.bind(this,this.update));this.P={}}});t=u.O.prototype;
  34 +t.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=u.l.B({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return u.b.prototype.e.call(this,a,c)};t.Ra=function(a){a.preventDefault();u.Sc();this.P.move=u.bind(this,this.Gb);this.P.end=u.bind(this,this.Hb);u.d(document,"mousemove",this.P.move);u.d(document,"mouseup",this.P.end);u.d(document,"touchmove",this.P.move);u.d(document,"touchend",this.P.end);this.Gb(a)};
  35 +t.Hb=function(){u.Ed();u.o(document,"mousemove",this.P.move,l);u.o(document,"mouseup",this.P.end,l);u.o(document,"touchmove",this.P.move,l);u.o(document,"touchend",this.P.end,l);this.update()};t.update=function(){if(this.a){var a,c=this.xb(),d=this.handle,e=this.Rc;isNaN(c)&&(c=0);a=c;if(d){a=this.a.offsetWidth;var g=d.u().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.u().style.left=u.round(100*c,2)+"%"}e.u().style.width=u.round(100*a,2)+"%"}};
  36 +function F(a,c){var d,e,g,j;d=a.a;e=u.cd(d);j=g=d.offsetWidth;d=a.handle;if(a.h.Gd)return j=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.u().offsetHeight,j+=d/2,g-=d),Math.max(0,Math.min(1,(j-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.u().offsetWidth,g+=d/2,j-=d);return Math.max(0,Math.min(1,(e-g)/j))}t.Qa=function(){u.d(document,"keyup",u.bind(this,this.ba))};
  37 +t.ba=function(a){37==a.which?(a.preventDefault(),this.yc()):39==a.which&&(a.preventDefault(),this.zc())};t.Pa=function(){u.o(document,"keyup",u.bind(this,this.ba))};t.p=function(a){a.stopImmediatePropagation();a.preventDefault()};u.W=u.b.extend();u.W.prototype.defaultValue=0;u.W.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=u.l.B({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},c);return u.b.prototype.e.call(this,"div",c)};u.la=u.b.extend();
  38 +function ca(a,c){a.Y(c);c.d("click",u.bind(a,function(){C(this)}))}u.la.prototype.e=function(){var a=this.options().Uc||"ul";this.G=u.e(a,{className:"vjs-menu-content"});a=u.b.prototype.e.call(this,"div",{append:this.G,className:"vjs-menu"});a.appendChild(this.G);u.d(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};u.N=u.q.extend({j:function(a,c){u.q.call(this,a,c);this.selected(c.selected)}});
  39 +u.N.prototype.e=function(a,c){return u.q.prototype.e.call(this,"li",u.l.B({className:"vjs-menu-item",innerHTML:this.h.label},c))};u.N.prototype.p=function(){this.selected(f)};u.N.prototype.selected=function(a){a?(this.n("vjs-selected"),this.a.setAttribute("aria-selected",f)):(this.t("vjs-selected"),this.a.setAttribute("aria-selected",l))};
  40 +u.S=u.q.extend({j:function(a,c){u.q.call(this,a,c);this.ua=this.Ma();this.Y(this.ua);this.L&&0===this.L.length&&this.D();this.d("keyup",this.ba);this.a.setAttribute("aria-haspopup",f);this.a.setAttribute("role","button")}});t=u.S.prototype;t.na=l;t.Ma=function(){var a=new u.la(this.c);this.options().title&&a.u().appendChild(u.e("li",{className:"vjs-menu-title",innerHTML:u.Z(this.A),Cd:-1}));if(this.L=this.createItems())for(var c=0;c<this.L.length;c++)ca(a,this.L[c]);return a};t.qa=m();
  41 +t.Q=function(){return this.className+" vjs-menu-button "+u.q.prototype.Q.call(this)};t.Qa=m();t.Pa=m();t.p=function(){this.U("mouseout",u.bind(this,function(){C(this.ua);this.a.blur()}));this.na?G(this):H(this)};t.ba=function(a){a.preventDefault();32==a.which||13==a.which?this.na?G(this):H(this):27==a.which&&this.na&&G(this)};function H(a){a.na=f;a.ua.n("vjs-lock-showing");a.a.setAttribute("aria-pressed",f);a.L&&0<a.L.length&&a.L[0].u().focus()}
  42 +function G(a){a.na=l;C(a.ua);a.a.setAttribute("aria-pressed",l)}
  43 +u.Player=u.b.extend({j:function(a,c,d){this.M=a;a.id=a.id||"vjs_video_"+u.s++;c=u.l.B(da(a),c);this.v={};this.tc=c.poster;this.rb=c.controls;a.controls=l;c.vc=l;u.b.call(this,this,c,d);this.controls()?this.n("vjs-controls-enabled"):this.n("vjs-controls-disabled");this.U("play",function(a){u.k(this.a,{type:"firstplay",target:this.a})||(a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation())});this.d("ended",this.md);this.d("play",this.Jb);this.d("firstplay",this.nd);this.d("pause",this.Ib);
  44 +this.d("progress",this.pd);this.d("durationchange",this.qc);this.d("error",this.Fb);this.d("fullscreenchange",this.od);u.va[this.R]=this;c.plugins&&u.l.ra(c.plugins,function(a,c){this[a](c)},this);var e,g,j,k;e=u.bind(this,this.reportUserActivity);this.d("mousedown",function(){e();clearInterval(g);g=setInterval(e,250)});this.d("mousemove",e);this.d("mouseup",function(){e();clearInterval(g)});this.d("keydown",e);this.d("keyup",e);j=setInterval(u.bind(this,function(){this.ia&&(this.ia=l,this.userActive(f),
  45 +clearTimeout(k),k=setTimeout(u.bind(this,function(){this.ia||this.userActive(l)}),2E3))}),250);this.d("dispose",function(){clearInterval(j);clearTimeout(k)})}});t=u.Player.prototype;t.h=u.options;t.dispose=function(){this.k("dispose");this.o("dispose");u.va[this.R]=h;this.M&&this.M.player&&(this.M.player=h);this.a&&this.a.player&&(this.a.player=h);clearInterval(this.Ta);this.wa();this.i&&this.i.dispose();u.b.prototype.dispose.call(this)};
  46 +function da(a){var c={sources:[],tracks:[]};u.l.B(c,u.wb(a));if(a.hasChildNodes()){var d,e,g,j;a=a.childNodes;g=0;for(j=a.length;g<j;g++)d=a[g],e=d.nodeName.toLowerCase(),"source"===e?c.sources.push(u.wb(d)):"track"===e&&c.tracks.push(u.wb(d))}return c}
  47 +t.e=function(){var a=this.a=u.b.prototype.e.call(this,"div"),c=this.M;c.removeAttribute("width");c.removeAttribute("height");if(c.hasChildNodes()){var d,e,g,j,k;d=c.childNodes;e=d.length;for(k=[];e--;)g=d[e],j=g.nodeName.toLowerCase(),"track"===j&&k.push(g);for(d=0;d<k.length;d++)c.removeChild(k[d])}a.id=c.id;a.className=c.className;c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.n("vjs-paused");this.width(this.h.width,f);this.height(this.h.height,f);c.parentNode&&c.parentNode.insertBefore(a,
  48 +c);u.yb(c,a);return a};
  49 +function I(a,c,d){a.i&&(a.aa=l,a.i.dispose(),a.Cb&&(a.Cb=l,clearInterval(a.Ta)),a.Db&&J(a),a.i=l);"Html5"!==c&&a.M&&(u.g.gc(a.M),a.M=h);a.xa=c;a.aa=l;var e=u.l.B({source:d,parentEl:a.a},a.h[c.toLowerCase()]);d&&(d.src==a.v.src&&0<a.v.currentTime&&(e.startTime=a.v.currentTime),a.v.src=d.src);a.i=new window.videojs[c](a,e);a.i.I(function(){this.c.za();if(!this.m.progressEvents){var a=this.c;a.Cb=f;a.Ta=setInterval(u.bind(a,function(){this.v.mb<this.buffered().end(0)?this.k("progress"):1==this.bufferedPercent()&&
  50 +(clearInterval(this.Ta),this.k("progress"))}),500);a.i.U("progress",function(){this.m.progressEvents=f;var a=this.c;a.Cb=l;clearInterval(a.Ta)})}this.m.timeupdateEvents||(a=this.c,a.Db=f,a.d("play",a.Cc),a.d("pause",a.wa),a.i.U("timeupdate",function(){this.m.timeupdateEvents=f;J(this.c)}))})}function J(a){a.Db=l;a.wa();a.o("play",a.Cc);a.o("pause",a.wa)}t.Cc=function(){this.fc&&this.wa();this.fc=setInterval(u.bind(this,function(){this.k("timeupdate")}),250)};t.wa=function(){clearInterval(this.fc)};
  51 +t.Jb=function(){u.t(this.a,"vjs-paused");u.n(this.a,"vjs-playing")};t.nd=function(){this.h.starttime&&this.currentTime(this.h.starttime);this.n("vjs-has-started")};t.Ib=function(){u.t(this.a,"vjs-playing");u.n(this.a,"vjs-paused")};t.pd=function(){1==this.bufferedPercent()&&this.k("loadedalldata")};t.md=function(){this.h.loop&&(this.currentTime(0),this.play())};t.qc=function(){var a=K(this,"duration");a&&this.duration(a)};t.od=function(){this.isFullScreen()?this.n("vjs-fullscreen"):this.t("vjs-fullscreen")};
  52 +t.Fb=function(a){u.log("Video Error",a)};function L(a,c,d){if(a.i&&!a.i.aa)a.i.I(function(){this[c](d)});else try{a.i[c](d)}catch(e){throw u.log(e),e;}}function K(a,c){if(a.i&&a.i.aa)try{return a.i[c]()}catch(d){throw a.i[c]===b?u.log("Video.js: "+c+" method not defined for "+a.xa+" playback technology.",d):"TypeError"==d.name?(u.log("Video.js: "+c+" unavailable on "+a.xa+" playback technology element.",d),a.i.aa=l):u.log(d),d;}}t.play=function(){L(this,"play");return this};
  53 +t.pause=function(){L(this,"pause");return this};t.paused=function(){return K(this,"paused")===l?l:f};t.currentTime=function(a){return a!==b?(L(this,"setCurrentTime",a),this.Db&&this.k("timeupdate"),this):this.v.currentTime=K(this,"currentTime")||0};t.duration=function(a){if(a!==b)return this.v.duration=parseFloat(a),this;this.v.duration===b&&this.qc();return this.v.duration||0};
  54 +t.buffered=function(){var a=K(this,"buffered"),c=a.length-1,d=this.v.mb=this.v.mb||0;a&&(0<=c&&a.end(c)!==d)&&(d=a.end(c),this.v.mb=d);return u.sb(0,d)};t.bufferedPercent=function(){return this.duration()?this.buffered().end(0)/this.duration():0};t.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.v.volume=a,L(this,"setVolume",a),u.wd(a),this;a=parseFloat(K(this,"volume"));return isNaN(a)?1:a};
  55 +t.muted=function(a){return a!==b?(L(this,"setMuted",a),this):K(this,"muted")||l};t.Wa=function(){return K(this,"supportsFullScreen")||l};t.oc=l;t.isFullScreen=function(a){return a!==b?(this.oc=a,this):this.oc};
  56 +t.requestFullScreen=function(){var a=u.Nb.requestFullScreen;this.isFullScreen(f);a?(u.d(document,a.ub,u.bind(this,function(c){this.isFullScreen(document[a.isFullScreen]);this.isFullScreen()===l&&u.o(document,a.ub,arguments.callee);this.k("fullscreenchange")})),this.a[a.wc]()):this.i.Wa()?L(this,"enterFullScreen"):(this.gd=f,this.Zc=document.documentElement.style.overflow,u.d(document,"keydown",u.bind(this,this.jc)),document.documentElement.style.overflow="hidden",u.n(document.body,"vjs-full-window"),
  57 +this.k("enterFullWindow"),this.k("fullscreenchange"));return this};t.cancelFullScreen=function(){var a=u.Nb.requestFullScreen;this.isFullScreen(l);if(a)document[a.ob]();else this.i.Wa()?L(this,"exitFullScreen"):(M(this),this.k("fullscreenchange"));return this};t.jc=function(a){27===a.keyCode&&(this.isFullScreen()===f?this.cancelFullScreen():M(this))};
  58 +function M(a){a.gd=l;u.o(document,"keydown",a.jc);document.documentElement.style.overflow=a.Zc;u.t(document.body,"vjs-full-window");a.k("exitFullWindow")}
  59 +t.src=function(a){if(a===b)return K(this,"src");if(a instanceof Array){var c;a:{c=a;for(var d=0,e=this.h.techOrder;d<e.length;d++){var g=u.Z(e[d]),j=window.videojs[g];if(j.isSupported())for(var k=0,r=c;k<r.length;k++){var n=r[k];if(j.canPlaySource(n)){c={source:n,i:g};break a}}}c=l}c?(a=c.source,c=c.i,c==this.xa?this.src(a):I(this,c,a)):(this.a.appendChild(u.e("p",{innerHTML:this.options().notSupportedMessage})),this.za())}else a instanceof Object?window.videojs[this.xa].canPlaySource(a)?this.src(a.src):
  60 +this.src([a]):(this.v.src=a,this.aa?(L(this,"src",a),"auto"==this.h.preload&&this.load(),this.h.autoplay&&this.play()):this.I(function(){this.src(a)}));return this};t.load=function(){L(this,"load");return this};t.currentSrc=function(){return K(this,"currentSrc")||this.v.src||""};t.Sa=function(a){return a!==b?(L(this,"setPreload",a),this.h.preload=a,this):K(this,"preload")};t.autoplay=function(a){return a!==b?(L(this,"setAutoplay",a),this.h.autoplay=a,this):K(this,"autoplay")};
  61 +t.loop=function(a){return a!==b?(L(this,"setLoop",a),this.h.loop=a,this):K(this,"loop")};t.poster=function(a){if(a===b)return this.tc;this.tc=a;L(this,"setPoster",a);this.k("posterchange")};t.controls=function(a){return a!==b?(a=!!a,this.rb!==a&&((this.rb=a)?(this.t("vjs-controls-disabled"),this.n("vjs-controls-enabled"),this.k("controlsenabled")):(this.t("vjs-controls-enabled"),this.n("vjs-controls-disabled"),this.k("controlsdisabled"))),this):this.rb};u.Player.prototype.Pb;t=u.Player.prototype;
  62 +t.usingNativeControls=function(a){return a!==b?(a=!!a,this.Pb!==a&&((this.Pb=a)?(this.n("vjs-using-native-controls"),this.k("usingnativecontrols")):(this.t("vjs-using-native-controls"),this.k("usingcustomcontrols"))),this):this.Pb};t.error=function(){return K(this,"error")};t.ended=function(){return K(this,"ended")};t.seeking=function(){return K(this,"seeking")};t.ia=f;t.reportUserActivity=function(){this.ia=f};t.Ob=f;
  63 +t.userActive=function(a){return a!==b?(a=!!a,a!==this.Ob&&((this.Ob=a)?(this.ia=f,this.t("vjs-user-inactive"),this.n("vjs-user-active"),this.k("useractive")):(this.ia=l,this.i&&this.i.U("mousemove",function(a){a.stopPropagation();a.preventDefault()}),this.t("vjs-user-active"),this.n("vjs-user-inactive"),this.k("userinactive"))),this):this.Ob};var N,O,P;P=document.createElement("div");O={};
  64 +P.Md!==b?(O.wc="requestFullscreen",O.ob="exitFullscreen",O.ub="fullscreenchange",O.isFullScreen="fullScreen"):(document.mozCancelFullScreen?(N="moz",O.isFullScreen=N+"FullScreen"):(N="webkit",O.isFullScreen=N+"IsFullScreen"),P[N+"RequestFullScreen"]&&(O.wc=N+"RequestFullScreen",O.ob=N+"CancelFullScreen"),O.ub=N+"fullscreenchange");document[O.ob]&&(u.Nb.requestFullScreen=O);u.Da=u.b.extend();
  65 +u.Da.prototype.h={Rd:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{}}};u.Da.prototype.e=function(){return u.e("div",{className:"vjs-control-bar"})};u.Xb=u.q.extend({j:function(a,c){u.q.call(this,a,c);a.d("play",u.bind(this,this.Jb));a.d("pause",u.bind(this,this.Ib))}});t=u.Xb.prototype;t.oa="Play";t.Q=function(){return"vjs-play-control "+u.q.prototype.Q.call(this)};
  66 +t.p=function(){this.c.paused()?this.c.play():this.c.pause()};t.Jb=function(){u.t(this.a,"vjs-paused");u.n(this.a,"vjs-playing");this.a.children[0].children[0].innerHTML="Pause"};t.Ib=function(){u.t(this.a,"vjs-playing");u.n(this.a,"vjs-paused");this.a.children[0].children[0].innerHTML="Play"};u.$a=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.d("timeupdate",u.bind(this,this.da))}});
  67 +u.$a.prototype.e=function(){var a=u.b.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.G=u.e("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"});a.appendChild(this.G);return a};u.$a.prototype.da=function(){var a=this.c.Va?this.c.v.currentTime:this.c.currentTime();this.G.innerHTML='<span class="vjs-control-text">Current Time </span>'+u.ta(a,this.c.duration())};
  68 +u.ab=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.d("timeupdate",u.bind(this,this.da))}});u.ab.prototype.e=function(){var a=u.b.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.G=u.e("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">Duration Time </span>0:00',"aria-live":"off"});a.appendChild(this.G);return a};
  69 +u.ab.prototype.da=function(){var a=this.c.duration();a&&(this.G.innerHTML='<span class="vjs-control-text">Duration Time </span>'+u.ta(a))};u.bc=u.b.extend({j:function(a,c){u.b.call(this,a,c)}});u.bc.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};u.gb=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.d("timeupdate",u.bind(this,this.da))}});
  70 +u.gb.prototype.e=function(){var a=u.b.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.G=u.e("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">Remaining Time </span>-0:00',"aria-live":"off"});a.appendChild(this.G);return a};u.gb.prototype.da=function(){this.c.duration()&&(this.G.innerHTML='<span class="vjs-control-text">Remaining Time </span>-'+u.ta(this.c.duration()-this.c.currentTime()))};
  71 +u.Ea=u.q.extend({j:function(a,c){u.q.call(this,a,c)}});u.Ea.prototype.oa="Fullscreen";u.Ea.prototype.Q=function(){return"vjs-fullscreen-control "+u.q.prototype.Q.call(this)};u.Ea.prototype.p=function(){this.c.isFullScreen()?(this.c.cancelFullScreen(),this.a.children[0].children[0].innerHTML="Fullscreen"):(this.c.requestFullScreen(),this.a.children[0].children[0].innerHTML="Non-Fullscreen")};u.fb=u.b.extend({j:function(a,c){u.b.call(this,a,c)}});u.fb.prototype.h={children:{seekBar:{}}};
  72 +u.fb.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};u.Yb=u.O.extend({j:function(a,c){u.O.call(this,a,c);a.d("timeupdate",u.bind(this,this.Aa));a.I(u.bind(this,this.Aa))}});t=u.Yb.prototype;t.h={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};t.sc="timeupdate";t.e=function(){return u.O.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};
  73 +t.Aa=function(){var a=this.c.Va?this.c.v.currentTime:this.c.currentTime();this.a.setAttribute("aria-valuenow",u.round(100*this.xb(),2));this.a.setAttribute("aria-valuetext",u.ta(a,this.c.duration()))};t.xb=function(){return this.c.currentTime()/this.c.duration()};t.Ra=function(a){u.O.prototype.Ra.call(this,a);this.c.Va=f;this.Hd=!this.c.paused();this.c.pause()};t.Gb=function(a){a=F(this,a)*this.c.duration();a==this.c.duration()&&(a-=0.1);this.c.currentTime(a)};
  74 +t.Hb=function(a){u.O.prototype.Hb.call(this,a);this.c.Va=l;this.Hd&&this.c.play()};t.zc=function(){this.c.currentTime(this.c.currentTime()+5)};t.yc=function(){this.c.currentTime(this.c.currentTime()-5)};u.cb=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.d("progress",u.bind(this,this.update))}});u.cb.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text">Loaded: 0%</span>'})};
  75 +u.cb.prototype.update=function(){this.a.style&&(this.a.style.width=u.round(100*this.c.bufferedPercent(),2)+"%")};u.Wb=u.b.extend({j:function(a,c){u.b.call(this,a,c)}});u.Wb.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text">Progress: 0%</span>'})};u.Ga=u.W.extend({j:function(a,c){u.W.call(this,a,c);a.d("timeupdate",u.bind(this,this.da))}});u.Ga.prototype.defaultValue="00:00";
  76 +u.Ga.prototype.e=function(){return u.W.prototype.e.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};u.Ga.prototype.da=function(){var a=this.c.Va?this.c.v.currentTime:this.c.currentTime();this.a.innerHTML='<span class="vjs-control-text">'+u.ta(a,this.c.duration())+"</span>"};u.ib=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.i&&(a.i.m&&a.i.m.volumeControl===l)&&this.n("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.i.m&&a.i.m.volumeControl===l?this.n("vjs-hidden"):this.t("vjs-hidden")}))}});
  77 +u.ib.prototype.h={children:{volumeBar:{}}};u.ib.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};u.hb=u.O.extend({j:function(a,c){u.O.call(this,a,c);a.d("volumechange",u.bind(this,this.Aa));a.I(u.bind(this,this.Aa));setTimeout(u.bind(this,this.update),0)}});t=u.hb.prototype;t.Aa=function(){this.a.setAttribute("aria-valuenow",u.round(100*this.c.volume(),2));this.a.setAttribute("aria-valuetext",u.round(100*this.c.volume(),2)+"%")};
  78 +t.h={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};t.sc="volumechange";t.e=function(){return u.O.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};t.Gb=function(a){this.c.muted()&&this.c.muted(l);this.c.volume(F(this,a))};t.xb=function(){return this.c.muted()?0:this.c.volume()};t.zc=function(){this.c.volume(this.c.volume()+0.1)};t.yc=function(){this.c.volume(this.c.volume()-0.1)};
  79 +u.cc=u.b.extend({j:function(a,c){u.b.call(this,a,c)}});u.cc.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};u.jb=u.W.extend();u.jb.prototype.defaultValue="00:00";u.jb.prototype.e=function(){return u.W.prototype.e.call(this,"div",{className:"vjs-volume-handle"})};
  80 +u.ea=u.q.extend({j:function(a,c){u.q.call(this,a,c);a.d("volumechange",u.bind(this,this.update));a.i&&(a.i.m&&a.i.m.volumeControl===l)&&this.n("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.i.m&&a.i.m.volumeControl===l?this.n("vjs-hidden"):this.t("vjs-hidden")}))}});u.ea.prototype.e=function(){return u.q.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">Mute</span></div>'})};
  81 +u.ea.prototype.p=function(){this.c.muted(this.c.muted()?l:f)};u.ea.prototype.update=function(){var a=this.c.volume(),c=3;0===a||this.c.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.c.muted()?"Unmute"!=this.a.children[0].children[0].innerHTML&&(this.a.children[0].children[0].innerHTML="Unmute"):"Mute"!=this.a.children[0].children[0].innerHTML&&(this.a.children[0].children[0].innerHTML="Mute");for(a=0;4>a;a++)u.t(this.a,"vjs-vol-"+a);u.n(this.a,"vjs-vol-"+c)};
  82 +u.ma=u.S.extend({j:function(a,c){u.S.call(this,a,c);a.d("volumechange",u.bind(this,this.update));a.i&&(a.i.m&&a.i.m.Dc===l)&&this.n("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.i.m&&a.i.m.Dc===l?this.n("vjs-hidden"):this.t("vjs-hidden")}));this.n("vjs-menu-button")}});u.ma.prototype.Ma=function(){var a=new u.la(this.c,{Uc:"div"}),c=new u.hb(this.c,u.l.B({Gd:f},this.h.Yd));a.Y(c);return a};u.ma.prototype.p=function(){u.ea.prototype.p.call(this);u.S.prototype.p.call(this)};
  83 +u.ma.prototype.e=function(){return u.q.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">Mute</span></div>'})};u.ma.prototype.update=u.ea.prototype.update;u.Fa=u.q.extend({j:function(a,c){u.q.call(this,a,c);a.poster()&&this.src(a.poster());(!a.poster()||!a.controls())&&this.D();a.d("posterchange",u.bind(this,function(){this.src(a.poster())}));a.d("play",u.bind(this,this.D))}});var Q="backgroundSize"in u.F.style;
  84 +u.Fa.prototype.e=function(){var a=u.e("div",{className:"vjs-poster",tabIndex:-1});Q||a.appendChild(u.e("img"));return a};u.Fa.prototype.src=function(a){var c=this.u();a!==b&&(Q?c.style.backgroundImage='url("'+a+'")':c.firstChild.src=a)};u.Fa.prototype.p=function(){this.C().controls()&&this.c.play()};
  85 +u.Vb=u.b.extend({j:function(a,c){u.b.call(this,a,c);a.d("canplay",u.bind(this,this.D));a.d("canplaythrough",u.bind(this,this.D));a.d("playing",u.bind(this,this.D));a.d("seeking",u.bind(this,this.show));a.d("seeked",u.bind(this,this.D));a.d("error",u.bind(this,this.show));a.d("ended",u.bind(this,this.D));a.d("waiting",u.bind(this,this.show))}});u.Vb.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-loading-spinner"})};u.Ya=u.q.extend();
  86 +u.Ya.prototype.e=function(){return u.q.prototype.e.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"></span>',"aria-label":"play video"})};u.Ya.prototype.p=function(){this.c.play()};
  87 +u.r=u.b.extend({j:function(a,c,d){c=c||{};c.vc=l;u.b.call(this,a,c,d);var e,g;g=this;e=this.C();a=function(){if(e.controls()&&!e.usingNativeControls()){var a;g.d("mousedown",g.p);g.d("touchstart",function(c){c.preventDefault();a=this.c.userActive()});g.d("touchmove",function(){a&&this.C().reportUserActivity()});var c,d,n,s;c=0;g.d("touchstart",function(){c=(new Date).getTime();n=f});s=function(){n=l};g.d("touchmove",s);g.d("touchleave",s);g.d("touchcancel",s);g.d("touchend",function(){n===f&&(d=(new Date).getTime()-
  88 +c,250>d&&this.k("tap"))});g.d("tap",g.qd)}};c=u.bind(g,g.td);this.I(a);e.d("controlsenabled",a);e.d("controlsdisabled",c)}});t=u.r.prototype;t.td=function(){this.o("tap");this.o("touchstart");this.o("touchmove");this.o("touchleave");this.o("touchcancel");this.o("touchend");this.o("click");this.o("mousedown")};t.p=function(a){0===a.button&&this.C().controls()&&(this.C().paused()?this.C().play():this.C().pause())};t.qd=function(){this.C().userActive(!this.C().userActive())};t.Lb=m();
  89 +t.m={volumeControl:f,fullscreenResize:l,progressEvents:l,timeupdateEvents:l};u.media={};u.media.Xa="play pause paused currentTime setCurrentTime duration buffered volume setVolume muted setMuted width height supportsFullScreen enterFullScreen src load currentSrc preload setPreload autoplay setAutoplay loop setLoop error networkState readyState seeking initialTime startOffsetTime played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks defaultPlaybackRate playbackRate mediaGroup controller controls defaultMuted".split(" ");
  90 +function ea(){var a=u.media.Xa[i];return function(){throw Error('The "'+a+"\" method is not available on the playback technology's API");}}for(var i=u.media.Xa.length-1;0<=i;i--)u.r.prototype[u.media.Xa[i]]=ea();
  91 +u.g=u.r.extend({j:function(a,c,d){this.m.volumeControl=u.g.Tc();this.m.movingMediaElementInDOM=!u.Ic;this.m.fullscreenResize=f;u.r.call(this,a,c,d);for(d=u.g.bb.length-1;0<=d;d--)u.d(this.a,u.g.bb[d],u.bind(this.c,this.ad));(c=c.source)&&this.a.currentSrc===c.src&&0<this.a.networkState?a.k("loadstart"):c&&(this.a.src=c.src);if(u.$b&&a.options().nativeControlsForTouch!==l){var e,g,j,k;e=this;g=this.C();c=g.controls();e.a.controls=!!c;j=function(){e.a.controls=f};k=function(){e.a.controls=l};g.d("controlsenabled",
  92 +j);g.d("controlsdisabled",k);c=function(){g.o("controlsenabled",j);g.o("controlsdisabled",k)};e.d("dispose",c);g.d("usingcustomcontrols",c);g.usingNativeControls(f)}a.I(function(){this.M&&(this.h.autoplay&&this.paused())&&(delete this.M.poster,this.play())});this.za()}});t=u.g.prototype;t.dispose=function(){u.r.prototype.dispose.call(this)};
  93 +t.e=function(){var a=this.c,c=a.M,d;if(!c||this.m.movingMediaElementInDOM===l)c?(d=c.cloneNode(l),u.g.gc(c),c=d,a.M=h):c=u.e("video",{id:a.id()+"_html5_api",className:"vjs-tech"}),c.player=a,u.yb(c,a.u());d=["autoplay","preload","loop","muted"];for(var e=d.length-1;0<=e;e--){var g=d[e];a.h[g]!==h&&(c[g]=a.h[g])}return c};t.ad=function(a){this.k(a);a.stopPropagation()};t.play=function(){this.a.play()};t.pause=function(){this.a.pause()};t.paused=function(){return this.a.paused};t.currentTime=function(){return this.a.currentTime};
  94 +t.vd=function(a){try{this.a.currentTime=a}catch(c){u.log(c,"Video is not ready. (Video.js)")}};t.duration=function(){return this.a.duration||0};t.buffered=function(){return this.a.buffered};t.volume=function(){return this.a.volume};t.Ad=function(a){this.a.volume=a};t.muted=function(){return this.a.muted};t.yd=function(a){this.a.muted=a};t.width=function(){return this.a.offsetWidth};t.height=function(){return this.a.offsetHeight};
  95 +t.Wa=function(){return"function"==typeof this.a.webkitEnterFullScreen&&(/Android/.test(u.J)||!/Chrome|Mac OS X 10.5/.test(u.J))?f:l};t.hc=function(){var a=this.a;a.paused&&a.networkState<=a.Jd?(this.a.play(),setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()};t.bd=function(){this.a.webkitExitFullScreen()};t.src=function(a){this.a.src=a};t.load=function(){this.a.load()};t.currentSrc=function(){return this.a.currentSrc};t.poster=function(){return this.a.poster};
  96 +t.Lb=function(a){this.a.poster=a};t.Sa=function(){return this.a.Sa};t.zd=function(a){this.a.Sa=a};t.autoplay=function(){return this.a.autoplay};t.ud=function(a){this.a.autoplay=a};t.controls=function(){return this.a.controls};t.loop=function(){return this.a.loop};t.xd=function(a){this.a.loop=a};t.error=function(){return this.a.error};t.seeking=function(){return this.a.seeking};t.ended=function(){return this.a.ended};u.g.isSupported=function(){try{u.F.volume=0.5}catch(a){return l}return!!u.F.canPlayType};
  97 +u.g.nb=function(a){try{return!!u.F.canPlayType(a.type)}catch(c){return""}};u.g.Tc=function(){var a=u.F.volume;u.F.volume=a/2+0.1;return a!==u.F.volume};var R,fa=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,ga=/^video\/mp4/i;
  98 +u.g.rc=function(){4<=u.Qb&&(R||(R=u.F.constructor.prototype.canPlayType),u.F.constructor.prototype.canPlayType=function(a){return a&&fa.test(a)?"maybe":R.call(this,a)});u.Mc&&(R||(R=u.F.constructor.prototype.canPlayType),u.F.constructor.prototype.canPlayType=function(a){return a&&ga.test(a)?"maybe":R.call(this,a)})};u.g.Fd=function(){var a=u.F.constructor.prototype.canPlayType;u.F.constructor.prototype.canPlayType=R;R=h;return a};u.g.rc();u.g.bb="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");
  99 +u.g.gc=function(a){if(a){a.player=h;for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(c){}}};
  100 +u.f=u.r.extend({j:function(a,c,d){u.r.call(this,a,c,d);var e=c.source;d=c.parentEl;var g=this.a=u.e("div",{id:a.id()+"_temp_flash"}),j=a.id()+"_flash_api";a=a.h;var k=u.l.B({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.Sa,loop:a.loop,muted:a.muted},c.flashVars),r=u.l.B({wmode:"opaque",bgcolor:"#000000"},c.params),n=u.l.B({id:j,name:j,"class":"vjs-tech"},c.attributes),s;e&&(e.type&&u.f.jd(e.type)?
  101 +(a=u.f.Ac(e.src),k.rtmpConnection=encodeURIComponent(a.qb),k.rtmpStream=encodeURIComponent(a.Mb)):k.src=encodeURIComponent(u.kc(e.src)));this.setCurrentTime=function(a){s=a;this.a.vjs_setProperty("currentTime",a)};this.currentTime=function(){return this.seeking()?s:this.a.vjs_getProperty("currentTime")};u.yb(g,d);c.startTime&&this.I(function(){this.load();this.play();this.currentTime(c.startTime)});u.Ub&&this.I(function(){u.d(this.u(),"mousemove",u.bind(this,function(){this.C().k({type:"mousemove",
  102 +bubbles:l})}))});if(c.iFrameMode===f&&!u.Ub){var D=u.e("iframe",{id:j+"_iframe",name:j+"_iframe",className:"vjs-tech",scrolling:"no",marginWidth:0,marginHeight:0,frameBorder:0});k.readyFunction="ready";k.eventProxyFunction="events";k.errorEventProxyFunction="errors";u.d(D,"load",u.bind(this,function(){var a,d=D.contentWindow;a=D.contentDocument?D.contentDocument:D.contentWindow.document;a.write(u.f.lc(c.swf,k,r,n));d.player=this.c;d.ready=u.bind(this.c,function(c){var d=this.i;d.a=a.getElementById(c);
  103 +u.f.pb(d)});d.events=u.bind(this.c,function(a,c){this&&"flash"===this.xa&&this.k(c)});d.errors=u.bind(this.c,function(a,c){u.log("Flash Error",c)})}));g.parentNode.replaceChild(D,g)}else u.f.$c(c.swf,g,k,r,n)}});t=u.f.prototype;t.dispose=function(){u.r.prototype.dispose.call(this)};t.play=function(){this.a.vjs_play()};t.pause=function(){this.a.vjs_pause()};
  104 +t.src=function(a){if(a===b)return this.currentSrc();u.f.hd(a)?(a=u.f.Ac(a),this.Td(a.qb),this.Ud(a.Mb)):(a=u.kc(a),this.a.vjs_src(a));if(this.c.autoplay()){var c=this;setTimeout(function(){c.play()},0)}};t.currentSrc=function(){var a=this.a.vjs_getProperty("currentSrc");if(a==h){var c=this.rtmpConnection(),d=this.rtmpStream();c&&d&&(a=u.f.Bd(c,d))}return a};t.load=function(){this.a.vjs_load()};t.poster=function(){this.a.vjs_getProperty("poster")};t.Lb=m();t.buffered=function(){return u.sb(0,this.a.vjs_getProperty("buffered"))};
  105 +t.Wa=q(l);t.hc=q(l);var S=u.f.prototype,T="rtmpConnection rtmpStream preload defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),U="error networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" ");function ha(){var a=T[V],c=a.charAt(0).toUpperCase()+a.slice(1);S["set"+c]=function(c){return this.a.vjs_setProperty(a,c)}}
  106 +function W(a){S[a]=function(){return this.a.vjs_getProperty(a)}}var V;for(V=0;V<T.length;V++)W(T[V]),ha();for(V=0;V<U.length;V++)W(U[V]);u.f.isSupported=function(){return 10<=u.f.version()[0]};u.f.nb=function(a){if(!a.type)return"";a=a.type.replace(/;.*/,"").toLowerCase();if(a in u.f.dd||a in u.f.Bc)return"maybe"};u.f.dd={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};u.f.Bc={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};
  107 +u.f.onReady=function(a){a=u.u(a);var c=a.player||a.parentNode.player,d=c.i;a.player=c;d.a=a;u.f.pb(d)};u.f.pb=function(a){a.u().vjs_getProperty?a.za():setTimeout(function(){u.f.pb(a)},50)};u.f.onEvent=function(a,c){u.u(a).player.k(c)};u.f.onError=function(a,c){u.u(a).player.k("error");u.log("Flash Error",c,a)};
  108 +u.f.version=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return a.split(",")};
  109 +u.f.$c=function(a,c,d,e,g){a=u.f.lc(a,d,e,g);a=u.e("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);var j=d.childNodes[0];setTimeout(function(){j.style.display="block"},1E3)};
  110 +u.f.lc=function(a,c,d,e){var g="",j="",k="";c&&u.l.ra(c,function(a,c){g+=a+"="+c+"&amp;"});d=u.l.B({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);u.l.ra(d,function(a,c){j+='<param name="'+a+'" value="'+c+'" />'});e=u.l.B({data:a,width:"100%",height:"100%"},e);u.l.ra(e,function(a,c){k+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash"'+k+">"+j+"</object>"};u.f.Bd=function(a,c){return a+"&"+c};
  111 +u.f.Ac=function(a){var c={qb:"",Mb:""};if(!a)return c;var d=a.indexOf("&"),e;-1!==d?e=d+1:(d=e=a.lastIndexOf("/")+1,0===d&&(d=e=a.length));c.qb=a.substring(0,d);c.Mb=a.substring(e,a.length);return c};u.f.jd=function(a){return a in u.f.Bc};u.f.Oc=/^rtmp[set]?:\/\//i;u.f.hd=function(a){return u.f.Oc.test(a)};
  112 +u.Nc=u.b.extend({j:function(a,c,d){u.b.call(this,a,c,d);if(!a.h.sources||0===a.h.sources.length){c=0;for(d=a.h.techOrder;c<d.length;c++){var e=u.Z(d[c]),g=window.videojs[e];if(g&&g.isSupported()){I(a,e);break}}}else a.src(a.h.sources)}});u.Player.prototype.textTracks=function(){return this.ya=this.ya||[]};function X(a,c,d){for(var e=a.ya,g=0,j=e.length,k,r;g<j;g++)k=e[g],k.id()===c?(k.show(),r=k):d&&(k.H()==d&&0<k.mode())&&k.disable();(c=r?r.H():d?d:l)&&a.k(c+"trackchange")}
  113 +u.w=u.b.extend({j:function(a,c){u.b.call(this,a,c);this.R=c.id||"vjs_"+c.kind+"_"+c.language+"_"+u.s++;this.xc=c.src;this.Xc=c["default"]||c.dflt;this.Dd=c.title;this.Qd=c.srclang;this.kd=c.label;this.$=[];this.kb=[];this.ga=this.ha=0;this.c.d("fullscreenchange",u.bind(this,this.Qc))}});t=u.w.prototype;t.H=p("A");t.src=p("xc");t.tb=p("Xc");t.title=p("Dd");t.label=p("kd");t.Vc=p("$");t.Pc=p("kb");t.readyState=p("ha");t.mode=p("ga");
  114 +t.Qc=function(){this.a.style.fontSize=this.c.isFullScreen()?140*(screen.width/this.c.width())+"%":""};t.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-"+this.A+" vjs-text-track"})};t.show=function(){Y(this);this.ga=2;u.b.prototype.show.call(this)};t.D=function(){Y(this);this.ga=1;u.b.prototype.D.call(this)};
  115 +t.disable=function(){2==this.ga&&this.D();this.c.o("timeupdate",u.bind(this,this.update,this.R));this.c.o("ended",u.bind(this,this.reset,this.R));this.reset();this.c.fa("textTrackDisplay").removeChild(this);this.ga=0};function Y(a){0===a.ha&&a.load();0===a.ga&&(a.c.d("timeupdate",u.bind(a,a.update,a.R)),a.c.d("ended",u.bind(a,a.reset,a.R)),("captions"===a.A||"subtitles"===a.A)&&a.c.fa("textTrackDisplay").Y(a))}
  116 +t.load=function(){0===this.ha&&(this.ha=1,u.get(this.xc,u.bind(this,this.rd),u.bind(this,this.Fb)))};t.Fb=function(a){this.error=a;this.ha=3;this.k("error")};t.rd=function(a){var c,d;a=a.split("\n");for(var e="",g=1,j=a.length;g<j;g++)if(e=u.trim(a[g])){-1==e.indexOf("--\x3e")?(c=e,e=u.trim(a[++g])):c=this.$.length;c={id:c,index:this.$.length};d=e.split(" --\x3e ");c.startTime=ia(d[0]);c.sa=ia(d[1]);for(d=[];a[++g]&&(e=u.trim(a[g]));)d.push(e);c.text=d.join("<br/>");this.$.push(c)}this.ha=2;this.k("loaded")};
  117 +function ia(a){var c=a.split(":");a=0;var d,e,g;3==c.length?(d=c[0],e=c[1],c=c[2]):(d=0,e=c[0],c=c[1]);c=c.split(/\s+/);c=c.splice(0,1)[0];c=c.split(/\.|,/);g=parseFloat(c[1]);c=c[0];a+=3600*parseFloat(d);a+=60*parseFloat(e);a+=parseFloat(c);g&&(a+=g/1E3);return a}
  118 +t.update=function(){if(0<this.$.length){var a=this.c.currentTime();if(this.Kb===b||a<this.Kb||this.Oa<=a){var c=this.$,d=this.c.duration(),e=0,g=l,j=[],k,r,n,s;a>=this.Oa||this.Oa===b?s=this.vb!==b?this.vb:0:(g=f,s=this.Bb!==b?this.Bb:c.length-1);for(;;){n=c[s];if(n.sa<=a)e=Math.max(e,n.sa),n.Ia&&(n.Ia=l);else if(a<n.startTime){if(d=Math.min(d,n.startTime),n.Ia&&(n.Ia=l),!g)break}else g?(j.splice(0,0,n),r===b&&(r=s),k=s):(j.push(n),k===b&&(k=s),r=s),d=Math.min(d,n.sa),e=Math.max(e,n.startTime),n.Ia=
  119 +f;if(g)if(0===s)break;else s--;else if(s===c.length-1)break;else s++}this.kb=j;this.Oa=d;this.Kb=e;this.vb=k;this.Bb=r;a=this.kb;c="";d=0;for(e=a.length;d<e;d++)c+='<span class="vjs-tt-cue">'+a[d].text+"</span>";this.a.innerHTML=c;this.k("cuechange")}}};t.reset=function(){this.Oa=0;this.Kb=this.c.duration();this.Bb=this.vb=0};u.Sb=u.w.extend();u.Sb.prototype.A="captions";u.Zb=u.w.extend();u.Zb.prototype.A="subtitles";u.Tb=u.w.extend();u.Tb.prototype.A="chapters";
  120 +u.ac=u.b.extend({j:function(a,c,d){u.b.call(this,a,c,d);if(a.h.tracks&&0<a.h.tracks.length){c=this.c;a=a.h.tracks;var e;for(d=0;d<a.length;d++){e=a[d];var g=c,j=e.kind,k=e.label,r=e.language,n=e;e=g.ya=g.ya||[];n=n||{};n.kind=j;n.label=k;n.language=r;j=u.Z(j||"subtitles");g=new window.videojs[j+"Track"](g,n);e.push(g)}}}});u.ac.prototype.e=function(){return u.b.prototype.e.call(this,"div",{className:"vjs-text-track-display"})};
  121 +u.X=u.N.extend({j:function(a,c){var d=this.ca=c.track;c.label=d.label();c.selected=d.tb();u.N.call(this,a,c);this.c.d(d.H()+"trackchange",u.bind(this,this.update))}});u.X.prototype.p=function(){u.N.prototype.p.call(this);X(this.c,this.ca.R,this.ca.H())};u.X.prototype.update=function(){this.selected(2==this.ca.mode())};u.eb=u.X.extend({j:function(a,c){c.track={H:function(){return c.kind},C:a,label:function(){return c.kind+" off"},tb:q(l),mode:q(l)};u.X.call(this,a,c);this.selected(f)}});
  122 +u.eb.prototype.p=function(){u.X.prototype.p.call(this);X(this.c,this.ca.R,this.ca.H())};u.eb.prototype.update=function(){for(var a=this.c.textTracks(),c=0,d=a.length,e,g=f;c<d;c++)e=a[c],e.H()==this.ca.H()&&2==e.mode()&&(g=l);this.selected(g)};u.T=u.S.extend({j:function(a,c){u.S.call(this,a,c);1>=this.L.length&&this.D()}});
  123 +u.T.prototype.qa=function(){var a=[],c;a.push(new u.eb(this.c,{kind:this.A}));for(var d=0;d<this.c.textTracks().length;d++)c=this.c.textTracks()[d],c.H()===this.A&&a.push(new u.X(this.c,{track:c}));return a};u.Ba=u.T.extend({j:function(a,c,d){u.T.call(this,a,c,d);this.a.setAttribute("aria-label","Captions Menu")}});u.Ba.prototype.A="captions";u.Ba.prototype.oa="Captions";u.Ba.prototype.className="vjs-captions-button";
  124 +u.Ha=u.T.extend({j:function(a,c,d){u.T.call(this,a,c,d);this.a.setAttribute("aria-label","Subtitles Menu")}});u.Ha.prototype.A="subtitles";u.Ha.prototype.oa="Subtitles";u.Ha.prototype.className="vjs-subtitles-button";u.Ca=u.T.extend({j:function(a,c,d){u.T.call(this,a,c,d);this.a.setAttribute("aria-label","Chapters Menu")}});t=u.Ca.prototype;t.A="chapters";t.oa="Chapters";t.className="vjs-chapters-button";
  125 +t.qa=function(){for(var a=[],c,d=0;d<this.c.textTracks().length;d++)c=this.c.textTracks()[d],c.H()===this.A&&a.push(new u.X(this.c,{track:c}));return a};
  126 +t.Ma=function(){for(var a=this.c.textTracks(),c=0,d=a.length,e,g,j=this.L=[];c<d;c++)if(e=a[c],e.H()==this.A&&e.tb()){if(2>e.readyState()){this.Nd=e;e.d("loaded",u.bind(this,this.Ma));return}g=e;break}a=this.ua=new u.la(this.c);a.a.appendChild(u.e("li",{className:"vjs-menu-title",innerHTML:u.Z(this.A),Cd:-1}));if(g){e=g.$;for(var k,c=0,d=e.length;c<d;c++)k=e[c],k=new u.Za(this.c,{track:g,cue:k}),j.push(k),a.Y(k)}0<this.L.length&&this.show();return a};
  127 +u.Za=u.N.extend({j:function(a,c){var d=this.ca=c.track,e=this.cue=c.cue,g=a.currentTime();c.label=e.text;c.selected=e.startTime<=g&&g<e.sa;u.N.call(this,a,c);d.d("cuechange",u.bind(this,this.update))}});u.Za.prototype.p=function(){u.N.prototype.p.call(this);this.c.currentTime(this.cue.startTime);this.update(this.cue.startTime)};u.Za.prototype.update=function(){var a=this.cue,c=this.c.currentTime();this.selected(a.startTime<=c&&c<a.sa)};
  128 +u.l.B(u.Da.prototype.h.children,{subtitlesButton:{},captionsButton:{},chaptersButton:{}});
  129 +if("undefined"!==typeof window.JSON&&"function"===window.JSON.parse)u.JSON=window.JSON;else{u.JSON={};var Z=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;u.JSON.parse=function(a,c){function d(a,e){var k,r,n=a[e];if(n&&"object"===typeof n)for(k in n)Object.prototype.hasOwnProperty.call(n,k)&&(r=d(n,k),r!==b?n[k]=r:delete n[k]);return c.call(a,e,n)}var e;a=String(a);Z.lastIndex=0;Z.test(a)&&(a=a.replace(Z,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));
  130 +if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}}
  131 +u.dc=function(){var a,c,d=document.getElementsByTagName("video");if(d&&0<d.length)for(var e=0,g=d.length;e<g;e++)if((c=d[e])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==h&&(a=u.JSON.parse(a||"{}"),videojs(c,a)));else{u.lb();break}else u.Ec||u.lb()};u.lb=function(){setTimeout(u.dc,1)};"complete"===document.readyState?u.Ec=f:u.U(window,"load",function(){u.Ec=f});u.lb();u.sd=function(a,c){u.Player.prototype[a]=c};var ja=this;ja.Id=f;function $(a,c){var d=a.split("."),e=ja;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}};$("videojs",u);$("_V_",u);$("videojs.options",u.options);$("videojs.players",u.va);$("videojs.TOUCH_ENABLED",u.$b);$("videojs.cache",u.pa);$("videojs.Component",u.b);u.b.prototype.player=u.b.prototype.C;u.b.prototype.options=u.b.prototype.options;u.b.prototype.init=u.b.prototype.j;u.b.prototype.dispose=u.b.prototype.dispose;u.b.prototype.createEl=u.b.prototype.e;u.b.prototype.contentEl=u.b.prototype.La;u.b.prototype.el=u.b.prototype.u;u.b.prototype.addChild=u.b.prototype.Y;
  132 +u.b.prototype.getChild=u.b.prototype.fa;u.b.prototype.getChildById=u.b.prototype.ed;u.b.prototype.children=u.b.prototype.children;u.b.prototype.initChildren=u.b.prototype.nc;u.b.prototype.removeChild=u.b.prototype.removeChild;u.b.prototype.on=u.b.prototype.d;u.b.prototype.off=u.b.prototype.o;u.b.prototype.one=u.b.prototype.U;u.b.prototype.trigger=u.b.prototype.k;u.b.prototype.triggerReady=u.b.prototype.za;u.b.prototype.show=u.b.prototype.show;u.b.prototype.hide=u.b.prototype.D;
  133 +u.b.prototype.width=u.b.prototype.width;u.b.prototype.height=u.b.prototype.height;u.b.prototype.dimensions=u.b.prototype.Yc;u.b.prototype.ready=u.b.prototype.I;u.b.prototype.addClass=u.b.prototype.n;u.b.prototype.removeClass=u.b.prototype.t;u.b.prototype.buildCSSClass=u.b.prototype.Q;u.Player.prototype.ended=u.Player.prototype.ended;$("videojs.MediaLoader",u.Nc);$("videojs.TextTrackDisplay",u.ac);$("videojs.ControlBar",u.Da);$("videojs.Button",u.q);$("videojs.PlayToggle",u.Xb);
  134 +$("videojs.FullscreenToggle",u.Ea);$("videojs.BigPlayButton",u.Ya);$("videojs.LoadingSpinner",u.Vb);$("videojs.CurrentTimeDisplay",u.$a);$("videojs.DurationDisplay",u.ab);$("videojs.TimeDivider",u.bc);$("videojs.RemainingTimeDisplay",u.gb);$("videojs.Slider",u.O);$("videojs.ProgressControl",u.fb);$("videojs.SeekBar",u.Yb);$("videojs.LoadProgressBar",u.cb);$("videojs.PlayProgressBar",u.Wb);$("videojs.SeekHandle",u.Ga);$("videojs.VolumeControl",u.ib);$("videojs.VolumeBar",u.hb);
  135 +$("videojs.VolumeLevel",u.cc);$("videojs.VolumeMenuButton",u.ma);$("videojs.VolumeHandle",u.jb);$("videojs.MuteToggle",u.ea);$("videojs.PosterImage",u.Fa);$("videojs.Menu",u.la);$("videojs.MenuItem",u.N);$("videojs.MenuButton",u.S);u.S.prototype.createItems=u.S.prototype.qa;u.T.prototype.createItems=u.T.prototype.qa;u.Ca.prototype.createItems=u.Ca.prototype.qa;$("videojs.SubtitlesButton",u.Ha);$("videojs.CaptionsButton",u.Ba);$("videojs.ChaptersButton",u.Ca);$("videojs.MediaTechController",u.r);
  136 +u.r.prototype.features=u.r.prototype.m;u.r.prototype.m.volumeControl=u.r.prototype.m.Dc;u.r.prototype.m.fullscreenResize=u.r.prototype.m.Od;u.r.prototype.m.progressEvents=u.r.prototype.m.Sd;u.r.prototype.m.timeupdateEvents=u.r.prototype.m.Vd;u.r.prototype.setPoster=u.r.prototype.Lb;$("videojs.Html5",u.g);u.g.Events=u.g.bb;u.g.isSupported=u.g.isSupported;u.g.canPlaySource=u.g.nb;u.g.patchCanPlayType=u.g.rc;u.g.unpatchCanPlayType=u.g.Fd;u.g.prototype.setCurrentTime=u.g.prototype.vd;
  137 +u.g.prototype.setVolume=u.g.prototype.Ad;u.g.prototype.setMuted=u.g.prototype.yd;u.g.prototype.setPreload=u.g.prototype.zd;u.g.prototype.setAutoplay=u.g.prototype.ud;u.g.prototype.setLoop=u.g.prototype.xd;u.g.prototype.enterFullScreen=u.g.prototype.hc;u.g.prototype.exitFullScreen=u.g.prototype.bd;$("videojs.Flash",u.f);u.f.isSupported=u.f.isSupported;u.f.canPlaySource=u.f.nb;u.f.onReady=u.f.onReady;$("videojs.TextTrack",u.w);u.w.prototype.label=u.w.prototype.label;u.w.prototype.kind=u.w.prototype.H;
  138 +u.w.prototype.mode=u.w.prototype.mode;u.w.prototype.cues=u.w.prototype.Vc;u.w.prototype.activeCues=u.w.prototype.Pc;$("videojs.CaptionsTrack",u.Sb);$("videojs.SubtitlesTrack",u.Zb);$("videojs.ChaptersTrack",u.Tb);$("videojs.autoSetup",u.dc);$("videojs.plugin",u.sd);$("videojs.createTimeRange",u.sb);$("videojs.util",u.ja);u.ja.mergeOptions=u.ja.Eb;})();
  139 +!function(t,a,e,n,m){m=a.location,t.src="//www.google-analytics.com/__utm.gif?utmwv=5.4.2&utmac=UA-16505296-2&utmn=1&utmhn="+n(m.hostname)+"&utmsr="+a.screen.availWidth+"x"+a.screen.availHeight+"&utmul="+(e.language||e.userLanguage||"").toLowerCase()+"&utmr="+n(m.href)+"&utmp="+n(m.hostname+m.pathname)+"&utmcc=__utma%3D1."+Math.floor(1e10*Math.random())+".1.1.1.1%3B"+"&utme=8(vjsv)9(v4.5.1)"}(new Image,window,navigator,encodeURIComponent);
0 140 \ No newline at end of file
... ...
plugins/video/public/javascripts/videojs/video-4.8.5.js 0 → 100644
... ... @@ -0,0 +1,161 @@
  1 +/*! Video.js v4.8.5 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */
  2 +(function() {var b=void 0,f=!0,k=null,l=!1;function m(){return function(){}}function p(a){return function(){return this[a]}}function r(a){return function(){return a}}var s;document.createElement("video");document.createElement("audio");document.createElement("track");function t(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(t.Ba[a])return t.Ba[a];a=t.v(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new t.Player(a,c,d)}
  3 +var videojs=window.videojs=t;t.Tb="4.8";t.Rc="https:"==document.location.protocol?"https://":"http://";
  4 +t.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2E3,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},errorDisplay:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.ve||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."};
  5 +"GENERATED_CDN_VSN"!==t.Tb&&(videojs.options.flash.swf=t.Rc+"vjs.zencdn.net/"+t.Tb+"/video-js.swf");t.cd=function(a,c){t.options.languages[a]=t.options.languages[a]!==b?t.ga.Ua(t.options.languages[a],c):c;return t.options.languages};t.Ba={};"function"===typeof define&&define.amd?define([],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);t.qa=t.CoreObject=m();
  6 +t.qa.extend=function(a){var c,d;a=a||{};c=a.init||a.i||this.prototype.init||this.prototype.i||m();d=function(){c.apply(this,arguments)};d.prototype=t.h.create(this.prototype);d.prototype.constructor=d;d.extend=t.qa.extend;d.create=t.qa.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};t.qa.create=function(){var a=t.h.create(this.prototype);this.apply(a,arguments);return a};
  7 +t.d=function(a,c,d){if(t.h.isArray(c))return u(t.d,a,c,d);var e=t.getData(a);e.C||(e.C={});e.C[c]||(e.C[c]=[]);d.w||(d.w=t.w++);e.C[c].push(d);e.X||(e.disabled=l,e.X=function(c){if(!e.disabled){c=t.oc(c);var d=e.C[c.type];if(d)for(var d=d.slice(0),j=0,n=d.length;j<n&&!c.vc();j++)d[j].call(a,c)}});1==e.C[c].length&&(a.addEventListener?a.addEventListener(c,e.X,l):a.attachEvent&&a.attachEvent("on"+c,e.X))};
  8 +t.o=function(a,c,d){if(t.rc(a)){var e=t.getData(a);if(e.C){if(t.h.isArray(c))return u(t.o,a,c,d);if(c){var g=e.C[c];if(g){if(d){if(d.w)for(e=0;e<g.length;e++)g[e].w===d.w&&g.splice(e--,1)}else e.C[c]=[];t.ic(a,c)}}else for(g in e.C)c=g,e.C[c]=[],t.ic(a,c)}}};t.ic=function(a,c){var d=t.getData(a);0===d.C[c].length&&(delete d.C[c],a.removeEventListener?a.removeEventListener(c,d.X,l):a.detachEvent&&a.detachEvent("on"+c,d.X));t.Gb(d.C)&&(delete d.C,delete d.X,delete d.disabled);t.Gb(d)&&t.Ec(a)};
  9 +t.oc=function(a){function c(){return f}function d(){return l}if(!a||!a.Hb){var e=a||window.event;a={};for(var g in e)"layerX"!==g&&("layerY"!==g&&"keyboardEvent.keyLocation"!==g)&&("returnValue"==g&&e.preventDefault||(a[g]=e[g]));a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=l;a.yd=c;a.defaultPrevented=f};a.yd=d;a.defaultPrevented=l;a.stopPropagation=function(){e.stopPropagation&&
  10 +e.stopPropagation();a.cancelBubble=f;a.Hb=c};a.Hb=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation();a.vc=c;a.stopPropagation()};a.vc=d;if(a.clientX!=k){g=document.documentElement;var h=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||h&&h.scrollLeft||0)-(g&&g.clientLeft||h&&h.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||h&&h.scrollTop||0)-(g&&g.clientTop||h&&h.clientTop||0)}a.which=a.charCode||a.keyCode;a.button!=k&&(a.button=a.button&1?0:a.button&
  11 +4?1:a.button&2?2:0)}return a};t.k=function(a,c){var d=t.rc(a)?t.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=t.oc(c);d.X&&d.X.call(a,c);if(e&&!c.Hb()&&c.bubbles!==l)t.k(e,c);else if(!e&&!c.defaultPrevented&&(d=t.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=l}return!c.defaultPrevented};
  12 +t.O=function(a,c,d){function e(){t.o(a,c,e);d.apply(this,arguments)}if(t.h.isArray(c))return u(t.O,a,c,d);e.w=d.w=d.w||t.w++;t.d(a,c,e)};function u(a,c,d,e){t.gc.forEach(d,function(d){a(c,d,e)})}var v=Object.prototype.hasOwnProperty;t.e=function(a,c){var d;c=c||{};d=document.createElement(a||"div");t.h.Y(c,function(a,c){-1!==a.indexOf("aria-")||"role"==a?d.setAttribute(a,c):d[a]=c});return d};t.aa=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};t.h={};
  13 +t.h.create=Object.create||function(a){function c(){}c.prototype=a;return new c};t.h.Y=function(a,c,d){for(var e in a)v.call(a,e)&&c.call(d||this,e,a[e])};t.h.z=function(a,c){if(!c)return a;for(var d in c)v.call(c,d)&&(a[d]=c[d]);return a};t.h.md=function(a,c){var d,e,g;a=t.h.copy(a);for(d in c)v.call(c,d)&&(e=a[d],g=c[d],a[d]=t.h.Sa(e)&&t.h.Sa(g)?t.h.md(e,g):c[d]);return a};t.h.copy=function(a){return t.h.z({},a)};
  14 +t.h.Sa=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};t.h.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};t.Ad=function(a){return a!==a};t.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.w||(c.w=t.w++);e.w=d?d+"_"+c.w:c.w;return e};t.ua={};t.w=1;t.expando="vdata"+(new Date).getTime();t.getData=function(a){var c=a[t.expando];c||(c=a[t.expando]=t.w++,t.ua[c]={});return t.ua[c]};
  15 +t.rc=function(a){a=a[t.expando];return!(!a||t.Gb(t.ua[a]))};t.Ec=function(a){var c=a[t.expando];if(c){delete t.ua[c];try{delete a[t.expando]}catch(d){a.removeAttribute?a.removeAttribute(t.expando):a[t.expando]=k}}};t.Gb=function(a){for(var c in a)if(a[c]!==k)return l;return f};t.n=function(a,c){-1==(" "+a.className+" ").indexOf(" "+c+" ")&&(a.className=""===a.className?c:a.className+" "+c)};
  16 +t.p=function(a,c){var d,e;if(-1!=a.className.indexOf(c)){d=a.className.split(" ");for(e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};t.A=t.e("video");t.L=navigator.userAgent;t.Xc=/iPhone/i.test(t.L);t.Wc=/iPad/i.test(t.L);t.Yc=/iPod/i.test(t.L);t.Vc=t.Xc||t.Wc||t.Yc;var aa=t,x;var y=t.L.match(/OS (\d+)_/i);x=y&&y[1]?y[1]:b;aa.ke=x;t.Tc=/Android/i.test(t.L);var ba=t,z;var A=t.L.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),B,C;
  17 +A?(B=A[1]&&parseFloat(A[1]),C=A[2]&&parseFloat(A[2]),z=B&&C?parseFloat(A[1]+"."+A[2]):B?B:k):z=k;ba.Sb=z;t.Zc=t.Tc&&/webkit/i.test(t.L)&&2.3>t.Sb;t.Uc=/Firefox/i.test(t.L);t.le=/Chrome/i.test(t.L);t.cc=!!("ontouchstart"in window||window.Sc&&document instanceof window.Sc);t.Gc=function(a,c){t.h.Y(c,function(c,e){e===k||"undefined"===typeof e||e===l?a.removeAttribute(c):a.setAttribute(c,e===f?"":e)})};
  18 +t.za=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0<a.attributes.length){d=a.attributes;for(var h=d.length-1;0<=h;h--){e=d[h].name;g=d[h].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==k?f:l;c[e]=g}}return c};
  19 +t.re=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};t.Fb=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};t.Oa={};t.v=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};
  20 +t.ya=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),h=Math.floor(c/60%60),j=Math.floor(c/3600);if(isNaN(a)||Infinity===a)g=e=d="-";g=0<g||0<j?g+":":"";return g+(((g||10<=h)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};t.fd=function(){document.body.focus();document.onselectstart=r(l)};t.ge=function(){document.onselectstart=r(f)};t.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};t.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};
  21 +t.yb=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}};
  22 +t.get=function(a,c,d,e){var g,h,j,n;d=d||m();"undefined"===typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");});h=new XMLHttpRequest;j=t.Td(a);n=window.location;j.protocol+j.host!==n.protocol+n.host&&window.XDomainRequest&&!("withCredentials"in
  23 +h)?(h=new window.XDomainRequest,h.onload=function(){c(h.responseText)},h.onerror=d,h.onprogress=m(),h.ontimeout=d):(g="file:"==j.protocol||"file:"==n.protocol,h.onreadystatechange=function(){4===h.readyState&&(200===h.status||g&&0===h.status?c(h.responseText):d(h.responseText))});try{h.open("GET",a,f),e&&(h.withCredentials=f)}catch(q){d(q);return}try{h.send()}catch(w){d(w)}};
  24 +t.Xd=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?t.log("LocalStorage Full (VideoJS)",d):18==d.code?t.log("LocalStorage not allowed (VideoJS)",d):t.log("LocalStorage Error (VideoJS)",d)}};t.qc=function(a){a.match(/^https?:\/\//)||(a=t.e("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};
  25 +t.Td=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=t.e("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=t.e("div"),c.innerHTML='<a href="'+a+'"></a>',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;h<g.length;h++)a[g[h]]=d[g[h]];e&&document.body.removeChild(c);return a};
  26 +function D(a,c){var d,e;d=Array.prototype.slice.call(c);e=m();e=window.console||{log:e,warn:e,error:e};a?d.unshift(a.toUpperCase()+":"):a="log";t.log.history.push(d);d.unshift("VIDEOJS:");if(e[a].apply)e[a].apply(e,d);else e[a](d.join(" "))}t.log=function(){D(k,arguments)};t.log.history=[];t.log.error=function(){D("error",arguments)};t.log.warn=function(){D("warn",arguments)};
  27 +t.ud=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:t.round(c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0)),top:t.round(c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0))}};t.gc={};t.gc.forEach=function(a,c,d){if(t.h.isArray(a)&&c instanceof Function)for(var e=0,g=a.length;e<g;++e)c.call(d||t,a[e],e,a);return a};t.ga={};
  28 +t.ga.Ua=function(a,c){var d,e,g;a=t.h.copy(a);for(d in c)c.hasOwnProperty(d)&&(e=a[d],g=c[d],a[d]=t.h.Sa(e)&&t.h.Sa(g)?t.ga.Ua(e,g):c[d]);return a};
  29 +t.a=t.qa.extend({i:function(a,c,d){this.c=a;this.l=t.h.copy(this.l);c=this.options(c);this.U=c.id||(c.el&&c.el.id?c.el.id:a.id()+"_component_"+t.w++);this.Gd=c.name||k;this.b=c.el||this.e();this.M=[];this.Pa={};this.Qa={};this.tc();this.I(d);if(c.Fc!==l){var e,g;e=t.bind(this.j(),this.j().reportUserActivity);this.d("touchstart",function(){e();clearInterval(g);g=setInterval(e,250)});a=function(){e();clearInterval(g)};this.d("touchmove",e);this.d("touchend",a);this.d("touchcancel",a)}}});s=t.a.prototype;
  30 +s.dispose=function(){this.k({type:"dispose",bubbles:l});if(this.M)for(var a=this.M.length-1;0<=a;a--)this.M[a].dispose&&this.M[a].dispose();this.Qa=this.Pa=this.M=k;this.o();this.b.parentNode&&this.b.parentNode.removeChild(this.b);t.Ec(this.b);this.b=k};s.c=f;s.j=p("c");s.options=function(a){return a===b?this.l:this.l=t.ga.Ua(this.l,a)};s.e=function(a,c){return t.e(a,c)};s.s=function(a){var c=this.c.language(),d=this.c.languages();return d&&d[c]&&d[c][a]?d[c][a]:a};s.v=p("b");
  31 +s.ja=function(){return this.u||this.b};s.id=p("U");s.name=p("Gd");s.children=p("M");s.wd=function(a){return this.Pa[a]};s.ka=function(a){return this.Qa[a]};s.R=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||t.aa(e),c.name=e,d=new window.videojs[d](this.c||this,c)):d=a;this.M.push(d);"function"===typeof d.id&&(this.Pa[d.id()]=d);(e=e||d.name&&d.name())&&(this.Qa[e]=d);"function"===typeof d.el&&d.el()&&this.ja().appendChild(d.el());return d};
  32 +s.removeChild=function(a){"string"===typeof a&&(a=this.ka(a));if(a&&this.M){for(var c=l,d=this.M.length-1;0<=d;d--)if(this.M[d]===a){c=f;this.M.splice(d,1);break}c&&(this.Pa[a.id]=k,this.Qa[a.name]=k,(c=a.v())&&c.parentNode===this.ja()&&this.ja().removeChild(a.v()))}};s.tc=function(){var a,c,d,e;a=this;if(c=this.options().children)if(t.h.isArray(c))for(var g=0;g<c.length;g++)d=c[g],"string"==typeof d?(e=d,d={}):e=d.name,a[e]=a.R(e,d);else t.h.Y(c,function(c,d){d!==l&&(a[c]=a.R(c,d))})};s.T=r("");
  33 +s.d=function(a,c){t.d(this.b,a,t.bind(this,c));return this};s.o=function(a,c){t.o(this.b,a,c);return this};s.O=function(a,c){t.O(this.b,a,t.bind(this,c));return this};s.k=function(a){t.k(this.b,a);return this};s.I=function(a){a&&(this.la?a.call(this):(this.$a===b&&(this.$a=[]),this.$a.push(a)));return this};s.Fa=function(){this.la=f;var a=this.$a;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.$a=[];this.k("ready")}};s.n=function(a){t.n(this.b,a);return this};
  34 +s.p=function(a){t.p(this.b,a);return this};s.show=function(){this.b.style.display="block";return this};s.W=function(){this.b.style.display="none";return this};function E(a){a.p("vjs-lock-showing")}s.disable=function(){this.W();this.show=m()};s.width=function(a,c){return F(this,"width",a,c)};s.height=function(a,c){return F(this,"height",a,c)};s.pd=function(a,c){return this.width(a,f).height(c)};
  35 +function F(a,c,d,e){if(d!==b){if(d===k||t.Ad(d))d=0;a.b.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px";e||a.k("resize");return a}if(!a.b)return 0;d=a.b.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.b["offset"+t.aa(c)],10)}
  36 +function G(a){var c,d,e,g,h,j,n,q;c=0;d=k;a.d("touchstart",function(a){1===a.touches.length&&(d=a.touches[0],c=(new Date).getTime(),g=f)});a.d("touchmove",function(a){1<a.touches.length?g=l:d&&(j=a.touches[0].pageX-d.pageX,n=a.touches[0].pageY-d.pageY,q=Math.sqrt(j*j+n*n),22<q&&(g=l))});h=function(){g=l};a.d("touchleave",h);a.d("touchcancel",h);a.d("touchend",function(a){d=k;g===f&&(e=(new Date).getTime()-c,250>e&&(a.preventDefault(),this.k("tap")))})}
  37 +t.t=t.a.extend({i:function(a,c){t.a.call(this,a,c);G(this);this.d("tap",this.r);this.d("click",this.r);this.d("focus",this.Xa);this.d("blur",this.Wa)}});s=t.t.prototype;
  38 +s.e=function(a,c){var d;c=t.h.z({className:this.T(),role:"button","aria-live":"polite",tabIndex:0},c);d=t.a.prototype.e.call(this,a,c);c.innerHTML||(this.u=t.e("div",{className:"vjs-control-content"}),this.wb=t.e("span",{className:"vjs-control-text",innerHTML:this.s(this.ta)||"Need Text"}),this.u.appendChild(this.wb),d.appendChild(this.u));return d};s.T=function(){return"vjs-control "+t.a.prototype.T.call(this)};s.r=m();s.Xa=function(){t.d(document,"keydown",t.bind(this,this.da))};
  39 +s.da=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.r()};s.Wa=function(){t.o(document,"keydown",t.bind(this,this.da))};
  40 +t.Q=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.ed=this.ka(this.l.barName);this.handle=this.ka(this.l.handleName);this.d("mousedown",this.Ya);this.d("touchstart",this.Ya);this.d("focus",this.Xa);this.d("blur",this.Wa);this.d("click",this.r);this.c.d("controlsvisible",t.bind(this,this.update));a.d(this.Ac,t.bind(this,this.update));this.S={};this.S.move=t.bind(this,this.Za);this.S.end=t.bind(this,this.Kb)}});s=t.Q.prototype;
  41 +s.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=t.h.z({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return t.a.prototype.e.call(this,a,c)};s.Ya=function(a){a.preventDefault();t.fd();this.n("vjs-sliding");t.d(document,"mousemove",this.S.move);t.d(document,"mouseup",this.S.end);t.d(document,"touchmove",this.S.move);t.d(document,"touchend",this.S.end);this.Za(a)};s.Za=m();
  42 +s.Kb=function(){t.ge();this.p("vjs-sliding");t.o(document,"mousemove",this.S.move,l);t.o(document,"mouseup",this.S.end,l);t.o(document,"touchmove",this.S.move,l);t.o(document,"touchend",this.S.end,l);this.update()};s.update=function(){if(this.b){var a,c=this.Eb(),d=this.handle,e=this.ed;isNaN(c)&&(c=0);a=c;if(d){a=this.b.offsetWidth;var g=d.v().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.v().style.left=t.round(100*c,2)+"%"}e&&(e.v().style.width=t.round(100*a,2)+"%")}};
  43 +function H(a,c){var d,e,g,h;d=a.b;e=t.ud(d);h=g=d.offsetWidth;d=a.handle;if(a.options().vertical)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.v().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.v().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}s.Xa=function(){t.d(document,"keyup",t.bind(this,this.da))};
  44 +s.da=function(a){if(37==a.which||40==a.which)a.preventDefault(),this.Jc();else if(38==a.which||39==a.which)a.preventDefault(),this.Kc()};s.Wa=function(){t.o(document,"keyup",t.bind(this,this.da))};s.r=function(a){a.stopImmediatePropagation();a.preventDefault()};t.Z=t.a.extend();t.Z.prototype.defaultValue=0;
  45 +t.Z.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=t.h.z({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},c);return t.a.prototype.e.call(this,"div",c)};t.ha=t.a.extend();function ca(a,c){a.R(c);c.d("click",t.bind(a,function(){E(this)}))}
  46 +t.ha.prototype.e=function(){var a=this.options().jc||"ul";this.u=t.e(a,{className:"vjs-menu-content"});a=t.a.prototype.e.call(this,"div",{append:this.u,className:"vjs-menu"});a.appendChild(this.u);t.d(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};t.H=t.t.extend({i:function(a,c){t.t.call(this,a,c);this.selected(c.selected)}});t.H.prototype.e=function(a,c){return t.t.prototype.e.call(this,"li",t.h.z({className:"vjs-menu-item",innerHTML:this.l.label},c))};
  47 +t.H.prototype.r=function(){this.selected(f)};t.H.prototype.selected=function(a){a?(this.n("vjs-selected"),this.b.setAttribute("aria-selected",f)):(this.p("vjs-selected"),this.b.setAttribute("aria-selected",l))};t.K=t.t.extend({i:function(a,c){t.t.call(this,a,c);this.Aa=this.wa();this.R(this.Aa);this.N&&0===this.N.length&&this.W();this.d("keyup",this.da);this.b.setAttribute("aria-haspopup",f);this.b.setAttribute("role","button")}});s=t.K.prototype;s.sa=l;
  48 +s.wa=function(){var a=new t.ha(this.c);this.options().title&&a.ja().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.aa(this.options().title),de:-1}));if(this.N=this.createItems())for(var c=0;c<this.N.length;c++)ca(a,this.N[c]);return a};s.va=m();s.T=function(){return this.className+" vjs-menu-button "+t.t.prototype.T.call(this)};s.Xa=m();s.Wa=m();s.r=function(){this.O("mouseout",t.bind(this,function(){E(this.Aa);this.b.blur()}));this.sa?I(this):J(this)};
  49 +s.da=function(a){a.preventDefault();32==a.which||13==a.which?this.sa?I(this):J(this):27==a.which&&this.sa&&I(this)};function J(a){a.sa=f;a.Aa.n("vjs-lock-showing");a.b.setAttribute("aria-pressed",f);a.N&&0<a.N.length&&a.N[0].v().focus()}function I(a){a.sa=l;E(a.Aa);a.b.setAttribute("aria-pressed",l)}t.D=function(a){"number"===typeof a?this.code=a:"string"===typeof a?this.message=a:"object"===typeof a&&t.h.z(this,a);this.message||(this.message=t.D.nd[this.code]||"")};t.D.prototype.code=0;
  50 +t.D.prototype.message="";t.D.prototype.status=k;t.D.Ra="MEDIA_ERR_CUSTOM MEDIA_ERR_ABORTED MEDIA_ERR_NETWORK MEDIA_ERR_DECODE MEDIA_ERR_SRC_NOT_SUPPORTED MEDIA_ERR_ENCRYPTED".split(" ");
  51 +t.D.nd={1:"You aborted the video playback",2:"A network error caused the video download to fail part-way.",3:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",4:"The video could not be loaded, either because the server or network failed or because the format is not supported.",5:"The video is encrypted and we do not have the keys to decrypt it."};for(var K=0;K<t.D.Ra.length;K++)t.D[t.D.Ra[K]]=K,t.D.prototype[t.D.Ra[K]]=K;
  52 +var L,M,N,O;
  53 +L=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")];
  54 +M=L[0];for(O=0;O<L.length;O++)if(L[O][1]in document){N=L[O];break}if(N){t.Oa.Db={};for(O=0;O<N.length;O++)t.Oa.Db[M[O]]=N[O]}
  55 +t.Player=t.a.extend({i:function(a,c,d){this.P=a;a.id=a.id||"vjs_video_"+t.w++;this.ee=a&&t.za(a);c=t.h.z(da(a),c);this.Ta=c.language||t.options.language;this.Ed=c.languages||t.options.languages;this.F={};this.Bc=c.poster;this.xb=c.controls;a.controls=l;c.Fc=l;t.a.call(this,this,c,d);this.controls()?this.n("vjs-controls-enabled"):this.n("vjs-controls-disabled");t.Ba[this.U]=this;c.plugins&&t.h.Y(c.plugins,function(a,c){this[a](c)},this);var e,g,h,j,n,q;e=t.bind(this,this.reportUserActivity);this.d("mousedown",
  56 +function(){e();clearInterval(g);g=setInterval(e,250)});this.d("mousemove",function(a){if(a.screenX!=n||a.screenY!=q)n=a.screenX,q=a.screenY,e()});this.d("mouseup",function(){e();clearInterval(g)});this.d("keydown",e);this.d("keyup",e);h=setInterval(t.bind(this,function(){if(this.pa){this.pa=l;this.userActive(f);clearTimeout(j);var a=this.options().inactivityTimeout;0<a&&(j=setTimeout(t.bind(this,function(){this.pa||this.userActive(l)}),a))}}),250);this.d("dispose",function(){clearInterval(h);clearTimeout(j)})}});
  57 +s=t.Player.prototype;s.language=function(a){if(a===b)return this.Ta;this.Ta=a;return this};s.languages=p("Ed");s.l=t.options;s.dispose=function(){this.k("dispose");this.o("dispose");t.Ba[this.U]=k;this.P&&this.P.player&&(this.P.player=k);this.b&&this.b.player&&(this.b.player=k);this.m&&this.m.dispose();t.a.prototype.dispose.call(this)};
  58 +function da(a){var c={sources:[],tracks:[]};t.h.z(c,t.za(a));if(a.hasChildNodes()){var d,e,g,h;a=a.childNodes;g=0;for(h=a.length;g<h;g++)d=a[g],e=d.nodeName.toLowerCase(),"source"===e?c.sources.push(t.za(d)):"track"===e&&c.tracks.push(t.za(d))}return c}
  59 +s.e=function(){var a=this.b=t.a.prototype.e.call(this,"div"),c=this.P,d;c.removeAttribute("width");c.removeAttribute("height");if(c.hasChildNodes()){var e,g,h,j,n;e=c.childNodes;g=e.length;for(n=[];g--;)h=e[g],j=h.nodeName.toLowerCase(),"track"===j&&n.push(h);for(e=0;e<n.length;e++)c.removeChild(n[e])}d=t.za(c);t.h.Y(d,function(c){a.setAttribute(c,d[c])});c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.n("vjs-paused");this.width(this.l.width,f);this.height(this.l.height,f);c.parentNode&&
  60 +c.parentNode.insertBefore(a,c);t.Fb(c,a);this.b=a;this.d("loadstart",this.Ld);this.d("waiting",this.Rd);this.d(["canplay","canplaythrough","playing","ended"],this.Qd);this.d("seeking",this.Od);this.d("seeked",this.Nd);this.d("ended",this.Hd);this.d("play",this.Mb);this.d("firstplay",this.Jd);this.d("pause",this.Lb);this.d("progress",this.Md);this.d("durationchange",this.yc);this.d("fullscreenchange",this.Kd);return a};
  61 +function P(a,c,d){a.m&&(a.la=l,a.m.dispose(),a.m=l);"Html5"!==c&&a.P&&(t.g.Ab(a.P),a.P=k);a.cb=c;a.la=l;var e=t.h.z({source:d,parentEl:a.b},a.l[c.toLowerCase()]);d&&(a.lc=d.type,d.src==a.F.src&&0<a.F.currentTime&&(e.startTime=a.F.currentTime),a.F.src=d.src);a.m=new window.videojs[c](a,e);a.m.I(function(){this.c.Fa()})}s.Ld=function(){this.error(k);this.paused()?(Q(this,l),this.O("play",function(){Q(this,f)})):this.k("firstplay")};s.sc=l;
  62 +function Q(a,c){c!==b&&a.sc!==c&&((a.sc=c)?(a.n("vjs-has-started"),a.k("firstplay")):a.p("vjs-has-started"))}s.Mb=function(){this.p("vjs-paused");this.n("vjs-playing")};s.Rd=function(){this.n("vjs-waiting")};s.Qd=function(){this.p("vjs-waiting")};s.Od=function(){this.n("vjs-seeking")};s.Nd=function(){this.p("vjs-seeking")};s.Jd=function(){this.l.starttime&&this.currentTime(this.l.starttime);this.n("vjs-has-started")};s.Lb=function(){this.p("vjs-playing");this.n("vjs-paused")};
  63 +s.Md=function(){1==this.bufferedPercent()&&this.k("loadedalldata")};s.Hd=function(){this.l.loop?(this.currentTime(0),this.play()):this.paused()||this.pause()};s.yc=function(){var a=R(this,"duration");a&&(0>a&&(a=Infinity),this.duration(a),Infinity===a?this.n("vjs-live"):this.p("vjs-live"))};s.Kd=function(){this.isFullscreen()?this.n("vjs-fullscreen"):this.p("vjs-fullscreen")};function S(a,c,d){if(a.m&&!a.m.la)a.m.I(function(){this[c](d)});else try{a.m[c](d)}catch(e){throw t.log(e),e;}}
  64 +function R(a,c){if(a.m&&a.m.la)try{return a.m[c]()}catch(d){throw a.m[c]===b?t.log("Video.js: "+c+" method not defined for "+a.cb+" playback technology.",d):"TypeError"==d.name?(t.log("Video.js: "+c+" unavailable on "+a.cb+" playback technology element.",d),a.m.la=l):t.log(d),d;}}s.play=function(){S(this,"play");return this};s.pause=function(){S(this,"pause");return this};s.paused=function(){return R(this,"paused")===l?l:f};
  65 +s.currentTime=function(a){return a!==b?(S(this,"setCurrentTime",a),this):this.F.currentTime=R(this,"currentTime")||0};s.duration=function(a){if(a!==b)return this.F.duration=parseFloat(a),this;this.F.duration===b&&this.yc();return this.F.duration||0};s.remainingTime=function(){return this.duration()-this.currentTime()};s.buffered=function(){var a=R(this,"buffered");if(!a||!a.length)a=t.yb(0,0);return a};
  66 +s.bufferedPercent=function(){var a=this.duration(),c=this.buffered(),d=0,e,g;if(!a)return 0;for(var h=0;h<c.length;h++)e=c.start(h),g=c.end(h),g>a&&(g=a),d+=g-e;return d/a};s.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.F.volume=a,S(this,"setVolume",a),t.Xd(a),this;a=parseFloat(R(this,"volume"));return isNaN(a)?1:a};s.muted=function(a){return a!==b?(S(this,"setMuted",a),this):R(this,"muted")||l};s.Da=function(){return R(this,"supportsFullScreen")||l};s.uc=l;
  67 +s.isFullscreen=function(a){return a!==b?(this.uc=!!a,this):this.uc};s.isFullScreen=function(a){t.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)};
  68 +s.requestFullscreen=function(){var a=t.Oa.Db;this.isFullscreen(f);a?(t.d(document,a.fullscreenchange,t.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===l&&t.o(document,a.fullscreenchange,arguments.callee);this.k("fullscreenchange")})),this.b[a.requestFullscreen]()):this.m.Da()?S(this,"enterFullScreen"):(this.nc(),this.k("fullscreenchange"));return this};
  69 +s.requestFullScreen=function(){t.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")');return this.requestFullscreen()};s.exitFullscreen=function(){var a=t.Oa.Db;this.isFullscreen(l);if(a)document[a.exitFullscreen]();else this.m.Da()?S(this,"exitFullScreen"):(this.Bb(),this.k("fullscreenchange"));return this};s.cancelFullScreen=function(){t.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()");return this.exitFullscreen()};
  70 +s.nc=function(){this.zd=f;this.qd=document.documentElement.style.overflow;t.d(document,"keydown",t.bind(this,this.pc));document.documentElement.style.overflow="hidden";t.n(document.body,"vjs-full-window");this.k("enterFullWindow")};s.pc=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():this.Bb())};s.Bb=function(){this.zd=l;t.o(document,"keydown",this.pc);document.documentElement.style.overflow=this.qd;t.p(document.body,"vjs-full-window");this.k("exitFullWindow")};
  71 +s.selectSource=function(a){for(var c=0,d=this.l.techOrder;c<d.length;c++){var e=t.aa(d[c]),g=window.videojs[e];if(g){if(g.isSupported())for(var h=0,j=a;h<j.length;h++){var n=j[h];if(g.canPlaySource(n))return{source:n,m:e}}}else t.log.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.')}return l};
  72 +s.src=function(a){if(a===b)return R(this,"src");t.h.isArray(a)?T(this,a):"string"===typeof a?this.src({src:a}):a instanceof Object&&(a.type&&!window.videojs[this.cb].canPlaySource(a)?T(this,[a]):(this.F.src=a.src,this.lc=a.type||"",this.I(function(){S(this,"src",a.src);"auto"==this.l.preload&&this.load();this.l.autoplay&&this.play()})));return this};
  73 +function T(a,c){var d=a.selectSource(c),e;d?d.m===a.cb?a.src(d.source):P(a,d.m,d.source):(e=setTimeout(t.bind(a,function(){this.error({code:4,message:this.s(this.options().notSupportedMessage)})}),0),a.Fa(),a.d("dispose",function(){clearTimeout(e)}))}s.load=function(){S(this,"load");return this};s.currentSrc=function(){return R(this,"currentSrc")||this.F.src||""};s.ld=function(){return this.lc||""};s.Ca=function(a){return a!==b?(S(this,"setPreload",a),this.l.preload=a,this):R(this,"preload")};
  74 +s.autoplay=function(a){return a!==b?(S(this,"setAutoplay",a),this.l.autoplay=a,this):R(this,"autoplay")};s.loop=function(a){return a!==b?(S(this,"setLoop",a),this.l.loop=a,this):R(this,"loop")};s.poster=function(a){if(a===b)return this.Bc;this.Bc=a;S(this,"setPoster",a);this.k("posterchange")};
  75 +s.controls=function(a){return a!==b?(a=!!a,this.xb!==a&&((this.xb=a)?(this.p("vjs-controls-disabled"),this.n("vjs-controls-enabled"),this.k("controlsenabled")):(this.p("vjs-controls-enabled"),this.n("vjs-controls-disabled"),this.k("controlsdisabled"))),this):this.xb};t.Player.prototype.Rb;s=t.Player.prototype;
  76 +s.usingNativeControls=function(a){return a!==b?(a=!!a,this.Rb!==a&&((this.Rb=a)?(this.n("vjs-using-native-controls"),this.k("usingnativecontrols")):(this.p("vjs-using-native-controls"),this.k("usingcustomcontrols"))),this):this.Rb};s.ca=k;s.error=function(a){if(a===b)return this.ca;if(a===k)return this.ca=a,this.p("vjs-error"),this;this.ca=a instanceof t.D?a:new t.D(a);this.k("error");this.n("vjs-error");t.log.error("(CODE:"+this.ca.code+" "+t.D.Ra[this.ca.code]+")",this.ca.message,this.ca);return this};
  77 +s.ended=function(){return R(this,"ended")};s.seeking=function(){return R(this,"seeking")};s.pa=f;s.reportUserActivity=function(){this.pa=f};s.Qb=f;s.userActive=function(a){return a!==b?(a=!!a,a!==this.Qb&&((this.Qb=a)?(this.pa=f,this.p("vjs-user-inactive"),this.n("vjs-user-active"),this.k("useractive")):(this.pa=l,this.m&&this.m.O("mousemove",function(a){a.stopPropagation();a.preventDefault()}),this.p("vjs-user-active"),this.n("vjs-user-inactive"),this.k("userinactive"))),this):this.Qb};
  78 +s.playbackRate=function(a){return a!==b?(S(this,"setPlaybackRate",a),this):this.m&&this.m.featuresPlaybackRate?R(this,"playbackRate"):1};t.Ia=t.a.extend();t.Ia.prototype.l={se:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},liveDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{},playbackRateMenuButton:{}}};t.Ia.prototype.e=function(){return t.e("div",{className:"vjs-control-bar"})};
  79 +t.Wb=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.Wb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-live-controls vjs-control"});this.u=t.e("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.s("Stream Type")+"</span>"+this.s("LIVE"),"aria-live":"off"});a.appendChild(this.u);return a};t.Zb=t.t.extend({i:function(a,c){t.t.call(this,a,c);a.d("play",t.bind(this,this.Mb));a.d("pause",t.bind(this,this.Lb))}});s=t.Zb.prototype;s.ta="Play";
  80 +s.T=function(){return"vjs-play-control "+t.t.prototype.T.call(this)};s.r=function(){this.c.paused()?this.c.play():this.c.pause()};s.Mb=function(){t.p(this.b,"vjs-paused");t.n(this.b,"vjs-playing");this.b.children[0].children[0].innerHTML=this.s("Pause")};s.Lb=function(){t.p(this.b,"vjs-playing");t.n(this.b,"vjs-paused");this.b.children[0].children[0].innerHTML=this.s("Play")};t.gb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.d("timeupdate",t.bind(this,this.fa))}});
  81 +t.gb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.u=t.e("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"});a.appendChild(this.u);return a};t.gb.prototype.fa=function(){var a=this.c.ab?this.c.F.currentTime:this.c.currentTime();this.u.innerHTML='<span class="vjs-control-text">'+this.s("Current Time")+"</span> "+t.ya(a,this.c.duration())};
  82 +t.hb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.d("timeupdate",t.bind(this,this.fa))}});t.hb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.u=t.e("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.s("Duration Time")+"</span> 0:00","aria-live":"off"});a.appendChild(this.u);return a};
  83 +t.hb.prototype.fa=function(){var a=this.c.duration();a&&(this.u.innerHTML='<span class="vjs-control-text">'+this.s("Duration Time")+"</span> "+t.ya(a))};t.ec=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.ec.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};t.ob=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.d("timeupdate",t.bind(this,this.fa))}});
  84 +t.ob.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.u=t.e("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.s("Remaining Time")+"</span> -0:00","aria-live":"off"});a.appendChild(this.u);return a};t.ob.prototype.fa=function(){this.c.duration()&&(this.u.innerHTML='<span class="vjs-control-text">'+this.s("Remaining Time")+"</span> -"+t.ya(this.c.remainingTime()))};
  85 +t.Ja=t.t.extend({i:function(a,c){t.t.call(this,a,c)}});t.Ja.prototype.ta="Fullscreen";t.Ja.prototype.T=function(){return"vjs-fullscreen-control "+t.t.prototype.T.call(this)};t.Ja.prototype.r=function(){this.c.isFullscreen()?(this.c.exitFullscreen(),this.wb.innerHTML=this.s("Fullscreen")):(this.c.requestFullscreen(),this.wb.innerHTML=this.s("Non-Fullscreen"))};t.nb=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.nb.prototype.l={children:{seekBar:{}}};
  86 +t.nb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};t.ac=t.Q.extend({i:function(a,c){t.Q.call(this,a,c);a.d("timeupdate",t.bind(this,this.oa));a.I(t.bind(this,this.oa))}});s=t.ac.prototype;s.l={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};s.Ac="timeupdate";s.e=function(){return t.Q.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};
  87 +s.oa=function(){var a=this.c.ab?this.c.F.currentTime:this.c.currentTime();this.b.setAttribute("aria-valuenow",t.round(100*this.Eb(),2));this.b.setAttribute("aria-valuetext",t.ya(a,this.c.duration()))};s.Eb=function(){return this.c.currentTime()/this.c.duration()};s.Ya=function(a){t.Q.prototype.Ya.call(this,a);this.c.ab=f;this.ie=!this.c.paused();this.c.pause()};s.Za=function(a){a=H(this,a)*this.c.duration();a==this.c.duration()&&(a-=0.1);this.c.currentTime(a)};
  88 +s.Kb=function(a){t.Q.prototype.Kb.call(this,a);this.c.ab=l;this.ie&&this.c.play()};s.Kc=function(){this.c.currentTime(this.c.currentTime()+5)};s.Jc=function(){this.c.currentTime(this.c.currentTime()-5)};t.kb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.d("progress",t.bind(this,this.update))}});t.kb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.s("Loaded")+"</span>: 0%</span>"})};
  89 +t.kb.prototype.update=function(){var a,c,d,e,g=this.c.buffered();a=this.c.duration();var h,j=this.c;h=j.buffered();j=j.duration();h=h.end(h.length-1);h>j&&(h=j);j=this.b.children;this.b.style.width=100*(h/a||0)+"%";for(a=0;a<g.length;a++)c=g.start(a),d=g.end(a),(e=j[a])||(e=this.b.appendChild(t.e())),e.style.left=100*(c/h||0)+"%",e.style.width=100*((d-c)/h||0)+"%";for(a=j.length;a>g.length;a--)this.b.removeChild(j[a-1])};t.Yb=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});
  90 +t.Yb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.s("Progress")+"</span>: 0%</span>"})};t.La=t.Z.extend({i:function(a,c){t.Z.call(this,a,c);a.d("timeupdate",t.bind(this,this.fa))}});t.La.prototype.defaultValue="00:00";t.La.prototype.e=function(){return t.Z.prototype.e.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};
  91 +t.La.prototype.fa=function(){var a=this.c.ab?this.c.F.currentTime:this.c.currentTime();this.b.innerHTML='<span class="vjs-control-text">'+t.ya(a,this.c.duration())+"</span>"};t.qb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.m&&a.m.featuresVolumeControl===l&&this.n("vjs-hidden");a.d("loadstart",t.bind(this,function(){a.m.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")}))}});t.qb.prototype.l={children:{volumeBar:{}}};
  92 +t.qb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};t.pb=t.Q.extend({i:function(a,c){t.Q.call(this,a,c);a.d("volumechange",t.bind(this,this.oa));a.I(t.bind(this,this.oa))}});s=t.pb.prototype;s.oa=function(){this.b.setAttribute("aria-valuenow",t.round(100*this.c.volume(),2));this.b.setAttribute("aria-valuetext",t.round(100*this.c.volume(),2)+"%")};s.l={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};
  93 +s.Ac="volumechange";s.e=function(){return t.Q.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};s.Za=function(a){this.c.muted()&&this.c.muted(l);this.c.volume(H(this,a))};s.Eb=function(){return this.c.muted()?0:this.c.volume()};s.Kc=function(){this.c.volume(this.c.volume()+0.1)};s.Jc=function(){this.c.volume(this.c.volume()-0.1)};t.fc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});
  94 +t.fc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};t.rb=t.Z.extend();t.rb.prototype.defaultValue="00:00";t.rb.prototype.e=function(){return t.Z.prototype.e.call(this,"div",{className:"vjs-volume-handle"})};
  95 +t.ia=t.t.extend({i:function(a,c){t.t.call(this,a,c);a.d("volumechange",t.bind(this,this.update));a.m&&a.m.featuresVolumeControl===l&&this.n("vjs-hidden");a.d("loadstart",t.bind(this,function(){a.m.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")}))}});t.ia.prototype.e=function(){return t.t.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.s("Mute")+"</span></div>"})};
  96 +t.ia.prototype.r=function(){this.c.muted(this.c.muted()?l:f)};t.ia.prototype.update=function(){var a=this.c.volume(),c=3;0===a||this.c.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.c.muted()?this.b.children[0].children[0].innerHTML!=this.s("Unmute")&&(this.b.children[0].children[0].innerHTML=this.s("Unmute")):this.b.children[0].children[0].innerHTML!=this.s("Mute")&&(this.b.children[0].children[0].innerHTML=this.s("Mute"));for(a=0;4>a;a++)t.p(this.b,"vjs-vol-"+a);t.n(this.b,"vjs-vol-"+c)};
  97 +t.ra=t.K.extend({i:function(a,c){t.K.call(this,a,c);a.d("volumechange",t.bind(this,this.update));a.m&&a.m.featuresVolumeControl===l&&this.n("vjs-hidden");a.d("loadstart",t.bind(this,function(){a.m.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")}));this.n("vjs-menu-button")}});t.ra.prototype.wa=function(){var a=new t.ha(this.c,{jc:"div"}),c=new t.pb(this.c,t.h.z({vertical:f},this.l.we));a.R(c);return a};t.ra.prototype.r=function(){t.ia.prototype.r.call(this);t.K.prototype.r.call(this)};
  98 +t.ra.prototype.e=function(){return t.t.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.s("Mute")+"</span></div>"})};t.ra.prototype.update=t.ia.prototype.update;t.$b=t.K.extend({i:function(a,c){t.K.call(this,a,c);this.Pc();this.Oc();a.d("loadstart",t.bind(this,this.Pc));a.d("ratechange",t.bind(this,this.Oc))}});s=t.$b.prototype;
  99 +s.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-playback-rate vjs-menu-button vjs-control",innerHTML:'<div class="vjs-control-content"><span class="vjs-control-text">'+this.s("Playback Rate")+"</span></div>"});this.wc=t.e("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.wc);return a};s.wa=function(){var a=new t.ha(this.j()),c=this.j().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.R(new t.mb(this.j(),{rate:c[d]+"x"}));return a};
  100 +s.oa=function(){this.v().setAttribute("aria-valuenow",this.j().playbackRate())};s.r=function(){for(var a=this.j().playbackRate(),c=this.j().options().playbackRates,d=c[0],e=0;e<c.length;e++)if(c[e]>a){d=c[e];break}this.j().playbackRate(d)};function U(a){return a.j().m&&a.j().m.featuresPlaybackRate&&a.j().options().playbackRates&&0<a.j().options().playbackRates.length}s.Pc=function(){U(this)?this.p("vjs-hidden"):this.n("vjs-hidden")};
  101 +s.Oc=function(){U(this)&&(this.wc.innerHTML=this.j().playbackRate()+"x")};t.mb=t.H.extend({jc:"button",i:function(a,c){var d=this.label=c.rate,e=this.Dc=parseFloat(d,10);c.label=d;c.selected=1===e;t.H.call(this,a,c);this.j().d("ratechange",t.bind(this,this.update))}});t.mb.prototype.r=function(){t.H.prototype.r.call(this);this.j().playbackRate(this.Dc)};t.mb.prototype.update=function(){this.selected(this.j().playbackRate()==this.Dc)};
  102 +t.Ka=t.t.extend({i:function(a,c){t.t.call(this,a,c);a.poster()&&this.src(a.poster());(!a.poster()||!a.controls())&&this.W();a.d("posterchange",t.bind(this,function(){this.src(a.poster())}));a.d("play",t.bind(this,this.W))}});var ea="backgroundSize"in t.A.style;t.Ka.prototype.e=function(){var a=t.e("div",{className:"vjs-poster",tabIndex:-1});ea||a.appendChild(t.e("img"));return a};t.Ka.prototype.src=function(a){var c=this.v();a!==b&&(ea?c.style.backgroundImage='url("'+a+'")':c.firstChild.src=a)};
  103 +t.Ka.prototype.r=function(){this.j().controls()&&this.c.play()};t.Xb=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.Xb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-loading-spinner"})};t.eb=t.t.extend();t.eb.prototype.e=function(){return t.t.prototype.e.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"></span>',"aria-label":"play video"})};t.eb.prototype.r=function(){this.c.play()};
  104 +t.ib=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.update();a.d("error",t.bind(this,this.update))}});t.ib.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-error-display"});this.u=t.e("div");a.appendChild(this.u);return a};t.ib.prototype.update=function(){this.j().error()&&(this.u.innerHTML=this.s(this.j().error().message))};
  105 +t.q=t.a.extend({i:function(a,c,d){c=c||{};c.Fc=l;t.a.call(this,a,c,d);this.featuresProgressEvents||(this.xc=f,this.Cc=setInterval(t.bind(this,function(){var a=this.j().bufferedPercent();this.gd!=a&&this.j().k("progress");this.gd=a;1===a&&clearInterval(this.Cc)}),500));this.featuresTimeupdateEvents||(this.Jb=f,this.j().d("play",t.bind(this,this.Nc)),this.j().d("pause",t.bind(this,this.bb)),this.O("timeupdate",function(){this.featuresTimeupdateEvents=f;fa(this)}));var e,g;g=this;e=this.j();a=function(){if(e.controls()&&
  106 +!e.usingNativeControls()){var a;g.d("mousedown",g.r);g.d("touchstart",function(){a=this.c.userActive()});g.d("touchmove",function(){a&&this.j().reportUserActivity()});g.d("touchend",function(a){a.preventDefault()});G(g);g.d("tap",g.Pd)}};c=t.bind(g,g.Vd);this.I(a);e.d("controlsenabled",a);e.d("controlsdisabled",c);this.I(function(){this.networkState&&0<this.networkState()&&this.j().k("loadstart")})}});s=t.q.prototype;
  107 +s.Vd=function(){this.o("tap");this.o("touchstart");this.o("touchmove");this.o("touchleave");this.o("touchcancel");this.o("touchend");this.o("click");this.o("mousedown")};s.r=function(a){0===a.button&&this.j().controls()&&(this.j().paused()?this.j().play():this.j().pause())};s.Pd=function(){this.j().userActive(!this.j().userActive())};function fa(a){a.Jb=l;a.bb();a.o("play",a.Nc);a.o("pause",a.bb)}
  108 +s.Nc=function(){this.kc&&this.bb();this.kc=setInterval(t.bind(this,function(){this.j().k("timeupdate")}),250)};s.bb=function(){clearInterval(this.kc);this.j().k("timeupdate")};s.dispose=function(){this.xc&&(this.xc=l,clearInterval(this.Cc));this.Jb&&fa(this);t.a.prototype.dispose.call(this)};s.Ob=function(){this.Jb&&this.j().k("timeupdate")};s.Hc=m();t.q.prototype.featuresVolumeControl=f;t.q.prototype.featuresFullscreenResize=l;t.q.prototype.featuresPlaybackRate=l;
  109 +t.q.prototype.featuresProgressEvents=l;t.q.prototype.featuresTimeupdateEvents=l;t.media={};
  110 +t.g=t.q.extend({i:function(a,c,d){this.featuresVolumeControl=t.g.jd();this.featuresPlaybackRate=t.g.hd();this.movingMediaElementInDOM=!t.Vc;this.featuresProgressEvents=this.featuresFullscreenResize=f;t.q.call(this,a,c,d);for(d=t.g.jb.length-1;0<=d;d--)t.d(this.b,t.g.jb[d],t.bind(this,this.sd));if((c=c.source)&&this.b.currentSrc!==c.src)this.b.src=c.src;if(t.cc&&a.options().nativeControlsForTouch!==l){var e,g,h,j;e=this;g=this.j();c=g.controls();e.b.controls=!!c;h=function(){e.b.controls=f};j=function(){e.b.controls=
  111 +l};g.d("controlsenabled",h);g.d("controlsdisabled",j);c=function(){g.o("controlsenabled",h);g.o("controlsdisabled",j)};e.d("dispose",c);g.d("usingcustomcontrols",c);g.usingNativeControls(f)}a.I(function(){this.P&&(this.l.autoplay&&this.paused())&&(delete this.P.poster,this.play())});this.Fa()}});s=t.g.prototype;s.dispose=function(){t.g.Ab(this.b);t.q.prototype.dispose.call(this)};
  112 +s.e=function(){var a=this.c,c=a.P,d;if(!c||this.movingMediaElementInDOM===l)c?(d=c.cloneNode(l),t.g.Ab(c),c=d,a.P=k):(c=t.e("video"),t.Gc(c,t.h.z(a.ee||{},{id:a.id()+"_html5_api","class":"vjs-tech"}))),c.player=a,t.Fb(c,a.v());d=["autoplay","preload","loop","muted"];for(var e=d.length-1;0<=e;e--){var g=d[e],h={};"undefined"!==typeof a.l[g]&&(h[g]=a.l[g]);t.Gc(c,h)}return c};s.sd=function(a){"error"==a.type&&this.error()?this.j().error(this.error().code):(a.bubbles=l,this.j().k(a))};s.play=function(){this.b.play()};
  113 +s.pause=function(){this.b.pause()};s.paused=function(){return this.b.paused};s.currentTime=function(){return this.b.currentTime};s.Ob=function(a){try{this.b.currentTime=a}catch(c){t.log(c,"Video is not ready. (Video.js)")}};s.duration=function(){return this.b.duration||0};s.buffered=function(){return this.b.buffered};s.volume=function(){return this.b.volume};s.be=function(a){this.b.volume=a};s.muted=function(){return this.b.muted};s.Zd=function(a){this.b.muted=a};s.width=function(){return this.b.offsetWidth};
  114 +s.height=function(){return this.b.offsetHeight};s.Da=function(){return"function"==typeof this.b.webkitEnterFullScreen&&(/Android/.test(t.L)||!/Chrome|Mac OS X 10.5/.test(t.L))?f:l};
  115 +s.mc=function(){var a=this.b;"webkitDisplayingFullscreen"in a&&this.O("webkitbeginfullscreen",t.bind(this,function(){this.c.isFullscreen(f);this.O("webkitendfullscreen",t.bind(this,function(){this.c.isFullscreen(l);this.c.k("fullscreenchange")}));this.c.k("fullscreenchange")}));a.paused&&a.networkState<=a.je?(this.b.play(),setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()};s.td=function(){this.b.webkitExitFullScreen()};
  116 +s.src=function(a){if(a===b)return this.b.src;this.b.src=a};s.load=function(){this.b.load()};s.currentSrc=function(){return this.b.currentSrc};s.poster=function(){return this.b.poster};s.Hc=function(a){this.b.poster=a};s.Ca=function(){return this.b.Ca};s.ae=function(a){this.b.Ca=a};s.autoplay=function(){return this.b.autoplay};s.Wd=function(a){this.b.autoplay=a};s.controls=function(){return this.b.controls};s.loop=function(){return this.b.loop};s.Yd=function(a){this.b.loop=a};s.error=function(){return this.b.error};
  117 +s.seeking=function(){return this.b.seeking};s.ended=function(){return this.b.ended};s.playbackRate=function(){return this.b.playbackRate};s.$d=function(a){this.b.playbackRate=a};s.networkState=function(){return this.b.networkState};t.g.isSupported=function(){try{t.A.volume=0.5}catch(a){return l}return!!t.A.canPlayType};t.g.ub=function(a){try{return!!t.A.canPlayType(a.type)}catch(c){return""}};t.g.jd=function(){var a=t.A.volume;t.A.volume=a/2+0.1;return a!==t.A.volume};
  118 +t.g.hd=function(){var a=t.A.playbackRate;t.A.playbackRate=a/2+0.1;return a!==t.A.playbackRate};var V,ga=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,ha=/^video\/mp4/i;t.g.zc=function(){4<=t.Sb&&(V||(V=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&ga.test(a)?"maybe":V.call(this,a)});t.Zc&&(V||(V=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&ha.test(a)?"maybe":V.call(this,a)})};
  119 +t.g.he=function(){var a=t.A.constructor.prototype.canPlayType;t.A.constructor.prototype.canPlayType=V;V=k;return a};t.g.zc();t.g.jb="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");
  120 +t.g.Ab=function(a){if(a){a.player=k;for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(c){}}};
  121 +t.f=t.q.extend({i:function(a,c,d){t.q.call(this,a,c,d);var e=c.source;d=c.parentEl;var g=this.b=t.e("div",{id:a.id()+"_temp_flash"}),h=a.id()+"_flash_api",j=a.l,j=t.h.z({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:j.autoplay,preload:j.Ca,loop:j.loop,muted:j.muted},c.flashVars),n=t.h.z({wmode:"opaque",bgcolor:"#000000"},c.params),h=t.h.z({id:h,name:h,"class":"vjs-tech"},c.attributes);e&&(e.type&&t.f.Cd(e.type)?
  122 +(e=t.f.Lc(e.src),j.rtmpConnection=encodeURIComponent(e.vb),j.rtmpStream=encodeURIComponent(e.Pb)):j.src=encodeURIComponent(t.qc(e.src)));t.Fb(g,d);c.startTime&&this.I(function(){this.load();this.play();this.currentTime(c.startTime)});t.Uc&&this.I(function(){t.d(this.v(),"mousemove",t.bind(this,function(){this.j().k({type:"mousemove",bubbles:l})}))});a.d("stageclick",a.reportUserActivity);this.b=t.f.rd(c.swf,g,j,n,h)}});t.f.prototype.dispose=function(){t.q.prototype.dispose.call(this)};
  123 +t.f.prototype.play=function(){this.b.vjs_play()};t.f.prototype.pause=function(){this.b.vjs_pause()};t.f.prototype.src=function(a){if(a===b)return this.currentSrc();t.f.Bd(a)?(a=t.f.Lc(a),this.te(a.vb),this.ue(a.Pb)):(a=t.qc(a),this.b.vjs_src(a));if(this.c.autoplay()){var c=this;setTimeout(function(){c.play()},0)}};t.f.prototype.setCurrentTime=function(a){this.Fd=a;this.b.vjs_setProperty("currentTime",a);t.q.prototype.Ob.call(this)};
  124 +t.f.prototype.currentTime=function(){return this.seeking()?this.Fd||0:this.b.vjs_getProperty("currentTime")};t.f.prototype.currentSrc=function(){var a=this.b.vjs_getProperty("currentSrc");if(a==k){var c=this.rtmpConnection(),d=this.rtmpStream();c&&d&&(a=t.f.ce(c,d))}return a};t.f.prototype.load=function(){this.b.vjs_load()};t.f.prototype.poster=function(){this.b.vjs_getProperty("poster")};t.f.prototype.setPoster=m();t.f.prototype.buffered=function(){return t.yb(0,this.b.vjs_getProperty("buffered"))};
  125 +t.f.prototype.Da=r(l);t.f.prototype.mc=r(l);function ia(){var a=W[X],c=a.charAt(0).toUpperCase()+a.slice(1);ja["set"+c]=function(c){return this.b.vjs_setProperty(a,c)}}function ka(a){ja[a]=function(){return this.b.vjs_getProperty(a)}}
  126 +var ja=t.f.prototype,W="rtmpConnection rtmpStream preload defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),la="error networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" "),X;for(X=0;X<W.length;X++)ka(W[X]),ia();for(X=0;X<la.length;X++)ka(la[X]);t.f.isSupported=function(){return 10<=t.f.version()[0]};
  127 +t.f.ub=function(a){if(!a.type)return"";a=a.type.replace(/;.*/,"").toLowerCase();if(a in t.f.vd||a in t.f.Mc)return"maybe"};t.f.vd={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};t.f.Mc={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};t.f.onReady=function(a){var c;if(c=(a=t.v(a))&&a.parentNode&&a.parentNode.player)a.player=c,t.f.checkReady(c.m)};t.f.checkReady=function(a){a.v()&&(a.v().vjs_getProperty?a.Fa():setTimeout(function(){t.f.checkReady(a)},50))};t.f.onEvent=function(a,c){t.v(a).player.k(c)};
  128 +t.f.onError=function(a,c){var d=t.v(a).player,e="FLASH: "+c;"srcnotfound"==c?d.error({code:4,message:e}):d.error(e)};t.f.version=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return a.split(",")};
  129 +t.f.rd=function(a,c,d,e,g){a=t.f.xd(a,d,e,g);a=t.e("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);var h=d.childNodes[0];setTimeout(function(){h.style.display="block"},1E3);return a};
  130 +t.f.xd=function(a,c,d,e){var g="",h="",j="";c&&t.h.Y(c,function(a,c){g+=a+"="+c+"&amp;"});d=t.h.z({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);t.h.Y(d,function(a,c){h+='<param name="'+a+'" value="'+c+'" />'});e=t.h.z({data:a,width:"100%",height:"100%"},e);t.h.Y(e,function(a,c){j+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash"'+j+">"+h+"</object>"};t.f.ce=function(a,c){return a+"&"+c};
  131 +t.f.Lc=function(a){var c={vb:"",Pb:""};if(!a)return c;var d=a.indexOf("&"),e;-1!==d?e=d+1:(d=e=a.lastIndexOf("/")+1,0===d&&(d=e=a.length));c.vb=a.substring(0,d);c.Pb=a.substring(e,a.length);return c};t.f.Cd=function(a){return a in t.f.Mc};t.f.ad=/^rtmp[set]?:\/\//i;t.f.Bd=function(a){return t.f.ad.test(a)};
  132 +t.$c=t.a.extend({i:function(a,c,d){t.a.call(this,a,c,d);if(!a.l.sources||0===a.l.sources.length){c=0;for(d=a.l.techOrder;c<d.length;c++){var e=t.aa(d[c]),g=window.videojs[e];if(g&&g.isSupported()){P(a,e);break}}}else a.src(a.l.sources)}});t.Player.prototype.textTracks=function(){return this.Ea=this.Ea||[]};
  133 +function ma(a,c,d,e,g){var h=a.Ea=a.Ea||[];g=g||{};g.kind=c;g.label=d;g.language=e;c=t.aa(c||"subtitles");var j=new window.videojs[c+"Track"](a,g);h.push(j);j.zb()&&a.I(function(){setTimeout(function(){Y(j.j(),j.id())},0)})}function Y(a,c,d){for(var e=a.Ea,g=0,h=e.length,j,n;g<h;g++)j=e[g],j.id()===c?(j.show(),n=j):d&&(j.J()==d&&0<j.mode())&&j.disable();(c=n?n.J():d?d:l)&&a.k(c+"trackchange")}
  134 +t.B=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.U=c.id||"vjs_"+c.kind+"_"+c.language+"_"+t.w++;this.Ic=c.src;this.od=c["default"]||c.dflt;this.fe=c.title;this.Ta=c.srclang;this.Dd=c.label;this.ba=[];this.sb=[];this.ma=this.na=0;this.c.d("fullscreenchange",t.bind(this,this.dd))}});s=t.B.prototype;s.J=p("G");s.src=p("Ic");s.zb=p("od");s.title=p("fe");s.language=p("Ta");s.label=p("Dd");s.kd=p("ba");s.bd=p("sb");s.readyState=p("na");s.mode=p("ma");
  135 +s.dd=function(){this.b.style.fontSize=this.c.isFullscreen()?140*(screen.width/this.c.width())+"%":""};s.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-"+this.G+" vjs-text-track"})};s.show=function(){na(this);this.ma=2;t.a.prototype.show.call(this)};s.W=function(){na(this);this.ma=1;t.a.prototype.W.call(this)};
  136 +s.disable=function(){2==this.ma&&this.W();this.c.o("timeupdate",t.bind(this,this.update,this.U));this.c.o("ended",t.bind(this,this.reset,this.U));this.reset();this.c.ka("textTrackDisplay").removeChild(this);this.ma=0};function na(a){0===a.na&&a.load();0===a.ma&&(a.c.d("timeupdate",t.bind(a,a.update,a.U)),a.c.d("ended",t.bind(a,a.reset,a.U)),("captions"===a.G||"subtitles"===a.G)&&a.c.ka("textTrackDisplay").R(a))}
  137 +s.load=function(){0===this.na&&(this.na=1,t.get(this.Ic,t.bind(this,this.Sd),t.bind(this,this.Id)))};s.Id=function(a){this.error=a;this.na=3;this.k("error")};s.Sd=function(a){var c,d;a=a.split("\n");for(var e="",g=1,h=a.length;g<h;g++)if(e=t.trim(a[g])){-1==e.indexOf("--\x3e")?(c=e,e=t.trim(a[++g])):c=this.ba.length;c={id:c,index:this.ba.length};d=e.split(/[\t ]+/);c.startTime=oa(d[0]);c.xa=oa(d[2]);for(d=[];a[++g]&&(e=t.trim(a[g]));)d.push(e);c.text=d.join("<br/>");this.ba.push(c)}this.na=2;this.k("loaded")};
  138 +function oa(a){var c=a.split(":");a=0;var d,e,g;3==c.length?(d=c[0],e=c[1],c=c[2]):(d=0,e=c[0],c=c[1]);c=c.split(/\s+/);c=c.splice(0,1)[0];c=c.split(/\.|,/);g=parseFloat(c[1]);c=c[0];a+=3600*parseFloat(d);a+=60*parseFloat(e);a+=parseFloat(c);g&&(a+=g/1E3);return a}
  139 +s.update=function(){if(0<this.ba.length){var a=this.c.options().trackTimeOffset||0,a=this.c.currentTime()+a;if(this.Nb===b||a<this.Nb||this.Va<=a){var c=this.ba,d=this.c.duration(),e=0,g=l,h=[],j,n,q,w;a>=this.Va||this.Va===b?w=this.Cb!==b?this.Cb:0:(g=f,w=this.Ib!==b?this.Ib:c.length-1);for(;;){q=c[w];if(q.xa<=a)e=Math.max(e,q.xa),q.Na&&(q.Na=l);else if(a<q.startTime){if(d=Math.min(d,q.startTime),q.Na&&(q.Na=l),!g)break}else g?(h.splice(0,0,q),n===b&&(n=w),j=w):(h.push(q),j===b&&(j=w),n=w),d=Math.min(d,
  140 +q.xa),e=Math.max(e,q.startTime),q.Na=f;if(g)if(0===w)break;else w--;else if(w===c.length-1)break;else w++}this.sb=h;this.Va=d;this.Nb=e;this.Cb=j;this.Ib=n;j=this.sb;n="";a=0;for(c=j.length;a<c;a++)n+='<span class="vjs-tt-cue">'+j[a].text+"</span>";this.b.innerHTML=n;this.k("cuechange")}}};s.reset=function(){this.Va=0;this.Nb=this.c.duration();this.Ib=this.Cb=0};t.Ub=t.B.extend();t.Ub.prototype.G="captions";t.bc=t.B.extend();t.bc.prototype.G="subtitles";t.Vb=t.B.extend();t.Vb.prototype.G="chapters";
  141 +t.dc=t.a.extend({i:function(a,c,d){t.a.call(this,a,c,d);if(a.l.tracks&&0<a.l.tracks.length){c=this.c;a=a.l.tracks;for(var e=0;e<a.length;e++)d=a[e],ma(c,d.kind,d.label,d.language,d)}}});t.dc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-text-track-display"})};t.$=t.H.extend({i:function(a,c){var d=this.ea=c.track;c.label=d.label();c.selected=d.zb();t.H.call(this,a,c);this.c.d(d.J()+"trackchange",t.bind(this,this.update))}});
  142 +t.$.prototype.r=function(){t.H.prototype.r.call(this);Y(this.c,this.ea.U,this.ea.J())};t.$.prototype.update=function(){this.selected(2==this.ea.mode())};t.lb=t.$.extend({i:function(a,c){c.track={J:function(){return c.kind},j:a,label:function(){return c.kind+" off"},zb:r(l),mode:r(l)};t.$.call(this,a,c);this.selected(f)}});t.lb.prototype.r=function(){t.$.prototype.r.call(this);Y(this.c,this.ea.U,this.ea.J())};
  143 +t.lb.prototype.update=function(){for(var a=this.c.textTracks(),c=0,d=a.length,e,g=f;c<d;c++)e=a[c],e.J()==this.ea.J()&&2==e.mode()&&(g=l);this.selected(g)};t.V=t.K.extend({i:function(a,c){t.K.call(this,a,c);1>=this.N.length&&this.W()}});t.V.prototype.va=function(){var a=[],c;a.push(new t.lb(this.c,{kind:this.G}));for(var d=0;d<this.c.textTracks().length;d++)c=this.c.textTracks()[d],c.J()===this.G&&a.push(new t.$(this.c,{track:c}));return a};
  144 +t.Ga=t.V.extend({i:function(a,c,d){t.V.call(this,a,c,d);this.b.setAttribute("aria-label","Captions Menu")}});t.Ga.prototype.G="captions";t.Ga.prototype.ta="Captions";t.Ga.prototype.className="vjs-captions-button";t.Ma=t.V.extend({i:function(a,c,d){t.V.call(this,a,c,d);this.b.setAttribute("aria-label","Subtitles Menu")}});t.Ma.prototype.G="subtitles";t.Ma.prototype.ta="Subtitles";t.Ma.prototype.className="vjs-subtitles-button";
  145 +t.Ha=t.V.extend({i:function(a,c,d){t.V.call(this,a,c,d);this.b.setAttribute("aria-label","Chapters Menu")}});s=t.Ha.prototype;s.G="chapters";s.ta="Chapters";s.className="vjs-chapters-button";s.va=function(){for(var a=[],c,d=0;d<this.c.textTracks().length;d++)c=this.c.textTracks()[d],c.J()===this.G&&a.push(new t.$(this.c,{track:c}));return a};
  146 +s.wa=function(){for(var a=this.c.textTracks(),c=0,d=a.length,e,g,h=this.N=[];c<d;c++)if(e=a[c],e.J()==this.G)if(0===e.readyState())e.load(),e.d("loaded",t.bind(this,this.wa));else{g=e;break}a=this.Aa;a===b&&(a=new t.ha(this.c),a.ja().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.aa(this.G),de:-1})));if(g){e=g.ba;for(var j,c=0,d=e.length;c<d;c++)j=e[c],j=new t.fb(this.c,{track:g,cue:j}),h.push(j),a.R(j);this.R(a)}0<this.N.length&&this.show();return a};
  147 +t.fb=t.H.extend({i:function(a,c){var d=this.ea=c.track,e=this.cue=c.cue,g=a.currentTime();c.label=e.text;c.selected=e.startTime<=g&&g<e.xa;t.H.call(this,a,c);d.d("cuechange",t.bind(this,this.update))}});t.fb.prototype.r=function(){t.H.prototype.r.call(this);this.c.currentTime(this.cue.startTime);this.update(this.cue.startTime)};t.fb.prototype.update=function(){var a=this.cue,c=this.c.currentTime();this.selected(a.startTime<=c&&c<a.xa)};
  148 +t.h.z(t.Ia.prototype.l.children,{subtitlesButton:{},captionsButton:{},chaptersButton:{}});
  149 +if("undefined"!==typeof window.JSON&&"function"===window.JSON.parse)t.JSON=window.JSON;else{t.JSON={};var Z=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;t.JSON.parse=function(a,c){function d(a,e){var j,n,q=a[e];if(q&&"object"===typeof q)for(j in q)Object.prototype.hasOwnProperty.call(q,j)&&(n=d(q,j),n!==b?q[j]=n:delete q[j]);return c.call(a,e,q)}var e;a=String(a);Z.lastIndex=0;Z.test(a)&&(a=a.replace(Z,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));
  150 +if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}}
  151 +t.hc=function(){var a,c,d=document.getElementsByTagName("video");if(d&&0<d.length)for(var e=0,g=d.length;e<g;e++)if((c=d[e])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==k&&(a=t.JSON.parse(a||"{}"),videojs(c,a)));else{t.tb();break}else t.Qc||t.tb()};t.tb=function(){setTimeout(t.hc,1)};"complete"===document.readyState?t.Qc=f:t.O(window,"load",function(){t.Qc=f});t.tb();t.Ud=function(a,c){t.Player.prototype[a]=c};var pa=this;function $(a,c){var d=a.split("."),e=pa;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}};$("videojs",t);$("_V_",t);$("videojs.options",t.options);$("videojs.players",t.Ba);$("videojs.TOUCH_ENABLED",t.cc);$("videojs.cache",t.ua);$("videojs.Component",t.a);t.a.prototype.player=t.a.prototype.j;t.a.prototype.options=t.a.prototype.options;t.a.prototype.init=t.a.prototype.i;t.a.prototype.dispose=t.a.prototype.dispose;t.a.prototype.createEl=t.a.prototype.e;t.a.prototype.contentEl=t.a.prototype.ja;t.a.prototype.el=t.a.prototype.v;t.a.prototype.addChild=t.a.prototype.R;
  152 +t.a.prototype.getChild=t.a.prototype.ka;t.a.prototype.getChildById=t.a.prototype.wd;t.a.prototype.children=t.a.prototype.children;t.a.prototype.initChildren=t.a.prototype.tc;t.a.prototype.removeChild=t.a.prototype.removeChild;t.a.prototype.on=t.a.prototype.d;t.a.prototype.off=t.a.prototype.o;t.a.prototype.one=t.a.prototype.O;t.a.prototype.trigger=t.a.prototype.k;t.a.prototype.triggerReady=t.a.prototype.Fa;t.a.prototype.show=t.a.prototype.show;t.a.prototype.hide=t.a.prototype.W;
  153 +t.a.prototype.width=t.a.prototype.width;t.a.prototype.height=t.a.prototype.height;t.a.prototype.dimensions=t.a.prototype.pd;t.a.prototype.ready=t.a.prototype.I;t.a.prototype.addClass=t.a.prototype.n;t.a.prototype.removeClass=t.a.prototype.p;t.a.prototype.buildCSSClass=t.a.prototype.T;t.a.prototype.localize=t.a.prototype.s;t.Player.prototype.ended=t.Player.prototype.ended;t.Player.prototype.enterFullWindow=t.Player.prototype.nc;t.Player.prototype.exitFullWindow=t.Player.prototype.Bb;
  154 +t.Player.prototype.preload=t.Player.prototype.Ca;t.Player.prototype.remainingTime=t.Player.prototype.remainingTime;t.Player.prototype.supportsFullScreen=t.Player.prototype.Da;t.Player.prototype.currentType=t.Player.prototype.ld;t.Player.prototype.requestFullScreen=t.Player.prototype.requestFullScreen;t.Player.prototype.requestFullscreen=t.Player.prototype.requestFullscreen;t.Player.prototype.cancelFullScreen=t.Player.prototype.cancelFullScreen;t.Player.prototype.exitFullscreen=t.Player.prototype.exitFullscreen;
  155 +t.Player.prototype.isFullScreen=t.Player.prototype.isFullScreen;t.Player.prototype.isFullscreen=t.Player.prototype.isFullscreen;$("videojs.MediaLoader",t.$c);$("videojs.TextTrackDisplay",t.dc);$("videojs.ControlBar",t.Ia);$("videojs.Button",t.t);$("videojs.PlayToggle",t.Zb);$("videojs.FullscreenToggle",t.Ja);$("videojs.BigPlayButton",t.eb);$("videojs.LoadingSpinner",t.Xb);$("videojs.CurrentTimeDisplay",t.gb);$("videojs.DurationDisplay",t.hb);$("videojs.TimeDivider",t.ec);
  156 +$("videojs.RemainingTimeDisplay",t.ob);$("videojs.LiveDisplay",t.Wb);$("videojs.ErrorDisplay",t.ib);$("videojs.Slider",t.Q);$("videojs.ProgressControl",t.nb);$("videojs.SeekBar",t.ac);$("videojs.LoadProgressBar",t.kb);$("videojs.PlayProgressBar",t.Yb);$("videojs.SeekHandle",t.La);$("videojs.VolumeControl",t.qb);$("videojs.VolumeBar",t.pb);$("videojs.VolumeLevel",t.fc);$("videojs.VolumeMenuButton",t.ra);$("videojs.VolumeHandle",t.rb);$("videojs.MuteToggle",t.ia);$("videojs.PosterImage",t.Ka);
  157 +$("videojs.Menu",t.ha);$("videojs.MenuItem",t.H);$("videojs.MenuButton",t.K);$("videojs.PlaybackRateMenuButton",t.$b);t.K.prototype.createItems=t.K.prototype.va;t.V.prototype.createItems=t.V.prototype.va;t.Ha.prototype.createItems=t.Ha.prototype.va;$("videojs.SubtitlesButton",t.Ma);$("videojs.CaptionsButton",t.Ga);$("videojs.ChaptersButton",t.Ha);$("videojs.MediaTechController",t.q);t.q.prototype.featuresVolumeControl=t.q.prototype.qe;t.q.prototype.featuresFullscreenResize=t.q.prototype.me;
  158 +t.q.prototype.featuresPlaybackRate=t.q.prototype.ne;t.q.prototype.featuresProgressEvents=t.q.prototype.oe;t.q.prototype.featuresTimeupdateEvents=t.q.prototype.pe;t.q.prototype.setPoster=t.q.prototype.Hc;$("videojs.Html5",t.g);t.g.Events=t.g.jb;t.g.isSupported=t.g.isSupported;t.g.canPlaySource=t.g.ub;t.g.patchCanPlayType=t.g.zc;t.g.unpatchCanPlayType=t.g.he;t.g.prototype.setCurrentTime=t.g.prototype.Ob;t.g.prototype.setVolume=t.g.prototype.be;t.g.prototype.setMuted=t.g.prototype.Zd;
  159 +t.g.prototype.setPreload=t.g.prototype.ae;t.g.prototype.setAutoplay=t.g.prototype.Wd;t.g.prototype.setLoop=t.g.prototype.Yd;t.g.prototype.enterFullScreen=t.g.prototype.mc;t.g.prototype.exitFullScreen=t.g.prototype.td;t.g.prototype.playbackRate=t.g.prototype.playbackRate;t.g.prototype.setPlaybackRate=t.g.prototype.$d;$("videojs.Flash",t.f);t.f.isSupported=t.f.isSupported;t.f.canPlaySource=t.f.ub;t.f.onReady=t.f.onReady;$("videojs.TextTrack",t.B);t.B.prototype.label=t.B.prototype.label;
  160 +t.B.prototype.kind=t.B.prototype.J;t.B.prototype.mode=t.B.prototype.mode;t.B.prototype.cues=t.B.prototype.kd;t.B.prototype.activeCues=t.B.prototype.bd;$("videojs.CaptionsTrack",t.Ub);$("videojs.SubtitlesTrack",t.bc);$("videojs.ChaptersTrack",t.Vb);$("videojs.autoSetup",t.hc);$("videojs.plugin",t.Ud);$("videojs.createTimeRange",t.yb);$("videojs.util",t.ga);t.ga.mergeOptions=t.ga.Ua;t.addLanguage=t.cd;})();
  161 +!function(t,a,e,n,m){m=a.location,t.src="//www.google-analytics.com/__utm.gif?utmwv=5.4.2&utmac=UA-16505296-2&utmn=1&utmhn="+n(m.hostname)+"&utmsr="+a.screen.availWidth+"x"+a.screen.availHeight+"&utmul="+(e.language||e.userLanguage||"").toLowerCase()+"&utmr="+n(m.href)+"&utmp="+n(m.hostname+m.pathname)+"&utmcc=__utma%3D1."+Math.floor(1e10*Math.random())+".1.1.1.1%3B"+"&utme=8(vjsv)9(v4.8.5)"}(new Image,window,navigator,encodeURIComponent);
0 162 \ No newline at end of file
... ...
plugins/video/public/style.css
... ... @@ -3,7 +3,7 @@
3 3 display: inline-block;
4 4 width: 95px;
5 5 height: 85px;
6   - margin: 1em;
  6 + margin: 1em;
7 7 border: solid #F0F0F0 1px;
8 8 vertical-align: top;
9 9 text-align: center;
... ... @@ -17,7 +17,7 @@
17 17 }
18 18  
19 19 .video-duration{
20   - position: absolute;
  20 + position: absolute;
21 21 bottom: 0px;
22 22 background-color: black;
23 23 font-size: 1em;
... ...
plugins/video/views/cms/_video.html.erb
... ... @@ -2,7 +2,7 @@
2 2  
3 3 <div>
4 4 <%= required f.text_field('name', :size => '64', :maxlength => 150) %>
5   -<%= required labelled_form_field _('URL of the video'), text_field(:article, :video_url, :size => 300) %>
  5 +<%= required labelled_form_field _('URL of the video'), text_field(:article, :video_url, :size => 300) %>
6 6 <%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %>
7 7 <%= render :partial => 'general_fields' %>
8 8 <%= render :partial => 'translatable' %>
... ...
plugins/video/views/content_viewer/_video.html.erb
1 1 <div align="center">
2 2 <%if @page.video_provider=='youtube' %>
3   - <link type="text/css" rel="stylesheet" href="https://vjs.zencdn.net/4.5.1/video-js.css" />
4   - <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
  3 + <link type="text/css" rel="stylesheet" href="/plugins/video/css/video-js-4.5.1.css" />
  4 + <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
5 5 width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>"
6 6 data-setup='<%=CGI::escapeHTML("{ \"techOrder\": [\"youtube\"], \"src\": \"#{@page.video_url}\" }") %>'>
7 7 <%= @page.no_browser_support_message %>
8 8 </video>
9   - <script src="https://vjs.zencdn.net/4.5.1/video.js"></script>
10   - <script src="/plugins/video/javascripts/videojs/vjs.youtube.js"></script>
  9 + <script src="/plugins/video/javascripts/videojs/video-4.5.1.js"></script>
  10 + <script src="/plugins/video/javascripts/videojs/vjs.youtube.js"></script>
11 11 <% elsif @page.video_provider=='vimeo' %>
12   - <link type="text/css" rel="stylesheet" href="https://vjs.zencdn.net/4.5.1/video-js.css" />
13   - <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
14   - width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>"
15   - data-setup='<%=CGI::escapeHTML("{ \"techOrder\": [\"video\"], \"src\": \"#{@page.video_url}\", \"loop\": true, \"autoplay\": false }") %>'>
  12 + <link type="text/css" rel="stylesheet" href="/plugins/video/css/video-js-4.5.1.css" />
  13 + <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
  14 + width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>"
  15 + data-setup='<%=CGI::escapeHTML("{ \"techOrder\": [\"vimeo\"], \"src\": \"#{@page.video_url}\", \"loop\": true, \"autoplay\": false }") %>'>
16 16 <%= @page.no_browser_support_message %>
17 17 </video>
18   - <script src="https://vjs.zencdn.net/4.5.1/video.js"></script>
  18 + <script src="/plugins/video/javascripts/videojs/video-4.5.1.js"></script>
19 19 <script src="/plugins/video/javascripts/videojs/vjs.vimeo.js"></script>
20 20 <% elsif @page.video_provider=='file' %>
21   - <link href="https://vjs.zencdn.net/4.8/video-js.css" rel="stylesheet">
22   - <script src="https://vjs.zencdn.net/4.8/video.js"></script>
  21 + <link href="/plugins/video/css/video-js-4.8.5.css" rel="stylesheet">
  22 + <script src="/plugins/video/javascripts/videojs/video-4.8.5.js"></script>
23 23 <video id="embedded_video" class="video-js vjs-default-skin vjs-big-play-centered"
24   - height="353" width="499"
25   - controls preload="auto"
26   - data-setup='{"example_option":true}'>
  24 + height="353" width="499"
  25 + controls preload="auto"
  26 + data-setup='<%=CGI::escapeHTML("{ \"example_option\":true}") %>'>
27 27 <source src="<%= @page.video_url %>" type='<%= @page.video_format %>' />
28 28 <%= @page.no_browser_support_message %>
29   - </video>
30   -<% end %>
  29 + </video>
  30 +<% end %>
31 31 <br style="clear:both" />
32 32 </div>
33 33 <% _("Description:") %>
... ...
plugins/video/views/content_viewer/video_plugin/video_video.html.erb
1 1 <div align="center">
2 2 <%if @page.video_provider=='youtube' %>
3 3 <link type="text/css" rel="stylesheet" href="https://vjs.zencdn.net/4.5.1/video-js.css" />
4   - <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
  4 + <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
5 5 width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>"
6 6 data-setup='{ "techOrder": ["youtube"], "src": "<%= @page.video_url %>" }'>
7 7 <%= @page.no_browser_support_message %>
8 8 </video>
9 9 <script src="https://vjs.zencdn.net/4.5.1/video.js"></script>
10   - <script src="/plugins/video/javascripts/videojs/vjs.youtube.js"></script>
  10 + <script src="/plugins/video/javascripts/videojs/vjs.youtube.js"></script>
11 11 <% elsif @page.video_provider=='vimeo' %>
12 12 <link type="text/css" rel="stylesheet" href="https://vjs.zencdn.net/4.5.1/video-js.css" />
13   - <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
14   - width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>"
  13 + <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
  14 + width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>"
15 15 data-setup='{ "techOrder": ["vimeo"], "src": "<%= @page.video_url %>", "loop": true, "autoplay": false }'>
16 16 <%= @page.no_browser_support_message %>
17 17 </video>
... ... @@ -19,15 +19,15 @@
19 19 <script src="/plugins/video/javascripts/videojs/vjs.vimeo.js"></script>
20 20 <% elsif @page.video_provider=='file' %>
21 21 <link href="https://vjs.zencdn.net/4.8/video-js.css" rel="stylesheet">
22   - <script src="https://vjs.zencdn.net/4.8/video.js"></script>
  22 + <script src="https://vjs.zencdn.net/4.8/video.js"></script>
23 23 <video id="embedded_video" class="video-js vjs-default-skin vjs-big-play-centered"
24   - height="353" width="499"
25   - controls preload="auto"
  24 + height="353" width="499"
  25 + controls preload="auto"
26 26 data-setup='{"example_option":true}'>
27 27 <source src="<%= @page.video_url %>" type='<%= @page.video_format %>' />
28 28 <%= @page.no_browser_support_message %>
29   - </video>
30   -<% end %>
  29 + </video>
  30 +<% end %>
31 31 <br style="clear:both" />
32 32 </div>
33 33 <% _("Description:") %>
... ...
plugins/video/views/content_viewer/video_plugin/video_video_gallery.html.erb
1   -<%
  1 +<%
2 2 def self.list_videos(configure={})
3 3 configure[:recursive] ||= false
4 4 configure[:list_type] ||= :folder
... ... @@ -12,7 +12,7 @@ def self.list_videos(configure={})
12 12 else
13 13 content_tag('em', _('(empty folder)'))
14 14 end
15   - end
  15 + end
16 16 %>
17 17 <% unless video_gallery.body.blank? %>
18 18 <div>
... ...
plugins/virtuoso/Gemfile 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +gem 'rdf'
  2 +gem 'rdf-virtuoso'
  3 +gem 'oai'
  4 +gem 'liquid'
  5 +gem 'roadie'
  6 +gem 'roadie-rails'
... ...
plugins/virtuoso/controllers/admin/virtuoso_plugin_custom_queries_controller.rb 0 → 100644
... ... @@ -0,0 +1,45 @@
  1 +class VirtuosoPluginCustomQueriesController < AdminController
  2 +
  3 + def index
  4 + @custom_queries = environment.virtuoso_plugin_custom_queries.all
  5 + end
  6 +
  7 + def new
  8 + @custom_query = VirtuosoPlugin::CustomQuery.new
  9 + end
  10 +
  11 + def edit
  12 + @custom_query = VirtuosoPlugin::CustomQuery.find(params[:id])
  13 + end
  14 +
  15 + def create
  16 + @custom_query = VirtuosoPlugin::CustomQuery.new(params[:custom_query])
  17 + @custom_query.environment = environment
  18 +
  19 + if @custom_query.save
  20 + session[:notice] = _('Custom query was successfully created.')
  21 + redirect_to :action => :index
  22 + else
  23 + render action: "new"
  24 + end
  25 + end
  26 +
  27 + def update
  28 + @custom_query = VirtuosoPlugin::CustomQuery.find(params[:id])
  29 +
  30 + if @custom_query.update_attributes(params[:custom_query])
  31 + session[:notice] = 'Custom query was successfully updated.'
  32 + redirect_to :action => :index
  33 + else
  34 + render action: "edit"
  35 + end
  36 + end
  37 +
  38 + def destroy
  39 + @custom_query = VirtuosoPlugin::CustomQuery.find(params[:id])
  40 + @custom_query.destroy
  41 +
  42 + redirect_to :action => :index
  43 + end
  44 +
  45 +end
... ...
plugins/virtuoso/controllers/public/virtuoso_plugin_public_controller.rb 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +class VirtuosoPluginPublicController < PublicController
  2 +
  3 + def custom_query
  4 + render :json => environment.virtuoso_plugin_custom_queries.find(params[:id])
  5 + end
  6 +
  7 +end
... ...
plugins/virtuoso/controllers/virtuoso_plugin_admin_controller.rb 0 → 100644
... ... @@ -0,0 +1,48 @@
  1 +class VirtuosoPluginAdminController < AdminController
  2 +
  3 + def index
  4 + settings = params[:settings]
  5 + settings ||= {}
  6 + @settings = Noosfero::Plugin::Settings.new(environment, VirtuosoPlugin, settings)
  7 + @harvest_running = VirtuosoPlugin::DspaceHarvest.new(environment).find_job.present?
  8 +
  9 + if request.post?
  10 + @settings.save!
  11 + session[:notice] = 'Settings successfully saved.'
  12 + redirect_to :action => 'index'
  13 + end
  14 + end
  15 +
  16 + def force_harvest
  17 + harvest = VirtuosoPlugin::DspaceHarvest.new(environment)
  18 + harvest.start(params[:from_start])
  19 + session[:notice] = _('Harvest started')
  20 + redirect_to :action => :index
  21 + end
  22 +
  23 + def triple_management
  24 + triples_management = VirtuosoPlugin::TriplesManagement.new(environment)
  25 + @triples = []
  26 + if request.post?
  27 + @query = params[:query]
  28 + @graph_uri = params[:graph_uri]
  29 + @triples = triples_management.search_triples(@graph_uri, @query)
  30 + end
  31 + render :action => 'triple_management'
  32 + end
  33 +
  34 + def triple_update
  35 + graph_uri = params[:graph_uri]
  36 + triples = params[:triples]
  37 +
  38 + triples_management = VirtuosoPlugin::TriplesManagement.new(environment)
  39 +
  40 + triples.each { |triple_key, triple_content|
  41 + triples_management.update_triple(graph_uri, triple_content[:from], triple_content[:to])
  42 + }
  43 +
  44 + session[:notice] = _('Triple(s) succesfully updated.')
  45 + redirect_to :action => :triple_management
  46 + end
  47 +
  48 +end
... ...
plugins/virtuoso/db/migrate/20141113131439_create_custom_queries.rb 0 → 100644
... ... @@ -0,0 +1,15 @@
  1 +class CreateCustomQueries < ActiveRecord::Migration
  2 +
  3 + def change
  4 + create_table :virtuoso_plugin_custom_queries do |t|
  5 + t.integer "environment_id", :null => false
  6 + t.string :name
  7 + t.text :query
  8 + t.text :template
  9 + t.text :stylesheet
  10 + t.boolean :enabled, :default => true
  11 + t.timestamps
  12 + end
  13 + end
  14 +
  15 +end
... ...
plugins/virtuoso/features/edit_template.feature 0 → 100644
... ... @@ -0,0 +1,25 @@
  1 +Feature: edit template
  2 + As a noosfero user
  3 + I want to create and edit templates
  4 +
  5 + Background:
  6 + Given I am on the homepage
  7 + And plugin Virtuoso is enabled on environment
  8 + And the following users
  9 + | login | name |
  10 + | joaosilva | Joao Silva |
  11 + And I am logged in as "joaosilva"
  12 + And the following custom queries
  13 + | name | query | template |
  14 + | Default | query-1 | template-1 |
  15 +
  16 + @selenium
  17 + Scenario:
  18 + Given I am on joaosilva's control panel
  19 + And I follow "Manage Content"
  20 + And I should see "New content"
  21 + And I follow "New content"
  22 + And I should see "Triples template" within ".article-types"
  23 + When I follow "Triples template" within ".article-types"
  24 + And I follow "Copy" within ".custom-query"
  25 + Then the "SPARQL Query" field should contain "query-1"
... ...
plugins/virtuoso/features/step_definitions/virtuoso_plugin_steps.rb 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +Given /^the following custom queries$/ do |table|
  2 + table.hashes.map{|item| item.dup}.each do |item|
  3 + VirtuosoPlugin::CustomQuery.create!(item.merge(:environment => Environment.default))
  4 + end
  5 +end
... ...
plugins/virtuoso/lib/ext/environment.rb 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +class Environment
  2 +
  3 + has_many :virtuoso_plugin_custom_queries, :class_name => "VirtuosoPlugin::CustomQuery"
  4 +
  5 +end
... ...
plugins/virtuoso/lib/ext/literal.rb 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +class RDF::Literal
  2 +
  3 + def to_liquid
  4 + value
  5 + end
  6 +
  7 +end
... ...
plugins/virtuoso/lib/ext/solution.rb 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +class RDF::Query::Solution
  2 +
  3 + def to_liquid
  4 + HashWithIndifferentAccess.new(to_hash)
  5 + end
  6 +
  7 +end
... ...
plugins/virtuoso/lib/virtuoso_plugin.rb 0 → 100644
... ... @@ -0,0 +1,31 @@
  1 +class VirtuosoPlugin < Noosfero::Plugin
  2 +
  3 + def self.plugin_name
  4 + "Virtuoso integration"
  5 + end
  6 +
  7 + def self.plugin_description
  8 + _('Virtuoso integration')
  9 + end
  10 +
  11 + def content_types
  12 + [VirtuosoPlugin::TriplesTemplate]
  13 + end
  14 +
  15 + def settings
  16 + @settings ||= Noosfero::Plugin::Settings.new(context.environment, VirtuosoPlugin)
  17 + end
  18 +
  19 + def virtuoso_client
  20 + @virtuoso_client ||= RDF::Virtuoso::Repository.new("#{settings.virtuoso_uri}/sparql", :update_uri => "#{settings.virtuoso_uri}/sparql-auth", :username => settings.virtuoso_username, :password => settings.virtuoso_password, :auth_method => 'digest', :timeout => 30)
  21 + end
  22 +
  23 + def js_files
  24 + ['edit-server-list']
  25 + end
  26 +
  27 + def stylesheet?
  28 + true
  29 + end
  30 +
  31 +end
... ...