diff --git a/.codeclimate.yml b/.codeclimate.yml
index aacf2e734..e25ac86aa 100644
--- a/.codeclimate.yml
+++ b/.codeclimate.yml
@@ -3,4 +3,18 @@ plugins:
rubocop:
enabled: true
channel: rubocop-1-56-3
-
+exclude_patterns:
+- "bin/"
+- "config/"
+- "db/"
+- "dist/"
+- "features/"
+- "**/node_modules/"
+- "script/"
+- "**/spec/"
+- "**/test/"
+- "**/tests/"
+- "Tests/"
+- "**/vendor/"
+- "**/*_test.go"
+- "**/*.d.ts"
diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml
index 4543c0f7d..93b401d76 100644
--- a/.haml-lint_todo.yml
+++ b/.haml-lint_todo.yml
@@ -46,11 +46,13 @@ linters:
- "app/views/admin/events/index.html.haml"
- "app/views/admin/tracks/index.html.haml"
- "app/views/admin/tracks/show.html.haml"
+ - "app/views/admin/registrations/index.html.haml"
- "app/views/admin/versions/_object_desc_and_link.html.haml"
- "app/views/conference_registrations/show.html.haml"
- "app/views/layouts/_admin_sidebar.html.haml"
- "app/views/proposals/index.html.haml"
- "app/views/proposals/show.html.haml"
+ - "app/views/proposals/_form.html.haml"
# Offense count: 28
IdNames:
diff --git a/.rubocop.yml b/.rubocop.yml
index b44f547da..53babd565 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -3,6 +3,7 @@ require:
- rubocop-rails
- rubocop-capybara
- rubocop-performance
+ - rubocop-factory_bot
inherit_from: .rubocop_todo.yml
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 48a9a2252..be9e93e84 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
-# on 2024-02-13 04:01:02 UTC using RuboCop version 1.60.2.
+# on 2024-03-12 05:45:42 UTC using RuboCop version 1.61.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@@ -14,19 +14,66 @@ Bundler/OrderedGems:
Exclude:
- 'Gemfile'
-# Offense count: 1
+# Offense count: 180
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: link_or_button, strict
+Capybara/ClickLinkOrButtonStyle:
+ Enabled: false
+
+# Offense count: 77
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: have_no, not_to
Capybara/NegationMatcher:
Exclude:
- - 'spec/features/versions_spec.rb'
+ - 'spec/features/cfp_ability_spec.rb'
+ - 'spec/features/code_of_conduct_spec.rb'
+ - 'spec/features/info_desk_ability_spec.rb'
+ - 'spec/features/organizer_ability_spec.rb'
+ - 'spec/features/proposals_spec.rb'
+ - 'spec/features/splashpage_spec.rb'
+ - 'spec/features/sponsor_spec.rb'
+ - 'spec/features/track_organizer_ability_spec.rb'
+
+# Offense count: 10
+# This cop supports safe autocorrection (--autocorrect).
+# Configuration parameters: DefaultSelector.
+Capybara/RSpec/HaveSelector:
+ Exclude:
+ - 'spec/features/cfp_ability_spec.rb'
+ - 'spec/features/info_desk_ability_spec.rb'
+ - 'spec/features/organization_admin_ability_spec.rb'
+ - 'spec/features/organizer_ability_spec.rb'
+ - 'spec/features/proposals_spec.rb'
+ - 'spec/features/sponsor_spec.rb'
+ - 'spec/features/track_organizer_ability_spec.rb'
+ - 'spec/features/voting_spec.rb'
-# Offense count: 98
+# Offense count: 101
# This cop supports safe autocorrection (--autocorrect).
Capybara/SpecificFinders:
Enabled: false
+# Offense count: 8
+# This cop supports unsafe autocorrection (--autocorrect-all).
+# Configuration parameters: EnforcedStyle, NonImplicitAssociationMethodNames.
+# SupportedStyles: explicit, implicit
+FactoryBot/AssociationStyle:
+ Exclude:
+ - 'spec/factories/comments.rb'
+ - 'spec/factories/commercials.rb'
+ - 'spec/factories/conferences.rb'
+ - 'spec/factories/surveys.rb'
+ - 'spec/factories/tracks.rb'
+
+# Offense count: 4
+# Configuration parameters: Include.
+# Include: **/*_spec.rb, **/spec/**/*, **/test/**/*, **/features/support/factories/**/*.rb
+FactoryBot/FactoryAssociationWithStrategy:
+ Exclude:
+ - 'spec/factories/booths.rb'
+ - 'spec/factories/users.rb'
+
# Offense count: 13
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowedMethods, AllowedPatterns.
@@ -40,7 +87,7 @@ Lint/AmbiguousBlockAssociation:
- 'spec/controllers/schedules_controller_spec.rb'
- 'spec/models/user_spec.rb'
-# Offense count: 5
+# Offense count: 3
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
Lint/DuplicateBranch:
Exclude:
@@ -53,28 +100,28 @@ Lint/IneffectiveAccessModifier:
- 'app/models/commercial.rb'
- 'app/models/conference.rb'
-# Offense count: 111
+# Offense count: 110
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 72
-# Offense count: 19
+# Offense count: 14
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
# AllowedMethods: refine
Metrics/BlockLength:
- Max: 227
+ Max: 99
# Offense count: 13
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 270
-# Offense count: 26
+# Offense count: 28
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/CyclomaticComplexity:
Max: 15
-# Offense count: 127
+# Offense count: 126
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 55
@@ -82,9 +129,9 @@ Metrics/MethodLength:
# Offense count: 4
# Configuration parameters: CountComments, CountAsOne.
Metrics/ModuleLength:
- Max: 168
+ Max: 158
-# Offense count: 25
+# Offense count: 27
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/PerceivedComplexity:
Max: 17
@@ -191,7 +238,7 @@ RSpec/Capybara/FeatureMethods:
- 'spec/features/user_spec.rb'
- 'spec/features/voting_spec.rb'
-# Offense count: 338
+# Offense count: 339
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
@@ -204,7 +251,7 @@ RSpec/ContextWording:
RSpec/DescribedClass:
Enabled: false
-# Offense count: 248
+# Offense count: 251
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 222
@@ -259,7 +306,7 @@ RSpec/IdenticalEqualityAssertion:
- 'spec/controllers/admin/conferences_controller_spec.rb'
# Offense count: 53
-# Configuration parameters: Max.
+# Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
RSpec/IndexedLet:
Exclude:
- 'spec/controllers/admin/reports_controller_spec.rb'
@@ -319,11 +366,11 @@ RSpec/MultipleDescribes:
Exclude:
- 'spec/models/conference_spec.rb'
-# Offense count: 298
+# Offense count: 300
RSpec/MultipleExpectations:
Max: 97
-# Offense count: 272
+# Offense count: 274
# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Max: 32
@@ -396,6 +443,12 @@ RSpec/Rails/InferredSpecType:
- 'spec/helpers/users_helper_spec.rb'
- 'spec/routing/routing_spec.rb'
+# Offense count: 12
+# This cop supports safe autocorrection (--autocorrect).
+RSpec/ReceiveMessages:
+ Exclude:
+ - 'spec/models/track_spec.rb'
+
# Offense count: 4
RSpec/RepeatedDescription:
Exclude:
@@ -466,12 +519,12 @@ Style/CaseLikeIf:
Exclude:
- 'app/views/admin/events/events.xlsx.axlsx'
-# Offense count: 103
+# Offense count: 107
# Configuration parameters: AllowedConstants.
Style/Documentation:
Enabled: false
-# Offense count: 40
+# Offense count: 43
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
@@ -510,7 +563,7 @@ Style/IdenticalConditionalBranches:
- 'app/controllers/admin/booths_controller.rb'
- 'app/controllers/admin/events_controller.rb'
-# Offense count: 32
+# Offense count: 34
# This cop supports safe autocorrection (--autocorrect).
Style/IfUnlessModifier:
Enabled: false
@@ -587,7 +640,7 @@ Style/OptionalBooleanParameter:
- 'app/models/event.rb'
# Offense count: 2
-# This cop supports safe autocorrection (--autocorrect).
+# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowedCompactTypes.
# SupportedStyles: compact, exploded
Style/RaiseArgs:
@@ -640,7 +693,7 @@ Style/WordArray:
EnforcedStyle: percent
MinSize: 5
-# Offense count: 260
+# Offense count: 269
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
diff --git a/Gemfile b/Gemfile
index 508035858..c21525e04 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,9 +8,6 @@ source 'https://rubygems.org'
ruby ENV.fetch('OSEM_RUBY_VERSION', '3.2.2')
-# rails-assets requires >= 1.8.4
-abort 'Bundler version >= 1.8.4 is required' if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.8.4')
-
# as web framework
if next?
gem 'rails', '~> 7'
@@ -89,40 +86,11 @@ gem 'cocoon'
# as the JavaScript library
# TODO: Consolidate with the rails-assets below or move to webpack...
gem 'jquery-rails'
-gem 'jquery-ui-rails', '~> 6.0.1'
+gem 'jquery-ui-rails', '~> 7.0.0'
# for languages validation
gem 'iso-639'
-# frontend javascripts
-source 'https://rails-assets.org' do
- # transient dependencies, included here to reduce warnings.
- gem 'rails-assets-bootstrap'
- gem 'rails-assets-jquery'
- # for placeholder images
- gem 'rails-assets-holderjs'
- # for formating dates
- gem 'rails-assets-date.format'
- # for or parsing, validating, manipulating, and formatting dates
- gem 'rails-assets-momentjs'
- # for smooth scrolling
- gem 'rails-assets-jquery-smooth-scroll'
- # as color picker
- gem 'rails-assets-spectrum'
- # for color manipulation
- gem 'rails-assets-tinycolor'
- # for drawing triangle backgrounds
- gem 'rails-assets-trianglify'
- # for scroll way points
- gem 'rails-assets-waypoints'
- # for markdown editors
- gem 'rails-assets-bootstrap-markdown'
- # for select with icon
- gem 'rails-assets-bootstrap-select'
- gem 'rails-assets-markdown'
- gem 'rails-assets-to-markdown', '~> 3'
-end
-
# as date picker
gem 'bootstrap3-datetimepicker-rails', '~> 4.17.47'
diff --git a/Gemfile.lock b/Gemfile.lock
index 99e3dd692..0550a4a21 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -7,75 +7,51 @@ GIT
omniauth (~> 2.0)
rack
-GEM
- remote: https://rails-assets.org/
- specs:
- rails-assets-bootstrap (3.4.1)
- rails-assets-jquery (>= 1.9.1, < 4)
- rails-assets-bootstrap-markdown (2.10.0)
- rails-assets-bootstrap (~> 3)
- rails-assets-bootstrap-select (1.13.10)
- rails-assets-bootstrap (>= 3.0.0)
- rails-assets-jquery (>= 1.9.1, < 4)
- rails-assets-date.format (1.2.3)
- rails-assets-holderjs (2.9.6)
- rails-assets-jquery (3.6.0)
- rails-assets-jquery-smooth-scroll (2.2.0)
- rails-assets-jquery (>= 1.7.0)
- rails-assets-markdown (0.5.0)
- rails-assets-momentjs (2.29.4)
- rails-assets-spectrum (1.8.0)
- rails-assets-jquery (>= 1.7.2)
- rails-assets-tinycolor (1.6.0)
- rails-assets-to-markdown (3.1.1)
- rails-assets-trianglify (1.2.0)
- rails-assets-waypoints (4.0.1)
-
GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.1.0)
- actioncable (7.0.8)
- actionpack (= 7.0.8)
- activesupport (= 7.0.8)
+ actioncable (7.0.8.4)
+ actionpack (= 7.0.8.4)
+ activesupport (= 7.0.8.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
- actionmailbox (7.0.8)
- actionpack (= 7.0.8)
- activejob (= 7.0.8)
- activerecord (= 7.0.8)
- activestorage (= 7.0.8)
- activesupport (= 7.0.8)
+ actionmailbox (7.0.8.4)
+ actionpack (= 7.0.8.4)
+ activejob (= 7.0.8.4)
+ activerecord (= 7.0.8.4)
+ activestorage (= 7.0.8.4)
+ activesupport (= 7.0.8.4)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
- actionmailer (7.0.8)
- actionpack (= 7.0.8)
- actionview (= 7.0.8)
- activejob (= 7.0.8)
- activesupport (= 7.0.8)
+ actionmailer (7.0.8.4)
+ actionpack (= 7.0.8.4)
+ actionview (= 7.0.8.4)
+ activejob (= 7.0.8.4)
+ activesupport (= 7.0.8.4)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
- actionpack (7.0.8)
- actionview (= 7.0.8)
- activesupport (= 7.0.8)
+ actionpack (7.0.8.4)
+ actionview (= 7.0.8.4)
+ activesupport (= 7.0.8.4)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actiontext (7.0.8)
- actionpack (= 7.0.8)
- activerecord (= 7.0.8)
- activestorage (= 7.0.8)
- activesupport (= 7.0.8)
+ actiontext (7.0.8.4)
+ actionpack (= 7.0.8.4)
+ activerecord (= 7.0.8.4)
+ activestorage (= 7.0.8.4)
+ activesupport (= 7.0.8.4)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
- actionview (7.0.8)
- activesupport (= 7.0.8)
+ actionview (7.0.8.4)
+ activesupport (= 7.0.8.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
@@ -85,22 +61,22 @@ GEM
activemodel (>= 4.1, < 7.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
- activejob (7.0.8)
- activesupport (= 7.0.8)
+ activejob (7.0.8.4)
+ activesupport (= 7.0.8.4)
globalid (>= 0.3.6)
- activemodel (7.0.8)
- activesupport (= 7.0.8)
- activerecord (7.0.8)
- activemodel (= 7.0.8)
- activesupport (= 7.0.8)
- activestorage (7.0.8)
- actionpack (= 7.0.8)
- activejob (= 7.0.8)
- activerecord (= 7.0.8)
- activesupport (= 7.0.8)
+ activemodel (7.0.8.4)
+ activesupport (= 7.0.8.4)
+ activerecord (7.0.8.4)
+ activemodel (= 7.0.8.4)
+ activesupport (= 7.0.8.4)
+ activestorage (7.0.8.4)
+ actionpack (= 7.0.8.4)
+ activejob (= 7.0.8.4)
+ activerecord (= 7.0.8.4)
+ activesupport (= 7.0.8.4)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
- activesupport (7.0.8)
+ activesupport (7.0.8.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
@@ -136,7 +112,7 @@ GEM
bootstrap-switch-rails (3.3.3)
bootstrap3-datetimepicker-rails (4.17.47)
momentjs-rails (>= 2.8.1)
- builder (3.2.4)
+ builder (3.3.0)
bullet (7.0.2)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
@@ -151,7 +127,7 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
- carrierwave (2.2.5)
+ carrierwave (2.2.6)
activemodel (>= 5.0.0)
activesupport (>= 5.0.0)
addressable (~> 2.6)
@@ -182,7 +158,7 @@ GEM
rest-client (>= 2.0.0)
cocoon (1.2.15)
colorize (0.8.1)
- concurrent-ruby (1.2.3)
+ concurrent-ruby (1.3.3)
countable-rails (0.0.1)
railties (>= 3.1)
crack (0.4.5)
@@ -259,7 +235,7 @@ GEM
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
- erubi (1.12.0)
+ erubi (1.13.0)
execjs (2.8.1)
factory_bot (6.2.1)
activesupport (>= 5.0.0)
@@ -314,7 +290,7 @@ GEM
httparty (0.21.0)
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
- i18n (1.14.1)
+ i18n (1.14.5)
concurrent-ruby (~> 1.0)
i18n_data (0.17.1)
simple_po_parser (~> 1.1)
@@ -331,7 +307,7 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
- jquery-ui-rails (6.0.1)
+ jquery-ui-rails (7.0.0)
railties (>= 3.2.16)
json (2.7.1)
json-schema (4.0.0)
@@ -363,7 +339,7 @@ GEM
net-imap
net-pop
net-smtp
- marcel (1.0.2)
+ marcel (1.0.4)
matrix (0.4.2)
method_source (1.0.0)
mime-types (3.4.1)
@@ -374,7 +350,7 @@ GEM
rake
mini_magick (4.12.0)
mini_mime (1.1.5)
- minitest (5.22.2)
+ minitest (5.24.1)
momentjs-rails (2.29.4.1)
railties (>= 3.1)
monetize (1.12.0)
@@ -402,11 +378,11 @@ GEM
next_rails (1.2.4)
colorize (>= 0.8.1)
nio4r (2.7.0)
- nokogiri (1.16.2-arm64-darwin)
+ nokogiri (1.16.6-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.16.2-x86_64-darwin)
+ nokogiri (1.16.6-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.16.2-x86_64-linux)
+ nokogiri (1.16.6-x86_64-linux)
racc (~> 1.4)
oauth2 (2.0.9)
faraday (>= 0.17.3, < 3.0)
@@ -490,8 +466,8 @@ GEM
public_suffix (5.0.4)
puma (6.4.2)
nio4r (~> 2.0)
- racc (1.7.3)
- rack (2.2.8)
+ racc (1.8.0)
+ rack (2.2.9)
rack-openid (1.4.2)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
@@ -499,20 +475,20 @@ GEM
rack
rack-test (2.1.0)
rack (>= 1.3)
- rails (7.0.8)
- actioncable (= 7.0.8)
- actionmailbox (= 7.0.8)
- actionmailer (= 7.0.8)
- actionpack (= 7.0.8)
- actiontext (= 7.0.8)
- actionview (= 7.0.8)
- activejob (= 7.0.8)
- activemodel (= 7.0.8)
- activerecord (= 7.0.8)
- activestorage (= 7.0.8)
- activesupport (= 7.0.8)
+ rails (7.0.8.4)
+ actioncable (= 7.0.8.4)
+ actionmailbox (= 7.0.8.4)
+ actionmailer (= 7.0.8.4)
+ actionpack (= 7.0.8.4)
+ actiontext (= 7.0.8.4)
+ actionview (= 7.0.8.4)
+ activejob (= 7.0.8.4)
+ activemodel (= 7.0.8.4)
+ activerecord (= 7.0.8.4)
+ activestorage (= 7.0.8.4)
+ activesupport (= 7.0.8.4)
bundler (>= 1.15.0)
- railties (= 7.0.8)
+ railties (= 7.0.8.4)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
@@ -527,9 +503,9 @@ GEM
rails-i18n (7.0.7)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
- railties (7.0.8)
- actionpack (= 7.0.8)
- activesupport (= 7.0.8)
+ railties (7.0.8.4)
+ actionpack (= 7.0.8.4)
+ activesupport (= 7.0.8.4)
method_source
rake (>= 12.2)
thor (~> 1.0)
@@ -551,7 +527,8 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
- rexml (3.2.6)
+ rexml (3.3.2)
+ strscan
rolify (6.0.1)
rqrcode (2.2.0)
chunky_png (~> 1.0)
@@ -578,7 +555,7 @@ GEM
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.0)
- rubocop (1.60.2)
+ rubocop (1.61.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
@@ -589,9 +566,11 @@ GEM
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
- rubocop-ast (1.30.0)
- parser (>= 3.2.1.0)
- rubocop-capybara (2.18.0)
+ rubocop-ast (1.31.1)
+ parser (>= 3.3.0.4)
+ rubocop-capybara (2.20.0)
+ rubocop (~> 1.41)
+ rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-performance (1.17.1)
rubocop (>= 1.7.0, < 2.0)
@@ -600,14 +579,15 @@ GEM
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
- rubocop-rspec (2.20.0)
+ rubocop-rspec (2.23.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
+ rubocop-factory_bot (~> 2.22)
ruby-oembed (0.16.1)
ruby-openid (2.9.2)
ruby-progressbar (1.13.0)
ruby-rc4 (0.1.5)
- ruby-vips (2.2.0)
+ ruby-vips (2.2.1)
ffi (~> 1.12)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
@@ -667,13 +647,14 @@ GEM
dante (>= 0.2.0)
multi_json (~> 1.0)
stripe (> 5, < 6)
+ strscan (3.1.0)
sys-uname (1.2.2)
ffi (~> 1.1)
sysexits (1.2.0)
temple (0.10.1)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
- thor (1.3.0)
+ thor (1.3.1)
tilt (2.1.0)
timecop (0.9.6)
timeout (0.4.1)
@@ -724,6 +705,7 @@ PLATFORMS
arm64-darwin-20
arm64-darwin-23
x86_64-darwin-21
+ x86_64-darwin-23
x86_64-linux
DEPENDENCIES
@@ -774,7 +756,7 @@ DEPENDENCIES
iso-639
jquery-datatables
jquery-rails
- jquery-ui-rails (~> 6.0.1)
+ jquery-ui-rails (~> 7.0.0)
json-schema
leaflet-rails
letter_opener
@@ -803,20 +785,6 @@ DEPENDENCIES
pronto-rubocop
puma
rails (~> 7.0)
- rails-assets-bootstrap!
- rails-assets-bootstrap-markdown!
- rails-assets-bootstrap-select!
- rails-assets-date.format!
- rails-assets-holderjs!
- rails-assets-jquery!
- rails-assets-jquery-smooth-scroll!
- rails-assets-markdown!
- rails-assets-momentjs!
- rails-assets-spectrum!
- rails-assets-tinycolor!
- rails-assets-to-markdown (~> 3)!
- rails-assets-trianglify!
- rails-assets-waypoints!
rails-controller-testing
rails-i18n
recaptcha
diff --git a/app/assets/javascripts/osem-schedule.js b/app/assets/javascripts/osem-schedule.js
index c233c877d..b38ae2cc8 100644
--- a/app/assets/javascripts/osem-schedule.js
+++ b/app/assets/javascripts/osem-schedule.js
@@ -15,10 +15,10 @@ var Schedule = {
schedule_id = schedule_id_param;
},
remove: function(element) {
- var e = $("#" + element);
- var event_schedule_id = e.attr("event_schedule_id");
- if(event_schedule_id != null){
- var my_url = url + '/' + event_schedule_id;
+ var e = $("#" + element);
+ var event_schedule_id = parseInt(e.attr("event_schedule_id"));
+ if(event_schedule_id > 0) {
+ var my_url = `${url}/${event_schedule_id}`;
var success_callback = function(data) {
e.attr("event_schedule_id", null);
e.appendTo($(".unscheduled-events"));
@@ -41,18 +41,18 @@ var Schedule = {
},
add: function (previous_parent, new_parent, event) {
event.appendTo(new_parent);
- var event_schedule_id = event.attr("event_schedule_id");
+ // Event Schedule Id could be an empty string.
+ var event_schedule_id = parseInt(event.attr("event_schedule_id"));
var my_url = url;
var type = 'POST';
var params = { event_schedule: {
room_id: new_parent.attr("room_id"),
start_time: (new_parent.attr("date") + ' ' + new_parent.attr("hour"))
}};
- if(event_schedule_id != null){
+ if (event_schedule_id > 0) {
type = 'PUT';
- my_url += ('/' + event_schedule_id);
- }
- else{
+ my_url += `/${event_schedule_id}`;
+ } else {
params['event_schedule']['event_id'] = event.attr("event_id");
params['event_schedule']['schedule_id'] = schedule_id;
}
@@ -82,30 +82,27 @@ $(document).ready( function() {
$('#current-event-btn').on('click', function() {
var now = new Date();
- var closestEventId = null;
+ var closestEvent = null;
var smallestDiff = Infinity;
- var i = 0;
$('.event-item').each(function() {
+ let $event = $(this), eventTimeStr = $event.data('time');
- var eventTimeStr = $(this).data('time');
-
- if (eventTimeStr) {
- var eventTime = new Date(eventTimeStr);
- var diff = Math.abs(eventTime - now);
-
- if (diff < smallestDiff) {
- smallestDiff = diff;
- closestEventId = $(this).attr('class').split(' ')[1];
- }
- }
+ if (!eventTimeStr) { return; }
+
+ var eventTime = new Date(eventTimeStr);
+ var diff = Math.abs(eventTime - now);
+ if (diff < smallestDiff) {
+ smallestDiff = diff;
+ closestEvent = $event;
+ }
});
- if (closestEventId) {
- //Instead of relying on hash it's probably better to scroll using javascript
- //Since the users and click button->scroll->click again, which won't re-scroll
+ if (closestEvent) {
+ // Instead of relying on hash it's probably better to scroll using javascript
+ // Since the users and click button->scroll->click again, which won't re-scroll
$('.highlighted').removeClass('highlighted');
- $('.' + closestEventId).addClass('highlighted').get(0).scrollIntoView({ behavior: 'smooth', block: 'start' });
+ $(closestEvent).addClass('highlighted').get(0).scrollIntoView({ behavior: 'smooth', block: 'start' });
}
});
diff --git a/app/assets/javascripts/osem-switch.js b/app/assets/javascripts/osem-switch.js
index 5e8c47921..b4517c1cb 100644
--- a/app/assets/javascripts/osem-switch.js
+++ b/app/assets/javascripts/osem-switch.js
@@ -1,7 +1,5 @@
function checkboxSwitch(selector){
- $(selector).bootstrapSwitch(
-
- );
+ $(selector).bootstrapSwitch();
$(selector).on('switchChange.bootstrapSwitch', function(event, state) {
var url = $(this).attr('url') + state;
diff --git a/app/assets/javascripts/osem.js b/app/assets/javascripts/osem.js
index 9749a2fa6..3185a984c 100644
--- a/app/assets/javascripts/osem.js
+++ b/app/assets/javascripts/osem.js
@@ -49,7 +49,7 @@ $(function () {
$('.' + id).collapse('hide');
$(`#event_type_${$(this).val()}-help.${id}`).collapse('show');
- $(`#event_type_${$(this).val()}-instructions.${id}`).collapse('show');w
+ $(`#event_type_${$(this).val()}-instructions.${id}`).collapse('show');
});
$('.dropdown-toggle').dropdown();
@@ -132,6 +132,7 @@ function get_color() {
}
function word_count(text, divId, maxcount) {
+ if (!text) { return; }
var area = document.getElementById(text.id)
Countable.once(area, function(counter) {
@@ -162,58 +163,6 @@ function replace_defaut_submission_text(input_selector, new_text, valid_defaults
});
}
-/* Wait for the DOM to be ready before attaching events to the elements */
-$( document ).ready(function() {
- /* Set the minimum and maximum proposal abstract word length */
- function updateEventTypeRequirements() {
- var $selected = $("#event_event_type_id option:selected")
- var max = $selected.data("max-words");
- var min = $selected.data("min-words");
-
- // We replace the default text only if the current field is empty,
- // or is set to the default text of another event type.
- replace_defaut_submission_text(
- '#event_submission_text',
- $selected.data("instructions"),
- $("#event_event_type_id option").toArray().map(e => $(e).data('instructions'))
- );
-
- $("#abstract-maximum-word-count").text(max);
- $("#submission-maximum-word-count").text(max);
- $("#abstract-minimum-word-count").text(min);
- $("#submission-minimum-word-count").text(min);
- word_count($('#event_abstract').get(0), 'abstract-count', max);
- }
- $("#event_event_type_id").change(updateEventTypeRequirements);
- updateEventTypeRequirements();
-
- /* Count the proposal abstract length */
- $("#event_abstract").on('input', function() {
- var $selected = $("#event_event_type_id option:selected")
- var max = $selected.data("max-words");
- word_count(this, 'abstract-count', max);
- } );
-
- /* Count the submission text length */
- $("#event_submission_text").bind('change keyup paste input', function() {
- var $selected = $("event_event_type_id option:selected")
- var max = $selected.data("max-words");
- word_count(this, 'submission-count', max);
- });
-
- /* Listen for reset template button, wait for confirm, and reset. */
- $('.js-resetSubmissionText').click((e) => {
- let $selected = $("#event_event_type_id option:selected");
- let $this = $(e.target);
- let affirm = confirm($this.data('confirm'));
- if (affirm) {
- let sub_text = $('#event_submission_text');
- sub_text.val($selected.data('instructions'));
- sub_text.trigger('change');
- }
- });
-});
-
/* Commodity function for modal windows */
window.build_dialog = function(selector, content) {
diff --git a/app/controllers/admin/commercials_controller.rb b/app/controllers/admin/commercials_controller.rb
index 093ea3914..0b7c8af3f 100644
--- a/app/controllers/admin/commercials_controller.rb
+++ b/app/controllers/admin/commercials_controller.rb
@@ -90,9 +90,7 @@ def aggregate_errors(errors)
end
def commercial_params
- params.require(:commercial).permit(:title, :url).tap do |params|
- params[:url] = Commercial.generate_snap_embed(params[:url]) if params[:url]
- end
+ params.require(:commercial).permit(:title, :url)
end
end
end
diff --git a/app/controllers/admin/venue_commercials_controller.rb b/app/controllers/admin/venue_commercials_controller.rb
index 11a87d199..753817fd0 100644
--- a/app/controllers/admin/venue_commercials_controller.rb
+++ b/app/controllers/admin/venue_commercials_controller.rb
@@ -38,7 +38,7 @@ def destroy
end
def render_commercial
- result = Commercial.render_from_url(params[:url])
+ result = Commercial.render_from_url(params[:url], params[:title])
if result[:error]
render plain: result[:error], status: :bad_request
else
diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb
index 1e60e6466..af8b286b5 100644
--- a/app/controllers/conferences_controller.rb
+++ b/app/controllers/conferences_controller.rb
@@ -9,7 +9,7 @@ class ConferencesController < ApplicationController
def index
@current = Conference.upcoming.reorder(start_date: :asc)
- @antiquated = Conference.past.select { |conf| conf.splashpage&.public? }
+ @antiquated = Conference.past.joins(:splashpage).where(splashpage: { public: true }).includes(:venue, :program, :splashpage, :registration_period)
render :new_install if @antiquated.empty? && @current.empty? && User.empty?
end
diff --git a/app/controllers/payments_controller.rb b/app/controllers/payments_controller.rb
index e86f9ffb7..17a4b94b2 100644
--- a/app/controllers/payments_controller.rb
+++ b/app/controllers/payments_controller.rb
@@ -28,6 +28,9 @@ def new
def create
@payment = Payment.new payment_params
+ session[:selected_currency] = params[:currency] if params[:currency].present?
+ selected_currency = session[:selected_currency] || @conference.tickets.first.price_currency
+ from_currency = @conference.tickets.first.price_currency
if @payment.purchase && @payment.save
update_purchased_ticket_purchases
@@ -47,7 +50,8 @@ def create
notice: 'Thanks! Your ticket is booked successfully.'
end
else
- @total_amount_to_pay = convert_currency(@conference, Ticket.total_price(@conference, current_user, paid: false), from_currency, selected_currency)
+ # TODO-SNAPCON: This case is not tested at all
+ @total_amount_to_pay = CurrencyConversion.convert_currency(@conference, Ticket.total_price(@conference, current_user, paid: false), from_currency, selected_currency)
@unpaid_ticket_purchases = current_user.ticket_purchases.unpaid.by_conference(@conference)
flash.now[:error] = @payment.errors.full_messages.to_sentence + ' Please try again with correct credentials.'
render :new
diff --git a/app/controllers/proposals_controller.rb b/app/controllers/proposals_controller.rb
index 23087362d..2c3281e9a 100644
--- a/app/controllers/proposals_controller.rb
+++ b/app/controllers/proposals_controller.rb
@@ -41,6 +41,7 @@ def edit
def create
@url = conference_program_proposals_path(@conference.short_title)
+ @superevents = @program.events.where(superevent: true)
# We allow proposal submission and sign up on same page.
# If user is not signed in then first create new user and then sign them in
@@ -80,6 +81,7 @@ def create
def update
@url = conference_program_proposal_path(@conference.short_title, params[:id])
+ @superevents = @program.events.where(superevent: true)
track = Track.find_by(id: params[:event][:track_id])
if track && !track.cfp_active
@@ -216,6 +218,6 @@ def event_params
end
def user_params
- params.require(:user).permit(:email, :password, :password_confirmation, :username, :is_admin)
+ params.require(:user).permit(:email, :password, :password_confirmation, :username)
end
end
diff --git a/app/datatables/registration_datatable.rb b/app/datatables/registration_datatable.rb
index 1639ef422..d8969fff8 100644
--- a/app/datatables/registration_datatable.rb
+++ b/app/datatables/registration_datatable.rb
@@ -5,6 +5,8 @@ class RegistrationDatatable < AjaxDatatablesRails::ActiveRecord
def_delegator :@view, :dom_id
def_delegator :@view, :edit_admin_conference_registration_path
+ # def_delegator :@view, :delete_admin_conference_registration_path
+ def_delegator :@view, :admin_conference_registration_toggle_attendance_path
def initialize(params, opts = {})
@view = opts[:view_context]
@@ -17,6 +19,8 @@ def view_columns
name: { source: 'User.name' },
email: { source: 'User.email' },
accepted_code_of_conduct: { source: 'Registration.accepted_code_of_conduct', searchable: false },
+ attended: { source: 'Registration.attended', searchable: false },
+ ticket_price: { source: 'TicketPurchase.amount_paid' },
ticket_type: { source: 'Ticket.title' },
actions: { source: 'Registration.id', searchable: false, orderable: false }
}
@@ -34,6 +38,14 @@ def conference_role_titles(record)
end.compact
end
+ def registration_ticket(record)
+ record.user.tickets.for_registration(conference)
+ end
+
+ def registration_ticket_price(record)
+ record.user.ticket_purchases.where(ticket: registration_ticket(record)).first.amount_paid
+ end
+
def data
records.map do |record|
{
@@ -42,7 +54,9 @@ def data
roles: conference_role_titles(record.user),
email: record.email,
accepted_code_of_conduct: !!record.accepted_code_of_conduct, # rubocop:disable Style/DoubleNegation
- ticket_type: record.user.tickets.where(conference: conference).pluck(:title),
+ ticket_type: registration_ticket(record).title,
+ ticket_price: registration_ticket_price(record),
+ attended: record.attended?,
edit_url: edit_admin_conference_registration_path(conference, record),
DT_RowId: dom_id(record)
}
@@ -50,7 +64,7 @@ def data
end
def get_raw_records # rubocop:disable Naming/AccessorMethodName
- conference.registrations.includes(user: %i[roles tickets]).references(:users, :roles).distinct
+ conference.registrations.includes(user: %i[roles tickets ticket_purchases]).references(:users, :roles).distinct
end
# override upstream santitation, which converts everything to strings
diff --git a/app/helpers/conference_helper.rb b/app/helpers/conference_helper.rb
index d393b6099..3a2c3a136 100644
--- a/app/helpers/conference_helper.rb
+++ b/app/helpers/conference_helper.rb
@@ -55,8 +55,9 @@ def icalendar_proposals(calendar, proposals, conference)
location += "#{v.country_name}, " if v.country_name
e.location = location
end
- e.categories = conference.title, "Difficulty: #{proposal.difficulty_level.title}",
- "Track: #{proposal.track.name}"
+ e.categories = conference.title
+ e.categories << "Difficulty: #{proposal.difficulty_level.title}" if proposal.difficulty_level.present?
+ e.categories << "Track: #{proposal.track.name}" if proposal.track.present?
end
end
calendar
diff --git a/app/mailers/mailbot.rb b/app/mailers/mailbot.rb
index 32dfb7c2a..58a9f6a9b 100644
--- a/app/mailers/mailbot.rb
+++ b/app/mailers/mailbot.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true
-YTLF_TICKET_ID = Rails.configuration.mailbot[:ytlf_ticket_id]
-
class Mailbot < ApplicationMailer
helper ApplicationHelper
helper ConferenceHelper
@@ -32,28 +30,19 @@ def ticket_confirmation_mail(ticket_purchase)
attachments["ticket_for_#{@conference.short_title}_#{physical_ticket.id}.pdf"] = pdf.render
end
- if @ticket_purchase.ticket_id == YTLF_TICKET_ID
- template_name = 'young_thinkers_ticket_confirmation_template'
- mail(subject: "#{@conference.title} | Ticket Confirmation and PDF!", template_name: template_name)
+ email_subject = "#{@conference.title} | Ticket Confirmation and PDF!"
+ email_template = 'ticket_confirmation_template'
+
+ if @ticket_purchase.ticket.email_subject.present?
+ email_subject = @ticket_purchase.render_email_data(@ticket_purchase.ticket.email_subject)
end
- # if email subject is empty, use custom template
- if @ticket_purchase.ticket.email_subject.empty? && !@ticket_purchase.ticket.email_body.empty?
- @ticket_purchase.ticket.email_body = @ticket_purchase.generate_confirmation_mail(@ticket_purchase.ticket.email_body)
- mail(subject: "#{@conference.title} | Ticket Confirmation and PDF!", template_name: 'custom_ticket_confirmation_template')
- # if email body is empty, use default template with subject
- elsif !@ticket_purchase.ticket.email_subject.empty? && @ticket_purchase.ticket.email_body.empty?
- @ticket_purchase.ticket.email_subject = @ticket_purchase.generate_confirmation_mail(@ticket_purchase.ticket.email_subject)
- mail(subject: @ticket_purchase.ticket.email_subject, template_name: 'ticket_confirmation_template')
- # if both exist, use custom
- elsif !@ticket_purchase.ticket.email_subject.empty? && !@ticket_purchase.ticket.email_body.empty?
- @ticket_purchase.ticket.email_body = @ticket_purchase.generate_confirmation_mail(@ticket_purchase.ticket.email_body)
- @ticket_purchase.ticket.email_subject = @ticket_purchase.generate_confirmation_mail(@ticket_purchase.ticket.email_subject)
- mail(subject: @ticket_purchase.ticket.email_subject, template_name: 'custom_ticket_confirmation_template')
- # if both empty, use default
- else
- mail(subject: "#{@conference.title} | Ticket Confirmation and PDF!", template_name: 'ticket_confirmation_template')
+ if @ticket_purchase.ticket.email_body.present?
+ @rendered_email_body = @ticket_purchase.render_email_data(@ticket_purchase.ticket.email_body)
+ email_template = 'custom_ticket_confirmation_template'
end
+
+ mail(subject: email_subject, template_name: email_template)
end
def acceptance_mail(event)
diff --git a/app/models/commercial.rb b/app/models/commercial.rb
index 42d4ccadf..b01da1aff 100644
--- a/app/models/commercial.rb
+++ b/app/models/commercial.rb
@@ -28,51 +28,30 @@ class Commercial < ApplicationRecord
validate :valid_url
- def self.render_from_url(url)
+ def self.render_from_url(url, title = nil)
register_provider
- url = generate_snap_embed(url)
begin
resource = OEmbed::Providers.get(url, maxwidth: 560, maxheight: 315)
{ html: resource.html.html_safe }
rescue StandardError
- { html: iframe_fallback(url) }
+ { html: EmbeddableURL.new(url, title).render_embed.html_safe }
# { error: exception.message }
end
end
- def self.generate_snap_embed(url)
- return url unless url
-
- uri = URI.parse(url)
- if uri.host == 'snap.berkeley.edu' && uri.path == '/project'
- args = URI.decode_www_form(uri.query).to_h
- else
- return url
- end
- if args.key?('username') && args.key?('projectname')
- new_query = URI.encode_www_form({
- 'projectname' => args['projectname'],
- 'username' => args['username'],
- 'showTitle' => 'true',
- 'showAuthor' => 'true',
- 'editButton' => 'true',
- 'pauseButton' => 'true'
- })
- new_uri = URI::HTTPS.build(
- host: uri.host,
- path: '/embed',
- query: new_query
- )
- return new_uri.to_s
- end
- url
- end
-
- def self.iframe_fallback(url)
- "".html_safe
+ # TODO: Is this necessary?
+ def self.iframe_fallback(url, title)
+ iframe = <<~HTML
+
+ HTML
+ iframe.html_safe
end
def self.read_file(file)
+ require 'csv'
errors = {}
errors[:no_event] = []
errors[:validation_errors] = []
@@ -96,7 +75,8 @@ def self.read_file(file)
commercial = event.commercials.new(title: title, url: url)
unless commercial.save
- errors[:validation_errors] << ("Could not create materials for event with ID #{event.id} (" + commercial.errors.full_messages.to_sentence + ')')
+ errors[:validation_errors] <<
+ "Could not create materials for event with ID #{event.id} (#{commercial.errors.full_messages.to_sentence})"
end
end
errors
@@ -105,7 +85,9 @@ def self.read_file(file)
private
def valid_url
- result = Commercial.render_from_url(url)
+ return unless url
+
+ result = Commercial.render_from_url(url, title)
errors.add(:base, result[:error]) if result[:error]
end
diff --git a/app/models/conference.rb b/app/models/conference.rb
index dcf525754..21717f7ef 100644
--- a/app/models/conference.rb
+++ b/app/models/conference.rb
@@ -44,9 +44,9 @@ class Conference < ApplicationRecord
# Dependent destroy will fail as roles#destroy will be cancelled,hence delete_all
resourcify :roles, dependent: :delete_all
- default_scope { order('start_date DESC') }
- scope :upcoming, -> { where('end_date >= ?', Date.current) }
- scope :past, -> { where('end_date < ?', Date.current) }
+ default_scope { order('conferences.start_date DESC') }
+ scope :upcoming, -> { where('conferences.end_date >= ?', Date.current) }
+ scope :past, -> { where('conferences.end_date < ?', Date.current) }
belongs_to :organization
delegate :code_of_conduct, to: :organization
diff --git a/app/models/ticket_purchase.rb b/app/models/ticket_purchase.rb
index 5eced20ec..2577269e8 100644
--- a/app/models/ticket_purchase.rb
+++ b/app/models/ticket_purchase.rb
@@ -125,7 +125,7 @@ def registration_ticket_already_purchased
end
end
- def generate_confirmation_mail(event_template)
+ def render_email_data(event_template)
parser = EmailTemplateParser.new(conference, user)
values = parser.retrieve_values(nil, nil, quantity, ticket)
EmailTemplateParser.parse_template(event_template, values)
diff --git a/app/services/embeddable_url.rb b/app/services/embeddable_url.rb
new file mode 100644
index 000000000..289a69208
--- /dev/null
+++ b/app/services/embeddable_url.rb
@@ -0,0 +1,99 @@
+# Transform a URL to a version that allows iframes
+
+class EmbeddableURL
+ attr_accessor :url, :title
+
+ DEFAULT_FRAME_ATTRS = 'width=560 height=315 frameborder=0 allowfullscreen'.freeze
+
+ TRANSFORMATIONS = {
+ /snap\.berkeley\.edu/ => :snap,
+ /docs\.google\.com/ => :google_docs,
+ /dropbox\.com/ => :dropbox
+ }.freeze
+
+ def initialize(url, title)
+ # Do some normalizing so that URIs parse correctly.
+ if url
+ self.url = url.strip
+ end
+ self.title = title
+ end
+
+ def render_embed
+ return render_dropbox if url.include?('dropbox.com')
+
+ # TODO-A11Y: Set an iframe title
+ ""
+ end
+
+ def iframe_url
+ TRANSFORMATIONS.each do |regex, fn|
+ return send(fn, url) if url.match?(regex)
+ end
+ url
+ end
+
+ # TODO: Consider adjusting the id / loading if > 1 dropbox embed per page.
+ def render_dropbox
+ <<~HTML
+
+ HTML
+ end
+
+ private
+
+ def optional_params
+ return '' unless url.include?('snap.berkeley')
+
+ 'allow="geolocation;microphone;camera"'
+ end
+
+ def google_docs(url)
+ # replace /edit, /share, /comment with /embed and remove the querystring
+ url.gsub(%r{(/edit|/share|/comment).*}, '/embed')
+ end
+
+ def dropbox(url)
+ # debugger
+ uri = URI.parse(url)
+ params = URI.decode_www_form(uri.query)&.to_h
+ params.delete('raw')
+ params['dl'] = '0'
+ # params['rlkey'] = params['rlkey']
+ uri.query = params.to_query
+ uri.to_s
+ end
+
+ def snap(url)
+ uri = URI.parse(url)
+ return url if uri.query.blank?
+
+ args = URI.decode_www_form(uri.query).to_h
+ username = args['username'] || args['user']
+ projectname = args['projectname'] || args['project']
+
+ return url if username.blank? || projectname.blank?
+
+ query = URI.encode_www_form({
+ 'projectname' => projectname,
+ 'username' => username,
+ 'showTitle' => 'true',
+ 'showAuthor' => 'true',
+ 'editButton' => 'true',
+ 'pauseButton' => 'true'
+ })
+ URI::HTTPS.build(host: uri.host, path: '/embed', query: query).to_s
+ end
+
+ def iframe_title
+ if title
+ "title='#{title} Embedded Media'"
+ else
+ 'title="Embedded Media for Presentation"'
+ end
+ end
+end
diff --git a/app/views/admin/events/_form.html.haml b/app/views/admin/events/_form.html.haml
index 538d842a6..ca8b6f547 100644
--- a/app/views/admin/events/_form.html.haml
+++ b/app/views/admin/events/_form.html.haml
@@ -28,7 +28,7 @@
= form_for(@event.commercials.new, url: conference_program_proposal_commercials_path(conference_id: @conference.short_title, proposal_id: @event)) do |f|
= render 'proposals/commercial_form_fields', f: f, commercial: @event.commercials.build
%hr
- - @event.commercials.each_slice(3) do |slice|
+ - @event.commercials.includes([:versions]).each_slice(3) do |slice|
.row
- slice.each do |commercial|
- if commercial.persisted?
diff --git a/app/views/admin/events/index.html.haml b/app/views/admin/events/index.html.haml
index 6f68faee1..2d1ac6372 100644
--- a/app/views/admin/events/index.html.haml
+++ b/app/views/admin/events/index.html.haml
@@ -66,6 +66,7 @@
%th Rating
%th Submitter
%th Speakers
+ %th Volunteers
- if @program.languages.present?
%th Language
%th Requires Registration
diff --git a/app/views/admin/registrations/index.html.haml b/app/views/admin/registrations/index.html.haml
index 45f66b232..c756e8dd2 100644
--- a/app/views/admin/registrations/index.html.haml
+++ b/app/views/admin/registrations/index.html.haml
@@ -28,6 +28,8 @@
%th{ width: '25%' } Name
%th{ width: '0' } E-Mail
%th{ width: '0' } Ticket Type
+ %th{ width: '0' } Price
+ %th{ width: '0' } Attended
%th{ width: '0' }
%abbr{ title: 'Code of Conduct' } CoC
%th{ width: '0' } Actions
@@ -55,12 +57,12 @@
{
"data": "name",
"className": "truncate",
- "render": function(data, type, row) {
- var content = '' + data + ' ';
- $.each(row.roles, function(index, role){
- content += ' ' + role + ' '
- });
- return content;
+ "render": (data, type, row) => {
+ return `
+ ${data}
+
+ ${row.roles.map(role => ` ${role} `)}
+ `;
}
},
{
@@ -69,20 +71,42 @@
{
"data": "ticket_type"
},
+ {
+ "data": "ticket_price",
+ "render": data => `$${data}`
+ },
+ {
+ "data": "attended",
+ "search": data => data,
+ "render": (data, _type, row) => {
+ let js_url = "#{toggle_attendance_admin_conference_registration_path(@conference.short_title, id: 'ROW_ID')}";
+ return `
+ ${data}
+
+ `;
+ }
+ },
{
"data": "accepted_code_of_conduct",
"className": "code-of-conduct text-center",
"searchable": false,
+ "visible": codeOfConductPresent
},
{
"data": "actions",
"className": "actions",
"searchable": false,
"sortable": false,
- "render": function (data, type, row, meta) {
- return '';
+ "render": (data, type, row) => {
+ return ``;
}
}
]
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index 03f5684f0..d479390e7 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -15,9 +15,13 @@
%tr
%th{ width: '0' } ID
%th{ width: '0' } Confirmed?
- %th{ width: '0' } Email
- %th{ width: '30%' } Name
- %th{ width: '20%' } Conferences Attended
+ %th{ width: '0' } Name
+ %th{ width: '0' } EMail
+ %th{ width: '0' } Username
+ %th{ width: '15%' }
+ Conferences
+ %br
+ Attended
%th{ width: '50%' } Roles
%th{ width: '0' } Actions
%th{ style: 'display: none' } Confirmed?
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index f73e125a4..64374c3f4 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -23,6 +23,7 @@
- if @conference && @conference.custom_css
%style{type: 'text/css'}
= @conference.custom_css.html_safe
+ = yield(:script_head)
%body{ class: ("conference-#{@conference.short_title}" if @conference) }
= render 'layouts/navigation', conference: @conference
diff --git a/app/views/mailbot/custom_ticket_confirmation_template.html.erb b/app/views/mailbot/custom_ticket_confirmation_template.html.erb
index d5fa91b3c..d58c7d910 100644
--- a/app/views/mailbot/custom_ticket_confirmation_template.html.erb
+++ b/app/views/mailbot/custom_ticket_confirmation_template.html.erb
@@ -1,7 +1,7 @@
<%= render partial: "layouts/mailbot_header" %>
- <%= @ticket_purchase.ticket.email_body %>
+ <%= @rendered_email_body %>
<%= render partial: "layouts/mailbot_footer" %>
diff --git a/app/views/mailbot/custom_ticket_confirmation_template.text.erb b/app/views/mailbot/custom_ticket_confirmation_template.text.erb
index 426630251..50239f3bd 100644
--- a/app/views/mailbot/custom_ticket_confirmation_template.text.erb
+++ b/app/views/mailbot/custom_ticket_confirmation_template.text.erb
@@ -1 +1 @@
-<%= @ticket_purchase.ticket.email_body %>
\ No newline at end of file
+<%= @rendered_email_body %>
diff --git a/app/views/mailbot/young_thinkers_ticket_confirmation_template.html.erb b/app/views/mailbot/young_thinkers_ticket_confirmation_template.html.erb
deleted file mode 100644
index d35d8a1f9..000000000
--- a/app/views/mailbot/young_thinkers_ticket_confirmation_template.html.erb
+++ /dev/null
@@ -1,16 +0,0 @@
-<%= render partial: "layouts/mailbot_header" %>
-
-
- Dear <%= @user.name %>,
-
- Thanks! You have successfully booked <%= @ticket_purchase.quantity %> <%= @ticket_purchase.ticket.title %> ticket(s) for the event <%= @conference.title %>. Your transaction id is <%= @ticket_purchase.id %>.
-
- Please, find the ticket(s) pdf attached.
-
- The SAP Young Thinkers team will reach out to you with information on how to participate in the event soon. In the meantime, you can check the event page (https://events.sap.com/yt-learning-festival-at-snapcon-2020/en/home) or send an email with your questions to youngthinkers@sap.com.
-
- Best wishes,
- <%= @conference.title %> Team
-
-
-<%= render partial: "layouts/mailbot_footer" %>
\ No newline at end of file
diff --git a/app/views/proposals/_form.html.haml b/app/views/proposals/_form.html.haml
index 150083d4c..6d5badcb2 100644
--- a/app/views/proposals/_form.html.haml
+++ b/app/views/proposals/_form.html.haml
@@ -96,3 +96,55 @@
%p.text-right
= f.submit @event.persisted? ? 'Update Proposal' : 'Create Proposal', class: 'btn btn-success'
+
+- content_for :script_head do
+ :javascript
+ /* Wait for the DOM to be ready before attaching events to the elements */
+ $( document ).ready(function() {
+ /* Set the minimum and maximum proposal abstract word length */
+ function updateEventTypeRequirements() {
+ var $selected = $("#event_event_type_id option:selected")
+ var max = $selected.data("max-words");
+ var min = $selected.data("min-words");
+
+ // We replace the default text only if the current field is empty,
+ // or is set to the default text of another event type.
+ replace_defaut_submission_text(
+ '#event_submission_text',
+ $selected.data("instructions"),
+ $("#event_event_type_id option").toArray().map(e => $(e).data('instructions'))
+ );
+
+ $("#abstract-maximum-word-count").text(max);
+ $("#abstract-minimum-word-count").text(min);
+ word_count($('#event_abstract').get(0), 'abstract-count', max);
+ }
+ $("#event_event_type_id").change(updateEventTypeRequirements);
+ updateEventTypeRequirements();
+
+ /* Count the proposal abstract length */
+ $("#event_abstract").on('input', function() {
+ var $selected = $("#event_event_type_id option:selected")
+ var max = $selected.data("max-words");
+ word_count(this, 'abstract-count', max);
+ } );
+
+ /* Count the submission text length */
+ $("#event_submission_text").bind('change keyup paste input', function() {
+ var $selected = $("event_event_type_id option:selected")
+ var max = $selected.data("max-words");
+ word_count(this, 'submission-count', max);
+ });
+
+ $('.js-resetSubmissionText').click((e) => {
+ console.log('CLICKED')
+ let $selected = $("#event_event_type_id option:selected");
+ let $this = $(e.target);
+ let affirm = confirm($this.data('confirm'));
+ if (affirm) {
+ let sub_text = $('#event_submission_text');
+ sub_text.val($selected.data('instructions'));
+ sub_text.trigger('change');
+ }
+ });
+ });
diff --git a/app/views/proposals/_submission_type_content_form.haml b/app/views/proposals/_submission_type_content_form.haml
index c7b947e25..76b915047 100644
--- a/app/views/proposals/_submission_type_content_form.haml
+++ b/app/views/proposals/_submission_type_content_form.haml
@@ -3,10 +3,8 @@
.form-group
= f.label :event_type_id, "Type"
- - if current_user&.is_admin
- = f.select :event_type_id, event_type_select_options(@conference.program.event_types), { include_blank: false }, { class: 'select-help-toggle form-control' }
- - else
- = f.select :event_type_id, event_type_select_options(@conference.program.event_types.available_for_public), { include_blank: false }, { class: 'select-help-toggle form-control' }
+ - visible_event_types = current_user&.is_admin ? @conference.program.event_types : @conference.program.event_types.available_for_public
+ = f.select :event_type_id, event_type_select_options(visible_event_types), { include_blank: false }, { class: 'select-help-toggle form-control' }
- program.event_types.each do |event_type|
.help-block.event_event_type_id.collapse{ id: "#{dom_id(event_type)}-help" }
diff --git a/app/views/schedules/_date_event_types.haml b/app/views/schedules/_date_event_types.haml
index 2ba3cd4d2..c129e782e 100644
--- a/app/views/schedules/_date_event_types.haml
+++ b/app/views/schedules/_date_event_types.haml
@@ -5,6 +5,8 @@
The conference timezone is #{timezone_mapping(conference.timezone)}.
- if current_user
Visit your #{link_to('user profile page', edit_user_path(current_user.id))} to set your timezone.
+ - else
+ (#{link_to('Log in', new_user_session_path)} to view the schedule in your preferred timezone.)
- if current_user
%p.text-center
Click the star next to each event to add or remove it from
diff --git a/app/views/schedules/_event.html.haml b/app/views/schedules/_event.html.haml
index 122d3e1e1..e3438bde0 100644
--- a/app/views/schedules/_event.html.haml
+++ b/app/views/schedules/_event.html.haml
@@ -14,7 +14,7 @@
%h3.event-panel-title
= link_to conference_program_proposal_path(@conference.short_title, event.id),
- style: color_style do
+ style: "#{color_style}; line-height: 1.7" do
= event.title
- if event.subtitle.present?
%br
diff --git a/app/views/schedules/_event_mini.html.haml b/app/views/schedules/_event_mini.html.haml
index b0e29509c..27acb4a77 100644
--- a/app/views/schedules/_event_mini.html.haml
+++ b/app/views/schedules/_event_mini.html.haml
@@ -25,8 +25,8 @@
%span= " at #{new_start_time.strftime('%l:%M %P')}"
= join_event_link(event, event_schedule, current_user, small: true)
%p
- = truncate(markdown(event.abstract), length: 250, escape: false)
- - if event.subevents.present?
+ = markdown(truncate(event.abstract, length: 256))
+ - if event.program_subevents.present?
%ul
- event.program_subevents.each do |subevent|
%li= link_to(subevent.title, conference_program_proposal_path(@conference.short_title, subevent.id))
diff --git a/app/views/schedules/events.html.haml b/app/views/schedules/events.html.haml
index 14a1669ca..a8079c9f2 100644
--- a/app/views/schedules/events.html.haml
+++ b/app/views/schedules/events.html.haml
@@ -40,38 +40,33 @@
.row
/ scheduled events
:ruby
- date = nil
- time = nil
- tz_object = current_user&.timezone ? current_user : @conference
+ prev_date, prev_time = nil
+ display_tz = current_user&.timezone.presence || @conference.timezone
/ TODO-SNAPCON: Explore caching this.
- - @events_schedules.each do |event_schedule|
- - next if event_schedule.event.parent_event.present?
- - new_start_time = convert_timezone(event_schedule.start_time, @conference.timezone, tz_object.timezone)
- - start_ymd = new_start_time.strftime('%Y-%m-%d')
- - unless start_ymd.eql?(date)
- .col-xs-12.col-md-12
- .date-content
- %span.date-title
- = inyourtz(event_schedule.start_time, @conference.timezone) do
- = date = start_ymd
- %a.pull-right{ title: "Go up", href: "#program" }
- %i.fa-solid.fa-angles-up.fa-lg{ 'aria-hidden': true }
- .col-xs-12.col-md-1
- - if !event_schedule.start_time.strftime('%H:%M').eql?(time) || !start_ymd.eql?(date)
- - time = new_start_time.strftime('%H:%M')
- = inyourtz(event_schedule.start_time, @conference.timezone) do
- = time + ' ' + timezone_text(tz_object)
- .col-xs-12.col-md-11
- - cache [@program, event_schedule, event_schedule.event, current_user, event_schedule.happening_now?, '#scheduled#full#panel'] do
- .event-item{ data: { time: event_schedule.start_time.iso8601 }, class: "event-#{event_schedule.event.id}" }
- = render 'event', event: event_schedule.event, event_schedule: event_schedule
+ - @events_schedules.select { |es| es.event.parent_event.nil? }.each do |event_schedule|
+ - event = event_schedule.event
+ - start_time = convert_timezone(event_schedule.start_time, @conference.timezone, display_tz)
+
+ - unless start_time.to_date.eql?(prev_date)
+ .date-content
+ %h2.date-title{ style: "margin: 0;" }
+ = prev_date = start_time.to_date
+ %a.pull-right{ title: "Go up", href: "#program" }
+ %i.fa-solid.fa-angles-up.fa-lg{ 'aria-hidden': true }
+ - if !start_time.eql?(prev_time)
+ - prev_time = start_time
+ %h3= start_time.strftime('%H:%M %p %Z')
+ .col-12
+ -# - cache [@program, event_schedule, event, current_user, event_schedule.happening_now?, '#scheduled#full#panel'] do
+ .event-item{ data: { time: event_schedule.start_time.iso8601 }, id: dom_id(event) }
+ = render 'event', event: event, event_schedule: event_schedule
/ confirmed events that are not scheduled
- if @unscheduled_events.any?
- .col-xs-12.col-md-12
+ .col-12
.date-content
- %span.date-title#unscheduled
+ %h2.date-title#unscheduled{ style: "margin: 0;" }
Unscheduled events
%a.pull-right{ title: "Go up", href: "#program" }
%i.fa-solid.fa-angles-up.fa-lg{ 'aria-hidden': true }
diff --git a/app/views/shared/_media_item.html.haml b/app/views/shared/_media_item.html.haml
index 367d04a2f..8e36eb4ad 100644
--- a/app/views/shared/_media_item.html.haml
+++ b/app/views/shared/_media_item.html.haml
@@ -15,7 +15,7 @@
- elsif commercial.commercial_type == 'YouTube'
%iframe{width: '560', height: '315', frameborder: '0', allowfullscreen: 'true', src: "https://www.youtube.com/embed/#{commercial.commercial_id}?rel=0"}
- elsif commercial.url
- = Commercial.render_from_url(commercial.url)[:html]
+ = Commercial.render_from_url(commercial.url, commercial.title)[:html]
- if commercial.url
= link_to('Open in a new tab', commercial.url, target: '_blank', class: 'btn btn-info btn-xs')
%br
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 1512c020b..275bd6525 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -66,8 +66,7 @@
# Test mailbot settings
config.mailbot = {
- ytlf_ticket_id: 50,
- bcc_address: 'test@test.com'
+ bcc_address: 'test@test.com'
}
# Use omniauth mock credentials
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 59431a74d..c139b2caa 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -144,8 +144,7 @@
# Mailbot settings
config.mailbot = {
- ytlf_ticket_id: ENV.fetch('YTLF_TICKET_ID', 50),
- bcc_address: ENV.fetch('OSEM_MESSAGE_BCC_ADDRESS', nil)
+ bcc_address: ENV.fetch('OSEM_MESSAGE_BCC_ADDRESS', nil)
}
config.after_initialize do
diff --git a/config/environments/test.rb b/config/environments/test.rb
index a7723d22d..279e313c9 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -59,7 +59,6 @@
# Test mailbot settings
config.mailbot = {
- ytlf_ticket_id: 50,
- bcc_address: 'test@test.com'
+ bcc_address: 'test@test.com'
}
end
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
index ac033bf9d..90ac51ca2 100644
--- a/config/initializers/inflections.rb
+++ b/config/initializers/inflections.rb
@@ -11,6 +11,6 @@
# end
# These inflection rules are supported but not enabled by default:
-# ActiveSupport::Inflector.inflections(:en) do |inflect|
-# inflect.acronym 'RESTful'
-# end
+ActiveSupport::Inflector.inflections(:en) do |inflect|
+ inflect.acronym 'URL'
+end
diff --git a/config/puma.rb b/config/puma.rb
index 35d73834e..c401d6fc2 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -25,12 +25,13 @@
# processes).
#
workers ENV.fetch('WEB_CONCURRENCY') { 2 }
+# Set a 10 minute timeout in development for debugging.
+worker_timeout 60 * 60 * 10 if ENV.fetch('RAILS_ENV') == 'development'
# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
# before forking the application. This takes advantage of Copy On Write
# process behavior so workers use less memory.
-#
preload_app!
lowlevel_error_handler do |ex, env|
diff --git a/db/migrate/20230418211400_add_currency_to_payments.rb b/db/migrate/20230418211400_add_currency_to_payments.rb
new file mode 100644
index 000000000..467a04f43
--- /dev/null
+++ b/db/migrate/20230418211400_add_currency_to_payments.rb
@@ -0,0 +1,5 @@
+class AddCurrencyToPayments < ActiveRecord::Migration[7.0]
+ def change
+ add_column :payments, :currency, :string
+ end
+end
diff --git a/db/migrate/20230418211410_add_currency_to_ticket_purchases.rb b/db/migrate/20230418211410_add_currency_to_ticket_purchases.rb
new file mode 100644
index 000000000..70e4f9d96
--- /dev/null
+++ b/db/migrate/20230418211410_add_currency_to_ticket_purchases.rb
@@ -0,0 +1,5 @@
+class AddCurrencyToTicketPurchases < ActiveRecord::Migration[7.0]
+ def change
+ add_column :ticket_purchases, :currency, :string
+ end
+end
diff --git a/db/migrate/20230418211400_create_currency_conversions.rb b/db/migrate/20230418211420_create_currency_conversions.rb
similarity index 79%
rename from db/migrate/20230418211400_create_currency_conversions.rb
rename to db/migrate/20230418211420_create_currency_conversions.rb
index 9c5100085..3403e779c 100644
--- a/db/migrate/20230418211400_create_currency_conversions.rb
+++ b/db/migrate/20230418211420_create_currency_conversions.rb
@@ -1,6 +1,6 @@
class CreateCurrencyConversions < ActiveRecord::Migration[7.0]
def change
- create_table :currency_conversions do |t|
+ create_table :currency_conversions, if_not_exists: true do |t|
t.decimal :rate
t.string :from_currency
t.string :to_currency
diff --git a/db/migrate/20240422200831_add_amount_paid_cents_to_ticket_purchases.rb b/db/migrate/20240422200831_add_amount_paid_cents_to_ticket_purchases.rb
index 349471109..b8176309f 100644
--- a/db/migrate/20240422200831_add_amount_paid_cents_to_ticket_purchases.rb
+++ b/db/migrate/20240422200831_add_amount_paid_cents_to_ticket_purchases.rb
@@ -3,17 +3,6 @@ def up
add_column :ticket_purchases, :amount_paid_cents, :integer, default: 0
TicketPurchase.reset_column_information
-
- TicketPurchase.find_each do |purchase|
- converted_amount = CurrencyConversion.convert_currency(
- purchase.conference,
- purchase.price,
- purchase.price_currency,
- purchase.currency
- )
-
- purchase.update_column(:amount_paid_cents, converted_amount.fractional)
- end
end
def down
diff --git a/features/conferences/all_events.feature b/features/conferences/all_events.feature
index 4df1fe39b..409c91da1 100644
--- a/features/conferences/all_events.feature
+++ b/features/conferences/all_events.feature
@@ -9,7 +9,7 @@ Scenario: Display events using the conference's timezone
And I should see "All events are currently displayed in PDT (UTC -7)."
And I should see the following data: 8:00 am - 8:30 am PDT, 8:30 am - 9:00 am PDT
And I should see the following data in order: Dates, 2014-05-03, 2014-05-04, 2014-05-05, 2014-05-06, 2014-05-07, Unscheduled
- And I should see the following data in order: 2014-05-03, 08:00 PDT, first_scheduled_event, 8:00 am, first_scheduled_subevent, 08:30 PDT, multiple_speaker_event
+ And I should see the following data in order: 2014-05-03, 08:00 AM PDT, first_scheduled_event, 8:00 am, first_scheduled_subevent, 08:30 AM PDT, multiple_speaker_event
Scenario: Display events using the user's timezone
Given I sign in with username "admin" and password "password123"
@@ -18,4 +18,4 @@ Scenario: Display events using the user's timezone
And I should see "All events are currently displayed in AEST (UTC 10)."
And I should see the following data: 1:00 am - 1:30 am AEST, 1:30 am - 2:00 am AEST
And I should see the following data in order: Dates, 2014-05-04, 2014-05-05, 2014-05-06, 2014-05-07, 2014-05-08, Unscheduled
- And I should see the following data in order: 2014-05-04, 01:00 AEST, first_scheduled_event, 1:00 am, first_scheduled_subevent, 01:30 AEST, multiple_speaker_event
+ And I should see the following data in order: 2014-05-04, 01:00 AM AEST, first_scheduled_event, 1:00 am, first_scheduled_subevent, 01:30 AM AEST, multiple_speaker_event
diff --git a/lib/tasks/migrate_config.rake b/lib/tasks/migrate_config.rake
index 99081611d..7ee42cdc8 100644
--- a/lib/tasks/migrate_config.rake
+++ b/lib/tasks/migrate_config.rake
@@ -40,5 +40,18 @@ namespace :data do
puts "Migrated config/config.yml to .env.#{Rails.env}"
end
+
+ task :update_ticket_purchase_currency do
+ TicketPurchase.find_each do |purchase|
+ converted_amount = CurrencyConversion.convert_currency(
+ purchase.conference,
+ purchase.ticket.price_cents,
+ purchase.price_currency,
+ purchase.currency
+ )
+
+ purchase.update_column(:amount_paid_cents, converted_amount.fractional)
+ end
+ end
end
end
diff --git a/lib/tasks/migrate_currency.rake b/lib/tasks/migrate_currency.rake
new file mode 100644
index 000000000..b05304131
--- /dev/null
+++ b/lib/tasks/migrate_currency.rake
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+namespace :data do
+ namespace :migrate do
+ desc 'Update Currency of past ticket purchases'
+ task :update_ticket_purchase_currency do
+ TicketPurchase.where(currency: nil).update_all(currency: 'USD')
+ TicketPurchase.find_each do |purchase|
+ converted_amount = CurrencyConversion.convert_currency(
+ purchase.conference,
+ purchase.ticket.price_cents,
+ purchase.price_currency,
+ purchase.currency
+ )
+
+ purchase.update_column(:amount_paid_cents, converted_amount)
+ end
+ end
+ end
+end
diff --git a/package-lock.json b/package-lock.json
index fedc26385..e5e7a779a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,5 +1,5 @@
{
- "name": "snapcon2",
+ "name": "snapcon",
"lockfileVersion": 2,
"requires": true,
"packages": {
diff --git a/spec/features/currency_conversions_spec.rb b/spec/features/currency_conversions_spec.rb
index 38c42a4bb..229a7771d 100644
--- a/spec/features/currency_conversions_spec.rb
+++ b/spec/features/currency_conversions_spec.rb
@@ -6,7 +6,7 @@
let!(:conference) { create(:conference, title: 'ExampleCon') }
let!(:admin) { create(:admin) }
- context 'as an admin', js: true do
+ context 'as an admin', :js do
before do
sign_in admin
end
diff --git a/spec/features/event_schedules_spec.rb b/spec/features/event_schedules_spec.rb
index cc01677a5..bbb3eaf20 100644
--- a/spec/features/event_schedules_spec.rb
+++ b/spec/features/event_schedules_spec.rb
@@ -41,6 +41,6 @@
it 'jumps to the closest event' do
find('#current-event-btn').click
highlighted_element = page.find('.highlighted', visible: true, wait: 1)
- expect(highlighted_element[:class]).to include("event-#{scheduled_event_mid.id}")
+ expect(highlighted_element[:id]).to include("event_#{scheduled_event_mid.id}")
end
end
diff --git a/spec/features/ticket_purchases_spec.rb b/spec/features/ticket_purchases_spec.rb
index c3b4f9b87..32bb9fd1f 100644
--- a/spec/features/ticket_purchases_spec.rb
+++ b/spec/features/ticket_purchases_spec.rb
@@ -198,7 +198,6 @@ def make_failed_stripe_purchase
context 'currency conversion' do
before do
- ENV['SHOW_CURRENCY_SELECTOR'] = 'true'
conference.currency_conversions << create(:currency_conversion, from_currency: 'USD', to_currency: 'EUR', rate: 0.89)
conference.currency_conversions << create(:currency_conversion, from_currency: 'USD', to_currency: 'GBP', rate: 0.75)
visit root_path
diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb
index 0bc07888d..a6bb12161 100644
--- a/spec/features/user_spec.rb
+++ b/spec/features/user_spec.rb
@@ -9,6 +9,7 @@
shared_examples 'admin ability' do
scenario 'edits a user', feature: true, js: true do
visit admin_users_path
+ wait_for_ajax
within "tr#user_#{user.id}" do
click_on 'Edit'
end
diff --git a/spec/models/commercial_spec.rb b/spec/models/commercial_spec.rb
index 2adc17c97..a09077f8e 100644
--- a/spec/models/commercial_spec.rb
+++ b/spec/models/commercial_spec.rb
@@ -29,11 +29,4 @@
commercial = build(:conference_commercial)
expect(commercial.valid?).to be true
end
-
- it 'parses snap url' do
- url = 'https://snap.berkeley.edu/project?username=avi_shor&projectname=stamps'
- transformed_url = Commercial.generate_snap_embed(url)
- expected_url = 'https://snap.berkeley.edu/embed?projectname=stamps&username=avi_shor&showTitle=true&showAuthor=true&editButton=true&pauseButton=true'
- expect(transformed_url).to eq expected_url
- end
end
diff --git a/spec/models/track_spec.rb b/spec/models/track_spec.rb
index 7c8df641a..a054de04b 100644
--- a/spec/models/track_spec.rb
+++ b/spec/models/track_spec.rb
@@ -61,8 +61,6 @@
withdrawn])
}
- it { is_expected.to validate_inclusion_of(:cfp_active).in_array([true, false]) }
-
context 'when self_organized_and_accepted_or_confirmed? returns true' do
before do
allow(subject).to receive(:self_organized_and_accepted_or_confirmed?).and_return(true)
diff --git a/spec/services/embeddable_url_spec.rb b/spec/services/embeddable_url_spec.rb
new file mode 100644
index 000000000..b88a94a37
--- /dev/null
+++ b/spec/services/embeddable_url_spec.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe EmbeddableURL do
+ describe '#iframe_url' do
+ it 'returns the original url if no transformations apply' do
+ url = 'https://example.com'
+ expect(EmbeddableURL.new(url, 'title').iframe_url).to eq url
+ end
+
+ it 'transforms a Google Drive URL' do
+ url = EmbeddableURL.new('https://docs.google.com/presentation/d/1eGbEQtcOPW2N2P5rKfBVfSo2zn4C307Sh6C7vpJsruE/edit#slide=id.g1088c029399_0_47', 'title').iframe_url
+ expect(url).to include '/embed'
+ expect(url).not_to include('/edit')
+ end
+
+ it 'transforms a Dropbox URL' do
+ url = EmbeddableURL.new('https://www.dropbox.com/scl/fi/49gkp6ghfnxgqex64zvzd/Guzdial-SnapCon23.pdf?rlkey=ecwvmcmfscqtwfq21l3kzqcul&dl=1', 'title').iframe_url
+ expect(url).to include('dl=0')
+ expect(url).not_to include('raw=')
+ end
+
+ it 'transforms a Snap! Project URL' do
+ url = EmbeddableURL.new('https://snap.berkeley.edu/project?username=jedi_force&projectname=Autograder%2dlite', 'title').iframe_url
+ expect(url).to include('/embed')
+ end
+ end
+
+ # it 'parses snap url' do
+ # url = 'https://snap.berkeley.edu/project?username=avi_shor&projectname=stamps'
+ # transformed_url = Commercial.generate_snap_embed(url)
+ # expected_url = 'https://snap.berkeley.edu/embed?projectname=stamps&username=avi_shor&showTitle=true&showAuthor=true&editButton=true&pauseButton=true'
+ # expect(transformed_url).to eq expected_url
+ # end
+ # TODO: Test ifram generation, snap-embedding
+end
diff --git a/spec/support/external_request.rb b/spec/support/external_request.rb
index 45f0a5e03..6fd7af57f 100644
--- a/spec/support/external_request.rb
+++ b/spec/support/external_request.rb
@@ -5,9 +5,10 @@
driver_urls = Webdrivers::Common.subclasses.map do |driver|
Addressable::URI.parse(driver.base_url).host
end
-# Local chromedriver pings GitHub. :(
+# Local chromedriver pings many sites. :(
driver_urls << 'googlechromelabs.github.io'
driver_urls << 'edgedl.me.gvt1.com' # The fuck, Google?
+driver_urls << 'storage.googleapis.com'
WebMock.disable_net_connect!(allow_localhost: true, allow: [*driver_urls, /stripe.com/])
RSpec.configure do |config|
diff --git a/spec/support/wait_for_ajax..rb b/spec/support/wait_for_ajax..rb
new file mode 100644
index 000000000..5a524e156
--- /dev/null
+++ b/spec/support/wait_for_ajax..rb
@@ -0,0 +1,16 @@
+module WaitForAjax
+ def wait_for_ajax
+ Timeout.timeout(Capybara.default_max_wait_time) do
+ puts '...waiting...'
+ loop until finished_all_ajax_requests?
+ end
+ end
+
+ def finished_all_ajax_requests?
+ page.evaluate_script('jQuery.active').zero?
+ end
+end
+
+RSpec.configure do |config|
+ config.include WaitForAjax, type: :feature
+end
diff --git a/vendor/assets/images/holderjs/test/image.jpg b/vendor/assets/images/holderjs/test/image.jpg
new file mode 100644
index 000000000..4d7fa14c9
Binary files /dev/null and b/vendor/assets/images/holderjs/test/image.jpg differ
diff --git a/vendor/assets/javascripts/bootstrap-markdown.js b/vendor/assets/javascripts/bootstrap-markdown.js
new file mode 100644
index 000000000..eb380aeef
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-markdown.js
@@ -0,0 +1 @@
+//= require bootstrap-markdown/bootstrap-markdown.js
diff --git a/vendor/assets/javascripts/bootstrap-markdown/bootstrap-markdown.js b/vendor/assets/javascripts/bootstrap-markdown/bootstrap-markdown.js
new file mode 100644
index 000000000..21e8c60ea
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-markdown/bootstrap-markdown.js
@@ -0,0 +1,1390 @@
+/* ===================================================
+ * bootstrap-markdown.js v2.10.0
+ * http://github.com/toopay/bootstrap-markdown
+ * ===================================================
+ * Copyright 2013-2016 Taufan Aditya
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+(function(factory){
+ if (typeof define === "function" && define.amd) {
+ //RequireJS
+ define(["jquery"], factory);
+ } else if (typeof exports === 'object') {
+ //Backbone.js
+ factory(require('jquery'));
+ } else {
+ //Jquery plugin
+ factory(jQuery);
+ }
+}(function($){
+ "use strict"; // jshint ;_;
+
+ /* MARKDOWN CLASS DEFINITION
+ * ========================== */
+
+ var Markdown = function (element, options) {
+ // @TODO : remove this BC on next major release
+ // @see : https://github.com/toopay/bootstrap-markdown/issues/109
+ var opts = ['autofocus', 'savable', 'hideable', 'width',
+ 'height', 'resize', 'iconlibrary', 'language',
+ 'footer', 'fullscreen', 'hiddenButtons', 'disabledButtons'];
+ $.each(opts,function(_, opt){
+ if (typeof $(element).data(opt) !== 'undefined') {
+ options = typeof options == 'object' ? options : {}
+ options[opt] = $(element).data(opt)
+ }
+ });
+ // End BC
+
+ // Class Properties
+ this.$ns = 'bootstrap-markdown';
+ this.$element = $(element);
+ this.$editable = {el:null, type:null,attrKeys:[], attrValues:[], content:null};
+ this.$options = $.extend(true, {}, $.fn.markdown.defaults, options, this.$element.data('options'));
+ this.$oldContent = null;
+ this.$isPreview = false;
+ this.$isFullscreen = false;
+ this.$editor = null;
+ this.$textarea = null;
+ this.$handler = [];
+ this.$callback = [];
+ this.$nextTab = [];
+
+ this.showEditor();
+ };
+
+ Markdown.prototype = {
+
+ constructor: Markdown
+
+ , __alterButtons: function(name,alter) {
+ var handler = this.$handler, isAll = (name == 'all'),that = this;
+
+ $.each(handler,function(k,v) {
+ var halt = true;
+ if (isAll) {
+ halt = false;
+ } else {
+ halt = v.indexOf(name) < 0;
+ }
+
+ if (halt === false) {
+ alter(that.$editor.find('button[data-handler="'+v+'"]'));
+ }
+ });
+ }
+
+ , __buildButtons: function(buttonsArray, container) {
+ var i,
+ ns = this.$ns,
+ handler = this.$handler,
+ callback = this.$callback;
+
+ for (i=0;i', {
+ 'class': 'btn-group'
+ });
+
+ for (z=0;z');
+ buttonContainer.text(' ' + this.__localize(btnText)).addClass('btn-default btn-sm').addClass(btnClass);
+ if(btnClass.match(/btn\-(primary|success|info|warning|danger|link)/)){
+ buttonContainer.removeClass('btn-default');
+ }
+ buttonContainer.attr({
+ 'type': 'button',
+ 'title': this.__localize(button.title) + hotkeyCaption,
+ 'tabindex': tabIndex,
+ 'data-provider': ns,
+ 'data-handler': buttonHandler,
+ 'data-hotkey': hotkey
+ });
+ if (button.toggle === true){
+ buttonContainer.attr('data-toggle', 'button');
+ }
+ buttonIconContainer = $(' ');
+ buttonIconContainer.addClass(buttonIcon);
+ buttonIconContainer.prependTo(buttonContainer);
+
+ // Attach the button object
+ btnGroupContainer.append(buttonContainer);
+
+ // Register handler and callback
+ handler.push(buttonHandler);
+ callback.push(button.callback);
+ }
+
+ // Attach the button group into container dom
+ container.append(btnGroupContainer);
+ }
+ }
+
+ return container;
+ }
+ , __setListener: function() {
+ // Set size and resizable Properties
+ var hasRows = typeof this.$textarea.attr('rows') !== 'undefined',
+ maxRows = this.$textarea.val().split("\n").length > 5 ? this.$textarea.val().split("\n").length : '5',
+ rowsVal = hasRows ? this.$textarea.attr('rows') : maxRows;
+
+ this.$textarea.attr('rows',rowsVal);
+ if (this.$options.resize) {
+ this.$textarea.css('resize',this.$options.resize);
+ }
+
+ this.$textarea.on({
+ 'focus' : $.proxy(this.focus, this),
+ 'keyup' : $.proxy(this.keyup, this),
+ 'change' : $.proxy(this.change, this),
+ 'select' : $.proxy(this.select, this)
+ });
+
+ if (this.eventSupported('keydown')) {
+ this.$textarea.on('keydown', $.proxy(this.keydown, this));
+ }
+
+ if (this.eventSupported('keypress')) {
+ this.$textarea.on('keypress', $.proxy(this.keypress, this))
+ }
+
+ // Re-attach markdown data
+ this.$textarea.data('markdown',this);
+ }
+
+ , __handle: function(e) {
+ var target = $(e.currentTarget),
+ handler = this.$handler,
+ callback = this.$callback,
+ handlerName = target.attr('data-handler'),
+ callbackIndex = handler.indexOf(handlerName),
+ callbackHandler = callback[callbackIndex];
+
+ // Trigger the focusin
+ $(e.currentTarget).focus();
+
+ callbackHandler(this);
+
+ // Trigger onChange for each button handle
+ this.change(this);
+
+ // Unless it was the save handler,
+ // focusin the textarea
+ if (handlerName.indexOf('cmdSave') < 0) {
+ this.$textarea.focus();
+ }
+
+ e.preventDefault();
+ }
+
+ , __localize: function(string) {
+ var messages = $.fn.markdown.messages,
+ language = this.$options.language;
+ if (
+ typeof messages !== 'undefined' &&
+ typeof messages[language] !== 'undefined' &&
+ typeof messages[language][string] !== 'undefined'
+ ) {
+ return messages[language][string];
+ }
+ return string;
+ }
+
+ , __getIcon: function(src) {
+ return typeof src == 'object' ? src[this.$options.iconlibrary] : src;
+ }
+
+ , setFullscreen: function(mode) {
+ var $editor = this.$editor,
+ $textarea = this.$textarea;
+
+ if (mode === true) {
+ $editor.addClass('md-fullscreen-mode');
+ $('body').addClass('md-nooverflow');
+ this.$options.onFullscreen(this);
+ } else {
+ $editor.removeClass('md-fullscreen-mode');
+ $('body').removeClass('md-nooverflow');
+
+ if (this.$isPreview == true) this.hidePreview().showPreview()
+ }
+
+ this.$isFullscreen = mode;
+ $textarea.focus();
+ }
+
+ , showEditor: function() {
+ var instance = this,
+ textarea,
+ ns = this.$ns,
+ container = this.$element,
+ originalHeigth = container.css('height'),
+ originalWidth = container.css('width'),
+ editable = this.$editable,
+ handler = this.$handler,
+ callback = this.$callback,
+ options = this.$options,
+ editor = $( '
', {
+ 'class': 'md-editor',
+ click: function() {
+ instance.focus();
+ }
+ });
+
+ // Prepare the editor
+ if (this.$editor === null) {
+ // Create the panel
+ var editorHeader = $('
', {
+ 'class': 'md-header btn-toolbar'
+ });
+
+ // Merge the main & additional button groups together
+ var allBtnGroups = [];
+ if (options.buttons.length > 0) allBtnGroups = allBtnGroups.concat(options.buttons[0]);
+ if (options.additionalButtons.length > 0) {
+ // iterate the additional button groups
+ $.each(options.additionalButtons[0], function(idx, buttonGroup){
+
+ // see if the group name of the addional group matches an existing group
+ var matchingGroups = $.grep(allBtnGroups, function(allButtonGroup, allIdx){
+ return allButtonGroup.name === buttonGroup.name;
+ });
+
+ // if it matches add the addional buttons to that group, if not just add it to the all buttons group
+ if(matchingGroups.length > 0) {
+ matchingGroups[0].data = matchingGroups[0].data.concat(buttonGroup.data);
+ } else {
+ allBtnGroups.push(options.additionalButtons[0][idx]);
+ }
+
+ });
+ }
+
+ // Reduce and/or reorder the button groups
+ if (options.reorderButtonGroups.length > 0) {
+ allBtnGroups = allBtnGroups
+ .filter(function(btnGroup) {
+ return options.reorderButtonGroups.indexOf(btnGroup.name) > -1;
+ })
+ .sort(function(a, b) {
+ if (options.reorderButtonGroups.indexOf(a.name) < options.reorderButtonGroups.indexOf(b.name)) return -1;
+ if (options.reorderButtonGroups.indexOf(a.name) > options.reorderButtonGroups.indexOf(b.name)) return 1;
+ return 0;
+ });
+ }
+
+ // Build the buttons
+ if (allBtnGroups.length > 0) {
+ editorHeader = this.__buildButtons([allBtnGroups], editorHeader);
+ }
+
+ if (options.fullscreen.enable) {
+ editorHeader.append('').on('click', '.md-control-fullscreen', function(e) {
+ e.preventDefault();
+ instance.setFullscreen(true);
+ });
+ }
+
+ editor.append(editorHeader);
+
+ // Wrap the textarea
+ if (container.is('textarea')) {
+ container.before(editor);
+ textarea = container;
+ textarea.addClass('md-input');
+ editor.append(textarea);
+ } else {
+ var rawContent = (typeof toMarkdown == 'function') ? toMarkdown(container.html()) : container.html(),
+ currentContent = $.trim(rawContent);
+
+ // This is some arbitrary content that could be edited
+ textarea = $('', {
+ 'class': 'md-input',
+ 'val' : currentContent
+ });
+
+ editor.append(textarea);
+
+ // Save the editable
+ editable.el = container;
+ editable.type = container.prop('tagName').toLowerCase();
+ editable.content = container.html();
+
+ $(container[0].attributes).each(function(){
+ editable.attrKeys.push(this.nodeName);
+ editable.attrValues.push(this.nodeValue);
+ });
+
+ // Set editor to blocked the original container
+ container.replaceWith(editor);
+ }
+
+ var editorFooter = $('
', {
+ 'class': 'md-footer'
+ }),
+ createFooter = false,
+ footer = '';
+ // Create the footer if savable
+ if (options.savable) {
+ createFooter = true;
+ var saveHandler = 'cmdSave';
+
+ // Register handler and callback
+ handler.push(saveHandler);
+ callback.push(options.onSave);
+
+ editorFooter.append(' '
+ + this.__localize('Save')
+ + ' ');
+
+
+ }
+
+ footer = typeof options.footer === 'function' ? options.footer(this) : options.footer;
+
+ if ($.trim(footer) !== '') {
+ createFooter = true;
+ editorFooter.append(footer);
+ }
+
+ if (createFooter) editor.append(editorFooter);
+
+ // Set width
+ if (options.width && options.width !== 'inherit') {
+ if (jQuery.isNumeric(options.width)) {
+ editor.css('display', 'table');
+ textarea.css('width', options.width + 'px');
+ } else {
+ editor.addClass(options.width);
+ }
+ }
+
+ // Set height
+ if (options.height && options.height !== 'inherit') {
+ if (jQuery.isNumeric(options.height)) {
+ var height = options.height;
+ if (editorHeader) height = Math.max(0, height - editorHeader.outerHeight());
+ if (editorFooter) height = Math.max(0, height - editorFooter.outerHeight());
+ textarea.css('height', height + 'px');
+ } else {
+ editor.addClass(options.height);
+ }
+ }
+
+ // Reference
+ this.$editor = editor;
+ this.$textarea = textarea;
+ this.$editable = editable;
+ this.$oldContent = this.getContent();
+
+ this.__setListener();
+
+ // Set editor attributes, data short-hand API and listener
+ this.$editor.attr('id',(new Date()).getTime());
+ this.$editor.on('click', '[data-provider="bootstrap-markdown"]', $.proxy(this.__handle, this));
+
+ if (this.$element.is(':disabled') || this.$element.is('[readonly]')) {
+ this.$editor.addClass('md-editor-disabled');
+ this.disableButtons('all');
+ }
+
+ if (this.eventSupported('keydown') && typeof jQuery.hotkeys === 'object') {
+ editorHeader.find('[data-provider="bootstrap-markdown"]').each(function() {
+ var $button = $(this),
+ hotkey = $button.attr('data-hotkey');
+ if (hotkey.toLowerCase() !== '') {
+ textarea.bind('keydown', hotkey, function() {
+ $button.trigger('click');
+ return false;
+ });
+ }
+ });
+ }
+
+ if (options.initialstate === 'preview') {
+ this.showPreview();
+ } else if (options.initialstate === 'fullscreen' && options.fullscreen.enable) {
+ this.setFullscreen(true);
+ }
+
+ } else {
+ this.$editor.show();
+ }
+
+ if (options.autofocus) {
+ this.$textarea.focus();
+ this.$editor.addClass('active');
+ }
+
+ if (options.fullscreen.enable && options.fullscreen !== false) {
+ this.$editor.append('');
+ this.$editor.on('click', '.exit-fullscreen', function(e) {
+ e.preventDefault();
+ instance.setFullscreen(false);
+ });
+ }
+
+ // hide hidden buttons from options
+ this.hideButtons(options.hiddenButtons);
+
+ // disable disabled buttons from options
+ this.disableButtons(options.disabledButtons);
+
+ // Trigger the onShow hook
+ options.onShow(this);
+
+ return this;
+ }
+
+ , parseContent: function(val) {
+ var content;
+
+ // parse with supported markdown parser
+ var val = val || this.$textarea.val();
+
+ if (this.$options.parser) {
+ content = this.$options.parser(val);
+ } else if (typeof markdown == 'object') {
+ content = markdown.toHTML(val);
+ } else if (typeof marked == 'function') {
+ content = marked(val);
+ } else {
+ content = val;
+ }
+
+ return content;
+ }
+
+ , showPreview: function() {
+ var options = this.$options,
+ container = this.$textarea,
+ afterContainer = container.next(),
+ replacementContainer = $('
',{'class':'md-preview','data-provider':'markdown-preview'}),
+ content,
+ callbackContent;
+
+ if (this.$isPreview == true) {
+ // Avoid sequenced element creation on missused scenario
+ // @see https://github.com/toopay/bootstrap-markdown/issues/170
+ return this;
+ }
+
+ // Give flag that tell the editor enter preview mode
+ this.$isPreview = true;
+ // Disable all buttons
+ this.disableButtons('all').enableButtons('cmdPreview');
+
+ // Try to get the content from callback
+ callbackContent = options.onPreview(this);
+ // Set the content based from the callback content if string otherwise parse value from textarea
+ content = typeof callbackContent == 'string' ? callbackContent : this.parseContent();
+
+ // Build preview element
+ replacementContainer.html(content);
+
+ if (afterContainer && afterContainer.attr('class') == 'md-footer') {
+ // If there is footer element, insert the preview container before it
+ replacementContainer.insertBefore(afterContainer);
+ } else {
+ // Otherwise, just append it after textarea
+ container.parent().append(replacementContainer);
+ }
+
+ // Set the preview element dimensions
+ replacementContainer.css({
+ width: container.outerWidth() + 'px',
+ height: container.outerHeight() + 'px'
+ });
+
+ if (this.$options.resize) {
+ replacementContainer.css('resize',this.$options.resize);
+ }
+
+ // Hide the last-active textarea
+ container.hide();
+
+ // Attach the editor instances
+ replacementContainer.data('markdown',this);
+
+ if (this.$element.is(':disabled') || this.$element.is('[readonly]')) {
+ this.$editor.addClass('md-editor-disabled');
+ this.disableButtons('all');
+ }
+
+ return this;
+ }
+
+ , hidePreview: function() {
+ // Give flag that tell the editor quit preview mode
+ this.$isPreview = false;
+
+ // Obtain the preview container
+ var container = this.$editor.find('div[data-provider="markdown-preview"]');
+
+ // Remove the preview container
+ container.remove();
+
+ // Enable all buttons
+ this.enableButtons('all');
+ // Disable configured disabled buttons
+ this.disableButtons(this.$options.disabledButtons);
+
+ // Back to the editor
+ this.$textarea.show();
+ this.__setListener();
+
+ return this;
+ }
+
+ , isDirty: function() {
+ return this.$oldContent != this.getContent();
+ }
+
+ , getContent: function() {
+ return this.$textarea.val();
+ }
+
+ , setContent: function(content) {
+ this.$textarea.val(content);
+
+ return this;
+ }
+
+ , findSelection: function(chunk) {
+ var content = this.getContent(), startChunkPosition;
+
+ if (startChunkPosition = content.indexOf(chunk), startChunkPosition >= 0 && chunk.length > 0) {
+ var oldSelection = this.getSelection(), selection;
+
+ this.setSelection(startChunkPosition,startChunkPosition+chunk.length);
+ selection = this.getSelection();
+
+ this.setSelection(oldSelection.start,oldSelection.end);
+
+ return selection;
+ } else {
+ return null;
+ }
+ }
+
+ , getSelection: function() {
+
+ var e = this.$textarea[0];
+
+ return (
+
+ ('selectionStart' in e && function() {
+ var l = e.selectionEnd - e.selectionStart;
+ return { start: e.selectionStart, end: e.selectionEnd, length: l, text: e.value.substr(e.selectionStart, l) };
+ }) ||
+
+ /* browser not supported */
+ function() {
+ return null;
+ }
+
+ )();
+
+ }
+
+ , setSelection: function(start,end) {
+
+ var e = this.$textarea[0];
+
+ return (
+
+ ('selectionStart' in e && function() {
+ e.selectionStart = start;
+ e.selectionEnd = end;
+ return;
+ }) ||
+
+ /* browser not supported */
+ function() {
+ return null;
+ }
+
+ )();
+
+ }
+
+ , replaceSelection: function(text) {
+
+ var e = this.$textarea[0];
+
+ return (
+
+ ('selectionStart' in e && function() {
+ e.value = e.value.substr(0, e.selectionStart) + text + e.value.substr(e.selectionEnd, e.value.length);
+ // Set cursor to the last replacement end
+ e.selectionStart = e.value.length;
+ return this;
+ }) ||
+
+ /* browser not supported */
+ function() {
+ e.value += text;
+ return jQuery(e);
+ }
+
+ )();
+ }
+
+ , getNextTab: function() {
+ // Shift the nextTab
+ if (this.$nextTab.length === 0) {
+ return null;
+ } else {
+ var nextTab, tab = this.$nextTab.shift();
+
+ if (typeof tab == 'function') {
+ nextTab = tab();
+ } else if (typeof tab == 'object' && tab.length > 0) {
+ nextTab = tab;
+ }
+
+ return nextTab;
+ }
+ }
+
+ , setNextTab: function(start,end) {
+ // Push new selection into nextTab collections
+ if (typeof start == 'string') {
+ var that = this;
+ this.$nextTab.push(function(){
+ return that.findSelection(start);
+ });
+ } else if (typeof start == 'number' && typeof end == 'number') {
+ var oldSelection = this.getSelection();
+
+ this.setSelection(start,end);
+ this.$nextTab.push(this.getSelection());
+
+ this.setSelection(oldSelection.start,oldSelection.end);
+ }
+
+ return;
+ }
+
+ , __parseButtonNameParam: function (names) {
+ return typeof names == 'string' ?
+ names.split(' ') :
+ names;
+
+ }
+
+ , enableButtons: function(name) {
+ var buttons = this.__parseButtonNameParam(name),
+ that = this;
+
+ $.each(buttons, function(i, v) {
+ that.__alterButtons(buttons[i], function (el) {
+ el.removeAttr('disabled');
+ });
+ });
+
+ return this;
+ }
+
+ , disableButtons: function(name) {
+ var buttons = this.__parseButtonNameParam(name),
+ that = this;
+
+ $.each(buttons, function(i, v) {
+ that.__alterButtons(buttons[i], function (el) {
+ el.attr('disabled','disabled');
+ });
+ });
+
+ return this;
+ }
+
+ , hideButtons: function(name) {
+ var buttons = this.__parseButtonNameParam(name),
+ that = this;
+
+ $.each(buttons, function(i, v) {
+ that.__alterButtons(buttons[i], function (el) {
+ el.addClass('hidden');
+ });
+ });
+
+ return this;
+ }
+
+ , showButtons: function(name) {
+ var buttons = this.__parseButtonNameParam(name),
+ that = this;
+
+ $.each(buttons, function(i, v) {
+ that.__alterButtons(buttons[i], function (el) {
+ el.removeClass('hidden');
+ });
+ });
+
+ return this;
+ }
+
+ , eventSupported: function(eventName) {
+ var isSupported = eventName in this.$element;
+ if (!isSupported) {
+ this.$element.setAttribute(eventName, 'return;');
+ isSupported = typeof this.$element[eventName] === 'function';
+ }
+ return isSupported;
+ }
+
+ , keyup: function (e) {
+ var blocked = false;
+ switch(e.keyCode) {
+ case 40: // down arrow
+ case 38: // up arrow
+ case 16: // shift
+ case 17: // ctrl
+ case 18: // alt
+ break;
+
+ case 9: // tab
+ var nextTab;
+ if (nextTab = this.getNextTab(),nextTab !== null) {
+ // Get the nextTab if exists
+ var that = this;
+ setTimeout(function(){
+ that.setSelection(nextTab.start,nextTab.end);
+ },500);
+
+ blocked = true;
+ } else {
+ // The next tab memory contains nothing...
+ // check the cursor position to determine tab action
+ var cursor = this.getSelection();
+
+ if (cursor.start == cursor.end && cursor.end == this.getContent().length) {
+ // The cursor already reach the end of the content
+ blocked = false;
+ } else {
+ // Put the cursor to the end
+ this.setSelection(this.getContent().length,this.getContent().length);
+
+ blocked = true;
+ }
+ }
+
+ break;
+
+ case 13: // enter
+ blocked = false;
+ break;
+ case 27: // escape
+ if (this.$isFullscreen) this.setFullscreen(false);
+ blocked = false;
+ break;
+
+ default:
+ blocked = false;
+ }
+
+ if (blocked) {
+ e.stopPropagation();
+ e.preventDefault();
+ }
+
+ this.$options.onChange(this);
+ }
+
+ , change: function(e) {
+ this.$options.onChange(this);
+ return this;
+ }
+ , select: function (e) {
+ this.$options.onSelect(this);
+ return this;
+ }
+ , focus: function (e) {
+ var options = this.$options,
+ isHideable = options.hideable,
+ editor = this.$editor;
+
+ editor.addClass('active');
+
+ // Blur other markdown(s)
+ $(document).find('.md-editor').each(function(){
+ if ($(this).attr('id') !== editor.attr('id')) {
+ var attachedMarkdown;
+
+ if (attachedMarkdown = $(this).find('textarea').data('markdown'),
+ attachedMarkdown === null) {
+ attachedMarkdown = $(this).find('div[data-provider="markdown-preview"]').data('markdown');
+ }
+
+ if (attachedMarkdown) {
+ attachedMarkdown.blur();
+ }
+ }
+ });
+
+ // Trigger the onFocus hook
+ options.onFocus(this);
+
+ return this;
+ }
+
+ , blur: function (e) {
+ var options = this.$options,
+ isHideable = options.hideable,
+ editor = this.$editor,
+ editable = this.$editable;
+
+ if (editor.hasClass('active') || this.$element.parent().length === 0) {
+ editor.removeClass('active');
+
+ if (isHideable) {
+ // Check for editable elements
+ if (editable.el !== null) {
+ // Build the original element
+ var oldElement = $('<'+editable.type+'/>'),
+ content = this.getContent(),
+ currentContent = this.parseContent(content);
+
+ $(editable.attrKeys).each(function(k,v) {
+ oldElement.attr(editable.attrKeys[k],editable.attrValues[k]);
+ });
+
+ // Get the editor content
+ oldElement.html(currentContent);
+
+ editor.replaceWith(oldElement);
+ } else {
+ editor.hide();
+ }
+ }
+
+ // Trigger the onBlur hook
+ options.onBlur(this);
+ }
+
+ return this;
+ }
+
+ };
+
+ /* MARKDOWN PLUGIN DEFINITION
+ * ========================== */
+
+ var old = $.fn.markdown;
+
+ $.fn.markdown = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('markdown')
+ , options = typeof option == 'object' && option;
+ if (!data) $this.data('markdown', (data = new Markdown(this, options)))
+ })
+ };
+
+ $.fn.markdown.messages = {};
+
+ $.fn.markdown.defaults = {
+ /* Editor Properties */
+ autofocus: false,
+ hideable: false,
+ savable: false,
+ width: 'inherit',
+ height: 'inherit',
+ resize: 'none',
+ iconlibrary: 'glyph',
+ language: 'en',
+ initialstate: 'editor',
+ parser: null,
+
+ /* Buttons Properties */
+ buttons: [
+ [{
+ name: 'groupFont',
+ data: [{
+ name: 'cmdBold',
+ hotkey: 'Ctrl+B',
+ title: 'Bold',
+ icon: { glyph: 'glyphicon glyphicon-bold', fa: 'fa fa-bold', 'fa-3': 'icon-bold' },
+ callback: function(e){
+ // Give/remove ** surround the selection
+ var chunk, cursor, selected = e.getSelection(), content = e.getContent();
+
+ if (selected.length === 0) {
+ // Give extra word
+ chunk = e.__localize('strong text');
+ } else {
+ chunk = selected.text;
+ }
+
+ // transform selection and set the cursor into chunked text
+ if (content.substr(selected.start-2,2) === '**'
+ && content.substr(selected.end,2) === '**' ) {
+ e.setSelection(selected.start-2,selected.end+2);
+ e.replaceSelection(chunk);
+ cursor = selected.start-2;
+ } else {
+ e.replaceSelection('**'+chunk+'**');
+ cursor = selected.start+2;
+ }
+
+ // Set the cursor
+ e.setSelection(cursor,cursor+chunk.length);
+ }
+ },{
+ name: 'cmdItalic',
+ title: 'Italic',
+ hotkey: 'Ctrl+I',
+ icon: { glyph: 'glyphicon glyphicon-italic', fa: 'fa fa-italic', 'fa-3': 'icon-italic' },
+ callback: function(e){
+ // Give/remove * surround the selection
+ var chunk, cursor, selected = e.getSelection(), content = e.getContent();
+
+ if (selected.length === 0) {
+ // Give extra word
+ chunk = e.__localize('emphasized text');
+ } else {
+ chunk = selected.text;
+ }
+
+ // transform selection and set the cursor into chunked text
+ if (content.substr(selected.start-1,1) === '_'
+ && content.substr(selected.end,1) === '_' ) {
+ e.setSelection(selected.start-1,selected.end+1);
+ e.replaceSelection(chunk);
+ cursor = selected.start-1;
+ } else {
+ e.replaceSelection('_'+chunk+'_');
+ cursor = selected.start+1;
+ }
+
+ // Set the cursor
+ e.setSelection(cursor,cursor+chunk.length);
+ }
+ },{
+ name: 'cmdHeading',
+ title: 'Heading',
+ hotkey: 'Ctrl+H',
+ icon: { glyph: 'glyphicon glyphicon-header', fa: 'fa fa-header', 'fa-3': 'icon-font' },
+ callback: function(e){
+ // Append/remove ### surround the selection
+ var chunk, cursor, selected = e.getSelection(), content = e.getContent(), pointer, prevChar;
+
+ if (selected.length === 0) {
+ // Give extra word
+ chunk = e.__localize('heading text');
+ } else {
+ chunk = selected.text + '\n';
+ }
+
+ // transform selection and set the cursor into chunked text
+ if ((pointer = 4, content.substr(selected.start-pointer,pointer) === '### ')
+ || (pointer = 3, content.substr(selected.start-pointer,pointer) === '###')) {
+ e.setSelection(selected.start-pointer,selected.end);
+ e.replaceSelection(chunk);
+ cursor = selected.start-pointer;
+ } else if (selected.start > 0 && (prevChar = content.substr(selected.start-1,1), !!prevChar && prevChar != '\n')) {
+ e.replaceSelection('\n\n### '+chunk);
+ cursor = selected.start+6;
+ } else {
+ // Empty string before element
+ e.replaceSelection('### '+chunk);
+ cursor = selected.start+4;
+ }
+
+ // Set the cursor
+ e.setSelection(cursor,cursor+chunk.length);
+ }
+ }]
+ },{
+ name: 'groupLink',
+ data: [{
+ name: 'cmdUrl',
+ title: 'URL/Link',
+ hotkey: 'Ctrl+L',
+ icon: { glyph: 'glyphicon glyphicon-link', fa: 'fa fa-link', 'fa-3': 'icon-link' },
+ callback: function(e){
+ // Give [] surround the selection and prepend the link
+ var chunk, cursor, selected = e.getSelection(), content = e.getContent(), link;
+
+ if (selected.length === 0) {
+ // Give extra word
+ chunk = e.__localize('enter link description here');
+ } else {
+ chunk = selected.text;
+ }
+
+ link = prompt(e.__localize('Insert Hyperlink'),'http://');
+
+ var urlRegex = new RegExp('^((http|https)://|(mailto:)|(//))[a-z0-9]', 'i');
+ if (link !== null && link !== '' && link !== 'http://' && urlRegex.test(link)) {
+ var sanitizedLink = $(''+link+'
').text();
+
+ // transform selection and set the cursor into chunked text
+ e.replaceSelection('['+chunk+']('+sanitizedLink+')');
+ cursor = selected.start+1;
+
+ // Set the cursor
+ e.setSelection(cursor,cursor+chunk.length);
+ }
+ }
+ },{
+ name: 'cmdImage',
+ title: 'Image',
+ hotkey: 'Ctrl+G',
+ icon: { glyph: 'glyphicon glyphicon-picture', fa: 'fa fa-picture-o', 'fa-3': 'icon-picture' },
+ callback: function(e){
+ // Give ![] surround the selection and prepend the image link
+ var chunk, cursor, selected = e.getSelection(), content = e.getContent(), link;
+
+ if (selected.length === 0) {
+ // Give extra word
+ chunk = e.__localize('enter image description here');
+ } else {
+ chunk = selected.text;
+ }
+
+ link = prompt(e.__localize('Insert Image Hyperlink'),'http://');
+
+ var urlRegex = new RegExp('^((http|https)://|(//))[a-z0-9]', 'i');
+ if (link !== null && link !== '' && link !== 'http://' && urlRegex.test(link)) {
+ var sanitizedLink = $(''+link+'
').text();
+
+ // transform selection and set the cursor into chunked text
+ e.replaceSelection('!['+chunk+']('+sanitizedLink+' "'+e.__localize('enter image title here')+'")');
+ cursor = selected.start+2;
+
+ // Set the next tab
+ e.setNextTab(e.__localize('enter image title here'));
+
+ // Set the cursor
+ e.setSelection(cursor,cursor+chunk.length);
+ }
+ }
+ }]
+ },{
+ name: 'groupMisc',
+ data: [{
+ name: 'cmdList',
+ hotkey: 'Ctrl+U',
+ title: 'Unordered List',
+ icon: { glyph: 'glyphicon glyphicon-list', fa: 'fa fa-list', 'fa-3': 'icon-list-ul' },
+ callback: function(e){
+ // Prepend/Give - surround the selection
+ var chunk, cursor, selected = e.getSelection(), content = e.getContent();
+
+ // transform selection and set the cursor into chunked text
+ if (selected.length === 0) {
+ // Give extra word
+ chunk = e.__localize('list text here');
+
+ e.replaceSelection('- '+chunk);
+ // Set the cursor
+ cursor = selected.start+2;
+ } else {
+ if (selected.text.indexOf('\n') < 0) {
+ chunk = selected.text;
+
+ e.replaceSelection('- '+chunk);
+
+ // Set the cursor
+ cursor = selected.start+2;
+ } else {
+ var list = [];
+
+ list = selected.text.split('\n');
+ chunk = list[0];
+
+ $.each(list,function(k,v) {
+ list[k] = '- '+v;
+ });
+
+ e.replaceSelection('\n\n'+list.join('\n'));
+
+ // Set the cursor
+ cursor = selected.start+4;
+ }
+ }
+
+ // Set the cursor
+ e.setSelection(cursor,cursor+chunk.length);
+ }
+ },
+ {
+ name: 'cmdListO',
+ hotkey: 'Ctrl+O',
+ title: 'Ordered List',
+ icon: { glyph: 'glyphicon glyphicon-th-list', fa: 'fa fa-list-ol', 'fa-3': 'icon-list-ol' },
+ callback: function(e) {
+
+ // Prepend/Give - surround the selection
+ var chunk, cursor, selected = e.getSelection(), content = e.getContent();
+
+ // transform selection and set the cursor into chunked text
+ if (selected.length === 0) {
+ // Give extra word
+ chunk = e.__localize('list text here');
+ e.replaceSelection('1. '+chunk);
+ // Set the cursor
+ cursor = selected.start+3;
+ } else {
+ if (selected.text.indexOf('\n') < 0) {
+ chunk = selected.text;
+
+ e.replaceSelection('1. '+chunk);
+
+ // Set the cursor
+ cursor = selected.start+3;
+ } else {
+ var list = [];
+
+ list = selected.text.split('\n');
+ chunk = list[0];
+
+ $.each(list,function(k,v) {
+ list[k] = '1. '+v;
+ });
+
+ e.replaceSelection('\n\n'+list.join('\n'));
+
+ // Set the cursor
+ cursor = selected.start+5;
+ }
+ }
+
+ // Set the cursor
+ e.setSelection(cursor,cursor+chunk.length);
+ }
+ },
+ {
+ name: 'cmdCode',
+ hotkey: 'Ctrl+K',
+ title: 'Code',
+ icon: { glyph: 'glyphicon glyphicon-asterisk', fa: 'fa fa-code', 'fa-3': 'icon-code' },
+ callback: function(e) {
+ // Give/remove ** surround the selection
+ var chunk, cursor, selected = e.getSelection(), content = e.getContent();
+
+ if (selected.length === 0) {
+ // Give extra word
+ chunk = e.__localize('code text here');
+ } else {
+ chunk = selected.text;
+ }
+
+ // transform selection and set the cursor into chunked text
+ if (content.substr(selected.start-4,4) === '```\n'
+ && content.substr(selected.end,4) === '\n```') {
+ e.setSelection(selected.start-4, selected.end+4);
+ e.replaceSelection(chunk);
+ cursor = selected.start-4;
+ } else if (content.substr(selected.start-1,1) === '`'
+ && content.substr(selected.end,1) === '`') {
+ e.setSelection(selected.start-1,selected.end+1);
+ e.replaceSelection(chunk);
+ cursor = selected.start-1;
+ } else if (content.indexOf('\n') > -1) {
+ e.replaceSelection('```\n'+chunk+'\n```');
+ cursor = selected.start+4;
+ } else {
+ e.replaceSelection('`'+chunk+'`');
+ cursor = selected.start+1;
+ }
+
+ // Set the cursor
+ e.setSelection(cursor,cursor+chunk.length);
+ }
+ },
+ {
+ name: 'cmdQuote',
+ hotkey: 'Ctrl+Q',
+ title: 'Quote',
+ icon: { glyph: 'glyphicon glyphicon-comment', fa: 'fa fa-quote-left', 'fa-3': 'icon-quote-left' },
+ callback: function(e) {
+ // Prepend/Give - surround the selection
+ var chunk, cursor, selected = e.getSelection(), content = e.getContent();
+
+ // transform selection and set the cursor into chunked text
+ if (selected.length === 0) {
+ // Give extra word
+ chunk = e.__localize('quote here');
+
+ e.replaceSelection('> '+chunk);
+
+ // Set the cursor
+ cursor = selected.start+2;
+ } else {
+ if (selected.text.indexOf('\n') < 0) {
+ chunk = selected.text;
+
+ e.replaceSelection('> '+chunk);
+
+ // Set the cursor
+ cursor = selected.start+2;
+ } else {
+ var list = [];
+
+ list = selected.text.split('\n');
+ chunk = list[0];
+
+ $.each(list,function(k,v) {
+ list[k] = '> '+v;
+ });
+
+ e.replaceSelection('\n\n'+list.join('\n'));
+
+ // Set the cursor
+ cursor = selected.start+4;
+ }
+ }
+
+ // Set the cursor
+ e.setSelection(cursor,cursor+chunk.length);
+ }
+ }]
+ },{
+ name: 'groupUtil',
+ data: [{
+ name: 'cmdPreview',
+ toggle: true,
+ hotkey: 'Ctrl+P',
+ title: 'Preview',
+ btnText: 'Preview',
+ btnClass: 'btn btn-primary btn-sm',
+ icon: { glyph: 'glyphicon glyphicon-search', fa: 'fa fa-search', 'fa-3': 'icon-search' },
+ callback: function(e){
+ // Check the preview mode and toggle based on this flag
+ var isPreview = e.$isPreview,content;
+
+ if (isPreview === false) {
+ // Give flag that tell the editor enter preview mode
+ e.showPreview();
+ } else {
+ e.hidePreview();
+ }
+ }
+ }]
+ }]
+ ],
+ additionalButtons:[], // Place to hook more buttons by code
+ reorderButtonGroups:[],
+ hiddenButtons:[], // Default hidden buttons
+ disabledButtons:[], // Default disabled buttons
+ footer: '',
+ fullscreen: {
+ enable: true,
+ icons: {
+ fullscreenOn: {
+ fa: 'fa fa-expand',
+ glyph: 'glyphicon glyphicon-fullscreen',
+ 'fa-3': 'icon-resize-full'
+ },
+ fullscreenOff: {
+ fa: 'fa fa-compress',
+ glyph: 'glyphicon glyphicon-fullscreen',
+ 'fa-3': 'icon-resize-small'
+ }
+ }
+ },
+
+ /* Events hook */
+ onShow: function (e) {},
+ onPreview: function (e) {},
+ onSave: function (e) {},
+ onBlur: function (e) {},
+ onFocus: function (e) {},
+ onChange: function(e) {},
+ onFullscreen: function(e) {},
+ onSelect: function (e) {}
+ };
+
+ $.fn.markdown.Constructor = Markdown;
+
+
+ /* MARKDOWN NO CONFLICT
+ * ==================== */
+
+ $.fn.markdown.noConflict = function () {
+ $.fn.markdown = old;
+ return this;
+ };
+
+ /* MARKDOWN GLOBAL FUNCTION & DATA-API
+ * ==================================== */
+ var initMarkdown = function(el) {
+ var $this = el;
+
+ if ($this.data('markdown')) {
+ $this.data('markdown').showEditor();
+ return;
+ }
+
+ $this.markdown()
+ };
+
+ var blurNonFocused = function(e) {
+ var $activeElement = $(document.activeElement);
+
+ // Blur event
+ $(document).find('.md-editor').each(function(){
+ var $this = $(this),
+ focused = $activeElement.closest('.md-editor')[0] === this,
+ attachedMarkdown = $this.find('textarea').data('markdown') ||
+ $this.find('div[data-provider="markdown-preview"]').data('markdown');
+
+ if (attachedMarkdown && !focused) {
+ attachedMarkdown.blur();
+ }
+ })
+ };
+
+ $(document)
+ .on('click.markdown.data-api', '[data-provide="markdown-editable"]', function (e) {
+ initMarkdown($(this));
+ e.preventDefault();
+ })
+ .on('click focusin', function (e) {
+ blurNonFocused(e);
+ })
+ .ready(function(){
+ $('textarea[data-provide="markdown"]').each(function(){
+ initMarkdown($(this));
+ })
+ });
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select.js b/vendor/assets/javascripts/bootstrap-select.js
new file mode 100644
index 000000000..8947026fb
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select.js
@@ -0,0 +1 @@
+//= require bootstrap-select/bootstrap-select.js
diff --git a/vendor/assets/javascripts/bootstrap-select/bootstrap-select.js b/vendor/assets/javascripts/bootstrap-select/bootstrap-select.js
new file mode 100644
index 000000000..dc2983334
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/bootstrap-select.js
@@ -0,0 +1,3138 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ 'use strict';
+
+ var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
+
+ var uriAttrs = [
+ 'background',
+ 'cite',
+ 'href',
+ 'itemtype',
+ 'longdesc',
+ 'poster',
+ 'src',
+ 'xlink:href'
+ ];
+
+ var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
+
+ var DefaultWhitelist = {
+ // Global attributes allowed on any supplied element below.
+ '*': ['class', 'dir', 'id', 'lang', 'role', 'tabindex', 'style', ARIA_ATTRIBUTE_PATTERN],
+ a: ['target', 'href', 'title', 'rel'],
+ area: [],
+ b: [],
+ br: [],
+ col: [],
+ code: [],
+ div: [],
+ em: [],
+ hr: [],
+ h1: [],
+ h2: [],
+ h3: [],
+ h4: [],
+ h5: [],
+ h6: [],
+ i: [],
+ img: ['src', 'alt', 'title', 'width', 'height'],
+ li: [],
+ ol: [],
+ p: [],
+ pre: [],
+ s: [],
+ small: [],
+ span: [],
+ sub: [],
+ sup: [],
+ strong: [],
+ u: [],
+ ul: []
+ }
+
+ /**
+ * A pattern that recognizes a commonly useful subset of URLs that are safe.
+ *
+ * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
+ */
+ var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
+
+ /**
+ * A pattern that matches safe data URLs. Only matches image, video and audio types.
+ *
+ * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
+ */
+ var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
+
+ function allowedAttribute (attr, allowedAttributeList) {
+ var attrName = attr.nodeName.toLowerCase()
+
+ if ($.inArray(attrName, allowedAttributeList) !== -1) {
+ if ($.inArray(attrName, uriAttrs) !== -1) {
+ return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
+ }
+
+ return true
+ }
+
+ var regExp = $(allowedAttributeList).filter(function (index, value) {
+ return value instanceof RegExp
+ })
+
+ // Check if a regular expression validates the attribute.
+ for (var i = 0, l = regExp.length; i < l; i++) {
+ if (attrName.match(regExp[i])) {
+ return true
+ }
+ }
+
+ return false
+ }
+
+ function sanitizeHtml (unsafeElements, whiteList, sanitizeFn) {
+ if (sanitizeFn && typeof sanitizeFn === 'function') {
+ return sanitizeFn(unsafeElements);
+ }
+
+ var whitelistKeys = Object.keys(whiteList);
+
+ for (var i = 0, len = unsafeElements.length; i < len; i++) {
+ var elements = unsafeElements[i].querySelectorAll('*');
+
+ for (var j = 0, len2 = elements.length; j < len2; j++) {
+ var el = elements[j];
+ var elName = el.nodeName.toLowerCase();
+
+ if (whitelistKeys.indexOf(elName) === -1) {
+ el.parentNode.removeChild(el);
+
+ continue;
+ }
+
+ var attributeList = [].slice.call(el.attributes);
+ var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
+
+ for (var k = 0, len3 = attributeList.length; k < len3; k++) {
+ var attr = attributeList[k];
+
+ if (!allowedAttribute(attr, whitelistedAttributes)) {
+ el.removeAttribute(attr.nodeName);
+ }
+ }
+ }
+ }
+ }
+
+ // Polyfill for browsers with no classList support
+ // Remove in v2
+ if (!('classList' in document.createElement('_'))) {
+ (function (view) {
+ if (!('Element' in view)) return;
+
+ var classListProp = 'classList',
+ protoProp = 'prototype',
+ elemCtrProto = view.Element[protoProp],
+ objCtr = Object,
+ classListGetter = function () {
+ var $elem = $(this);
+
+ return {
+ add: function (classes) {
+ classes = Array.prototype.slice.call(arguments).join(' ');
+ return $elem.addClass(classes);
+ },
+ remove: function (classes) {
+ classes = Array.prototype.slice.call(arguments).join(' ');
+ return $elem.removeClass(classes);
+ },
+ toggle: function (classes, force) {
+ return $elem.toggleClass(classes, force);
+ },
+ contains: function (classes) {
+ return $elem.hasClass(classes);
+ }
+ }
+ };
+
+ if (objCtr.defineProperty) {
+ var classListPropDesc = {
+ get: classListGetter,
+ enumerable: true,
+ configurable: true
+ };
+ try {
+ objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
+ } catch (ex) { // IE 8 doesn't support enumerable:true
+ // adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36
+ // modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected
+ if (ex.number === undefined || ex.number === -0x7FF5EC54) {
+ classListPropDesc.enumerable = false;
+ objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
+ }
+ }
+ } else if (objCtr[protoProp].__defineGetter__) {
+ elemCtrProto.__defineGetter__(classListProp, classListGetter);
+ }
+ }(window));
+ }
+
+ var testElement = document.createElement('_');
+
+ testElement.classList.add('c1', 'c2');
+
+ if (!testElement.classList.contains('c2')) {
+ var _add = DOMTokenList.prototype.add,
+ _remove = DOMTokenList.prototype.remove;
+
+ DOMTokenList.prototype.add = function () {
+ Array.prototype.forEach.call(arguments, _add.bind(this));
+ }
+
+ DOMTokenList.prototype.remove = function () {
+ Array.prototype.forEach.call(arguments, _remove.bind(this));
+ }
+ }
+
+ testElement.classList.toggle('c3', false);
+
+ // Polyfill for IE 10 and Firefox <24, where classList.toggle does not
+ // support the second argument.
+ if (testElement.classList.contains('c3')) {
+ var _toggle = DOMTokenList.prototype.toggle;
+
+ DOMTokenList.prototype.toggle = function (token, force) {
+ if (1 in arguments && !this.contains(token) === !force) {
+ return force;
+ } else {
+ return _toggle.call(this, token);
+ }
+ };
+ }
+
+ testElement = null;
+
+ // shallow array comparison
+ function isEqual (array1, array2) {
+ return array1.length === array2.length && array1.every(function (element, index) {
+ return element === array2[index];
+ });
+ };
+
+ //
+ if (!String.prototype.startsWith) {
+ (function () {
+ 'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
+ var defineProperty = (function () {
+ // IE 8 only supports `Object.defineProperty` on DOM elements
+ try {
+ var object = {};
+ var $defineProperty = Object.defineProperty;
+ var result = $defineProperty(object, object, object) && $defineProperty;
+ } catch (error) {
+ }
+ return result;
+ }());
+ var toString = {}.toString;
+ var startsWith = function (search) {
+ if (this == null) {
+ throw new TypeError();
+ }
+ var string = String(this);
+ if (search && toString.call(search) == '[object RegExp]') {
+ throw new TypeError();
+ }
+ var stringLength = string.length;
+ var searchString = String(search);
+ var searchLength = searchString.length;
+ var position = arguments.length > 1 ? arguments[1] : undefined;
+ // `ToInteger`
+ var pos = position ? Number(position) : 0;
+ if (pos != pos) { // better `isNaN`
+ pos = 0;
+ }
+ var start = Math.min(Math.max(pos, 0), stringLength);
+ // Avoid the `indexOf` call if no match is possible
+ if (searchLength + start > stringLength) {
+ return false;
+ }
+ var index = -1;
+ while (++index < searchLength) {
+ if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {
+ return false;
+ }
+ }
+ return true;
+ };
+ if (defineProperty) {
+ defineProperty(String.prototype, 'startsWith', {
+ 'value': startsWith,
+ 'configurable': true,
+ 'writable': true
+ });
+ } else {
+ String.prototype.startsWith = startsWith;
+ }
+ }());
+ }
+
+ if (!Object.keys) {
+ Object.keys = function (
+ o, // object
+ k, // key
+ r // result array
+ ) {
+ // initialize object and result
+ r = [];
+ // iterate over object keys
+ for (k in o) {
+ // fill result array with non-prototypical keys
+ r.hasOwnProperty.call(o, k) && r.push(k);
+ }
+ // return result
+ return r;
+ };
+ }
+
+ if (HTMLSelectElement && !HTMLSelectElement.prototype.hasOwnProperty('selectedOptions')) {
+ Object.defineProperty(HTMLSelectElement.prototype, 'selectedOptions', {
+ get: function () {
+ return this.querySelectorAll(':checked');
+ }
+ });
+ }
+
+ function getSelectedOptions (select, ignoreDisabled) {
+ var selectedOptions = select.selectedOptions,
+ options = [],
+ opt;
+
+ if (ignoreDisabled) {
+ for (var i = 0, len = selectedOptions.length; i < len; i++) {
+ opt = selectedOptions[i];
+
+ if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) {
+ options.push(opt);
+ }
+ }
+
+ return options;
+ }
+
+ return selectedOptions;
+ }
+
+ // much faster than $.val()
+ function getSelectValues (select, selectedOptions) {
+ var value = [],
+ options = selectedOptions || select.selectedOptions,
+ opt;
+
+ for (var i = 0, len = options.length; i < len; i++) {
+ opt = options[i];
+
+ if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) {
+ value.push(opt.value || opt.text);
+ }
+ }
+
+ if (!select.multiple) {
+ return !value.length ? null : value[0];
+ }
+
+ return value;
+ }
+
+ // set data-selected on select element if the value has been programmatically selected
+ // prior to initialization of bootstrap-select
+ // * consider removing or replacing an alternative method *
+ var valHooks = {
+ useDefault: false,
+ _set: $.valHooks.select.set
+ };
+
+ $.valHooks.select.set = function (elem, value) {
+ if (value && !valHooks.useDefault) $(elem).data('selected', true);
+
+ return valHooks._set.apply(this, arguments);
+ };
+
+ var changedArguments = null;
+
+ var EventIsSupported = (function () {
+ try {
+ new Event('change');
+ return true;
+ } catch (e) {
+ return false;
+ }
+ })();
+
+ $.fn.triggerNative = function (eventName) {
+ var el = this[0],
+ event;
+
+ if (el.dispatchEvent) { // for modern browsers & IE9+
+ if (EventIsSupported) {
+ // For modern browsers
+ event = new Event(eventName, {
+ bubbles: true
+ });
+ } else {
+ // For IE since it doesn't support Event constructor
+ event = document.createEvent('Event');
+ event.initEvent(eventName, true, false);
+ }
+
+ el.dispatchEvent(event);
+ } else if (el.fireEvent) { // for IE8
+ event = document.createEventObject();
+ event.eventType = eventName;
+ el.fireEvent('on' + eventName, event);
+ } else {
+ // fall back to jQuery.trigger
+ this.trigger(eventName);
+ }
+ };
+ //
+
+ function stringSearch (li, searchString, method, normalize) {
+ var stringTypes = [
+ 'display',
+ 'subtext',
+ 'tokens'
+ ],
+ searchSuccess = false;
+
+ for (var i = 0; i < stringTypes.length; i++) {
+ var stringType = stringTypes[i],
+ string = li[stringType];
+
+ if (string) {
+ string = string.toString();
+
+ // Strip HTML tags. This isn't perfect, but it's much faster than any other method
+ if (stringType === 'display') {
+ string = string.replace(/<[^>]+>/g, '');
+ }
+
+ if (normalize) string = normalizeToBase(string);
+ string = string.toUpperCase();
+
+ if (method === 'contains') {
+ searchSuccess = string.indexOf(searchString) >= 0;
+ } else {
+ searchSuccess = string.startsWith(searchString);
+ }
+
+ if (searchSuccess) break;
+ }
+ }
+
+ return searchSuccess;
+ }
+
+ function toInteger (value) {
+ return parseInt(value, 10) || 0;
+ }
+
+ // Borrowed from Lodash (_.deburr)
+ /** Used to map Latin Unicode letters to basic Latin letters. */
+ var deburredLetters = {
+ // Latin-1 Supplement block.
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss',
+ // Latin Extended-A block.
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+ '\u0134': 'J', '\u0135': 'j',
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+ '\u0174': 'W', '\u0175': 'w',
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
+ '\u0132': 'IJ', '\u0133': 'ij',
+ '\u0152': 'Oe', '\u0153': 'oe',
+ '\u0149': "'n", '\u017f': 's'
+ };
+
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+
+ /** Used to compose unicode character classes. */
+ var rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboMarksExtendedRange = '\\u1ab0-\\u1aff',
+ rsComboMarksSupplementRange = '\\u1dc0-\\u1dff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange + rsComboMarksExtendedRange + rsComboMarksSupplementRange;
+
+ /** Used to compose unicode capture groups. */
+ var rsCombo = '[' + rsComboRange + ']';
+
+ /**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+ var reComboMark = RegExp(rsCombo, 'g');
+
+ function deburrLetter (key) {
+ return deburredLetters[key];
+ };
+
+ function normalizeToBase (string) {
+ string = string.toString();
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
+ }
+
+ // List of HTML entities for escaping.
+ var escapeMap = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+ };
+
+ // Functions for escaping and unescaping strings to/from HTML interpolation.
+ var createEscaper = function (map) {
+ var escaper = function (match) {
+ return map[match];
+ };
+ // Regexes for identifying a key that needs to be escaped.
+ var source = '(?:' + Object.keys(map).join('|') + ')';
+ var testRegexp = RegExp(source);
+ var replaceRegexp = RegExp(source, 'g');
+ return function (string) {
+ string = string == null ? '' : '' + string;
+ return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
+ };
+ };
+
+ var htmlEscape = createEscaper(escapeMap);
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ var keyCodeMap = {
+ 32: ' ',
+ 48: '0',
+ 49: '1',
+ 50: '2',
+ 51: '3',
+ 52: '4',
+ 53: '5',
+ 54: '6',
+ 55: '7',
+ 56: '8',
+ 57: '9',
+ 59: ';',
+ 65: 'A',
+ 66: 'B',
+ 67: 'C',
+ 68: 'D',
+ 69: 'E',
+ 70: 'F',
+ 71: 'G',
+ 72: 'H',
+ 73: 'I',
+ 74: 'J',
+ 75: 'K',
+ 76: 'L',
+ 77: 'M',
+ 78: 'N',
+ 79: 'O',
+ 80: 'P',
+ 81: 'Q',
+ 82: 'R',
+ 83: 'S',
+ 84: 'T',
+ 85: 'U',
+ 86: 'V',
+ 87: 'W',
+ 88: 'X',
+ 89: 'Y',
+ 90: 'Z',
+ 96: '0',
+ 97: '1',
+ 98: '2',
+ 99: '3',
+ 100: '4',
+ 101: '5',
+ 102: '6',
+ 103: '7',
+ 104: '8',
+ 105: '9'
+ };
+
+ var keyCodes = {
+ ESCAPE: 27, // KeyboardEvent.which value for Escape (Esc) key
+ ENTER: 13, // KeyboardEvent.which value for Enter key
+ SPACE: 32, // KeyboardEvent.which value for space key
+ TAB: 9, // KeyboardEvent.which value for tab key
+ ARROW_UP: 38, // KeyboardEvent.which value for up arrow key
+ ARROW_DOWN: 40 // KeyboardEvent.which value for down arrow key
+ }
+
+ var version = {
+ success: false,
+ major: '3'
+ };
+
+ try {
+ version.full = ($.fn.dropdown.Constructor.VERSION || '').split(' ')[0].split('.');
+ version.major = version.full[0];
+ version.success = true;
+ } catch (err) {
+ // do nothing
+ }
+
+ var selectId = 0;
+
+ var EVENT_KEY = '.bs.select';
+
+ var classNames = {
+ DISABLED: 'disabled',
+ DIVIDER: 'divider',
+ SHOW: 'open',
+ DROPUP: 'dropup',
+ MENU: 'dropdown-menu',
+ MENURIGHT: 'dropdown-menu-right',
+ MENULEFT: 'dropdown-menu-left',
+ // to-do: replace with more advanced template/customization options
+ BUTTONCLASS: 'btn-default',
+ POPOVERHEADER: 'popover-title',
+ ICONBASE: 'glyphicon',
+ TICKICON: 'glyphicon-ok'
+ }
+
+ var Selector = {
+ MENU: '.' + classNames.MENU
+ }
+
+ var elementTemplates = {
+ span: document.createElement('span'),
+ i: document.createElement('i'),
+ subtext: document.createElement('small'),
+ a: document.createElement('a'),
+ li: document.createElement('li'),
+ whitespace: document.createTextNode('\u00A0'),
+ fragment: document.createDocumentFragment()
+ }
+
+ elementTemplates.a.setAttribute('role', 'option');
+ elementTemplates.subtext.className = 'text-muted';
+
+ elementTemplates.text = elementTemplates.span.cloneNode(false);
+ elementTemplates.text.className = 'text';
+
+ elementTemplates.checkMark = elementTemplates.span.cloneNode(false);
+
+ var REGEXP_ARROW = new RegExp(keyCodes.ARROW_UP + '|' + keyCodes.ARROW_DOWN);
+ var REGEXP_TAB_OR_ESCAPE = new RegExp('^' + keyCodes.TAB + '$|' + keyCodes.ESCAPE);
+
+ var generateOption = {
+ li: function (content, classes, optgroup) {
+ var li = elementTemplates.li.cloneNode(false);
+
+ if (content) {
+ if (content.nodeType === 1 || content.nodeType === 11) {
+ li.appendChild(content);
+ } else {
+ li.innerHTML = content;
+ }
+ }
+
+ if (typeof classes !== 'undefined' && classes !== '') li.className = classes;
+ if (typeof optgroup !== 'undefined' && optgroup !== null) li.classList.add('optgroup-' + optgroup);
+
+ return li;
+ },
+
+ a: function (text, classes, inline) {
+ var a = elementTemplates.a.cloneNode(true);
+
+ if (text) {
+ if (text.nodeType === 11) {
+ a.appendChild(text);
+ } else {
+ a.insertAdjacentHTML('beforeend', text);
+ }
+ }
+
+ if (typeof classes !== 'undefined' && classes !== '') a.className = classes;
+ if (version.major === '4') a.classList.add('dropdown-item');
+ if (inline) a.setAttribute('style', inline);
+
+ return a;
+ },
+
+ text: function (options, useFragment) {
+ var textElement = elementTemplates.text.cloneNode(false),
+ subtextElement,
+ iconElement;
+
+ if (options.content) {
+ textElement.innerHTML = options.content;
+ } else {
+ textElement.textContent = options.text;
+
+ if (options.icon) {
+ var whitespace = elementTemplates.whitespace.cloneNode(false);
+
+ // need to use for icons in the button to prevent a breaking change
+ // note: switch to span in next major release
+ iconElement = (useFragment === true ? elementTemplates.i : elementTemplates.span).cloneNode(false);
+ iconElement.className = options.iconBase + ' ' + options.icon;
+
+ elementTemplates.fragment.appendChild(iconElement);
+ elementTemplates.fragment.appendChild(whitespace);
+ }
+
+ if (options.subtext) {
+ subtextElement = elementTemplates.subtext.cloneNode(false);
+ subtextElement.textContent = options.subtext;
+ textElement.appendChild(subtextElement);
+ }
+ }
+
+ if (useFragment === true) {
+ while (textElement.childNodes.length > 0) {
+ elementTemplates.fragment.appendChild(textElement.childNodes[0]);
+ }
+ } else {
+ elementTemplates.fragment.appendChild(textElement);
+ }
+
+ return elementTemplates.fragment;
+ },
+
+ label: function (options) {
+ var textElement = elementTemplates.text.cloneNode(false),
+ subtextElement,
+ iconElement;
+
+ textElement.innerHTML = options.label;
+
+ if (options.icon) {
+ var whitespace = elementTemplates.whitespace.cloneNode(false);
+
+ iconElement = elementTemplates.span.cloneNode(false);
+ iconElement.className = options.iconBase + ' ' + options.icon;
+
+ elementTemplates.fragment.appendChild(iconElement);
+ elementTemplates.fragment.appendChild(whitespace);
+ }
+
+ if (options.subtext) {
+ subtextElement = elementTemplates.subtext.cloneNode(false);
+ subtextElement.textContent = options.subtext;
+ textElement.appendChild(subtextElement);
+ }
+
+ elementTemplates.fragment.appendChild(textElement);
+
+ return elementTemplates.fragment;
+ }
+ }
+
+ var Selectpicker = function (element, options) {
+ var that = this;
+
+ // bootstrap-select has been initialized - revert valHooks.select.set back to its original function
+ if (!valHooks.useDefault) {
+ $.valHooks.select.set = valHooks._set;
+ valHooks.useDefault = true;
+ }
+
+ this.$element = $(element);
+ this.$newElement = null;
+ this.$button = null;
+ this.$menu = null;
+ this.options = options;
+ this.selectpicker = {
+ main: {},
+ search: {},
+ current: {}, // current changes if a search is in progress
+ view: {},
+ keydown: {
+ keyHistory: '',
+ resetKeyHistory: {
+ start: function () {
+ return setTimeout(function () {
+ that.selectpicker.keydown.keyHistory = '';
+ }, 800);
+ }
+ }
+ }
+ };
+ // If we have no title yet, try to pull it from the html title attribute (jQuery doesnt' pick it up as it's not a
+ // data-attribute)
+ if (this.options.title === null) {
+ this.options.title = this.$element.attr('title');
+ }
+
+ // Format window padding
+ var winPad = this.options.windowPadding;
+ if (typeof winPad === 'number') {
+ this.options.windowPadding = [winPad, winPad, winPad, winPad];
+ }
+
+ // Expose public methods
+ this.val = Selectpicker.prototype.val;
+ this.render = Selectpicker.prototype.render;
+ this.refresh = Selectpicker.prototype.refresh;
+ this.setStyle = Selectpicker.prototype.setStyle;
+ this.selectAll = Selectpicker.prototype.selectAll;
+ this.deselectAll = Selectpicker.prototype.deselectAll;
+ this.destroy = Selectpicker.prototype.destroy;
+ this.remove = Selectpicker.prototype.remove;
+ this.show = Selectpicker.prototype.show;
+ this.hide = Selectpicker.prototype.hide;
+
+ this.init();
+ };
+
+ Selectpicker.VERSION = '1.13.10';
+
+ // part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both.
+ Selectpicker.DEFAULTS = {
+ noneSelectedText: 'Nothing selected',
+ noneResultsText: 'No results matched {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} item selected' : '{0} items selected';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
+ (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
+ ];
+ },
+ selectAllText: 'Select All',
+ deselectAllText: 'Deselect All',
+ doneButton: false,
+ doneButtonText: 'Close',
+ multipleSeparator: ', ',
+ styleBase: 'btn',
+ style: classNames.BUTTONCLASS,
+ size: 'auto',
+ title: null,
+ selectedTextFormat: 'values',
+ width: false,
+ container: false,
+ hideDisabled: false,
+ showSubtext: false,
+ showIcon: true,
+ showContent: true,
+ dropupAuto: true,
+ header: false,
+ liveSearch: false,
+ liveSearchPlaceholder: null,
+ liveSearchNormalize: false,
+ liveSearchStyle: 'contains',
+ actionsBox: false,
+ iconBase: classNames.ICONBASE,
+ tickIcon: classNames.TICKICON,
+ showTick: false,
+ template: {
+ caret: ' '
+ },
+ maxOptions: false,
+ mobile: false,
+ selectOnTab: false,
+ dropdownAlignRight: false,
+ windowPadding: 0,
+ virtualScroll: 600,
+ display: false,
+ sanitize: true,
+ sanitizeFn: null,
+ whiteList: DefaultWhitelist
+ };
+
+ Selectpicker.prototype = {
+
+ constructor: Selectpicker,
+
+ init: function () {
+ var that = this,
+ id = this.$element.attr('id');
+
+ selectId++;
+ this.selectId = 'bs-select-' + selectId;
+
+ this.$element[0].classList.add('bs-select-hidden');
+
+ this.multiple = this.$element.prop('multiple');
+ this.autofocus = this.$element.prop('autofocus');
+
+ if (this.$element[0].classList.contains('show-tick')) {
+ this.options.showTick = true;
+ }
+
+ this.$newElement = this.createDropdown();
+ this.$element
+ .after(this.$newElement)
+ .prependTo(this.$newElement);
+
+ this.$button = this.$newElement.children('button');
+ this.$menu = this.$newElement.children(Selector.MENU);
+ this.$menuInner = this.$menu.children('.inner');
+ this.$searchbox = this.$menu.find('input');
+
+ this.$element[0].classList.remove('bs-select-hidden');
+
+ if (this.options.dropdownAlignRight === true) this.$menu[0].classList.add(classNames.MENURIGHT);
+
+ if (typeof id !== 'undefined') {
+ this.$button.attr('data-id', id);
+ }
+
+ this.checkDisabled();
+ this.clickListener();
+
+ if (this.options.liveSearch) {
+ this.liveSearchListener();
+ this.focusedParent = this.$searchbox[0];
+ } else {
+ this.focusedParent = this.$menuInner[0];
+ }
+
+ this.setStyle();
+ this.render();
+ this.setWidth();
+ if (this.options.container) {
+ this.selectPosition();
+ } else {
+ this.$element.on('hide' + EVENT_KEY, function () {
+ if (that.isVirtual()) {
+ // empty menu on close
+ var menuInner = that.$menuInner[0],
+ emptyMenu = menuInner.firstChild.cloneNode(false);
+
+ // replace the existing UL with an empty one - this is faster than $.empty() or innerHTML = ''
+ menuInner.replaceChild(emptyMenu, menuInner.firstChild);
+ menuInner.scrollTop = 0;
+ }
+ });
+ }
+ this.$menu.data('this', this);
+ this.$newElement.data('this', this);
+ if (this.options.mobile) this.mobile();
+
+ this.$newElement.on({
+ 'hide.bs.dropdown': function (e) {
+ that.$element.trigger('hide' + EVENT_KEY, e);
+ },
+ 'hidden.bs.dropdown': function (e) {
+ that.$element.trigger('hidden' + EVENT_KEY, e);
+ },
+ 'show.bs.dropdown': function (e) {
+ that.$element.trigger('show' + EVENT_KEY, e);
+ },
+ 'shown.bs.dropdown': function (e) {
+ that.$element.trigger('shown' + EVENT_KEY, e);
+ }
+ });
+
+ if (that.$element[0].hasAttribute('required')) {
+ this.$element.on('invalid' + EVENT_KEY, function () {
+ that.$button[0].classList.add('bs-invalid');
+
+ that.$element
+ .on('shown' + EVENT_KEY + '.invalid', function () {
+ that.$element
+ .val(that.$element.val()) // set the value to hide the validation message in Chrome when menu is opened
+ .off('shown' + EVENT_KEY + '.invalid');
+ })
+ .on('rendered' + EVENT_KEY, function () {
+ // if select is no longer invalid, remove the bs-invalid class
+ if (this.validity.valid) that.$button[0].classList.remove('bs-invalid');
+ that.$element.off('rendered' + EVENT_KEY);
+ });
+
+ that.$button.on('blur' + EVENT_KEY, function () {
+ that.$element.trigger('focus').trigger('blur');
+ that.$button.off('blur' + EVENT_KEY);
+ });
+ });
+ }
+
+ setTimeout(function () {
+ that.createLi();
+ that.$element.trigger('loaded' + EVENT_KEY);
+ });
+ },
+
+ createDropdown: function () {
+ // Options
+ // If we are multiple or showTick option is set, then add the show-tick class
+ var showTick = (this.multiple || this.options.showTick) ? ' show-tick' : '',
+ multiselectable = this.multiple ? ' aria-multiselectable="true"' : '',
+ inputGroup = '',
+ autofocus = this.autofocus ? ' autofocus' : '';
+
+ if (version.major < 4 && this.$element.parent().hasClass('input-group')) {
+ inputGroup = ' input-group-btn';
+ }
+
+ // Elements
+ var drop,
+ header = '',
+ searchbox = '',
+ actionsbox = '',
+ donebutton = '';
+
+ if (this.options.header) {
+ header =
+ '';
+ }
+
+ if (this.options.liveSearch) {
+ searchbox =
+ ' ' +
+ ' ' +
+ '
';
+ }
+
+ if (this.multiple && this.options.actionsBox) {
+ actionsbox =
+ '' +
+ '
' +
+ '' +
+ this.options.selectAllText +
+ ' ' +
+ '' +
+ this.options.deselectAllText +
+ ' ' +
+ '
' +
+ '
';
+ }
+
+ if (this.multiple && this.options.doneButton) {
+ donebutton =
+ '';
+ }
+
+ drop =
+ '';
+
+ return $(drop);
+ },
+
+ setPositionData: function () {
+ this.selectpicker.view.canHighlight = [];
+ this.selectpicker.view.size = 0;
+
+ for (var i = 0; i < this.selectpicker.current.data.length; i++) {
+ var li = this.selectpicker.current.data[i],
+ canHighlight = true;
+
+ if (li.type === 'divider') {
+ canHighlight = false;
+ li.height = this.sizeInfo.dividerHeight;
+ } else if (li.type === 'optgroup-label') {
+ canHighlight = false;
+ li.height = this.sizeInfo.dropdownHeaderHeight;
+ } else {
+ li.height = this.sizeInfo.liHeight;
+ }
+
+ if (li.disabled) canHighlight = false;
+
+ this.selectpicker.view.canHighlight.push(canHighlight);
+
+ if (canHighlight) {
+ this.selectpicker.view.size++;
+ li.posinset = this.selectpicker.view.size;
+ }
+
+ li.position = (i === 0 ? 0 : this.selectpicker.current.data[i - 1].position) + li.height;
+ }
+ },
+
+ isVirtual: function () {
+ return (this.options.virtualScroll !== false) && (this.selectpicker.main.elements.length >= this.options.virtualScroll) || this.options.virtualScroll === true;
+ },
+
+ createView: function (isSearching, setSize, refresh) {
+ var that = this,
+ scrollTop = 0,
+ active = [],
+ selected,
+ prevActive;
+
+ this.selectpicker.current = isSearching ? this.selectpicker.search : this.selectpicker.main;
+
+ this.setPositionData();
+
+ if (setSize) {
+ if (refresh) {
+ scrollTop = this.$menuInner[0].scrollTop;
+ } else if (!that.multiple) {
+ var element = that.$element[0],
+ selectedIndex = (element.options[element.selectedIndex] || {}).liIndex;
+
+ if (typeof selectedIndex === 'number' && that.options.size !== false) {
+ var selectedData = that.selectpicker.main.data[selectedIndex],
+ position = selectedData && selectedData.position;
+
+ if (position) {
+ scrollTop = position - ((that.sizeInfo.menuInnerHeight + that.sizeInfo.liHeight) / 2);
+ }
+ }
+ }
+ }
+
+ scroll(scrollTop, true);
+
+ this.$menuInner.off('scroll.createView').on('scroll.createView', function (e, updateValue) {
+ if (!that.noScroll) scroll(this.scrollTop, updateValue);
+ that.noScroll = false;
+ });
+
+ function scroll (scrollTop, init) {
+ var size = that.selectpicker.current.elements.length,
+ chunks = [],
+ chunkSize,
+ chunkCount,
+ firstChunk,
+ lastChunk,
+ currentChunk,
+ prevPositions,
+ positionIsDifferent,
+ previousElements,
+ menuIsDifferent = true,
+ isVirtual = that.isVirtual();
+
+ that.selectpicker.view.scrollTop = scrollTop;
+
+ if (isVirtual === true) {
+ // if an option that is encountered that is wider than the current menu width, update the menu width accordingly
+ if (that.sizeInfo.hasScrollBar && that.$menu[0].offsetWidth > that.sizeInfo.totalMenuWidth) {
+ that.sizeInfo.menuWidth = that.$menu[0].offsetWidth;
+ that.sizeInfo.totalMenuWidth = that.sizeInfo.menuWidth + that.sizeInfo.scrollBarWidth;
+ that.$menu.css('min-width', that.sizeInfo.menuWidth);
+ }
+ }
+
+ chunkSize = Math.ceil(that.sizeInfo.menuInnerHeight / that.sizeInfo.liHeight * 1.5); // number of options in a chunk
+ chunkCount = Math.round(size / chunkSize) || 1; // number of chunks
+
+ for (var i = 0; i < chunkCount; i++) {
+ var endOfChunk = (i + 1) * chunkSize;
+
+ if (i === chunkCount - 1) {
+ endOfChunk = size;
+ }
+
+ chunks[i] = [
+ (i) * chunkSize + (!i ? 0 : 1),
+ endOfChunk
+ ];
+
+ if (!size) break;
+
+ if (currentChunk === undefined && scrollTop <= that.selectpicker.current.data[endOfChunk - 1].position - that.sizeInfo.menuInnerHeight) {
+ currentChunk = i;
+ }
+ }
+
+ if (currentChunk === undefined) currentChunk = 0;
+
+ prevPositions = [that.selectpicker.view.position0, that.selectpicker.view.position1];
+
+ // always display previous, current, and next chunks
+ firstChunk = Math.max(0, currentChunk - 1);
+ lastChunk = Math.min(chunkCount - 1, currentChunk + 1);
+
+ that.selectpicker.view.position0 = isVirtual === false ? 0 : (Math.max(0, chunks[firstChunk][0]) || 0);
+ that.selectpicker.view.position1 = isVirtual === false ? size : (Math.min(size, chunks[lastChunk][1]) || 0);
+
+ positionIsDifferent = prevPositions[0] !== that.selectpicker.view.position0 || prevPositions[1] !== that.selectpicker.view.position1;
+
+ if (that.activeIndex !== undefined) {
+ prevActive = that.selectpicker.main.elements[that.prevActiveIndex];
+ active = that.selectpicker.main.elements[that.activeIndex];
+ selected = that.selectpicker.main.elements[that.selectedIndex];
+
+ if (init) {
+ if (that.activeIndex !== that.selectedIndex) {
+ that.defocusItem(active);
+ }
+ that.activeIndex = undefined;
+ }
+
+ if (that.activeIndex && that.activeIndex !== that.selectedIndex) {
+ that.defocusItem(selected);
+ }
+ }
+
+ if (that.prevActiveIndex !== undefined && that.prevActiveIndex !== that.activeIndex && that.prevActiveIndex !== that.selectedIndex) {
+ that.defocusItem(prevActive);
+ }
+
+ if (init || positionIsDifferent) {
+ previousElements = that.selectpicker.view.visibleElements ? that.selectpicker.view.visibleElements.slice() : [];
+
+ if (isVirtual === false) {
+ that.selectpicker.view.visibleElements = that.selectpicker.current.elements;
+ } else {
+ that.selectpicker.view.visibleElements = that.selectpicker.current.elements.slice(that.selectpicker.view.position0, that.selectpicker.view.position1);
+ }
+
+ that.setOptionStatus();
+
+ // if searching, check to make sure the list has actually been updated before updating DOM
+ // this prevents unnecessary repaints
+ if (isSearching || (isVirtual === false && init)) menuIsDifferent = !isEqual(previousElements, that.selectpicker.view.visibleElements);
+
+ // if virtual scroll is disabled and not searching,
+ // menu should never need to be updated more than once
+ if ((init || isVirtual === true) && menuIsDifferent) {
+ var menuInner = that.$menuInner[0],
+ menuFragment = document.createDocumentFragment(),
+ emptyMenu = menuInner.firstChild.cloneNode(false),
+ marginTop,
+ marginBottom,
+ elements = that.selectpicker.view.visibleElements,
+ toSanitize = [];
+
+ // replace the existing UL with an empty one - this is faster than $.empty()
+ menuInner.replaceChild(emptyMenu, menuInner.firstChild);
+
+ for (var i = 0, visibleElementsLen = elements.length; i < visibleElementsLen; i++) {
+ var element = elements[i],
+ elText,
+ elementData;
+
+ if (that.options.sanitize) {
+ elText = element.lastChild;
+
+ if (elText) {
+ elementData = that.selectpicker.current.data[i + that.selectpicker.view.position0];
+
+ if (elementData && elementData.content && !elementData.sanitized) {
+ toSanitize.push(elText);
+ elementData.sanitized = true;
+ }
+ }
+ }
+
+ menuFragment.appendChild(element);
+ }
+
+ if (that.options.sanitize && toSanitize.length) {
+ sanitizeHtml(toSanitize, that.options.whiteList, that.options.sanitizeFn);
+ }
+
+ if (isVirtual === true) {
+ marginTop = (that.selectpicker.view.position0 === 0 ? 0 : that.selectpicker.current.data[that.selectpicker.view.position0 - 1].position);
+ marginBottom = (that.selectpicker.view.position1 > size - 1 ? 0 : that.selectpicker.current.data[size - 1].position - that.selectpicker.current.data[that.selectpicker.view.position1 - 1].position);
+
+ menuInner.firstChild.style.marginTop = marginTop + 'px';
+ menuInner.firstChild.style.marginBottom = marginBottom + 'px';
+ } else {
+ menuInner.firstChild.style.marginTop = 0;
+ menuInner.firstChild.style.marginBottom = 0;
+ }
+
+ menuInner.firstChild.appendChild(menuFragment);
+ }
+ }
+
+ that.prevActiveIndex = that.activeIndex;
+
+ if (!that.options.liveSearch) {
+ that.$menuInner.trigger('focus');
+ } else if (isSearching && init) {
+ var index = 0,
+ newActive;
+
+ if (!that.selectpicker.view.canHighlight[index]) {
+ index = 1 + that.selectpicker.view.canHighlight.slice(1).indexOf(true);
+ }
+
+ newActive = that.selectpicker.view.visibleElements[index];
+
+ that.defocusItem(that.selectpicker.view.currentActive);
+
+ that.activeIndex = (that.selectpicker.current.data[index] || {}).index;
+
+ that.focusItem(newActive);
+ }
+ }
+
+ $(window)
+ .off('resize' + EVENT_KEY + '.' + this.selectId + '.createView')
+ .on('resize' + EVENT_KEY + '.' + this.selectId + '.createView', function () {
+ var isActive = that.$newElement.hasClass(classNames.SHOW);
+
+ if (isActive) scroll(that.$menuInner[0].scrollTop);
+ });
+ },
+
+ focusItem: function (li, liData, noStyle) {
+ if (li) {
+ liData = liData || this.selectpicker.main.data[this.activeIndex];
+ var a = li.firstChild;
+
+ if (a) {
+ a.setAttribute('aria-setsize', this.selectpicker.view.size);
+ a.setAttribute('aria-posinset', liData.posinset);
+
+ if (noStyle !== true) {
+ this.focusedParent.setAttribute('aria-activedescendant', a.id);
+ li.classList.add('active');
+ a.classList.add('active');
+ }
+ }
+ }
+ },
+
+ defocusItem: function (li) {
+ if (li) {
+ li.classList.remove('active');
+ if (li.firstChild) li.firstChild.classList.remove('active');
+ }
+ },
+
+ setPlaceholder: function () {
+ var updateIndex = false;
+
+ if (this.options.title && !this.multiple) {
+ if (!this.selectpicker.view.titleOption) this.selectpicker.view.titleOption = document.createElement('option');
+
+ // this option doesn't create a new element, but does add a new option at the start,
+ // so startIndex should increase to prevent having to check every option for the bs-title-option class
+ updateIndex = true;
+
+ var element = this.$element[0],
+ isSelected = false,
+ titleNotAppended = !this.selectpicker.view.titleOption.parentNode;
+
+ if (titleNotAppended) {
+ // Use native JS to prepend option (faster)
+ this.selectpicker.view.titleOption.className = 'bs-title-option';
+ this.selectpicker.view.titleOption.value = '';
+
+ // Check if selected or data-selected attribute is already set on an option. If not, select the titleOption option.
+ // the selected item may have been changed by user or programmatically before the bootstrap select plugin runs,
+ // if so, the select will have the data-selected attribute
+ var $opt = $(element.options[element.selectedIndex]);
+ isSelected = $opt.attr('selected') === undefined && this.$element.data('selected') === undefined;
+ }
+
+ if (titleNotAppended || this.selectpicker.view.titleOption.index !== 0) {
+ element.insertBefore(this.selectpicker.view.titleOption, element.firstChild);
+ }
+
+ // Set selected *after* appending to select,
+ // otherwise the option doesn't get selected in IE
+ // set using selectedIndex, as setting the selected attr to true here doesn't work in IE11
+ if (isSelected) element.selectedIndex = 0;
+ }
+
+ return updateIndex;
+ },
+
+ createLi: function () {
+ var that = this,
+ iconBase = this.options.iconBase,
+ optionSelector = ':not([hidden]):not([data-hidden="true"])',
+ mainElements = [],
+ mainData = [],
+ widestOptionLength = 0,
+ optID = 0,
+ startIndex = this.setPlaceholder() ? 1 : 0; // append the titleOption if necessary and skip the first option in the loop
+
+ if (this.options.hideDisabled) optionSelector += ':not(:disabled)';
+
+ if ((that.options.showTick || that.multiple) && !elementTemplates.checkMark.parentNode) {
+ elementTemplates.checkMark.className = iconBase + ' ' + that.options.tickIcon + ' check-mark';
+ elementTemplates.a.appendChild(elementTemplates.checkMark);
+ }
+
+ var selectOptions = this.$element[0].querySelectorAll('select > *' + optionSelector);
+
+ function addDivider (config) {
+ var previousData = mainData[mainData.length - 1];
+
+ // ensure optgroup doesn't create back-to-back dividers
+ if (
+ previousData &&
+ previousData.type === 'divider' &&
+ (previousData.optID || config.optID)
+ ) {
+ return;
+ }
+
+ config = config || {};
+ config.type = 'divider';
+
+ mainElements.push(
+ generateOption.li(
+ false,
+ classNames.DIVIDER,
+ (config.optID ? config.optID + 'div' : undefined)
+ )
+ );
+
+ mainData.push(config);
+ }
+
+ function addOption (option, config) {
+ config = config || {};
+
+ config.divider = option.getAttribute('data-divider') === 'true';
+
+ if (config.divider) {
+ addDivider({
+ optID: config.optID
+ });
+ } else {
+ var liIndex = mainData.length,
+ cssText = option.style.cssText,
+ inlineStyle = cssText ? htmlEscape(cssText) : '',
+ optionClass = (option.className || '') + (config.optgroupClass || '');
+
+ if (config.optID) optionClass = 'opt ' + optionClass;
+
+ config.text = option.textContent;
+
+ config.content = option.getAttribute('data-content');
+ config.tokens = option.getAttribute('data-tokens');
+ config.subtext = option.getAttribute('data-subtext');
+ config.icon = option.getAttribute('data-icon');
+ config.iconBase = iconBase;
+
+ var textElement = generateOption.text(config);
+ var liElement = generateOption.li(
+ generateOption.a(
+ textElement,
+ optionClass,
+ inlineStyle
+ ),
+ '',
+ config.optID
+ );
+
+ if (liElement.firstChild) {
+ liElement.firstChild.id = that.selectId + '-' + liIndex;
+ }
+
+ mainElements.push(liElement);
+
+ option.liIndex = liIndex;
+
+ config.display = config.content || config.text;
+ config.type = 'option';
+ config.index = liIndex;
+ config.option = option;
+ config.disabled = config.disabled || option.disabled;
+
+ mainData.push(config);
+
+ var combinedLength = 0;
+
+ // count the number of characters in the option - not perfect, but should work in most cases
+ if (config.display) combinedLength += config.display.length;
+ if (config.subtext) combinedLength += config.subtext.length;
+ // if there is an icon, ensure this option's width is checked
+ if (config.icon) combinedLength += 1;
+
+ if (combinedLength > widestOptionLength) {
+ widestOptionLength = combinedLength;
+
+ // guess which option is the widest
+ // use this when calculating menu width
+ // not perfect, but it's fast, and the width will be updating accordingly when scrolling
+ that.selectpicker.view.widestOption = mainElements[mainElements.length - 1];
+ }
+ }
+ }
+
+ function addOptgroup (index, selectOptions) {
+ var optgroup = selectOptions[index],
+ previous = selectOptions[index - 1],
+ next = selectOptions[index + 1],
+ options = optgroup.querySelectorAll('option' + optionSelector);
+
+ if (!options.length) return;
+
+ var config = {
+ label: htmlEscape(optgroup.label),
+ subtext: optgroup.getAttribute('data-subtext'),
+ icon: optgroup.getAttribute('data-icon'),
+ iconBase: iconBase
+ },
+ optgroupClass = ' ' + (optgroup.className || ''),
+ headerIndex,
+ lastIndex;
+
+ optID++;
+
+ if (previous) {
+ addDivider({ optID: optID });
+ }
+
+ var labelElement = generateOption.label(config);
+
+ mainElements.push(
+ generateOption.li(labelElement, 'dropdown-header' + optgroupClass, optID)
+ );
+
+ mainData.push({
+ display: config.label,
+ subtext: config.subtext,
+ type: 'optgroup-label',
+ optID: optID
+ });
+
+ for (var j = 0, len = options.length; j < len; j++) {
+ var option = options[j];
+
+ if (j === 0) {
+ headerIndex = mainData.length - 1;
+ lastIndex = headerIndex + len;
+ }
+
+ addOption(option, {
+ headerIndex: headerIndex,
+ lastIndex: lastIndex,
+ optID: optID,
+ optgroupClass: optgroupClass,
+ disabled: optgroup.disabled
+ });
+ }
+
+ if (next) {
+ addDivider({ optID: optID });
+ }
+ }
+
+ for (var len = selectOptions.length; startIndex < len; startIndex++) {
+ var item = selectOptions[startIndex];
+
+ if (item.tagName !== 'OPTGROUP') {
+ addOption(item, {});
+ } else {
+ addOptgroup(startIndex, selectOptions);
+ }
+ }
+
+ this.selectpicker.main.elements = mainElements;
+ this.selectpicker.main.data = mainData;
+
+ this.selectpicker.current = this.selectpicker.main;
+ },
+
+ findLis: function () {
+ return this.$menuInner.find('.inner > li');
+ },
+
+ render: function () {
+ // ensure titleOption is appended and selected (if necessary) before getting selectedOptions
+ this.setPlaceholder();
+
+ var that = this,
+ element = this.$element[0],
+ selectedOptions = getSelectedOptions(element, this.options.hideDisabled),
+ selectedCount = selectedOptions.length,
+ button = this.$button[0],
+ buttonInner = button.querySelector('.filter-option-inner-inner'),
+ multipleSeparator = document.createTextNode(this.options.multipleSeparator),
+ titleFragment = elementTemplates.fragment.cloneNode(false),
+ showCount,
+ countMax,
+ hasContent = false;
+
+ button.classList.toggle('bs-placeholder', that.multiple ? !selectedCount : !getSelectValues(element, selectedOptions));
+
+ this.tabIndex();
+
+ if (this.options.selectedTextFormat === 'static') {
+ titleFragment = generateOption.text({ text: this.options.title }, true);
+ } else {
+ showCount = this.multiple && this.options.selectedTextFormat.indexOf('count') !== -1 && selectedCount > 1;
+
+ // determine if the number of selected options will be shown (showCount === true)
+ if (showCount) {
+ countMax = this.options.selectedTextFormat.split('>');
+ showCount = (countMax.length > 1 && selectedCount > countMax[1]) || (countMax.length === 1 && selectedCount >= 2);
+ }
+
+ // only loop through all selected options if the count won't be shown
+ if (showCount === false) {
+ for (var selectedIndex = 0; selectedIndex < selectedCount; selectedIndex++) {
+ if (selectedIndex < 50) {
+ var option = selectedOptions[selectedIndex],
+ titleOptions = {},
+ thisData = {
+ content: option.getAttribute('data-content'),
+ subtext: option.getAttribute('data-subtext'),
+ icon: option.getAttribute('data-icon')
+ };
+
+ if (this.multiple && selectedIndex > 0) {
+ titleFragment.appendChild(multipleSeparator.cloneNode(false));
+ }
+
+ if (option.title) {
+ titleOptions.text = option.title;
+ } else if (thisData.content && that.options.showContent) {
+ titleOptions.content = thisData.content.toString();
+ hasContent = true;
+ } else {
+ if (that.options.showIcon) {
+ titleOptions.icon = thisData.icon;
+ titleOptions.iconBase = this.options.iconBase;
+ }
+ if (that.options.showSubtext && !that.multiple && thisData.subtext) titleOptions.subtext = ' ' + thisData.subtext;
+ titleOptions.text = option.textContent.trim();
+ }
+
+ titleFragment.appendChild(generateOption.text(titleOptions, true));
+ } else {
+ break;
+ }
+ }
+
+ // add ellipsis
+ if (selectedCount > 49) {
+ titleFragment.appendChild(document.createTextNode('...'));
+ }
+ } else {
+ var optionSelector = ':not([hidden]):not([data-hidden="true"]):not([data-divider="true"])';
+ if (this.options.hideDisabled) optionSelector += ':not(:disabled)';
+
+ // If this is a multiselect, and selectedTextFormat is count, then show 1 of 2 selected, etc.
+ var totalCount = this.$element[0].querySelectorAll('select > option' + optionSelector + ', optgroup' + optionSelector + ' option' + optionSelector).length,
+ tr8nText = (typeof this.options.countSelectedText === 'function') ? this.options.countSelectedText(selectedCount, totalCount) : this.options.countSelectedText;
+
+ titleFragment = generateOption.text({
+ text: tr8nText.replace('{0}', selectedCount.toString()).replace('{1}', totalCount.toString())
+ }, true);
+ }
+ }
+
+ if (this.options.title == undefined) {
+ // use .attr to ensure undefined is returned if title attribute is not set
+ this.options.title = this.$element.attr('title');
+ }
+
+ // If the select doesn't have a title, then use the default, or if nothing is set at all, use noneSelectedText
+ if (!titleFragment.childNodes.length) {
+ titleFragment = generateOption.text({
+ text: typeof this.options.title !== 'undefined' ? this.options.title : this.options.noneSelectedText
+ }, true);
+ }
+
+ // strip all HTML tags and trim the result, then unescape any escaped tags
+ button.title = titleFragment.textContent.replace(/<[^>]*>?/g, '').trim();
+
+ if (this.options.sanitize && hasContent) {
+ sanitizeHtml([titleFragment], that.options.whiteList, that.options.sanitizeFn);
+ }
+
+ buttonInner.innerHTML = '';
+ buttonInner.appendChild(titleFragment);
+
+ if (version.major < 4 && this.$newElement[0].classList.contains('bs3-has-addon')) {
+ var filterExpand = button.querySelector('.filter-expand'),
+ clone = buttonInner.cloneNode(true);
+
+ clone.className = 'filter-expand';
+
+ if (filterExpand) {
+ button.replaceChild(clone, filterExpand);
+ } else {
+ button.appendChild(clone);
+ }
+ }
+
+ this.$element.trigger('rendered' + EVENT_KEY);
+ },
+
+ /**
+ * @param [style]
+ * @param [status]
+ */
+ setStyle: function (newStyle, status) {
+ var button = this.$button[0],
+ newElement = this.$newElement[0],
+ style = this.options.style.trim(),
+ buttonClass;
+
+ if (this.$element.attr('class')) {
+ this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi, ''));
+ }
+
+ if (version.major < 4) {
+ newElement.classList.add('bs3');
+
+ if (newElement.parentNode.classList.contains('input-group') &&
+ (newElement.previousElementSibling || newElement.nextElementSibling) &&
+ (newElement.previousElementSibling || newElement.nextElementSibling).classList.contains('input-group-addon')
+ ) {
+ newElement.classList.add('bs3-has-addon');
+ }
+ }
+
+ if (newStyle) {
+ buttonClass = newStyle.trim();
+ } else {
+ buttonClass = style;
+ }
+
+ if (status == 'add') {
+ if (buttonClass) button.classList.add.apply(button.classList, buttonClass.split(' '));
+ } else if (status == 'remove') {
+ if (buttonClass) button.classList.remove.apply(button.classList, buttonClass.split(' '));
+ } else {
+ if (style) button.classList.remove.apply(button.classList, style.split(' '));
+ if (buttonClass) button.classList.add.apply(button.classList, buttonClass.split(' '));
+ }
+ },
+
+ liHeight: function (refresh) {
+ if (!refresh && (this.options.size === false || this.sizeInfo)) return;
+
+ if (!this.sizeInfo) this.sizeInfo = {};
+
+ var newElement = document.createElement('div'),
+ menu = document.createElement('div'),
+ menuInner = document.createElement('div'),
+ menuInnerInner = document.createElement('ul'),
+ divider = document.createElement('li'),
+ dropdownHeader = document.createElement('li'),
+ li = document.createElement('li'),
+ a = document.createElement('a'),
+ text = document.createElement('span'),
+ header = this.options.header && this.$menu.find('.' + classNames.POPOVERHEADER).length > 0 ? this.$menu.find('.' + classNames.POPOVERHEADER)[0].cloneNode(true) : null,
+ search = this.options.liveSearch ? document.createElement('div') : null,
+ actions = this.options.actionsBox && this.multiple && this.$menu.find('.bs-actionsbox').length > 0 ? this.$menu.find('.bs-actionsbox')[0].cloneNode(true) : null,
+ doneButton = this.options.doneButton && this.multiple && this.$menu.find('.bs-donebutton').length > 0 ? this.$menu.find('.bs-donebutton')[0].cloneNode(true) : null,
+ firstOption = this.$element.find('option')[0];
+
+ this.sizeInfo.selectWidth = this.$newElement[0].offsetWidth;
+
+ text.className = 'text';
+ a.className = 'dropdown-item ' + (firstOption ? firstOption.className : '');
+ newElement.className = this.$menu[0].parentNode.className + ' ' + classNames.SHOW;
+ newElement.style.width = this.sizeInfo.selectWidth + 'px';
+ if (this.options.width === 'auto') menu.style.minWidth = 0;
+ menu.className = classNames.MENU + ' ' + classNames.SHOW;
+ menuInner.className = 'inner ' + classNames.SHOW;
+ menuInnerInner.className = classNames.MENU + ' inner ' + (version.major === '4' ? classNames.SHOW : '');
+ divider.className = classNames.DIVIDER;
+ dropdownHeader.className = 'dropdown-header';
+
+ text.appendChild(document.createTextNode('\u200b'));
+ a.appendChild(text);
+ li.appendChild(a);
+ dropdownHeader.appendChild(text.cloneNode(true));
+
+ if (this.selectpicker.view.widestOption) {
+ menuInnerInner.appendChild(this.selectpicker.view.widestOption.cloneNode(true));
+ }
+
+ menuInnerInner.appendChild(li);
+ menuInnerInner.appendChild(divider);
+ menuInnerInner.appendChild(dropdownHeader);
+ if (header) menu.appendChild(header);
+ if (search) {
+ var input = document.createElement('input');
+ search.className = 'bs-searchbox';
+ input.className = 'form-control';
+ search.appendChild(input);
+ menu.appendChild(search);
+ }
+ if (actions) menu.appendChild(actions);
+ menuInner.appendChild(menuInnerInner);
+ menu.appendChild(menuInner);
+ if (doneButton) menu.appendChild(doneButton);
+ newElement.appendChild(menu);
+
+ document.body.appendChild(newElement);
+
+ var liHeight = li.offsetHeight,
+ dropdownHeaderHeight = dropdownHeader ? dropdownHeader.offsetHeight : 0,
+ headerHeight = header ? header.offsetHeight : 0,
+ searchHeight = search ? search.offsetHeight : 0,
+ actionsHeight = actions ? actions.offsetHeight : 0,
+ doneButtonHeight = doneButton ? doneButton.offsetHeight : 0,
+ dividerHeight = $(divider).outerHeight(true),
+ // fall back to jQuery if getComputedStyle is not supported
+ menuStyle = window.getComputedStyle ? window.getComputedStyle(menu) : false,
+ menuWidth = menu.offsetWidth,
+ $menu = menuStyle ? null : $(menu),
+ menuPadding = {
+ vert: toInteger(menuStyle ? menuStyle.paddingTop : $menu.css('paddingTop')) +
+ toInteger(menuStyle ? menuStyle.paddingBottom : $menu.css('paddingBottom')) +
+ toInteger(menuStyle ? menuStyle.borderTopWidth : $menu.css('borderTopWidth')) +
+ toInteger(menuStyle ? menuStyle.borderBottomWidth : $menu.css('borderBottomWidth')),
+ horiz: toInteger(menuStyle ? menuStyle.paddingLeft : $menu.css('paddingLeft')) +
+ toInteger(menuStyle ? menuStyle.paddingRight : $menu.css('paddingRight')) +
+ toInteger(menuStyle ? menuStyle.borderLeftWidth : $menu.css('borderLeftWidth')) +
+ toInteger(menuStyle ? menuStyle.borderRightWidth : $menu.css('borderRightWidth'))
+ },
+ menuExtras = {
+ vert: menuPadding.vert +
+ toInteger(menuStyle ? menuStyle.marginTop : $menu.css('marginTop')) +
+ toInteger(menuStyle ? menuStyle.marginBottom : $menu.css('marginBottom')) + 2,
+ horiz: menuPadding.horiz +
+ toInteger(menuStyle ? menuStyle.marginLeft : $menu.css('marginLeft')) +
+ toInteger(menuStyle ? menuStyle.marginRight : $menu.css('marginRight')) + 2
+ },
+ scrollBarWidth;
+
+ menuInner.style.overflowY = 'scroll';
+
+ scrollBarWidth = menu.offsetWidth - menuWidth;
+
+ document.body.removeChild(newElement);
+
+ this.sizeInfo.liHeight = liHeight;
+ this.sizeInfo.dropdownHeaderHeight = dropdownHeaderHeight;
+ this.sizeInfo.headerHeight = headerHeight;
+ this.sizeInfo.searchHeight = searchHeight;
+ this.sizeInfo.actionsHeight = actionsHeight;
+ this.sizeInfo.doneButtonHeight = doneButtonHeight;
+ this.sizeInfo.dividerHeight = dividerHeight;
+ this.sizeInfo.menuPadding = menuPadding;
+ this.sizeInfo.menuExtras = menuExtras;
+ this.sizeInfo.menuWidth = menuWidth;
+ this.sizeInfo.totalMenuWidth = this.sizeInfo.menuWidth;
+ this.sizeInfo.scrollBarWidth = scrollBarWidth;
+ this.sizeInfo.selectHeight = this.$newElement[0].offsetHeight;
+
+ this.setPositionData();
+ },
+
+ getSelectPosition: function () {
+ var that = this,
+ $window = $(window),
+ pos = that.$newElement.offset(),
+ $container = $(that.options.container),
+ containerPos;
+
+ if (that.options.container && $container.length && !$container.is('body')) {
+ containerPos = $container.offset();
+ containerPos.top += parseInt($container.css('borderTopWidth'));
+ containerPos.left += parseInt($container.css('borderLeftWidth'));
+ } else {
+ containerPos = { top: 0, left: 0 };
+ }
+
+ var winPad = that.options.windowPadding;
+
+ this.sizeInfo.selectOffsetTop = pos.top - containerPos.top - $window.scrollTop();
+ this.sizeInfo.selectOffsetBot = $window.height() - this.sizeInfo.selectOffsetTop - this.sizeInfo.selectHeight - containerPos.top - winPad[2];
+ this.sizeInfo.selectOffsetLeft = pos.left - containerPos.left - $window.scrollLeft();
+ this.sizeInfo.selectOffsetRight = $window.width() - this.sizeInfo.selectOffsetLeft - this.sizeInfo.selectWidth - containerPos.left - winPad[1];
+ this.sizeInfo.selectOffsetTop -= winPad[0];
+ this.sizeInfo.selectOffsetLeft -= winPad[3];
+ },
+
+ setMenuSize: function (isAuto) {
+ this.getSelectPosition();
+
+ var selectWidth = this.sizeInfo.selectWidth,
+ liHeight = this.sizeInfo.liHeight,
+ headerHeight = this.sizeInfo.headerHeight,
+ searchHeight = this.sizeInfo.searchHeight,
+ actionsHeight = this.sizeInfo.actionsHeight,
+ doneButtonHeight = this.sizeInfo.doneButtonHeight,
+ divHeight = this.sizeInfo.dividerHeight,
+ menuPadding = this.sizeInfo.menuPadding,
+ menuInnerHeight,
+ menuHeight,
+ divLength = 0,
+ minHeight,
+ _minHeight,
+ maxHeight,
+ menuInnerMinHeight,
+ estimate;
+
+ if (this.options.dropupAuto) {
+ // Get the estimated height of the menu without scrollbars.
+ // This is useful for smaller menus, where there might be plenty of room
+ // below the button without setting dropup, but we can't know
+ // the exact height of the menu until createView is called later
+ estimate = liHeight * this.selectpicker.current.elements.length + menuPadding.vert;
+ this.$newElement.toggleClass(classNames.DROPUP, this.sizeInfo.selectOffsetTop - this.sizeInfo.selectOffsetBot > this.sizeInfo.menuExtras.vert && estimate + this.sizeInfo.menuExtras.vert + 50 > this.sizeInfo.selectOffsetBot);
+ }
+
+ if (this.options.size === 'auto') {
+ _minHeight = this.selectpicker.current.elements.length > 3 ? this.sizeInfo.liHeight * 3 + this.sizeInfo.menuExtras.vert - 2 : 0;
+ menuHeight = this.sizeInfo.selectOffsetBot - this.sizeInfo.menuExtras.vert;
+ minHeight = _minHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight;
+ menuInnerMinHeight = Math.max(_minHeight - menuPadding.vert, 0);
+
+ if (this.$newElement.hasClass(classNames.DROPUP)) {
+ menuHeight = this.sizeInfo.selectOffsetTop - this.sizeInfo.menuExtras.vert;
+ }
+
+ maxHeight = menuHeight;
+ menuInnerHeight = menuHeight - headerHeight - searchHeight - actionsHeight - doneButtonHeight - menuPadding.vert;
+ } else if (this.options.size && this.options.size != 'auto' && this.selectpicker.current.elements.length > this.options.size) {
+ for (var i = 0; i < this.options.size; i++) {
+ if (this.selectpicker.current.data[i].type === 'divider') divLength++;
+ }
+
+ menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding.vert;
+ menuInnerHeight = menuHeight - menuPadding.vert;
+ maxHeight = menuHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight;
+ minHeight = menuInnerMinHeight = '';
+ }
+
+ if (this.options.dropdownAlignRight === 'auto') {
+ this.$menu.toggleClass(classNames.MENURIGHT, this.sizeInfo.selectOffsetLeft > this.sizeInfo.selectOffsetRight && this.sizeInfo.selectOffsetRight < (this.sizeInfo.totalMenuWidth - selectWidth));
+ }
+
+ this.$menu.css({
+ 'max-height': maxHeight + 'px',
+ 'overflow': 'hidden',
+ 'min-height': minHeight + 'px'
+ });
+
+ this.$menuInner.css({
+ 'max-height': menuInnerHeight + 'px',
+ 'overflow-y': 'auto',
+ 'min-height': menuInnerMinHeight + 'px'
+ });
+
+ // ensure menuInnerHeight is always a positive number to prevent issues calculating chunkSize in createView
+ this.sizeInfo.menuInnerHeight = Math.max(menuInnerHeight, 1);
+
+ if (this.selectpicker.current.data.length && this.selectpicker.current.data[this.selectpicker.current.data.length - 1].position > this.sizeInfo.menuInnerHeight) {
+ this.sizeInfo.hasScrollBar = true;
+ this.sizeInfo.totalMenuWidth = this.sizeInfo.menuWidth + this.sizeInfo.scrollBarWidth;
+
+ this.$menu.css('min-width', this.sizeInfo.totalMenuWidth);
+ }
+
+ if (this.dropdown && this.dropdown._popper) this.dropdown._popper.update();
+ },
+
+ setSize: function (refresh) {
+ this.liHeight(refresh);
+
+ if (this.options.header) this.$menu.css('padding-top', 0);
+ if (this.options.size === false) return;
+
+ var that = this,
+ $window = $(window);
+
+ this.setMenuSize();
+
+ if (this.options.liveSearch) {
+ this.$searchbox
+ .off('input.setMenuSize propertychange.setMenuSize')
+ .on('input.setMenuSize propertychange.setMenuSize', function () {
+ return that.setMenuSize();
+ });
+ }
+
+ if (this.options.size === 'auto') {
+ $window
+ .off('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize')
+ .on('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize', function () {
+ return that.setMenuSize();
+ });
+ } else if (this.options.size && this.options.size != 'auto' && this.selectpicker.current.elements.length > this.options.size) {
+ $window.off('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize');
+ }
+
+ that.createView(false, true, refresh);
+ },
+
+ setWidth: function () {
+ var that = this;
+
+ if (this.options.width === 'auto') {
+ requestAnimationFrame(function () {
+ that.$menu.css('min-width', '0');
+
+ that.$element.on('loaded' + EVENT_KEY, function () {
+ that.liHeight();
+ that.setMenuSize();
+
+ // Get correct width if element is hidden
+ var $selectClone = that.$newElement.clone().appendTo('body'),
+ btnWidth = $selectClone.css('width', 'auto').children('button').outerWidth();
+
+ $selectClone.remove();
+
+ // Set width to whatever's larger, button title or longest option
+ that.sizeInfo.selectWidth = Math.max(that.sizeInfo.totalMenuWidth, btnWidth);
+ that.$newElement.css('width', that.sizeInfo.selectWidth + 'px');
+ });
+ });
+ } else if (this.options.width === 'fit') {
+ // Remove inline min-width so width can be changed from 'auto'
+ this.$menu.css('min-width', '');
+ this.$newElement.css('width', '').addClass('fit-width');
+ } else if (this.options.width) {
+ // Remove inline min-width so width can be changed from 'auto'
+ this.$menu.css('min-width', '');
+ this.$newElement.css('width', this.options.width);
+ } else {
+ // Remove inline min-width/width so width can be changed
+ this.$menu.css('min-width', '');
+ this.$newElement.css('width', '');
+ }
+ // Remove fit-width class if width is changed programmatically
+ if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') {
+ this.$newElement[0].classList.remove('fit-width');
+ }
+ },
+
+ selectPosition: function () {
+ this.$bsContainer = $('
');
+
+ var that = this,
+ $container = $(this.options.container),
+ pos,
+ containerPos,
+ actualHeight,
+ getPlacement = function ($element) {
+ var containerPosition = {},
+ // fall back to dropdown's default display setting if display is not manually set
+ display = that.options.display || (
+ // Bootstrap 3 doesn't have $.fn.dropdown.Constructor.Default
+ $.fn.dropdown.Constructor.Default ? $.fn.dropdown.Constructor.Default.display
+ : false
+ );
+
+ that.$bsContainer.addClass($element.attr('class').replace(/form-control|fit-width/gi, '')).toggleClass(classNames.DROPUP, $element.hasClass(classNames.DROPUP));
+ pos = $element.offset();
+
+ if (!$container.is('body')) {
+ containerPos = $container.offset();
+ containerPos.top += parseInt($container.css('borderTopWidth')) - $container.scrollTop();
+ containerPos.left += parseInt($container.css('borderLeftWidth')) - $container.scrollLeft();
+ } else {
+ containerPos = { top: 0, left: 0 };
+ }
+
+ actualHeight = $element.hasClass(classNames.DROPUP) ? 0 : $element[0].offsetHeight;
+
+ // Bootstrap 4+ uses Popper for menu positioning
+ if (version.major < 4 || display === 'static') {
+ containerPosition.top = pos.top - containerPos.top + actualHeight;
+ containerPosition.left = pos.left - containerPos.left;
+ }
+
+ containerPosition.width = $element[0].offsetWidth;
+
+ that.$bsContainer.css(containerPosition);
+ };
+
+ this.$button.on('click.bs.dropdown.data-api', function () {
+ if (that.isDisabled()) {
+ return;
+ }
+
+ getPlacement(that.$newElement);
+
+ that.$bsContainer
+ .appendTo(that.options.container)
+ .toggleClass(classNames.SHOW, !that.$button.hasClass(classNames.SHOW))
+ .append(that.$menu);
+ });
+
+ $(window)
+ .off('resize' + EVENT_KEY + '.' + this.selectId + ' scroll' + EVENT_KEY + '.' + this.selectId)
+ .on('resize' + EVENT_KEY + '.' + this.selectId + ' scroll' + EVENT_KEY + '.' + this.selectId, function () {
+ var isActive = that.$newElement.hasClass(classNames.SHOW);
+
+ if (isActive) getPlacement(that.$newElement);
+ });
+
+ this.$element.on('hide' + EVENT_KEY, function () {
+ that.$menu.data('height', that.$menu.height());
+ that.$bsContainer.detach();
+ });
+ },
+
+ setOptionStatus: function (selectedOnly) {
+ var that = this;
+
+ that.noScroll = false;
+
+ if (that.selectpicker.view.visibleElements && that.selectpicker.view.visibleElements.length) {
+ for (var i = 0; i < that.selectpicker.view.visibleElements.length; i++) {
+ var liData = that.selectpicker.current.data[i + that.selectpicker.view.position0],
+ option = liData.option;
+
+ if (option) {
+ if (selectedOnly !== true) {
+ that.setDisabled(
+ liData.index,
+ liData.disabled
+ );
+ }
+
+ that.setSelected(
+ liData.index,
+ option.selected
+ );
+ }
+ }
+ }
+ },
+
+ /**
+ * @param {number} index - the index of the option that is being changed
+ * @param {boolean} selected - true if the option is being selected, false if being deselected
+ */
+ setSelected: function (index, selected) {
+ var li = this.selectpicker.main.elements[index],
+ liData = this.selectpicker.main.data[index],
+ activeIndexIsSet = this.activeIndex !== undefined,
+ thisIsActive = this.activeIndex === index,
+ prevActive,
+ a,
+ // if current option is already active
+ // OR
+ // if the current option is being selected, it's NOT multiple, and
+ // activeIndex is undefined:
+ // - when the menu is first being opened, OR
+ // - after a search has been performed, OR
+ // - when retainActive is false when selecting a new option (i.e. index of the newly selected option is not the same as the current activeIndex)
+ keepActive = thisIsActive || (selected && !this.multiple && !activeIndexIsSet);
+
+ liData.selected = selected;
+
+ a = li.firstChild;
+
+ if (selected) {
+ this.selectedIndex = index;
+ }
+
+ li.classList.toggle('selected', selected);
+
+ if (keepActive) {
+ this.focusItem(li, liData);
+ this.selectpicker.view.currentActive = li;
+ this.activeIndex = index;
+ } else {
+ this.defocusItem(li);
+ }
+
+ if (a) {
+ a.classList.toggle('selected', selected);
+
+ if (selected) {
+ a.setAttribute('aria-selected', true);
+ } else {
+ if (this.multiple) {
+ a.setAttribute('aria-selected', false);
+ } else {
+ a.removeAttribute('aria-selected');
+ }
+ }
+ }
+
+ if (!keepActive && !activeIndexIsSet && selected && this.prevActiveIndex !== undefined) {
+ prevActive = this.selectpicker.main.elements[this.prevActiveIndex];
+
+ this.defocusItem(prevActive);
+ }
+ },
+
+ /**
+ * @param {number} index - the index of the option that is being disabled
+ * @param {boolean} disabled - true if the option is being disabled, false if being enabled
+ */
+ setDisabled: function (index, disabled) {
+ var li = this.selectpicker.main.elements[index],
+ a;
+
+ this.selectpicker.main.data[index].disabled = disabled;
+
+ a = li.firstChild;
+
+ li.classList.toggle(classNames.DISABLED, disabled);
+
+ if (a) {
+ if (version.major === '4') a.classList.toggle(classNames.DISABLED, disabled);
+
+ if (disabled) {
+ a.setAttribute('aria-disabled', disabled);
+ a.setAttribute('tabindex', -1);
+ } else {
+ a.removeAttribute('aria-disabled');
+ a.setAttribute('tabindex', 0);
+ }
+ }
+ },
+
+ isDisabled: function () {
+ return this.$element[0].disabled;
+ },
+
+ checkDisabled: function () {
+ var that = this;
+
+ if (this.isDisabled()) {
+ this.$newElement[0].classList.add(classNames.DISABLED);
+ this.$button.addClass(classNames.DISABLED).attr('tabindex', -1).attr('aria-disabled', true);
+ } else {
+ if (this.$button[0].classList.contains(classNames.DISABLED)) {
+ this.$newElement[0].classList.remove(classNames.DISABLED);
+ this.$button.removeClass(classNames.DISABLED).attr('aria-disabled', false);
+ }
+
+ if (this.$button.attr('tabindex') == -1 && !this.$element.data('tabindex')) {
+ this.$button.removeAttr('tabindex');
+ }
+ }
+
+ this.$button.on('click', function () {
+ return !that.isDisabled();
+ });
+ },
+
+ tabIndex: function () {
+ if (this.$element.data('tabindex') !== this.$element.attr('tabindex') &&
+ (this.$element.attr('tabindex') !== -98 && this.$element.attr('tabindex') !== '-98')) {
+ this.$element.data('tabindex', this.$element.attr('tabindex'));
+ this.$button.attr('tabindex', this.$element.data('tabindex'));
+ }
+
+ this.$element.attr('tabindex', -98);
+ },
+
+ clickListener: function () {
+ var that = this,
+ $document = $(document);
+
+ $document.data('spaceSelect', false);
+
+ this.$button.on('keyup', function (e) {
+ if (/(32)/.test(e.keyCode.toString(10)) && $document.data('spaceSelect')) {
+ e.preventDefault();
+ $document.data('spaceSelect', false);
+ }
+ });
+
+ this.$newElement.on('show.bs.dropdown', function () {
+ if (version.major > 3 && !that.dropdown) {
+ that.dropdown = that.$button.data('bs.dropdown');
+ that.dropdown._menu = that.$menu[0];
+ }
+ });
+
+ this.$button.on('click.bs.dropdown.data-api', function () {
+ if (!that.$newElement.hasClass(classNames.SHOW)) {
+ that.setSize();
+ }
+ });
+
+ function setFocus () {
+ if (that.options.liveSearch) {
+ that.$searchbox.trigger('focus');
+ } else {
+ that.$menuInner.trigger('focus');
+ }
+ }
+
+ function checkPopperExists () {
+ if (that.dropdown && that.dropdown._popper && that.dropdown._popper.state.isCreated) {
+ setFocus();
+ } else {
+ requestAnimationFrame(checkPopperExists);
+ }
+ }
+
+ this.$element.on('shown' + EVENT_KEY, function () {
+ if (that.$menuInner[0].scrollTop !== that.selectpicker.view.scrollTop) {
+ that.$menuInner[0].scrollTop = that.selectpicker.view.scrollTop;
+ }
+
+ if (version.major > 3) {
+ requestAnimationFrame(checkPopperExists);
+ } else {
+ setFocus();
+ }
+ });
+
+ // ensure posinset and setsize are correct before selecting an option via a click
+ this.$menuInner.on('mouseenter', 'li a', function (e) {
+ var hoverLi = this.parentElement,
+ position0 = that.isVirtual() ? that.selectpicker.view.position0 : 0,
+ index = Array.prototype.indexOf.call(hoverLi.parentElement.children, hoverLi),
+ hoverData = that.selectpicker.current.data[index + position0];
+
+ that.focusItem(hoverLi, hoverData, true);
+ });
+
+ this.$menuInner.on('click', 'li a', function (e, retainActive) {
+ var $this = $(this),
+ element = that.$element[0],
+ position0 = that.isVirtual() ? that.selectpicker.view.position0 : 0,
+ clickedData = that.selectpicker.current.data[$this.parent().index() + position0],
+ clickedIndex = clickedData.index,
+ prevValue = getSelectValues(element),
+ prevIndex = element.selectedIndex,
+ prevOption = element.options[prevIndex],
+ triggerChange = true;
+
+ // Don't close on multi choice menu
+ if (that.multiple && that.options.maxOptions !== 1) {
+ e.stopPropagation();
+ }
+
+ e.preventDefault();
+
+ // Don't run if the select is disabled
+ if (!that.isDisabled() && !$this.parent().hasClass(classNames.DISABLED)) {
+ var $options = that.$element.find('option'),
+ option = clickedData.option,
+ $option = $(option),
+ state = option.selected,
+ $optgroup = $option.parent('optgroup'),
+ $optgroupOptions = $optgroup.find('option'),
+ maxOptions = that.options.maxOptions,
+ maxOptionsGrp = $optgroup.data('maxOptions') || false;
+
+ if (clickedIndex === that.activeIndex) retainActive = true;
+
+ if (!retainActive) {
+ that.prevActiveIndex = that.activeIndex;
+ that.activeIndex = undefined;
+ }
+
+ if (!that.multiple) { // Deselect all others if not multi select box
+ prevOption.selected = false;
+ option.selected = true;
+ that.setSelected(clickedIndex, true);
+ } else { // Toggle the one we have chosen if we are multi select.
+ option.selected = !state;
+
+ that.setSelected(clickedIndex, !state);
+ $this.trigger('blur');
+
+ if (maxOptions !== false || maxOptionsGrp !== false) {
+ var maxReached = maxOptions < $options.filter(':selected').length,
+ maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length;
+
+ if ((maxOptions && maxReached) || (maxOptionsGrp && maxReachedGrp)) {
+ if (maxOptions && maxOptions == 1) {
+ $options.prop('selected', false);
+ $option.prop('selected', true);
+
+ for (var i = 0; i < $options.length; i++) {
+ that.setSelected(i, false);
+ }
+
+ that.setSelected(clickedIndex, true);
+ } else if (maxOptionsGrp && maxOptionsGrp == 1) {
+ $optgroup.find('option:selected').prop('selected', false);
+ $option.prop('selected', true);
+
+ for (var i = 0; i < $optgroupOptions.length; i++) {
+ var option = $optgroupOptions[i];
+ that.setSelected($options.index(option), false);
+ }
+
+ that.setSelected(clickedIndex, true);
+ } else {
+ var maxOptionsText = typeof that.options.maxOptionsText === 'string' ? [that.options.maxOptionsText, that.options.maxOptionsText] : that.options.maxOptionsText,
+ maxOptionsArr = typeof maxOptionsText === 'function' ? maxOptionsText(maxOptions, maxOptionsGrp) : maxOptionsText,
+ maxTxt = maxOptionsArr[0].replace('{n}', maxOptions),
+ maxTxtGrp = maxOptionsArr[1].replace('{n}', maxOptionsGrp),
+ $notify = $('
');
+ // If {var} is set in array, replace it
+ /** @deprecated */
+ if (maxOptionsArr[2]) {
+ maxTxt = maxTxt.replace('{var}', maxOptionsArr[2][maxOptions > 1 ? 0 : 1]);
+ maxTxtGrp = maxTxtGrp.replace('{var}', maxOptionsArr[2][maxOptionsGrp > 1 ? 0 : 1]);
+ }
+
+ $option.prop('selected', false);
+
+ that.$menu.append($notify);
+
+ if (maxOptions && maxReached) {
+ $notify.append($('' + maxTxt + '
'));
+ triggerChange = false;
+ that.$element.trigger('maxReached' + EVENT_KEY);
+ }
+
+ if (maxOptionsGrp && maxReachedGrp) {
+ $notify.append($('' + maxTxtGrp + '
'));
+ triggerChange = false;
+ that.$element.trigger('maxReachedGrp' + EVENT_KEY);
+ }
+
+ setTimeout(function () {
+ that.setSelected(clickedIndex, false);
+ }, 10);
+
+ $notify.delay(750).fadeOut(300, function () {
+ $(this).remove();
+ });
+ }
+ }
+ }
+ }
+
+ if (!that.multiple || (that.multiple && that.options.maxOptions === 1)) {
+ that.$button.trigger('focus');
+ } else if (that.options.liveSearch) {
+ that.$searchbox.trigger('focus');
+ }
+
+ // Trigger select 'change'
+ if (triggerChange) {
+ if (that.multiple || prevIndex !== element.selectedIndex) {
+ // $option.prop('selected') is current option state (selected/unselected). prevValue is the value of the select prior to being changed.
+ changedArguments = [option.index, $option.prop('selected'), prevValue];
+ that.$element
+ .triggerNative('change');
+ }
+ }
+ }
+ });
+
+ this.$menu.on('click', 'li.' + classNames.DISABLED + ' a, .' + classNames.POPOVERHEADER + ', .' + classNames.POPOVERHEADER + ' :not(.close)', function (e) {
+ if (e.currentTarget == this) {
+ e.preventDefault();
+ e.stopPropagation();
+ if (that.options.liveSearch && !$(e.target).hasClass('close')) {
+ that.$searchbox.trigger('focus');
+ } else {
+ that.$button.trigger('focus');
+ }
+ }
+ });
+
+ this.$menuInner.on('click', '.divider, .dropdown-header', function (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ if (that.options.liveSearch) {
+ that.$searchbox.trigger('focus');
+ } else {
+ that.$button.trigger('focus');
+ }
+ });
+
+ this.$menu.on('click', '.' + classNames.POPOVERHEADER + ' .close', function () {
+ that.$button.trigger('click');
+ });
+
+ this.$searchbox.on('click', function (e) {
+ e.stopPropagation();
+ });
+
+ this.$menu.on('click', '.actions-btn', function (e) {
+ if (that.options.liveSearch) {
+ that.$searchbox.trigger('focus');
+ } else {
+ that.$button.trigger('focus');
+ }
+
+ e.preventDefault();
+ e.stopPropagation();
+
+ if ($(this).hasClass('bs-select-all')) {
+ that.selectAll();
+ } else {
+ that.deselectAll();
+ }
+ });
+
+ this.$element
+ .on('change' + EVENT_KEY, function () {
+ that.render();
+ that.$element.trigger('changed' + EVENT_KEY, changedArguments);
+ changedArguments = null;
+ })
+ .on('focus' + EVENT_KEY, function () {
+ if (!that.options.mobile) that.$button.trigger('focus');
+ });
+ },
+
+ liveSearchListener: function () {
+ var that = this,
+ noResults = document.createElement('li');
+
+ this.$button.on('click.bs.dropdown.data-api', function () {
+ if (!!that.$searchbox.val()) {
+ that.$searchbox.val('');
+ }
+ });
+
+ this.$searchbox.on('click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api', function (e) {
+ e.stopPropagation();
+ });
+
+ this.$searchbox.on('input propertychange', function () {
+ var searchValue = that.$searchbox.val();
+
+ that.selectpicker.search.elements = [];
+ that.selectpicker.search.data = [];
+
+ if (searchValue) {
+ var i,
+ searchMatch = [],
+ q = searchValue.toUpperCase(),
+ cache = {},
+ cacheArr = [],
+ searchStyle = that._searchStyle(),
+ normalizeSearch = that.options.liveSearchNormalize;
+
+ if (normalizeSearch) q = normalizeToBase(q);
+
+ that._$lisSelected = that.$menuInner.find('.selected');
+
+ for (var i = 0; i < that.selectpicker.main.data.length; i++) {
+ var li = that.selectpicker.main.data[i];
+
+ if (!cache[i]) {
+ cache[i] = stringSearch(li, q, searchStyle, normalizeSearch);
+ }
+
+ if (cache[i] && li.headerIndex !== undefined && cacheArr.indexOf(li.headerIndex) === -1) {
+ if (li.headerIndex > 0) {
+ cache[li.headerIndex - 1] = true;
+ cacheArr.push(li.headerIndex - 1);
+ }
+
+ cache[li.headerIndex] = true;
+ cacheArr.push(li.headerIndex);
+
+ cache[li.lastIndex + 1] = true;
+ }
+
+ if (cache[i] && li.type !== 'optgroup-label') cacheArr.push(i);
+ }
+
+ for (var i = 0, cacheLen = cacheArr.length; i < cacheLen; i++) {
+ var index = cacheArr[i],
+ prevIndex = cacheArr[i - 1],
+ li = that.selectpicker.main.data[index],
+ liPrev = that.selectpicker.main.data[prevIndex];
+
+ if (li.type !== 'divider' || (li.type === 'divider' && liPrev && liPrev.type !== 'divider' && cacheLen - 1 !== i)) {
+ that.selectpicker.search.data.push(li);
+ searchMatch.push(that.selectpicker.main.elements[index]);
+ }
+ }
+
+ that.activeIndex = undefined;
+ that.noScroll = true;
+ that.$menuInner.scrollTop(0);
+ that.selectpicker.search.elements = searchMatch;
+ that.createView(true);
+
+ if (!searchMatch.length) {
+ noResults.className = 'no-results';
+ noResults.innerHTML = that.options.noneResultsText.replace('{0}', '"' + htmlEscape(searchValue) + '"');
+ that.$menuInner[0].firstChild.appendChild(noResults);
+ }
+ } else {
+ that.$menuInner.scrollTop(0);
+ that.createView(false);
+ }
+ });
+ },
+
+ _searchStyle: function () {
+ return this.options.liveSearchStyle || 'contains';
+ },
+
+ val: function (value) {
+ var element = this.$element[0];
+
+ if (typeof value !== 'undefined') {
+ var prevValue = getSelectValues(element);
+
+ changedArguments = [null, null, prevValue];
+
+ this.$element
+ .val(value)
+ .trigger('changed' + EVENT_KEY, changedArguments);
+
+ if (this.$newElement.hasClass(classNames.SHOW)) {
+ if (this.multiple) {
+ this.setOptionStatus(true);
+ } else {
+ var liSelectedIndex = (element.options[element.selectedIndex] || {}).liIndex;
+
+ if (typeof liSelectedIndex === 'number') {
+ this.setSelected(this.selectedIndex, false);
+ this.setSelected(liSelectedIndex, true);
+ }
+ }
+ }
+
+ this.render();
+
+ changedArguments = null;
+
+ return this.$element;
+ } else {
+ return this.$element.val();
+ }
+ },
+
+ changeAll: function (status) {
+ if (!this.multiple) return;
+ if (typeof status === 'undefined') status = true;
+
+ var element = this.$element[0],
+ previousSelected = 0,
+ currentSelected = 0,
+ prevValue = getSelectValues(element);
+
+ element.classList.add('bs-select-hidden');
+
+ for (var i = 0, len = this.selectpicker.current.elements.length; i < len; i++) {
+ var liData = this.selectpicker.current.data[i],
+ option = liData.option;
+
+ if (option && !liData.disabled && liData.type !== 'divider') {
+ if (liData.selected) previousSelected++;
+ option.selected = status;
+ if (status) currentSelected++;
+ }
+ }
+
+ element.classList.remove('bs-select-hidden');
+
+ if (previousSelected === currentSelected) return;
+
+ this.setOptionStatus();
+
+ changedArguments = [null, null, prevValue];
+
+ this.$element
+ .triggerNative('change');
+ },
+
+ selectAll: function () {
+ return this.changeAll(true);
+ },
+
+ deselectAll: function () {
+ return this.changeAll(false);
+ },
+
+ toggle: function (e) {
+ e = e || window.event;
+
+ if (e) e.stopPropagation();
+
+ this.$button.trigger('click.bs.dropdown.data-api');
+ },
+
+ keydown: function (e) {
+ var $this = $(this),
+ isToggle = $this.hasClass('dropdown-toggle'),
+ $parent = isToggle ? $this.closest('.dropdown') : $this.closest(Selector.MENU),
+ that = $parent.data('this'),
+ $items = that.findLis(),
+ index,
+ isActive,
+ liActive,
+ activeLi,
+ offset,
+ updateScroll = false,
+ downOnTab = e.which === keyCodes.TAB && !isToggle && !that.options.selectOnTab,
+ isArrowKey = REGEXP_ARROW.test(e.which) || downOnTab,
+ scrollTop = that.$menuInner[0].scrollTop,
+ isVirtual = that.isVirtual(),
+ position0 = isVirtual === true ? that.selectpicker.view.position0 : 0;
+
+ isActive = that.$newElement.hasClass(classNames.SHOW);
+
+ if (
+ !isActive &&
+ (
+ isArrowKey ||
+ (e.which >= 48 && e.which <= 57) ||
+ (e.which >= 96 && e.which <= 105) ||
+ (e.which >= 65 && e.which <= 90)
+ )
+ ) {
+ that.$button.trigger('click.bs.dropdown.data-api');
+
+ if (that.options.liveSearch) {
+ that.$searchbox.trigger('focus');
+ return;
+ }
+ }
+
+ if (e.which === keyCodes.ESCAPE && isActive) {
+ e.preventDefault();
+ that.$button.trigger('click.bs.dropdown.data-api').trigger('focus');
+ }
+
+ if (isArrowKey) { // if up or down
+ if (!$items.length) return;
+
+ liActive = that.selectpicker.main.elements[that.activeIndex];
+ index = liActive ? Array.prototype.indexOf.call(liActive.parentElement.children, liActive) : -1;
+
+ if (index !== -1) {
+ that.defocusItem(liActive);
+ }
+
+ if (e.which === keyCodes.ARROW_UP) { // up
+ if (index !== -1) index--;
+ if (index + position0 < 0) index += $items.length;
+
+ if (!that.selectpicker.view.canHighlight[index + position0]) {
+ index = that.selectpicker.view.canHighlight.slice(0, index + position0).lastIndexOf(true) - position0;
+ if (index === -1) index = $items.length - 1;
+ }
+ } else if (e.which === keyCodes.ARROW_DOWN || downOnTab) { // down
+ index++;
+ if (index + position0 >= that.selectpicker.view.canHighlight.length) index = 0;
+
+ if (!that.selectpicker.view.canHighlight[index + position0]) {
+ index = index + 1 + that.selectpicker.view.canHighlight.slice(index + position0 + 1).indexOf(true);
+ }
+ }
+
+ e.preventDefault();
+
+ var liActiveIndex = position0 + index;
+
+ if (e.which === keyCodes.ARROW_UP) { // up
+ // scroll to bottom and highlight last option
+ if (position0 === 0 && index === $items.length - 1) {
+ that.$menuInner[0].scrollTop = that.$menuInner[0].scrollHeight;
+
+ liActiveIndex = that.selectpicker.current.elements.length - 1;
+ } else {
+ activeLi = that.selectpicker.current.data[liActiveIndex];
+ offset = activeLi.position - activeLi.height;
+
+ updateScroll = offset < scrollTop;
+ }
+ } else if (e.which === keyCodes.ARROW_DOWN || downOnTab) { // down
+ // scroll to top and highlight first option
+ if (index === 0) {
+ that.$menuInner[0].scrollTop = 0;
+
+ liActiveIndex = 0;
+ } else {
+ activeLi = that.selectpicker.current.data[liActiveIndex];
+ offset = activeLi.position - that.sizeInfo.menuInnerHeight;
+
+ updateScroll = offset > scrollTop;
+ }
+ }
+
+ liActive = that.selectpicker.current.elements[liActiveIndex];
+
+ that.activeIndex = that.selectpicker.current.data[liActiveIndex].index;
+
+ that.focusItem(liActive);
+
+ that.selectpicker.view.currentActive = liActive;
+
+ if (updateScroll) that.$menuInner[0].scrollTop = offset;
+
+ if (that.options.liveSearch) {
+ that.$searchbox.trigger('focus');
+ } else {
+ $this.trigger('focus');
+ }
+ } else if (
+ (!$this.is('input') && !REGEXP_TAB_OR_ESCAPE.test(e.which)) ||
+ (e.which === keyCodes.SPACE && that.selectpicker.keydown.keyHistory)
+ ) {
+ var searchMatch,
+ matches = [],
+ keyHistory;
+
+ e.preventDefault();
+
+ that.selectpicker.keydown.keyHistory += keyCodeMap[e.which];
+
+ if (that.selectpicker.keydown.resetKeyHistory.cancel) clearTimeout(that.selectpicker.keydown.resetKeyHistory.cancel);
+ that.selectpicker.keydown.resetKeyHistory.cancel = that.selectpicker.keydown.resetKeyHistory.start();
+
+ keyHistory = that.selectpicker.keydown.keyHistory;
+
+ // if all letters are the same, set keyHistory to just the first character when searching
+ if (/^(.)\1+$/.test(keyHistory)) {
+ keyHistory = keyHistory.charAt(0);
+ }
+
+ // find matches
+ for (var i = 0; i < that.selectpicker.current.data.length; i++) {
+ var li = that.selectpicker.current.data[i],
+ hasMatch;
+
+ hasMatch = stringSearch(li, keyHistory, 'startsWith', true);
+
+ if (hasMatch && that.selectpicker.view.canHighlight[i]) {
+ matches.push(li.index);
+ }
+ }
+
+ if (matches.length) {
+ var matchIndex = 0;
+
+ $items.removeClass('active').find('a').removeClass('active');
+
+ // either only one key has been pressed or they are all the same key
+ if (keyHistory.length === 1) {
+ matchIndex = matches.indexOf(that.activeIndex);
+
+ if (matchIndex === -1 || matchIndex === matches.length - 1) {
+ matchIndex = 0;
+ } else {
+ matchIndex++;
+ }
+ }
+
+ searchMatch = matches[matchIndex];
+
+ activeLi = that.selectpicker.main.data[searchMatch];
+
+ if (scrollTop - activeLi.position > 0) {
+ offset = activeLi.position - activeLi.height;
+ updateScroll = true;
+ } else {
+ offset = activeLi.position - that.sizeInfo.menuInnerHeight;
+ // if the option is already visible at the current scroll position, just keep it the same
+ updateScroll = activeLi.position > scrollTop + that.sizeInfo.menuInnerHeight;
+ }
+
+ liActive = that.selectpicker.main.elements[searchMatch];
+
+ that.activeIndex = matches[matchIndex];
+
+ that.focusItem(liActive);
+
+ if (liActive) liActive.firstChild.focus();
+
+ if (updateScroll) that.$menuInner[0].scrollTop = offset;
+
+ $this.trigger('focus');
+ }
+ }
+
+ // Select focused option if "Enter", "Spacebar" or "Tab" (when selectOnTab is true) are pressed inside the menu.
+ if (
+ isActive &&
+ (
+ (e.which === keyCodes.SPACE && !that.selectpicker.keydown.keyHistory) ||
+ e.which === keyCodes.ENTER ||
+ (e.which === keyCodes.TAB && that.options.selectOnTab)
+ )
+ ) {
+ if (e.which !== keyCodes.SPACE) e.preventDefault();
+
+ if (!that.options.liveSearch || e.which !== keyCodes.SPACE) {
+ that.$menuInner.find('.active a').trigger('click', true); // retain active class
+ $this.trigger('focus');
+
+ if (!that.options.liveSearch) {
+ // Prevent screen from scrolling if the user hits the spacebar
+ e.preventDefault();
+ // Fixes spacebar selection of dropdown items in FF & IE
+ $(document).data('spaceSelect', true);
+ }
+ }
+ }
+ },
+
+ mobile: function () {
+ this.$element[0].classList.add('mobile-device');
+ },
+
+ refresh: function () {
+ // update options if data attributes have been changed
+ var config = $.extend({}, this.options, this.$element.data());
+ this.options = config;
+
+ this.checkDisabled();
+ this.setStyle();
+ this.render();
+ this.createLi();
+ this.setWidth();
+
+ this.setSize(true);
+
+ this.$element.trigger('refreshed' + EVENT_KEY);
+ },
+
+ hide: function () {
+ this.$newElement.hide();
+ },
+
+ show: function () {
+ this.$newElement.show();
+ },
+
+ remove: function () {
+ this.$newElement.remove();
+ this.$element.remove();
+ },
+
+ destroy: function () {
+ this.$newElement.before(this.$element).remove();
+
+ if (this.$bsContainer) {
+ this.$bsContainer.remove();
+ } else {
+ this.$menu.remove();
+ }
+
+ this.$element
+ .off(EVENT_KEY)
+ .removeData('selectpicker')
+ .removeClass('bs-select-hidden selectpicker');
+
+ $(window).off(EVENT_KEY + '.' + this.selectId);
+ }
+ };
+
+ // SELECTPICKER PLUGIN DEFINITION
+ // ==============================
+ function Plugin (option) {
+ // get the args of the outer function..
+ var args = arguments;
+ // The arguments of the function are explicitly re-defined from the argument list, because the shift causes them
+ // to get lost/corrupted in android 2.3 and IE9 #715 #775
+ var _option = option;
+
+ [].shift.apply(args);
+
+ // if the version was not set successfully
+ if (!version.success) {
+ // try to retreive it again
+ try {
+ version.full = ($.fn.dropdown.Constructor.VERSION || '').split(' ')[0].split('.');
+ } catch (err) {
+ // fall back to use BootstrapVersion if set
+ if (Selectpicker.BootstrapVersion) {
+ version.full = Selectpicker.BootstrapVersion.split(' ')[0].split('.');
+ } else {
+ version.full = [version.major, '0', '0'];
+
+ console.warn(
+ 'There was an issue retrieving Bootstrap\'s version. ' +
+ 'Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. ' +
+ 'If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.',
+ err
+ );
+ }
+ }
+
+ version.major = version.full[0];
+ version.success = true;
+ }
+
+ if (version.major === '4') {
+ // some defaults need to be changed if using Bootstrap 4
+ // check to see if they have already been manually changed before forcing them to update
+ var toUpdate = [];
+
+ if (Selectpicker.DEFAULTS.style === classNames.BUTTONCLASS) toUpdate.push({ name: 'style', className: 'BUTTONCLASS' });
+ if (Selectpicker.DEFAULTS.iconBase === classNames.ICONBASE) toUpdate.push({ name: 'iconBase', className: 'ICONBASE' });
+ if (Selectpicker.DEFAULTS.tickIcon === classNames.TICKICON) toUpdate.push({ name: 'tickIcon', className: 'TICKICON' });
+
+ classNames.DIVIDER = 'dropdown-divider';
+ classNames.SHOW = 'show';
+ classNames.BUTTONCLASS = 'btn-light';
+ classNames.POPOVERHEADER = 'popover-header';
+ classNames.ICONBASE = '';
+ classNames.TICKICON = 'bs-ok-default';
+
+ for (var i = 0; i < toUpdate.length; i++) {
+ var option = toUpdate[i];
+ Selectpicker.DEFAULTS[option.name] = classNames[option.className];
+ }
+ }
+
+ var value;
+ var chain = this.each(function () {
+ var $this = $(this);
+ if ($this.is('select')) {
+ var data = $this.data('selectpicker'),
+ options = typeof _option == 'object' && _option;
+
+ if (!data) {
+ var dataAttributes = $this.data();
+
+ for (var dataAttr in dataAttributes) {
+ if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {
+ delete dataAttributes[dataAttr];
+ }
+ }
+
+ var config = $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, dataAttributes, options);
+ config.template = $.extend({}, Selectpicker.DEFAULTS.template, ($.fn.selectpicker.defaults ? $.fn.selectpicker.defaults.template : {}), dataAttributes.template, options.template);
+ $this.data('selectpicker', (data = new Selectpicker(this, config)));
+ } else if (options) {
+ for (var i in options) {
+ if (options.hasOwnProperty(i)) {
+ data.options[i] = options[i];
+ }
+ }
+ }
+
+ if (typeof _option == 'string') {
+ if (data[_option] instanceof Function) {
+ value = data[_option].apply(data, args);
+ } else {
+ value = data.options[_option];
+ }
+ }
+ }
+ });
+
+ if (typeof value !== 'undefined') {
+ // noinspection JSUnusedAssignment
+ return value;
+ } else {
+ return chain;
+ }
+ }
+
+ var old = $.fn.selectpicker;
+ $.fn.selectpicker = Plugin;
+ $.fn.selectpicker.Constructor = Selectpicker;
+
+ // SELECTPICKER NO CONFLICT
+ // ========================
+ $.fn.selectpicker.noConflict = function () {
+ $.fn.selectpicker = old;
+ return this;
+ };
+
+ $(document)
+ .off('keydown.bs.dropdown.data-api')
+ .on('keydown' + EVENT_KEY, '.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input', Selectpicker.prototype.keydown)
+ .on('focusin.modal', '.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input', function (e) {
+ e.stopPropagation();
+ });
+
+ // SELECTPICKER DATA-API
+ // =====================
+ $(window).on('load' + EVENT_KEY + '.data-api', function () {
+ $('.selectpicker').each(function () {
+ var $selectpicker = $(this);
+ Plugin.call($selectpicker, $selectpicker.data());
+ })
+ });
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-am_ET.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-am_ET.js
new file mode 100644
index 000000000..dfa9e78d8
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-am_ET.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'ምንም አልተመረጠም',
+ noneResultsText: 'ከ{0} ጋር ተመሳሳይ ውጤት የለም',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} ምርጫ ተመርጧል' : '{0} ምርጫዎች ተመርጠዋል';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'ገደብ ላይ ተደርሷል (ቢበዛ {n} ምርጫ)' : 'ገደብ ላይ ተደርሷል (ቢበዛ {n} ምርጫዎች)',
+ (numGroup == 1) ? 'የቡድን ገደብ ላይ ተደርሷል (ቢበዛ {n} ምርጫ)' : 'የቡድን ገደብ ላይ ተደርሷል (ቢበዛ {n} ምርጫዎች)'
+ ];
+ },
+ selectAllText: 'ሁሉም ይመረጥ',
+ deselectAllText: 'ሁሉም አይመረጥ',
+ multipleSeparator: ' ፣ '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ar_AR.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ar_AR.js
new file mode 100644
index 000000000..2fe44c731
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ar_AR.js
@@ -0,0 +1,50 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+/*!
+ * Translated default messages for bootstrap-select.
+ * Locale: AR (Arabic)
+ * Author: Yasser Lotfy
+ */
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'لم يتم إختيار شئ',
+ noneResultsText: 'لا توجد نتائج مطابقة لـ {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} خيار تم إختياره' : '{0} خيارات تمت إختيارها';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'تخطى الحد المسموح ({n} خيار بحد أقصى)' : 'تخطى الحد المسموح ({n} خيارات بحد أقصى)',
+ (numGroup == 1) ? 'تخطى الحد المسموح للمجموعة ({n} خيار بحد أقصى)' : 'تخطى الحد المسموح للمجموعة ({n} خيارات بحد أقصى)'
+ ];
+ },
+ selectAllText: 'إختيار الجميع',
+ deselectAllText: 'إلغاء إختيار الجميع',
+ multipleSeparator: '، '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-bg_BG.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-bg_BG.js
new file mode 100644
index 000000000..ee74537d3
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-bg_BG.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Нищо избрано',
+ noneResultsText: 'Няма резултат за {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} избран елемент' : '{0} избрани елемента';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Лимита е достигнат ({n} елемент максимум)' : 'Лимита е достигнат ({n} елемента максимум)',
+ (numGroup == 1) ? 'Груповия лимит е достигнат ({n} елемент максимум)' : 'Груповия лимит е достигнат ({n} елемента максимум)'
+ ];
+ },
+ selectAllText: 'Избери всички',
+ deselectAllText: 'Размаркирай всички',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-cs_CZ.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-cs_CZ.js
new file mode 100644
index 000000000..09c19fd90
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-cs_CZ.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nic není vybráno',
+ noneResultsText: 'Žádné výsledky {0}',
+ countSelectedText: 'Označeno {0} z {1}',
+ maxOptionsText: ['Limit překročen ({n} {var} max)', 'Limit skupiny překročen ({n} {var} max)', ['položek', 'položka']],
+ multipleSeparator: ', ',
+ selectAllText: 'Vybrat Vše',
+ deselectAllText: 'Odznačit Vše'
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-da_DK.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-da_DK.js
new file mode 100644
index 000000000..b70b7ef6d
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-da_DK.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Intet valgt',
+ noneResultsText: 'Ingen resultater fundet {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} valgt' : '{0} valgt';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Begrænsning nået (max {n} valgt)' : 'Begrænsning nået (max {n} valgte)',
+ (numGroup == 1) ? 'Gruppe-begrænsning nået (max {n} valgt)' : 'Gruppe-begrænsning nået (max {n} valgte)'
+ ];
+ },
+ selectAllText: 'Markér alle',
+ deselectAllText: 'Afmarkér alle',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-de_DE.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-de_DE.js
new file mode 100644
index 000000000..35752f70d
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-de_DE.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Bitte wählen...',
+ noneResultsText: 'Keine Ergebnisse für {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} Element ausgewählt' : '{0} Elemente ausgewählt';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Limit erreicht ({n} Element max.)' : 'Limit erreicht ({n} Elemente max.)',
+ (numGroup == 1) ? 'Gruppen-Limit erreicht ({n} Element max.)' : 'Gruppen-Limit erreicht ({n} Elemente max.)'
+ ];
+ },
+ selectAllText: 'Alles auswählen',
+ deselectAllText: 'Nichts auswählen',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-en_US.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-en_US.js
new file mode 100644
index 000000000..579cadc2c
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-en_US.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nothing selected',
+ noneResultsText: 'No results match {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} item selected' : '{0} items selected';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
+ (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
+ ];
+ },
+ selectAllText: 'Select All',
+ deselectAllText: 'Deselect All',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-es_CL.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-es_CL.js
new file mode 100644
index 000000000..28b708a70
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-es_CL.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'No hay selección',
+ noneResultsText: 'No hay resultados {0}',
+ countSelectedText: 'Seleccionados {0} de {1}',
+ maxOptionsText: ['Límite alcanzado ({n} {var} max)', 'Límite del grupo alcanzado({n} {var} max)', ['elementos', 'element']],
+ multipleSeparator: ', ',
+ selectAllText: 'Seleccionar Todos',
+ deselectAllText: 'Desmarcar Todos'
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-es_ES.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-es_ES.js
new file mode 100644
index 000000000..28b708a70
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-es_ES.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'No hay selección',
+ noneResultsText: 'No hay resultados {0}',
+ countSelectedText: 'Seleccionados {0} de {1}',
+ maxOptionsText: ['Límite alcanzado ({n} {var} max)', 'Límite del grupo alcanzado({n} {var} max)', ['elementos', 'element']],
+ multipleSeparator: ', ',
+ selectAllText: 'Seleccionar Todos',
+ deselectAllText: 'Desmarcar Todos'
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-et_EE.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-et_EE.js
new file mode 100644
index 000000000..4ebf4ce2f
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-et_EE.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Valikut pole tehtud',
+ noneResultsText: 'Otsingule {0} ei ole vasteid',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} item selected' : '{0} items selected';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ 'Limiit on {n} max',
+ 'Globaalne limiit on {n} max'
+ ];
+ },
+ selectAllText: 'Vali kõik',
+ deselectAllText: 'Tühista kõik',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-eu.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-eu.js
new file mode 100644
index 000000000..023263f9d
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-eu.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Hautapenik ez',
+ noneResultsText: 'Emaitzarik ez {0}',
+ countSelectedText: '{1}(e)tik {0} hautatuta',
+ maxOptionsText: ['Mugara iritsita ({n} {var} gehienez)', 'Taldearen mugara iritsita ({n} {var} gehienez)', ['elementu', 'elementu']],
+ multipleSeparator: ', ',
+ selectAllText: 'Hautatu Guztiak',
+ deselectAllText: 'Desautatu Guztiak'
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-fa_IR.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-fa_IR.js
new file mode 100644
index 000000000..010a679cf
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-fa_IR.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'چیزی انتخاب نشده است',
+ noneResultsText: 'هیج مشابهی برای {0} پیدا نشد',
+ countSelectedText: '{0} از {1} مورد انتخاب شده',
+ maxOptionsText: ['بیشتر ممکن نیست {حداکثر {n} عدد}', 'بیشتر ممکن نیست {حداکثر {n} عدد}'],
+ selectAllText: 'انتخاب همه',
+ deselectAllText: 'انتخاب هیچ کدام',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-fi_FI.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-fi_FI.js
new file mode 100644
index 000000000..662f8e92f
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-fi_FI.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Ei valintoja',
+ noneResultsText: 'Ei hakutuloksia {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} valittu' : '{0} valitut';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Valintojen maksimimäärä ({n} saavutettu)' : 'Valintojen maksimimäärä ({n} saavutettu)',
+ (numGroup == 1) ? 'Ryhmän maksimimäärä ({n} saavutettu)' : 'Ryhmän maksimimäärä ({n} saavutettu)'
+ ];
+ },
+ selectAllText: 'Valitse kaikki',
+ deselectAllText: 'Poista kaikki',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-fr_FR.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-fr_FR.js
new file mode 100644
index 000000000..0713b8fe7
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-fr_FR.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Aucune sélection',
+ noneResultsText: 'Aucun résultat pour {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected > 1) ? '{0} éléments sélectionnés' : '{0} élément sélectionné';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll > 1) ? 'Limite atteinte ({n} éléments max)' : 'Limite atteinte ({n} élément max)',
+ (numGroup > 1) ? 'Limite du groupe atteinte ({n} éléments max)' : 'Limite du groupe atteinte ({n} élément max)'
+ ];
+ },
+ multipleSeparator: ', ',
+ selectAllText: 'Tout sélectionner',
+ deselectAllText: 'Tout désélectionner'
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-hr_HR.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-hr_HR.js
new file mode 100644
index 000000000..ff96459a4
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-hr_HR.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Odaberite stavku',
+ noneResultsText: 'Nema rezultata pretrage {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} stavka selektirana' : '{0} stavke selektirane';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Limit je postignut ({n} stvar maximalno)' : 'Limit je postignut ({n} stavke maksimalno)',
+ (numGroup == 1) ? 'Grupni limit je postignut ({n} stvar maksimalno)' : 'Grupni limit je postignut ({n} stavke maksimalno)'
+ ];
+ },
+ selectAllText: 'Selektiraj sve',
+ deselectAllText: 'Deselektiraj sve',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-hu_HU.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-hu_HU.js
new file mode 100644
index 000000000..80c8d16db
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-hu_HU.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Válasszon!',
+ noneResultsText: 'Nincs találat {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return '{0} elem kiválasztva';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ 'Legfeljebb {n} elem választható',
+ 'A csoportban legfeljebb {n} elem választható'
+ ];
+ },
+ selectAllText: 'Mind',
+ deselectAllText: 'Egyik sem',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-id_ID.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-id_ID.js
new file mode 100644
index 000000000..59a4f9524
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-id_ID.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Tidak ada yang dipilih',
+ noneResultsText: 'Tidak ada yang cocok {0}',
+ countSelectedText: '{0} terpilih',
+ maxOptionsText: ['Mencapai batas (maksimum {n})', 'Mencapai batas grup (maksimum {n})'],
+ selectAllText: 'Pilih Semua',
+ deselectAllText: 'Hapus Semua',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-it_IT.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-it_IT.js
new file mode 100644
index 000000000..8ab56e55b
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-it_IT.js
@@ -0,0 +1,40 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nessuna selezione',
+ noneResultsText: 'Nessun risultato per {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? 'Selezionato {0} di {1}' : 'Selezionati {0} di {1}';
+ },
+ maxOptionsText: ['Limite raggiunto ({n} {var} max)', 'Limite del gruppo raggiunto ({n} {var} max)', ['elementi', 'elemento']],
+ multipleSeparator: ', ',
+ selectAllText: 'Seleziona Tutto',
+ deselectAllText: 'Deseleziona Tutto'
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ja_JP.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ja_JP.js
new file mode 100644
index 000000000..c9c1baef2
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ja_JP.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: '何もが選択した',
+ noneResultsText: '\'{0}\'が結果を返さない',
+ countSelectedText: '{0}/{1}が選択した',
+ maxOptionsText: ['限界は達した({n}{var}最大)', '限界をグループは達した({n}{var}最大)', ['アイテム', 'アイテム']],
+ selectAllText: '全部を選択する',
+ deselectAllText: '何も選択しない',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-kh_KM.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-kh_KM.js
new file mode 100644
index 000000000..5bf128812
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-kh_KM.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'មិនមានអ្វីបានជ្រើសរើស',
+ noneResultsText: 'មិនមានលទ្ធផល {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} ធាតុដែលបានជ្រើស' : '{0} ធាតុដែលបានជ្រើស';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'ឈានដល់ដែនកំណត់ ( {n} ធាតុអតិបរមា)' : 'អតិបរមាឈានដល់ដែនកំណត់ ( {n} ធាតុ)',
+ (numGroup == 1) ? 'ដែនកំណត់ក្រុមឈានដល់ ( {n} អតិបរមាធាតុ)' : 'អតិបរមាក្រុមឈានដល់ដែនកំណត់ ( {n} ធាតុ)'
+ ];
+ },
+ selectAllText: 'ជ្រើសយកទាំងអស់',
+ deselectAllText: 'មិនជ្រើសយកទាំងអស',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ko_KR.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ko_KR.js
new file mode 100644
index 000000000..cfc8e7232
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ko_KR.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: '항목을 선택해주세요',
+ noneResultsText: '{0} 검색 결과가 없습니다',
+ countSelectedText: function (numSelected, numTotal) {
+ return '{0}개를 선택하였습니다';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ '{n}개까지 선택 가능합니다',
+ '해당 그룹은 {n}개까지 선택 가능합니다'
+ ];
+ },
+ selectAllText: '전체선택',
+ deselectAllText: '전체해제',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-lt_LT.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-lt_LT.js
new file mode 100644
index 000000000..2c607c5a3
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-lt_LT.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Niekas nepasirinkta',
+ noneResultsText: 'Niekas nesutapo su {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} elementas pasirinktas' : '{0} elementai(-ų) pasirinkta';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Pasiekta riba ({n} elementas daugiausiai)' : 'Riba pasiekta ({n} elementai(-ų) daugiausiai)',
+ (numGroup == 1) ? 'Grupės riba pasiekta ({n} elementas daugiausiai)' : 'Grupės riba pasiekta ({n} elementai(-ų) daugiausiai)'
+ ];
+ },
+ selectAllText: 'Pasirinkti visus',
+ deselectAllText: 'Atmesti visus',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-lv_LV.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-lv_LV.js
new file mode 100644
index 000000000..f51bb1531
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-lv_LV.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nekas nav atzīmēts',
+ noneResultsText: 'Nav neviena rezultāta {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} ieraksts atzīmēts' : '{0} ieraksti atzīmēts';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Sasniegts limits ({n} ieraksts maksimums)' : 'Sasniegts limits ({n} ieraksti maksimums)',
+ (numGroup == 1) ? 'Sasniegts grupas limits ({n} ieraksts maksimums)' : 'Sasniegts grupas limits ({n} ieraksti maksimums)'
+ ];
+ },
+ selectAllText: 'Atzīmēt visu',
+ deselectAllText: 'Neatzīmēt nevienu',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-nb_NO.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-nb_NO.js
new file mode 100644
index 000000000..af9b1b2cd
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-nb_NO.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Ingen valgt',
+ noneResultsText: 'Søket gir ingen treff {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} alternativ valgt' : '{0} alternativer valgt';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Grense nådd (maks {n} valg)' : 'Grense nådd (maks {n} valg)',
+ (numGroup == 1) ? 'Grense for grupper nådd (maks {n} grupper)' : 'Grense for grupper nådd (maks {n} grupper)'
+ ];
+ },
+ selectAllText: 'Merk alle',
+ deselectAllText: 'Fjern alle',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-nl_NL.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-nl_NL.js
new file mode 100644
index 000000000..594bc7258
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-nl_NL.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Niets geselecteerd',
+ noneResultsText: 'Geen resultaten gevonden voor {0}',
+ countSelectedText: '{0} van {1} geselecteerd',
+ maxOptionsText: ['Limiet bereikt ({n} {var} max)', 'Groep limiet bereikt ({n} {var} max)', ['items', 'item']],
+ selectAllText: 'Alles selecteren',
+ deselectAllText: 'Alles deselecteren',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-pl_PL.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-pl_PL.js
new file mode 100644
index 000000000..37cd3faff
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-pl_PL.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nic nie zaznaczono',
+ noneResultsText: 'Brak wyników wyszukiwania {0}',
+ countSelectedText: 'Zaznaczono {0} z {1}',
+ maxOptionsText: ['Osiągnięto limit ({n} {var} max)', 'Limit grupy osiągnięty ({n} {var} max)', ['elementy', 'element']],
+ selectAllText: 'Zaznacz wszystkie',
+ deselectAllText: 'Odznacz wszystkie',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-pt_BR.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-pt_BR.js
new file mode 100644
index 000000000..c205334e8
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-pt_BR.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nada selecionado',
+ noneResultsText: 'Nada encontrado contendo {0}',
+ countSelectedText: 'Selecionado {0} de {1}',
+ maxOptionsText: ['Limite excedido (máx. {n} {var})', 'Limite do grupo excedido (máx. {n} {var})', ['itens', 'item']],
+ multipleSeparator: ', ',
+ selectAllText: 'Selecionar Todos',
+ deselectAllText: 'Desmarcar Todos'
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-pt_PT.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-pt_PT.js
new file mode 100644
index 000000000..f1a027098
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-pt_PT.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nenhum seleccionado',
+ noneResultsText: 'Sem resultados contendo {0}',
+ countSelectedText: 'Selecionado {0} de {1}',
+ maxOptionsText: ['Limite ultrapassado (máx. {n} {var})', 'Limite de seleções ultrapassado (máx. {n} {var})', ['itens', 'item']],
+ multipleSeparator: ', ',
+ selectAllText: 'Selecionar Tudo',
+ deselectAllText: 'Desmarcar Todos'
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ro_RO.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ro_RO.js
new file mode 100644
index 000000000..9b2452deb
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ro_RO.js
@@ -0,0 +1,39 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ doneButtonText: 'Închide',
+ noneSelectedText: 'Nu a fost selectat nimic',
+ noneResultsText: 'Nu există niciun rezultat {0}',
+ countSelectedText: '{0} din {1} selectat(e)',
+ maxOptionsText: ['Limita a fost atinsă ({n} {var} max)', 'Limita de grup a fost atinsă ({n} {var} max)', ['iteme', 'item']],
+ selectAllText: 'Selectează toate',
+ deselectAllText: 'Deselectează toate',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ru_RU.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ru_RU.js
new file mode 100644
index 000000000..e1314fd8d
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ru_RU.js
@@ -0,0 +1,39 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Ничего не выбрано',
+ noneResultsText: 'Совпадений не найдено {0}',
+ countSelectedText: 'Выбрано {0} из {1}',
+ maxOptionsText: ['Достигнут предел ({n} {var} максимум)', 'Достигнут предел в группе ({n} {var} максимум)', ['шт.', 'шт.']],
+ doneButtonText: 'Закрыть',
+ selectAllText: 'Выбрать все',
+ deselectAllText: 'Отменить все',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-sk_SK.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-sk_SK.js
new file mode 100644
index 000000000..fdedcecc9
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-sk_SK.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Vyberte zo zoznamu',
+ noneResultsText: 'Pre výraz {0} neboli nájdené žiadne výsledky',
+ countSelectedText: 'Vybrané {0} z {1}',
+ maxOptionsText: ['Limit prekročený ({n} {var} max)', 'Limit skupiny prekročený ({n} {var} max)', ['položiek', 'položka']],
+ selectAllText: 'Vybrať všetky',
+ deselectAllText: 'Zrušiť výber',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-sl_SI.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-sl_SI.js
new file mode 100644
index 000000000..b2510fd29
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-sl_SI.js
@@ -0,0 +1,43 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nič izbranega',
+ noneResultsText: 'Ni zadetkov za {0}',
+ countSelectedText: '{0} od {1} izbranih',
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ 'Omejitev dosežena (max. izbranih: {n})',
+ 'Omejitev skupine dosežena (max. izbranih: {n})'
+ ];
+ },
+ selectAllText: 'Izberi vse',
+ deselectAllText: 'Počisti izbor',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-sv_SE.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-sv_SE.js
new file mode 100644
index 000000000..75e3373ad
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-sv_SE.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Inget valt',
+ noneResultsText: 'Inget sökresultat matchar {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected === 1) ? '{0} alternativ valt' : '{0} alternativ valda';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ 'Gräns uppnåd (max {n} alternativ)',
+ 'Gräns uppnåd (max {n} gruppalternativ)'
+ ];
+ },
+ selectAllText: 'Markera alla',
+ deselectAllText: 'Avmarkera alla',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-tr_TR.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-tr_TR.js
new file mode 100644
index 000000000..35a6fabf2
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-tr_TR.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Hiçbiri seçilmedi',
+ noneResultsText: 'Hiçbir sonuç bulunamadı {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? '{0} öğe seçildi' : '{0} öğe seçildi';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Limit aşıldı (maksimum {n} sayıda öğe )' : 'Limit aşıldı (maksimum {n} sayıda öğe)',
+ (numGroup == 1) ? 'Grup limiti aşıldı (maksimum {n} sayıda öğe)' : 'Grup limiti aşıldı (maksimum {n} sayıda öğe)'
+ ];
+ },
+ selectAllText: 'Tümünü Seç',
+ deselectAllText: 'Seçiniz',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ua_UA.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ua_UA.js
new file mode 100644
index 000000000..fb6044edb
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-ua_UA.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Нічого не вибрано',
+ noneResultsText: 'Збігів не знайдено {0}',
+ countSelectedText: 'Вибрано {0} із {1}',
+ maxOptionsText: ['Досягнута межа ({n} {var} максимум)', 'Досягнута межа в групі ({n} {var} максимум)', ['items', 'item']],
+ multipleSeparator: ', ',
+ selectAllText: 'Вибрати все',
+ deselectAllText: 'Скасувати вибір усі'
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-vi_VN.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-vi_VN.js
new file mode 100644
index 000000000..4822f4e13
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-vi_VN.js
@@ -0,0 +1,45 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Chưa chọn',
+ noneResultsText: 'Không có kết quả cho {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return '{0} mục đã chọn';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ 'Không thể chọn (giới hạn {n} mục)',
+ 'Không thể chọn (giới hạn {n} mục)'
+ ];
+ },
+ selectAllText: 'Chọn tất cả',
+ deselectAllText: 'Bỏ chọn',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-zh_CN.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-zh_CN.js
new file mode 100644
index 000000000..b5c36d275
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-zh_CN.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: '没有选中任何项',
+ noneResultsText: '没有找到匹配项',
+ countSelectedText: '选中{1}中的{0}项',
+ maxOptionsText: ['超出限制 (最多选择{n}项)', '组选择超出限制(最多选择{n}组)'],
+ multipleSeparator: ', ',
+ selectAllText: '全选',
+ deselectAllText: '取消全选'
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/bootstrap-select/i18n/defaults-zh_TW.js b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-zh_TW.js
new file mode 100644
index 000000000..5e73dcacd
--- /dev/null
+++ b/vendor/assets/javascripts/bootstrap-select/i18n/defaults-zh_TW.js
@@ -0,0 +1,38 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (root === undefined && window !== undefined) root = window;
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: '沒有選取任何項目',
+ noneResultsText: '沒有找到符合的結果',
+ countSelectedText: '已經選取{0}個項目',
+ maxOptionsText: ['超過限制 (最多選擇{n}項)', '超過限制(最多選擇{n}組)'],
+ selectAllText: '選取全部',
+ deselectAllText: '全部取消',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/vendor/assets/javascripts/date.format.js b/vendor/assets/javascripts/date.format.js
new file mode 100644
index 000000000..d57f3c5ec
--- /dev/null
+++ b/vendor/assets/javascripts/date.format.js
@@ -0,0 +1 @@
+//= require date.format/date.format.js
diff --git a/vendor/assets/javascripts/date.format/date.format.js b/vendor/assets/javascripts/date.format/date.format.js
new file mode 100644
index 000000000..b32a3164b
--- /dev/null
+++ b/vendor/assets/javascripts/date.format/date.format.js
@@ -0,0 +1,126 @@
+/*
+ * Date Format 1.2.3
+ * (c) 2007-2009 Steven Levithan
+ * MIT license
+ *
+ * Includes enhancements by Scott Trenda
+ * and Kris Kowal
+ *
+ * Accepts a date, a mask, or a date and a mask.
+ * Returns a formatted version of the given date.
+ * The date defaults to the current date/time.
+ * The mask defaults to dateFormat.masks.default.
+ */
+
+var dateFormat = function () {
+ var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
+ timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
+ timezoneClip = /[^-+\dA-Z]/g,
+ pad = function (val, len) {
+ val = String(val);
+ len = len || 2;
+ while (val.length < len) val = "0" + val;
+ return val;
+ };
+
+ // Regexes and supporting functions are cached through closure
+ return function (date, mask, utc) {
+ var dF = dateFormat;
+
+ // You can't provide utc if you skip other args (use the "UTC:" mask prefix)
+ if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) {
+ mask = date;
+ date = undefined;
+ }
+
+ // Passing date through Date applies Date.parse, if necessary
+ date = date ? new Date(date) : new Date;
+ if (isNaN(date)) throw SyntaxError("invalid date");
+
+ mask = String(dF.masks[mask] || mask || dF.masks["default"]);
+
+ // Allow setting the utc argument via the mask
+ if (mask.slice(0, 4) == "UTC:") {
+ mask = mask.slice(4);
+ utc = true;
+ }
+
+ var _ = utc ? "getUTC" : "get",
+ d = date[_ + "Date"](),
+ D = date[_ + "Day"](),
+ m = date[_ + "Month"](),
+ y = date[_ + "FullYear"](),
+ H = date[_ + "Hours"](),
+ M = date[_ + "Minutes"](),
+ s = date[_ + "Seconds"](),
+ L = date[_ + "Milliseconds"](),
+ o = utc ? 0 : date.getTimezoneOffset(),
+ flags = {
+ d: d,
+ dd: pad(d),
+ ddd: dF.i18n.dayNames[D],
+ dddd: dF.i18n.dayNames[D + 7],
+ m: m + 1,
+ mm: pad(m + 1),
+ mmm: dF.i18n.monthNames[m],
+ mmmm: dF.i18n.monthNames[m + 12],
+ yy: String(y).slice(2),
+ yyyy: y,
+ h: H % 12 || 12,
+ hh: pad(H % 12 || 12),
+ H: H,
+ HH: pad(H),
+ M: M,
+ MM: pad(M),
+ s: s,
+ ss: pad(s),
+ l: pad(L, 3),
+ L: pad(L > 99 ? Math.round(L / 10) : L),
+ t: H < 12 ? "a" : "p",
+ tt: H < 12 ? "am" : "pm",
+ T: H < 12 ? "A" : "P",
+ TT: H < 12 ? "AM" : "PM",
+ Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
+ o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
+ S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
+ };
+
+ return mask.replace(token, function ($0) {
+ return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
+ });
+ };
+}();
+
+// Some common format strings
+dateFormat.masks = {
+ "default": "ddd mmm dd yyyy HH:MM:ss",
+ shortDate: "m/d/yy",
+ mediumDate: "mmm d, yyyy",
+ longDate: "mmmm d, yyyy",
+ fullDate: "dddd, mmmm d, yyyy",
+ shortTime: "h:MM TT",
+ mediumTime: "h:MM:ss TT",
+ longTime: "h:MM:ss TT Z",
+ isoDate: "yyyy-mm-dd",
+ isoTime: "HH:MM:ss",
+ isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
+ isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
+};
+
+// Internationalization strings
+dateFormat.i18n = {
+ dayNames: [
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
+ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+ ]
+};
+
+// For convenience...
+Date.prototype.format = function (mask, utc) {
+ return dateFormat(this, mask, utc);
+};
+
diff --git a/vendor/assets/javascripts/holderjs.js b/vendor/assets/javascripts/holderjs.js
new file mode 100644
index 000000000..6d7165254
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs.js
@@ -0,0 +1 @@
+//= require holderjs/holder.js
diff --git a/vendor/assets/javascripts/holderjs/gulpfile.js b/vendor/assets/javascripts/holderjs/gulpfile.js
new file mode 100644
index 000000000..a8b5f93ae
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/gulpfile.js
@@ -0,0 +1,114 @@
+var gulp = require('gulp');
+var concat = require('gulp-concat');
+var uglify = require('gulp-uglify');
+var header = require('gulp-header');
+var jshint = require('gulp-jshint');
+var todo = require('gulp-todo');
+var gulputil = require('gulp-util');
+var replace = require('gulp-replace');
+var webpack = require('webpack-stream');
+var beautify = require('gulp-jsbeautifier');
+var rename = require('gulp-rename');
+
+var moment = require('moment');
+var pkg = require('./package.json');
+
+var banner =
+ '/*!\n\n' +
+ '<%= pkg.officialName %> - <%= pkg.summary %>\nVersion <%= pkg.version %>+<%= build %>\n' +
+ '\u00A9 <%= year %> <%= pkg.author.name %> - <%= pkg.author.url %>\n\n' +
+ 'Site: <%= pkg.homepage %>\n' +
+ 'Issues: <%= pkg.bugs.url %>\n' +
+ 'License: <%= pkg.license %>\n\n' +
+ '*/\n';
+
+function generateBuild() {
+ var date = new Date;
+ return Math.floor((date - (new Date(date.getFullYear(), 0, 0))) / 1000).toString(36)
+}
+
+var build = generateBuild();
+
+gulp.task('jshint', function() {
+ return gulp.src([
+ 'src/lib/*.js',
+ 'src/lib/renderers/*.js',
+ 'src/renderers/*.js',
+ 'src/index.js'
+ ])
+ .pipe(jshint())
+ .pipe(jshint.reporter('default'));
+});
+
+gulp.task('todo', function() {
+ return gulp.src([
+ 'src/lib/*.js',
+ 'src/lib/renderers/*.js',
+ 'src/renderers/*.js',
+ 'src/index.js'
+ ])
+ .pipe(todo())
+ .pipe(gulp.dest('./'));
+});
+
+gulp.task('build', ['jshint'], function() {
+ return gulp.src('src/index.js')
+ .pipe(webpack({
+ output: {
+ library: 'Holder',
+ filename: 'holder.js',
+ libraryTarget: 'umd'
+ }
+ }))
+ .pipe(gulp.dest('./'));
+});
+
+gulp.task('bundle', ['build'], function() {
+ return gulp.src([
+ 'src/lib/vendor/polyfills.js',
+ 'holder.js',
+ 'src/meteor/shim.js'
+ ])
+ .pipe(concat('holder.js'))
+ .pipe(gulp.dest('./'));
+});
+
+gulp.task('minify', ['bundle'], function() {
+ return gulp.src('holder.js')
+ .pipe(uglify())
+ .pipe(rename('holder.min.js'))
+ .pipe(gulp.dest('./'));
+});
+
+gulp.task('banner', ['minify'], function() {
+ return gulp.src(['holder*.js'])
+ .pipe(replace('%version%', pkg.version))
+ .pipe(header(banner, {
+ pkg: pkg,
+ year: moment().format('YYYY'),
+ build: build
+ }))
+ .pipe(gulp.dest('./'));
+});
+
+gulp.task('beautify', function() {
+ return gulp.src(['src/lib/*.js'])
+ .pipe(beautify())
+ .pipe(gulp.dest('src/lib/'));
+});
+
+gulp.task('meteor', function() {
+ return gulp.src('src/meteor/package.js')
+ .pipe(replace('%version%', pkg.version))
+ .pipe(replace('%summary%', pkg.description))
+ .pipe(gulp.dest('./'));
+});
+
+gulp.task('watch', function() {
+ gulp.watch('src/*.js', ['default']);
+});
+
+gulp.task('default', ['todo', 'bundle', 'minify', 'banner', 'meteor'], function() {
+ gulputil.log('Finished build ' + build);
+ build = generateBuild();
+});
diff --git a/vendor/assets/javascripts/holderjs/holder.js b/vendor/assets/javascripts/holderjs/holder.js
new file mode 100644
index 000000000..c116cdb43
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/holder.js
@@ -0,0 +1,3070 @@
+/*!
+
+Holder - client side image placeholders
+Version 2.9.6+fblyy
+© 2018 Ivan Malopinsky - http://imsky.co
+
+Site: http://holderjs.com
+Issues: https://github.com/imsky/holder/issues
+License: MIT
+
+*/
+(function (window) {
+ if (!window.document) return;
+ var document = window.document;
+
+ //https://github.com/inexorabletash/polyfill/blob/master/web.js
+ if (!document.querySelectorAll) {
+ document.querySelectorAll = function (selectors) {
+ var style = document.createElement('style'), elements = [], element;
+ document.documentElement.firstChild.appendChild(style);
+ document._qsa = [];
+
+ style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}';
+ window.scrollBy(0, 0);
+ style.parentNode.removeChild(style);
+
+ while (document._qsa.length) {
+ element = document._qsa.shift();
+ element.style.removeAttribute('x-qsa');
+ elements.push(element);
+ }
+ document._qsa = null;
+ return elements;
+ };
+ }
+
+ if (!document.querySelector) {
+ document.querySelector = function (selectors) {
+ var elements = document.querySelectorAll(selectors);
+ return (elements.length) ? elements[0] : null;
+ };
+ }
+
+ if (!document.getElementsByClassName) {
+ document.getElementsByClassName = function (classNames) {
+ classNames = String(classNames).replace(/^|\s+/g, '.');
+ return document.querySelectorAll(classNames);
+ };
+ }
+
+ //https://github.com/inexorabletash/polyfill
+ // ES5 15.2.3.14 Object.keys ( O )
+ // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys
+ if (!Object.keys) {
+ Object.keys = function (o) {
+ if (o !== Object(o)) { throw TypeError('Object.keys called on non-object'); }
+ var ret = [], p;
+ for (p in o) {
+ if (Object.prototype.hasOwnProperty.call(o, p)) {
+ ret.push(p);
+ }
+ }
+ return ret;
+ };
+ }
+
+ // ES5 15.4.4.18 Array.prototype.forEach ( callbackfn [ , thisArg ] )
+ // From https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach
+ if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function (fun /*, thisp */) {
+ if (this === void 0 || this === null) { throw TypeError(); }
+
+ var t = Object(this);
+ var len = t.length >>> 0;
+ if (typeof fun !== "function") { throw TypeError(); }
+
+ var thisp = arguments[1], i;
+ for (i = 0; i < len; i++) {
+ if (i in t) {
+ fun.call(thisp, t[i], i, t);
+ }
+ }
+ };
+ }
+
+ //https://github.com/inexorabletash/polyfill/blob/master/web.js
+ (function (global) {
+ var B64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+ global.atob = global.atob || function (input) {
+ input = String(input);
+ var position = 0,
+ output = [],
+ buffer = 0, bits = 0, n;
+
+ input = input.replace(/\s/g, '');
+ if ((input.length % 4) === 0) { input = input.replace(/=+$/, ''); }
+ if ((input.length % 4) === 1) { throw Error('InvalidCharacterError'); }
+ if (/[^+/0-9A-Za-z]/.test(input)) { throw Error('InvalidCharacterError'); }
+
+ while (position < input.length) {
+ n = B64_ALPHABET.indexOf(input.charAt(position));
+ buffer = (buffer << 6) | n;
+ bits += 6;
+
+ if (bits === 24) {
+ output.push(String.fromCharCode((buffer >> 16) & 0xFF));
+ output.push(String.fromCharCode((buffer >> 8) & 0xFF));
+ output.push(String.fromCharCode(buffer & 0xFF));
+ bits = 0;
+ buffer = 0;
+ }
+ position += 1;
+ }
+
+ if (bits === 12) {
+ buffer = buffer >> 4;
+ output.push(String.fromCharCode(buffer & 0xFF));
+ } else if (bits === 18) {
+ buffer = buffer >> 2;
+ output.push(String.fromCharCode((buffer >> 8) & 0xFF));
+ output.push(String.fromCharCode(buffer & 0xFF));
+ }
+
+ return output.join('');
+ };
+
+ global.btoa = global.btoa || function (input) {
+ input = String(input);
+ var position = 0,
+ out = [],
+ o1, o2, o3,
+ e1, e2, e3, e4;
+
+ if (/[^\x00-\xFF]/.test(input)) { throw Error('InvalidCharacterError'); }
+
+ while (position < input.length) {
+ o1 = input.charCodeAt(position++);
+ o2 = input.charCodeAt(position++);
+ o3 = input.charCodeAt(position++);
+
+ // 111111 112222 222233 333333
+ e1 = o1 >> 2;
+ e2 = ((o1 & 0x3) << 4) | (o2 >> 4);
+ e3 = ((o2 & 0xf) << 2) | (o3 >> 6);
+ e4 = o3 & 0x3f;
+
+ if (position === input.length + 2) {
+ e3 = 64; e4 = 64;
+ }
+ else if (position === input.length + 1) {
+ e4 = 64;
+ }
+
+ out.push(B64_ALPHABET.charAt(e1),
+ B64_ALPHABET.charAt(e2),
+ B64_ALPHABET.charAt(e3),
+ B64_ALPHABET.charAt(e4));
+ }
+
+ return out.join('');
+ };
+ }(window));
+
+ //https://gist.github.com/jimeh/332357
+ if (!Object.prototype.hasOwnProperty){
+ /*jshint -W001, -W103 */
+ Object.prototype.hasOwnProperty = function(prop) {
+ var proto = this.__proto__ || this.constructor.prototype;
+ return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
+ };
+ /*jshint +W001, +W103 */
+ }
+
+ // @license http://opensource.org/licenses/MIT
+ // copyright Paul Irish 2015
+
+
+ // Date.now() is supported everywhere except IE8. For IE8 we use the Date.now polyfill
+ // github.com/Financial-Times/polyfill-service/blob/master/polyfills/Date.now/polyfill.js
+ // as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values
+
+ // if you want values similar to what you'd get with real perf.now, place this towards the head of the page
+ // but in reality, you're just getting the delta between now() calls, so it's not terribly important where it's placed
+
+
+ (function(){
+
+ if ('performance' in window === false) {
+ window.performance = {};
+ }
+
+ Date.now = (Date.now || function () { // thanks IE8
+ return new Date().getTime();
+ });
+
+ if ('now' in window.performance === false){
+
+ var nowOffset = Date.now();
+
+ if (performance.timing && performance.timing.navigationStart){
+ nowOffset = performance.timing.navigationStart;
+ }
+
+ window.performance.now = function now(){
+ return Date.now() - nowOffset;
+ };
+ }
+
+ })();
+
+ //requestAnimationFrame polyfill for older Firefox/Chrome versions
+ if (!window.requestAnimationFrame) {
+ if (window.webkitRequestAnimationFrame && window.webkitCancelAnimationFrame) {
+ //https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/requestAnimationFrame/polyfill-webkit.js
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return webkitRequestAnimationFrame(function () {
+ callback(global.performance.now());
+ });
+ };
+
+ global.cancelAnimationFrame = global.webkitCancelAnimationFrame;
+ }(window));
+ } else if (window.mozRequestAnimationFrame && window.mozCancelAnimationFrame) {
+ //https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/requestAnimationFrame/polyfill-moz.js
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return mozRequestAnimationFrame(function () {
+ callback(global.performance.now());
+ });
+ };
+
+ global.cancelAnimationFrame = global.mozCancelAnimationFrame;
+ }(window));
+ } else {
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return global.setTimeout(callback, 1000 / 60);
+ };
+
+ global.cancelAnimationFrame = global.clearTimeout;
+ })(window);
+ }
+ }
+})(this);
+
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["Holder"] = factory();
+ else
+ root["Holder"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /*
+ Holder.js - client side image placeholders
+ (c) 2012-2015 Ivan Malopinsky - http://imsky.co
+ */
+
+ module.exports = __webpack_require__(1);
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/*
+ Holder.js - client side image placeholders
+ (c) 2012-2016 Ivan Malopinsky - http://imsky.co
+ */
+
+ //Libraries and functions
+ var onDomReady = __webpack_require__(2);
+ var querystring = __webpack_require__(3);
+
+ var SceneGraph = __webpack_require__(6);
+ var utils = __webpack_require__(7);
+ var SVG = __webpack_require__(8);
+ var DOM = __webpack_require__(9);
+ var Color = __webpack_require__(10);
+ var constants = __webpack_require__(11);
+
+ var svgRenderer = __webpack_require__(12);
+ var sgCanvasRenderer = __webpack_require__(15);
+
+ var extend = utils.extend;
+ var dimensionCheck = utils.dimensionCheck;
+
+ //Constants and definitions
+ var SVG_NS = constants.svg_ns;
+
+ var Holder = {
+ version: constants.version,
+
+ /**
+ * Adds a theme to default settings
+ *
+ * @param {string} name Theme name
+ * @param {Object} theme Theme object, with foreground, background, size, font, and fontweight properties.
+ */
+ addTheme: function(name, theme) {
+ name != null && theme != null && (App.settings.themes[name] = theme);
+ delete App.vars.cache.themeKeys;
+ return this;
+ },
+
+ /**
+ * Appends a placeholder to an element
+ *
+ * @param {string} src Placeholder URL string
+ * @param el A selector or a reference to a DOM node
+ */
+ addImage: function(src, el) {
+ //todo: use jquery fallback if available for all QSA references
+ var nodes = DOM.getNodeArray(el);
+ nodes.forEach(function (node) {
+ var img = DOM.newEl('img');
+ var domProps = {};
+ domProps[App.setup.dataAttr] = src;
+ DOM.setAttr(img, domProps);
+ node.appendChild(img);
+ });
+ return this;
+ },
+
+ /**
+ * Sets whether or not an image is updated on resize.
+ * If an image is set to be updated, it is immediately rendered.
+ *
+ * @param {Object} el Image DOM element
+ * @param {Boolean} value Resizable update flag value
+ */
+ setResizeUpdate: function(el, value) {
+ if (el.holderData) {
+ el.holderData.resizeUpdate = !!value;
+ if (el.holderData.resizeUpdate) {
+ updateResizableElements(el);
+ }
+ }
+ },
+
+ /**
+ * Runs Holder with options. By default runs Holder on all images with "holder.js" in their source attributes.
+ *
+ * @param {Object} userOptions Options object, can contain domain, themes, images, and bgnodes properties
+ */
+ run: function(userOptions) {
+ //todo: split processing into separate queues
+ userOptions = userOptions || {};
+ var engineSettings = {};
+ var options = extend(App.settings, userOptions);
+
+ App.vars.preempted = true;
+ App.vars.dataAttr = options.dataAttr || App.setup.dataAttr;
+
+ engineSettings.renderer = options.renderer ? options.renderer : App.setup.renderer;
+ if (App.setup.renderers.join(',').indexOf(engineSettings.renderer) === -1) {
+ engineSettings.renderer = App.setup.supportsSVG ? 'svg' : (App.setup.supportsCanvas ? 'canvas' : 'html');
+ }
+
+ var images = DOM.getNodeArray(options.images);
+ var bgnodes = DOM.getNodeArray(options.bgnodes);
+ var stylenodes = DOM.getNodeArray(options.stylenodes);
+ var objects = DOM.getNodeArray(options.objects);
+
+ engineSettings.stylesheets = [];
+ engineSettings.svgXMLStylesheet = true;
+ engineSettings.noFontFallback = !!options.noFontFallback;
+ engineSettings.noBackgroundSize = !!options.noBackgroundSize;
+
+ stylenodes.forEach(function (styleNode) {
+ if (styleNode.attributes.rel && styleNode.attributes.href && styleNode.attributes.rel.value == 'stylesheet') {
+ var href = styleNode.attributes.href.value;
+ //todo: write isomorphic relative-to-absolute URL function
+ var proxyLink = DOM.newEl('a');
+ proxyLink.href = href;
+ var stylesheetURL = proxyLink.protocol + '//' + proxyLink.host + proxyLink.pathname + proxyLink.search;
+ engineSettings.stylesheets.push(stylesheetURL);
+ }
+ });
+
+ bgnodes.forEach(function (bgNode) {
+ //Skip processing background nodes if getComputedStyle is unavailable, since only modern browsers would be able to use canvas or SVG to render to background
+ if (!global.getComputedStyle) return;
+ var backgroundImage = global.getComputedStyle(bgNode, null).getPropertyValue('background-image');
+ var dataBackgroundImage = bgNode.getAttribute('data-background-src');
+ var rawURL = dataBackgroundImage || backgroundImage;
+
+ var holderURL = null;
+ var holderString = options.domain + '/';
+ var holderStringIndex = rawURL.indexOf(holderString);
+
+ if (holderStringIndex === 0) {
+ holderURL = rawURL;
+ } else if (holderStringIndex === 1 && rawURL[0] === '?') {
+ holderURL = rawURL.slice(1);
+ } else {
+ var fragment = rawURL.substr(holderStringIndex).match(/([^\"]*)"?\)/);
+ if (fragment !== null) {
+ holderURL = fragment[1];
+ } else if (rawURL.indexOf('url(') === 0) {
+ throw 'Holder: unable to parse background URL: ' + rawURL;
+ }
+ }
+
+ if (holderURL) {
+ var holderFlags = parseURL(holderURL, options);
+ if (holderFlags) {
+ prepareDOMElement({
+ mode: 'background',
+ el: bgNode,
+ flags: holderFlags,
+ engineSettings: engineSettings
+ });
+ }
+ }
+ });
+
+ objects.forEach(function (object) {
+ var objectAttr = {};
+
+ try {
+ objectAttr.data = object.getAttribute('data');
+ objectAttr.dataSrc = object.getAttribute(App.vars.dataAttr);
+ } catch (e) {}
+
+ var objectHasSrcURL = objectAttr.data != null && objectAttr.data.indexOf(options.domain) === 0;
+ var objectHasDataSrcURL = objectAttr.dataSrc != null && objectAttr.dataSrc.indexOf(options.domain) === 0;
+
+ if (objectHasSrcURL) {
+ prepareImageElement(options, engineSettings, objectAttr.data, object);
+ } else if (objectHasDataSrcURL) {
+ prepareImageElement(options, engineSettings, objectAttr.dataSrc, object);
+ }
+ });
+
+ images.forEach(function (image) {
+ var imageAttr = {};
+
+ try {
+ imageAttr.src = image.getAttribute('src');
+ imageAttr.dataSrc = image.getAttribute(App.vars.dataAttr);
+ imageAttr.rendered = image.getAttribute('data-holder-rendered');
+ } catch (e) {}
+
+ var imageHasSrc = imageAttr.src != null;
+ var imageHasDataSrcURL = imageAttr.dataSrc != null && imageAttr.dataSrc.indexOf(options.domain) === 0;
+ var imageRendered = imageAttr.rendered != null && imageAttr.rendered == 'true';
+
+ if (imageHasSrc) {
+ if (imageAttr.src.indexOf(options.domain) === 0) {
+ prepareImageElement(options, engineSettings, imageAttr.src, image);
+ } else if (imageHasDataSrcURL) {
+ //Image has a valid data-src and an invalid src
+ if (imageRendered) {
+ //If the placeholder has already been render, re-render it
+ prepareImageElement(options, engineSettings, imageAttr.dataSrc, image);
+ } else {
+ //If the placeholder has not been rendered, check if the image exists and render a fallback if it doesn't
+ (function(src, options, engineSettings, dataSrc, image) {
+ utils.imageExists(src, function(exists) {
+ if (!exists) {
+ prepareImageElement(options, engineSettings, dataSrc, image);
+ }
+ });
+ })(imageAttr.src, options, engineSettings, imageAttr.dataSrc, image);
+ }
+ }
+ } else if (imageHasDataSrcURL) {
+ prepareImageElement(options, engineSettings, imageAttr.dataSrc, image);
+ }
+ });
+
+ return this;
+ }
+ };
+
+ var App = {
+ settings: {
+ domain: 'holder.js',
+ images: 'img',
+ objects: 'object',
+ bgnodes: 'body .holderjs',
+ stylenodes: 'head link.holderjs',
+ themes: {
+ 'gray': {
+ bg: '#EEEEEE',
+ fg: '#AAAAAA'
+ },
+ 'social': {
+ bg: '#3a5a97',
+ fg: '#FFFFFF'
+ },
+ 'industrial': {
+ bg: '#434A52',
+ fg: '#C2F200'
+ },
+ 'sky': {
+ bg: '#0D8FDB',
+ fg: '#FFFFFF'
+ },
+ 'vine': {
+ bg: '#39DBAC',
+ fg: '#1E292C'
+ },
+ 'lava': {
+ bg: '#F8591A',
+ fg: '#1C2846'
+ }
+ }
+ },
+ defaults: {
+ size: 10,
+ units: 'pt',
+ scale: 1 / 16
+ }
+ };
+
+ /**
+ * Processes provided source attribute and sets up the appropriate rendering workflow
+ *
+ * @private
+ * @param options Instance options from Holder.run
+ * @param renderSettings Instance configuration
+ * @param src Image URL
+ * @param el Image DOM element
+ */
+ function prepareImageElement(options, engineSettings, src, el) {
+ var holderFlags = parseURL(src.substr(src.lastIndexOf(options.domain)), options);
+ if (holderFlags) {
+ prepareDOMElement({
+ mode: null,
+ el: el,
+ flags: holderFlags,
+ engineSettings: engineSettings
+ });
+ }
+ }
+
+ /**
+ * Processes a Holder URL and extracts configuration from query string
+ *
+ * @private
+ * @param url URL
+ * @param instanceOptions Instance options from Holder.run
+ */
+ function parseURL(url, instanceOptions) {
+ var holder = {
+ theme: extend(App.settings.themes.gray, null),
+ stylesheets: instanceOptions.stylesheets,
+ instanceOptions: instanceOptions
+ };
+
+ var firstQuestionMark = url.indexOf('?');
+ var parts = [url];
+
+ if (firstQuestionMark !== -1) {
+ parts = [url.slice(0, firstQuestionMark), url.slice(firstQuestionMark + 1)];
+ }
+
+ var basics = parts[0].split('/');
+
+ holder.holderURL = url;
+
+ var dimensions = basics[1];
+ var dimensionData = dimensions.match(/([\d]+p?)x([\d]+p?)/);
+
+ if (!dimensionData) return false;
+
+ holder.fluid = dimensions.indexOf('p') !== -1;
+
+ holder.dimensions = {
+ width: dimensionData[1].replace('p', '%'),
+ height: dimensionData[2].replace('p', '%')
+ };
+
+ if (parts.length === 2) {
+ var options = querystring.parse(parts[1]);
+
+ // Dimensions
+
+ if (utils.truthy(options.ratio)) {
+ holder.fluid = true;
+ var ratioWidth = parseFloat(holder.dimensions.width.replace('%', ''));
+ var ratioHeight = parseFloat(holder.dimensions.height.replace('%', ''));
+
+ ratioHeight = Math.floor(100 * (ratioHeight / ratioWidth));
+ ratioWidth = 100;
+
+ holder.dimensions.width = ratioWidth + '%';
+ holder.dimensions.height = ratioHeight + '%';
+ }
+
+ holder.auto = utils.truthy(options.auto);
+
+ // Colors
+
+ if (options.bg) {
+ holder.theme.bg = utils.parseColor(options.bg);
+ }
+
+ if (options.fg) {
+ holder.theme.fg = utils.parseColor(options.fg);
+ }
+
+ //todo: add automatic foreground to themes without foreground
+ if (options.bg && !options.fg) {
+ holder.autoFg = true;
+ }
+
+ if (options.theme && holder.instanceOptions.themes.hasOwnProperty(options.theme)) {
+ holder.theme = extend(holder.instanceOptions.themes[options.theme], null);
+ }
+
+ // Text
+
+ if (options.text) {
+ holder.text = options.text;
+ }
+
+ if (options.textmode) {
+ holder.textmode = options.textmode;
+ }
+
+ if (options.size && parseFloat(options.size)) {
+ holder.size = parseFloat(options.size);
+ }
+
+ if (options.font) {
+ holder.font = options.font;
+ }
+
+ if (options.align) {
+ holder.align = options.align;
+ }
+
+ if (options.lineWrap) {
+ holder.lineWrap = options.lineWrap;
+ }
+
+ holder.nowrap = utils.truthy(options.nowrap);
+
+ // Miscellaneous
+
+ holder.outline = utils.truthy(options.outline);
+
+ if (utils.truthy(options.random)) {
+ App.vars.cache.themeKeys = App.vars.cache.themeKeys || Object.keys(holder.instanceOptions.themes);
+ var _theme = App.vars.cache.themeKeys[0 | Math.random() * App.vars.cache.themeKeys.length];
+ holder.theme = extend(holder.instanceOptions.themes[_theme], null);
+ }
+ }
+
+ return holder;
+ }
+
+ /**
+ * Modifies the DOM to fit placeholders and sets up resizable image callbacks (for fluid and automatically sized placeholders)
+ *
+ * @private
+ * @param settings DOM prep settings
+ */
+ function prepareDOMElement(prepSettings) {
+ var mode = prepSettings.mode;
+ var el = prepSettings.el;
+ var flags = prepSettings.flags;
+ var _engineSettings = prepSettings.engineSettings;
+ var dimensions = flags.dimensions,
+ theme = flags.theme;
+ var dimensionsCaption = dimensions.width + 'x' + dimensions.height;
+ mode = mode == null ? (flags.fluid ? 'fluid' : 'image') : mode;
+ var holderTemplateRe = /holder_([a-z]+)/g;
+ var dimensionsInText = false;
+
+ if (flags.text != null) {
+ theme.text = flags.text;
+
+ // SVG embedding doesn't parse Unicode properly
+ if (el.nodeName.toLowerCase() === 'object') {
+ var textLines = theme.text.split('\\n');
+ for (var k = 0; k < textLines.length; k++) {
+ textLines[k] = utils.encodeHtmlEntity(textLines[k]);
+ }
+ theme.text = textLines.join('\\n');
+ }
+ }
+
+ if (theme.text) {
+ var holderTemplateMatches = theme.text.match(holderTemplateRe);
+
+ if (holderTemplateMatches !== null) {
+ //todo: optimize template replacement
+ holderTemplateMatches.forEach(function (match) {
+ if (match === 'holder_dimensions') {
+ theme.text = theme.text.replace(match, dimensionsCaption);
+ }
+ });
+ }
+ }
+
+ var holderURL = flags.holderURL;
+ var engineSettings = extend(_engineSettings, null);
+
+ if (flags.font) {
+ /*
+ If external fonts are used in a placeholder rendered with SVG, Holder falls back to canvas.
+
+ This is done because Firefox and Chrome disallow embedded SVGs from referencing external assets.
+ The workaround is either to change the placeholder tag from to or to use the canvas renderer.
+ */
+ theme.font = flags.font;
+ if (!engineSettings.noFontFallback && el.nodeName.toLowerCase() === 'img' && App.setup.supportsCanvas && engineSettings.renderer === 'svg') {
+ engineSettings = extend(engineSettings, {
+ renderer: 'canvas'
+ });
+ }
+ }
+
+ //Chrome and Opera require a quick 10ms re-render if web fonts are used with canvas
+ if (flags.font && engineSettings.renderer == 'canvas') {
+ engineSettings.reRender = true;
+ }
+
+ if (mode == 'background') {
+ if (el.getAttribute('data-background-src') == null) {
+ DOM.setAttr(el, {
+ 'data-background-src': holderURL
+ });
+ }
+ } else {
+ var domProps = {};
+ domProps[App.vars.dataAttr] = holderURL;
+ DOM.setAttr(el, domProps);
+ }
+
+ flags.theme = theme;
+
+ //todo consider using all renderSettings in holderData
+ el.holderData = {
+ flags: flags,
+ engineSettings: engineSettings
+ };
+
+ if (mode == 'image' || mode == 'fluid') {
+ DOM.setAttr(el, {
+ 'alt': theme.text ? (dimensionsInText ? theme.text : theme.text + ' [' + dimensionsCaption + ']') : dimensionsCaption
+ });
+ }
+
+ var renderSettings = {
+ mode: mode,
+ el: el,
+ holderSettings: {
+ dimensions: dimensions,
+ theme: theme,
+ flags: flags
+ },
+ engineSettings: engineSettings
+ };
+
+ if (mode == 'image') {
+ if (!flags.auto) {
+ el.style.width = dimensions.width + 'px';
+ el.style.height = dimensions.height + 'px';
+ }
+
+ if (engineSettings.renderer == 'html') {
+ el.style.backgroundColor = theme.bg;
+ } else {
+ render(renderSettings);
+
+ if (flags.textmode == 'exact') {
+ el.holderData.resizeUpdate = true;
+ App.vars.resizableImages.push(el);
+ updateResizableElements(el);
+ }
+ }
+ } else if (mode == 'background' && engineSettings.renderer != 'html') {
+ render(renderSettings);
+ } else if (mode == 'fluid') {
+ el.holderData.resizeUpdate = true;
+
+ if (dimensions.height.slice(-1) == '%') {
+ el.style.height = dimensions.height;
+ } else if (flags.auto == null || !flags.auto) {
+ el.style.height = dimensions.height + 'px';
+ }
+ if (dimensions.width.slice(-1) == '%') {
+ el.style.width = dimensions.width;
+ } else if (flags.auto == null || !flags.auto) {
+ el.style.width = dimensions.width + 'px';
+ }
+ if (el.style.display == 'inline' || el.style.display === '' || el.style.display == 'none') {
+ el.style.display = 'block';
+ }
+
+ setInitialDimensions(el);
+
+ if (engineSettings.renderer == 'html') {
+ el.style.backgroundColor = theme.bg;
+ } else {
+ App.vars.resizableImages.push(el);
+ updateResizableElements(el);
+ }
+ }
+ }
+
+ /**
+ * Core function that takes output from renderers and sets it as the source or background-image of the target element
+ *
+ * @private
+ * @param renderSettings Renderer settings
+ */
+ function render(renderSettings) {
+ var image = null;
+ var mode = renderSettings.mode;
+ var el = renderSettings.el;
+ var holderSettings = renderSettings.holderSettings;
+ var engineSettings = renderSettings.engineSettings;
+
+ switch (engineSettings.renderer) {
+ case 'svg':
+ if (!App.setup.supportsSVG) return;
+ break;
+ case 'canvas':
+ if (!App.setup.supportsCanvas) return;
+ break;
+ default:
+ return;
+ }
+
+ //todo: move generation of scene up to flag generation to reduce extra object creation
+ var scene = {
+ width: holderSettings.dimensions.width,
+ height: holderSettings.dimensions.height,
+ theme: holderSettings.theme,
+ flags: holderSettings.flags
+ };
+
+ var sceneGraph = buildSceneGraph(scene);
+
+ function getRenderedImage() {
+ var image = null;
+ switch (engineSettings.renderer) {
+ case 'canvas':
+ image = sgCanvasRenderer(sceneGraph, renderSettings);
+ break;
+ case 'svg':
+ image = svgRenderer(sceneGraph, renderSettings);
+ break;
+ default:
+ throw 'Holder: invalid renderer: ' + engineSettings.renderer;
+ }
+
+ return image;
+ }
+
+ image = getRenderedImage();
+
+ if (image == null) {
+ throw 'Holder: couldn\'t render placeholder';
+ }
+
+ //todo: add canvas rendering
+ if (mode == 'background') {
+ el.style.backgroundImage = 'url(' + image + ')';
+
+ if (!engineSettings.noBackgroundSize) {
+ el.style.backgroundSize = scene.width + 'px ' + scene.height + 'px';
+ }
+ } else {
+ if (el.nodeName.toLowerCase() === 'img') {
+ DOM.setAttr(el, {
+ 'src': image
+ });
+ } else if (el.nodeName.toLowerCase() === 'object') {
+ DOM.setAttr(el, {
+ 'data': image,
+ 'type': 'image/svg+xml'
+ });
+ }
+ if (engineSettings.reRender) {
+ global.setTimeout(function () {
+ var image = getRenderedImage();
+ if (image == null) {
+ throw 'Holder: couldn\'t render placeholder';
+ }
+ //todo: refactor this code into a function
+ if (el.nodeName.toLowerCase() === 'img') {
+ DOM.setAttr(el, {
+ 'src': image
+ });
+ } else if (el.nodeName.toLowerCase() === 'object') {
+ DOM.setAttr(el, {
+ 'data': image,
+ 'type': 'image/svg+xml'
+ });
+ }
+ }, 150);
+ }
+ }
+ //todo: account for re-rendering
+ DOM.setAttr(el, {
+ 'data-holder-rendered': true
+ });
+ }
+
+ /**
+ * Core function that takes a Holder scene description and builds a scene graph
+ *
+ * @private
+ * @param scene Holder scene object
+ */
+ //todo: make this function reusable
+ //todo: merge app defaults and setup properties into the scene argument
+ function buildSceneGraph(scene) {
+ var fontSize = App.defaults.size;
+ if (parseFloat(scene.theme.size)) {
+ fontSize = scene.theme.size;
+ } else if (parseFloat(scene.flags.size)) {
+ fontSize = scene.flags.size;
+ }
+
+ scene.font = {
+ family: scene.theme.font ? scene.theme.font : 'Arial, Helvetica, Open Sans, sans-serif',
+ size: textSize(scene.width, scene.height, fontSize, App.defaults.scale),
+ units: scene.theme.units ? scene.theme.units : App.defaults.units,
+ weight: scene.theme.fontweight ? scene.theme.fontweight : 'bold'
+ };
+
+ scene.text = scene.theme.text || Math.floor(scene.width) + 'x' + Math.floor(scene.height);
+
+ scene.noWrap = scene.theme.nowrap || scene.flags.nowrap;
+
+ scene.align = scene.theme.align || scene.flags.align || 'center';
+
+ switch (scene.flags.textmode) {
+ case 'literal':
+ scene.text = scene.flags.dimensions.width + 'x' + scene.flags.dimensions.height;
+ break;
+ case 'exact':
+ if (!scene.flags.exactDimensions) break;
+ scene.text = Math.floor(scene.flags.exactDimensions.width) + 'x' + Math.floor(scene.flags.exactDimensions.height);
+ break;
+ }
+
+ var lineWrap = scene.flags.lineWrap || App.setup.lineWrapRatio;
+ var sceneMargin = scene.width * lineWrap;
+ var maxLineWidth = sceneMargin;
+
+ var sceneGraph = new SceneGraph({
+ width: scene.width,
+ height: scene.height
+ });
+
+ var Shape = sceneGraph.Shape;
+
+ var holderBg = new Shape.Rect('holderBg', {
+ fill: scene.theme.bg
+ });
+
+ holderBg.resize(scene.width, scene.height);
+ sceneGraph.root.add(holderBg);
+
+ if (scene.flags.outline) {
+ var outlineColor = new Color(holderBg.properties.fill);
+ outlineColor = outlineColor.lighten(outlineColor.lighterThan('7f7f7f') ? -0.1 : 0.1);
+ holderBg.properties.outline = {
+ fill: outlineColor.toHex(true),
+ width: 2
+ };
+ }
+
+ var holderTextColor = scene.theme.fg;
+
+ if (scene.flags.autoFg) {
+ var holderBgColor = new Color(holderBg.properties.fill);
+ var lightColor = new Color('fff');
+ var darkColor = new Color('000', {
+ 'alpha': 0.285714
+ });
+
+ holderTextColor = holderBgColor.blendAlpha(holderBgColor.lighterThan('7f7f7f') ? darkColor : lightColor).toHex(true);
+ }
+
+ var holderTextGroup = new Shape.Group('holderTextGroup', {
+ text: scene.text,
+ align: scene.align,
+ font: scene.font,
+ fill: holderTextColor
+ });
+
+ holderTextGroup.moveTo(null, null, 1);
+ sceneGraph.root.add(holderTextGroup);
+
+ var tpdata = holderTextGroup.textPositionData = stagingRenderer(sceneGraph);
+ if (!tpdata) {
+ throw 'Holder: staging fallback not supported yet.';
+ }
+ holderTextGroup.properties.leading = tpdata.boundingBox.height;
+
+ var textNode = null;
+ var line = null;
+
+ function finalizeLine(parent, line, width, height) {
+ line.width = width;
+ line.height = height;
+ parent.width = Math.max(parent.width, line.width);
+ parent.height += line.height;
+ }
+
+ if (tpdata.lineCount > 1) {
+ var offsetX = 0;
+ var offsetY = 0;
+ var lineIndex = 0;
+ var lineKey;
+ line = new Shape.Group('line' + lineIndex);
+
+ //Double margin so that left/right-aligned next is not flush with edge of image
+ if (scene.align === 'left' || scene.align === 'right') {
+ maxLineWidth = scene.width * (1 - (1 - lineWrap) * 2);
+ }
+
+ for (var i = 0; i < tpdata.words.length; i++) {
+ var word = tpdata.words[i];
+ textNode = new Shape.Text(word.text);
+ var newline = word.text == '\\n';
+ if (!scene.noWrap && (offsetX + word.width >= maxLineWidth || newline === true)) {
+ finalizeLine(holderTextGroup, line, offsetX, holderTextGroup.properties.leading);
+ holderTextGroup.add(line);
+ offsetX = 0;
+ offsetY += holderTextGroup.properties.leading;
+ lineIndex += 1;
+ line = new Shape.Group('line' + lineIndex);
+ line.y = offsetY;
+ }
+ if (newline === true) {
+ continue;
+ }
+ textNode.moveTo(offsetX, 0);
+ offsetX += tpdata.spaceWidth + word.width;
+ line.add(textNode);
+ }
+
+ finalizeLine(holderTextGroup, line, offsetX, holderTextGroup.properties.leading);
+ holderTextGroup.add(line);
+
+ if (scene.align === 'left') {
+ holderTextGroup.moveTo(scene.width - sceneMargin, null, null);
+ } else if (scene.align === 'right') {
+ for (lineKey in holderTextGroup.children) {
+ line = holderTextGroup.children[lineKey];
+ line.moveTo(scene.width - line.width, null, null);
+ }
+
+ holderTextGroup.moveTo(0 - (scene.width - sceneMargin), null, null);
+ } else {
+ for (lineKey in holderTextGroup.children) {
+ line = holderTextGroup.children[lineKey];
+ line.moveTo((holderTextGroup.width - line.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo((scene.width - holderTextGroup.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo(null, (scene.height - holderTextGroup.height) / 2, null);
+
+ //If the text exceeds vertical space, move it down so the first line is visible
+ if ((scene.height - holderTextGroup.height) / 2 < 0) {
+ holderTextGroup.moveTo(null, 0, null);
+ }
+ } else {
+ textNode = new Shape.Text(scene.text);
+ line = new Shape.Group('line0');
+ line.add(textNode);
+ holderTextGroup.add(line);
+
+ if (scene.align === 'left') {
+ holderTextGroup.moveTo(scene.width - sceneMargin, null, null);
+ } else if (scene.align === 'right') {
+ holderTextGroup.moveTo(0 - (scene.width - sceneMargin), null, null);
+ } else {
+ holderTextGroup.moveTo((scene.width - tpdata.boundingBox.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo(null, (scene.height - tpdata.boundingBox.height) / 2, null);
+ }
+
+ //todo: renderlist
+ return sceneGraph;
+ }
+
+ /**
+ * Adaptive text sizing function
+ *
+ * @private
+ * @param width Parent width
+ * @param height Parent height
+ * @param fontSize Requested text size
+ * @param scale Proportional scale of text
+ */
+ function textSize(width, height, fontSize, scale) {
+ var stageWidth = parseInt(width, 10);
+ var stageHeight = parseInt(height, 10);
+
+ var bigSide = Math.max(stageWidth, stageHeight);
+ var smallSide = Math.min(stageWidth, stageHeight);
+
+ var newHeight = 0.8 * Math.min(smallSide, bigSide * scale);
+ return Math.round(Math.max(fontSize, newHeight));
+ }
+
+ /**
+ * Iterates over resizable (fluid or auto) placeholders and renders them
+ *
+ * @private
+ * @param element Optional element selector, specified only if a specific element needs to be re-rendered
+ */
+ function updateResizableElements(element) {
+ var images;
+ if (element == null || element.nodeType == null) {
+ images = App.vars.resizableImages;
+ } else {
+ images = [element];
+ }
+ for (var i = 0, l = images.length; i < l; i++) {
+ var el = images[i];
+ if (el.holderData) {
+ var flags = el.holderData.flags;
+ var dimensions = dimensionCheck(el);
+ if (dimensions) {
+ if (!el.holderData.resizeUpdate) {
+ continue;
+ }
+
+ if (flags.fluid && flags.auto) {
+ var fluidConfig = el.holderData.fluidConfig;
+ switch (fluidConfig.mode) {
+ case 'width':
+ dimensions.height = dimensions.width / fluidConfig.ratio;
+ break;
+ case 'height':
+ dimensions.width = dimensions.height * fluidConfig.ratio;
+ break;
+ }
+ }
+
+ var settings = {
+ mode: 'image',
+ holderSettings: {
+ dimensions: dimensions,
+ theme: flags.theme,
+ flags: flags
+ },
+ el: el,
+ engineSettings: el.holderData.engineSettings
+ };
+
+ if (flags.textmode == 'exact') {
+ flags.exactDimensions = dimensions;
+ settings.holderSettings.dimensions = flags.dimensions;
+ }
+
+ render(settings);
+ } else {
+ setInvisible(el);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets up aspect ratio metadata for fluid placeholders, in order to preserve proportions when resizing
+ *
+ * @private
+ * @param el Image DOM element
+ */
+ function setInitialDimensions(el) {
+ if (el.holderData) {
+ var dimensions = dimensionCheck(el);
+ if (dimensions) {
+ var flags = el.holderData.flags;
+
+ var fluidConfig = {
+ fluidHeight: flags.dimensions.height.slice(-1) == '%',
+ fluidWidth: flags.dimensions.width.slice(-1) == '%',
+ mode: null,
+ initialDimensions: dimensions
+ };
+
+ if (fluidConfig.fluidWidth && !fluidConfig.fluidHeight) {
+ fluidConfig.mode = 'width';
+ fluidConfig.ratio = fluidConfig.initialDimensions.width / parseFloat(flags.dimensions.height);
+ } else if (!fluidConfig.fluidWidth && fluidConfig.fluidHeight) {
+ fluidConfig.mode = 'height';
+ fluidConfig.ratio = parseFloat(flags.dimensions.width) / fluidConfig.initialDimensions.height;
+ }
+
+ el.holderData.fluidConfig = fluidConfig;
+ } else {
+ setInvisible(el);
+ }
+ }
+ }
+
+ /**
+ * Iterates through all current invisible images, and if they're visible, renders them and removes them from further checks. Runs every animation frame.
+ *
+ * @private
+ */
+ function visibilityCheck() {
+ var renderableImages = [];
+ var keys = Object.keys(App.vars.invisibleImages);
+ var el;
+
+ keys.forEach(function (key) {
+ el = App.vars.invisibleImages[key];
+ if (dimensionCheck(el) && el.nodeName.toLowerCase() == 'img') {
+ renderableImages.push(el);
+ delete App.vars.invisibleImages[key];
+ }
+ });
+
+ if (renderableImages.length) {
+ Holder.run({
+ images: renderableImages
+ });
+ }
+
+ // Done to prevent 100% CPU usage via aggressive calling of requestAnimationFrame
+ setTimeout(function () {
+ global.requestAnimationFrame(visibilityCheck);
+ }, 10);
+ }
+
+ /**
+ * Starts checking for invisible placeholders if not doing so yet. Does nothing otherwise.
+ *
+ * @private
+ */
+ function startVisibilityCheck() {
+ if (!App.vars.visibilityCheckStarted) {
+ global.requestAnimationFrame(visibilityCheck);
+ App.vars.visibilityCheckStarted = true;
+ }
+ }
+
+ /**
+ * Sets a unique ID for an image detected to be invisible and adds it to the map of invisible images checked by visibilityCheck
+ *
+ * @private
+ * @param el Invisible DOM element
+ */
+ function setInvisible(el) {
+ if (!el.holderData.invisibleId) {
+ App.vars.invisibleId += 1;
+ App.vars.invisibleImages['i' + App.vars.invisibleId] = el;
+ el.holderData.invisibleId = App.vars.invisibleId;
+ }
+ }
+
+ //todo: see if possible to convert stagingRenderer to use HTML only
+ var stagingRenderer = (function() {
+ var svg = null,
+ stagingText = null,
+ stagingTextNode = null;
+ return function(graph) {
+ var rootNode = graph.root;
+ if (App.setup.supportsSVG) {
+ var firstTimeSetup = false;
+ var tnode = function(text) {
+ return document.createTextNode(text);
+ };
+ if (svg == null || svg.parentNode !== document.body) {
+ firstTimeSetup = true;
+ }
+
+ svg = SVG.initSVG(svg, rootNode.properties.width, rootNode.properties.height);
+ //Show staging element before staging
+ svg.style.display = 'block';
+
+ if (firstTimeSetup) {
+ stagingText = DOM.newEl('text', SVG_NS);
+ stagingTextNode = tnode(null);
+ DOM.setAttr(stagingText, {
+ x: 0
+ });
+ stagingText.appendChild(stagingTextNode);
+ svg.appendChild(stagingText);
+ document.body.appendChild(svg);
+ svg.style.visibility = 'hidden';
+ svg.style.position = 'absolute';
+ svg.style.top = '-100%';
+ svg.style.left = '-100%';
+ //todo: workaround for zero-dimension tag in Opera 12
+ //svg.setAttribute('width', 0);
+ //svg.setAttribute('height', 0);
+ }
+
+ var holderTextGroup = rootNode.children.holderTextGroup;
+ var htgProps = holderTextGroup.properties;
+ DOM.setAttr(stagingText, {
+ 'y': htgProps.font.size,
+ 'style': utils.cssProps({
+ 'font-weight': htgProps.font.weight,
+ 'font-size': htgProps.font.size + htgProps.font.units,
+ 'font-family': htgProps.font.family
+ })
+ });
+
+ //Unescape HTML entities to get approximately the right width
+ var txt = DOM.newEl('textarea');
+ txt.innerHTML = htgProps.text;
+ stagingTextNode.nodeValue = txt.value;
+
+ //Get bounding box for the whole string (total width and height)
+ var stagingTextBBox = stagingText.getBBox();
+
+ //Get line count and split the string into words
+ var lineCount = Math.ceil(stagingTextBBox.width / rootNode.properties.width);
+ var words = htgProps.text.split(' ');
+ var newlines = htgProps.text.match(/\\n/g);
+ lineCount += newlines == null ? 0 : newlines.length;
+
+ //Get bounding box for the string with spaces removed
+ stagingTextNode.nodeValue = htgProps.text.replace(/[ ]+/g, '');
+ var computedNoSpaceLength = stagingText.getComputedTextLength();
+
+ //Compute average space width
+ var diffLength = stagingTextBBox.width - computedNoSpaceLength;
+ var spaceWidth = Math.round(diffLength / Math.max(1, words.length - 1));
+
+ //Get widths for every word with space only if there is more than one line
+ var wordWidths = [];
+ if (lineCount > 1) {
+ stagingTextNode.nodeValue = '';
+ for (var i = 0; i < words.length; i++) {
+ if (words[i].length === 0) continue;
+ stagingTextNode.nodeValue = utils.decodeHtmlEntity(words[i]);
+ var bbox = stagingText.getBBox();
+ wordWidths.push({
+ text: words[i],
+ width: bbox.width
+ });
+ }
+ }
+
+ //Hide staging element after staging
+ svg.style.display = 'none';
+
+ return {
+ spaceWidth: spaceWidth,
+ lineCount: lineCount,
+ boundingBox: stagingTextBBox,
+ words: wordWidths
+ };
+ } else {
+ //todo: canvas fallback for measuring text on android 2.3
+ return false;
+ }
+ };
+ })();
+
+ //Helpers
+
+ /**
+ * Prevents a function from being called too often, waits until a timer elapses to call it again
+ *
+ * @param fn Function to call
+ */
+ function debounce(fn) {
+ if (!App.vars.debounceTimer) fn.call(this);
+ if (App.vars.debounceTimer) global.clearTimeout(App.vars.debounceTimer);
+ App.vars.debounceTimer = global.setTimeout(function() {
+ App.vars.debounceTimer = null;
+ fn.call(this);
+ }, App.setup.debounce);
+ }
+
+ /**
+ * Holder-specific resize/orientation change callback, debounced to prevent excessive execution
+ */
+ function resizeEvent() {
+ debounce(function() {
+ updateResizableElements(null);
+ });
+ }
+
+ //Set up flags
+
+ for (var flag in App.flags) {
+ if (!App.flags.hasOwnProperty(flag)) continue;
+ App.flags[flag].match = function(val) {
+ return val.match(this.regex);
+ };
+ }
+
+ //Properties set once on setup
+
+ App.setup = {
+ renderer: 'html',
+ debounce: 100,
+ ratio: 1,
+ supportsCanvas: false,
+ supportsSVG: false,
+ lineWrapRatio: 0.9,
+ dataAttr: 'data-src',
+ renderers: ['html', 'canvas', 'svg']
+ };
+
+ //Properties modified during runtime
+
+ App.vars = {
+ preempted: false,
+ resizableImages: [],
+ invisibleImages: {},
+ invisibleId: 0,
+ visibilityCheckStarted: false,
+ debounceTimer: null,
+ cache: {}
+ };
+
+ //Pre-flight
+
+ (function() {
+ var canvas = DOM.newEl('canvas');
+
+ if (canvas.getContext) {
+ if (canvas.toDataURL('image/png').indexOf('data:image/png') != -1) {
+ App.setup.renderer = 'canvas';
+ App.setup.supportsCanvas = true;
+ }
+ }
+
+ if (!!document.createElementNS && !!document.createElementNS(SVG_NS, 'svg').createSVGRect) {
+ App.setup.renderer = 'svg';
+ App.setup.supportsSVG = true;
+ }
+ })();
+
+ //Starts checking for invisible placeholders
+ startVisibilityCheck();
+
+ if (onDomReady) {
+ onDomReady(function() {
+ if (!App.vars.preempted) {
+ Holder.run();
+ }
+ if (global.addEventListener) {
+ global.addEventListener('resize', resizeEvent, false);
+ global.addEventListener('orientationchange', resizeEvent, false);
+ } else {
+ global.attachEvent('onresize', resizeEvent);
+ }
+
+ if (typeof global.Turbolinks == 'object') {
+ global.document.addEventListener('page:change', function() {
+ Holder.run();
+ });
+ }
+ });
+ }
+
+ module.exports = Holder;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports) {
+
+ /*!
+ * onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license
+ *
+ * Specially modified to work with Holder.js
+ */
+
+ function _onDomReady(win) {
+ //Lazy loading fix for Firefox < 3.6
+ //http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html
+ if (document.readyState == null && document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", function DOMContentLoaded() {
+ document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
+ document.readyState = "complete";
+ }, false);
+ document.readyState = "loading";
+ }
+
+ var doc = win.document,
+ docElem = doc.documentElement,
+
+ LOAD = "load",
+ FALSE = false,
+ ONLOAD = "on"+LOAD,
+ COMPLETE = "complete",
+ READYSTATE = "readyState",
+ ATTACHEVENT = "attachEvent",
+ DETACHEVENT = "detachEvent",
+ ADDEVENTLISTENER = "addEventListener",
+ DOMCONTENTLOADED = "DOMContentLoaded",
+ ONREADYSTATECHANGE = "onreadystatechange",
+ REMOVEEVENTLISTENER = "removeEventListener",
+
+ // W3C Event model
+ w3c = ADDEVENTLISTENER in doc,
+ _top = FALSE,
+
+ // isReady: Is the DOM ready to be used? Set to true once it occurs.
+ isReady = FALSE,
+
+ // Callbacks pending execution until DOM is ready
+ callbacks = [];
+
+ // Handle when the DOM is ready
+ function ready( fn ) {
+ if ( !isReady ) {
+
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !doc.body ) {
+ return defer( ready );
+ }
+
+ // Remember that the DOM is ready
+ isReady = true;
+
+ // Execute all callbacks
+ while ( fn = callbacks.shift() ) {
+ defer( fn );
+ }
+ }
+ }
+
+ // The ready event handler
+ function completed( event ) {
+ // readyState === "complete" is good enough for us to call the dom ready in oldIE
+ if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {
+ detach();
+ ready();
+ }
+ }
+
+ // Clean-up method for dom ready events
+ function detach() {
+ if ( w3c ) {
+ doc[REMOVEEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );
+ win[REMOVEEVENTLISTENER]( LOAD, completed, FALSE );
+ } else {
+ doc[DETACHEVENT]( ONREADYSTATECHANGE, completed );
+ win[DETACHEVENT]( ONLOAD, completed );
+ }
+ }
+
+ // Defers a function, scheduling it to run after the current call stack has cleared.
+ function defer( fn, wait ) {
+ // Allow 0 to be passed
+ setTimeout( fn, +wait >= 0 ? wait : 1 );
+ }
+
+ // Attach the listeners:
+
+ // Catch cases where onDomReady is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( doc[READYSTATE] === COMPLETE ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ defer( ready );
+
+ // Standards-based browsers support DOMContentLoaded
+ } else if ( w3c ) {
+ // Use the handy event callback
+ doc[ADDEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );
+
+ // A fallback to window.onload, that will always work
+ win[ADDEVENTLISTENER]( LOAD, completed, FALSE );
+
+ // If IE event model is used
+ } else {
+ // Ensure firing before onload, maybe late but safe also for iframes
+ doc[ATTACHEVENT]( ONREADYSTATECHANGE, completed );
+
+ // A fallback to window.onload, that will always work
+ win[ATTACHEVENT]( ONLOAD, completed );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ try {
+ _top = win.frameElement == null && docElem;
+ } catch(e) {}
+
+ if ( _top && _top.doScroll ) {
+ (function doScrollCheck() {
+ if ( !isReady ) {
+ try {
+ // Use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ _top.doScroll("left");
+ } catch(e) {
+ return defer( doScrollCheck, 50 );
+ }
+
+ // detach all dom ready events
+ detach();
+
+ // and execute any waiting functions
+ ready();
+ }
+ })();
+ }
+ }
+
+ function onDomReady( fn ) {
+ // If DOM is ready, execute the function (async), otherwise wait
+ isReady ? defer( fn ) : callbacks.push( fn );
+ }
+
+ // Add version
+ onDomReady.version = "1.4.0";
+ // Add method to check if DOM is ready
+ onDomReady.isReady = function(){
+ return isReady;
+ };
+
+ return onDomReady;
+ }
+
+ module.exports = typeof window !== "undefined" && _onDomReady(window);
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ //Modified version of component/querystring
+ //Changes: updated dependencies, dot notation parsing, JSHint fixes
+ //Fork at https://github.com/imsky/querystring
+
+ /**
+ * Module dependencies.
+ */
+
+ var encode = encodeURIComponent;
+ var decode = decodeURIComponent;
+ var trim = __webpack_require__(4);
+ var type = __webpack_require__(5);
+
+ var arrayRegex = /(\w+)\[(\d+)\]/;
+ var objectRegex = /\w+\.\w+/;
+
+ /**
+ * Parse the given query `str`.
+ *
+ * @param {String} str
+ * @return {Object}
+ * @api public
+ */
+
+ exports.parse = function(str){
+ if ('string' !== typeof str) return {};
+
+ str = trim(str);
+ if ('' === str) return {};
+ if ('?' === str.charAt(0)) str = str.slice(1);
+
+ var obj = {};
+ var pairs = str.split('&');
+ for (var i = 0; i < pairs.length; i++) {
+ var parts = pairs[i].split('=');
+ var key = decode(parts[0]);
+ var m, ctx, prop;
+
+ if (m = arrayRegex.exec(key)) {
+ obj[m[1]] = obj[m[1]] || [];
+ obj[m[1]][m[2]] = decode(parts[1]);
+ continue;
+ }
+
+ if (m = objectRegex.test(key)) {
+ m = key.split('.');
+ ctx = obj;
+
+ while (m.length) {
+ prop = m.shift();
+
+ if (!prop.length) continue;
+
+ if (!ctx[prop]) {
+ ctx[prop] = {};
+ } else if (ctx[prop] && typeof ctx[prop] !== 'object') {
+ break;
+ }
+
+ if (!m.length) {
+ ctx[prop] = decode(parts[1]);
+ }
+
+ ctx = ctx[prop];
+ }
+
+ continue;
+ }
+
+ obj[parts[0]] = null == parts[1] ? '' : decode(parts[1]);
+ }
+
+ return obj;
+ };
+
+ /**
+ * Stringify the given `obj`.
+ *
+ * @param {Object} obj
+ * @return {String}
+ * @api public
+ */
+
+ exports.stringify = function(obj){
+ if (!obj) return '';
+ var pairs = [];
+
+ for (var key in obj) {
+ var value = obj[key];
+
+ if ('array' == type(value)) {
+ for (var i = 0; i < value.length; ++i) {
+ pairs.push(encode(key + '[' + i + ']') + '=' + encode(value[i]));
+ }
+ continue;
+ }
+
+ pairs.push(encode(key) + '=' + encode(obj[key]));
+ }
+
+ return pairs.join('&');
+ };
+
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports) {
+
+
+ exports = module.exports = trim;
+
+ function trim(str){
+ return str.replace(/^\s*|\s*$/g, '');
+ }
+
+ exports.left = function(str){
+ return str.replace(/^\s*/, '');
+ };
+
+ exports.right = function(str){
+ return str.replace(/\s*$/, '');
+ };
+
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports) {
+
+ /**
+ * toString ref.
+ */
+
+ var toString = Object.prototype.toString;
+
+ /**
+ * Return the type of `val`.
+ *
+ * @param {Mixed} val
+ * @return {String}
+ * @api public
+ */
+
+ module.exports = function(val){
+ switch (toString.call(val)) {
+ case '[object Date]': return 'date';
+ case '[object RegExp]': return 'regexp';
+ case '[object Arguments]': return 'arguments';
+ case '[object Array]': return 'array';
+ case '[object Error]': return 'error';
+ }
+
+ if (val === null) return 'null';
+ if (val === undefined) return 'undefined';
+ if (val !== val) return 'nan';
+ if (val && val.nodeType === 1) return 'element';
+
+ if (isBuffer(val)) return 'buffer';
+
+ val = val.valueOf
+ ? val.valueOf()
+ : Object.prototype.valueOf.apply(val);
+
+ return typeof val;
+ };
+
+ // code borrowed from https://github.com/feross/is-buffer/blob/master/index.js
+ function isBuffer(obj) {
+ return !!(obj != null &&
+ (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)
+ (obj.constructor &&
+ typeof obj.constructor.isBuffer === 'function' &&
+ obj.constructor.isBuffer(obj))
+ ))
+ }
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports) {
+
+ var SceneGraph = function(sceneProperties) {
+ var nodeCount = 1;
+
+ //todo: move merge to helpers section
+ function merge(parent, child) {
+ for (var prop in child) {
+ parent[prop] = child[prop];
+ }
+ return parent;
+ }
+
+ var SceneNode = function(name) {
+ nodeCount++;
+ this.parent = null;
+ this.children = {};
+ this.id = nodeCount;
+ this.name = 'n' + nodeCount;
+ if (typeof name !== 'undefined') {
+ this.name = name;
+ }
+ this.x = this.y = this.z = 0;
+ this.width = this.height = 0;
+ };
+
+ SceneNode.prototype.resize = function(width, height) {
+ if (width != null) {
+ this.width = width;
+ }
+ if (height != null) {
+ this.height = height;
+ }
+ };
+
+ SceneNode.prototype.moveTo = function(x, y, z) {
+ this.x = x != null ? x : this.x;
+ this.y = y != null ? y : this.y;
+ this.z = z != null ? z : this.z;
+ };
+
+ SceneNode.prototype.add = function(child) {
+ var name = child.name;
+ if (typeof this.children[name] === 'undefined') {
+ this.children[name] = child;
+ child.parent = this;
+ } else {
+ throw 'SceneGraph: child already exists: ' + name;
+ }
+ };
+
+ var RootNode = function() {
+ SceneNode.call(this, 'root');
+ this.properties = sceneProperties;
+ };
+
+ RootNode.prototype = new SceneNode();
+
+ var Shape = function(name, props) {
+ SceneNode.call(this, name);
+ this.properties = {
+ 'fill': '#000000'
+ };
+ if (typeof props !== 'undefined') {
+ merge(this.properties, props);
+ } else if (typeof name !== 'undefined' && typeof name !== 'string') {
+ throw 'SceneGraph: invalid node name';
+ }
+ };
+
+ Shape.prototype = new SceneNode();
+
+ var Group = function() {
+ Shape.apply(this, arguments);
+ this.type = 'group';
+ };
+
+ Group.prototype = new Shape();
+
+ var Rect = function() {
+ Shape.apply(this, arguments);
+ this.type = 'rect';
+ };
+
+ Rect.prototype = new Shape();
+
+ var Text = function(text) {
+ Shape.call(this);
+ this.type = 'text';
+ this.properties.text = text;
+ };
+
+ Text.prototype = new Shape();
+
+ var root = new RootNode();
+
+ this.Shape = {
+ 'Rect': Rect,
+ 'Text': Text,
+ 'Group': Group
+ };
+
+ this.root = root;
+ return this;
+ };
+
+ module.exports = SceneGraph;
+
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/**
+ * Shallow object clone and merge
+ *
+ * @param a Object A
+ * @param b Object B
+ * @returns {Object} New object with all of A's properties, and all of B's properties, overwriting A's properties
+ */
+ exports.extend = function(a, b) {
+ var c = {};
+ for (var x in a) {
+ if (a.hasOwnProperty(x)) {
+ c[x] = a[x];
+ }
+ }
+ if (b != null) {
+ for (var y in b) {
+ if (b.hasOwnProperty(y)) {
+ c[y] = b[y];
+ }
+ }
+ }
+ return c;
+ };
+
+ /**
+ * Takes a k/v list of CSS properties and returns a rule
+ *
+ * @param props CSS properties object
+ */
+ exports.cssProps = function(props) {
+ var ret = [];
+ for (var p in props) {
+ if (props.hasOwnProperty(p)) {
+ ret.push(p + ':' + props[p]);
+ }
+ }
+ return ret.join(';');
+ };
+
+ /**
+ * Encodes HTML entities in a string
+ *
+ * @param str Input string
+ */
+ exports.encodeHtmlEntity = function(str) {
+ var buf = [];
+ var charCode = 0;
+ for (var i = str.length - 1; i >= 0; i--) {
+ charCode = str.charCodeAt(i);
+ if (charCode > 128) {
+ buf.unshift(['', charCode, ';'].join(''));
+ } else {
+ buf.unshift(str[i]);
+ }
+ }
+ return buf.join('');
+ };
+
+ /**
+ * Checks if an image exists
+ *
+ * @param src URL of image
+ * @param callback Callback to call once image status has been found
+ */
+ exports.imageExists = function(src, callback) {
+ var image = new Image();
+ image.onerror = function() {
+ callback.call(this, false);
+ };
+ image.onload = function() {
+ callback.call(this, true);
+ };
+ image.src = src;
+ };
+
+ /**
+ * Decodes HTML entities in a string
+ *
+ * @param str Input string
+ */
+ exports.decodeHtmlEntity = function(str) {
+ return str.replace(/(\d+);/g, function(match, dec) {
+ return String.fromCharCode(dec);
+ });
+ };
+
+
+ /**
+ * Returns an element's dimensions if it's visible, `false` otherwise.
+ *
+ * @param el DOM element
+ */
+ exports.dimensionCheck = function(el) {
+ var dimensions = {
+ height: el.clientHeight,
+ width: el.clientWidth
+ };
+
+ if (dimensions.height && dimensions.width) {
+ return dimensions;
+ } else {
+ return false;
+ }
+ };
+
+
+ /**
+ * Returns true if value is truthy or if it is "semantically truthy"
+ * @param val
+ */
+ exports.truthy = function(val) {
+ if (typeof val === 'string') {
+ return val === 'true' || val === 'yes' || val === '1' || val === 'on' || val === '✓';
+ }
+ return !!val;
+ };
+
+ /**
+ * Parses input into a well-formed CSS color
+ * @param val
+ */
+ exports.parseColor = function(val) {
+ var hexre = /(^(?:#?)[0-9a-f]{6}$)|(^(?:#?)[0-9a-f]{3}$)/i;
+ var rgbre = /^rgb\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
+ var rgbare = /^rgba\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0\.\d{1,}|1)\)$/;
+
+ var match = val.match(hexre);
+ var retval;
+
+ if (match !== null) {
+ retval = match[1] || match[2];
+ if (retval[0] !== '#') {
+ return '#' + retval;
+ } else {
+ return retval;
+ }
+ }
+
+ match = val.match(rgbre);
+
+ if (match !== null) {
+ retval = 'rgb(' + match.slice(1).join(',') + ')';
+ return retval;
+ }
+
+ match = val.match(rgbare);
+
+ if (match !== null) {
+ retval = 'rgba(' + match.slice(1).join(',') + ')';
+ return retval;
+ }
+
+ return null;
+ };
+
+ /**
+ * Provides the correct scaling ratio for canvas drawing operations on HiDPI screens (e.g. Retina displays)
+ */
+ exports.canvasRatio = function () {
+ var devicePixelRatio = 1;
+ var backingStoreRatio = 1;
+
+ if (global.document) {
+ var canvas = global.document.createElement('canvas');
+ if (canvas.getContext) {
+ var ctx = canvas.getContext('2d');
+ devicePixelRatio = global.devicePixelRatio || 1;
+ backingStoreRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
+ }
+ }
+
+ return devicePixelRatio / backingStoreRatio;
+ };
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {var DOM = __webpack_require__(9);
+
+ var SVG_NS = 'http://www.w3.org/2000/svg';
+ var NODE_TYPE_COMMENT = 8;
+
+ /**
+ * Generic SVG element creation function
+ *
+ * @param svg SVG context, set to null if new
+ * @param width Document width
+ * @param height Document height
+ */
+ exports.initSVG = function(svg, width, height) {
+ var defs, style, initialize = false;
+
+ if (svg && svg.querySelector) {
+ style = svg.querySelector('style');
+ if (style === null) {
+ initialize = true;
+ }
+ } else {
+ svg = DOM.newEl('svg', SVG_NS);
+ initialize = true;
+ }
+
+ if (initialize) {
+ defs = DOM.newEl('defs', SVG_NS);
+ style = DOM.newEl('style', SVG_NS);
+ DOM.setAttr(style, {
+ 'type': 'text/css'
+ });
+ defs.appendChild(style);
+ svg.appendChild(defs);
+ }
+
+ //IE throws an exception if this is set and Chrome requires it to be set
+ if (svg.webkitMatchesSelector) {
+ svg.setAttribute('xmlns', SVG_NS);
+ }
+
+ //Remove comment nodes
+ for (var i = 0; i < svg.childNodes.length; i++) {
+ if (svg.childNodes[i].nodeType === NODE_TYPE_COMMENT) {
+ svg.removeChild(svg.childNodes[i]);
+ }
+ }
+
+ //Remove CSS
+ while (style.childNodes.length) {
+ style.removeChild(style.childNodes[0]);
+ }
+
+ DOM.setAttr(svg, {
+ 'width': width,
+ 'height': height,
+ 'viewBox': '0 0 ' + width + ' ' + height,
+ 'preserveAspectRatio': 'none'
+ });
+
+ return svg;
+ };
+
+ /**
+ * Converts serialized SVG to a string suitable for data URI use
+ * @param svgString Serialized SVG string
+ * @param [base64] Use base64 encoding for data URI
+ */
+ exports.svgStringToDataURI = function() {
+ var rawPrefix = 'data:image/svg+xml;charset=UTF-8,';
+ var base64Prefix = 'data:image/svg+xml;charset=UTF-8;base64,';
+
+ return function(svgString, base64) {
+ if (base64) {
+ return base64Prefix + btoa(global.unescape(encodeURIComponent(svgString)));
+ } else {
+ return rawPrefix + encodeURIComponent(svgString);
+ }
+ };
+ }();
+
+ /**
+ * Returns serialized SVG with XML processing instructions
+ *
+ * @param svg SVG context
+ * @param stylesheets CSS stylesheets to include
+ */
+ exports.serializeSVG = function(svg, engineSettings) {
+ if (!global.XMLSerializer) return;
+ var serializer = new XMLSerializer();
+ var svgCSS = '';
+ var stylesheets = engineSettings.stylesheets;
+
+ //External stylesheets: Processing Instruction method
+ if (engineSettings.svgXMLStylesheet) {
+ var xml = DOM.createXML();
+ //Add directives
+ for (var i = stylesheets.length - 1; i >= 0; i--) {
+ var csspi = xml.createProcessingInstruction('xml-stylesheet', 'href="' + stylesheets[i] + '" rel="stylesheet"');
+ xml.insertBefore(csspi, xml.firstChild);
+ }
+
+ xml.removeChild(xml.documentElement);
+ svgCSS = serializer.serializeToString(xml);
+ }
+
+ var svgText = serializer.serializeToString(svg);
+ svgText = svgText.replace(/\&(\#[0-9]{2,}\;)/g, '&$1');
+ return svgCSS + svgText;
+ };
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/**
+ * Generic new DOM element function
+ *
+ * @param tag Tag to create
+ * @param namespace Optional namespace value
+ */
+ exports.newEl = function(tag, namespace) {
+ if (!global.document) return;
+
+ if (namespace == null) {
+ return global.document.createElement(tag);
+ } else {
+ return global.document.createElementNS(namespace, tag);
+ }
+ };
+
+ /**
+ * Generic setAttribute function
+ *
+ * @param el Reference to DOM element
+ * @param attrs Object with attribute keys and values
+ */
+ exports.setAttr = function (el, attrs) {
+ for (var a in attrs) {
+ el.setAttribute(a, attrs[a]);
+ }
+ };
+
+ /**
+ * Creates a XML document
+ * @private
+ */
+ exports.createXML = function() {
+ if (!global.DOMParser) return;
+ return new DOMParser().parseFromString(' ', 'application/xml');
+ };
+
+ /**
+ * Converts a value into an array of DOM nodes
+ *
+ * @param val A string, a NodeList, a Node, or an HTMLCollection
+ */
+ exports.getNodeArray = function(val) {
+ var retval = null;
+ if (typeof(val) == 'string') {
+ retval = document.querySelectorAll(val);
+ } else if (global.NodeList && val instanceof global.NodeList) {
+ retval = val;
+ } else if (global.Node && val instanceof global.Node) {
+ retval = [val];
+ } else if (global.HTMLCollection && val instanceof global.HTMLCollection) {
+ retval = val;
+ } else if (val instanceof Array) {
+ retval = val;
+ } else if (val === null) {
+ retval = [];
+ }
+
+ retval = Array.prototype.slice.call(retval);
+
+ return retval;
+ };
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports) {
+
+ var Color = function(color, options) {
+ //todo: support rgba, hsla, and rrggbbaa notation
+ //todo: use CIELAB internally
+ //todo: add clamp function (with sign)
+ if (typeof color !== 'string') return;
+
+ this.original = color;
+
+ if (color.charAt(0) === '#') {
+ color = color.slice(1);
+ }
+
+ if (/[^a-f0-9]+/i.test(color)) return;
+
+ if (color.length === 3) {
+ color = color.replace(/./g, '$&$&');
+ }
+
+ if (color.length !== 6) return;
+
+ this.alpha = 1;
+
+ if (options && options.alpha) {
+ this.alpha = options.alpha;
+ }
+
+ this.set(parseInt(color, 16));
+ };
+
+ //todo: jsdocs
+ Color.rgb2hex = function(r, g, b) {
+ function format (decimal) {
+ var hex = (decimal | 0).toString(16);
+ if (decimal < 16) {
+ hex = '0' + hex;
+ }
+ return hex;
+ }
+
+ return [r, g, b].map(format).join('');
+ };
+
+ //todo: jsdocs
+ Color.hsl2rgb = function (h, s, l) {
+ var H = h / 60;
+ var C = (1 - Math.abs(2 * l - 1)) * s;
+ var X = C * (1 - Math.abs(parseInt(H) % 2 - 1));
+ var m = l - (C / 2);
+
+ var r = 0, g = 0, b = 0;
+
+ if (H >= 0 && H < 1) {
+ r = C;
+ g = X;
+ } else if (H >= 1 && H < 2) {
+ r = X;
+ g = C;
+ } else if (H >= 2 && H < 3) {
+ g = C;
+ b = X;
+ } else if (H >= 3 && H < 4) {
+ g = X;
+ b = C;
+ } else if (H >= 4 && H < 5) {
+ r = X;
+ b = C;
+ } else if (H >= 5 && H < 6) {
+ r = C;
+ b = X;
+ }
+
+ r += m;
+ g += m;
+ b += m;
+
+ r = parseInt(r * 255);
+ g = parseInt(g * 255);
+ b = parseInt(b * 255);
+
+ return [r, g, b];
+ };
+
+ /**
+ * Sets the color from a raw RGB888 integer
+ * @param raw RGB888 representation of color
+ */
+ //todo: refactor into a static method
+ //todo: factor out individual color spaces
+ //todo: add HSL, CIELAB, and CIELUV
+ Color.prototype.set = function (val) {
+ this.raw = val;
+
+ var r = (this.raw & 0xFF0000) >> 16;
+ var g = (this.raw & 0x00FF00) >> 8;
+ var b = (this.raw & 0x0000FF);
+
+ // BT.709
+ var y = 0.2126 * r + 0.7152 * g + 0.0722 * b;
+ var u = -0.09991 * r - 0.33609 * g + 0.436 * b;
+ var v = 0.615 * r - 0.55861 * g - 0.05639 * b;
+
+ this.rgb = {
+ r: r,
+ g: g,
+ b: b
+ };
+
+ this.yuv = {
+ y: y,
+ u: u,
+ v: v
+ };
+
+ return this;
+ };
+
+ /**
+ * Lighten or darken a color
+ * @param multiplier Amount to lighten or darken (-1 to 1)
+ */
+ Color.prototype.lighten = function(multiplier) {
+ var cm = Math.min(1, Math.max(0, Math.abs(multiplier))) * (multiplier < 0 ? -1 : 1);
+ var bm = (255 * cm) | 0;
+ var cr = Math.min(255, Math.max(0, this.rgb.r + bm));
+ var cg = Math.min(255, Math.max(0, this.rgb.g + bm));
+ var cb = Math.min(255, Math.max(0, this.rgb.b + bm));
+ var hex = Color.rgb2hex(cr, cg, cb);
+ return new Color(hex);
+ };
+
+ /**
+ * Output color in hex format
+ * @param addHash Add a hash character to the beginning of the output
+ */
+ Color.prototype.toHex = function(addHash) {
+ return (addHash ? '#' : '') + this.raw.toString(16);
+ };
+
+ /**
+ * Returns whether or not current color is lighter than another color
+ * @param color Color to compare against
+ */
+ Color.prototype.lighterThan = function(color) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ return this.yuv.y > color.yuv.y;
+ };
+
+ /**
+ * Returns the result of mixing current color with another color
+ * @param color Color to mix with
+ * @param multiplier How much to mix with the other color
+ */
+ /*
+ Color.prototype.mix = function (color, multiplier) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ var r = this.rgb.r;
+ var g = this.rgb.g;
+ var b = this.rgb.b;
+ var a = this.alpha;
+
+ var m = typeof multiplier !== 'undefined' ? multiplier : 0.5;
+
+ //todo: write a lerp function
+ r = r + m * (color.rgb.r - r);
+ g = g + m * (color.rgb.g - g);
+ b = b + m * (color.rgb.b - b);
+ a = a + m * (color.alpha - a);
+
+ return new Color(Color.rgbToHex(r, g, b), {
+ 'alpha': a
+ });
+ };
+ */
+
+ /**
+ * Returns the result of blending another color on top of current color with alpha
+ * @param color Color to blend on top of current color, i.e. "Ca"
+ */
+ //todo: see if .blendAlpha can be merged into .mix
+ Color.prototype.blendAlpha = function(color) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ var Ca = color;
+ var Cb = this;
+
+ //todo: write alpha blending function
+ var r = Ca.alpha * Ca.rgb.r + (1 - Ca.alpha) * Cb.rgb.r;
+ var g = Ca.alpha * Ca.rgb.g + (1 - Ca.alpha) * Cb.rgb.g;
+ var b = Ca.alpha * Ca.rgb.b + (1 - Ca.alpha) * Cb.rgb.b;
+
+ return new Color(Color.rgb2hex(r, g, b));
+ };
+
+ module.exports = Color;
+
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports) {
+
+ module.exports = {
+ 'version': '2.9.6',
+ 'svg_ns': 'http://www.w3.org/2000/svg'
+ };
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var shaven = __webpack_require__(13);
+
+ var SVG = __webpack_require__(8);
+ var constants = __webpack_require__(11);
+ var utils = __webpack_require__(7);
+
+ var SVG_NS = constants.svg_ns;
+
+ var templates = {
+ 'element': function (options) {
+ var tag = options.tag;
+ var content = options.content || '';
+ delete options.tag;
+ delete options.content;
+ return [tag, content, options];
+ }
+ };
+
+ //todo: deprecate tag arg, infer tag from shape object
+ function convertShape (shape, tag) {
+ return templates.element({
+ 'tag': tag,
+ 'width': shape.width,
+ 'height': shape.height,
+ 'fill': shape.properties.fill
+ });
+ }
+
+ function textCss (properties) {
+ return utils.cssProps({
+ 'fill': properties.fill,
+ 'font-weight': properties.font.weight,
+ 'font-family': properties.font.family + ', monospace',
+ 'font-size': properties.font.size + properties.font.units
+ });
+ }
+
+ function outlinePath (bgWidth, bgHeight, outlineWidth) {
+ var outlineOffsetWidth = outlineWidth / 2;
+
+ return [
+ 'M', outlineOffsetWidth, outlineOffsetWidth,
+ 'H', bgWidth - outlineOffsetWidth,
+ 'V', bgHeight - outlineOffsetWidth,
+ 'H', outlineOffsetWidth,
+ 'V', 0,
+ 'M', 0, outlineOffsetWidth,
+ 'L', bgWidth, bgHeight - outlineOffsetWidth,
+ 'M', 0, bgHeight - outlineOffsetWidth,
+ 'L', bgWidth, outlineOffsetWidth
+ ].join(' ');
+ }
+
+ module.exports = function (sceneGraph, renderSettings) {
+ var engineSettings = renderSettings.engineSettings;
+ var stylesheets = engineSettings.stylesheets;
+ var stylesheetXml = stylesheets.map(function (stylesheet) {
+ return '';
+ }).join('\n');
+
+ var holderId = 'holder_' + Number(new Date()).toString(16);
+
+ var root = sceneGraph.root;
+ var textGroup = root.children.holderTextGroup;
+
+ var css = '#' + holderId + ' text { ' + textCss(textGroup.properties) + ' } ';
+
+ // push text down to be equally vertically aligned with canvas renderer
+ textGroup.y += textGroup.textPositionData.boundingBox.height * 0.8;
+
+ var wordTags = [];
+
+ Object.keys(textGroup.children).forEach(function (lineKey) {
+ var line = textGroup.children[lineKey];
+
+ Object.keys(line.children).forEach(function (wordKey) {
+ var word = line.children[wordKey];
+ var x = textGroup.x + line.x + word.x;
+ var y = textGroup.y + line.y + word.y;
+ var wordTag = templates.element({
+ 'tag': 'text',
+ 'content': word.properties.text,
+ 'x': x,
+ 'y': y
+ });
+
+ wordTags.push(wordTag);
+ });
+ });
+
+ var text = templates.element({
+ 'tag': 'g',
+ 'content': wordTags
+ });
+
+ var outline = null;
+
+ if (root.children.holderBg.properties.outline) {
+ var outlineProperties = root.children.holderBg.properties.outline;
+ outline = templates.element({
+ 'tag': 'path',
+ 'd': outlinePath(root.children.holderBg.width, root.children.holderBg.height, outlineProperties.width),
+ 'stroke-width': outlineProperties.width,
+ 'stroke': outlineProperties.fill,
+ 'fill': 'none'
+ });
+ }
+
+ var bg = convertShape(root.children.holderBg, 'rect');
+
+ var sceneContent = [];
+
+ sceneContent.push(bg);
+ if (outlineProperties) {
+ sceneContent.push(outline);
+ }
+ sceneContent.push(text);
+
+ var scene = templates.element({
+ 'tag': 'g',
+ 'id': holderId,
+ 'content': sceneContent
+ });
+
+ var style = templates.element({
+ 'tag': 'style',
+ //todo: figure out how to add CDATA directive
+ 'content': css,
+ 'type': 'text/css'
+ });
+
+ var defs = templates.element({
+ 'tag': 'defs',
+ 'content': style
+ });
+
+ var svg = templates.element({
+ 'tag': 'svg',
+ 'content': [defs, scene],
+ 'width': root.properties.width,
+ 'height': root.properties.height,
+ 'xmlns': SVG_NS,
+ 'viewBox': [0, 0, root.properties.width, root.properties.height].join(' '),
+ 'preserveAspectRatio': 'none'
+ });
+
+ var output = shaven(svg);
+
+ if (/\&(x)?#[0-9A-Fa-f]/.test(output[0])) {
+ output[0] = output[0].replace(/&#/gm, '');
+ }
+
+ output = stylesheetXml + output[0];
+
+ var svgString = SVG.svgStringToDataURI(output, renderSettings.mode === 'background');
+ return svgString;
+ };
+
+/***/ }),
+/* 13 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var escape = __webpack_require__(14)
+
+ // TODO: remove namespace
+
+ module.exports = function shaven (array, namespace, returnObject) {
+
+ 'use strict'
+
+ var i = 1
+ var doesEscape = true
+ var HTMLString
+ var attributeKey
+ var callback
+ var key
+
+
+ returnObject = returnObject || {}
+
+
+ function createElement (sugarString) {
+
+ var tags = sugarString.match(/^[\w-]+/)
+ var element = {
+ tag: tags ? tags[0] : 'div',
+ attr: {},
+ children: []
+ }
+ var id = sugarString.match(/#([\w-]+)/)
+ var reference = sugarString.match(/\$([\w-]+)/)
+ var classNames = sugarString.match(/\.[\w-]+/g)
+
+
+ // Assign id if is set
+ if (id) {
+ element.attr.id = id[1]
+
+ // Add element to the return object
+ returnObject[id[1]] = element
+ }
+
+ if (reference)
+ returnObject[reference[1]] = element
+
+ if (classNames)
+ element.attr.class = classNames.join(' ').replace(/\./g, '')
+
+ if (sugarString.match(/&$/g))
+ doesEscape = false
+
+ return element
+ }
+
+ function replacer (key, value) {
+
+ if (value === null || value === false || value === undefined)
+ return
+
+ if (typeof value !== 'string' && typeof value !== 'object')
+ return String(value)
+
+ return value
+ }
+
+ function escapeAttribute (string) {
+ return (string || string === 0) ?
+ String(string)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"') :
+ ''
+ }
+
+ function escapeHTML (string) {
+ return String(string)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''')
+ .replace(//g, '>')
+ }
+
+
+ if (typeof array[0] === 'string')
+ array[0] = createElement(array[0])
+
+ else if (Array.isArray(array[0]))
+ i = 0
+
+ else
+ throw new Error(
+ 'First element of array must be a string, ' +
+ 'or an array and not ' + JSON.stringify(array[0])
+ )
+
+
+ for (; i < array.length; i++) {
+
+ // Don't render element if value is false or null
+ if (array[i] === false || array[i] === null) {
+ array[0] = false
+ break
+ }
+
+ // Continue with next array value if current value is undefined or true
+ else if (array[i] === undefined || array[i] === true) {
+ continue
+ }
+
+ else if (typeof array[i] === 'string') {
+ if (doesEscape)
+ array[i] = escapeHTML(array[i])
+
+ array[0].children.push(array[i])
+ }
+
+ else if (typeof array[i] === 'number') {
+
+ array[0].children.push(array[i])
+ }
+
+ else if (Array.isArray(array[i])) {
+
+ if (Array.isArray(array[i][0])) {
+ array[i].reverse().forEach(function (subArray) {
+ array.splice(i + 1, 0, subArray)
+ })
+
+ if (i !== 0)
+ continue
+ i++
+ }
+
+ shaven(array[i], namespace, returnObject)
+
+ if (array[i][0])
+ array[0].children.push(array[i][0])
+ }
+
+ else if (typeof array[i] === 'function')
+ callback = array[i]
+
+
+ else if (typeof array[i] === 'object') {
+ for (attributeKey in array[i])
+ if (array[i].hasOwnProperty(attributeKey))
+ if (array[i][attributeKey] !== null &&
+ array[i][attributeKey] !== false)
+ if (attributeKey === 'style' &&
+ typeof array[i][attributeKey] === 'object')
+ array[0].attr[attributeKey] = JSON
+ .stringify(array[i][attributeKey], replacer)
+ .slice(2, -2)
+ .replace(/","/g, ';')
+ .replace(/":"/g, ':')
+ .replace(/\\"/g, '\'')
+
+ else
+ array[0].attr[attributeKey] = array[i][attributeKey]
+ }
+
+ else
+ throw new TypeError('"' + array[i] + '" is not allowed as a value.')
+ }
+
+
+ if (array[0] !== false) {
+
+ HTMLString = '<' + array[0].tag
+
+ for (key in array[0].attr)
+ if (array[0].attr.hasOwnProperty(key))
+ HTMLString += ' ' + key + '="' +
+ escapeAttribute(array[0].attr[key]) + '"'
+
+ HTMLString += '>'
+
+ array[0].children.forEach(function (child) {
+ HTMLString += child
+ })
+
+ HTMLString += '' + array[0].tag + '>'
+
+ array[0] = HTMLString
+ }
+
+ // Return root element on index 0
+ returnObject[0] = array[0]
+
+ if (callback)
+ callback(array[0])
+
+ // returns object containing all elements with an id and the root element
+ return returnObject
+ }
+
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports) {
+
+ /*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */
+
+ 'use strict';
+
+ /**
+ * Module variables.
+ * @private
+ */
+
+ var matchHtmlRegExp = /["'&<>]/;
+
+ /**
+ * Module exports.
+ * @public
+ */
+
+ module.exports = escapeHtml;
+
+ /**
+ * Escape special characters in the given string of html.
+ *
+ * @param {string} string The string to escape for inserting into HTML
+ * @return {string}
+ * @public
+ */
+
+ function escapeHtml(string) {
+ var str = '' + string;
+ var match = matchHtmlRegExp.exec(str);
+
+ if (!match) {
+ return str;
+ }
+
+ var escape;
+ var html = '';
+ var index = 0;
+ var lastIndex = 0;
+
+ for (index = match.index; index < str.length; index++) {
+ switch (str.charCodeAt(index)) {
+ case 34: // "
+ escape = '"';
+ break;
+ case 38: // &
+ escape = '&';
+ break;
+ case 39: // '
+ escape = ''';
+ break;
+ case 60: // <
+ escape = '<';
+ break;
+ case 62: // >
+ escape = '>';
+ break;
+ default:
+ continue;
+ }
+
+ if (lastIndex !== index) {
+ html += str.substring(lastIndex, index);
+ }
+
+ lastIndex = index + 1;
+ html += escape;
+ }
+
+ return lastIndex !== index
+ ? html + str.substring(lastIndex, index)
+ : html;
+ }
+
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var DOM = __webpack_require__(9);
+ var utils = __webpack_require__(7);
+
+ module.exports = (function() {
+ var canvas = DOM.newEl('canvas');
+ var ctx = null;
+
+ return function(sceneGraph) {
+ if (ctx == null) {
+ ctx = canvas.getContext('2d');
+ }
+
+ var dpr = utils.canvasRatio();
+ var root = sceneGraph.root;
+ canvas.width = dpr * root.properties.width;
+ canvas.height = dpr * root.properties.height ;
+ ctx.textBaseline = 'middle';
+
+ var bg = root.children.holderBg;
+ var bgWidth = dpr * bg.width;
+ var bgHeight = dpr * bg.height;
+ //todo: parametrize outline width (e.g. in scene object)
+ var outlineWidth = 2;
+ var outlineOffsetWidth = outlineWidth / 2;
+
+ ctx.fillStyle = bg.properties.fill;
+ ctx.fillRect(0, 0, bgWidth, bgHeight);
+
+ if (bg.properties.outline) {
+ //todo: abstract this into a method
+ ctx.strokeStyle = bg.properties.outline.fill;
+ ctx.lineWidth = bg.properties.outline.width;
+ ctx.moveTo(outlineOffsetWidth, outlineOffsetWidth);
+ // TL, TR, BR, BL
+ ctx.lineTo(bgWidth - outlineOffsetWidth, outlineOffsetWidth);
+ ctx.lineTo(bgWidth - outlineOffsetWidth, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(outlineOffsetWidth, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(outlineOffsetWidth, outlineOffsetWidth);
+ // Diagonals
+ ctx.moveTo(0, outlineOffsetWidth);
+ ctx.lineTo(bgWidth, bgHeight - outlineOffsetWidth);
+ ctx.moveTo(0, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(bgWidth, outlineOffsetWidth);
+ ctx.stroke();
+ }
+
+ var textGroup = root.children.holderTextGroup;
+ ctx.font = textGroup.properties.font.weight + ' ' + (dpr * textGroup.properties.font.size) + textGroup.properties.font.units + ' ' + textGroup.properties.font.family + ', monospace';
+ ctx.fillStyle = textGroup.properties.fill;
+
+ for (var lineKey in textGroup.children) {
+ var line = textGroup.children[lineKey];
+ for (var wordKey in line.children) {
+ var word = line.children[wordKey];
+ var x = dpr * (textGroup.x + line.x + word.x);
+ var y = dpr * (textGroup.y + line.y + word.y + (textGroup.properties.leading / 2));
+
+ ctx.fillText(word.properties.text, x, y);
+ }
+ }
+
+ return canvas.toDataURL('image/png');
+ };
+ })();
+
+/***/ })
+/******/ ])
+});
+;
+(function(ctx, isMeteorPackage) {
+ if (isMeteorPackage) {
+ Holder = ctx.Holder;
+ }
+})(this, typeof Meteor !== 'undefined' && typeof Package !== 'undefined');
diff --git a/vendor/assets/javascripts/holderjs/package.js b/vendor/assets/javascripts/holderjs/package.js
new file mode 100644
index 000000000..66cf4b9a6
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/package.js
@@ -0,0 +1,12 @@
+Package.describe({
+ summary: 'Holder uses SVG to render image placeholders entirely in browser.',
+ version: '2.9.6',
+ name: 'imsky:holder',
+ git: 'https://github.com/imsky/holder',
+});
+
+Package.onUse(function(api) {
+ api.versionsFrom('0.9.0');
+ api.export('Holder', 'client');
+ api.addFiles('holder.js', 'client');
+});
diff --git a/vendor/assets/javascripts/holderjs/src/index.js b/vendor/assets/javascripts/holderjs/src/index.js
new file mode 100644
index 000000000..be8bd9258
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/index.js
@@ -0,0 +1,6 @@
+/*
+Holder.js - client side image placeholders
+(c) 2012-2015 Ivan Malopinsky - http://imsky.co
+*/
+
+module.exports = require('./lib');
diff --git a/vendor/assets/javascripts/holderjs/src/lib/color.js b/vendor/assets/javascripts/holderjs/src/lib/color.js
new file mode 100644
index 000000000..cb7e60772
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/color.js
@@ -0,0 +1,202 @@
+var Color = function(color, options) {
+ //todo: support rgba, hsla, and rrggbbaa notation
+ //todo: use CIELAB internally
+ //todo: add clamp function (with sign)
+ if (typeof color !== 'string') return;
+
+ this.original = color;
+
+ if (color.charAt(0) === '#') {
+ color = color.slice(1);
+ }
+
+ if (/[^a-f0-9]+/i.test(color)) return;
+
+ if (color.length === 3) {
+ color = color.replace(/./g, '$&$&');
+ }
+
+ if (color.length !== 6) return;
+
+ this.alpha = 1;
+
+ if (options && options.alpha) {
+ this.alpha = options.alpha;
+ }
+
+ this.set(parseInt(color, 16));
+};
+
+//todo: jsdocs
+Color.rgb2hex = function(r, g, b) {
+ function format (decimal) {
+ var hex = (decimal | 0).toString(16);
+ if (decimal < 16) {
+ hex = '0' + hex;
+ }
+ return hex;
+ }
+
+ return [r, g, b].map(format).join('');
+};
+
+//todo: jsdocs
+Color.hsl2rgb = function (h, s, l) {
+ var H = h / 60;
+ var C = (1 - Math.abs(2 * l - 1)) * s;
+ var X = C * (1 - Math.abs(parseInt(H) % 2 - 1));
+ var m = l - (C / 2);
+
+ var r = 0, g = 0, b = 0;
+
+ if (H >= 0 && H < 1) {
+ r = C;
+ g = X;
+ } else if (H >= 1 && H < 2) {
+ r = X;
+ g = C;
+ } else if (H >= 2 && H < 3) {
+ g = C;
+ b = X;
+ } else if (H >= 3 && H < 4) {
+ g = X;
+ b = C;
+ } else if (H >= 4 && H < 5) {
+ r = X;
+ b = C;
+ } else if (H >= 5 && H < 6) {
+ r = C;
+ b = X;
+ }
+
+ r += m;
+ g += m;
+ b += m;
+
+ r = parseInt(r * 255);
+ g = parseInt(g * 255);
+ b = parseInt(b * 255);
+
+ return [r, g, b];
+};
+
+/**
+ * Sets the color from a raw RGB888 integer
+ * @param raw RGB888 representation of color
+ */
+//todo: refactor into a static method
+//todo: factor out individual color spaces
+//todo: add HSL, CIELAB, and CIELUV
+Color.prototype.set = function (val) {
+ this.raw = val;
+
+ var r = (this.raw & 0xFF0000) >> 16;
+ var g = (this.raw & 0x00FF00) >> 8;
+ var b = (this.raw & 0x0000FF);
+
+ // BT.709
+ var y = 0.2126 * r + 0.7152 * g + 0.0722 * b;
+ var u = -0.09991 * r - 0.33609 * g + 0.436 * b;
+ var v = 0.615 * r - 0.55861 * g - 0.05639 * b;
+
+ this.rgb = {
+ r: r,
+ g: g,
+ b: b
+ };
+
+ this.yuv = {
+ y: y,
+ u: u,
+ v: v
+ };
+
+ return this;
+};
+
+/**
+ * Lighten or darken a color
+ * @param multiplier Amount to lighten or darken (-1 to 1)
+ */
+Color.prototype.lighten = function(multiplier) {
+ var cm = Math.min(1, Math.max(0, Math.abs(multiplier))) * (multiplier < 0 ? -1 : 1);
+ var bm = (255 * cm) | 0;
+ var cr = Math.min(255, Math.max(0, this.rgb.r + bm));
+ var cg = Math.min(255, Math.max(0, this.rgb.g + bm));
+ var cb = Math.min(255, Math.max(0, this.rgb.b + bm));
+ var hex = Color.rgb2hex(cr, cg, cb);
+ return new Color(hex);
+};
+
+/**
+ * Output color in hex format
+ * @param addHash Add a hash character to the beginning of the output
+ */
+Color.prototype.toHex = function(addHash) {
+ return (addHash ? '#' : '') + this.raw.toString(16);
+};
+
+/**
+ * Returns whether or not current color is lighter than another color
+ * @param color Color to compare against
+ */
+Color.prototype.lighterThan = function(color) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ return this.yuv.y > color.yuv.y;
+};
+
+/**
+ * Returns the result of mixing current color with another color
+ * @param color Color to mix with
+ * @param multiplier How much to mix with the other color
+ */
+/*
+Color.prototype.mix = function (color, multiplier) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ var r = this.rgb.r;
+ var g = this.rgb.g;
+ var b = this.rgb.b;
+ var a = this.alpha;
+
+ var m = typeof multiplier !== 'undefined' ? multiplier : 0.5;
+
+ //todo: write a lerp function
+ r = r + m * (color.rgb.r - r);
+ g = g + m * (color.rgb.g - g);
+ b = b + m * (color.rgb.b - b);
+ a = a + m * (color.alpha - a);
+
+ return new Color(Color.rgbToHex(r, g, b), {
+ 'alpha': a
+ });
+};
+*/
+
+/**
+ * Returns the result of blending another color on top of current color with alpha
+ * @param color Color to blend on top of current color, i.e. "Ca"
+ */
+//todo: see if .blendAlpha can be merged into .mix
+Color.prototype.blendAlpha = function(color) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ var Ca = color;
+ var Cb = this;
+
+ //todo: write alpha blending function
+ var r = Ca.alpha * Ca.rgb.r + (1 - Ca.alpha) * Cb.rgb.r;
+ var g = Ca.alpha * Ca.rgb.g + (1 - Ca.alpha) * Cb.rgb.g;
+ var b = Ca.alpha * Ca.rgb.b + (1 - Ca.alpha) * Cb.rgb.b;
+
+ return new Color(Color.rgb2hex(r, g, b));
+};
+
+module.exports = Color;
diff --git a/vendor/assets/javascripts/holderjs/src/lib/constants.js b/vendor/assets/javascripts/holderjs/src/lib/constants.js
new file mode 100644
index 000000000..1c6e5afba
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/constants.js
@@ -0,0 +1,4 @@
+module.exports = {
+ 'version': '%version%',
+ 'svg_ns': 'http://www.w3.org/2000/svg'
+};
\ No newline at end of file
diff --git a/vendor/assets/javascripts/holderjs/src/lib/dom.js b/vendor/assets/javascripts/holderjs/src/lib/dom.js
new file mode 100644
index 000000000..7777d9f23
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/dom.js
@@ -0,0 +1,62 @@
+/**
+ * Generic new DOM element function
+ *
+ * @param tag Tag to create
+ * @param namespace Optional namespace value
+ */
+exports.newEl = function(tag, namespace) {
+ if (!global.document) return;
+
+ if (namespace == null) {
+ return global.document.createElement(tag);
+ } else {
+ return global.document.createElementNS(namespace, tag);
+ }
+};
+
+/**
+ * Generic setAttribute function
+ *
+ * @param el Reference to DOM element
+ * @param attrs Object with attribute keys and values
+ */
+exports.setAttr = function (el, attrs) {
+ for (var a in attrs) {
+ el.setAttribute(a, attrs[a]);
+ }
+};
+
+/**
+ * Creates a XML document
+ * @private
+ */
+exports.createXML = function() {
+ if (!global.DOMParser) return;
+ return new DOMParser().parseFromString(' ', 'application/xml');
+};
+
+/**
+ * Converts a value into an array of DOM nodes
+ *
+ * @param val A string, a NodeList, a Node, or an HTMLCollection
+ */
+exports.getNodeArray = function(val) {
+ var retval = null;
+ if (typeof(val) == 'string') {
+ retval = document.querySelectorAll(val);
+ } else if (global.NodeList && val instanceof global.NodeList) {
+ retval = val;
+ } else if (global.Node && val instanceof global.Node) {
+ retval = [val];
+ } else if (global.HTMLCollection && val instanceof global.HTMLCollection) {
+ retval = val;
+ } else if (val instanceof Array) {
+ retval = val;
+ } else if (val === null) {
+ retval = [];
+ }
+
+ retval = Array.prototype.slice.call(retval);
+
+ return retval;
+};
diff --git a/vendor/assets/javascripts/holderjs/src/lib/index.js b/vendor/assets/javascripts/holderjs/src/lib/index.js
new file mode 100644
index 000000000..1c495f64d
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/index.js
@@ -0,0 +1,1198 @@
+/*
+Holder.js - client side image placeholders
+(c) 2012-2016 Ivan Malopinsky - http://imsky.co
+*/
+
+//Libraries and functions
+var onDomReady = require('./vendor/ondomready');
+var querystring = require('./vendor/querystring');
+
+var SceneGraph = require('./scenegraph');
+var utils = require('./utils');
+var SVG = require('./svg');
+var DOM = require('./dom');
+var Color = require('./color');
+var constants = require('./constants');
+
+var svgRenderer = require('./renderers/svg-text');
+var sgCanvasRenderer = require('./renderers/canvas');
+
+var extend = utils.extend;
+var dimensionCheck = utils.dimensionCheck;
+
+//Constants and definitions
+var SVG_NS = constants.svg_ns;
+
+var Holder = {
+ version: constants.version,
+
+ /**
+ * Adds a theme to default settings
+ *
+ * @param {string} name Theme name
+ * @param {Object} theme Theme object, with foreground, background, size, font, and fontweight properties.
+ */
+ addTheme: function(name, theme) {
+ name != null && theme != null && (App.settings.themes[name] = theme);
+ delete App.vars.cache.themeKeys;
+ return this;
+ },
+
+ /**
+ * Appends a placeholder to an element
+ *
+ * @param {string} src Placeholder URL string
+ * @param el A selector or a reference to a DOM node
+ */
+ addImage: function(src, el) {
+ //todo: use jquery fallback if available for all QSA references
+ var nodes = DOM.getNodeArray(el);
+ nodes.forEach(function (node) {
+ var img = DOM.newEl('img');
+ var domProps = {};
+ domProps[App.setup.dataAttr] = src;
+ DOM.setAttr(img, domProps);
+ node.appendChild(img);
+ });
+ return this;
+ },
+
+ /**
+ * Sets whether or not an image is updated on resize.
+ * If an image is set to be updated, it is immediately rendered.
+ *
+ * @param {Object} el Image DOM element
+ * @param {Boolean} value Resizable update flag value
+ */
+ setResizeUpdate: function(el, value) {
+ if (el.holderData) {
+ el.holderData.resizeUpdate = !!value;
+ if (el.holderData.resizeUpdate) {
+ updateResizableElements(el);
+ }
+ }
+ },
+
+ /**
+ * Runs Holder with options. By default runs Holder on all images with "holder.js" in their source attributes.
+ *
+ * @param {Object} userOptions Options object, can contain domain, themes, images, and bgnodes properties
+ */
+ run: function(userOptions) {
+ //todo: split processing into separate queues
+ userOptions = userOptions || {};
+ var engineSettings = {};
+ var options = extend(App.settings, userOptions);
+
+ App.vars.preempted = true;
+ App.vars.dataAttr = options.dataAttr || App.setup.dataAttr;
+
+ engineSettings.renderer = options.renderer ? options.renderer : App.setup.renderer;
+ if (App.setup.renderers.join(',').indexOf(engineSettings.renderer) === -1) {
+ engineSettings.renderer = App.setup.supportsSVG ? 'svg' : (App.setup.supportsCanvas ? 'canvas' : 'html');
+ }
+
+ var images = DOM.getNodeArray(options.images);
+ var bgnodes = DOM.getNodeArray(options.bgnodes);
+ var stylenodes = DOM.getNodeArray(options.stylenodes);
+ var objects = DOM.getNodeArray(options.objects);
+
+ engineSettings.stylesheets = [];
+ engineSettings.svgXMLStylesheet = true;
+ engineSettings.noFontFallback = !!options.noFontFallback;
+ engineSettings.noBackgroundSize = !!options.noBackgroundSize;
+
+ stylenodes.forEach(function (styleNode) {
+ if (styleNode.attributes.rel && styleNode.attributes.href && styleNode.attributes.rel.value == 'stylesheet') {
+ var href = styleNode.attributes.href.value;
+ //todo: write isomorphic relative-to-absolute URL function
+ var proxyLink = DOM.newEl('a');
+ proxyLink.href = href;
+ var stylesheetURL = proxyLink.protocol + '//' + proxyLink.host + proxyLink.pathname + proxyLink.search;
+ engineSettings.stylesheets.push(stylesheetURL);
+ }
+ });
+
+ bgnodes.forEach(function (bgNode) {
+ //Skip processing background nodes if getComputedStyle is unavailable, since only modern browsers would be able to use canvas or SVG to render to background
+ if (!global.getComputedStyle) return;
+ var backgroundImage = global.getComputedStyle(bgNode, null).getPropertyValue('background-image');
+ var dataBackgroundImage = bgNode.getAttribute('data-background-src');
+ var rawURL = dataBackgroundImage || backgroundImage;
+
+ var holderURL = null;
+ var holderString = options.domain + '/';
+ var holderStringIndex = rawURL.indexOf(holderString);
+
+ if (holderStringIndex === 0) {
+ holderURL = rawURL;
+ } else if (holderStringIndex === 1 && rawURL[0] === '?') {
+ holderURL = rawURL.slice(1);
+ } else {
+ var fragment = rawURL.substr(holderStringIndex).match(/([^\"]*)"?\)/);
+ if (fragment !== null) {
+ holderURL = fragment[1];
+ } else if (rawURL.indexOf('url(') === 0) {
+ throw 'Holder: unable to parse background URL: ' + rawURL;
+ }
+ }
+
+ if (holderURL) {
+ var holderFlags = parseURL(holderURL, options);
+ if (holderFlags) {
+ prepareDOMElement({
+ mode: 'background',
+ el: bgNode,
+ flags: holderFlags,
+ engineSettings: engineSettings
+ });
+ }
+ }
+ });
+
+ objects.forEach(function (object) {
+ var objectAttr = {};
+
+ try {
+ objectAttr.data = object.getAttribute('data');
+ objectAttr.dataSrc = object.getAttribute(App.vars.dataAttr);
+ } catch (e) {}
+
+ var objectHasSrcURL = objectAttr.data != null && objectAttr.data.indexOf(options.domain) === 0;
+ var objectHasDataSrcURL = objectAttr.dataSrc != null && objectAttr.dataSrc.indexOf(options.domain) === 0;
+
+ if (objectHasSrcURL) {
+ prepareImageElement(options, engineSettings, objectAttr.data, object);
+ } else if (objectHasDataSrcURL) {
+ prepareImageElement(options, engineSettings, objectAttr.dataSrc, object);
+ }
+ });
+
+ images.forEach(function (image) {
+ var imageAttr = {};
+
+ try {
+ imageAttr.src = image.getAttribute('src');
+ imageAttr.dataSrc = image.getAttribute(App.vars.dataAttr);
+ imageAttr.rendered = image.getAttribute('data-holder-rendered');
+ } catch (e) {}
+
+ var imageHasSrc = imageAttr.src != null;
+ var imageHasDataSrcURL = imageAttr.dataSrc != null && imageAttr.dataSrc.indexOf(options.domain) === 0;
+ var imageRendered = imageAttr.rendered != null && imageAttr.rendered == 'true';
+
+ if (imageHasSrc) {
+ if (imageAttr.src.indexOf(options.domain) === 0) {
+ prepareImageElement(options, engineSettings, imageAttr.src, image);
+ } else if (imageHasDataSrcURL) {
+ //Image has a valid data-src and an invalid src
+ if (imageRendered) {
+ //If the placeholder has already been render, re-render it
+ prepareImageElement(options, engineSettings, imageAttr.dataSrc, image);
+ } else {
+ //If the placeholder has not been rendered, check if the image exists and render a fallback if it doesn't
+ (function(src, options, engineSettings, dataSrc, image) {
+ utils.imageExists(src, function(exists) {
+ if (!exists) {
+ prepareImageElement(options, engineSettings, dataSrc, image);
+ }
+ });
+ })(imageAttr.src, options, engineSettings, imageAttr.dataSrc, image);
+ }
+ }
+ } else if (imageHasDataSrcURL) {
+ prepareImageElement(options, engineSettings, imageAttr.dataSrc, image);
+ }
+ });
+
+ return this;
+ }
+};
+
+var App = {
+ settings: {
+ domain: 'holder.js',
+ images: 'img',
+ objects: 'object',
+ bgnodes: 'body .holderjs',
+ stylenodes: 'head link.holderjs',
+ themes: {
+ 'gray': {
+ bg: '#EEEEEE',
+ fg: '#AAAAAA'
+ },
+ 'social': {
+ bg: '#3a5a97',
+ fg: '#FFFFFF'
+ },
+ 'industrial': {
+ bg: '#434A52',
+ fg: '#C2F200'
+ },
+ 'sky': {
+ bg: '#0D8FDB',
+ fg: '#FFFFFF'
+ },
+ 'vine': {
+ bg: '#39DBAC',
+ fg: '#1E292C'
+ },
+ 'lava': {
+ bg: '#F8591A',
+ fg: '#1C2846'
+ }
+ }
+ },
+ defaults: {
+ size: 10,
+ units: 'pt',
+ scale: 1 / 16
+ }
+};
+
+/**
+ * Processes provided source attribute and sets up the appropriate rendering workflow
+ *
+ * @private
+ * @param options Instance options from Holder.run
+ * @param renderSettings Instance configuration
+ * @param src Image URL
+ * @param el Image DOM element
+ */
+function prepareImageElement(options, engineSettings, src, el) {
+ var holderFlags = parseURL(src.substr(src.lastIndexOf(options.domain)), options);
+ if (holderFlags) {
+ prepareDOMElement({
+ mode: null,
+ el: el,
+ flags: holderFlags,
+ engineSettings: engineSettings
+ });
+ }
+}
+
+/**
+ * Processes a Holder URL and extracts configuration from query string
+ *
+ * @private
+ * @param url URL
+ * @param instanceOptions Instance options from Holder.run
+ */
+function parseURL(url, instanceOptions) {
+ var holder = {
+ theme: extend(App.settings.themes.gray, null),
+ stylesheets: instanceOptions.stylesheets,
+ instanceOptions: instanceOptions
+ };
+
+ var firstQuestionMark = url.indexOf('?');
+ var parts = [url];
+
+ if (firstQuestionMark !== -1) {
+ parts = [url.slice(0, firstQuestionMark), url.slice(firstQuestionMark + 1)];
+ }
+
+ var basics = parts[0].split('/');
+
+ holder.holderURL = url;
+
+ var dimensions = basics[1];
+ var dimensionData = dimensions.match(/([\d]+p?)x([\d]+p?)/);
+
+ if (!dimensionData) return false;
+
+ holder.fluid = dimensions.indexOf('p') !== -1;
+
+ holder.dimensions = {
+ width: dimensionData[1].replace('p', '%'),
+ height: dimensionData[2].replace('p', '%')
+ };
+
+ if (parts.length === 2) {
+ var options = querystring.parse(parts[1]);
+
+ // Dimensions
+
+ if (utils.truthy(options.ratio)) {
+ holder.fluid = true;
+ var ratioWidth = parseFloat(holder.dimensions.width.replace('%', ''));
+ var ratioHeight = parseFloat(holder.dimensions.height.replace('%', ''));
+
+ ratioHeight = Math.floor(100 * (ratioHeight / ratioWidth));
+ ratioWidth = 100;
+
+ holder.dimensions.width = ratioWidth + '%';
+ holder.dimensions.height = ratioHeight + '%';
+ }
+
+ holder.auto = utils.truthy(options.auto);
+
+ // Colors
+
+ if (options.bg) {
+ holder.theme.bg = utils.parseColor(options.bg);
+ }
+
+ if (options.fg) {
+ holder.theme.fg = utils.parseColor(options.fg);
+ }
+
+ //todo: add automatic foreground to themes without foreground
+ if (options.bg && !options.fg) {
+ holder.autoFg = true;
+ }
+
+ if (options.theme && holder.instanceOptions.themes.hasOwnProperty(options.theme)) {
+ holder.theme = extend(holder.instanceOptions.themes[options.theme], null);
+ }
+
+ // Text
+
+ if (options.text) {
+ holder.text = options.text;
+ }
+
+ if (options.textmode) {
+ holder.textmode = options.textmode;
+ }
+
+ if (options.size && parseFloat(options.size)) {
+ holder.size = parseFloat(options.size);
+ }
+
+ if (options.font) {
+ holder.font = options.font;
+ }
+
+ if (options.align) {
+ holder.align = options.align;
+ }
+
+ if (options.lineWrap) {
+ holder.lineWrap = options.lineWrap;
+ }
+
+ holder.nowrap = utils.truthy(options.nowrap);
+
+ // Miscellaneous
+
+ holder.outline = utils.truthy(options.outline);
+
+ if (utils.truthy(options.random)) {
+ App.vars.cache.themeKeys = App.vars.cache.themeKeys || Object.keys(holder.instanceOptions.themes);
+ var _theme = App.vars.cache.themeKeys[0 | Math.random() * App.vars.cache.themeKeys.length];
+ holder.theme = extend(holder.instanceOptions.themes[_theme], null);
+ }
+ }
+
+ return holder;
+}
+
+/**
+ * Modifies the DOM to fit placeholders and sets up resizable image callbacks (for fluid and automatically sized placeholders)
+ *
+ * @private
+ * @param settings DOM prep settings
+ */
+function prepareDOMElement(prepSettings) {
+ var mode = prepSettings.mode;
+ var el = prepSettings.el;
+ var flags = prepSettings.flags;
+ var _engineSettings = prepSettings.engineSettings;
+ var dimensions = flags.dimensions,
+ theme = flags.theme;
+ var dimensionsCaption = dimensions.width + 'x' + dimensions.height;
+ mode = mode == null ? (flags.fluid ? 'fluid' : 'image') : mode;
+ var holderTemplateRe = /holder_([a-z]+)/g;
+ var dimensionsInText = false;
+
+ if (flags.text != null) {
+ theme.text = flags.text;
+
+ // SVG embedding doesn't parse Unicode properly
+ if (el.nodeName.toLowerCase() === 'object') {
+ var textLines = theme.text.split('\\n');
+ for (var k = 0; k < textLines.length; k++) {
+ textLines[k] = utils.encodeHtmlEntity(textLines[k]);
+ }
+ theme.text = textLines.join('\\n');
+ }
+ }
+
+ if (theme.text) {
+ var holderTemplateMatches = theme.text.match(holderTemplateRe);
+
+ if (holderTemplateMatches !== null) {
+ //todo: optimize template replacement
+ holderTemplateMatches.forEach(function (match) {
+ if (match === 'holder_dimensions') {
+ theme.text = theme.text.replace(match, dimensionsCaption);
+ }
+ });
+ }
+ }
+
+ var holderURL = flags.holderURL;
+ var engineSettings = extend(_engineSettings, null);
+
+ if (flags.font) {
+ /*
+ If external fonts are used in a placeholder rendered with SVG, Holder falls back to canvas.
+
+ This is done because Firefox and Chrome disallow embedded SVGs from referencing external assets.
+ The workaround is either to change the placeholder tag from to or to use the canvas renderer.
+ */
+ theme.font = flags.font;
+ if (!engineSettings.noFontFallback && el.nodeName.toLowerCase() === 'img' && App.setup.supportsCanvas && engineSettings.renderer === 'svg') {
+ engineSettings = extend(engineSettings, {
+ renderer: 'canvas'
+ });
+ }
+ }
+
+ //Chrome and Opera require a quick 10ms re-render if web fonts are used with canvas
+ if (flags.font && engineSettings.renderer == 'canvas') {
+ engineSettings.reRender = true;
+ }
+
+ if (mode == 'background') {
+ if (el.getAttribute('data-background-src') == null) {
+ DOM.setAttr(el, {
+ 'data-background-src': holderURL
+ });
+ }
+ } else {
+ var domProps = {};
+ domProps[App.vars.dataAttr] = holderURL;
+ DOM.setAttr(el, domProps);
+ }
+
+ flags.theme = theme;
+
+ //todo consider using all renderSettings in holderData
+ el.holderData = {
+ flags: flags,
+ engineSettings: engineSettings
+ };
+
+ if (mode == 'image' || mode == 'fluid') {
+ DOM.setAttr(el, {
+ 'alt': theme.text ? (dimensionsInText ? theme.text : theme.text + ' [' + dimensionsCaption + ']') : dimensionsCaption
+ });
+ }
+
+ var renderSettings = {
+ mode: mode,
+ el: el,
+ holderSettings: {
+ dimensions: dimensions,
+ theme: theme,
+ flags: flags
+ },
+ engineSettings: engineSettings
+ };
+
+ if (mode == 'image') {
+ if (!flags.auto) {
+ el.style.width = dimensions.width + 'px';
+ el.style.height = dimensions.height + 'px';
+ }
+
+ if (engineSettings.renderer == 'html') {
+ el.style.backgroundColor = theme.bg;
+ } else {
+ render(renderSettings);
+
+ if (flags.textmode == 'exact') {
+ el.holderData.resizeUpdate = true;
+ App.vars.resizableImages.push(el);
+ updateResizableElements(el);
+ }
+ }
+ } else if (mode == 'background' && engineSettings.renderer != 'html') {
+ render(renderSettings);
+ } else if (mode == 'fluid') {
+ el.holderData.resizeUpdate = true;
+
+ if (dimensions.height.slice(-1) == '%') {
+ el.style.height = dimensions.height;
+ } else if (flags.auto == null || !flags.auto) {
+ el.style.height = dimensions.height + 'px';
+ }
+ if (dimensions.width.slice(-1) == '%') {
+ el.style.width = dimensions.width;
+ } else if (flags.auto == null || !flags.auto) {
+ el.style.width = dimensions.width + 'px';
+ }
+ if (el.style.display == 'inline' || el.style.display === '' || el.style.display == 'none') {
+ el.style.display = 'block';
+ }
+
+ setInitialDimensions(el);
+
+ if (engineSettings.renderer == 'html') {
+ el.style.backgroundColor = theme.bg;
+ } else {
+ App.vars.resizableImages.push(el);
+ updateResizableElements(el);
+ }
+ }
+}
+
+/**
+ * Core function that takes output from renderers and sets it as the source or background-image of the target element
+ *
+ * @private
+ * @param renderSettings Renderer settings
+ */
+function render(renderSettings) {
+ var image = null;
+ var mode = renderSettings.mode;
+ var el = renderSettings.el;
+ var holderSettings = renderSettings.holderSettings;
+ var engineSettings = renderSettings.engineSettings;
+
+ switch (engineSettings.renderer) {
+ case 'svg':
+ if (!App.setup.supportsSVG) return;
+ break;
+ case 'canvas':
+ if (!App.setup.supportsCanvas) return;
+ break;
+ default:
+ return;
+ }
+
+ //todo: move generation of scene up to flag generation to reduce extra object creation
+ var scene = {
+ width: holderSettings.dimensions.width,
+ height: holderSettings.dimensions.height,
+ theme: holderSettings.theme,
+ flags: holderSettings.flags
+ };
+
+ var sceneGraph = buildSceneGraph(scene);
+
+ function getRenderedImage() {
+ var image = null;
+ switch (engineSettings.renderer) {
+ case 'canvas':
+ image = sgCanvasRenderer(sceneGraph, renderSettings);
+ break;
+ case 'svg':
+ image = svgRenderer(sceneGraph, renderSettings);
+ break;
+ default:
+ throw 'Holder: invalid renderer: ' + engineSettings.renderer;
+ }
+
+ return image;
+ }
+
+ image = getRenderedImage();
+
+ if (image == null) {
+ throw 'Holder: couldn\'t render placeholder';
+ }
+
+ //todo: add canvas rendering
+ if (mode == 'background') {
+ el.style.backgroundImage = 'url(' + image + ')';
+
+ if (!engineSettings.noBackgroundSize) {
+ el.style.backgroundSize = scene.width + 'px ' + scene.height + 'px';
+ }
+ } else {
+ if (el.nodeName.toLowerCase() === 'img') {
+ DOM.setAttr(el, {
+ 'src': image
+ });
+ } else if (el.nodeName.toLowerCase() === 'object') {
+ DOM.setAttr(el, {
+ 'data': image,
+ 'type': 'image/svg+xml'
+ });
+ }
+ if (engineSettings.reRender) {
+ global.setTimeout(function () {
+ var image = getRenderedImage();
+ if (image == null) {
+ throw 'Holder: couldn\'t render placeholder';
+ }
+ //todo: refactor this code into a function
+ if (el.nodeName.toLowerCase() === 'img') {
+ DOM.setAttr(el, {
+ 'src': image
+ });
+ } else if (el.nodeName.toLowerCase() === 'object') {
+ DOM.setAttr(el, {
+ 'data': image,
+ 'type': 'image/svg+xml'
+ });
+ }
+ }, 150);
+ }
+ }
+ //todo: account for re-rendering
+ DOM.setAttr(el, {
+ 'data-holder-rendered': true
+ });
+}
+
+/**
+ * Core function that takes a Holder scene description and builds a scene graph
+ *
+ * @private
+ * @param scene Holder scene object
+ */
+//todo: make this function reusable
+//todo: merge app defaults and setup properties into the scene argument
+function buildSceneGraph(scene) {
+ var fontSize = App.defaults.size;
+ if (parseFloat(scene.theme.size)) {
+ fontSize = scene.theme.size;
+ } else if (parseFloat(scene.flags.size)) {
+ fontSize = scene.flags.size;
+ }
+
+ scene.font = {
+ family: scene.theme.font ? scene.theme.font : 'Arial, Helvetica, Open Sans, sans-serif',
+ size: textSize(scene.width, scene.height, fontSize, App.defaults.scale),
+ units: scene.theme.units ? scene.theme.units : App.defaults.units,
+ weight: scene.theme.fontweight ? scene.theme.fontweight : 'bold'
+ };
+
+ scene.text = scene.theme.text || Math.floor(scene.width) + 'x' + Math.floor(scene.height);
+
+ scene.noWrap = scene.theme.nowrap || scene.flags.nowrap;
+
+ scene.align = scene.theme.align || scene.flags.align || 'center';
+
+ switch (scene.flags.textmode) {
+ case 'literal':
+ scene.text = scene.flags.dimensions.width + 'x' + scene.flags.dimensions.height;
+ break;
+ case 'exact':
+ if (!scene.flags.exactDimensions) break;
+ scene.text = Math.floor(scene.flags.exactDimensions.width) + 'x' + Math.floor(scene.flags.exactDimensions.height);
+ break;
+ }
+
+ var lineWrap = scene.flags.lineWrap || App.setup.lineWrapRatio;
+ var sceneMargin = scene.width * lineWrap;
+ var maxLineWidth = sceneMargin;
+
+ var sceneGraph = new SceneGraph({
+ width: scene.width,
+ height: scene.height
+ });
+
+ var Shape = sceneGraph.Shape;
+
+ var holderBg = new Shape.Rect('holderBg', {
+ fill: scene.theme.bg
+ });
+
+ holderBg.resize(scene.width, scene.height);
+ sceneGraph.root.add(holderBg);
+
+ if (scene.flags.outline) {
+ var outlineColor = new Color(holderBg.properties.fill);
+ outlineColor = outlineColor.lighten(outlineColor.lighterThan('7f7f7f') ? -0.1 : 0.1);
+ holderBg.properties.outline = {
+ fill: outlineColor.toHex(true),
+ width: 2
+ };
+ }
+
+ var holderTextColor = scene.theme.fg;
+
+ if (scene.flags.autoFg) {
+ var holderBgColor = new Color(holderBg.properties.fill);
+ var lightColor = new Color('fff');
+ var darkColor = new Color('000', {
+ 'alpha': 0.285714
+ });
+
+ holderTextColor = holderBgColor.blendAlpha(holderBgColor.lighterThan('7f7f7f') ? darkColor : lightColor).toHex(true);
+ }
+
+ var holderTextGroup = new Shape.Group('holderTextGroup', {
+ text: scene.text,
+ align: scene.align,
+ font: scene.font,
+ fill: holderTextColor
+ });
+
+ holderTextGroup.moveTo(null, null, 1);
+ sceneGraph.root.add(holderTextGroup);
+
+ var tpdata = holderTextGroup.textPositionData = stagingRenderer(sceneGraph);
+ if (!tpdata) {
+ throw 'Holder: staging fallback not supported yet.';
+ }
+ holderTextGroup.properties.leading = tpdata.boundingBox.height;
+
+ var textNode = null;
+ var line = null;
+
+ function finalizeLine(parent, line, width, height) {
+ line.width = width;
+ line.height = height;
+ parent.width = Math.max(parent.width, line.width);
+ parent.height += line.height;
+ }
+
+ if (tpdata.lineCount > 1) {
+ var offsetX = 0;
+ var offsetY = 0;
+ var lineIndex = 0;
+ var lineKey;
+ line = new Shape.Group('line' + lineIndex);
+
+ //Double margin so that left/right-aligned next is not flush with edge of image
+ if (scene.align === 'left' || scene.align === 'right') {
+ maxLineWidth = scene.width * (1 - (1 - lineWrap) * 2);
+ }
+
+ for (var i = 0; i < tpdata.words.length; i++) {
+ var word = tpdata.words[i];
+ textNode = new Shape.Text(word.text);
+ var newline = word.text == '\\n';
+ if (!scene.noWrap && (offsetX + word.width >= maxLineWidth || newline === true)) {
+ finalizeLine(holderTextGroup, line, offsetX, holderTextGroup.properties.leading);
+ holderTextGroup.add(line);
+ offsetX = 0;
+ offsetY += holderTextGroup.properties.leading;
+ lineIndex += 1;
+ line = new Shape.Group('line' + lineIndex);
+ line.y = offsetY;
+ }
+ if (newline === true) {
+ continue;
+ }
+ textNode.moveTo(offsetX, 0);
+ offsetX += tpdata.spaceWidth + word.width;
+ line.add(textNode);
+ }
+
+ finalizeLine(holderTextGroup, line, offsetX, holderTextGroup.properties.leading);
+ holderTextGroup.add(line);
+
+ if (scene.align === 'left') {
+ holderTextGroup.moveTo(scene.width - sceneMargin, null, null);
+ } else if (scene.align === 'right') {
+ for (lineKey in holderTextGroup.children) {
+ line = holderTextGroup.children[lineKey];
+ line.moveTo(scene.width - line.width, null, null);
+ }
+
+ holderTextGroup.moveTo(0 - (scene.width - sceneMargin), null, null);
+ } else {
+ for (lineKey in holderTextGroup.children) {
+ line = holderTextGroup.children[lineKey];
+ line.moveTo((holderTextGroup.width - line.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo((scene.width - holderTextGroup.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo(null, (scene.height - holderTextGroup.height) / 2, null);
+
+ //If the text exceeds vertical space, move it down so the first line is visible
+ if ((scene.height - holderTextGroup.height) / 2 < 0) {
+ holderTextGroup.moveTo(null, 0, null);
+ }
+ } else {
+ textNode = new Shape.Text(scene.text);
+ line = new Shape.Group('line0');
+ line.add(textNode);
+ holderTextGroup.add(line);
+
+ if (scene.align === 'left') {
+ holderTextGroup.moveTo(scene.width - sceneMargin, null, null);
+ } else if (scene.align === 'right') {
+ holderTextGroup.moveTo(0 - (scene.width - sceneMargin), null, null);
+ } else {
+ holderTextGroup.moveTo((scene.width - tpdata.boundingBox.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo(null, (scene.height - tpdata.boundingBox.height) / 2, null);
+ }
+
+ //todo: renderlist
+ return sceneGraph;
+}
+
+/**
+ * Adaptive text sizing function
+ *
+ * @private
+ * @param width Parent width
+ * @param height Parent height
+ * @param fontSize Requested text size
+ * @param scale Proportional scale of text
+ */
+function textSize(width, height, fontSize, scale) {
+ var stageWidth = parseInt(width, 10);
+ var stageHeight = parseInt(height, 10);
+
+ var bigSide = Math.max(stageWidth, stageHeight);
+ var smallSide = Math.min(stageWidth, stageHeight);
+
+ var newHeight = 0.8 * Math.min(smallSide, bigSide * scale);
+ return Math.round(Math.max(fontSize, newHeight));
+}
+
+/**
+ * Iterates over resizable (fluid or auto) placeholders and renders them
+ *
+ * @private
+ * @param element Optional element selector, specified only if a specific element needs to be re-rendered
+ */
+function updateResizableElements(element) {
+ var images;
+ if (element == null || element.nodeType == null) {
+ images = App.vars.resizableImages;
+ } else {
+ images = [element];
+ }
+ for (var i = 0, l = images.length; i < l; i++) {
+ var el = images[i];
+ if (el.holderData) {
+ var flags = el.holderData.flags;
+ var dimensions = dimensionCheck(el);
+ if (dimensions) {
+ if (!el.holderData.resizeUpdate) {
+ continue;
+ }
+
+ if (flags.fluid && flags.auto) {
+ var fluidConfig = el.holderData.fluidConfig;
+ switch (fluidConfig.mode) {
+ case 'width':
+ dimensions.height = dimensions.width / fluidConfig.ratio;
+ break;
+ case 'height':
+ dimensions.width = dimensions.height * fluidConfig.ratio;
+ break;
+ }
+ }
+
+ var settings = {
+ mode: 'image',
+ holderSettings: {
+ dimensions: dimensions,
+ theme: flags.theme,
+ flags: flags
+ },
+ el: el,
+ engineSettings: el.holderData.engineSettings
+ };
+
+ if (flags.textmode == 'exact') {
+ flags.exactDimensions = dimensions;
+ settings.holderSettings.dimensions = flags.dimensions;
+ }
+
+ render(settings);
+ } else {
+ setInvisible(el);
+ }
+ }
+ }
+}
+
+/**
+ * Sets up aspect ratio metadata for fluid placeholders, in order to preserve proportions when resizing
+ *
+ * @private
+ * @param el Image DOM element
+ */
+function setInitialDimensions(el) {
+ if (el.holderData) {
+ var dimensions = dimensionCheck(el);
+ if (dimensions) {
+ var flags = el.holderData.flags;
+
+ var fluidConfig = {
+ fluidHeight: flags.dimensions.height.slice(-1) == '%',
+ fluidWidth: flags.dimensions.width.slice(-1) == '%',
+ mode: null,
+ initialDimensions: dimensions
+ };
+
+ if (fluidConfig.fluidWidth && !fluidConfig.fluidHeight) {
+ fluidConfig.mode = 'width';
+ fluidConfig.ratio = fluidConfig.initialDimensions.width / parseFloat(flags.dimensions.height);
+ } else if (!fluidConfig.fluidWidth && fluidConfig.fluidHeight) {
+ fluidConfig.mode = 'height';
+ fluidConfig.ratio = parseFloat(flags.dimensions.width) / fluidConfig.initialDimensions.height;
+ }
+
+ el.holderData.fluidConfig = fluidConfig;
+ } else {
+ setInvisible(el);
+ }
+ }
+}
+
+/**
+ * Iterates through all current invisible images, and if they're visible, renders them and removes them from further checks. Runs every animation frame.
+ *
+ * @private
+ */
+function visibilityCheck() {
+ var renderableImages = [];
+ var keys = Object.keys(App.vars.invisibleImages);
+ var el;
+
+ keys.forEach(function (key) {
+ el = App.vars.invisibleImages[key];
+ if (dimensionCheck(el) && el.nodeName.toLowerCase() == 'img') {
+ renderableImages.push(el);
+ delete App.vars.invisibleImages[key];
+ }
+ });
+
+ if (renderableImages.length) {
+ Holder.run({
+ images: renderableImages
+ });
+ }
+
+ // Done to prevent 100% CPU usage via aggressive calling of requestAnimationFrame
+ setTimeout(function () {
+ global.requestAnimationFrame(visibilityCheck);
+ }, 10);
+}
+
+/**
+ * Starts checking for invisible placeholders if not doing so yet. Does nothing otherwise.
+ *
+ * @private
+ */
+function startVisibilityCheck() {
+ if (!App.vars.visibilityCheckStarted) {
+ global.requestAnimationFrame(visibilityCheck);
+ App.vars.visibilityCheckStarted = true;
+ }
+}
+
+/**
+ * Sets a unique ID for an image detected to be invisible and adds it to the map of invisible images checked by visibilityCheck
+ *
+ * @private
+ * @param el Invisible DOM element
+ */
+function setInvisible(el) {
+ if (!el.holderData.invisibleId) {
+ App.vars.invisibleId += 1;
+ App.vars.invisibleImages['i' + App.vars.invisibleId] = el;
+ el.holderData.invisibleId = App.vars.invisibleId;
+ }
+}
+
+//todo: see if possible to convert stagingRenderer to use HTML only
+var stagingRenderer = (function() {
+ var svg = null,
+ stagingText = null,
+ stagingTextNode = null;
+ return function(graph) {
+ var rootNode = graph.root;
+ if (App.setup.supportsSVG) {
+ var firstTimeSetup = false;
+ var tnode = function(text) {
+ return document.createTextNode(text);
+ };
+ if (svg == null || svg.parentNode !== document.body) {
+ firstTimeSetup = true;
+ }
+
+ svg = SVG.initSVG(svg, rootNode.properties.width, rootNode.properties.height);
+ //Show staging element before staging
+ svg.style.display = 'block';
+
+ if (firstTimeSetup) {
+ stagingText = DOM.newEl('text', SVG_NS);
+ stagingTextNode = tnode(null);
+ DOM.setAttr(stagingText, {
+ x: 0
+ });
+ stagingText.appendChild(stagingTextNode);
+ svg.appendChild(stagingText);
+ document.body.appendChild(svg);
+ svg.style.visibility = 'hidden';
+ svg.style.position = 'absolute';
+ svg.style.top = '-100%';
+ svg.style.left = '-100%';
+ //todo: workaround for zero-dimension tag in Opera 12
+ //svg.setAttribute('width', 0);
+ //svg.setAttribute('height', 0);
+ }
+
+ var holderTextGroup = rootNode.children.holderTextGroup;
+ var htgProps = holderTextGroup.properties;
+ DOM.setAttr(stagingText, {
+ 'y': htgProps.font.size,
+ 'style': utils.cssProps({
+ 'font-weight': htgProps.font.weight,
+ 'font-size': htgProps.font.size + htgProps.font.units,
+ 'font-family': htgProps.font.family
+ })
+ });
+
+ //Unescape HTML entities to get approximately the right width
+ var txt = DOM.newEl('textarea');
+ txt.innerHTML = htgProps.text;
+ stagingTextNode.nodeValue = txt.value;
+
+ //Get bounding box for the whole string (total width and height)
+ var stagingTextBBox = stagingText.getBBox();
+
+ //Get line count and split the string into words
+ var lineCount = Math.ceil(stagingTextBBox.width / rootNode.properties.width);
+ var words = htgProps.text.split(' ');
+ var newlines = htgProps.text.match(/\\n/g);
+ lineCount += newlines == null ? 0 : newlines.length;
+
+ //Get bounding box for the string with spaces removed
+ stagingTextNode.nodeValue = htgProps.text.replace(/[ ]+/g, '');
+ var computedNoSpaceLength = stagingText.getComputedTextLength();
+
+ //Compute average space width
+ var diffLength = stagingTextBBox.width - computedNoSpaceLength;
+ var spaceWidth = Math.round(diffLength / Math.max(1, words.length - 1));
+
+ //Get widths for every word with space only if there is more than one line
+ var wordWidths = [];
+ if (lineCount > 1) {
+ stagingTextNode.nodeValue = '';
+ for (var i = 0; i < words.length; i++) {
+ if (words[i].length === 0) continue;
+ stagingTextNode.nodeValue = utils.decodeHtmlEntity(words[i]);
+ var bbox = stagingText.getBBox();
+ wordWidths.push({
+ text: words[i],
+ width: bbox.width
+ });
+ }
+ }
+
+ //Hide staging element after staging
+ svg.style.display = 'none';
+
+ return {
+ spaceWidth: spaceWidth,
+ lineCount: lineCount,
+ boundingBox: stagingTextBBox,
+ words: wordWidths
+ };
+ } else {
+ //todo: canvas fallback for measuring text on android 2.3
+ return false;
+ }
+ };
+})();
+
+//Helpers
+
+/**
+ * Prevents a function from being called too often, waits until a timer elapses to call it again
+ *
+ * @param fn Function to call
+ */
+function debounce(fn) {
+ if (!App.vars.debounceTimer) fn.call(this);
+ if (App.vars.debounceTimer) global.clearTimeout(App.vars.debounceTimer);
+ App.vars.debounceTimer = global.setTimeout(function() {
+ App.vars.debounceTimer = null;
+ fn.call(this);
+ }, App.setup.debounce);
+}
+
+/**
+ * Holder-specific resize/orientation change callback, debounced to prevent excessive execution
+ */
+function resizeEvent() {
+ debounce(function() {
+ updateResizableElements(null);
+ });
+}
+
+//Set up flags
+
+for (var flag in App.flags) {
+ if (!App.flags.hasOwnProperty(flag)) continue;
+ App.flags[flag].match = function(val) {
+ return val.match(this.regex);
+ };
+}
+
+//Properties set once on setup
+
+App.setup = {
+ renderer: 'html',
+ debounce: 100,
+ ratio: 1,
+ supportsCanvas: false,
+ supportsSVG: false,
+ lineWrapRatio: 0.9,
+ dataAttr: 'data-src',
+ renderers: ['html', 'canvas', 'svg']
+};
+
+//Properties modified during runtime
+
+App.vars = {
+ preempted: false,
+ resizableImages: [],
+ invisibleImages: {},
+ invisibleId: 0,
+ visibilityCheckStarted: false,
+ debounceTimer: null,
+ cache: {}
+};
+
+//Pre-flight
+
+(function() {
+ var canvas = DOM.newEl('canvas');
+
+ if (canvas.getContext) {
+ if (canvas.toDataURL('image/png').indexOf('data:image/png') != -1) {
+ App.setup.renderer = 'canvas';
+ App.setup.supportsCanvas = true;
+ }
+ }
+
+ if (!!document.createElementNS && !!document.createElementNS(SVG_NS, 'svg').createSVGRect) {
+ App.setup.renderer = 'svg';
+ App.setup.supportsSVG = true;
+ }
+})();
+
+//Starts checking for invisible placeholders
+startVisibilityCheck();
+
+if (onDomReady) {
+ onDomReady(function() {
+ if (!App.vars.preempted) {
+ Holder.run();
+ }
+ if (global.addEventListener) {
+ global.addEventListener('resize', resizeEvent, false);
+ global.addEventListener('orientationchange', resizeEvent, false);
+ } else {
+ global.attachEvent('onresize', resizeEvent);
+ }
+
+ if (typeof global.Turbolinks == 'object') {
+ global.document.addEventListener('page:change', function() {
+ Holder.run();
+ });
+ }
+ });
+}
+
+module.exports = Holder;
diff --git a/vendor/assets/javascripts/holderjs/src/lib/renderers/canvas.js b/vendor/assets/javascripts/holderjs/src/lib/renderers/canvas.js
new file mode 100644
index 000000000..730d41c68
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/renderers/canvas.js
@@ -0,0 +1,64 @@
+var DOM = require('../dom');
+var utils = require('../utils');
+
+module.exports = (function() {
+ var canvas = DOM.newEl('canvas');
+ var ctx = null;
+
+ return function(sceneGraph) {
+ if (ctx == null) {
+ ctx = canvas.getContext('2d');
+ }
+
+ var dpr = utils.canvasRatio();
+ var root = sceneGraph.root;
+ canvas.width = dpr * root.properties.width;
+ canvas.height = dpr * root.properties.height ;
+ ctx.textBaseline = 'middle';
+
+ var bg = root.children.holderBg;
+ var bgWidth = dpr * bg.width;
+ var bgHeight = dpr * bg.height;
+ //todo: parametrize outline width (e.g. in scene object)
+ var outlineWidth = 2;
+ var outlineOffsetWidth = outlineWidth / 2;
+
+ ctx.fillStyle = bg.properties.fill;
+ ctx.fillRect(0, 0, bgWidth, bgHeight);
+
+ if (bg.properties.outline) {
+ //todo: abstract this into a method
+ ctx.strokeStyle = bg.properties.outline.fill;
+ ctx.lineWidth = bg.properties.outline.width;
+ ctx.moveTo(outlineOffsetWidth, outlineOffsetWidth);
+ // TL, TR, BR, BL
+ ctx.lineTo(bgWidth - outlineOffsetWidth, outlineOffsetWidth);
+ ctx.lineTo(bgWidth - outlineOffsetWidth, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(outlineOffsetWidth, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(outlineOffsetWidth, outlineOffsetWidth);
+ // Diagonals
+ ctx.moveTo(0, outlineOffsetWidth);
+ ctx.lineTo(bgWidth, bgHeight - outlineOffsetWidth);
+ ctx.moveTo(0, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(bgWidth, outlineOffsetWidth);
+ ctx.stroke();
+ }
+
+ var textGroup = root.children.holderTextGroup;
+ ctx.font = textGroup.properties.font.weight + ' ' + (dpr * textGroup.properties.font.size) + textGroup.properties.font.units + ' ' + textGroup.properties.font.family + ', monospace';
+ ctx.fillStyle = textGroup.properties.fill;
+
+ for (var lineKey in textGroup.children) {
+ var line = textGroup.children[lineKey];
+ for (var wordKey in line.children) {
+ var word = line.children[wordKey];
+ var x = dpr * (textGroup.x + line.x + word.x);
+ var y = dpr * (textGroup.y + line.y + word.y + (textGroup.properties.leading / 2));
+
+ ctx.fillText(word.properties.text, x, y);
+ }
+ }
+
+ return canvas.toDataURL('image/png');
+ };
+})();
\ No newline at end of file
diff --git a/vendor/assets/javascripts/holderjs/src/lib/renderers/svg-dom.js b/vendor/assets/javascripts/holderjs/src/lib/renderers/svg-dom.js
new file mode 100644
index 000000000..5efc99b19
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/renderers/svg-dom.js
@@ -0,0 +1,122 @@
+var SVG = require('../svg');
+var DOM = require('../dom');
+var utils = require('../utils');
+var constants = require('../constants');
+
+var SVG_NS = constants.svg_ns;
+
+var generatorComment = '\n' +
+ 'Created with Holder.js ' + constants.version + '.\n' +
+ 'Learn more at http://holderjs.com\n' +
+ '(c) 2012-2015 Ivan Malopinsky - http://imsky.co\n';
+
+module.exports = (function() {
+ //Prevent IE <9 from initializing SVG renderer
+ if (!global.XMLSerializer) return;
+ var xml = DOM.createXML();
+ var svg = SVG.initSVG(null, 0, 0);
+ var bgEl = DOM.newEl('rect', SVG_NS);
+ svg.appendChild(bgEl);
+
+ //todo: create a reusable pool for textNodes, resize if more words present
+
+ return function(sceneGraph, renderSettings) {
+ var root = sceneGraph.root;
+
+ SVG.initSVG(svg, root.properties.width, root.properties.height);
+
+ var groups = svg.querySelectorAll('g');
+
+ for (var i = 0; i < groups.length; i++) {
+ groups[i].parentNode.removeChild(groups[i]);
+ }
+
+ var holderURL = renderSettings.holderSettings.flags.holderURL;
+ var holderId = 'holder_' + (Number(new Date()) + 32768 + (0 | Math.random() * 32768)).toString(16);
+ var sceneGroupEl = DOM.newEl('g', SVG_NS);
+ var textGroup = root.children.holderTextGroup;
+ var tgProps = textGroup.properties;
+ var textGroupEl = DOM.newEl('g', SVG_NS);
+ var tpdata = textGroup.textPositionData;
+ var textCSSRule = '#' + holderId + ' text { ' +
+ utils.cssProps({
+ 'fill': tgProps.fill,
+ 'font-weight': tgProps.font.weight,
+ 'font-family': tgProps.font.family + ', monospace',
+ 'font-size': tgProps.font.size + tgProps.font.units
+ }) + ' } ';
+ var commentNode = xml.createComment('\n' + 'Source URL: ' + holderURL + generatorComment);
+ var holderCSS = xml.createCDATASection(textCSSRule);
+ var styleEl = svg.querySelector('style');
+ var bg = root.children.holderBg;
+
+ DOM.setAttr(sceneGroupEl, {
+ id: holderId
+ });
+
+ svg.insertBefore(commentNode, svg.firstChild);
+ styleEl.appendChild(holderCSS);
+
+ sceneGroupEl.appendChild(bgEl);
+
+ //todo: abstract this into a cross-browser SVG outline method
+ if (bg.properties.outline) {
+ var outlineEl = DOM.newEl('path', SVG_NS);
+ var outlineWidth = bg.properties.outline.width;
+ var outlineOffsetWidth = outlineWidth / 2;
+ DOM.setAttr(outlineEl, {
+ 'd': [
+ 'M', outlineOffsetWidth, outlineOffsetWidth,
+ 'H', bg.width - outlineOffsetWidth,
+ 'V', bg.height - outlineOffsetWidth,
+ 'H', outlineOffsetWidth,
+ 'V', 0,
+ 'M', 0, outlineOffsetWidth,
+ 'L', bg.width, bg.height - outlineOffsetWidth,
+ 'M', 0, bg.height - outlineOffsetWidth,
+ 'L', bg.width, outlineOffsetWidth
+ ].join(' '),
+ 'stroke-width': bg.properties.outline.width,
+ 'stroke': bg.properties.outline.fill,
+ 'fill': 'none'
+ });
+ sceneGroupEl.appendChild(outlineEl);
+ }
+
+ sceneGroupEl.appendChild(textGroupEl);
+ svg.appendChild(sceneGroupEl);
+
+ DOM.setAttr(bgEl, {
+ 'width': bg.width,
+ 'height': bg.height,
+ 'fill': bg.properties.fill
+ });
+
+ textGroup.y += tpdata.boundingBox.height * 0.8;
+
+ for (var lineKey in textGroup.children) {
+ var line = textGroup.children[lineKey];
+ for (var wordKey in line.children) {
+ var word = line.children[wordKey];
+ var x = textGroup.x + line.x + word.x;
+ var y = textGroup.y + line.y + word.y;
+
+ var textEl = DOM.newEl('text', SVG_NS);
+ var textNode = document.createTextNode(null);
+
+ DOM.setAttr(textEl, {
+ 'x': x,
+ 'y': y
+ });
+
+ textNode.nodeValue = word.properties.text;
+ textEl.appendChild(textNode);
+ textGroupEl.appendChild(textEl);
+ }
+ }
+
+ //todo: factor the background check up the chain, perhaps only return reference
+ var svgString = SVG.svgStringToDataURI(SVG.serializeSVG(svg, renderSettings.engineSettings), renderSettings.mode === 'background');
+ return svgString;
+ };
+})();
\ No newline at end of file
diff --git a/vendor/assets/javascripts/holderjs/src/lib/renderers/svg-text.js b/vendor/assets/javascripts/holderjs/src/lib/renderers/svg-text.js
new file mode 100644
index 000000000..85bc5d7a6
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/renderers/svg-text.js
@@ -0,0 +1,157 @@
+var shaven = require('shaven');
+
+var SVG = require('../svg');
+var constants = require('../constants');
+var utils = require('../utils');
+
+var SVG_NS = constants.svg_ns;
+
+var templates = {
+ 'element': function (options) {
+ var tag = options.tag;
+ var content = options.content || '';
+ delete options.tag;
+ delete options.content;
+ return [tag, content, options];
+ }
+};
+
+//todo: deprecate tag arg, infer tag from shape object
+function convertShape (shape, tag) {
+ return templates.element({
+ 'tag': tag,
+ 'width': shape.width,
+ 'height': shape.height,
+ 'fill': shape.properties.fill
+ });
+}
+
+function textCss (properties) {
+ return utils.cssProps({
+ 'fill': properties.fill,
+ 'font-weight': properties.font.weight,
+ 'font-family': properties.font.family + ', monospace',
+ 'font-size': properties.font.size + properties.font.units
+ });
+}
+
+function outlinePath (bgWidth, bgHeight, outlineWidth) {
+ var outlineOffsetWidth = outlineWidth / 2;
+
+ return [
+ 'M', outlineOffsetWidth, outlineOffsetWidth,
+ 'H', bgWidth - outlineOffsetWidth,
+ 'V', bgHeight - outlineOffsetWidth,
+ 'H', outlineOffsetWidth,
+ 'V', 0,
+ 'M', 0, outlineOffsetWidth,
+ 'L', bgWidth, bgHeight - outlineOffsetWidth,
+ 'M', 0, bgHeight - outlineOffsetWidth,
+ 'L', bgWidth, outlineOffsetWidth
+ ].join(' ');
+}
+
+module.exports = function (sceneGraph, renderSettings) {
+ var engineSettings = renderSettings.engineSettings;
+ var stylesheets = engineSettings.stylesheets;
+ var stylesheetXml = stylesheets.map(function (stylesheet) {
+ return '';
+ }).join('\n');
+
+ var holderId = 'holder_' + Number(new Date()).toString(16);
+
+ var root = sceneGraph.root;
+ var textGroup = root.children.holderTextGroup;
+
+ var css = '#' + holderId + ' text { ' + textCss(textGroup.properties) + ' } ';
+
+ // push text down to be equally vertically aligned with canvas renderer
+ textGroup.y += textGroup.textPositionData.boundingBox.height * 0.8;
+
+ var wordTags = [];
+
+ Object.keys(textGroup.children).forEach(function (lineKey) {
+ var line = textGroup.children[lineKey];
+
+ Object.keys(line.children).forEach(function (wordKey) {
+ var word = line.children[wordKey];
+ var x = textGroup.x + line.x + word.x;
+ var y = textGroup.y + line.y + word.y;
+ var wordTag = templates.element({
+ 'tag': 'text',
+ 'content': word.properties.text,
+ 'x': x,
+ 'y': y
+ });
+
+ wordTags.push(wordTag);
+ });
+ });
+
+ var text = templates.element({
+ 'tag': 'g',
+ 'content': wordTags
+ });
+
+ var outline = null;
+
+ if (root.children.holderBg.properties.outline) {
+ var outlineProperties = root.children.holderBg.properties.outline;
+ outline = templates.element({
+ 'tag': 'path',
+ 'd': outlinePath(root.children.holderBg.width, root.children.holderBg.height, outlineProperties.width),
+ 'stroke-width': outlineProperties.width,
+ 'stroke': outlineProperties.fill,
+ 'fill': 'none'
+ });
+ }
+
+ var bg = convertShape(root.children.holderBg, 'rect');
+
+ var sceneContent = [];
+
+ sceneContent.push(bg);
+ if (outlineProperties) {
+ sceneContent.push(outline);
+ }
+ sceneContent.push(text);
+
+ var scene = templates.element({
+ 'tag': 'g',
+ 'id': holderId,
+ 'content': sceneContent
+ });
+
+ var style = templates.element({
+ 'tag': 'style',
+ //todo: figure out how to add CDATA directive
+ 'content': css,
+ 'type': 'text/css'
+ });
+
+ var defs = templates.element({
+ 'tag': 'defs',
+ 'content': style
+ });
+
+ var svg = templates.element({
+ 'tag': 'svg',
+ 'content': [defs, scene],
+ 'width': root.properties.width,
+ 'height': root.properties.height,
+ 'xmlns': SVG_NS,
+ 'viewBox': [0, 0, root.properties.width, root.properties.height].join(' '),
+ 'preserveAspectRatio': 'none'
+ });
+
+ var output = shaven(svg);
+
+ if (/\&(x)?#[0-9A-Fa-f]/.test(output[0])) {
+ output[0] = output[0].replace(/&#/gm, '');
+ }
+
+ output = stylesheetXml + output[0];
+
+ var svgString = SVG.svgStringToDataURI(output, renderSettings.mode === 'background');
+ return svgString;
+};
\ No newline at end of file
diff --git a/vendor/assets/javascripts/holderjs/src/lib/scenegraph.js b/vendor/assets/javascripts/holderjs/src/lib/scenegraph.js
new file mode 100644
index 000000000..dd5484587
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/scenegraph.js
@@ -0,0 +1,105 @@
+var SceneGraph = function(sceneProperties) {
+ var nodeCount = 1;
+
+ //todo: move merge to helpers section
+ function merge(parent, child) {
+ for (var prop in child) {
+ parent[prop] = child[prop];
+ }
+ return parent;
+ }
+
+ var SceneNode = function(name) {
+ nodeCount++;
+ this.parent = null;
+ this.children = {};
+ this.id = nodeCount;
+ this.name = 'n' + nodeCount;
+ if (typeof name !== 'undefined') {
+ this.name = name;
+ }
+ this.x = this.y = this.z = 0;
+ this.width = this.height = 0;
+ };
+
+ SceneNode.prototype.resize = function(width, height) {
+ if (width != null) {
+ this.width = width;
+ }
+ if (height != null) {
+ this.height = height;
+ }
+ };
+
+ SceneNode.prototype.moveTo = function(x, y, z) {
+ this.x = x != null ? x : this.x;
+ this.y = y != null ? y : this.y;
+ this.z = z != null ? z : this.z;
+ };
+
+ SceneNode.prototype.add = function(child) {
+ var name = child.name;
+ if (typeof this.children[name] === 'undefined') {
+ this.children[name] = child;
+ child.parent = this;
+ } else {
+ throw 'SceneGraph: child already exists: ' + name;
+ }
+ };
+
+ var RootNode = function() {
+ SceneNode.call(this, 'root');
+ this.properties = sceneProperties;
+ };
+
+ RootNode.prototype = new SceneNode();
+
+ var Shape = function(name, props) {
+ SceneNode.call(this, name);
+ this.properties = {
+ 'fill': '#000000'
+ };
+ if (typeof props !== 'undefined') {
+ merge(this.properties, props);
+ } else if (typeof name !== 'undefined' && typeof name !== 'string') {
+ throw 'SceneGraph: invalid node name';
+ }
+ };
+
+ Shape.prototype = new SceneNode();
+
+ var Group = function() {
+ Shape.apply(this, arguments);
+ this.type = 'group';
+ };
+
+ Group.prototype = new Shape();
+
+ var Rect = function() {
+ Shape.apply(this, arguments);
+ this.type = 'rect';
+ };
+
+ Rect.prototype = new Shape();
+
+ var Text = function(text) {
+ Shape.call(this);
+ this.type = 'text';
+ this.properties.text = text;
+ };
+
+ Text.prototype = new Shape();
+
+ var root = new RootNode();
+
+ this.Shape = {
+ 'Rect': Rect,
+ 'Text': Text,
+ 'Group': Group
+ };
+
+ this.root = root;
+ return this;
+};
+
+module.exports = SceneGraph;
diff --git a/vendor/assets/javascripts/holderjs/src/lib/svg.js b/vendor/assets/javascripts/holderjs/src/lib/svg.js
new file mode 100644
index 000000000..05f5633da
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/svg.js
@@ -0,0 +1,109 @@
+var DOM = require('./dom');
+
+var SVG_NS = 'http://www.w3.org/2000/svg';
+var NODE_TYPE_COMMENT = 8;
+
+/**
+ * Generic SVG element creation function
+ *
+ * @param svg SVG context, set to null if new
+ * @param width Document width
+ * @param height Document height
+ */
+exports.initSVG = function(svg, width, height) {
+ var defs, style, initialize = false;
+
+ if (svg && svg.querySelector) {
+ style = svg.querySelector('style');
+ if (style === null) {
+ initialize = true;
+ }
+ } else {
+ svg = DOM.newEl('svg', SVG_NS);
+ initialize = true;
+ }
+
+ if (initialize) {
+ defs = DOM.newEl('defs', SVG_NS);
+ style = DOM.newEl('style', SVG_NS);
+ DOM.setAttr(style, {
+ 'type': 'text/css'
+ });
+ defs.appendChild(style);
+ svg.appendChild(defs);
+ }
+
+ //IE throws an exception if this is set and Chrome requires it to be set
+ if (svg.webkitMatchesSelector) {
+ svg.setAttribute('xmlns', SVG_NS);
+ }
+
+ //Remove comment nodes
+ for (var i = 0; i < svg.childNodes.length; i++) {
+ if (svg.childNodes[i].nodeType === NODE_TYPE_COMMENT) {
+ svg.removeChild(svg.childNodes[i]);
+ }
+ }
+
+ //Remove CSS
+ while (style.childNodes.length) {
+ style.removeChild(style.childNodes[0]);
+ }
+
+ DOM.setAttr(svg, {
+ 'width': width,
+ 'height': height,
+ 'viewBox': '0 0 ' + width + ' ' + height,
+ 'preserveAspectRatio': 'none'
+ });
+
+ return svg;
+};
+
+/**
+ * Converts serialized SVG to a string suitable for data URI use
+ * @param svgString Serialized SVG string
+ * @param [base64] Use base64 encoding for data URI
+ */
+exports.svgStringToDataURI = function() {
+ var rawPrefix = 'data:image/svg+xml;charset=UTF-8,';
+ var base64Prefix = 'data:image/svg+xml;charset=UTF-8;base64,';
+
+ return function(svgString, base64) {
+ if (base64) {
+ return base64Prefix + btoa(global.unescape(encodeURIComponent(svgString)));
+ } else {
+ return rawPrefix + encodeURIComponent(svgString);
+ }
+ };
+}();
+
+/**
+ * Returns serialized SVG with XML processing instructions
+ *
+ * @param svg SVG context
+ * @param stylesheets CSS stylesheets to include
+ */
+exports.serializeSVG = function(svg, engineSettings) {
+ if (!global.XMLSerializer) return;
+ var serializer = new XMLSerializer();
+ var svgCSS = '';
+ var stylesheets = engineSettings.stylesheets;
+
+ //External stylesheets: Processing Instruction method
+ if (engineSettings.svgXMLStylesheet) {
+ var xml = DOM.createXML();
+ //Add directives
+ for (var i = stylesheets.length - 1; i >= 0; i--) {
+ var csspi = xml.createProcessingInstruction('xml-stylesheet', 'href="' + stylesheets[i] + '" rel="stylesheet"');
+ xml.insertBefore(csspi, xml.firstChild);
+ }
+
+ xml.removeChild(xml.documentElement);
+ svgCSS = serializer.serializeToString(xml);
+ }
+
+ var svgText = serializer.serializeToString(svg);
+ svgText = svgText.replace(/\&(\#[0-9]{2,}\;)/g, '&$1');
+ return svgCSS + svgText;
+};
diff --git a/vendor/assets/javascripts/holderjs/src/lib/utils.js b/vendor/assets/javascripts/holderjs/src/lib/utils.js
new file mode 100644
index 000000000..84ae94d6e
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/utils.js
@@ -0,0 +1,173 @@
+/**
+ * Shallow object clone and merge
+ *
+ * @param a Object A
+ * @param b Object B
+ * @returns {Object} New object with all of A's properties, and all of B's properties, overwriting A's properties
+ */
+exports.extend = function(a, b) {
+ var c = {};
+ for (var x in a) {
+ if (a.hasOwnProperty(x)) {
+ c[x] = a[x];
+ }
+ }
+ if (b != null) {
+ for (var y in b) {
+ if (b.hasOwnProperty(y)) {
+ c[y] = b[y];
+ }
+ }
+ }
+ return c;
+};
+
+/**
+ * Takes a k/v list of CSS properties and returns a rule
+ *
+ * @param props CSS properties object
+ */
+exports.cssProps = function(props) {
+ var ret = [];
+ for (var p in props) {
+ if (props.hasOwnProperty(p)) {
+ ret.push(p + ':' + props[p]);
+ }
+ }
+ return ret.join(';');
+};
+
+/**
+ * Encodes HTML entities in a string
+ *
+ * @param str Input string
+ */
+exports.encodeHtmlEntity = function(str) {
+ var buf = [];
+ var charCode = 0;
+ for (var i = str.length - 1; i >= 0; i--) {
+ charCode = str.charCodeAt(i);
+ if (charCode > 128) {
+ buf.unshift(['', charCode, ';'].join(''));
+ } else {
+ buf.unshift(str[i]);
+ }
+ }
+ return buf.join('');
+};
+
+/**
+ * Checks if an image exists
+ *
+ * @param src URL of image
+ * @param callback Callback to call once image status has been found
+ */
+exports.imageExists = function(src, callback) {
+ var image = new Image();
+ image.onerror = function() {
+ callback.call(this, false);
+ };
+ image.onload = function() {
+ callback.call(this, true);
+ };
+ image.src = src;
+};
+
+/**
+ * Decodes HTML entities in a string
+ *
+ * @param str Input string
+ */
+exports.decodeHtmlEntity = function(str) {
+ return str.replace(/(\d+);/g, function(match, dec) {
+ return String.fromCharCode(dec);
+ });
+};
+
+
+/**
+ * Returns an element's dimensions if it's visible, `false` otherwise.
+ *
+ * @param el DOM element
+ */
+exports.dimensionCheck = function(el) {
+ var dimensions = {
+ height: el.clientHeight,
+ width: el.clientWidth
+ };
+
+ if (dimensions.height && dimensions.width) {
+ return dimensions;
+ } else {
+ return false;
+ }
+};
+
+
+/**
+ * Returns true if value is truthy or if it is "semantically truthy"
+ * @param val
+ */
+exports.truthy = function(val) {
+ if (typeof val === 'string') {
+ return val === 'true' || val === 'yes' || val === '1' || val === 'on' || val === '✓';
+ }
+ return !!val;
+};
+
+/**
+ * Parses input into a well-formed CSS color
+ * @param val
+ */
+exports.parseColor = function(val) {
+ var hexre = /(^(?:#?)[0-9a-f]{6}$)|(^(?:#?)[0-9a-f]{3}$)/i;
+ var rgbre = /^rgb\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
+ var rgbare = /^rgba\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0\.\d{1,}|1)\)$/;
+
+ var match = val.match(hexre);
+ var retval;
+
+ if (match !== null) {
+ retval = match[1] || match[2];
+ if (retval[0] !== '#') {
+ return '#' + retval;
+ } else {
+ return retval;
+ }
+ }
+
+ match = val.match(rgbre);
+
+ if (match !== null) {
+ retval = 'rgb(' + match.slice(1).join(',') + ')';
+ return retval;
+ }
+
+ match = val.match(rgbare);
+
+ if (match !== null) {
+ retval = 'rgba(' + match.slice(1).join(',') + ')';
+ return retval;
+ }
+
+ return null;
+};
+
+/**
+ * Provides the correct scaling ratio for canvas drawing operations on HiDPI screens (e.g. Retina displays)
+ */
+exports.canvasRatio = function () {
+ var devicePixelRatio = 1;
+ var backingStoreRatio = 1;
+
+ if (global.document) {
+ var canvas = global.document.createElement('canvas');
+ if (canvas.getContext) {
+ var ctx = canvas.getContext('2d');
+ devicePixelRatio = global.devicePixelRatio || 1;
+ backingStoreRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
+ }
+ }
+
+ return devicePixelRatio / backingStoreRatio;
+};
\ No newline at end of file
diff --git a/vendor/assets/javascripts/holderjs/src/lib/vendor/ondomready.js b/vendor/assets/javascripts/holderjs/src/lib/vendor/ondomready.js
new file mode 100644
index 000000000..796a72933
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/vendor/ondomready.js
@@ -0,0 +1,155 @@
+/*!
+ * onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license
+ *
+ * Specially modified to work with Holder.js
+ */
+
+function _onDomReady(win) {
+ //Lazy loading fix for Firefox < 3.6
+ //http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html
+ if (document.readyState == null && document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", function DOMContentLoaded() {
+ document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
+ document.readyState = "complete";
+ }, false);
+ document.readyState = "loading";
+ }
+
+ var doc = win.document,
+ docElem = doc.documentElement,
+
+ LOAD = "load",
+ FALSE = false,
+ ONLOAD = "on"+LOAD,
+ COMPLETE = "complete",
+ READYSTATE = "readyState",
+ ATTACHEVENT = "attachEvent",
+ DETACHEVENT = "detachEvent",
+ ADDEVENTLISTENER = "addEventListener",
+ DOMCONTENTLOADED = "DOMContentLoaded",
+ ONREADYSTATECHANGE = "onreadystatechange",
+ REMOVEEVENTLISTENER = "removeEventListener",
+
+ // W3C Event model
+ w3c = ADDEVENTLISTENER in doc,
+ _top = FALSE,
+
+ // isReady: Is the DOM ready to be used? Set to true once it occurs.
+ isReady = FALSE,
+
+ // Callbacks pending execution until DOM is ready
+ callbacks = [];
+
+ // Handle when the DOM is ready
+ function ready( fn ) {
+ if ( !isReady ) {
+
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !doc.body ) {
+ return defer( ready );
+ }
+
+ // Remember that the DOM is ready
+ isReady = true;
+
+ // Execute all callbacks
+ while ( fn = callbacks.shift() ) {
+ defer( fn );
+ }
+ }
+ }
+
+ // The ready event handler
+ function completed( event ) {
+ // readyState === "complete" is good enough for us to call the dom ready in oldIE
+ if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {
+ detach();
+ ready();
+ }
+ }
+
+ // Clean-up method for dom ready events
+ function detach() {
+ if ( w3c ) {
+ doc[REMOVEEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );
+ win[REMOVEEVENTLISTENER]( LOAD, completed, FALSE );
+ } else {
+ doc[DETACHEVENT]( ONREADYSTATECHANGE, completed );
+ win[DETACHEVENT]( ONLOAD, completed );
+ }
+ }
+
+ // Defers a function, scheduling it to run after the current call stack has cleared.
+ function defer( fn, wait ) {
+ // Allow 0 to be passed
+ setTimeout( fn, +wait >= 0 ? wait : 1 );
+ }
+
+ // Attach the listeners:
+
+ // Catch cases where onDomReady is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( doc[READYSTATE] === COMPLETE ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ defer( ready );
+
+ // Standards-based browsers support DOMContentLoaded
+ } else if ( w3c ) {
+ // Use the handy event callback
+ doc[ADDEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );
+
+ // A fallback to window.onload, that will always work
+ win[ADDEVENTLISTENER]( LOAD, completed, FALSE );
+
+ // If IE event model is used
+ } else {
+ // Ensure firing before onload, maybe late but safe also for iframes
+ doc[ATTACHEVENT]( ONREADYSTATECHANGE, completed );
+
+ // A fallback to window.onload, that will always work
+ win[ATTACHEVENT]( ONLOAD, completed );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ try {
+ _top = win.frameElement == null && docElem;
+ } catch(e) {}
+
+ if ( _top && _top.doScroll ) {
+ (function doScrollCheck() {
+ if ( !isReady ) {
+ try {
+ // Use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ _top.doScroll("left");
+ } catch(e) {
+ return defer( doScrollCheck, 50 );
+ }
+
+ // detach all dom ready events
+ detach();
+
+ // and execute any waiting functions
+ ready();
+ }
+ })();
+ }
+ }
+
+ function onDomReady( fn ) {
+ // If DOM is ready, execute the function (async), otherwise wait
+ isReady ? defer( fn ) : callbacks.push( fn );
+ }
+
+ // Add version
+ onDomReady.version = "1.4.0";
+ // Add method to check if DOM is ready
+ onDomReady.isReady = function(){
+ return isReady;
+ };
+
+ return onDomReady;
+}
+
+module.exports = typeof window !== "undefined" && _onDomReady(window);
\ No newline at end of file
diff --git a/vendor/assets/javascripts/holderjs/src/lib/vendor/polyfills.js b/vendor/assets/javascripts/holderjs/src/lib/vendor/polyfills.js
new file mode 100644
index 000000000..3fe9efa62
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/vendor/polyfills.js
@@ -0,0 +1,234 @@
+(function (window) {
+ if (!window.document) return;
+ var document = window.document;
+
+ //https://github.com/inexorabletash/polyfill/blob/master/web.js
+ if (!document.querySelectorAll) {
+ document.querySelectorAll = function (selectors) {
+ var style = document.createElement('style'), elements = [], element;
+ document.documentElement.firstChild.appendChild(style);
+ document._qsa = [];
+
+ style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}';
+ window.scrollBy(0, 0);
+ style.parentNode.removeChild(style);
+
+ while (document._qsa.length) {
+ element = document._qsa.shift();
+ element.style.removeAttribute('x-qsa');
+ elements.push(element);
+ }
+ document._qsa = null;
+ return elements;
+ };
+ }
+
+ if (!document.querySelector) {
+ document.querySelector = function (selectors) {
+ var elements = document.querySelectorAll(selectors);
+ return (elements.length) ? elements[0] : null;
+ };
+ }
+
+ if (!document.getElementsByClassName) {
+ document.getElementsByClassName = function (classNames) {
+ classNames = String(classNames).replace(/^|\s+/g, '.');
+ return document.querySelectorAll(classNames);
+ };
+ }
+
+ //https://github.com/inexorabletash/polyfill
+ // ES5 15.2.3.14 Object.keys ( O )
+ // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys
+ if (!Object.keys) {
+ Object.keys = function (o) {
+ if (o !== Object(o)) { throw TypeError('Object.keys called on non-object'); }
+ var ret = [], p;
+ for (p in o) {
+ if (Object.prototype.hasOwnProperty.call(o, p)) {
+ ret.push(p);
+ }
+ }
+ return ret;
+ };
+ }
+
+ // ES5 15.4.4.18 Array.prototype.forEach ( callbackfn [ , thisArg ] )
+ // From https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach
+ if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function (fun /*, thisp */) {
+ if (this === void 0 || this === null) { throw TypeError(); }
+
+ var t = Object(this);
+ var len = t.length >>> 0;
+ if (typeof fun !== "function") { throw TypeError(); }
+
+ var thisp = arguments[1], i;
+ for (i = 0; i < len; i++) {
+ if (i in t) {
+ fun.call(thisp, t[i], i, t);
+ }
+ }
+ };
+ }
+
+ //https://github.com/inexorabletash/polyfill/blob/master/web.js
+ (function (global) {
+ var B64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+ global.atob = global.atob || function (input) {
+ input = String(input);
+ var position = 0,
+ output = [],
+ buffer = 0, bits = 0, n;
+
+ input = input.replace(/\s/g, '');
+ if ((input.length % 4) === 0) { input = input.replace(/=+$/, ''); }
+ if ((input.length % 4) === 1) { throw Error('InvalidCharacterError'); }
+ if (/[^+/0-9A-Za-z]/.test(input)) { throw Error('InvalidCharacterError'); }
+
+ while (position < input.length) {
+ n = B64_ALPHABET.indexOf(input.charAt(position));
+ buffer = (buffer << 6) | n;
+ bits += 6;
+
+ if (bits === 24) {
+ output.push(String.fromCharCode((buffer >> 16) & 0xFF));
+ output.push(String.fromCharCode((buffer >> 8) & 0xFF));
+ output.push(String.fromCharCode(buffer & 0xFF));
+ bits = 0;
+ buffer = 0;
+ }
+ position += 1;
+ }
+
+ if (bits === 12) {
+ buffer = buffer >> 4;
+ output.push(String.fromCharCode(buffer & 0xFF));
+ } else if (bits === 18) {
+ buffer = buffer >> 2;
+ output.push(String.fromCharCode((buffer >> 8) & 0xFF));
+ output.push(String.fromCharCode(buffer & 0xFF));
+ }
+
+ return output.join('');
+ };
+
+ global.btoa = global.btoa || function (input) {
+ input = String(input);
+ var position = 0,
+ out = [],
+ o1, o2, o3,
+ e1, e2, e3, e4;
+
+ if (/[^\x00-\xFF]/.test(input)) { throw Error('InvalidCharacterError'); }
+
+ while (position < input.length) {
+ o1 = input.charCodeAt(position++);
+ o2 = input.charCodeAt(position++);
+ o3 = input.charCodeAt(position++);
+
+ // 111111 112222 222233 333333
+ e1 = o1 >> 2;
+ e2 = ((o1 & 0x3) << 4) | (o2 >> 4);
+ e3 = ((o2 & 0xf) << 2) | (o3 >> 6);
+ e4 = o3 & 0x3f;
+
+ if (position === input.length + 2) {
+ e3 = 64; e4 = 64;
+ }
+ else if (position === input.length + 1) {
+ e4 = 64;
+ }
+
+ out.push(B64_ALPHABET.charAt(e1),
+ B64_ALPHABET.charAt(e2),
+ B64_ALPHABET.charAt(e3),
+ B64_ALPHABET.charAt(e4));
+ }
+
+ return out.join('');
+ };
+ }(window));
+
+ //https://gist.github.com/jimeh/332357
+ if (!Object.prototype.hasOwnProperty){
+ /*jshint -W001, -W103 */
+ Object.prototype.hasOwnProperty = function(prop) {
+ var proto = this.__proto__ || this.constructor.prototype;
+ return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
+ };
+ /*jshint +W001, +W103 */
+ }
+
+ // @license http://opensource.org/licenses/MIT
+ // copyright Paul Irish 2015
+
+
+ // Date.now() is supported everywhere except IE8. For IE8 we use the Date.now polyfill
+ // github.com/Financial-Times/polyfill-service/blob/master/polyfills/Date.now/polyfill.js
+ // as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values
+
+ // if you want values similar to what you'd get with real perf.now, place this towards the head of the page
+ // but in reality, you're just getting the delta between now() calls, so it's not terribly important where it's placed
+
+
+ (function(){
+
+ if ('performance' in window === false) {
+ window.performance = {};
+ }
+
+ Date.now = (Date.now || function () { // thanks IE8
+ return new Date().getTime();
+ });
+
+ if ('now' in window.performance === false){
+
+ var nowOffset = Date.now();
+
+ if (performance.timing && performance.timing.navigationStart){
+ nowOffset = performance.timing.navigationStart;
+ }
+
+ window.performance.now = function now(){
+ return Date.now() - nowOffset;
+ };
+ }
+
+ })();
+
+ //requestAnimationFrame polyfill for older Firefox/Chrome versions
+ if (!window.requestAnimationFrame) {
+ if (window.webkitRequestAnimationFrame && window.webkitCancelAnimationFrame) {
+ //https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/requestAnimationFrame/polyfill-webkit.js
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return webkitRequestAnimationFrame(function () {
+ callback(global.performance.now());
+ });
+ };
+
+ global.cancelAnimationFrame = global.webkitCancelAnimationFrame;
+ }(window));
+ } else if (window.mozRequestAnimationFrame && window.mozCancelAnimationFrame) {
+ //https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/requestAnimationFrame/polyfill-moz.js
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return mozRequestAnimationFrame(function () {
+ callback(global.performance.now());
+ });
+ };
+
+ global.cancelAnimationFrame = global.mozCancelAnimationFrame;
+ }(window));
+ } else {
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return global.setTimeout(callback, 1000 / 60);
+ };
+
+ global.cancelAnimationFrame = global.clearTimeout;
+ })(window);
+ }
+ }
+})(this);
diff --git a/vendor/assets/javascripts/holderjs/src/lib/vendor/querystring.js b/vendor/assets/javascripts/holderjs/src/lib/vendor/querystring.js
new file mode 100644
index 000000000..de5180965
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/lib/vendor/querystring.js
@@ -0,0 +1,102 @@
+//Modified version of component/querystring
+//Changes: updated dependencies, dot notation parsing, JSHint fixes
+//Fork at https://github.com/imsky/querystring
+
+/**
+ * Module dependencies.
+ */
+
+var encode = encodeURIComponent;
+var decode = decodeURIComponent;
+var trim = require('trim');
+var type = require('component-type');
+
+var arrayRegex = /(\w+)\[(\d+)\]/;
+var objectRegex = /\w+\.\w+/;
+
+/**
+ * Parse the given query `str`.
+ *
+ * @param {String} str
+ * @return {Object}
+ * @api public
+ */
+
+exports.parse = function(str){
+ if ('string' !== typeof str) return {};
+
+ str = trim(str);
+ if ('' === str) return {};
+ if ('?' === str.charAt(0)) str = str.slice(1);
+
+ var obj = {};
+ var pairs = str.split('&');
+ for (var i = 0; i < pairs.length; i++) {
+ var parts = pairs[i].split('=');
+ var key = decode(parts[0]);
+ var m, ctx, prop;
+
+ if (m = arrayRegex.exec(key)) {
+ obj[m[1]] = obj[m[1]] || [];
+ obj[m[1]][m[2]] = decode(parts[1]);
+ continue;
+ }
+
+ if (m = objectRegex.test(key)) {
+ m = key.split('.');
+ ctx = obj;
+
+ while (m.length) {
+ prop = m.shift();
+
+ if (!prop.length) continue;
+
+ if (!ctx[prop]) {
+ ctx[prop] = {};
+ } else if (ctx[prop] && typeof ctx[prop] !== 'object') {
+ break;
+ }
+
+ if (!m.length) {
+ ctx[prop] = decode(parts[1]);
+ }
+
+ ctx = ctx[prop];
+ }
+
+ continue;
+ }
+
+ obj[parts[0]] = null == parts[1] ? '' : decode(parts[1]);
+ }
+
+ return obj;
+};
+
+/**
+ * Stringify the given `obj`.
+ *
+ * @param {Object} obj
+ * @return {String}
+ * @api public
+ */
+
+exports.stringify = function(obj){
+ if (!obj) return '';
+ var pairs = [];
+
+ for (var key in obj) {
+ var value = obj[key];
+
+ if ('array' == type(value)) {
+ for (var i = 0; i < value.length; ++i) {
+ pairs.push(encode(key + '[' + i + ']') + '=' + encode(value[i]));
+ }
+ continue;
+ }
+
+ pairs.push(encode(key) + '=' + encode(obj[key]));
+ }
+
+ return pairs.join('&');
+};
diff --git a/vendor/assets/javascripts/holderjs/src/meteor/package.js b/vendor/assets/javascripts/holderjs/src/meteor/package.js
new file mode 100644
index 000000000..d5d526bf7
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/meteor/package.js
@@ -0,0 +1,12 @@
+Package.describe({
+ summary: '%summary%',
+ version: '%version%',
+ name: 'imsky:holder',
+ git: 'https://github.com/imsky/holder',
+});
+
+Package.onUse(function(api) {
+ api.versionsFrom('0.9.0');
+ api.export('Holder', 'client');
+ api.addFiles('holder.js', 'client');
+});
diff --git a/vendor/assets/javascripts/holderjs/src/meteor/shim.js b/vendor/assets/javascripts/holderjs/src/meteor/shim.js
new file mode 100644
index 000000000..8193793de
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/src/meteor/shim.js
@@ -0,0 +1,5 @@
+(function(ctx, isMeteorPackage) {
+ if (isMeteorPackage) {
+ Holder = ctx.Holder;
+ }
+})(this, typeof Meteor !== 'undefined' && typeof Package !== 'undefined');
diff --git a/vendor/assets/javascripts/holderjs/test/holder.js b/vendor/assets/javascripts/holderjs/test/holder.js
new file mode 100644
index 000000000..bd508edf8
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/test/holder.js
@@ -0,0 +1,3050 @@
+/*!
+
+Holder - client side image placeholders
+Version 2.9.3+5jpuk
+© 2016 Ivan Malopinsky - http://imsky.co
+
+Site: http://holderjs.com
+Issues: https://github.com/imsky/holder/issues
+License: MIT
+
+*/
+(function (window) {
+ if (!window.document) return;
+ var document = window.document;
+
+ //https://github.com/inexorabletash/polyfill/blob/master/web.js
+ if (!document.querySelectorAll) {
+ document.querySelectorAll = function (selectors) {
+ var style = document.createElement('style'), elements = [], element;
+ document.documentElement.firstChild.appendChild(style);
+ document._qsa = [];
+
+ style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}';
+ window.scrollBy(0, 0);
+ style.parentNode.removeChild(style);
+
+ while (document._qsa.length) {
+ element = document._qsa.shift();
+ element.style.removeAttribute('x-qsa');
+ elements.push(element);
+ }
+ document._qsa = null;
+ return elements;
+ };
+ }
+
+ if (!document.querySelector) {
+ document.querySelector = function (selectors) {
+ var elements = document.querySelectorAll(selectors);
+ return (elements.length) ? elements[0] : null;
+ };
+ }
+
+ if (!document.getElementsByClassName) {
+ document.getElementsByClassName = function (classNames) {
+ classNames = String(classNames).replace(/^|\s+/g, '.');
+ return document.querySelectorAll(classNames);
+ };
+ }
+
+ //https://github.com/inexorabletash/polyfill
+ // ES5 15.2.3.14 Object.keys ( O )
+ // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys
+ if (!Object.keys) {
+ Object.keys = function (o) {
+ if (o !== Object(o)) { throw TypeError('Object.keys called on non-object'); }
+ var ret = [], p;
+ for (p in o) {
+ if (Object.prototype.hasOwnProperty.call(o, p)) {
+ ret.push(p);
+ }
+ }
+ return ret;
+ };
+ }
+
+ // ES5 15.4.4.18 Array.prototype.forEach ( callbackfn [ , thisArg ] )
+ // From https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach
+ if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function (fun /*, thisp */) {
+ if (this === void 0 || this === null) { throw TypeError(); }
+
+ var t = Object(this);
+ var len = t.length >>> 0;
+ if (typeof fun !== "function") { throw TypeError(); }
+
+ var thisp = arguments[1], i;
+ for (i = 0; i < len; i++) {
+ if (i in t) {
+ fun.call(thisp, t[i], i, t);
+ }
+ }
+ };
+ }
+
+ //https://github.com/inexorabletash/polyfill/blob/master/web.js
+ (function (global) {
+ var B64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+ global.atob = global.atob || function (input) {
+ input = String(input);
+ var position = 0,
+ output = [],
+ buffer = 0, bits = 0, n;
+
+ input = input.replace(/\s/g, '');
+ if ((input.length % 4) === 0) { input = input.replace(/=+$/, ''); }
+ if ((input.length % 4) === 1) { throw Error('InvalidCharacterError'); }
+ if (/[^+/0-9A-Za-z]/.test(input)) { throw Error('InvalidCharacterError'); }
+
+ while (position < input.length) {
+ n = B64_ALPHABET.indexOf(input.charAt(position));
+ buffer = (buffer << 6) | n;
+ bits += 6;
+
+ if (bits === 24) {
+ output.push(String.fromCharCode((buffer >> 16) & 0xFF));
+ output.push(String.fromCharCode((buffer >> 8) & 0xFF));
+ output.push(String.fromCharCode(buffer & 0xFF));
+ bits = 0;
+ buffer = 0;
+ }
+ position += 1;
+ }
+
+ if (bits === 12) {
+ buffer = buffer >> 4;
+ output.push(String.fromCharCode(buffer & 0xFF));
+ } else if (bits === 18) {
+ buffer = buffer >> 2;
+ output.push(String.fromCharCode((buffer >> 8) & 0xFF));
+ output.push(String.fromCharCode(buffer & 0xFF));
+ }
+
+ return output.join('');
+ };
+
+ global.btoa = global.btoa || function (input) {
+ input = String(input);
+ var position = 0,
+ out = [],
+ o1, o2, o3,
+ e1, e2, e3, e4;
+
+ if (/[^\x00-\xFF]/.test(input)) { throw Error('InvalidCharacterError'); }
+
+ while (position < input.length) {
+ o1 = input.charCodeAt(position++);
+ o2 = input.charCodeAt(position++);
+ o3 = input.charCodeAt(position++);
+
+ // 111111 112222 222233 333333
+ e1 = o1 >> 2;
+ e2 = ((o1 & 0x3) << 4) | (o2 >> 4);
+ e3 = ((o2 & 0xf) << 2) | (o3 >> 6);
+ e4 = o3 & 0x3f;
+
+ if (position === input.length + 2) {
+ e3 = 64; e4 = 64;
+ }
+ else if (position === input.length + 1) {
+ e4 = 64;
+ }
+
+ out.push(B64_ALPHABET.charAt(e1),
+ B64_ALPHABET.charAt(e2),
+ B64_ALPHABET.charAt(e3),
+ B64_ALPHABET.charAt(e4));
+ }
+
+ return out.join('');
+ };
+ }(window));
+
+ //https://gist.github.com/jimeh/332357
+ if (!Object.prototype.hasOwnProperty){
+ /*jshint -W001, -W103 */
+ Object.prototype.hasOwnProperty = function(prop) {
+ var proto = this.__proto__ || this.constructor.prototype;
+ return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
+ };
+ /*jshint +W001, +W103 */
+ }
+
+ // @license http://opensource.org/licenses/MIT
+ // copyright Paul Irish 2015
+
+
+ // Date.now() is supported everywhere except IE8. For IE8 we use the Date.now polyfill
+ // github.com/Financial-Times/polyfill-service/blob/master/polyfills/Date.now/polyfill.js
+ // as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values
+
+ // if you want values similar to what you'd get with real perf.now, place this towards the head of the page
+ // but in reality, you're just getting the delta between now() calls, so it's not terribly important where it's placed
+
+
+ (function(){
+
+ if ('performance' in window === false) {
+ window.performance = {};
+ }
+
+ Date.now = (Date.now || function () { // thanks IE8
+ return new Date().getTime();
+ });
+
+ if ('now' in window.performance === false){
+
+ var nowOffset = Date.now();
+
+ if (performance.timing && performance.timing.navigationStart){
+ nowOffset = performance.timing.navigationStart;
+ }
+
+ window.performance.now = function now(){
+ return Date.now() - nowOffset;
+ };
+ }
+
+ })();
+
+ //requestAnimationFrame polyfill for older Firefox/Chrome versions
+ if (!window.requestAnimationFrame) {
+ if (window.webkitRequestAnimationFrame && window.webkitCancelAnimationFrame) {
+ //https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/requestAnimationFrame/polyfill-webkit.js
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return webkitRequestAnimationFrame(function () {
+ callback(global.performance.now());
+ });
+ };
+
+ global.cancelAnimationFrame = global.webkitCancelAnimationFrame;
+ }(window));
+ } else if (window.mozRequestAnimationFrame && window.mozCancelAnimationFrame) {
+ //https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/requestAnimationFrame/polyfill-moz.js
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return mozRequestAnimationFrame(function () {
+ callback(global.performance.now());
+ });
+ };
+
+ global.cancelAnimationFrame = global.mozCancelAnimationFrame;
+ }(window));
+ } else {
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return global.setTimeout(callback, 1000 / 60);
+ };
+
+ global.cancelAnimationFrame = global.clearTimeout;
+ })(window);
+ }
+ }
+})(this);
+
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["Holder"] = factory();
+ else
+ root["Holder"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /*
+ Holder.js - client side image placeholders
+ (c) 2012-2015 Ivan Malopinsky - http://imsky.co
+ */
+
+ module.exports = __webpack_require__(1);
+
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/*
+ Holder.js - client side image placeholders
+ (c) 2012-2016 Ivan Malopinsky - http://imsky.co
+ */
+
+ //Libraries and functions
+ var onDomReady = __webpack_require__(2);
+ var querystring = __webpack_require__(3);
+
+ var SceneGraph = __webpack_require__(6);
+ var utils = __webpack_require__(7);
+ var SVG = __webpack_require__(8);
+ var DOM = __webpack_require__(9);
+ var Color = __webpack_require__(10);
+ var constants = __webpack_require__(11);
+
+ var svgRenderer = __webpack_require__(12);
+ var sgCanvasRenderer = __webpack_require__(15);
+
+ var extend = utils.extend;
+ var dimensionCheck = utils.dimensionCheck;
+
+ //Constants and definitions
+ var SVG_NS = constants.svg_ns;
+
+ var Holder = {
+ version: constants.version,
+
+ /**
+ * Adds a theme to default settings
+ *
+ * @param {string} name Theme name
+ * @param {Object} theme Theme object, with foreground, background, size, font, and fontweight properties.
+ */
+ addTheme: function(name, theme) {
+ name != null && theme != null && (App.settings.themes[name] = theme);
+ delete App.vars.cache.themeKeys;
+ return this;
+ },
+
+ /**
+ * Appends a placeholder to an element
+ *
+ * @param {string} src Placeholder URL string
+ * @param el A selector or a reference to a DOM node
+ */
+ addImage: function(src, el) {
+ //todo: use jquery fallback if available for all QSA references
+ var nodes = DOM.getNodeArray(el);
+ nodes.forEach(function (node) {
+ var img = DOM.newEl('img');
+ var domProps = {};
+ domProps[App.setup.dataAttr] = src;
+ DOM.setAttr(img, domProps);
+ node.appendChild(img);
+ });
+ return this;
+ },
+
+ /**
+ * Sets whether or not an image is updated on resize.
+ * If an image is set to be updated, it is immediately rendered.
+ *
+ * @param {Object} el Image DOM element
+ * @param {Boolean} value Resizable update flag value
+ */
+ setResizeUpdate: function(el, value) {
+ if (el.holderData) {
+ el.holderData.resizeUpdate = !!value;
+ if (el.holderData.resizeUpdate) {
+ updateResizableElements(el);
+ }
+ }
+ },
+
+ /**
+ * Runs Holder with options. By default runs Holder on all images with "holder.js" in their source attributes.
+ *
+ * @param {Object} userOptions Options object, can contain domain, themes, images, and bgnodes properties
+ */
+ run: function(userOptions) {
+ console.log(userOptions)
+ //todo: split processing into separate queues
+ userOptions = userOptions || {};
+ var engineSettings = {};
+ var options = extend(App.settings, userOptions);
+
+ App.vars.preempted = true;
+ App.vars.dataAttr = options.dataAttr || App.setup.dataAttr;
+
+ engineSettings.renderer = options.renderer ? options.renderer : App.setup.renderer;
+ if (App.setup.renderers.join(',').indexOf(engineSettings.renderer) === -1) {
+ engineSettings.renderer = App.setup.supportsSVG ? 'svg' : (App.setup.supportsCanvas ? 'canvas' : 'html');
+ }
+
+ var images = DOM.getNodeArray(options.images);
+ var bgnodes = DOM.getNodeArray(options.bgnodes);
+ var stylenodes = DOM.getNodeArray(options.stylenodes);
+ var objects = DOM.getNodeArray(options.objects);
+
+ engineSettings.stylesheets = [];
+ engineSettings.svgXMLStylesheet = true;
+ engineSettings.noFontFallback = !!options.noFontFallback;
+ engineSettings.noBackgroundSize = !!options.noBackgroundSize;
+
+ stylenodes.forEach(function (styleNode) {
+ if (styleNode.attributes.rel && styleNode.attributes.href && styleNode.attributes.rel.value == 'stylesheet') {
+ var href = styleNode.attributes.href.value;
+ //todo: write isomorphic relative-to-absolute URL function
+ var proxyLink = DOM.newEl('a');
+ proxyLink.href = href;
+ var stylesheetURL = proxyLink.protocol + '//' + proxyLink.host + proxyLink.pathname + proxyLink.search;
+ engineSettings.stylesheets.push(stylesheetURL);
+ }
+ });
+
+ bgnodes.forEach(function (bgNode) {
+ //Skip processing background nodes if getComputedStyle is unavailable, since only modern browsers would be able to use canvas or SVG to render to background
+ if (!global.getComputedStyle) return;
+ var backgroundImage = global.getComputedStyle(bgNode, null).getPropertyValue('background-image');
+ var dataBackgroundImage = bgNode.getAttribute('data-background-src');
+ var rawURL = dataBackgroundImage || backgroundImage;
+
+ var holderURL = null;
+ var holderString = options.domain + '/';
+ var holderStringIndex = rawURL.indexOf(holderString);
+
+ if (holderStringIndex === 0) {
+ holderURL = rawURL;
+ } else if (holderStringIndex === 1 && rawURL[0] === '?') {
+ holderURL = rawURL.slice(1);
+ } else {
+ var fragment = rawURL.substr(holderStringIndex).match(/([^\"]*)"?\)/);
+ if (fragment !== null) {
+ holderURL = fragment[1];
+ } else if (rawURL.indexOf('url(') === 0) {
+ throw 'Holder: unable to parse background URL: ' + rawURL;
+ }
+ }
+
+ if (holderURL) {
+ var holderFlags = parseURL(holderURL, options);
+ if (holderFlags) {
+ prepareDOMElement({
+ mode: 'background',
+ el: bgNode,
+ flags: holderFlags,
+ engineSettings: engineSettings
+ });
+ }
+ }
+ });
+
+ objects.forEach(function (object) {
+ var objectAttr = {};
+
+ try {
+ objectAttr.data = object.getAttribute('data');
+ objectAttr.dataSrc = object.getAttribute(App.vars.dataAttr);
+ } catch (e) {}
+
+ var objectHasSrcURL = objectAttr.data != null && objectAttr.data.indexOf(options.domain) === 0;
+ var objectHasDataSrcURL = objectAttr.dataSrc != null && objectAttr.dataSrc.indexOf(options.domain) === 0;
+
+ if (objectHasSrcURL) {
+ prepareImageElement(options, engineSettings, objectAttr.data, object);
+ } else if (objectHasDataSrcURL) {
+ prepareImageElement(options, engineSettings, objectAttr.dataSrc, object);
+ }
+ });
+
+ images.forEach(function (image) {
+ var imageAttr = {};
+
+ try {
+ imageAttr.src = image.getAttribute('src');
+ imageAttr.dataSrc = image.getAttribute(App.vars.dataAttr);
+ imageAttr.rendered = image.getAttribute('data-holder-rendered');
+ } catch (e) {}
+
+ var imageHasSrc = imageAttr.src != null;
+ var imageHasDataSrcURL = imageAttr.dataSrc != null && imageAttr.dataSrc.indexOf(options.domain) === 0;
+ var imageRendered = imageAttr.rendered != null && imageAttr.rendered == 'true';
+
+ if (imageHasSrc) {
+ if (imageAttr.src.indexOf(options.domain) === 0) {
+ prepareImageElement(options, engineSettings, imageAttr.src, image);
+ } else if (imageHasDataSrcURL) {
+ //Image has a valid data-src and an invalid src
+ if (imageRendered) {
+ //If the placeholder has already been render, re-render it
+ prepareImageElement(options, engineSettings, imageAttr.dataSrc, image);
+ } else {
+ //If the placeholder has not been rendered, check if the image exists and render a fallback if it doesn't
+ (function(src, options, engineSettings, dataSrc, image) {
+ utils.imageExists(src, function(exists) {
+ if (!exists) {
+ prepareImageElement(options, engineSettings, dataSrc, image);
+ }
+ });
+ })(imageAttr.src, options, engineSettings, imageAttr.dataSrc, image);
+ }
+ }
+ } else if (imageHasDataSrcURL) {
+ prepareImageElement(options, engineSettings, imageAttr.dataSrc, image);
+ }
+ });
+
+ return this;
+ }
+ };
+
+ var App = {
+ settings: {
+ domain: 'holder.js',
+ images: 'img',
+ objects: 'object',
+ bgnodes: 'body .holderjs',
+ stylenodes: 'head link.holderjs',
+ themes: {
+ 'gray': {
+ bg: '#EEEEEE',
+ fg: '#AAAAAA'
+ },
+ 'social': {
+ bg: '#3a5a97',
+ fg: '#FFFFFF'
+ },
+ 'industrial': {
+ bg: '#434A52',
+ fg: '#C2F200'
+ },
+ 'sky': {
+ bg: '#0D8FDB',
+ fg: '#FFFFFF'
+ },
+ 'vine': {
+ bg: '#39DBAC',
+ fg: '#1E292C'
+ },
+ 'lava': {
+ bg: '#F8591A',
+ fg: '#1C2846'
+ }
+ }
+ },
+ defaults: {
+ size: 10,
+ units: 'pt',
+ scale: 1 / 16
+ }
+ };
+
+ /**
+ * Processes provided source attribute and sets up the appropriate rendering workflow
+ *
+ * @private
+ * @param options Instance options from Holder.run
+ * @param renderSettings Instance configuration
+ * @param src Image URL
+ * @param el Image DOM element
+ */
+ function prepareImageElement(options, engineSettings, src, el) {
+ var holderFlags = parseURL(src.substr(src.lastIndexOf(options.domain)), options);
+ if (holderFlags) {
+ prepareDOMElement({
+ mode: null,
+ el: el,
+ flags: holderFlags,
+ engineSettings: engineSettings
+ });
+ }
+ }
+
+ /**
+ * Processes a Holder URL and extracts configuration from query string
+ *
+ * @private
+ * @param url URL
+ * @param instanceOptions Instance options from Holder.run
+ */
+ function parseURL(url, instanceOptions) {
+ var holder = {
+ theme: extend(App.settings.themes.gray, null),
+ stylesheets: instanceOptions.stylesheets,
+ instanceOptions: instanceOptions
+ };
+
+ var firstQuestionMark = url.indexOf('?');
+ var parts = [url];
+
+ if (firstQuestionMark !== -1) {
+ parts = [url.slice(0, firstQuestionMark), url.slice(firstQuestionMark + 1)];
+ }
+
+ var basics = parts[0].split('/');
+
+ holder.holderURL = url;
+
+ var dimensions = basics[1];
+ var dimensionData = dimensions.match(/([\d]+p?)x([\d]+p?)/);
+
+ if (!dimensionData) return false;
+
+ holder.fluid = dimensions.indexOf('p') !== -1;
+
+ holder.dimensions = {
+ width: dimensionData[1].replace('p', '%'),
+ height: dimensionData[2].replace('p', '%')
+ };
+
+ if (parts.length === 2) {
+ var options = querystring.parse(parts[1]);
+
+ // Colors
+
+ if (options.bg) {
+ holder.theme.bg = utils.parseColor(options.bg);
+ }
+
+ if (options.fg) {
+ holder.theme.fg = utils.parseColor(options.fg);
+ }
+
+ //todo: add automatic foreground to themes without foreground
+ if (options.bg && !options.fg) {
+ holder.autoFg = true;
+ }
+
+ if (options.theme && holder.instanceOptions.themes.hasOwnProperty(options.theme)) {
+ holder.theme = extend(holder.instanceOptions.themes[options.theme], null);
+ }
+
+ // Text
+
+ if (options.text) {
+ holder.text = options.text;
+ }
+
+ if (options.textmode) {
+ holder.textmode = options.textmode;
+ }
+
+ if (options.size) {
+ holder.size = options.size;
+ }
+
+ if (options.font) {
+ holder.font = options.font;
+ }
+
+ if (options.align) {
+ holder.align = options.align;
+ }
+
+ if (options.lineWrap) {
+ holder.lineWrap = options.lineWrap;
+ }
+
+ holder.nowrap = utils.truthy(options.nowrap);
+
+ // Miscellaneous
+
+ holder.auto = utils.truthy(options.auto);
+
+ holder.outline = utils.truthy(options.outline);
+
+ if (utils.truthy(options.random)) {
+ App.vars.cache.themeKeys = App.vars.cache.themeKeys || Object.keys(holder.instanceOptions.themes);
+ var _theme = App.vars.cache.themeKeys[0 | Math.random() * App.vars.cache.themeKeys.length];
+ holder.theme = extend(holder.instanceOptions.themes[_theme], null);
+ }
+ }
+
+ return holder;
+ }
+
+ /**
+ * Modifies the DOM to fit placeholders and sets up resizable image callbacks (for fluid and automatically sized placeholders)
+ *
+ * @private
+ * @param settings DOM prep settings
+ */
+ function prepareDOMElement(prepSettings) {
+ var mode = prepSettings.mode;
+ var el = prepSettings.el;
+ var flags = prepSettings.flags;
+ var _engineSettings = prepSettings.engineSettings;
+ var dimensions = flags.dimensions,
+ theme = flags.theme;
+ var dimensionsCaption = dimensions.width + 'x' + dimensions.height;
+ mode = mode == null ? (flags.fluid ? 'fluid' : 'image') : mode;
+ var holderTemplateRe = /holder_([a-z]+)/g;
+ var dimensionsInText = false;
+
+ if (flags.text != null) {
+ theme.text = flags.text;
+
+ // SVG embedding doesn't parse Unicode properly
+ if (el.nodeName.toLowerCase() === 'object') {
+ var textLines = theme.text.split('\\n');
+ for (var k = 0; k < textLines.length; k++) {
+ textLines[k] = utils.encodeHtmlEntity(textLines[k]);
+ }
+ theme.text = textLines.join('\\n');
+ }
+ }
+
+ if (theme.text) {
+ var holderTemplateMatches = theme.text.match(holderTemplateRe);
+
+ if (holderTemplateMatches !== null) {
+ //todo: optimize template replacement
+ holderTemplateMatches.forEach(function (match) {
+ if (match === 'holder_dimensions') {
+ theme.text = theme.text.replace(match, dimensionsCaption);
+ }
+ });
+ }
+ }
+
+ var holderURL = flags.holderURL;
+ var engineSettings = extend(_engineSettings, null);
+
+ if (flags.font) {
+ /*
+ If external fonts are used in a placeholder rendered with SVG, Holder falls back to canvas.
+
+ This is done because Firefox and Chrome disallow embedded SVGs from referencing external assets.
+ The workaround is either to change the placeholder tag from to or to use the canvas renderer.
+ */
+ theme.font = flags.font;
+ if (!engineSettings.noFontFallback && el.nodeName.toLowerCase() === 'img' && App.setup.supportsCanvas && engineSettings.renderer === 'svg') {
+ engineSettings = extend(engineSettings, {
+ renderer: 'canvas'
+ });
+ }
+ }
+
+ //Chrome and Opera require a quick 10ms re-render if web fonts are used with canvas
+ if (flags.font && engineSettings.renderer == 'canvas') {
+ engineSettings.reRender = true;
+ }
+
+ if (mode == 'background') {
+ if (el.getAttribute('data-background-src') == null) {
+ DOM.setAttr(el, {
+ 'data-background-src': holderURL
+ });
+ }
+ } else {
+ var domProps = {};
+ domProps[App.vars.dataAttr] = holderURL;
+ DOM.setAttr(el, domProps);
+ }
+
+ flags.theme = theme;
+
+ //todo consider using all renderSettings in holderData
+ el.holderData = {
+ flags: flags,
+ engineSettings: engineSettings
+ };
+
+ if (mode == 'image' || mode == 'fluid') {
+ DOM.setAttr(el, {
+ 'alt': theme.text ? (dimensionsInText ? theme.text : theme.text + ' [' + dimensionsCaption + ']') : dimensionsCaption
+ });
+ }
+
+ var renderSettings = {
+ mode: mode,
+ el: el,
+ holderSettings: {
+ dimensions: dimensions,
+ theme: theme,
+ flags: flags
+ },
+ engineSettings: engineSettings
+ };
+
+ if (mode == 'image') {
+ if (!flags.auto) {
+ el.style.width = dimensions.width + 'px';
+ el.style.height = dimensions.height + 'px';
+ }
+
+ if (engineSettings.renderer == 'html') {
+ el.style.backgroundColor = theme.bg;
+ } else {
+ render(renderSettings);
+
+ if (flags.textmode == 'exact') {
+ el.holderData.resizeUpdate = true;
+ App.vars.resizableImages.push(el);
+ updateResizableElements(el);
+ }
+ }
+ } else if (mode == 'background' && engineSettings.renderer != 'html') {
+ render(renderSettings);
+ } else if (mode == 'fluid') {
+ el.holderData.resizeUpdate = true;
+
+ if (dimensions.height.slice(-1) == '%') {
+ el.style.height = dimensions.height;
+ } else if (flags.auto == null || !flags.auto) {
+ el.style.height = dimensions.height + 'px';
+ }
+ if (dimensions.width.slice(-1) == '%') {
+ el.style.width = dimensions.width;
+ } else if (flags.auto == null || !flags.auto) {
+ el.style.width = dimensions.width + 'px';
+ }
+ if (el.style.display == 'inline' || el.style.display === '' || el.style.display == 'none') {
+ el.style.display = 'block';
+ }
+
+ setInitialDimensions(el);
+
+ if (engineSettings.renderer == 'html') {
+ el.style.backgroundColor = theme.bg;
+ } else {
+ App.vars.resizableImages.push(el);
+ updateResizableElements(el);
+ }
+ }
+ }
+
+ /**
+ * Core function that takes output from renderers and sets it as the source or background-image of the target element
+ *
+ * @private
+ * @param renderSettings Renderer settings
+ */
+ function render(renderSettings) {
+ var image = null;
+ var mode = renderSettings.mode;
+ var el = renderSettings.el;
+ var holderSettings = renderSettings.holderSettings;
+ var engineSettings = renderSettings.engineSettings;
+
+ switch (engineSettings.renderer) {
+ case 'svg':
+ if (!App.setup.supportsSVG) return;
+ break;
+ case 'canvas':
+ if (!App.setup.supportsCanvas) return;
+ break;
+ default:
+ return;
+ }
+
+ //todo: move generation of scene up to flag generation to reduce extra object creation
+ var scene = {
+ width: holderSettings.dimensions.width,
+ height: holderSettings.dimensions.height,
+ theme: holderSettings.theme,
+ flags: holderSettings.flags
+ };
+
+ var sceneGraph = buildSceneGraph(scene);
+
+ function getRenderedImage() {
+ var image = null;
+ switch (engineSettings.renderer) {
+ case 'canvas':
+ image = sgCanvasRenderer(sceneGraph, renderSettings);
+ break;
+ case 'svg':
+ image = svgRenderer(sceneGraph, renderSettings);
+ break;
+ default:
+ throw 'Holder: invalid renderer: ' + engineSettings.renderer;
+ }
+
+ return image;
+ }
+
+ image = getRenderedImage();
+
+ if (image == null) {
+ throw 'Holder: couldn\'t render placeholder';
+ }
+
+ //todo: add canvas rendering
+ if (mode == 'background') {
+ el.style.backgroundImage = 'url(' + image + ')';
+
+ if (!engineSettings.noBackgroundSize) {
+ el.style.backgroundSize = scene.width + 'px ' + scene.height + 'px';
+ }
+ } else {
+ if (el.nodeName.toLowerCase() === 'img') {
+ DOM.setAttr(el, {
+ 'src': image
+ });
+ } else if (el.nodeName.toLowerCase() === 'object') {
+ DOM.setAttr(el, {
+ 'data': image,
+ 'type': 'image/svg+xml'
+ });
+ }
+ if (engineSettings.reRender) {
+ global.setTimeout(function () {
+ var image = getRenderedImage();
+ if (image == null) {
+ throw 'Holder: couldn\'t render placeholder';
+ }
+ //todo: refactor this code into a function
+ if (el.nodeName.toLowerCase() === 'img') {
+ DOM.setAttr(el, {
+ 'src': image
+ });
+ } else if (el.nodeName.toLowerCase() === 'object') {
+ DOM.setAttr(el, {
+ 'data': image,
+ 'type': 'image/svg+xml'
+ });
+ }
+ }, 150);
+ }
+ }
+ //todo: account for re-rendering
+ DOM.setAttr(el, {
+ 'data-holder-rendered': true
+ });
+ }
+
+ /**
+ * Core function that takes a Holder scene description and builds a scene graph
+ *
+ * @private
+ * @param scene Holder scene object
+ */
+ //todo: make this function reusable
+ //todo: merge app defaults and setup properties into the scene argument
+ function buildSceneGraph(scene) {
+ var fontSize = App.defaults.size;
+ if (parseFloat(scene.theme.size)) {
+ fontSize = scene.theme.size;
+ } else if (parseFloat(scene.flags.size)) {
+ fontSize = scene.flags.size;
+ }
+
+ scene.font = {
+ family: scene.theme.font ? scene.theme.font : 'Arial, Helvetica, Open Sans, sans-serif',
+ size: textSize(scene.width, scene.height, fontSize, App.defaults.scale),
+ units: scene.theme.units ? scene.theme.units : App.defaults.units,
+ weight: scene.theme.fontweight ? scene.theme.fontweight : 'bold'
+ };
+
+ scene.text = scene.theme.text || Math.floor(scene.width) + 'x' + Math.floor(scene.height);
+
+ scene.noWrap = scene.theme.nowrap || scene.flags.nowrap;
+
+ scene.align = scene.theme.align || scene.flags.align || 'center';
+
+ switch (scene.flags.textmode) {
+ case 'literal':
+ scene.text = scene.flags.dimensions.width + 'x' + scene.flags.dimensions.height;
+ break;
+ case 'exact':
+ if (!scene.flags.exactDimensions) break;
+ scene.text = Math.floor(scene.flags.exactDimensions.width) + 'x' + Math.floor(scene.flags.exactDimensions.height);
+ break;
+ }
+
+ var lineWrap = scene.flags.lineWrap || App.setup.lineWrapRatio;
+ var sceneMargin = scene.width * lineWrap;
+ var maxLineWidth = sceneMargin;
+
+ var sceneGraph = new SceneGraph({
+ width: scene.width,
+ height: scene.height
+ });
+
+ var Shape = sceneGraph.Shape;
+
+ var holderBg = new Shape.Rect('holderBg', {
+ fill: scene.theme.bg
+ });
+
+ holderBg.resize(scene.width, scene.height);
+ sceneGraph.root.add(holderBg);
+
+ if (scene.flags.outline) {
+ var outlineColor = new Color(holderBg.properties.fill);
+ outlineColor = outlineColor.lighten(outlineColor.lighterThan('7f7f7f') ? -0.1 : 0.1);
+ holderBg.properties.outline = {
+ fill: outlineColor.toHex(true),
+ width: 2
+ };
+ }
+
+ var holderTextColor = scene.theme.fg;
+
+ if (scene.flags.autoFg) {
+ var holderBgColor = new Color(holderBg.properties.fill);
+ var lightColor = new Color('fff');
+ var darkColor = new Color('000', {
+ 'alpha': 0.285714
+ });
+
+ holderTextColor = holderBgColor.blendAlpha(holderBgColor.lighterThan('7f7f7f') ? darkColor : lightColor).toHex(true);
+ }
+
+ var holderTextGroup = new Shape.Group('holderTextGroup', {
+ text: scene.text,
+ align: scene.align,
+ font: scene.font,
+ fill: holderTextColor
+ });
+
+ holderTextGroup.moveTo(null, null, 1);
+ sceneGraph.root.add(holderTextGroup);
+
+ var tpdata = holderTextGroup.textPositionData = stagingRenderer(sceneGraph);
+ if (!tpdata) {
+ throw 'Holder: staging fallback not supported yet.';
+ }
+ holderTextGroup.properties.leading = tpdata.boundingBox.height;
+
+ var textNode = null;
+ var line = null;
+
+ function finalizeLine(parent, line, width, height) {
+ line.width = width;
+ line.height = height;
+ parent.width = Math.max(parent.width, line.width);
+ parent.height += line.height;
+ }
+
+ if (tpdata.lineCount > 1) {
+ var offsetX = 0;
+ var offsetY = 0;
+ var lineIndex = 0;
+ var lineKey;
+ line = new Shape.Group('line' + lineIndex);
+
+ //Double margin so that left/right-aligned next is not flush with edge of image
+ if (scene.align === 'left' || scene.align === 'right') {
+ maxLineWidth = scene.width * (1 - (1 - lineWrap) * 2);
+ }
+
+ for (var i = 0; i < tpdata.words.length; i++) {
+ var word = tpdata.words[i];
+ textNode = new Shape.Text(word.text);
+ var newline = word.text == '\\n';
+ if (!scene.noWrap && (offsetX + word.width >= maxLineWidth || newline === true)) {
+ finalizeLine(holderTextGroup, line, offsetX, holderTextGroup.properties.leading);
+ holderTextGroup.add(line);
+ offsetX = 0;
+ offsetY += holderTextGroup.properties.leading;
+ lineIndex += 1;
+ line = new Shape.Group('line' + lineIndex);
+ line.y = offsetY;
+ }
+ if (newline === true) {
+ continue;
+ }
+ textNode.moveTo(offsetX, 0);
+ offsetX += tpdata.spaceWidth + word.width;
+ line.add(textNode);
+ }
+
+ finalizeLine(holderTextGroup, line, offsetX, holderTextGroup.properties.leading);
+ holderTextGroup.add(line);
+
+ if (scene.align === 'left') {
+ holderTextGroup.moveTo(scene.width - sceneMargin, null, null);
+ } else if (scene.align === 'right') {
+ for (lineKey in holderTextGroup.children) {
+ line = holderTextGroup.children[lineKey];
+ line.moveTo(scene.width - line.width, null, null);
+ }
+
+ holderTextGroup.moveTo(0 - (scene.width - sceneMargin), null, null);
+ } else {
+ for (lineKey in holderTextGroup.children) {
+ line = holderTextGroup.children[lineKey];
+ line.moveTo((holderTextGroup.width - line.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo((scene.width - holderTextGroup.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo(null, (scene.height - holderTextGroup.height) / 2, null);
+
+ //If the text exceeds vertical space, move it down so the first line is visible
+ if ((scene.height - holderTextGroup.height) / 2 < 0) {
+ holderTextGroup.moveTo(null, 0, null);
+ }
+ } else {
+ textNode = new Shape.Text(scene.text);
+ line = new Shape.Group('line0');
+ line.add(textNode);
+ holderTextGroup.add(line);
+
+ if (scene.align === 'left') {
+ holderTextGroup.moveTo(scene.width - sceneMargin, null, null);
+ } else if (scene.align === 'right') {
+ holderTextGroup.moveTo(0 - (scene.width - sceneMargin), null, null);
+ } else {
+ holderTextGroup.moveTo((scene.width - tpdata.boundingBox.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo(null, (scene.height - tpdata.boundingBox.height) / 2, null);
+ }
+
+ //todo: renderlist
+ return sceneGraph;
+ }
+
+ /**
+ * Adaptive text sizing function
+ *
+ * @private
+ * @param width Parent width
+ * @param height Parent height
+ * @param fontSize Requested text size
+ * @param scale Proportional scale of text
+ */
+ function textSize(width, height, fontSize, scale) {
+ var stageWidth = parseInt(width, 10);
+ var stageHeight = parseInt(height, 10);
+
+ var bigSide = Math.max(stageWidth, stageHeight);
+ var smallSide = Math.min(stageWidth, stageHeight);
+
+ var newHeight = 0.8 * Math.min(smallSide, bigSide * scale);
+ return Math.round(Math.max(fontSize, newHeight));
+ }
+
+ /**
+ * Iterates over resizable (fluid or auto) placeholders and renders them
+ *
+ * @private
+ * @param element Optional element selector, specified only if a specific element needs to be re-rendered
+ */
+ function updateResizableElements(element) {
+ var images;
+ if (element == null || element.nodeType == null) {
+ images = App.vars.resizableImages;
+ } else {
+ images = [element];
+ }
+ for (var i = 0, l = images.length; i < l; i++) {
+ var el = images[i];
+ if (el.holderData) {
+ var flags = el.holderData.flags;
+ var dimensions = dimensionCheck(el);
+ if (dimensions) {
+ if (!el.holderData.resizeUpdate) {
+ continue;
+ }
+
+ if (flags.fluid && flags.auto) {
+ var fluidConfig = el.holderData.fluidConfig;
+ switch (fluidConfig.mode) {
+ case 'width':
+ dimensions.height = dimensions.width / fluidConfig.ratio;
+ break;
+ case 'height':
+ dimensions.width = dimensions.height * fluidConfig.ratio;
+ break;
+ }
+ }
+
+ var settings = {
+ mode: 'image',
+ holderSettings: {
+ dimensions: dimensions,
+ theme: flags.theme,
+ flags: flags
+ },
+ el: el,
+ engineSettings: el.holderData.engineSettings
+ };
+
+ if (flags.textmode == 'exact') {
+ flags.exactDimensions = dimensions;
+ settings.holderSettings.dimensions = flags.dimensions;
+ }
+
+ render(settings);
+ } else {
+ setInvisible(el);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets up aspect ratio metadata for fluid placeholders, in order to preserve proportions when resizing
+ *
+ * @private
+ * @param el Image DOM element
+ */
+ function setInitialDimensions(el) {
+ if (el.holderData) {
+ var dimensions = dimensionCheck(el);
+ if (dimensions) {
+ var flags = el.holderData.flags;
+
+ var fluidConfig = {
+ fluidHeight: flags.dimensions.height.slice(-1) == '%',
+ fluidWidth: flags.dimensions.width.slice(-1) == '%',
+ mode: null,
+ initialDimensions: dimensions
+ };
+
+ if (fluidConfig.fluidWidth && !fluidConfig.fluidHeight) {
+ fluidConfig.mode = 'width';
+ fluidConfig.ratio = fluidConfig.initialDimensions.width / parseFloat(flags.dimensions.height);
+ } else if (!fluidConfig.fluidWidth && fluidConfig.fluidHeight) {
+ fluidConfig.mode = 'height';
+ fluidConfig.ratio = parseFloat(flags.dimensions.width) / fluidConfig.initialDimensions.height;
+ }
+
+ el.holderData.fluidConfig = fluidConfig;
+ } else {
+ setInvisible(el);
+ }
+ }
+ }
+
+ /**
+ * Iterates through all current invisible images, and if they're visible, renders them and removes them from further checks. Runs every animation frame.
+ *
+ * @private
+ */
+ function visibilityCheck() {
+ var renderableImages = [];
+ var keys = Object.keys(App.vars.invisibleImages);
+ var el;
+
+ keys.forEach(function (key) {
+ el = App.vars.invisibleImages[key];
+ if (dimensionCheck(el) && el.nodeName.toLowerCase() == 'img') {
+ renderableImages.push(el);
+ delete App.vars.invisibleImages[key];
+ }
+ });
+
+ if (renderableImages.length) {
+ Holder.run({
+ images: renderableImages
+ });
+ }
+
+ // Done to prevent 100% CPU usage via aggressive calling of requestAnimationFrame
+ setTimeout(function () {
+ global.requestAnimationFrame(visibilityCheck);
+ }, 10);
+ }
+
+ /**
+ * Starts checking for invisible placeholders if not doing so yet. Does nothing otherwise.
+ *
+ * @private
+ */
+ function startVisibilityCheck() {
+ if (!App.vars.visibilityCheckStarted) {
+ global.requestAnimationFrame(visibilityCheck);
+ App.vars.visibilityCheckStarted = true;
+ }
+ }
+
+ /**
+ * Sets a unique ID for an image detected to be invisible and adds it to the map of invisible images checked by visibilityCheck
+ *
+ * @private
+ * @param el Invisible DOM element
+ */
+ function setInvisible(el) {
+ if (!el.holderData.invisibleId) {
+ App.vars.invisibleId += 1;
+ App.vars.invisibleImages['i' + App.vars.invisibleId] = el;
+ el.holderData.invisibleId = App.vars.invisibleId;
+ }
+ }
+
+ //todo: see if possible to convert stagingRenderer to use HTML only
+ var stagingRenderer = (function() {
+ var svg = null,
+ stagingText = null,
+ stagingTextNode = null;
+ return function(graph) {
+ var rootNode = graph.root;
+ if (App.setup.supportsSVG) {
+ var firstTimeSetup = false;
+ var tnode = function(text) {
+ return document.createTextNode(text);
+ };
+ if (svg == null || svg.parentNode !== document.body) {
+ firstTimeSetup = true;
+ }
+
+ svg = SVG.initSVG(svg, rootNode.properties.width, rootNode.properties.height);
+ //Show staging element before staging
+ svg.style.display = 'block';
+
+ if (firstTimeSetup) {
+ stagingText = DOM.newEl('text', SVG_NS);
+ stagingTextNode = tnode(null);
+ DOM.setAttr(stagingText, {
+ x: 0
+ });
+ stagingText.appendChild(stagingTextNode);
+ svg.appendChild(stagingText);
+ document.body.appendChild(svg);
+ svg.style.visibility = 'hidden';
+ svg.style.position = 'absolute';
+ svg.style.top = '-100%';
+ svg.style.left = '-100%';
+ //todo: workaround for zero-dimension tag in Opera 12
+ //svg.setAttribute('width', 0);
+ //svg.setAttribute('height', 0);
+ }
+
+ var holderTextGroup = rootNode.children.holderTextGroup;
+ var htgProps = holderTextGroup.properties;
+ DOM.setAttr(stagingText, {
+ 'y': htgProps.font.size,
+ 'style': utils.cssProps({
+ 'font-weight': htgProps.font.weight,
+ 'font-size': htgProps.font.size + htgProps.font.units,
+ 'font-family': htgProps.font.family
+ })
+ });
+
+ //Get bounding box for the whole string (total width and height)
+ stagingTextNode.nodeValue = htgProps.text;
+ var stagingTextBBox = stagingText.getBBox();
+
+ //Get line count and split the string into words
+ var lineCount = Math.ceil(stagingTextBBox.width / rootNode.properties.width);
+ var words = htgProps.text.split(' ');
+ var newlines = htgProps.text.match(/\\n/g);
+ lineCount += newlines == null ? 0 : newlines.length;
+
+ //Get bounding box for the string with spaces removed
+ stagingTextNode.nodeValue = htgProps.text.replace(/[ ]+/g, '');
+ var computedNoSpaceLength = stagingText.getComputedTextLength();
+
+ //Compute average space width
+ var diffLength = stagingTextBBox.width - computedNoSpaceLength;
+ var spaceWidth = Math.round(diffLength / Math.max(1, words.length - 1));
+
+ //Get widths for every word with space only if there is more than one line
+ var wordWidths = [];
+ if (lineCount > 1) {
+ stagingTextNode.nodeValue = '';
+ for (var i = 0; i < words.length; i++) {
+ if (words[i].length === 0) continue;
+ stagingTextNode.nodeValue = utils.decodeHtmlEntity(words[i]);
+ var bbox = stagingText.getBBox();
+ wordWidths.push({
+ text: words[i],
+ width: bbox.width
+ });
+ }
+ }
+
+ //Hide staging element after staging
+ svg.style.display = 'none';
+
+ return {
+ spaceWidth: spaceWidth,
+ lineCount: lineCount,
+ boundingBox: stagingTextBBox,
+ words: wordWidths
+ };
+ } else {
+ //todo: canvas fallback for measuring text on android 2.3
+ return false;
+ }
+ };
+ })();
+
+ //Helpers
+
+ /**
+ * Prevents a function from being called too often, waits until a timer elapses to call it again
+ *
+ * @param fn Function to call
+ */
+ function debounce(fn) {
+ if (!App.vars.debounceTimer) fn.call(this);
+ if (App.vars.debounceTimer) global.clearTimeout(App.vars.debounceTimer);
+ App.vars.debounceTimer = global.setTimeout(function() {
+ App.vars.debounceTimer = null;
+ fn.call(this);
+ }, App.setup.debounce);
+ }
+
+ /**
+ * Holder-specific resize/orientation change callback, debounced to prevent excessive execution
+ */
+ function resizeEvent() {
+ debounce(function() {
+ updateResizableElements(null);
+ });
+ }
+
+ //Set up flags
+
+ for (var flag in App.flags) {
+ if (!App.flags.hasOwnProperty(flag)) continue;
+ App.flags[flag].match = function(val) {
+ return val.match(this.regex);
+ };
+ }
+
+ //Properties set once on setup
+
+ App.setup = {
+ renderer: 'html',
+ debounce: 100,
+ ratio: 1,
+ supportsCanvas: false,
+ supportsSVG: false,
+ lineWrapRatio: 0.9,
+ dataAttr: 'data-src',
+ renderers: ['html', 'canvas', 'svg']
+ };
+
+ //Properties modified during runtime
+
+ App.vars = {
+ preempted: false,
+ resizableImages: [],
+ invisibleImages: {},
+ invisibleId: 0,
+ visibilityCheckStarted: false,
+ debounceTimer: null,
+ cache: {}
+ };
+
+ //Pre-flight
+
+ (function() {
+ var canvas = DOM.newEl('canvas');
+
+ if (canvas.getContext) {
+ if (canvas.toDataURL('image/png').indexOf('data:image/png') != -1) {
+ App.setup.renderer = 'canvas';
+ App.setup.supportsCanvas = true;
+ }
+ }
+
+ if (!!document.createElementNS && !!document.createElementNS(SVG_NS, 'svg').createSVGRect) {
+ App.setup.renderer = 'svg';
+ App.setup.supportsSVG = true;
+ }
+ })();
+
+ //Starts checking for invisible placeholders
+ startVisibilityCheck();
+
+ if (onDomReady) {
+ onDomReady(function() {
+ if (!App.vars.preempted) {
+ Holder.run();
+ }
+ if (global.addEventListener) {
+ global.addEventListener('resize', resizeEvent, false);
+ global.addEventListener('orientationchange', resizeEvent, false);
+ } else {
+ global.attachEvent('onresize', resizeEvent);
+ }
+
+ if (typeof global.Turbolinks == 'object') {
+ global.document.addEventListener('page:change', function() {
+ Holder.run();
+ });
+ }
+ });
+ }
+
+ module.exports = Holder;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 2 */
+/***/ function(module, exports) {
+
+ /*!
+ * onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license
+ *
+ * Specially modified to work with Holder.js
+ */
+
+ function _onDomReady(win) {
+ //Lazy loading fix for Firefox < 3.6
+ //http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html
+ if (document.readyState == null && document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", function DOMContentLoaded() {
+ document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
+ document.readyState = "complete";
+ }, false);
+ document.readyState = "loading";
+ }
+
+ var doc = win.document,
+ docElem = doc.documentElement,
+
+ LOAD = "load",
+ FALSE = false,
+ ONLOAD = "on"+LOAD,
+ COMPLETE = "complete",
+ READYSTATE = "readyState",
+ ATTACHEVENT = "attachEvent",
+ DETACHEVENT = "detachEvent",
+ ADDEVENTLISTENER = "addEventListener",
+ DOMCONTENTLOADED = "DOMContentLoaded",
+ ONREADYSTATECHANGE = "onreadystatechange",
+ REMOVEEVENTLISTENER = "removeEventListener",
+
+ // W3C Event model
+ w3c = ADDEVENTLISTENER in doc,
+ _top = FALSE,
+
+ // isReady: Is the DOM ready to be used? Set to true once it occurs.
+ isReady = FALSE,
+
+ // Callbacks pending execution until DOM is ready
+ callbacks = [];
+
+ // Handle when the DOM is ready
+ function ready( fn ) {
+ if ( !isReady ) {
+
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !doc.body ) {
+ return defer( ready );
+ }
+
+ // Remember that the DOM is ready
+ isReady = true;
+
+ // Execute all callbacks
+ while ( fn = callbacks.shift() ) {
+ defer( fn );
+ }
+ }
+ }
+
+ // The ready event handler
+ function completed( event ) {
+ // readyState === "complete" is good enough for us to call the dom ready in oldIE
+ if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {
+ detach();
+ ready();
+ }
+ }
+
+ // Clean-up method for dom ready events
+ function detach() {
+ if ( w3c ) {
+ doc[REMOVEEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );
+ win[REMOVEEVENTLISTENER]( LOAD, completed, FALSE );
+ } else {
+ doc[DETACHEVENT]( ONREADYSTATECHANGE, completed );
+ win[DETACHEVENT]( ONLOAD, completed );
+ }
+ }
+
+ // Defers a function, scheduling it to run after the current call stack has cleared.
+ function defer( fn, wait ) {
+ // Allow 0 to be passed
+ setTimeout( fn, +wait >= 0 ? wait : 1 );
+ }
+
+ // Attach the listeners:
+
+ // Catch cases where onDomReady is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( doc[READYSTATE] === COMPLETE ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ defer( ready );
+
+ // Standards-based browsers support DOMContentLoaded
+ } else if ( w3c ) {
+ // Use the handy event callback
+ doc[ADDEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );
+
+ // A fallback to window.onload, that will always work
+ win[ADDEVENTLISTENER]( LOAD, completed, FALSE );
+
+ // If IE event model is used
+ } else {
+ // Ensure firing before onload, maybe late but safe also for iframes
+ doc[ATTACHEVENT]( ONREADYSTATECHANGE, completed );
+
+ // A fallback to window.onload, that will always work
+ win[ATTACHEVENT]( ONLOAD, completed );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ try {
+ _top = win.frameElement == null && docElem;
+ } catch(e) {}
+
+ if ( _top && _top.doScroll ) {
+ (function doScrollCheck() {
+ if ( !isReady ) {
+ try {
+ // Use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ _top.doScroll("left");
+ } catch(e) {
+ return defer( doScrollCheck, 50 );
+ }
+
+ // detach all dom ready events
+ detach();
+
+ // and execute any waiting functions
+ ready();
+ }
+ })();
+ }
+ }
+
+ function onDomReady( fn ) {
+ // If DOM is ready, execute the function (async), otherwise wait
+ isReady ? defer( fn ) : callbacks.push( fn );
+ }
+
+ // Add version
+ onDomReady.version = "1.4.0";
+ // Add method to check if DOM is ready
+ onDomReady.isReady = function(){
+ return isReady;
+ };
+
+ return onDomReady;
+ }
+
+ module.exports = typeof window !== "undefined" && _onDomReady(window);
+
+/***/ },
+/* 3 */
+/***/ function(module, exports, __webpack_require__) {
+
+ //Modified version of component/querystring
+ //Changes: updated dependencies, dot notation parsing, JSHint fixes
+ //Fork at https://github.com/imsky/querystring
+
+ /**
+ * Module dependencies.
+ */
+
+ var encode = encodeURIComponent;
+ var decode = decodeURIComponent;
+ var trim = __webpack_require__(4);
+ var type = __webpack_require__(5);
+
+ var arrayRegex = /(\w+)\[(\d+)\]/;
+ var objectRegex = /\w+\.\w+/;
+
+ /**
+ * Parse the given query `str`.
+ *
+ * @param {String} str
+ * @return {Object}
+ * @api public
+ */
+
+ exports.parse = function(str){
+ if ('string' !== typeof str) return {};
+
+ str = trim(str);
+ if ('' === str) return {};
+ if ('?' === str.charAt(0)) str = str.slice(1);
+
+ var obj = {};
+ var pairs = str.split('&');
+ for (var i = 0; i < pairs.length; i++) {
+ var parts = pairs[i].split('=');
+ var key = decode(parts[0]);
+ var m, ctx, prop;
+
+ if (m = arrayRegex.exec(key)) {
+ obj[m[1]] = obj[m[1]] || [];
+ obj[m[1]][m[2]] = decode(parts[1]);
+ continue;
+ }
+
+ if (m = objectRegex.test(key)) {
+ m = key.split('.');
+ ctx = obj;
+
+ while (m.length) {
+ prop = m.shift();
+
+ if (!prop.length) continue;
+
+ if (!ctx[prop]) {
+ ctx[prop] = {};
+ } else if (ctx[prop] && typeof ctx[prop] !== 'object') {
+ break;
+ }
+
+ if (!m.length) {
+ ctx[prop] = decode(parts[1]);
+ }
+
+ ctx = ctx[prop];
+ }
+
+ continue;
+ }
+
+ obj[parts[0]] = null == parts[1] ? '' : decode(parts[1]);
+ }
+
+ return obj;
+ };
+
+ /**
+ * Stringify the given `obj`.
+ *
+ * @param {Object} obj
+ * @return {String}
+ * @api public
+ */
+
+ exports.stringify = function(obj){
+ if (!obj) return '';
+ var pairs = [];
+
+ for (var key in obj) {
+ var value = obj[key];
+
+ if ('array' == type(value)) {
+ for (var i = 0; i < value.length; ++i) {
+ pairs.push(encode(key + '[' + i + ']') + '=' + encode(value[i]));
+ }
+ continue;
+ }
+
+ pairs.push(encode(key) + '=' + encode(obj[key]));
+ }
+
+ return pairs.join('&');
+ };
+
+
+/***/ },
+/* 4 */
+/***/ function(module, exports) {
+
+
+ exports = module.exports = trim;
+
+ function trim(str){
+ return str.replace(/^\s*|\s*$/g, '');
+ }
+
+ exports.left = function(str){
+ return str.replace(/^\s*/, '');
+ };
+
+ exports.right = function(str){
+ return str.replace(/\s*$/, '');
+ };
+
+
+/***/ },
+/* 5 */
+/***/ function(module, exports) {
+
+ /**
+ * toString ref.
+ */
+
+ var toString = Object.prototype.toString;
+
+ /**
+ * Return the type of `val`.
+ *
+ * @param {Mixed} val
+ * @return {String}
+ * @api public
+ */
+
+ module.exports = function(val){
+ switch (toString.call(val)) {
+ case '[object Date]': return 'date';
+ case '[object RegExp]': return 'regexp';
+ case '[object Arguments]': return 'arguments';
+ case '[object Array]': return 'array';
+ case '[object Error]': return 'error';
+ }
+
+ if (val === null) return 'null';
+ if (val === undefined) return 'undefined';
+ if (val !== val) return 'nan';
+ if (val && val.nodeType === 1) return 'element';
+
+ if (isBuffer(val)) return 'buffer';
+
+ val = val.valueOf
+ ? val.valueOf()
+ : Object.prototype.valueOf.apply(val);
+
+ return typeof val;
+ };
+
+ // code borrowed from https://github.com/feross/is-buffer/blob/master/index.js
+ function isBuffer(obj) {
+ return !!(obj != null &&
+ (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)
+ (obj.constructor &&
+ typeof obj.constructor.isBuffer === 'function' &&
+ obj.constructor.isBuffer(obj))
+ ))
+ }
+
+
+/***/ },
+/* 6 */
+/***/ function(module, exports) {
+
+ var SceneGraph = function(sceneProperties) {
+ var nodeCount = 1;
+
+ //todo: move merge to helpers section
+ function merge(parent, child) {
+ for (var prop in child) {
+ parent[prop] = child[prop];
+ }
+ return parent;
+ }
+
+ var SceneNode = function(name) {
+ nodeCount++;
+ this.parent = null;
+ this.children = {};
+ this.id = nodeCount;
+ this.name = 'n' + nodeCount;
+ if (typeof name !== 'undefined') {
+ this.name = name;
+ }
+ this.x = this.y = this.z = 0;
+ this.width = this.height = 0;
+ };
+
+ SceneNode.prototype.resize = function(width, height) {
+ if (width != null) {
+ this.width = width;
+ }
+ if (height != null) {
+ this.height = height;
+ }
+ };
+
+ SceneNode.prototype.moveTo = function(x, y, z) {
+ this.x = x != null ? x : this.x;
+ this.y = y != null ? y : this.y;
+ this.z = z != null ? z : this.z;
+ };
+
+ SceneNode.prototype.add = function(child) {
+ var name = child.name;
+ if (typeof this.children[name] === 'undefined') {
+ this.children[name] = child;
+ child.parent = this;
+ } else {
+ throw 'SceneGraph: child already exists: ' + name;
+ }
+ };
+
+ var RootNode = function() {
+ SceneNode.call(this, 'root');
+ this.properties = sceneProperties;
+ };
+
+ RootNode.prototype = new SceneNode();
+
+ var Shape = function(name, props) {
+ SceneNode.call(this, name);
+ this.properties = {
+ 'fill': '#000000'
+ };
+ if (typeof props !== 'undefined') {
+ merge(this.properties, props);
+ } else if (typeof name !== 'undefined' && typeof name !== 'string') {
+ throw 'SceneGraph: invalid node name';
+ }
+ };
+
+ Shape.prototype = new SceneNode();
+
+ var Group = function() {
+ Shape.apply(this, arguments);
+ this.type = 'group';
+ };
+
+ Group.prototype = new Shape();
+
+ var Rect = function() {
+ Shape.apply(this, arguments);
+ this.type = 'rect';
+ };
+
+ Rect.prototype = new Shape();
+
+ var Text = function(text) {
+ Shape.call(this);
+ this.type = 'text';
+ this.properties.text = text;
+ };
+
+ Text.prototype = new Shape();
+
+ var root = new RootNode();
+
+ this.Shape = {
+ 'Rect': Rect,
+ 'Text': Text,
+ 'Group': Group
+ };
+
+ this.root = root;
+ return this;
+ };
+
+ module.exports = SceneGraph;
+
+
+/***/ },
+/* 7 */
+/***/ function(module, exports) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/**
+ * Shallow object clone and merge
+ *
+ * @param a Object A
+ * @param b Object B
+ * @returns {Object} New object with all of A's properties, and all of B's properties, overwriting A's properties
+ */
+ exports.extend = function(a, b) {
+ var c = {};
+ for (var x in a) {
+ if (a.hasOwnProperty(x)) {
+ c[x] = a[x];
+ }
+ }
+ if (b != null) {
+ for (var y in b) {
+ if (b.hasOwnProperty(y)) {
+ c[y] = b[y];
+ }
+ }
+ }
+ return c;
+ };
+
+ /**
+ * Takes a k/v list of CSS properties and returns a rule
+ *
+ * @param props CSS properties object
+ */
+ exports.cssProps = function(props) {
+ var ret = [];
+ for (var p in props) {
+ if (props.hasOwnProperty(p)) {
+ ret.push(p + ':' + props[p]);
+ }
+ }
+ return ret.join(';');
+ };
+
+ /**
+ * Encodes HTML entities in a string
+ *
+ * @param str Input string
+ */
+ exports.encodeHtmlEntity = function(str) {
+ var buf = [];
+ var charCode = 0;
+ for (var i = str.length - 1; i >= 0; i--) {
+ charCode = str.charCodeAt(i);
+ if (charCode > 128) {
+ buf.unshift(['', charCode, ';'].join(''));
+ } else {
+ buf.unshift(str[i]);
+ }
+ }
+ return buf.join('');
+ };
+
+ /**
+ * Checks if an image exists
+ *
+ * @param src URL of image
+ * @param callback Callback to call once image status has been found
+ */
+ exports.imageExists = function(src, callback) {
+ var image = new Image();
+ image.onerror = function() {
+ callback.call(this, false);
+ };
+ image.onload = function() {
+ callback.call(this, true);
+ };
+ image.src = src;
+ };
+
+ /**
+ * Decodes HTML entities in a string
+ *
+ * @param str Input string
+ */
+ exports.decodeHtmlEntity = function(str) {
+ return str.replace(/(\d+);/g, function(match, dec) {
+ return String.fromCharCode(dec);
+ });
+ };
+
+
+ /**
+ * Returns an element's dimensions if it's visible, `false` otherwise.
+ *
+ * @param el DOM element
+ */
+ exports.dimensionCheck = function(el) {
+ var dimensions = {
+ height: el.clientHeight,
+ width: el.clientWidth
+ };
+
+ if (dimensions.height && dimensions.width) {
+ return dimensions;
+ } else {
+ return false;
+ }
+ };
+
+
+ /**
+ * Returns true if value is truthy or if it is "semantically truthy"
+ * @param val
+ */
+ exports.truthy = function(val) {
+ if (typeof val === 'string') {
+ return val === 'true' || val === 'yes' || val === '1' || val === 'on' || val === '✓';
+ }
+ return !!val;
+ };
+
+ /**
+ * Parses input into a well-formed CSS color
+ * @param val
+ */
+ exports.parseColor = function(val) {
+ var hexre = /(^(?:#?)[0-9a-f]{6}$)|(^(?:#?)[0-9a-f]{3}$)/i;
+ var rgbre = /^rgb\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
+ var rgbare = /^rgba\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0\.\d{1,}|1)\)$/;
+
+ var match = val.match(hexre);
+ var retval;
+
+ if (match !== null) {
+ retval = match[1] || match[2];
+ if (retval[0] !== '#') {
+ return '#' + retval;
+ } else {
+ return retval;
+ }
+ }
+
+ match = val.match(rgbre);
+
+ if (match !== null) {
+ retval = 'rgb(' + match.slice(1).join(',') + ')';
+ return retval;
+ }
+
+ match = val.match(rgbare);
+
+ if (match !== null) {
+ retval = 'rgba(' + match.slice(1).join(',') + ')';
+ return retval;
+ }
+
+ return null;
+ };
+
+ /**
+ * Provides the correct scaling ratio for canvas drawing operations on HiDPI screens (e.g. Retina displays)
+ */
+ exports.canvasRatio = function () {
+ var devicePixelRatio = 1;
+ var backingStoreRatio = 1;
+
+ if (global.document) {
+ var canvas = global.document.createElement('canvas');
+ if (canvas.getContext) {
+ var ctx = canvas.getContext('2d');
+ devicePixelRatio = global.devicePixelRatio || 1;
+ backingStoreRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
+ }
+ }
+
+ return devicePixelRatio / backingStoreRatio;
+ };
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 8 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {var DOM = __webpack_require__(9);
+
+ var SVG_NS = 'http://www.w3.org/2000/svg';
+ var NODE_TYPE_COMMENT = 8;
+
+ /**
+ * Generic SVG element creation function
+ *
+ * @param svg SVG context, set to null if new
+ * @param width Document width
+ * @param height Document height
+ */
+ exports.initSVG = function(svg, width, height) {
+ var defs, style, initialize = false;
+
+ if (svg && svg.querySelector) {
+ style = svg.querySelector('style');
+ if (style === null) {
+ initialize = true;
+ }
+ } else {
+ svg = DOM.newEl('svg', SVG_NS);
+ initialize = true;
+ }
+
+ if (initialize) {
+ defs = DOM.newEl('defs', SVG_NS);
+ style = DOM.newEl('style', SVG_NS);
+ DOM.setAttr(style, {
+ 'type': 'text/css'
+ });
+ defs.appendChild(style);
+ svg.appendChild(defs);
+ }
+
+ //IE throws an exception if this is set and Chrome requires it to be set
+ if (svg.webkitMatchesSelector) {
+ svg.setAttribute('xmlns', SVG_NS);
+ }
+
+ //Remove comment nodes
+ for (var i = 0; i < svg.childNodes.length; i++) {
+ if (svg.childNodes[i].nodeType === NODE_TYPE_COMMENT) {
+ svg.removeChild(svg.childNodes[i]);
+ }
+ }
+
+ //Remove CSS
+ while (style.childNodes.length) {
+ style.removeChild(style.childNodes[0]);
+ }
+
+ DOM.setAttr(svg, {
+ 'width': width,
+ 'height': height,
+ 'viewBox': '0 0 ' + width + ' ' + height,
+ 'preserveAspectRatio': 'none'
+ });
+
+ return svg;
+ };
+
+ /**
+ * Converts serialized SVG to a string suitable for data URI use
+ * @param svgString Serialized SVG string
+ * @param [base64] Use base64 encoding for data URI
+ */
+ exports.svgStringToDataURI = function() {
+ var rawPrefix = 'data:image/svg+xml;charset=UTF-8,';
+ var base64Prefix = 'data:image/svg+xml;charset=UTF-8;base64,';
+
+ return function(svgString, base64) {
+ if (base64) {
+ return base64Prefix + btoa(global.unescape(encodeURIComponent(svgString)));
+ } else {
+ return rawPrefix + encodeURIComponent(svgString);
+ }
+ };
+ }();
+
+ /**
+ * Returns serialized SVG with XML processing instructions
+ *
+ * @param svg SVG context
+ * @param stylesheets CSS stylesheets to include
+ */
+ exports.serializeSVG = function(svg, engineSettings) {
+ if (!global.XMLSerializer) return;
+ var serializer = new XMLSerializer();
+ var svgCSS = '';
+ var stylesheets = engineSettings.stylesheets;
+
+ //External stylesheets: Processing Instruction method
+ if (engineSettings.svgXMLStylesheet) {
+ var xml = DOM.createXML();
+ //Add directives
+ for (var i = stylesheets.length - 1; i >= 0; i--) {
+ var csspi = xml.createProcessingInstruction('xml-stylesheet', 'href="' + stylesheets[i] + '" rel="stylesheet"');
+ xml.insertBefore(csspi, xml.firstChild);
+ }
+
+ xml.removeChild(xml.documentElement);
+ svgCSS = serializer.serializeToString(xml);
+ }
+
+ var svgText = serializer.serializeToString(svg);
+ svgText = svgText.replace(/\&(\#[0-9]{2,}\;)/g, '&$1');
+ return svgCSS + svgText;
+ };
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 9 */
+/***/ function(module, exports) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/**
+ * Generic new DOM element function
+ *
+ * @param tag Tag to create
+ * @param namespace Optional namespace value
+ */
+ exports.newEl = function(tag, namespace) {
+ if (!global.document) return;
+
+ if (namespace == null) {
+ return global.document.createElement(tag);
+ } else {
+ return global.document.createElementNS(namespace, tag);
+ }
+ };
+
+ /**
+ * Generic setAttribute function
+ *
+ * @param el Reference to DOM element
+ * @param attrs Object with attribute keys and values
+ */
+ exports.setAttr = function (el, attrs) {
+ for (var a in attrs) {
+ el.setAttribute(a, attrs[a]);
+ }
+ };
+
+ /**
+ * Creates a XML document
+ * @private
+ */
+ exports.createXML = function() {
+ if (!global.DOMParser) return;
+ return new DOMParser().parseFromString(' ', 'application/xml');
+ };
+
+ /**
+ * Converts a value into an array of DOM nodes
+ *
+ * @param val A string, a NodeList, a Node, or an HTMLCollection
+ */
+ exports.getNodeArray = function(val) {
+ var retval = null;
+ if (typeof(val) == 'string') {
+ retval = document.querySelectorAll(val);
+ } else if (global.NodeList && val instanceof global.NodeList) {
+ retval = val;
+ } else if (global.Node && val instanceof global.Node) {
+ retval = [val];
+ } else if (global.HTMLCollection && val instanceof global.HTMLCollection) {
+ retval = val;
+ } else if (val instanceof Array) {
+ retval = val;
+ } else if (val === null) {
+ retval = [];
+ }
+
+ retval = Array.prototype.slice.call(retval);
+
+ return retval;
+ };
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 10 */
+/***/ function(module, exports) {
+
+ var Color = function(color, options) {
+ //todo: support rgba, hsla, and rrggbbaa notation
+ //todo: use CIELAB internally
+ //todo: add clamp function (with sign)
+ if (typeof color !== 'string') return;
+
+ this.original = color;
+
+ if (color.charAt(0) === '#') {
+ color = color.slice(1);
+ }
+
+ if (/[^a-f0-9]+/i.test(color)) return;
+
+ if (color.length === 3) {
+ color = color.replace(/./g, '$&$&');
+ }
+
+ if (color.length !== 6) return;
+
+ this.alpha = 1;
+
+ if (options && options.alpha) {
+ this.alpha = options.alpha;
+ }
+
+ this.set(parseInt(color, 16));
+ };
+
+ //todo: jsdocs
+ Color.rgb2hex = function(r, g, b) {
+ function format (decimal) {
+ var hex = (decimal | 0).toString(16);
+ if (decimal < 16) {
+ hex = '0' + hex;
+ }
+ return hex;
+ }
+
+ return [r, g, b].map(format).join('');
+ };
+
+ //todo: jsdocs
+ Color.hsl2rgb = function (h, s, l) {
+ var H = h / 60;
+ var C = (1 - Math.abs(2 * l - 1)) * s;
+ var X = C * (1 - Math.abs(parseInt(H) % 2 - 1));
+ var m = l - (C / 2);
+
+ var r = 0, g = 0, b = 0;
+
+ if (H >= 0 && H < 1) {
+ r = C;
+ g = X;
+ } else if (H >= 1 && H < 2) {
+ r = X;
+ g = C;
+ } else if (H >= 2 && H < 3) {
+ g = C;
+ b = X;
+ } else if (H >= 3 && H < 4) {
+ g = X;
+ b = C;
+ } else if (H >= 4 && H < 5) {
+ r = X;
+ b = C;
+ } else if (H >= 5 && H < 6) {
+ r = C;
+ b = X;
+ }
+
+ r += m;
+ g += m;
+ b += m;
+
+ r = parseInt(r * 255);
+ g = parseInt(g * 255);
+ b = parseInt(b * 255);
+
+ return [r, g, b];
+ };
+
+ /**
+ * Sets the color from a raw RGB888 integer
+ * @param raw RGB888 representation of color
+ */
+ //todo: refactor into a static method
+ //todo: factor out individual color spaces
+ //todo: add HSL, CIELAB, and CIELUV
+ Color.prototype.set = function (val) {
+ this.raw = val;
+
+ var r = (this.raw & 0xFF0000) >> 16;
+ var g = (this.raw & 0x00FF00) >> 8;
+ var b = (this.raw & 0x0000FF);
+
+ // BT.709
+ var y = 0.2126 * r + 0.7152 * g + 0.0722 * b;
+ var u = -0.09991 * r - 0.33609 * g + 0.436 * b;
+ var v = 0.615 * r - 0.55861 * g - 0.05639 * b;
+
+ this.rgb = {
+ r: r,
+ g: g,
+ b: b
+ };
+
+ this.yuv = {
+ y: y,
+ u: u,
+ v: v
+ };
+
+ return this;
+ };
+
+ /**
+ * Lighten or darken a color
+ * @param multiplier Amount to lighten or darken (-1 to 1)
+ */
+ Color.prototype.lighten = function(multiplier) {
+ var cm = Math.min(1, Math.max(0, Math.abs(multiplier))) * (multiplier < 0 ? -1 : 1);
+ var bm = (255 * cm) | 0;
+ var cr = Math.min(255, Math.max(0, this.rgb.r + bm));
+ var cg = Math.min(255, Math.max(0, this.rgb.g + bm));
+ var cb = Math.min(255, Math.max(0, this.rgb.b + bm));
+ var hex = Color.rgb2hex(cr, cg, cb);
+ return new Color(hex);
+ };
+
+ /**
+ * Output color in hex format
+ * @param addHash Add a hash character to the beginning of the output
+ */
+ Color.prototype.toHex = function(addHash) {
+ return (addHash ? '#' : '') + this.raw.toString(16);
+ };
+
+ /**
+ * Returns whether or not current color is lighter than another color
+ * @param color Color to compare against
+ */
+ Color.prototype.lighterThan = function(color) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ return this.yuv.y > color.yuv.y;
+ };
+
+ /**
+ * Returns the result of mixing current color with another color
+ * @param color Color to mix with
+ * @param multiplier How much to mix with the other color
+ */
+ /*
+ Color.prototype.mix = function (color, multiplier) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ var r = this.rgb.r;
+ var g = this.rgb.g;
+ var b = this.rgb.b;
+ var a = this.alpha;
+
+ var m = typeof multiplier !== 'undefined' ? multiplier : 0.5;
+
+ //todo: write a lerp function
+ r = r + m * (color.rgb.r - r);
+ g = g + m * (color.rgb.g - g);
+ b = b + m * (color.rgb.b - b);
+ a = a + m * (color.alpha - a);
+
+ return new Color(Color.rgbToHex(r, g, b), {
+ 'alpha': a
+ });
+ };
+ */
+
+ /**
+ * Returns the result of blending another color on top of current color with alpha
+ * @param color Color to blend on top of current color, i.e. "Ca"
+ */
+ //todo: see if .blendAlpha can be merged into .mix
+ Color.prototype.blendAlpha = function(color) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ var Ca = color;
+ var Cb = this;
+
+ //todo: write alpha blending function
+ var r = Ca.alpha * Ca.rgb.r + (1 - Ca.alpha) * Cb.rgb.r;
+ var g = Ca.alpha * Ca.rgb.g + (1 - Ca.alpha) * Cb.rgb.g;
+ var b = Ca.alpha * Ca.rgb.b + (1 - Ca.alpha) * Cb.rgb.b;
+
+ return new Color(Color.rgb2hex(r, g, b));
+ };
+
+ module.exports = Color;
+
+
+/***/ },
+/* 11 */
+/***/ function(module, exports) {
+
+ module.exports = {
+ 'version': '2.9.3',
+ 'svg_ns': 'http://www.w3.org/2000/svg'
+ };
+
+/***/ },
+/* 12 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var shaven = __webpack_require__(13);
+
+ var SVG = __webpack_require__(8);
+ var constants = __webpack_require__(11);
+ var utils = __webpack_require__(7);
+
+ var SVG_NS = constants.svg_ns;
+
+ var templates = {
+ 'element': function (options) {
+ var tag = options.tag;
+ var content = options.content || '';
+ delete options.tag;
+ delete options.content;
+ return [tag, content, options];
+ }
+ };
+
+ //todo: deprecate tag arg, infer tag from shape object
+ function convertShape (shape, tag) {
+ return templates.element({
+ 'tag': tag,
+ 'width': shape.width,
+ 'height': shape.height,
+ 'fill': shape.properties.fill
+ });
+ }
+
+ function textCss (properties) {
+ return utils.cssProps({
+ 'fill': properties.fill,
+ 'font-weight': properties.font.weight,
+ 'font-family': properties.font.family + ', monospace',
+ 'font-size': properties.font.size + properties.font.units
+ });
+ }
+
+ function outlinePath (bgWidth, bgHeight, outlineWidth) {
+ var outlineOffsetWidth = outlineWidth / 2;
+
+ return [
+ 'M', outlineOffsetWidth, outlineOffsetWidth,
+ 'H', bgWidth - outlineOffsetWidth,
+ 'V', bgHeight - outlineOffsetWidth,
+ 'H', outlineOffsetWidth,
+ 'V', 0,
+ 'M', 0, outlineOffsetWidth,
+ 'L', bgWidth, bgHeight - outlineOffsetWidth,
+ 'M', 0, bgHeight - outlineOffsetWidth,
+ 'L', bgWidth, outlineOffsetWidth
+ ].join(' ');
+ }
+
+ module.exports = function (sceneGraph, renderSettings) {
+ var engineSettings = renderSettings.engineSettings;
+ var stylesheets = engineSettings.stylesheets;
+ var stylesheetXml = stylesheets.map(function (stylesheet) {
+ return '';
+ }).join('\n');
+
+ var holderId = 'holder_' + Number(new Date()).toString(16);
+
+ var root = sceneGraph.root;
+ var textGroup = root.children.holderTextGroup;
+
+ var css = '#' + holderId + ' text { ' + textCss(textGroup.properties) + ' } ';
+
+ // push text down to be equally vertically aligned with canvas renderer
+ textGroup.y += textGroup.textPositionData.boundingBox.height * 0.8;
+
+ var wordTags = [];
+
+ Object.keys(textGroup.children).forEach(function (lineKey) {
+ var line = textGroup.children[lineKey];
+
+ Object.keys(line.children).forEach(function (wordKey) {
+ var word = line.children[wordKey];
+ var x = textGroup.x + line.x + word.x;
+ var y = textGroup.y + line.y + word.y;
+
+ var wordTag = templates.element({
+ 'tag': 'text',
+ 'content': word.properties.text,
+ 'x': x,
+ 'y': y
+ });
+
+ wordTags.push(wordTag);
+ });
+ });
+
+ var text = templates.element({
+ 'tag': 'g',
+ 'content': wordTags
+ });
+
+ var outline = null;
+
+ if (root.children.holderBg.properties.outline) {
+ var outlineProperties = root.children.holderBg.properties.outline;
+ outline = templates.element({
+ 'tag': 'path',
+ 'd': outlinePath(root.children.holderBg.width, root.children.holderBg.height, outlineProperties.width),
+ 'stroke-width': outlineProperties.width,
+ 'stroke': outlineProperties.fill,
+ 'fill': 'none'
+ });
+ }
+
+ var bg = convertShape(root.children.holderBg, 'rect');
+
+ var sceneContent = [];
+
+ sceneContent.push(bg);
+ if (outlineProperties) {
+ sceneContent.push(outline);
+ }
+ sceneContent.push(text);
+
+ var scene = templates.element({
+ 'tag': 'g',
+ 'id': holderId,
+ 'content': sceneContent
+ });
+
+ var style = templates.element({
+ 'tag': 'style',
+ //todo: figure out how to add CDATA directive
+ 'content': css,
+ 'type': 'text/css'
+ });
+
+ var defs = templates.element({
+ 'tag': 'defs',
+ 'content': style
+ });
+
+ var svg = templates.element({
+ 'tag': 'svg',
+ 'content': [defs, scene],
+ 'width': root.properties.width,
+ 'height': root.properties.height,
+ 'xmlns': SVG_NS,
+ 'viewBox': [0, 0, root.properties.width, root.properties.height].join(' '),
+ 'preserveAspectRatio': 'none'
+ });
+
+ var output = shaven(svg);
+
+ output = stylesheetXml + output[0];
+
+ var svgString = SVG.svgStringToDataURI(output, renderSettings.mode === 'background');
+ return svgString;
+ };
+
+/***/ },
+/* 13 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var escape = __webpack_require__(14)
+
+ // TODO: remove namespace
+
+ module.exports = function shaven (array, namespace, returnObject) {
+
+ 'use strict'
+
+ var i = 1
+ var doesEscape = true
+ var HTMLString
+ var attributeKey
+ var callback
+ var key
+
+
+ returnObject = returnObject || {}
+
+
+ function createElement (sugarString) {
+
+ var tags = sugarString.match(/^[\w-]+/)
+ var element = {
+ tag: tags ? tags[0] : 'div',
+ attr: {},
+ children: []
+ }
+ var id = sugarString.match(/#([\w-]+)/)
+ var reference = sugarString.match(/\$([\w-]+)/)
+ var classNames = sugarString.match(/\.[\w-]+/g)
+
+
+ // Assign id if is set
+ if (id) {
+ element.attr.id = id[1]
+
+ // Add element to the return object
+ returnObject[id[1]] = element
+ }
+
+ if (reference)
+ returnObject[reference[1]] = element
+
+ if (classNames)
+ element.attr.class = classNames.join(' ').replace(/\./g, '')
+
+ if (sugarString.match(/&$/g))
+ doesEscape = false
+
+ return element
+ }
+
+ function replacer (key, value) {
+
+ if (value === null || value === false || value === undefined)
+ return
+
+ if (typeof value !== 'string' && typeof value !== 'object')
+ return String(value)
+
+ return value
+ }
+
+ function escapeAttribute (string) {
+ return (string || string === 0) ?
+ String(string)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"') :
+ ''
+ }
+
+ function escapeHTML (string) {
+ return String(string)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''')
+ .replace(//g, '>')
+ }
+
+
+ if (typeof array[0] === 'string')
+ array[0] = createElement(array[0])
+
+ else if (Array.isArray(array[0]))
+ i = 0
+
+ else
+ throw new Error(
+ 'First element of array must be a string, ' +
+ 'or an array and not ' + JSON.stringify(array[0])
+ )
+
+
+ for (; i < array.length; i++) {
+
+ // Don't render element if value is false or null
+ if (array[i] === false || array[i] === null) {
+ array[0] = false
+ break
+ }
+
+ // Continue with next array value if current value is undefined or true
+ else if (array[i] === undefined || array[i] === true) {
+ continue
+ }
+
+ else if (typeof array[i] === 'string') {
+ if (doesEscape)
+ array[i] = escapeHTML(array[i])
+
+ array[0].children.push(array[i])
+ }
+
+ else if (typeof array[i] === 'number') {
+
+ array[0].children.push(array[i])
+ }
+
+ else if (Array.isArray(array[i])) {
+
+ if (Array.isArray(array[i][0])) {
+ array[i].reverse().forEach(function (subArray) {
+ array.splice(i + 1, 0, subArray)
+ })
+
+ if (i !== 0)
+ continue
+ i++
+ }
+
+ shaven(array[i], namespace, returnObject)
+
+ if (array[i][0])
+ array[0].children.push(array[i][0])
+ }
+
+ else if (typeof array[i] === 'function')
+ callback = array[i]
+
+
+ else if (typeof array[i] === 'object') {
+ for (attributeKey in array[i])
+ if (array[i].hasOwnProperty(attributeKey))
+ if (array[i][attributeKey] !== null &&
+ array[i][attributeKey] !== false)
+ if (attributeKey === 'style' &&
+ typeof array[i][attributeKey] === 'object')
+ array[0].attr[attributeKey] = JSON
+ .stringify(array[i][attributeKey], replacer)
+ .slice(2, -2)
+ .replace(/","/g, ';')
+ .replace(/":"/g, ':')
+ .replace(/\\"/g, '\'')
+
+ else
+ array[0].attr[attributeKey] = array[i][attributeKey]
+ }
+
+ else
+ throw new TypeError('"' + array[i] + '" is not allowed as a value.')
+ }
+
+
+ if (array[0] !== false) {
+
+ HTMLString = '<' + array[0].tag
+
+ for (key in array[0].attr)
+ if (array[0].attr.hasOwnProperty(key))
+ HTMLString += ' ' + key + '="' +
+ escapeAttribute(array[0].attr[key]) + '"'
+
+ HTMLString += '>'
+
+ array[0].children.forEach(function (child) {
+ HTMLString += child
+ })
+
+ HTMLString += '' + array[0].tag + '>'
+
+ array[0] = HTMLString
+ }
+
+ // Return root element on index 0
+ returnObject[0] = array[0]
+
+ if (callback)
+ callback(array[0])
+
+ // returns object containing all elements with an id and the root element
+ return returnObject
+ }
+
+
+/***/ },
+/* 14 */
+/***/ function(module, exports) {
+
+ /*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */
+
+ 'use strict';
+
+ /**
+ * Module variables.
+ * @private
+ */
+
+ var matchHtmlRegExp = /["'&<>]/;
+
+ /**
+ * Module exports.
+ * @public
+ */
+
+ module.exports = escapeHtml;
+
+ /**
+ * Escape special characters in the given string of html.
+ *
+ * @param {string} string The string to escape for inserting into HTML
+ * @return {string}
+ * @public
+ */
+
+ function escapeHtml(string) {
+ var str = '' + string;
+ var match = matchHtmlRegExp.exec(str);
+
+ if (!match) {
+ return str;
+ }
+
+ var escape;
+ var html = '';
+ var index = 0;
+ var lastIndex = 0;
+
+ for (index = match.index; index < str.length; index++) {
+ switch (str.charCodeAt(index)) {
+ case 34: // "
+ escape = '"';
+ break;
+ case 38: // &
+ escape = '&';
+ break;
+ case 39: // '
+ escape = ''';
+ break;
+ case 60: // <
+ escape = '<';
+ break;
+ case 62: // >
+ escape = '>';
+ break;
+ default:
+ continue;
+ }
+
+ if (lastIndex !== index) {
+ html += str.substring(lastIndex, index);
+ }
+
+ lastIndex = index + 1;
+ html += escape;
+ }
+
+ return lastIndex !== index
+ ? html + str.substring(lastIndex, index)
+ : html;
+ }
+
+
+/***/ },
+/* 15 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var DOM = __webpack_require__(9);
+ var utils = __webpack_require__(7);
+
+ module.exports = (function() {
+ var canvas = DOM.newEl('canvas');
+ var ctx = null;
+
+ return function(sceneGraph) {
+ if (ctx == null) {
+ ctx = canvas.getContext('2d');
+ }
+
+ var dpr = utils.canvasRatio();
+ var root = sceneGraph.root;
+ canvas.width = dpr * root.properties.width;
+ canvas.height = dpr * root.properties.height ;
+ ctx.textBaseline = 'middle';
+
+ var bg = root.children.holderBg;
+ var bgWidth = dpr * bg.width;
+ var bgHeight = dpr * bg.height;
+ //todo: parametrize outline width (e.g. in scene object)
+ var outlineWidth = 2;
+ var outlineOffsetWidth = outlineWidth / 2;
+
+ ctx.fillStyle = bg.properties.fill;
+ ctx.fillRect(0, 0, bgWidth, bgHeight);
+
+ if (bg.properties.outline) {
+ //todo: abstract this into a method
+ ctx.strokeStyle = bg.properties.outline.fill;
+ ctx.lineWidth = bg.properties.outline.width;
+ ctx.moveTo(outlineOffsetWidth, outlineOffsetWidth);
+ // TL, TR, BR, BL
+ ctx.lineTo(bgWidth - outlineOffsetWidth, outlineOffsetWidth);
+ ctx.lineTo(bgWidth - outlineOffsetWidth, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(outlineOffsetWidth, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(outlineOffsetWidth, outlineOffsetWidth);
+ // Diagonals
+ ctx.moveTo(0, outlineOffsetWidth);
+ ctx.lineTo(bgWidth, bgHeight - outlineOffsetWidth);
+ ctx.moveTo(0, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(bgWidth, outlineOffsetWidth);
+ ctx.stroke();
+ }
+
+ var textGroup = root.children.holderTextGroup;
+ ctx.font = textGroup.properties.font.weight + ' ' + (dpr * textGroup.properties.font.size) + textGroup.properties.font.units + ' ' + textGroup.properties.font.family + ', monospace';
+ ctx.fillStyle = textGroup.properties.fill;
+
+ for (var lineKey in textGroup.children) {
+ var line = textGroup.children[lineKey];
+ for (var wordKey in line.children) {
+ var word = line.children[wordKey];
+ var x = dpr * (textGroup.x + line.x + word.x);
+ var y = dpr * (textGroup.y + line.y + word.y + (textGroup.properties.leading / 2));
+
+ ctx.fillText(word.properties.text, x, y);
+ }
+ }
+
+ return canvas.toDataURL('image/png');
+ };
+ })();
+
+/***/ }
+/******/ ])
+});
+;
+(function(ctx, isMeteorPackage) {
+ if (isMeteorPackage) {
+ Holder = ctx.Holder;
+ }
+})(this, typeof Meteor !== 'undefined' && typeof Package !== 'undefined');
diff --git a/vendor/assets/javascripts/holderjs/test/index.js b/vendor/assets/javascripts/holderjs/test/index.js
new file mode 100644
index 000000000..f28434550
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/test/index.js
@@ -0,0 +1,19 @@
+var runner = require('./runner');
+var server = require('node-http-server');
+
+server.deploy({
+ 'port': 8000,
+ 'root': __dirname
+});
+
+runner({
+ 'browserName': 'chrome'
+}, function (err, retval) {
+ console.log('Test result: ', retval);
+
+ if (!retval) {
+ process.exitCode = -1;
+ }
+
+ process.exit();
+});
\ No newline at end of file
diff --git a/vendor/assets/javascripts/holderjs/test/phantom.js b/vendor/assets/javascripts/holderjs/test/phantom.js
new file mode 100644
index 000000000..83b5d87c2
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/test/phantom.js
@@ -0,0 +1,15 @@
+var page = require('webpage').create();
+
+page.onConsoleMessage = function (message) {
+ console.log('Page: ', message);
+};
+
+page.open('index.html', function (status) {
+ console.log(status);
+
+ if (status === 'success') {
+ page.render('phantom.png');
+ }
+
+ phantom.exit();
+});
diff --git a/vendor/assets/javascripts/holderjs/test/renderperf/releases/holder-master/holder.js b/vendor/assets/javascripts/holderjs/test/renderperf/releases/holder-master/holder.js
new file mode 100644
index 000000000..bd508edf8
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/test/renderperf/releases/holder-master/holder.js
@@ -0,0 +1,3050 @@
+/*!
+
+Holder - client side image placeholders
+Version 2.9.3+5jpuk
+© 2016 Ivan Malopinsky - http://imsky.co
+
+Site: http://holderjs.com
+Issues: https://github.com/imsky/holder/issues
+License: MIT
+
+*/
+(function (window) {
+ if (!window.document) return;
+ var document = window.document;
+
+ //https://github.com/inexorabletash/polyfill/blob/master/web.js
+ if (!document.querySelectorAll) {
+ document.querySelectorAll = function (selectors) {
+ var style = document.createElement('style'), elements = [], element;
+ document.documentElement.firstChild.appendChild(style);
+ document._qsa = [];
+
+ style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}';
+ window.scrollBy(0, 0);
+ style.parentNode.removeChild(style);
+
+ while (document._qsa.length) {
+ element = document._qsa.shift();
+ element.style.removeAttribute('x-qsa');
+ elements.push(element);
+ }
+ document._qsa = null;
+ return elements;
+ };
+ }
+
+ if (!document.querySelector) {
+ document.querySelector = function (selectors) {
+ var elements = document.querySelectorAll(selectors);
+ return (elements.length) ? elements[0] : null;
+ };
+ }
+
+ if (!document.getElementsByClassName) {
+ document.getElementsByClassName = function (classNames) {
+ classNames = String(classNames).replace(/^|\s+/g, '.');
+ return document.querySelectorAll(classNames);
+ };
+ }
+
+ //https://github.com/inexorabletash/polyfill
+ // ES5 15.2.3.14 Object.keys ( O )
+ // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys
+ if (!Object.keys) {
+ Object.keys = function (o) {
+ if (o !== Object(o)) { throw TypeError('Object.keys called on non-object'); }
+ var ret = [], p;
+ for (p in o) {
+ if (Object.prototype.hasOwnProperty.call(o, p)) {
+ ret.push(p);
+ }
+ }
+ return ret;
+ };
+ }
+
+ // ES5 15.4.4.18 Array.prototype.forEach ( callbackfn [ , thisArg ] )
+ // From https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach
+ if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function (fun /*, thisp */) {
+ if (this === void 0 || this === null) { throw TypeError(); }
+
+ var t = Object(this);
+ var len = t.length >>> 0;
+ if (typeof fun !== "function") { throw TypeError(); }
+
+ var thisp = arguments[1], i;
+ for (i = 0; i < len; i++) {
+ if (i in t) {
+ fun.call(thisp, t[i], i, t);
+ }
+ }
+ };
+ }
+
+ //https://github.com/inexorabletash/polyfill/blob/master/web.js
+ (function (global) {
+ var B64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+ global.atob = global.atob || function (input) {
+ input = String(input);
+ var position = 0,
+ output = [],
+ buffer = 0, bits = 0, n;
+
+ input = input.replace(/\s/g, '');
+ if ((input.length % 4) === 0) { input = input.replace(/=+$/, ''); }
+ if ((input.length % 4) === 1) { throw Error('InvalidCharacterError'); }
+ if (/[^+/0-9A-Za-z]/.test(input)) { throw Error('InvalidCharacterError'); }
+
+ while (position < input.length) {
+ n = B64_ALPHABET.indexOf(input.charAt(position));
+ buffer = (buffer << 6) | n;
+ bits += 6;
+
+ if (bits === 24) {
+ output.push(String.fromCharCode((buffer >> 16) & 0xFF));
+ output.push(String.fromCharCode((buffer >> 8) & 0xFF));
+ output.push(String.fromCharCode(buffer & 0xFF));
+ bits = 0;
+ buffer = 0;
+ }
+ position += 1;
+ }
+
+ if (bits === 12) {
+ buffer = buffer >> 4;
+ output.push(String.fromCharCode(buffer & 0xFF));
+ } else if (bits === 18) {
+ buffer = buffer >> 2;
+ output.push(String.fromCharCode((buffer >> 8) & 0xFF));
+ output.push(String.fromCharCode(buffer & 0xFF));
+ }
+
+ return output.join('');
+ };
+
+ global.btoa = global.btoa || function (input) {
+ input = String(input);
+ var position = 0,
+ out = [],
+ o1, o2, o3,
+ e1, e2, e3, e4;
+
+ if (/[^\x00-\xFF]/.test(input)) { throw Error('InvalidCharacterError'); }
+
+ while (position < input.length) {
+ o1 = input.charCodeAt(position++);
+ o2 = input.charCodeAt(position++);
+ o3 = input.charCodeAt(position++);
+
+ // 111111 112222 222233 333333
+ e1 = o1 >> 2;
+ e2 = ((o1 & 0x3) << 4) | (o2 >> 4);
+ e3 = ((o2 & 0xf) << 2) | (o3 >> 6);
+ e4 = o3 & 0x3f;
+
+ if (position === input.length + 2) {
+ e3 = 64; e4 = 64;
+ }
+ else if (position === input.length + 1) {
+ e4 = 64;
+ }
+
+ out.push(B64_ALPHABET.charAt(e1),
+ B64_ALPHABET.charAt(e2),
+ B64_ALPHABET.charAt(e3),
+ B64_ALPHABET.charAt(e4));
+ }
+
+ return out.join('');
+ };
+ }(window));
+
+ //https://gist.github.com/jimeh/332357
+ if (!Object.prototype.hasOwnProperty){
+ /*jshint -W001, -W103 */
+ Object.prototype.hasOwnProperty = function(prop) {
+ var proto = this.__proto__ || this.constructor.prototype;
+ return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
+ };
+ /*jshint +W001, +W103 */
+ }
+
+ // @license http://opensource.org/licenses/MIT
+ // copyright Paul Irish 2015
+
+
+ // Date.now() is supported everywhere except IE8. For IE8 we use the Date.now polyfill
+ // github.com/Financial-Times/polyfill-service/blob/master/polyfills/Date.now/polyfill.js
+ // as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values
+
+ // if you want values similar to what you'd get with real perf.now, place this towards the head of the page
+ // but in reality, you're just getting the delta between now() calls, so it's not terribly important where it's placed
+
+
+ (function(){
+
+ if ('performance' in window === false) {
+ window.performance = {};
+ }
+
+ Date.now = (Date.now || function () { // thanks IE8
+ return new Date().getTime();
+ });
+
+ if ('now' in window.performance === false){
+
+ var nowOffset = Date.now();
+
+ if (performance.timing && performance.timing.navigationStart){
+ nowOffset = performance.timing.navigationStart;
+ }
+
+ window.performance.now = function now(){
+ return Date.now() - nowOffset;
+ };
+ }
+
+ })();
+
+ //requestAnimationFrame polyfill for older Firefox/Chrome versions
+ if (!window.requestAnimationFrame) {
+ if (window.webkitRequestAnimationFrame && window.webkitCancelAnimationFrame) {
+ //https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/requestAnimationFrame/polyfill-webkit.js
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return webkitRequestAnimationFrame(function () {
+ callback(global.performance.now());
+ });
+ };
+
+ global.cancelAnimationFrame = global.webkitCancelAnimationFrame;
+ }(window));
+ } else if (window.mozRequestAnimationFrame && window.mozCancelAnimationFrame) {
+ //https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/requestAnimationFrame/polyfill-moz.js
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return mozRequestAnimationFrame(function () {
+ callback(global.performance.now());
+ });
+ };
+
+ global.cancelAnimationFrame = global.mozCancelAnimationFrame;
+ }(window));
+ } else {
+ (function (global) {
+ global.requestAnimationFrame = function (callback) {
+ return global.setTimeout(callback, 1000 / 60);
+ };
+
+ global.cancelAnimationFrame = global.clearTimeout;
+ })(window);
+ }
+ }
+})(this);
+
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["Holder"] = factory();
+ else
+ root["Holder"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /*
+ Holder.js - client side image placeholders
+ (c) 2012-2015 Ivan Malopinsky - http://imsky.co
+ */
+
+ module.exports = __webpack_require__(1);
+
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/*
+ Holder.js - client side image placeholders
+ (c) 2012-2016 Ivan Malopinsky - http://imsky.co
+ */
+
+ //Libraries and functions
+ var onDomReady = __webpack_require__(2);
+ var querystring = __webpack_require__(3);
+
+ var SceneGraph = __webpack_require__(6);
+ var utils = __webpack_require__(7);
+ var SVG = __webpack_require__(8);
+ var DOM = __webpack_require__(9);
+ var Color = __webpack_require__(10);
+ var constants = __webpack_require__(11);
+
+ var svgRenderer = __webpack_require__(12);
+ var sgCanvasRenderer = __webpack_require__(15);
+
+ var extend = utils.extend;
+ var dimensionCheck = utils.dimensionCheck;
+
+ //Constants and definitions
+ var SVG_NS = constants.svg_ns;
+
+ var Holder = {
+ version: constants.version,
+
+ /**
+ * Adds a theme to default settings
+ *
+ * @param {string} name Theme name
+ * @param {Object} theme Theme object, with foreground, background, size, font, and fontweight properties.
+ */
+ addTheme: function(name, theme) {
+ name != null && theme != null && (App.settings.themes[name] = theme);
+ delete App.vars.cache.themeKeys;
+ return this;
+ },
+
+ /**
+ * Appends a placeholder to an element
+ *
+ * @param {string} src Placeholder URL string
+ * @param el A selector or a reference to a DOM node
+ */
+ addImage: function(src, el) {
+ //todo: use jquery fallback if available for all QSA references
+ var nodes = DOM.getNodeArray(el);
+ nodes.forEach(function (node) {
+ var img = DOM.newEl('img');
+ var domProps = {};
+ domProps[App.setup.dataAttr] = src;
+ DOM.setAttr(img, domProps);
+ node.appendChild(img);
+ });
+ return this;
+ },
+
+ /**
+ * Sets whether or not an image is updated on resize.
+ * If an image is set to be updated, it is immediately rendered.
+ *
+ * @param {Object} el Image DOM element
+ * @param {Boolean} value Resizable update flag value
+ */
+ setResizeUpdate: function(el, value) {
+ if (el.holderData) {
+ el.holderData.resizeUpdate = !!value;
+ if (el.holderData.resizeUpdate) {
+ updateResizableElements(el);
+ }
+ }
+ },
+
+ /**
+ * Runs Holder with options. By default runs Holder on all images with "holder.js" in their source attributes.
+ *
+ * @param {Object} userOptions Options object, can contain domain, themes, images, and bgnodes properties
+ */
+ run: function(userOptions) {
+ console.log(userOptions)
+ //todo: split processing into separate queues
+ userOptions = userOptions || {};
+ var engineSettings = {};
+ var options = extend(App.settings, userOptions);
+
+ App.vars.preempted = true;
+ App.vars.dataAttr = options.dataAttr || App.setup.dataAttr;
+
+ engineSettings.renderer = options.renderer ? options.renderer : App.setup.renderer;
+ if (App.setup.renderers.join(',').indexOf(engineSettings.renderer) === -1) {
+ engineSettings.renderer = App.setup.supportsSVG ? 'svg' : (App.setup.supportsCanvas ? 'canvas' : 'html');
+ }
+
+ var images = DOM.getNodeArray(options.images);
+ var bgnodes = DOM.getNodeArray(options.bgnodes);
+ var stylenodes = DOM.getNodeArray(options.stylenodes);
+ var objects = DOM.getNodeArray(options.objects);
+
+ engineSettings.stylesheets = [];
+ engineSettings.svgXMLStylesheet = true;
+ engineSettings.noFontFallback = !!options.noFontFallback;
+ engineSettings.noBackgroundSize = !!options.noBackgroundSize;
+
+ stylenodes.forEach(function (styleNode) {
+ if (styleNode.attributes.rel && styleNode.attributes.href && styleNode.attributes.rel.value == 'stylesheet') {
+ var href = styleNode.attributes.href.value;
+ //todo: write isomorphic relative-to-absolute URL function
+ var proxyLink = DOM.newEl('a');
+ proxyLink.href = href;
+ var stylesheetURL = proxyLink.protocol + '//' + proxyLink.host + proxyLink.pathname + proxyLink.search;
+ engineSettings.stylesheets.push(stylesheetURL);
+ }
+ });
+
+ bgnodes.forEach(function (bgNode) {
+ //Skip processing background nodes if getComputedStyle is unavailable, since only modern browsers would be able to use canvas or SVG to render to background
+ if (!global.getComputedStyle) return;
+ var backgroundImage = global.getComputedStyle(bgNode, null).getPropertyValue('background-image');
+ var dataBackgroundImage = bgNode.getAttribute('data-background-src');
+ var rawURL = dataBackgroundImage || backgroundImage;
+
+ var holderURL = null;
+ var holderString = options.domain + '/';
+ var holderStringIndex = rawURL.indexOf(holderString);
+
+ if (holderStringIndex === 0) {
+ holderURL = rawURL;
+ } else if (holderStringIndex === 1 && rawURL[0] === '?') {
+ holderURL = rawURL.slice(1);
+ } else {
+ var fragment = rawURL.substr(holderStringIndex).match(/([^\"]*)"?\)/);
+ if (fragment !== null) {
+ holderURL = fragment[1];
+ } else if (rawURL.indexOf('url(') === 0) {
+ throw 'Holder: unable to parse background URL: ' + rawURL;
+ }
+ }
+
+ if (holderURL) {
+ var holderFlags = parseURL(holderURL, options);
+ if (holderFlags) {
+ prepareDOMElement({
+ mode: 'background',
+ el: bgNode,
+ flags: holderFlags,
+ engineSettings: engineSettings
+ });
+ }
+ }
+ });
+
+ objects.forEach(function (object) {
+ var objectAttr = {};
+
+ try {
+ objectAttr.data = object.getAttribute('data');
+ objectAttr.dataSrc = object.getAttribute(App.vars.dataAttr);
+ } catch (e) {}
+
+ var objectHasSrcURL = objectAttr.data != null && objectAttr.data.indexOf(options.domain) === 0;
+ var objectHasDataSrcURL = objectAttr.dataSrc != null && objectAttr.dataSrc.indexOf(options.domain) === 0;
+
+ if (objectHasSrcURL) {
+ prepareImageElement(options, engineSettings, objectAttr.data, object);
+ } else if (objectHasDataSrcURL) {
+ prepareImageElement(options, engineSettings, objectAttr.dataSrc, object);
+ }
+ });
+
+ images.forEach(function (image) {
+ var imageAttr = {};
+
+ try {
+ imageAttr.src = image.getAttribute('src');
+ imageAttr.dataSrc = image.getAttribute(App.vars.dataAttr);
+ imageAttr.rendered = image.getAttribute('data-holder-rendered');
+ } catch (e) {}
+
+ var imageHasSrc = imageAttr.src != null;
+ var imageHasDataSrcURL = imageAttr.dataSrc != null && imageAttr.dataSrc.indexOf(options.domain) === 0;
+ var imageRendered = imageAttr.rendered != null && imageAttr.rendered == 'true';
+
+ if (imageHasSrc) {
+ if (imageAttr.src.indexOf(options.domain) === 0) {
+ prepareImageElement(options, engineSettings, imageAttr.src, image);
+ } else if (imageHasDataSrcURL) {
+ //Image has a valid data-src and an invalid src
+ if (imageRendered) {
+ //If the placeholder has already been render, re-render it
+ prepareImageElement(options, engineSettings, imageAttr.dataSrc, image);
+ } else {
+ //If the placeholder has not been rendered, check if the image exists and render a fallback if it doesn't
+ (function(src, options, engineSettings, dataSrc, image) {
+ utils.imageExists(src, function(exists) {
+ if (!exists) {
+ prepareImageElement(options, engineSettings, dataSrc, image);
+ }
+ });
+ })(imageAttr.src, options, engineSettings, imageAttr.dataSrc, image);
+ }
+ }
+ } else if (imageHasDataSrcURL) {
+ prepareImageElement(options, engineSettings, imageAttr.dataSrc, image);
+ }
+ });
+
+ return this;
+ }
+ };
+
+ var App = {
+ settings: {
+ domain: 'holder.js',
+ images: 'img',
+ objects: 'object',
+ bgnodes: 'body .holderjs',
+ stylenodes: 'head link.holderjs',
+ themes: {
+ 'gray': {
+ bg: '#EEEEEE',
+ fg: '#AAAAAA'
+ },
+ 'social': {
+ bg: '#3a5a97',
+ fg: '#FFFFFF'
+ },
+ 'industrial': {
+ bg: '#434A52',
+ fg: '#C2F200'
+ },
+ 'sky': {
+ bg: '#0D8FDB',
+ fg: '#FFFFFF'
+ },
+ 'vine': {
+ bg: '#39DBAC',
+ fg: '#1E292C'
+ },
+ 'lava': {
+ bg: '#F8591A',
+ fg: '#1C2846'
+ }
+ }
+ },
+ defaults: {
+ size: 10,
+ units: 'pt',
+ scale: 1 / 16
+ }
+ };
+
+ /**
+ * Processes provided source attribute and sets up the appropriate rendering workflow
+ *
+ * @private
+ * @param options Instance options from Holder.run
+ * @param renderSettings Instance configuration
+ * @param src Image URL
+ * @param el Image DOM element
+ */
+ function prepareImageElement(options, engineSettings, src, el) {
+ var holderFlags = parseURL(src.substr(src.lastIndexOf(options.domain)), options);
+ if (holderFlags) {
+ prepareDOMElement({
+ mode: null,
+ el: el,
+ flags: holderFlags,
+ engineSettings: engineSettings
+ });
+ }
+ }
+
+ /**
+ * Processes a Holder URL and extracts configuration from query string
+ *
+ * @private
+ * @param url URL
+ * @param instanceOptions Instance options from Holder.run
+ */
+ function parseURL(url, instanceOptions) {
+ var holder = {
+ theme: extend(App.settings.themes.gray, null),
+ stylesheets: instanceOptions.stylesheets,
+ instanceOptions: instanceOptions
+ };
+
+ var firstQuestionMark = url.indexOf('?');
+ var parts = [url];
+
+ if (firstQuestionMark !== -1) {
+ parts = [url.slice(0, firstQuestionMark), url.slice(firstQuestionMark + 1)];
+ }
+
+ var basics = parts[0].split('/');
+
+ holder.holderURL = url;
+
+ var dimensions = basics[1];
+ var dimensionData = dimensions.match(/([\d]+p?)x([\d]+p?)/);
+
+ if (!dimensionData) return false;
+
+ holder.fluid = dimensions.indexOf('p') !== -1;
+
+ holder.dimensions = {
+ width: dimensionData[1].replace('p', '%'),
+ height: dimensionData[2].replace('p', '%')
+ };
+
+ if (parts.length === 2) {
+ var options = querystring.parse(parts[1]);
+
+ // Colors
+
+ if (options.bg) {
+ holder.theme.bg = utils.parseColor(options.bg);
+ }
+
+ if (options.fg) {
+ holder.theme.fg = utils.parseColor(options.fg);
+ }
+
+ //todo: add automatic foreground to themes without foreground
+ if (options.bg && !options.fg) {
+ holder.autoFg = true;
+ }
+
+ if (options.theme && holder.instanceOptions.themes.hasOwnProperty(options.theme)) {
+ holder.theme = extend(holder.instanceOptions.themes[options.theme], null);
+ }
+
+ // Text
+
+ if (options.text) {
+ holder.text = options.text;
+ }
+
+ if (options.textmode) {
+ holder.textmode = options.textmode;
+ }
+
+ if (options.size) {
+ holder.size = options.size;
+ }
+
+ if (options.font) {
+ holder.font = options.font;
+ }
+
+ if (options.align) {
+ holder.align = options.align;
+ }
+
+ if (options.lineWrap) {
+ holder.lineWrap = options.lineWrap;
+ }
+
+ holder.nowrap = utils.truthy(options.nowrap);
+
+ // Miscellaneous
+
+ holder.auto = utils.truthy(options.auto);
+
+ holder.outline = utils.truthy(options.outline);
+
+ if (utils.truthy(options.random)) {
+ App.vars.cache.themeKeys = App.vars.cache.themeKeys || Object.keys(holder.instanceOptions.themes);
+ var _theme = App.vars.cache.themeKeys[0 | Math.random() * App.vars.cache.themeKeys.length];
+ holder.theme = extend(holder.instanceOptions.themes[_theme], null);
+ }
+ }
+
+ return holder;
+ }
+
+ /**
+ * Modifies the DOM to fit placeholders and sets up resizable image callbacks (for fluid and automatically sized placeholders)
+ *
+ * @private
+ * @param settings DOM prep settings
+ */
+ function prepareDOMElement(prepSettings) {
+ var mode = prepSettings.mode;
+ var el = prepSettings.el;
+ var flags = prepSettings.flags;
+ var _engineSettings = prepSettings.engineSettings;
+ var dimensions = flags.dimensions,
+ theme = flags.theme;
+ var dimensionsCaption = dimensions.width + 'x' + dimensions.height;
+ mode = mode == null ? (flags.fluid ? 'fluid' : 'image') : mode;
+ var holderTemplateRe = /holder_([a-z]+)/g;
+ var dimensionsInText = false;
+
+ if (flags.text != null) {
+ theme.text = flags.text;
+
+ // SVG embedding doesn't parse Unicode properly
+ if (el.nodeName.toLowerCase() === 'object') {
+ var textLines = theme.text.split('\\n');
+ for (var k = 0; k < textLines.length; k++) {
+ textLines[k] = utils.encodeHtmlEntity(textLines[k]);
+ }
+ theme.text = textLines.join('\\n');
+ }
+ }
+
+ if (theme.text) {
+ var holderTemplateMatches = theme.text.match(holderTemplateRe);
+
+ if (holderTemplateMatches !== null) {
+ //todo: optimize template replacement
+ holderTemplateMatches.forEach(function (match) {
+ if (match === 'holder_dimensions') {
+ theme.text = theme.text.replace(match, dimensionsCaption);
+ }
+ });
+ }
+ }
+
+ var holderURL = flags.holderURL;
+ var engineSettings = extend(_engineSettings, null);
+
+ if (flags.font) {
+ /*
+ If external fonts are used in a placeholder rendered with SVG, Holder falls back to canvas.
+
+ This is done because Firefox and Chrome disallow embedded SVGs from referencing external assets.
+ The workaround is either to change the placeholder tag from to or to use the canvas renderer.
+ */
+ theme.font = flags.font;
+ if (!engineSettings.noFontFallback && el.nodeName.toLowerCase() === 'img' && App.setup.supportsCanvas && engineSettings.renderer === 'svg') {
+ engineSettings = extend(engineSettings, {
+ renderer: 'canvas'
+ });
+ }
+ }
+
+ //Chrome and Opera require a quick 10ms re-render if web fonts are used with canvas
+ if (flags.font && engineSettings.renderer == 'canvas') {
+ engineSettings.reRender = true;
+ }
+
+ if (mode == 'background') {
+ if (el.getAttribute('data-background-src') == null) {
+ DOM.setAttr(el, {
+ 'data-background-src': holderURL
+ });
+ }
+ } else {
+ var domProps = {};
+ domProps[App.vars.dataAttr] = holderURL;
+ DOM.setAttr(el, domProps);
+ }
+
+ flags.theme = theme;
+
+ //todo consider using all renderSettings in holderData
+ el.holderData = {
+ flags: flags,
+ engineSettings: engineSettings
+ };
+
+ if (mode == 'image' || mode == 'fluid') {
+ DOM.setAttr(el, {
+ 'alt': theme.text ? (dimensionsInText ? theme.text : theme.text + ' [' + dimensionsCaption + ']') : dimensionsCaption
+ });
+ }
+
+ var renderSettings = {
+ mode: mode,
+ el: el,
+ holderSettings: {
+ dimensions: dimensions,
+ theme: theme,
+ flags: flags
+ },
+ engineSettings: engineSettings
+ };
+
+ if (mode == 'image') {
+ if (!flags.auto) {
+ el.style.width = dimensions.width + 'px';
+ el.style.height = dimensions.height + 'px';
+ }
+
+ if (engineSettings.renderer == 'html') {
+ el.style.backgroundColor = theme.bg;
+ } else {
+ render(renderSettings);
+
+ if (flags.textmode == 'exact') {
+ el.holderData.resizeUpdate = true;
+ App.vars.resizableImages.push(el);
+ updateResizableElements(el);
+ }
+ }
+ } else if (mode == 'background' && engineSettings.renderer != 'html') {
+ render(renderSettings);
+ } else if (mode == 'fluid') {
+ el.holderData.resizeUpdate = true;
+
+ if (dimensions.height.slice(-1) == '%') {
+ el.style.height = dimensions.height;
+ } else if (flags.auto == null || !flags.auto) {
+ el.style.height = dimensions.height + 'px';
+ }
+ if (dimensions.width.slice(-1) == '%') {
+ el.style.width = dimensions.width;
+ } else if (flags.auto == null || !flags.auto) {
+ el.style.width = dimensions.width + 'px';
+ }
+ if (el.style.display == 'inline' || el.style.display === '' || el.style.display == 'none') {
+ el.style.display = 'block';
+ }
+
+ setInitialDimensions(el);
+
+ if (engineSettings.renderer == 'html') {
+ el.style.backgroundColor = theme.bg;
+ } else {
+ App.vars.resizableImages.push(el);
+ updateResizableElements(el);
+ }
+ }
+ }
+
+ /**
+ * Core function that takes output from renderers and sets it as the source or background-image of the target element
+ *
+ * @private
+ * @param renderSettings Renderer settings
+ */
+ function render(renderSettings) {
+ var image = null;
+ var mode = renderSettings.mode;
+ var el = renderSettings.el;
+ var holderSettings = renderSettings.holderSettings;
+ var engineSettings = renderSettings.engineSettings;
+
+ switch (engineSettings.renderer) {
+ case 'svg':
+ if (!App.setup.supportsSVG) return;
+ break;
+ case 'canvas':
+ if (!App.setup.supportsCanvas) return;
+ break;
+ default:
+ return;
+ }
+
+ //todo: move generation of scene up to flag generation to reduce extra object creation
+ var scene = {
+ width: holderSettings.dimensions.width,
+ height: holderSettings.dimensions.height,
+ theme: holderSettings.theme,
+ flags: holderSettings.flags
+ };
+
+ var sceneGraph = buildSceneGraph(scene);
+
+ function getRenderedImage() {
+ var image = null;
+ switch (engineSettings.renderer) {
+ case 'canvas':
+ image = sgCanvasRenderer(sceneGraph, renderSettings);
+ break;
+ case 'svg':
+ image = svgRenderer(sceneGraph, renderSettings);
+ break;
+ default:
+ throw 'Holder: invalid renderer: ' + engineSettings.renderer;
+ }
+
+ return image;
+ }
+
+ image = getRenderedImage();
+
+ if (image == null) {
+ throw 'Holder: couldn\'t render placeholder';
+ }
+
+ //todo: add canvas rendering
+ if (mode == 'background') {
+ el.style.backgroundImage = 'url(' + image + ')';
+
+ if (!engineSettings.noBackgroundSize) {
+ el.style.backgroundSize = scene.width + 'px ' + scene.height + 'px';
+ }
+ } else {
+ if (el.nodeName.toLowerCase() === 'img') {
+ DOM.setAttr(el, {
+ 'src': image
+ });
+ } else if (el.nodeName.toLowerCase() === 'object') {
+ DOM.setAttr(el, {
+ 'data': image,
+ 'type': 'image/svg+xml'
+ });
+ }
+ if (engineSettings.reRender) {
+ global.setTimeout(function () {
+ var image = getRenderedImage();
+ if (image == null) {
+ throw 'Holder: couldn\'t render placeholder';
+ }
+ //todo: refactor this code into a function
+ if (el.nodeName.toLowerCase() === 'img') {
+ DOM.setAttr(el, {
+ 'src': image
+ });
+ } else if (el.nodeName.toLowerCase() === 'object') {
+ DOM.setAttr(el, {
+ 'data': image,
+ 'type': 'image/svg+xml'
+ });
+ }
+ }, 150);
+ }
+ }
+ //todo: account for re-rendering
+ DOM.setAttr(el, {
+ 'data-holder-rendered': true
+ });
+ }
+
+ /**
+ * Core function that takes a Holder scene description and builds a scene graph
+ *
+ * @private
+ * @param scene Holder scene object
+ */
+ //todo: make this function reusable
+ //todo: merge app defaults and setup properties into the scene argument
+ function buildSceneGraph(scene) {
+ var fontSize = App.defaults.size;
+ if (parseFloat(scene.theme.size)) {
+ fontSize = scene.theme.size;
+ } else if (parseFloat(scene.flags.size)) {
+ fontSize = scene.flags.size;
+ }
+
+ scene.font = {
+ family: scene.theme.font ? scene.theme.font : 'Arial, Helvetica, Open Sans, sans-serif',
+ size: textSize(scene.width, scene.height, fontSize, App.defaults.scale),
+ units: scene.theme.units ? scene.theme.units : App.defaults.units,
+ weight: scene.theme.fontweight ? scene.theme.fontweight : 'bold'
+ };
+
+ scene.text = scene.theme.text || Math.floor(scene.width) + 'x' + Math.floor(scene.height);
+
+ scene.noWrap = scene.theme.nowrap || scene.flags.nowrap;
+
+ scene.align = scene.theme.align || scene.flags.align || 'center';
+
+ switch (scene.flags.textmode) {
+ case 'literal':
+ scene.text = scene.flags.dimensions.width + 'x' + scene.flags.dimensions.height;
+ break;
+ case 'exact':
+ if (!scene.flags.exactDimensions) break;
+ scene.text = Math.floor(scene.flags.exactDimensions.width) + 'x' + Math.floor(scene.flags.exactDimensions.height);
+ break;
+ }
+
+ var lineWrap = scene.flags.lineWrap || App.setup.lineWrapRatio;
+ var sceneMargin = scene.width * lineWrap;
+ var maxLineWidth = sceneMargin;
+
+ var sceneGraph = new SceneGraph({
+ width: scene.width,
+ height: scene.height
+ });
+
+ var Shape = sceneGraph.Shape;
+
+ var holderBg = new Shape.Rect('holderBg', {
+ fill: scene.theme.bg
+ });
+
+ holderBg.resize(scene.width, scene.height);
+ sceneGraph.root.add(holderBg);
+
+ if (scene.flags.outline) {
+ var outlineColor = new Color(holderBg.properties.fill);
+ outlineColor = outlineColor.lighten(outlineColor.lighterThan('7f7f7f') ? -0.1 : 0.1);
+ holderBg.properties.outline = {
+ fill: outlineColor.toHex(true),
+ width: 2
+ };
+ }
+
+ var holderTextColor = scene.theme.fg;
+
+ if (scene.flags.autoFg) {
+ var holderBgColor = new Color(holderBg.properties.fill);
+ var lightColor = new Color('fff');
+ var darkColor = new Color('000', {
+ 'alpha': 0.285714
+ });
+
+ holderTextColor = holderBgColor.blendAlpha(holderBgColor.lighterThan('7f7f7f') ? darkColor : lightColor).toHex(true);
+ }
+
+ var holderTextGroup = new Shape.Group('holderTextGroup', {
+ text: scene.text,
+ align: scene.align,
+ font: scene.font,
+ fill: holderTextColor
+ });
+
+ holderTextGroup.moveTo(null, null, 1);
+ sceneGraph.root.add(holderTextGroup);
+
+ var tpdata = holderTextGroup.textPositionData = stagingRenderer(sceneGraph);
+ if (!tpdata) {
+ throw 'Holder: staging fallback not supported yet.';
+ }
+ holderTextGroup.properties.leading = tpdata.boundingBox.height;
+
+ var textNode = null;
+ var line = null;
+
+ function finalizeLine(parent, line, width, height) {
+ line.width = width;
+ line.height = height;
+ parent.width = Math.max(parent.width, line.width);
+ parent.height += line.height;
+ }
+
+ if (tpdata.lineCount > 1) {
+ var offsetX = 0;
+ var offsetY = 0;
+ var lineIndex = 0;
+ var lineKey;
+ line = new Shape.Group('line' + lineIndex);
+
+ //Double margin so that left/right-aligned next is not flush with edge of image
+ if (scene.align === 'left' || scene.align === 'right') {
+ maxLineWidth = scene.width * (1 - (1 - lineWrap) * 2);
+ }
+
+ for (var i = 0; i < tpdata.words.length; i++) {
+ var word = tpdata.words[i];
+ textNode = new Shape.Text(word.text);
+ var newline = word.text == '\\n';
+ if (!scene.noWrap && (offsetX + word.width >= maxLineWidth || newline === true)) {
+ finalizeLine(holderTextGroup, line, offsetX, holderTextGroup.properties.leading);
+ holderTextGroup.add(line);
+ offsetX = 0;
+ offsetY += holderTextGroup.properties.leading;
+ lineIndex += 1;
+ line = new Shape.Group('line' + lineIndex);
+ line.y = offsetY;
+ }
+ if (newline === true) {
+ continue;
+ }
+ textNode.moveTo(offsetX, 0);
+ offsetX += tpdata.spaceWidth + word.width;
+ line.add(textNode);
+ }
+
+ finalizeLine(holderTextGroup, line, offsetX, holderTextGroup.properties.leading);
+ holderTextGroup.add(line);
+
+ if (scene.align === 'left') {
+ holderTextGroup.moveTo(scene.width - sceneMargin, null, null);
+ } else if (scene.align === 'right') {
+ for (lineKey in holderTextGroup.children) {
+ line = holderTextGroup.children[lineKey];
+ line.moveTo(scene.width - line.width, null, null);
+ }
+
+ holderTextGroup.moveTo(0 - (scene.width - sceneMargin), null, null);
+ } else {
+ for (lineKey in holderTextGroup.children) {
+ line = holderTextGroup.children[lineKey];
+ line.moveTo((holderTextGroup.width - line.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo((scene.width - holderTextGroup.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo(null, (scene.height - holderTextGroup.height) / 2, null);
+
+ //If the text exceeds vertical space, move it down so the first line is visible
+ if ((scene.height - holderTextGroup.height) / 2 < 0) {
+ holderTextGroup.moveTo(null, 0, null);
+ }
+ } else {
+ textNode = new Shape.Text(scene.text);
+ line = new Shape.Group('line0');
+ line.add(textNode);
+ holderTextGroup.add(line);
+
+ if (scene.align === 'left') {
+ holderTextGroup.moveTo(scene.width - sceneMargin, null, null);
+ } else if (scene.align === 'right') {
+ holderTextGroup.moveTo(0 - (scene.width - sceneMargin), null, null);
+ } else {
+ holderTextGroup.moveTo((scene.width - tpdata.boundingBox.width) / 2, null, null);
+ }
+
+ holderTextGroup.moveTo(null, (scene.height - tpdata.boundingBox.height) / 2, null);
+ }
+
+ //todo: renderlist
+ return sceneGraph;
+ }
+
+ /**
+ * Adaptive text sizing function
+ *
+ * @private
+ * @param width Parent width
+ * @param height Parent height
+ * @param fontSize Requested text size
+ * @param scale Proportional scale of text
+ */
+ function textSize(width, height, fontSize, scale) {
+ var stageWidth = parseInt(width, 10);
+ var stageHeight = parseInt(height, 10);
+
+ var bigSide = Math.max(stageWidth, stageHeight);
+ var smallSide = Math.min(stageWidth, stageHeight);
+
+ var newHeight = 0.8 * Math.min(smallSide, bigSide * scale);
+ return Math.round(Math.max(fontSize, newHeight));
+ }
+
+ /**
+ * Iterates over resizable (fluid or auto) placeholders and renders them
+ *
+ * @private
+ * @param element Optional element selector, specified only if a specific element needs to be re-rendered
+ */
+ function updateResizableElements(element) {
+ var images;
+ if (element == null || element.nodeType == null) {
+ images = App.vars.resizableImages;
+ } else {
+ images = [element];
+ }
+ for (var i = 0, l = images.length; i < l; i++) {
+ var el = images[i];
+ if (el.holderData) {
+ var flags = el.holderData.flags;
+ var dimensions = dimensionCheck(el);
+ if (dimensions) {
+ if (!el.holderData.resizeUpdate) {
+ continue;
+ }
+
+ if (flags.fluid && flags.auto) {
+ var fluidConfig = el.holderData.fluidConfig;
+ switch (fluidConfig.mode) {
+ case 'width':
+ dimensions.height = dimensions.width / fluidConfig.ratio;
+ break;
+ case 'height':
+ dimensions.width = dimensions.height * fluidConfig.ratio;
+ break;
+ }
+ }
+
+ var settings = {
+ mode: 'image',
+ holderSettings: {
+ dimensions: dimensions,
+ theme: flags.theme,
+ flags: flags
+ },
+ el: el,
+ engineSettings: el.holderData.engineSettings
+ };
+
+ if (flags.textmode == 'exact') {
+ flags.exactDimensions = dimensions;
+ settings.holderSettings.dimensions = flags.dimensions;
+ }
+
+ render(settings);
+ } else {
+ setInvisible(el);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets up aspect ratio metadata for fluid placeholders, in order to preserve proportions when resizing
+ *
+ * @private
+ * @param el Image DOM element
+ */
+ function setInitialDimensions(el) {
+ if (el.holderData) {
+ var dimensions = dimensionCheck(el);
+ if (dimensions) {
+ var flags = el.holderData.flags;
+
+ var fluidConfig = {
+ fluidHeight: flags.dimensions.height.slice(-1) == '%',
+ fluidWidth: flags.dimensions.width.slice(-1) == '%',
+ mode: null,
+ initialDimensions: dimensions
+ };
+
+ if (fluidConfig.fluidWidth && !fluidConfig.fluidHeight) {
+ fluidConfig.mode = 'width';
+ fluidConfig.ratio = fluidConfig.initialDimensions.width / parseFloat(flags.dimensions.height);
+ } else if (!fluidConfig.fluidWidth && fluidConfig.fluidHeight) {
+ fluidConfig.mode = 'height';
+ fluidConfig.ratio = parseFloat(flags.dimensions.width) / fluidConfig.initialDimensions.height;
+ }
+
+ el.holderData.fluidConfig = fluidConfig;
+ } else {
+ setInvisible(el);
+ }
+ }
+ }
+
+ /**
+ * Iterates through all current invisible images, and if they're visible, renders them and removes them from further checks. Runs every animation frame.
+ *
+ * @private
+ */
+ function visibilityCheck() {
+ var renderableImages = [];
+ var keys = Object.keys(App.vars.invisibleImages);
+ var el;
+
+ keys.forEach(function (key) {
+ el = App.vars.invisibleImages[key];
+ if (dimensionCheck(el) && el.nodeName.toLowerCase() == 'img') {
+ renderableImages.push(el);
+ delete App.vars.invisibleImages[key];
+ }
+ });
+
+ if (renderableImages.length) {
+ Holder.run({
+ images: renderableImages
+ });
+ }
+
+ // Done to prevent 100% CPU usage via aggressive calling of requestAnimationFrame
+ setTimeout(function () {
+ global.requestAnimationFrame(visibilityCheck);
+ }, 10);
+ }
+
+ /**
+ * Starts checking for invisible placeholders if not doing so yet. Does nothing otherwise.
+ *
+ * @private
+ */
+ function startVisibilityCheck() {
+ if (!App.vars.visibilityCheckStarted) {
+ global.requestAnimationFrame(visibilityCheck);
+ App.vars.visibilityCheckStarted = true;
+ }
+ }
+
+ /**
+ * Sets a unique ID for an image detected to be invisible and adds it to the map of invisible images checked by visibilityCheck
+ *
+ * @private
+ * @param el Invisible DOM element
+ */
+ function setInvisible(el) {
+ if (!el.holderData.invisibleId) {
+ App.vars.invisibleId += 1;
+ App.vars.invisibleImages['i' + App.vars.invisibleId] = el;
+ el.holderData.invisibleId = App.vars.invisibleId;
+ }
+ }
+
+ //todo: see if possible to convert stagingRenderer to use HTML only
+ var stagingRenderer = (function() {
+ var svg = null,
+ stagingText = null,
+ stagingTextNode = null;
+ return function(graph) {
+ var rootNode = graph.root;
+ if (App.setup.supportsSVG) {
+ var firstTimeSetup = false;
+ var tnode = function(text) {
+ return document.createTextNode(text);
+ };
+ if (svg == null || svg.parentNode !== document.body) {
+ firstTimeSetup = true;
+ }
+
+ svg = SVG.initSVG(svg, rootNode.properties.width, rootNode.properties.height);
+ //Show staging element before staging
+ svg.style.display = 'block';
+
+ if (firstTimeSetup) {
+ stagingText = DOM.newEl('text', SVG_NS);
+ stagingTextNode = tnode(null);
+ DOM.setAttr(stagingText, {
+ x: 0
+ });
+ stagingText.appendChild(stagingTextNode);
+ svg.appendChild(stagingText);
+ document.body.appendChild(svg);
+ svg.style.visibility = 'hidden';
+ svg.style.position = 'absolute';
+ svg.style.top = '-100%';
+ svg.style.left = '-100%';
+ //todo: workaround for zero-dimension tag in Opera 12
+ //svg.setAttribute('width', 0);
+ //svg.setAttribute('height', 0);
+ }
+
+ var holderTextGroup = rootNode.children.holderTextGroup;
+ var htgProps = holderTextGroup.properties;
+ DOM.setAttr(stagingText, {
+ 'y': htgProps.font.size,
+ 'style': utils.cssProps({
+ 'font-weight': htgProps.font.weight,
+ 'font-size': htgProps.font.size + htgProps.font.units,
+ 'font-family': htgProps.font.family
+ })
+ });
+
+ //Get bounding box for the whole string (total width and height)
+ stagingTextNode.nodeValue = htgProps.text;
+ var stagingTextBBox = stagingText.getBBox();
+
+ //Get line count and split the string into words
+ var lineCount = Math.ceil(stagingTextBBox.width / rootNode.properties.width);
+ var words = htgProps.text.split(' ');
+ var newlines = htgProps.text.match(/\\n/g);
+ lineCount += newlines == null ? 0 : newlines.length;
+
+ //Get bounding box for the string with spaces removed
+ stagingTextNode.nodeValue = htgProps.text.replace(/[ ]+/g, '');
+ var computedNoSpaceLength = stagingText.getComputedTextLength();
+
+ //Compute average space width
+ var diffLength = stagingTextBBox.width - computedNoSpaceLength;
+ var spaceWidth = Math.round(diffLength / Math.max(1, words.length - 1));
+
+ //Get widths for every word with space only if there is more than one line
+ var wordWidths = [];
+ if (lineCount > 1) {
+ stagingTextNode.nodeValue = '';
+ for (var i = 0; i < words.length; i++) {
+ if (words[i].length === 0) continue;
+ stagingTextNode.nodeValue = utils.decodeHtmlEntity(words[i]);
+ var bbox = stagingText.getBBox();
+ wordWidths.push({
+ text: words[i],
+ width: bbox.width
+ });
+ }
+ }
+
+ //Hide staging element after staging
+ svg.style.display = 'none';
+
+ return {
+ spaceWidth: spaceWidth,
+ lineCount: lineCount,
+ boundingBox: stagingTextBBox,
+ words: wordWidths
+ };
+ } else {
+ //todo: canvas fallback for measuring text on android 2.3
+ return false;
+ }
+ };
+ })();
+
+ //Helpers
+
+ /**
+ * Prevents a function from being called too often, waits until a timer elapses to call it again
+ *
+ * @param fn Function to call
+ */
+ function debounce(fn) {
+ if (!App.vars.debounceTimer) fn.call(this);
+ if (App.vars.debounceTimer) global.clearTimeout(App.vars.debounceTimer);
+ App.vars.debounceTimer = global.setTimeout(function() {
+ App.vars.debounceTimer = null;
+ fn.call(this);
+ }, App.setup.debounce);
+ }
+
+ /**
+ * Holder-specific resize/orientation change callback, debounced to prevent excessive execution
+ */
+ function resizeEvent() {
+ debounce(function() {
+ updateResizableElements(null);
+ });
+ }
+
+ //Set up flags
+
+ for (var flag in App.flags) {
+ if (!App.flags.hasOwnProperty(flag)) continue;
+ App.flags[flag].match = function(val) {
+ return val.match(this.regex);
+ };
+ }
+
+ //Properties set once on setup
+
+ App.setup = {
+ renderer: 'html',
+ debounce: 100,
+ ratio: 1,
+ supportsCanvas: false,
+ supportsSVG: false,
+ lineWrapRatio: 0.9,
+ dataAttr: 'data-src',
+ renderers: ['html', 'canvas', 'svg']
+ };
+
+ //Properties modified during runtime
+
+ App.vars = {
+ preempted: false,
+ resizableImages: [],
+ invisibleImages: {},
+ invisibleId: 0,
+ visibilityCheckStarted: false,
+ debounceTimer: null,
+ cache: {}
+ };
+
+ //Pre-flight
+
+ (function() {
+ var canvas = DOM.newEl('canvas');
+
+ if (canvas.getContext) {
+ if (canvas.toDataURL('image/png').indexOf('data:image/png') != -1) {
+ App.setup.renderer = 'canvas';
+ App.setup.supportsCanvas = true;
+ }
+ }
+
+ if (!!document.createElementNS && !!document.createElementNS(SVG_NS, 'svg').createSVGRect) {
+ App.setup.renderer = 'svg';
+ App.setup.supportsSVG = true;
+ }
+ })();
+
+ //Starts checking for invisible placeholders
+ startVisibilityCheck();
+
+ if (onDomReady) {
+ onDomReady(function() {
+ if (!App.vars.preempted) {
+ Holder.run();
+ }
+ if (global.addEventListener) {
+ global.addEventListener('resize', resizeEvent, false);
+ global.addEventListener('orientationchange', resizeEvent, false);
+ } else {
+ global.attachEvent('onresize', resizeEvent);
+ }
+
+ if (typeof global.Turbolinks == 'object') {
+ global.document.addEventListener('page:change', function() {
+ Holder.run();
+ });
+ }
+ });
+ }
+
+ module.exports = Holder;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 2 */
+/***/ function(module, exports) {
+
+ /*!
+ * onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license
+ *
+ * Specially modified to work with Holder.js
+ */
+
+ function _onDomReady(win) {
+ //Lazy loading fix for Firefox < 3.6
+ //http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html
+ if (document.readyState == null && document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", function DOMContentLoaded() {
+ document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
+ document.readyState = "complete";
+ }, false);
+ document.readyState = "loading";
+ }
+
+ var doc = win.document,
+ docElem = doc.documentElement,
+
+ LOAD = "load",
+ FALSE = false,
+ ONLOAD = "on"+LOAD,
+ COMPLETE = "complete",
+ READYSTATE = "readyState",
+ ATTACHEVENT = "attachEvent",
+ DETACHEVENT = "detachEvent",
+ ADDEVENTLISTENER = "addEventListener",
+ DOMCONTENTLOADED = "DOMContentLoaded",
+ ONREADYSTATECHANGE = "onreadystatechange",
+ REMOVEEVENTLISTENER = "removeEventListener",
+
+ // W3C Event model
+ w3c = ADDEVENTLISTENER in doc,
+ _top = FALSE,
+
+ // isReady: Is the DOM ready to be used? Set to true once it occurs.
+ isReady = FALSE,
+
+ // Callbacks pending execution until DOM is ready
+ callbacks = [];
+
+ // Handle when the DOM is ready
+ function ready( fn ) {
+ if ( !isReady ) {
+
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !doc.body ) {
+ return defer( ready );
+ }
+
+ // Remember that the DOM is ready
+ isReady = true;
+
+ // Execute all callbacks
+ while ( fn = callbacks.shift() ) {
+ defer( fn );
+ }
+ }
+ }
+
+ // The ready event handler
+ function completed( event ) {
+ // readyState === "complete" is good enough for us to call the dom ready in oldIE
+ if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {
+ detach();
+ ready();
+ }
+ }
+
+ // Clean-up method for dom ready events
+ function detach() {
+ if ( w3c ) {
+ doc[REMOVEEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );
+ win[REMOVEEVENTLISTENER]( LOAD, completed, FALSE );
+ } else {
+ doc[DETACHEVENT]( ONREADYSTATECHANGE, completed );
+ win[DETACHEVENT]( ONLOAD, completed );
+ }
+ }
+
+ // Defers a function, scheduling it to run after the current call stack has cleared.
+ function defer( fn, wait ) {
+ // Allow 0 to be passed
+ setTimeout( fn, +wait >= 0 ? wait : 1 );
+ }
+
+ // Attach the listeners:
+
+ // Catch cases where onDomReady is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( doc[READYSTATE] === COMPLETE ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ defer( ready );
+
+ // Standards-based browsers support DOMContentLoaded
+ } else if ( w3c ) {
+ // Use the handy event callback
+ doc[ADDEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );
+
+ // A fallback to window.onload, that will always work
+ win[ADDEVENTLISTENER]( LOAD, completed, FALSE );
+
+ // If IE event model is used
+ } else {
+ // Ensure firing before onload, maybe late but safe also for iframes
+ doc[ATTACHEVENT]( ONREADYSTATECHANGE, completed );
+
+ // A fallback to window.onload, that will always work
+ win[ATTACHEVENT]( ONLOAD, completed );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ try {
+ _top = win.frameElement == null && docElem;
+ } catch(e) {}
+
+ if ( _top && _top.doScroll ) {
+ (function doScrollCheck() {
+ if ( !isReady ) {
+ try {
+ // Use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ _top.doScroll("left");
+ } catch(e) {
+ return defer( doScrollCheck, 50 );
+ }
+
+ // detach all dom ready events
+ detach();
+
+ // and execute any waiting functions
+ ready();
+ }
+ })();
+ }
+ }
+
+ function onDomReady( fn ) {
+ // If DOM is ready, execute the function (async), otherwise wait
+ isReady ? defer( fn ) : callbacks.push( fn );
+ }
+
+ // Add version
+ onDomReady.version = "1.4.0";
+ // Add method to check if DOM is ready
+ onDomReady.isReady = function(){
+ return isReady;
+ };
+
+ return onDomReady;
+ }
+
+ module.exports = typeof window !== "undefined" && _onDomReady(window);
+
+/***/ },
+/* 3 */
+/***/ function(module, exports, __webpack_require__) {
+
+ //Modified version of component/querystring
+ //Changes: updated dependencies, dot notation parsing, JSHint fixes
+ //Fork at https://github.com/imsky/querystring
+
+ /**
+ * Module dependencies.
+ */
+
+ var encode = encodeURIComponent;
+ var decode = decodeURIComponent;
+ var trim = __webpack_require__(4);
+ var type = __webpack_require__(5);
+
+ var arrayRegex = /(\w+)\[(\d+)\]/;
+ var objectRegex = /\w+\.\w+/;
+
+ /**
+ * Parse the given query `str`.
+ *
+ * @param {String} str
+ * @return {Object}
+ * @api public
+ */
+
+ exports.parse = function(str){
+ if ('string' !== typeof str) return {};
+
+ str = trim(str);
+ if ('' === str) return {};
+ if ('?' === str.charAt(0)) str = str.slice(1);
+
+ var obj = {};
+ var pairs = str.split('&');
+ for (var i = 0; i < pairs.length; i++) {
+ var parts = pairs[i].split('=');
+ var key = decode(parts[0]);
+ var m, ctx, prop;
+
+ if (m = arrayRegex.exec(key)) {
+ obj[m[1]] = obj[m[1]] || [];
+ obj[m[1]][m[2]] = decode(parts[1]);
+ continue;
+ }
+
+ if (m = objectRegex.test(key)) {
+ m = key.split('.');
+ ctx = obj;
+
+ while (m.length) {
+ prop = m.shift();
+
+ if (!prop.length) continue;
+
+ if (!ctx[prop]) {
+ ctx[prop] = {};
+ } else if (ctx[prop] && typeof ctx[prop] !== 'object') {
+ break;
+ }
+
+ if (!m.length) {
+ ctx[prop] = decode(parts[1]);
+ }
+
+ ctx = ctx[prop];
+ }
+
+ continue;
+ }
+
+ obj[parts[0]] = null == parts[1] ? '' : decode(parts[1]);
+ }
+
+ return obj;
+ };
+
+ /**
+ * Stringify the given `obj`.
+ *
+ * @param {Object} obj
+ * @return {String}
+ * @api public
+ */
+
+ exports.stringify = function(obj){
+ if (!obj) return '';
+ var pairs = [];
+
+ for (var key in obj) {
+ var value = obj[key];
+
+ if ('array' == type(value)) {
+ for (var i = 0; i < value.length; ++i) {
+ pairs.push(encode(key + '[' + i + ']') + '=' + encode(value[i]));
+ }
+ continue;
+ }
+
+ pairs.push(encode(key) + '=' + encode(obj[key]));
+ }
+
+ return pairs.join('&');
+ };
+
+
+/***/ },
+/* 4 */
+/***/ function(module, exports) {
+
+
+ exports = module.exports = trim;
+
+ function trim(str){
+ return str.replace(/^\s*|\s*$/g, '');
+ }
+
+ exports.left = function(str){
+ return str.replace(/^\s*/, '');
+ };
+
+ exports.right = function(str){
+ return str.replace(/\s*$/, '');
+ };
+
+
+/***/ },
+/* 5 */
+/***/ function(module, exports) {
+
+ /**
+ * toString ref.
+ */
+
+ var toString = Object.prototype.toString;
+
+ /**
+ * Return the type of `val`.
+ *
+ * @param {Mixed} val
+ * @return {String}
+ * @api public
+ */
+
+ module.exports = function(val){
+ switch (toString.call(val)) {
+ case '[object Date]': return 'date';
+ case '[object RegExp]': return 'regexp';
+ case '[object Arguments]': return 'arguments';
+ case '[object Array]': return 'array';
+ case '[object Error]': return 'error';
+ }
+
+ if (val === null) return 'null';
+ if (val === undefined) return 'undefined';
+ if (val !== val) return 'nan';
+ if (val && val.nodeType === 1) return 'element';
+
+ if (isBuffer(val)) return 'buffer';
+
+ val = val.valueOf
+ ? val.valueOf()
+ : Object.prototype.valueOf.apply(val);
+
+ return typeof val;
+ };
+
+ // code borrowed from https://github.com/feross/is-buffer/blob/master/index.js
+ function isBuffer(obj) {
+ return !!(obj != null &&
+ (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)
+ (obj.constructor &&
+ typeof obj.constructor.isBuffer === 'function' &&
+ obj.constructor.isBuffer(obj))
+ ))
+ }
+
+
+/***/ },
+/* 6 */
+/***/ function(module, exports) {
+
+ var SceneGraph = function(sceneProperties) {
+ var nodeCount = 1;
+
+ //todo: move merge to helpers section
+ function merge(parent, child) {
+ for (var prop in child) {
+ parent[prop] = child[prop];
+ }
+ return parent;
+ }
+
+ var SceneNode = function(name) {
+ nodeCount++;
+ this.parent = null;
+ this.children = {};
+ this.id = nodeCount;
+ this.name = 'n' + nodeCount;
+ if (typeof name !== 'undefined') {
+ this.name = name;
+ }
+ this.x = this.y = this.z = 0;
+ this.width = this.height = 0;
+ };
+
+ SceneNode.prototype.resize = function(width, height) {
+ if (width != null) {
+ this.width = width;
+ }
+ if (height != null) {
+ this.height = height;
+ }
+ };
+
+ SceneNode.prototype.moveTo = function(x, y, z) {
+ this.x = x != null ? x : this.x;
+ this.y = y != null ? y : this.y;
+ this.z = z != null ? z : this.z;
+ };
+
+ SceneNode.prototype.add = function(child) {
+ var name = child.name;
+ if (typeof this.children[name] === 'undefined') {
+ this.children[name] = child;
+ child.parent = this;
+ } else {
+ throw 'SceneGraph: child already exists: ' + name;
+ }
+ };
+
+ var RootNode = function() {
+ SceneNode.call(this, 'root');
+ this.properties = sceneProperties;
+ };
+
+ RootNode.prototype = new SceneNode();
+
+ var Shape = function(name, props) {
+ SceneNode.call(this, name);
+ this.properties = {
+ 'fill': '#000000'
+ };
+ if (typeof props !== 'undefined') {
+ merge(this.properties, props);
+ } else if (typeof name !== 'undefined' && typeof name !== 'string') {
+ throw 'SceneGraph: invalid node name';
+ }
+ };
+
+ Shape.prototype = new SceneNode();
+
+ var Group = function() {
+ Shape.apply(this, arguments);
+ this.type = 'group';
+ };
+
+ Group.prototype = new Shape();
+
+ var Rect = function() {
+ Shape.apply(this, arguments);
+ this.type = 'rect';
+ };
+
+ Rect.prototype = new Shape();
+
+ var Text = function(text) {
+ Shape.call(this);
+ this.type = 'text';
+ this.properties.text = text;
+ };
+
+ Text.prototype = new Shape();
+
+ var root = new RootNode();
+
+ this.Shape = {
+ 'Rect': Rect,
+ 'Text': Text,
+ 'Group': Group
+ };
+
+ this.root = root;
+ return this;
+ };
+
+ module.exports = SceneGraph;
+
+
+/***/ },
+/* 7 */
+/***/ function(module, exports) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/**
+ * Shallow object clone and merge
+ *
+ * @param a Object A
+ * @param b Object B
+ * @returns {Object} New object with all of A's properties, and all of B's properties, overwriting A's properties
+ */
+ exports.extend = function(a, b) {
+ var c = {};
+ for (var x in a) {
+ if (a.hasOwnProperty(x)) {
+ c[x] = a[x];
+ }
+ }
+ if (b != null) {
+ for (var y in b) {
+ if (b.hasOwnProperty(y)) {
+ c[y] = b[y];
+ }
+ }
+ }
+ return c;
+ };
+
+ /**
+ * Takes a k/v list of CSS properties and returns a rule
+ *
+ * @param props CSS properties object
+ */
+ exports.cssProps = function(props) {
+ var ret = [];
+ for (var p in props) {
+ if (props.hasOwnProperty(p)) {
+ ret.push(p + ':' + props[p]);
+ }
+ }
+ return ret.join(';');
+ };
+
+ /**
+ * Encodes HTML entities in a string
+ *
+ * @param str Input string
+ */
+ exports.encodeHtmlEntity = function(str) {
+ var buf = [];
+ var charCode = 0;
+ for (var i = str.length - 1; i >= 0; i--) {
+ charCode = str.charCodeAt(i);
+ if (charCode > 128) {
+ buf.unshift(['', charCode, ';'].join(''));
+ } else {
+ buf.unshift(str[i]);
+ }
+ }
+ return buf.join('');
+ };
+
+ /**
+ * Checks if an image exists
+ *
+ * @param src URL of image
+ * @param callback Callback to call once image status has been found
+ */
+ exports.imageExists = function(src, callback) {
+ var image = new Image();
+ image.onerror = function() {
+ callback.call(this, false);
+ };
+ image.onload = function() {
+ callback.call(this, true);
+ };
+ image.src = src;
+ };
+
+ /**
+ * Decodes HTML entities in a string
+ *
+ * @param str Input string
+ */
+ exports.decodeHtmlEntity = function(str) {
+ return str.replace(/(\d+);/g, function(match, dec) {
+ return String.fromCharCode(dec);
+ });
+ };
+
+
+ /**
+ * Returns an element's dimensions if it's visible, `false` otherwise.
+ *
+ * @param el DOM element
+ */
+ exports.dimensionCheck = function(el) {
+ var dimensions = {
+ height: el.clientHeight,
+ width: el.clientWidth
+ };
+
+ if (dimensions.height && dimensions.width) {
+ return dimensions;
+ } else {
+ return false;
+ }
+ };
+
+
+ /**
+ * Returns true if value is truthy or if it is "semantically truthy"
+ * @param val
+ */
+ exports.truthy = function(val) {
+ if (typeof val === 'string') {
+ return val === 'true' || val === 'yes' || val === '1' || val === 'on' || val === '✓';
+ }
+ return !!val;
+ };
+
+ /**
+ * Parses input into a well-formed CSS color
+ * @param val
+ */
+ exports.parseColor = function(val) {
+ var hexre = /(^(?:#?)[0-9a-f]{6}$)|(^(?:#?)[0-9a-f]{3}$)/i;
+ var rgbre = /^rgb\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
+ var rgbare = /^rgba\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0\.\d{1,}|1)\)$/;
+
+ var match = val.match(hexre);
+ var retval;
+
+ if (match !== null) {
+ retval = match[1] || match[2];
+ if (retval[0] !== '#') {
+ return '#' + retval;
+ } else {
+ return retval;
+ }
+ }
+
+ match = val.match(rgbre);
+
+ if (match !== null) {
+ retval = 'rgb(' + match.slice(1).join(',') + ')';
+ return retval;
+ }
+
+ match = val.match(rgbare);
+
+ if (match !== null) {
+ retval = 'rgba(' + match.slice(1).join(',') + ')';
+ return retval;
+ }
+
+ return null;
+ };
+
+ /**
+ * Provides the correct scaling ratio for canvas drawing operations on HiDPI screens (e.g. Retina displays)
+ */
+ exports.canvasRatio = function () {
+ var devicePixelRatio = 1;
+ var backingStoreRatio = 1;
+
+ if (global.document) {
+ var canvas = global.document.createElement('canvas');
+ if (canvas.getContext) {
+ var ctx = canvas.getContext('2d');
+ devicePixelRatio = global.devicePixelRatio || 1;
+ backingStoreRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
+ }
+ }
+
+ return devicePixelRatio / backingStoreRatio;
+ };
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 8 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {var DOM = __webpack_require__(9);
+
+ var SVG_NS = 'http://www.w3.org/2000/svg';
+ var NODE_TYPE_COMMENT = 8;
+
+ /**
+ * Generic SVG element creation function
+ *
+ * @param svg SVG context, set to null if new
+ * @param width Document width
+ * @param height Document height
+ */
+ exports.initSVG = function(svg, width, height) {
+ var defs, style, initialize = false;
+
+ if (svg && svg.querySelector) {
+ style = svg.querySelector('style');
+ if (style === null) {
+ initialize = true;
+ }
+ } else {
+ svg = DOM.newEl('svg', SVG_NS);
+ initialize = true;
+ }
+
+ if (initialize) {
+ defs = DOM.newEl('defs', SVG_NS);
+ style = DOM.newEl('style', SVG_NS);
+ DOM.setAttr(style, {
+ 'type': 'text/css'
+ });
+ defs.appendChild(style);
+ svg.appendChild(defs);
+ }
+
+ //IE throws an exception if this is set and Chrome requires it to be set
+ if (svg.webkitMatchesSelector) {
+ svg.setAttribute('xmlns', SVG_NS);
+ }
+
+ //Remove comment nodes
+ for (var i = 0; i < svg.childNodes.length; i++) {
+ if (svg.childNodes[i].nodeType === NODE_TYPE_COMMENT) {
+ svg.removeChild(svg.childNodes[i]);
+ }
+ }
+
+ //Remove CSS
+ while (style.childNodes.length) {
+ style.removeChild(style.childNodes[0]);
+ }
+
+ DOM.setAttr(svg, {
+ 'width': width,
+ 'height': height,
+ 'viewBox': '0 0 ' + width + ' ' + height,
+ 'preserveAspectRatio': 'none'
+ });
+
+ return svg;
+ };
+
+ /**
+ * Converts serialized SVG to a string suitable for data URI use
+ * @param svgString Serialized SVG string
+ * @param [base64] Use base64 encoding for data URI
+ */
+ exports.svgStringToDataURI = function() {
+ var rawPrefix = 'data:image/svg+xml;charset=UTF-8,';
+ var base64Prefix = 'data:image/svg+xml;charset=UTF-8;base64,';
+
+ return function(svgString, base64) {
+ if (base64) {
+ return base64Prefix + btoa(global.unescape(encodeURIComponent(svgString)));
+ } else {
+ return rawPrefix + encodeURIComponent(svgString);
+ }
+ };
+ }();
+
+ /**
+ * Returns serialized SVG with XML processing instructions
+ *
+ * @param svg SVG context
+ * @param stylesheets CSS stylesheets to include
+ */
+ exports.serializeSVG = function(svg, engineSettings) {
+ if (!global.XMLSerializer) return;
+ var serializer = new XMLSerializer();
+ var svgCSS = '';
+ var stylesheets = engineSettings.stylesheets;
+
+ //External stylesheets: Processing Instruction method
+ if (engineSettings.svgXMLStylesheet) {
+ var xml = DOM.createXML();
+ //Add directives
+ for (var i = stylesheets.length - 1; i >= 0; i--) {
+ var csspi = xml.createProcessingInstruction('xml-stylesheet', 'href="' + stylesheets[i] + '" rel="stylesheet"');
+ xml.insertBefore(csspi, xml.firstChild);
+ }
+
+ xml.removeChild(xml.documentElement);
+ svgCSS = serializer.serializeToString(xml);
+ }
+
+ var svgText = serializer.serializeToString(svg);
+ svgText = svgText.replace(/\&(\#[0-9]{2,}\;)/g, '&$1');
+ return svgCSS + svgText;
+ };
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 9 */
+/***/ function(module, exports) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/**
+ * Generic new DOM element function
+ *
+ * @param tag Tag to create
+ * @param namespace Optional namespace value
+ */
+ exports.newEl = function(tag, namespace) {
+ if (!global.document) return;
+
+ if (namespace == null) {
+ return global.document.createElement(tag);
+ } else {
+ return global.document.createElementNS(namespace, tag);
+ }
+ };
+
+ /**
+ * Generic setAttribute function
+ *
+ * @param el Reference to DOM element
+ * @param attrs Object with attribute keys and values
+ */
+ exports.setAttr = function (el, attrs) {
+ for (var a in attrs) {
+ el.setAttribute(a, attrs[a]);
+ }
+ };
+
+ /**
+ * Creates a XML document
+ * @private
+ */
+ exports.createXML = function() {
+ if (!global.DOMParser) return;
+ return new DOMParser().parseFromString(' ', 'application/xml');
+ };
+
+ /**
+ * Converts a value into an array of DOM nodes
+ *
+ * @param val A string, a NodeList, a Node, or an HTMLCollection
+ */
+ exports.getNodeArray = function(val) {
+ var retval = null;
+ if (typeof(val) == 'string') {
+ retval = document.querySelectorAll(val);
+ } else if (global.NodeList && val instanceof global.NodeList) {
+ retval = val;
+ } else if (global.Node && val instanceof global.Node) {
+ retval = [val];
+ } else if (global.HTMLCollection && val instanceof global.HTMLCollection) {
+ retval = val;
+ } else if (val instanceof Array) {
+ retval = val;
+ } else if (val === null) {
+ retval = [];
+ }
+
+ retval = Array.prototype.slice.call(retval);
+
+ return retval;
+ };
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 10 */
+/***/ function(module, exports) {
+
+ var Color = function(color, options) {
+ //todo: support rgba, hsla, and rrggbbaa notation
+ //todo: use CIELAB internally
+ //todo: add clamp function (with sign)
+ if (typeof color !== 'string') return;
+
+ this.original = color;
+
+ if (color.charAt(0) === '#') {
+ color = color.slice(1);
+ }
+
+ if (/[^a-f0-9]+/i.test(color)) return;
+
+ if (color.length === 3) {
+ color = color.replace(/./g, '$&$&');
+ }
+
+ if (color.length !== 6) return;
+
+ this.alpha = 1;
+
+ if (options && options.alpha) {
+ this.alpha = options.alpha;
+ }
+
+ this.set(parseInt(color, 16));
+ };
+
+ //todo: jsdocs
+ Color.rgb2hex = function(r, g, b) {
+ function format (decimal) {
+ var hex = (decimal | 0).toString(16);
+ if (decimal < 16) {
+ hex = '0' + hex;
+ }
+ return hex;
+ }
+
+ return [r, g, b].map(format).join('');
+ };
+
+ //todo: jsdocs
+ Color.hsl2rgb = function (h, s, l) {
+ var H = h / 60;
+ var C = (1 - Math.abs(2 * l - 1)) * s;
+ var X = C * (1 - Math.abs(parseInt(H) % 2 - 1));
+ var m = l - (C / 2);
+
+ var r = 0, g = 0, b = 0;
+
+ if (H >= 0 && H < 1) {
+ r = C;
+ g = X;
+ } else if (H >= 1 && H < 2) {
+ r = X;
+ g = C;
+ } else if (H >= 2 && H < 3) {
+ g = C;
+ b = X;
+ } else if (H >= 3 && H < 4) {
+ g = X;
+ b = C;
+ } else if (H >= 4 && H < 5) {
+ r = X;
+ b = C;
+ } else if (H >= 5 && H < 6) {
+ r = C;
+ b = X;
+ }
+
+ r += m;
+ g += m;
+ b += m;
+
+ r = parseInt(r * 255);
+ g = parseInt(g * 255);
+ b = parseInt(b * 255);
+
+ return [r, g, b];
+ };
+
+ /**
+ * Sets the color from a raw RGB888 integer
+ * @param raw RGB888 representation of color
+ */
+ //todo: refactor into a static method
+ //todo: factor out individual color spaces
+ //todo: add HSL, CIELAB, and CIELUV
+ Color.prototype.set = function (val) {
+ this.raw = val;
+
+ var r = (this.raw & 0xFF0000) >> 16;
+ var g = (this.raw & 0x00FF00) >> 8;
+ var b = (this.raw & 0x0000FF);
+
+ // BT.709
+ var y = 0.2126 * r + 0.7152 * g + 0.0722 * b;
+ var u = -0.09991 * r - 0.33609 * g + 0.436 * b;
+ var v = 0.615 * r - 0.55861 * g - 0.05639 * b;
+
+ this.rgb = {
+ r: r,
+ g: g,
+ b: b
+ };
+
+ this.yuv = {
+ y: y,
+ u: u,
+ v: v
+ };
+
+ return this;
+ };
+
+ /**
+ * Lighten or darken a color
+ * @param multiplier Amount to lighten or darken (-1 to 1)
+ */
+ Color.prototype.lighten = function(multiplier) {
+ var cm = Math.min(1, Math.max(0, Math.abs(multiplier))) * (multiplier < 0 ? -1 : 1);
+ var bm = (255 * cm) | 0;
+ var cr = Math.min(255, Math.max(0, this.rgb.r + bm));
+ var cg = Math.min(255, Math.max(0, this.rgb.g + bm));
+ var cb = Math.min(255, Math.max(0, this.rgb.b + bm));
+ var hex = Color.rgb2hex(cr, cg, cb);
+ return new Color(hex);
+ };
+
+ /**
+ * Output color in hex format
+ * @param addHash Add a hash character to the beginning of the output
+ */
+ Color.prototype.toHex = function(addHash) {
+ return (addHash ? '#' : '') + this.raw.toString(16);
+ };
+
+ /**
+ * Returns whether or not current color is lighter than another color
+ * @param color Color to compare against
+ */
+ Color.prototype.lighterThan = function(color) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ return this.yuv.y > color.yuv.y;
+ };
+
+ /**
+ * Returns the result of mixing current color with another color
+ * @param color Color to mix with
+ * @param multiplier How much to mix with the other color
+ */
+ /*
+ Color.prototype.mix = function (color, multiplier) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ var r = this.rgb.r;
+ var g = this.rgb.g;
+ var b = this.rgb.b;
+ var a = this.alpha;
+
+ var m = typeof multiplier !== 'undefined' ? multiplier : 0.5;
+
+ //todo: write a lerp function
+ r = r + m * (color.rgb.r - r);
+ g = g + m * (color.rgb.g - g);
+ b = b + m * (color.rgb.b - b);
+ a = a + m * (color.alpha - a);
+
+ return new Color(Color.rgbToHex(r, g, b), {
+ 'alpha': a
+ });
+ };
+ */
+
+ /**
+ * Returns the result of blending another color on top of current color with alpha
+ * @param color Color to blend on top of current color, i.e. "Ca"
+ */
+ //todo: see if .blendAlpha can be merged into .mix
+ Color.prototype.blendAlpha = function(color) {
+ if (!(color instanceof Color)) {
+ color = new Color(color);
+ }
+
+ var Ca = color;
+ var Cb = this;
+
+ //todo: write alpha blending function
+ var r = Ca.alpha * Ca.rgb.r + (1 - Ca.alpha) * Cb.rgb.r;
+ var g = Ca.alpha * Ca.rgb.g + (1 - Ca.alpha) * Cb.rgb.g;
+ var b = Ca.alpha * Ca.rgb.b + (1 - Ca.alpha) * Cb.rgb.b;
+
+ return new Color(Color.rgb2hex(r, g, b));
+ };
+
+ module.exports = Color;
+
+
+/***/ },
+/* 11 */
+/***/ function(module, exports) {
+
+ module.exports = {
+ 'version': '2.9.3',
+ 'svg_ns': 'http://www.w3.org/2000/svg'
+ };
+
+/***/ },
+/* 12 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var shaven = __webpack_require__(13);
+
+ var SVG = __webpack_require__(8);
+ var constants = __webpack_require__(11);
+ var utils = __webpack_require__(7);
+
+ var SVG_NS = constants.svg_ns;
+
+ var templates = {
+ 'element': function (options) {
+ var tag = options.tag;
+ var content = options.content || '';
+ delete options.tag;
+ delete options.content;
+ return [tag, content, options];
+ }
+ };
+
+ //todo: deprecate tag arg, infer tag from shape object
+ function convertShape (shape, tag) {
+ return templates.element({
+ 'tag': tag,
+ 'width': shape.width,
+ 'height': shape.height,
+ 'fill': shape.properties.fill
+ });
+ }
+
+ function textCss (properties) {
+ return utils.cssProps({
+ 'fill': properties.fill,
+ 'font-weight': properties.font.weight,
+ 'font-family': properties.font.family + ', monospace',
+ 'font-size': properties.font.size + properties.font.units
+ });
+ }
+
+ function outlinePath (bgWidth, bgHeight, outlineWidth) {
+ var outlineOffsetWidth = outlineWidth / 2;
+
+ return [
+ 'M', outlineOffsetWidth, outlineOffsetWidth,
+ 'H', bgWidth - outlineOffsetWidth,
+ 'V', bgHeight - outlineOffsetWidth,
+ 'H', outlineOffsetWidth,
+ 'V', 0,
+ 'M', 0, outlineOffsetWidth,
+ 'L', bgWidth, bgHeight - outlineOffsetWidth,
+ 'M', 0, bgHeight - outlineOffsetWidth,
+ 'L', bgWidth, outlineOffsetWidth
+ ].join(' ');
+ }
+
+ module.exports = function (sceneGraph, renderSettings) {
+ var engineSettings = renderSettings.engineSettings;
+ var stylesheets = engineSettings.stylesheets;
+ var stylesheetXml = stylesheets.map(function (stylesheet) {
+ return '';
+ }).join('\n');
+
+ var holderId = 'holder_' + Number(new Date()).toString(16);
+
+ var root = sceneGraph.root;
+ var textGroup = root.children.holderTextGroup;
+
+ var css = '#' + holderId + ' text { ' + textCss(textGroup.properties) + ' } ';
+
+ // push text down to be equally vertically aligned with canvas renderer
+ textGroup.y += textGroup.textPositionData.boundingBox.height * 0.8;
+
+ var wordTags = [];
+
+ Object.keys(textGroup.children).forEach(function (lineKey) {
+ var line = textGroup.children[lineKey];
+
+ Object.keys(line.children).forEach(function (wordKey) {
+ var word = line.children[wordKey];
+ var x = textGroup.x + line.x + word.x;
+ var y = textGroup.y + line.y + word.y;
+
+ var wordTag = templates.element({
+ 'tag': 'text',
+ 'content': word.properties.text,
+ 'x': x,
+ 'y': y
+ });
+
+ wordTags.push(wordTag);
+ });
+ });
+
+ var text = templates.element({
+ 'tag': 'g',
+ 'content': wordTags
+ });
+
+ var outline = null;
+
+ if (root.children.holderBg.properties.outline) {
+ var outlineProperties = root.children.holderBg.properties.outline;
+ outline = templates.element({
+ 'tag': 'path',
+ 'd': outlinePath(root.children.holderBg.width, root.children.holderBg.height, outlineProperties.width),
+ 'stroke-width': outlineProperties.width,
+ 'stroke': outlineProperties.fill,
+ 'fill': 'none'
+ });
+ }
+
+ var bg = convertShape(root.children.holderBg, 'rect');
+
+ var sceneContent = [];
+
+ sceneContent.push(bg);
+ if (outlineProperties) {
+ sceneContent.push(outline);
+ }
+ sceneContent.push(text);
+
+ var scene = templates.element({
+ 'tag': 'g',
+ 'id': holderId,
+ 'content': sceneContent
+ });
+
+ var style = templates.element({
+ 'tag': 'style',
+ //todo: figure out how to add CDATA directive
+ 'content': css,
+ 'type': 'text/css'
+ });
+
+ var defs = templates.element({
+ 'tag': 'defs',
+ 'content': style
+ });
+
+ var svg = templates.element({
+ 'tag': 'svg',
+ 'content': [defs, scene],
+ 'width': root.properties.width,
+ 'height': root.properties.height,
+ 'xmlns': SVG_NS,
+ 'viewBox': [0, 0, root.properties.width, root.properties.height].join(' '),
+ 'preserveAspectRatio': 'none'
+ });
+
+ var output = shaven(svg);
+
+ output = stylesheetXml + output[0];
+
+ var svgString = SVG.svgStringToDataURI(output, renderSettings.mode === 'background');
+ return svgString;
+ };
+
+/***/ },
+/* 13 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var escape = __webpack_require__(14)
+
+ // TODO: remove namespace
+
+ module.exports = function shaven (array, namespace, returnObject) {
+
+ 'use strict'
+
+ var i = 1
+ var doesEscape = true
+ var HTMLString
+ var attributeKey
+ var callback
+ var key
+
+
+ returnObject = returnObject || {}
+
+
+ function createElement (sugarString) {
+
+ var tags = sugarString.match(/^[\w-]+/)
+ var element = {
+ tag: tags ? tags[0] : 'div',
+ attr: {},
+ children: []
+ }
+ var id = sugarString.match(/#([\w-]+)/)
+ var reference = sugarString.match(/\$([\w-]+)/)
+ var classNames = sugarString.match(/\.[\w-]+/g)
+
+
+ // Assign id if is set
+ if (id) {
+ element.attr.id = id[1]
+
+ // Add element to the return object
+ returnObject[id[1]] = element
+ }
+
+ if (reference)
+ returnObject[reference[1]] = element
+
+ if (classNames)
+ element.attr.class = classNames.join(' ').replace(/\./g, '')
+
+ if (sugarString.match(/&$/g))
+ doesEscape = false
+
+ return element
+ }
+
+ function replacer (key, value) {
+
+ if (value === null || value === false || value === undefined)
+ return
+
+ if (typeof value !== 'string' && typeof value !== 'object')
+ return String(value)
+
+ return value
+ }
+
+ function escapeAttribute (string) {
+ return (string || string === 0) ?
+ String(string)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"') :
+ ''
+ }
+
+ function escapeHTML (string) {
+ return String(string)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''')
+ .replace(//g, '>')
+ }
+
+
+ if (typeof array[0] === 'string')
+ array[0] = createElement(array[0])
+
+ else if (Array.isArray(array[0]))
+ i = 0
+
+ else
+ throw new Error(
+ 'First element of array must be a string, ' +
+ 'or an array and not ' + JSON.stringify(array[0])
+ )
+
+
+ for (; i < array.length; i++) {
+
+ // Don't render element if value is false or null
+ if (array[i] === false || array[i] === null) {
+ array[0] = false
+ break
+ }
+
+ // Continue with next array value if current value is undefined or true
+ else if (array[i] === undefined || array[i] === true) {
+ continue
+ }
+
+ else if (typeof array[i] === 'string') {
+ if (doesEscape)
+ array[i] = escapeHTML(array[i])
+
+ array[0].children.push(array[i])
+ }
+
+ else if (typeof array[i] === 'number') {
+
+ array[0].children.push(array[i])
+ }
+
+ else if (Array.isArray(array[i])) {
+
+ if (Array.isArray(array[i][0])) {
+ array[i].reverse().forEach(function (subArray) {
+ array.splice(i + 1, 0, subArray)
+ })
+
+ if (i !== 0)
+ continue
+ i++
+ }
+
+ shaven(array[i], namespace, returnObject)
+
+ if (array[i][0])
+ array[0].children.push(array[i][0])
+ }
+
+ else if (typeof array[i] === 'function')
+ callback = array[i]
+
+
+ else if (typeof array[i] === 'object') {
+ for (attributeKey in array[i])
+ if (array[i].hasOwnProperty(attributeKey))
+ if (array[i][attributeKey] !== null &&
+ array[i][attributeKey] !== false)
+ if (attributeKey === 'style' &&
+ typeof array[i][attributeKey] === 'object')
+ array[0].attr[attributeKey] = JSON
+ .stringify(array[i][attributeKey], replacer)
+ .slice(2, -2)
+ .replace(/","/g, ';')
+ .replace(/":"/g, ':')
+ .replace(/\\"/g, '\'')
+
+ else
+ array[0].attr[attributeKey] = array[i][attributeKey]
+ }
+
+ else
+ throw new TypeError('"' + array[i] + '" is not allowed as a value.')
+ }
+
+
+ if (array[0] !== false) {
+
+ HTMLString = '<' + array[0].tag
+
+ for (key in array[0].attr)
+ if (array[0].attr.hasOwnProperty(key))
+ HTMLString += ' ' + key + '="' +
+ escapeAttribute(array[0].attr[key]) + '"'
+
+ HTMLString += '>'
+
+ array[0].children.forEach(function (child) {
+ HTMLString += child
+ })
+
+ HTMLString += '' + array[0].tag + '>'
+
+ array[0] = HTMLString
+ }
+
+ // Return root element on index 0
+ returnObject[0] = array[0]
+
+ if (callback)
+ callback(array[0])
+
+ // returns object containing all elements with an id and the root element
+ return returnObject
+ }
+
+
+/***/ },
+/* 14 */
+/***/ function(module, exports) {
+
+ /*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */
+
+ 'use strict';
+
+ /**
+ * Module variables.
+ * @private
+ */
+
+ var matchHtmlRegExp = /["'&<>]/;
+
+ /**
+ * Module exports.
+ * @public
+ */
+
+ module.exports = escapeHtml;
+
+ /**
+ * Escape special characters in the given string of html.
+ *
+ * @param {string} string The string to escape for inserting into HTML
+ * @return {string}
+ * @public
+ */
+
+ function escapeHtml(string) {
+ var str = '' + string;
+ var match = matchHtmlRegExp.exec(str);
+
+ if (!match) {
+ return str;
+ }
+
+ var escape;
+ var html = '';
+ var index = 0;
+ var lastIndex = 0;
+
+ for (index = match.index; index < str.length; index++) {
+ switch (str.charCodeAt(index)) {
+ case 34: // "
+ escape = '"';
+ break;
+ case 38: // &
+ escape = '&';
+ break;
+ case 39: // '
+ escape = ''';
+ break;
+ case 60: // <
+ escape = '<';
+ break;
+ case 62: // >
+ escape = '>';
+ break;
+ default:
+ continue;
+ }
+
+ if (lastIndex !== index) {
+ html += str.substring(lastIndex, index);
+ }
+
+ lastIndex = index + 1;
+ html += escape;
+ }
+
+ return lastIndex !== index
+ ? html + str.substring(lastIndex, index)
+ : html;
+ }
+
+
+/***/ },
+/* 15 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var DOM = __webpack_require__(9);
+ var utils = __webpack_require__(7);
+
+ module.exports = (function() {
+ var canvas = DOM.newEl('canvas');
+ var ctx = null;
+
+ return function(sceneGraph) {
+ if (ctx == null) {
+ ctx = canvas.getContext('2d');
+ }
+
+ var dpr = utils.canvasRatio();
+ var root = sceneGraph.root;
+ canvas.width = dpr * root.properties.width;
+ canvas.height = dpr * root.properties.height ;
+ ctx.textBaseline = 'middle';
+
+ var bg = root.children.holderBg;
+ var bgWidth = dpr * bg.width;
+ var bgHeight = dpr * bg.height;
+ //todo: parametrize outline width (e.g. in scene object)
+ var outlineWidth = 2;
+ var outlineOffsetWidth = outlineWidth / 2;
+
+ ctx.fillStyle = bg.properties.fill;
+ ctx.fillRect(0, 0, bgWidth, bgHeight);
+
+ if (bg.properties.outline) {
+ //todo: abstract this into a method
+ ctx.strokeStyle = bg.properties.outline.fill;
+ ctx.lineWidth = bg.properties.outline.width;
+ ctx.moveTo(outlineOffsetWidth, outlineOffsetWidth);
+ // TL, TR, BR, BL
+ ctx.lineTo(bgWidth - outlineOffsetWidth, outlineOffsetWidth);
+ ctx.lineTo(bgWidth - outlineOffsetWidth, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(outlineOffsetWidth, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(outlineOffsetWidth, outlineOffsetWidth);
+ // Diagonals
+ ctx.moveTo(0, outlineOffsetWidth);
+ ctx.lineTo(bgWidth, bgHeight - outlineOffsetWidth);
+ ctx.moveTo(0, bgHeight - outlineOffsetWidth);
+ ctx.lineTo(bgWidth, outlineOffsetWidth);
+ ctx.stroke();
+ }
+
+ var textGroup = root.children.holderTextGroup;
+ ctx.font = textGroup.properties.font.weight + ' ' + (dpr * textGroup.properties.font.size) + textGroup.properties.font.units + ' ' + textGroup.properties.font.family + ', monospace';
+ ctx.fillStyle = textGroup.properties.fill;
+
+ for (var lineKey in textGroup.children) {
+ var line = textGroup.children[lineKey];
+ for (var wordKey in line.children) {
+ var word = line.children[wordKey];
+ var x = dpr * (textGroup.x + line.x + word.x);
+ var y = dpr * (textGroup.y + line.y + word.y + (textGroup.properties.leading / 2));
+
+ ctx.fillText(word.properties.text, x, y);
+ }
+ }
+
+ return canvas.toDataURL('image/png');
+ };
+ })();
+
+/***/ }
+/******/ ])
+});
+;
+(function(ctx, isMeteorPackage) {
+ if (isMeteorPackage) {
+ Holder = ctx.Holder;
+ }
+})(this, typeof Meteor !== 'undefined' && typeof Package !== 'undefined');
diff --git a/vendor/assets/javascripts/holderjs/test/runner.js b/vendor/assets/javascripts/holderjs/test/runner.js
new file mode 100644
index 000000000..579e30e3c
--- /dev/null
+++ b/vendor/assets/javascripts/holderjs/test/runner.js
@@ -0,0 +1,37 @@
+var client = require('webdriverio');
+
+module.exports = function (options, cb) {
+ var retval = true;
+
+ client.remote({
+ 'user': process.env.SAUCE_USERNAME,
+ 'key': process.env.SAUCE_ACCESS_KEY,
+ 'host': 'localhost',
+ 'port': 4445,
+ 'desiredCapabilities': {
+ 'browserName': options.browserName,
+ 'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
+ 'name': 'Holder.js Test',
+ 'tags': [options.browserName]
+ }
+ })
+ .init()
+ .url('http://localhost:8000')
+ .execute(function () {
+ var expectImages = document.querySelectorAll('img').length - document.querySelectorAll('img[data-exclude]').length;
+ var renderedImages = document.querySelectorAll('img[data-holder-rendered]').length;
+ return {'expected': expectImages, 'rendered': renderedImages};
+ }, function (err, ret) {
+ var expected = ret.value.expected;
+ var rendered = ret.value.rendered;
+ console.log('Expected', expected);
+ console.log('Rendered', rendered);
+ if (expected !== rendered) {
+ retval = false;
+ }
+ })
+ .pause(15 * 1000)
+ .end(function () {
+ cb(null, retval);
+ });
+};
diff --git a/vendor/assets/javascripts/jquery-smooth-scroll.js b/vendor/assets/javascripts/jquery-smooth-scroll.js
new file mode 100644
index 000000000..5289817ef
--- /dev/null
+++ b/vendor/assets/javascripts/jquery-smooth-scroll.js
@@ -0,0 +1 @@
+//= require jquery-smooth-scroll/jquery.smooth-scroll.js
diff --git a/vendor/assets/javascripts/jquery-smooth-scroll/jquery.smooth-scroll.js b/vendor/assets/javascripts/jquery-smooth-scroll/jquery.smooth-scroll.js
new file mode 100644
index 000000000..82f126323
--- /dev/null
+++ b/vendor/assets/javascripts/jquery-smooth-scroll/jquery.smooth-scroll.js
@@ -0,0 +1,358 @@
+/*!
+ * jQuery Smooth Scroll - v2.2.0 - 2017-05-05
+ * https://github.com/kswedberg/jquery-smooth-scroll
+ * Copyright (c) 2017 Karl Swedberg
+ * Licensed MIT
+ */
+
+(function(factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['jquery'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS
+ factory(require('jquery'));
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(function($) {
+
+ var version = '2.2.0';
+ var optionOverrides = {};
+ var defaults = {
+ exclude: [],
+ excludeWithin: [],
+ offset: 0,
+
+ // one of 'top' or 'left'
+ direction: 'top',
+
+ // if set, bind click events through delegation
+ // supported since jQuery 1.4.2
+ delegateSelector: null,
+
+ // jQuery set of elements you wish to scroll (for $.smoothScroll).
+ // if null (default), $('html, body').firstScrollable() is used.
+ scrollElement: null,
+
+ // only use if you want to override default behavior
+ scrollTarget: null,
+
+ // automatically focus the target element after scrolling to it
+ autoFocus: false,
+
+ // fn(opts) function to be called before scrolling occurs.
+ // `this` is the element(s) being scrolled
+ beforeScroll: function() {},
+
+ // fn(opts) function to be called after scrolling occurs.
+ // `this` is the triggering element
+ afterScroll: function() {},
+
+ // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin
+ // from jQuery UI or elsewhere
+ easing: 'swing',
+
+ // speed can be a number or 'auto'
+ // if 'auto', the speed will be calculated based on the formula:
+ // (current scroll position - target scroll position) / autoCoeffic
+ speed: 400,
+
+ // coefficient for "auto" speed
+ autoCoefficient: 2,
+
+ // $.fn.smoothScroll only: whether to prevent the default click action
+ preventDefault: true
+ };
+
+ var getScrollable = function(opts) {
+ var scrollable = [];
+ var scrolled = false;
+ var dir = opts.dir && opts.dir === 'left' ? 'scrollLeft' : 'scrollTop';
+
+ this.each(function() {
+ var el = $(this);
+
+ if (this === document || this === window) {
+ return;
+ }
+
+ if (document.scrollingElement && (this === document.documentElement || this === document.body)) {
+ scrollable.push(document.scrollingElement);
+
+ return false;
+ }
+
+ if (el[dir]() > 0) {
+ scrollable.push(this);
+ } else {
+ // if scroll(Top|Left) === 0, nudge the element 1px and see if it moves
+ el[dir](1);
+ scrolled = el[dir]() > 0;
+
+ if (scrolled) {
+ scrollable.push(this);
+ }
+ // then put it back, of course
+ el[dir](0);
+ }
+ });
+
+ if (!scrollable.length) {
+ this.each(function() {
+ // If no scrollable elements and has scroll-behavior:smooth because
+ // "When this property is specified on the root element, it applies to the viewport instead."
+ // and "The scroll-behavior property of the … body element is *not* propagated to the viewport."
+ // → https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior
+ if (this === document.documentElement && $(this).css('scrollBehavior') === 'smooth') {
+ scrollable = [this];
+ }
+
+ // If still no scrollable elements, fall back to ,
+ // if it's in the jQuery collection
+ // (doing this because Safari sets scrollTop async,
+ // so can't set it to 1 and immediately get the value.)
+ if (!scrollable.length && this.nodeName === 'BODY') {
+ scrollable = [this];
+ }
+ });
+ }
+
+ // Use the first scrollable element if we're calling firstScrollable()
+ if (opts.el === 'first' && scrollable.length > 1) {
+ scrollable = [scrollable[0]];
+ }
+
+ return scrollable;
+ };
+
+ var rRelative = /^([\-\+]=)(\d+)/;
+
+ $.fn.extend({
+ scrollable: function(dir) {
+ var scrl = getScrollable.call(this, {dir: dir});
+
+ return this.pushStack(scrl);
+ },
+ firstScrollable: function(dir) {
+ var scrl = getScrollable.call(this, {el: 'first', dir: dir});
+
+ return this.pushStack(scrl);
+ },
+
+ smoothScroll: function(options, extra) {
+ options = options || {};
+
+ if (options === 'options') {
+ if (!extra) {
+ return this.first().data('ssOpts');
+ }
+
+ return this.each(function() {
+ var $this = $(this);
+ var opts = $.extend($this.data('ssOpts') || {}, extra);
+
+ $(this).data('ssOpts', opts);
+ });
+ }
+
+ var opts = $.extend({}, $.fn.smoothScroll.defaults, options);
+
+ var clickHandler = function(event) {
+ var escapeSelector = function(str) {
+ return str.replace(/(:|\.|\/)/g, '\\$1');
+ };
+
+ var link = this;
+ var $link = $(this);
+ var thisOpts = $.extend({}, opts, $link.data('ssOpts') || {});
+ var exclude = opts.exclude;
+ var excludeWithin = thisOpts.excludeWithin;
+ var elCounter = 0;
+ var ewlCounter = 0;
+ var include = true;
+ var clickOpts = {};
+ var locationPath = $.smoothScroll.filterPath(location.pathname);
+ var linkPath = $.smoothScroll.filterPath(link.pathname);
+ var hostMatch = location.hostname === link.hostname || !link.hostname;
+ var pathMatch = thisOpts.scrollTarget || (linkPath === locationPath);
+ var thisHash = escapeSelector(link.hash);
+
+ if (thisHash && !$(thisHash).length) {
+ include = false;
+ }
+
+ if (!thisOpts.scrollTarget && (!hostMatch || !pathMatch || !thisHash)) {
+ include = false;
+ } else {
+ while (include && elCounter < exclude.length) {
+ if ($link.is(escapeSelector(exclude[elCounter++]))) {
+ include = false;
+ }
+ }
+
+ while (include && ewlCounter < excludeWithin.length) {
+ if ($link.closest(excludeWithin[ewlCounter++]).length) {
+ include = false;
+ }
+ }
+ }
+
+ if (include) {
+ if (thisOpts.preventDefault) {
+ event.preventDefault();
+ }
+
+ $.extend(clickOpts, thisOpts, {
+ scrollTarget: thisOpts.scrollTarget || thisHash,
+ link: link
+ });
+
+ $.smoothScroll(clickOpts);
+ }
+ };
+
+ if (options.delegateSelector !== null) {
+ this
+ .off('click.smoothscroll', options.delegateSelector)
+ .on('click.smoothscroll', options.delegateSelector, clickHandler);
+ } else {
+ this
+ .off('click.smoothscroll')
+ .on('click.smoothscroll', clickHandler);
+ }
+
+ return this;
+ }
+ });
+
+ var getExplicitOffset = function(val) {
+ var explicit = {relative: ''};
+ var parts = typeof val === 'string' && rRelative.exec(val);
+
+ if (typeof val === 'number') {
+ explicit.px = val;
+ } else if (parts) {
+ explicit.relative = parts[1];
+ explicit.px = parseFloat(parts[2]) || 0;
+ }
+
+ return explicit;
+ };
+
+ var onAfterScroll = function(opts) {
+ var $tgt = $(opts.scrollTarget);
+
+ if (opts.autoFocus && $tgt.length) {
+ $tgt[0].focus();
+
+ if (!$tgt.is(document.activeElement)) {
+ $tgt.prop({tabIndex: -1});
+ $tgt[0].focus();
+ }
+ }
+
+ opts.afterScroll.call(opts.link, opts);
+ };
+
+ $.smoothScroll = function(options, px) {
+ if (options === 'options' && typeof px === 'object') {
+ return $.extend(optionOverrides, px);
+ }
+ var opts, $scroller, speed, delta;
+ var explicitOffset = getExplicitOffset(options);
+ var scrollTargetOffset = {};
+ var scrollerOffset = 0;
+ var offPos = 'offset';
+ var scrollDir = 'scrollTop';
+ var aniProps = {};
+ var aniOpts = {};
+
+ if (explicitOffset.px) {
+ opts = $.extend({link: null}, $.fn.smoothScroll.defaults, optionOverrides);
+ } else {
+ opts = $.extend({link: null}, $.fn.smoothScroll.defaults, options || {}, optionOverrides);
+
+ if (opts.scrollElement) {
+ offPos = 'position';
+
+ if (opts.scrollElement.css('position') === 'static') {
+ opts.scrollElement.css('position', 'relative');
+ }
+ }
+
+ if (px) {
+ explicitOffset = getExplicitOffset(px);
+ }
+ }
+
+ scrollDir = opts.direction === 'left' ? 'scrollLeft' : scrollDir;
+
+ if (opts.scrollElement) {
+ $scroller = opts.scrollElement;
+
+ if (!explicitOffset.px && !(/^(?:HTML|BODY)$/).test($scroller[0].nodeName)) {
+ scrollerOffset = $scroller[scrollDir]();
+ }
+ } else {
+ $scroller = $('html, body').firstScrollable(opts.direction);
+ }
+
+ // beforeScroll callback function must fire before calculating offset
+ opts.beforeScroll.call($scroller, opts);
+
+ scrollTargetOffset = explicitOffset.px ? explicitOffset : {
+ relative: '',
+ px: ($(opts.scrollTarget)[offPos]() && $(opts.scrollTarget)[offPos]()[opts.direction]) || 0
+ };
+
+ aniProps[scrollDir] = scrollTargetOffset.relative + (scrollTargetOffset.px + scrollerOffset + opts.offset);
+
+ speed = opts.speed;
+
+ // automatically calculate the speed of the scroll based on distance / coefficient
+ if (speed === 'auto') {
+
+ // $scroller[scrollDir]() is position before scroll, aniProps[scrollDir] is position after
+ // When delta is greater, speed will be greater.
+ delta = Math.abs(aniProps[scrollDir] - $scroller[scrollDir]());
+
+ // Divide the delta by the coefficient
+ speed = delta / opts.autoCoefficient;
+ }
+
+ aniOpts = {
+ duration: speed,
+ easing: opts.easing,
+ complete: function() {
+ onAfterScroll(opts);
+ }
+ };
+
+ if (opts.step) {
+ aniOpts.step = opts.step;
+ }
+
+ if ($scroller.length) {
+ $scroller.stop().animate(aniProps, aniOpts);
+ } else {
+ onAfterScroll(opts);
+ }
+ };
+
+ $.smoothScroll.version = version;
+ $.smoothScroll.filterPath = function(string) {
+ string = string || '';
+
+ return string
+ .replace(/^\//, '')
+ .replace(/(?:index|default).[a-zA-Z]{3,4}$/, '')
+ .replace(/\/$/, '');
+ };
+
+ // default options
+ $.fn.smoothScroll.defaults = defaults;
+
+}));
+
diff --git a/vendor/assets/javascripts/markdown.js b/vendor/assets/javascripts/markdown.js
new file mode 100644
index 000000000..cf2c27075
--- /dev/null
+++ b/vendor/assets/javascripts/markdown.js
@@ -0,0 +1 @@
+//= require markdown/markdown.js
diff --git a/vendor/assets/javascripts/markdown/index.js b/vendor/assets/javascripts/markdown/index.js
new file mode 100644
index 000000000..8bb08734b
--- /dev/null
+++ b/vendor/assets/javascripts/markdown/index.js
@@ -0,0 +1,3 @@
+// super simple module for the most common nodejs use case.
+exports.markdown = require("./markdown");
+exports.parse = exports.markdown.toHTML;
diff --git a/vendor/assets/javascripts/markdown/markdown.js b/vendor/assets/javascripts/markdown/markdown.js
new file mode 100644
index 000000000..d365cfa07
--- /dev/null
+++ b/vendor/assets/javascripts/markdown/markdown.js
@@ -0,0 +1,1725 @@
+// Released under MIT license
+// Copyright (c) 2009-2010 Dominic Baggott
+// Copyright (c) 2009-2010 Ash Berlin
+// Copyright (c) 2011 Christoph Dorn (http://www.christophdorn.com)
+
+/*jshint browser:true, devel:true */
+
+(function( expose ) {
+
+/**
+ * class Markdown
+ *
+ * Markdown processing in Javascript done right. We have very particular views
+ * on what constitutes 'right' which include:
+ *
+ * - produces well-formed HTML (this means that em and strong nesting is
+ * important)
+ *
+ * - has an intermediate representation to allow processing of parsed data (We
+ * in fact have two, both as [JsonML]: a markdown tree and an HTML tree).
+ *
+ * - is easily extensible to add new dialects without having to rewrite the
+ * entire parsing mechanics
+ *
+ * - has a good test suite
+ *
+ * This implementation fulfills all of these (except that the test suite could
+ * do with expanding to automatically run all the fixtures from other Markdown
+ * implementations.)
+ *
+ * ##### Intermediate Representation
+ *
+ * *TODO* Talk about this :) Its JsonML, but document the node names we use.
+ *
+ * [JsonML]: http://jsonml.org/ "JSON Markup Language"
+ **/
+var Markdown = expose.Markdown = function(dialect) {
+ switch (typeof dialect) {
+ case "undefined":
+ this.dialect = Markdown.dialects.Gruber;
+ break;
+ case "object":
+ this.dialect = dialect;
+ break;
+ default:
+ if ( dialect in Markdown.dialects ) {
+ this.dialect = Markdown.dialects[dialect];
+ }
+ else {
+ throw new Error("Unknown Markdown dialect '" + String(dialect) + "'");
+ }
+ break;
+ }
+ this.em_state = [];
+ this.strong_state = [];
+ this.debug_indent = "";
+};
+
+/**
+ * parse( markdown, [dialect] ) -> JsonML
+ * - markdown (String): markdown string to parse
+ * - dialect (String | Dialect): the dialect to use, defaults to gruber
+ *
+ * Parse `markdown` and return a markdown document as a Markdown.JsonML tree.
+ **/
+expose.parse = function( source, dialect ) {
+ // dialect will default if undefined
+ var md = new Markdown( dialect );
+ return md.toTree( source );
+};
+
+/**
+ * toHTML( markdown, [dialect] ) -> String
+ * toHTML( md_tree ) -> String
+ * - markdown (String): markdown string to parse
+ * - md_tree (Markdown.JsonML): parsed markdown tree
+ *
+ * Take markdown (either as a string or as a JsonML tree) and run it through
+ * [[toHTMLTree]] then turn it into a well-formated HTML fragment.
+ **/
+expose.toHTML = function toHTML( source , dialect , options ) {
+ var input = expose.toHTMLTree( source , dialect , options );
+
+ return expose.renderJsonML( input );
+};
+
+/**
+ * toHTMLTree( markdown, [dialect] ) -> JsonML
+ * toHTMLTree( md_tree ) -> JsonML
+ * - markdown (String): markdown string to parse
+ * - dialect (String | Dialect): the dialect to use, defaults to gruber
+ * - md_tree (Markdown.JsonML): parsed markdown tree
+ *
+ * Turn markdown into HTML, represented as a JsonML tree. If a string is given
+ * to this function, it is first parsed into a markdown tree by calling
+ * [[parse]].
+ **/
+expose.toHTMLTree = function toHTMLTree( input, dialect , options ) {
+ // convert string input to an MD tree
+ if ( typeof input ==="string" ) input = this.parse( input, dialect );
+
+ // Now convert the MD tree to an HTML tree
+
+ // remove references from the tree
+ var attrs = extract_attr( input ),
+ refs = {};
+
+ if ( attrs && attrs.references ) {
+ refs = attrs.references;
+ }
+
+ var html = convert_tree_to_html( input, refs , options );
+ merge_text_nodes( html );
+ return html;
+};
+
+// For Spidermonkey based engines
+function mk_block_toSource() {
+ return "Markdown.mk_block( " +
+ uneval(this.toString()) +
+ ", " +
+ uneval(this.trailing) +
+ ", " +
+ uneval(this.lineNumber) +
+ " )";
+}
+
+// node
+function mk_block_inspect() {
+ var util = require("util");
+ return "Markdown.mk_block( " +
+ util.inspect(this.toString()) +
+ ", " +
+ util.inspect(this.trailing) +
+ ", " +
+ util.inspect(this.lineNumber) +
+ " )";
+
+}
+
+var mk_block = Markdown.mk_block = function(block, trail, line) {
+ // Be helpful for default case in tests.
+ if ( arguments.length == 1 ) trail = "\n\n";
+
+ var s = new String(block);
+ s.trailing = trail;
+ // To make it clear its not just a string
+ s.inspect = mk_block_inspect;
+ s.toSource = mk_block_toSource;
+
+ if ( line != undefined )
+ s.lineNumber = line;
+
+ return s;
+};
+
+function count_lines( str ) {
+ var n = 0, i = -1;
+ while ( ( i = str.indexOf("\n", i + 1) ) !== -1 ) n++;
+ return n;
+}
+
+// Internal - split source into rough blocks
+Markdown.prototype.split_blocks = function splitBlocks( input, startLine ) {
+ input = input.replace(/(\r\n|\n|\r)/g, "\n");
+ // [\s\S] matches _anything_ (newline or space)
+ // [^] is equivalent but doesn't work in IEs.
+ var re = /([\s\S]+?)($|\n#|\n(?:\s*\n|$)+)/g,
+ blocks = [],
+ m;
+
+ var line_no = 1;
+
+ if ( ( m = /^(\s*\n)/.exec(input) ) != null ) {
+ // skip (but count) leading blank lines
+ line_no += count_lines( m[0] );
+ re.lastIndex = m[0].length;
+ }
+
+ while ( ( m = re.exec(input) ) !== null ) {
+ if (m[2] == "\n#") {
+ m[2] = "\n";
+ re.lastIndex--;
+ }
+ blocks.push( mk_block( m[1], m[2], line_no ) );
+ line_no += count_lines( m[0] );
+ }
+
+ return blocks;
+};
+
+/**
+ * Markdown#processBlock( block, next ) -> undefined | [ JsonML, ... ]
+ * - block (String): the block to process
+ * - next (Array): the following blocks
+ *
+ * Process `block` and return an array of JsonML nodes representing `block`.
+ *
+ * It does this by asking each block level function in the dialect to process
+ * the block until one can. Succesful handling is indicated by returning an
+ * array (with zero or more JsonML nodes), failure by a false value.
+ *
+ * Blocks handlers are responsible for calling [[Markdown#processInline]]
+ * themselves as appropriate.
+ *
+ * If the blocks were split incorrectly or adjacent blocks need collapsing you
+ * can adjust `next` in place using shift/splice etc.
+ *
+ * If any of this default behaviour is not right for the dialect, you can
+ * define a `__call__` method on the dialect that will get invoked to handle
+ * the block processing.
+ */
+Markdown.prototype.processBlock = function processBlock( block, next ) {
+ var cbs = this.dialect.block,
+ ord = cbs.__order__;
+
+ if ( "__call__" in cbs ) {
+ return cbs.__call__.call(this, block, next);
+ }
+
+ for ( var i = 0; i < ord.length; i++ ) {
+ //D:this.debug( "Testing", ord[i] );
+ var res = cbs[ ord[i] ].call( this, block, next );
+ if ( res ) {
+ //D:this.debug(" matched");
+ if ( !isArray(res) || ( res.length > 0 && !( isArray(res[0]) ) ) )
+ this.debug(ord[i], "didn't return a proper array");
+ //D:this.debug( "" );
+ return res;
+ }
+ }
+
+ // Uhoh! no match! Should we throw an error?
+ return [];
+};
+
+Markdown.prototype.processInline = function processInline( block ) {
+ return this.dialect.inline.__call__.call( this, String( block ) );
+};
+
+/**
+ * Markdown#toTree( source ) -> JsonML
+ * - source (String): markdown source to parse
+ *
+ * Parse `source` into a JsonML tree representing the markdown document.
+ **/
+// custom_tree means set this.tree to `custom_tree` and restore old value on return
+Markdown.prototype.toTree = function toTree( source, custom_root ) {
+ var blocks = source instanceof Array ? source : this.split_blocks( source );
+
+ // Make tree a member variable so its easier to mess with in extensions
+ var old_tree = this.tree;
+ try {
+ this.tree = custom_root || this.tree || [ "markdown" ];
+
+ blocks:
+ while ( blocks.length ) {
+ var b = this.processBlock( blocks.shift(), blocks );
+
+ // Reference blocks and the like won't return any content
+ if ( !b.length ) continue blocks;
+
+ this.tree.push.apply( this.tree, b );
+ }
+ return this.tree;
+ }
+ finally {
+ if ( custom_root ) {
+ this.tree = old_tree;
+ }
+ }
+};
+
+// Noop by default
+Markdown.prototype.debug = function () {
+ var args = Array.prototype.slice.call( arguments);
+ args.unshift(this.debug_indent);
+ if ( typeof print !== "undefined" )
+ print.apply( print, args );
+ if ( typeof console !== "undefined" && typeof console.log !== "undefined" )
+ console.log.apply( null, args );
+}
+
+Markdown.prototype.loop_re_over_block = function( re, block, cb ) {
+ // Dont use /g regexps with this
+ var m,
+ b = block.valueOf();
+
+ while ( b.length && (m = re.exec(b) ) != null ) {
+ b = b.substr( m[0].length );
+ cb.call(this, m);
+ }
+ return b;
+};
+
+/**
+ * Markdown.dialects
+ *
+ * Namespace of built-in dialects.
+ **/
+Markdown.dialects = {};
+
+/**
+ * Markdown.dialects.Gruber
+ *
+ * The default dialect that follows the rules set out by John Gruber's
+ * markdown.pl as closely as possible. Well actually we follow the behaviour of
+ * that script which in some places is not exactly what the syntax web page
+ * says.
+ **/
+Markdown.dialects.Gruber = {
+ block: {
+ atxHeader: function atxHeader( block, next ) {
+ var m = block.match( /^(#{1,6})\s*(.*?)\s*#*\s*(?:\n|$)/ );
+
+ if ( !m ) return undefined;
+
+ var header = [ "header", { level: m[ 1 ].length } ];
+ Array.prototype.push.apply(header, this.processInline(m[ 2 ]));
+
+ if ( m[0].length < block.length )
+ next.unshift( mk_block( block.substr( m[0].length ), block.trailing, block.lineNumber + 2 ) );
+
+ return [ header ];
+ },
+
+ setextHeader: function setextHeader( block, next ) {
+ var m = block.match( /^(.*)\n([-=])\2\2+(?:\n|$)/ );
+
+ if ( !m ) return undefined;
+
+ var level = ( m[ 2 ] === "=" ) ? 1 : 2;
+ var header = [ "header", { level : level }, m[ 1 ] ];
+
+ if ( m[0].length < block.length )
+ next.unshift( mk_block( block.substr( m[0].length ), block.trailing, block.lineNumber + 2 ) );
+
+ return [ header ];
+ },
+
+ code: function code( block, next ) {
+ // | Foo
+ // |bar
+ // should be a code block followed by a paragraph. Fun
+ //
+ // There might also be adjacent code block to merge.
+
+ var ret = [],
+ re = /^(?: {0,3}\t| {4})(.*)\n?/,
+ lines;
+
+ // 4 spaces + content
+ if ( !block.match( re ) ) return undefined;
+
+ block_search:
+ do {
+ // Now pull out the rest of the lines
+ var b = this.loop_re_over_block(
+ re, block.valueOf(), function( m ) { ret.push( m[1] ); } );
+
+ if ( b.length ) {
+ // Case alluded to in first comment. push it back on as a new block
+ next.unshift( mk_block(b, block.trailing) );
+ break block_search;
+ }
+ else if ( next.length ) {
+ // Check the next block - it might be code too
+ if ( !next[0].match( re ) ) break block_search;
+
+ // Pull how how many blanks lines follow - minus two to account for .join
+ ret.push ( block.trailing.replace(/[^\n]/g, "").substring(2) );
+
+ block = next.shift();
+ }
+ else {
+ break block_search;
+ }
+ } while ( true );
+
+ return [ [ "code_block", ret.join("\n") ] ];
+ },
+
+ horizRule: function horizRule( block, next ) {
+ // this needs to find any hr in the block to handle abutting blocks
+ var m = block.match( /^(?:([\s\S]*?)\n)?[ \t]*([-_*])(?:[ \t]*\2){2,}[ \t]*(?:\n([\s\S]*))?$/ );
+
+ if ( !m ) {
+ return undefined;
+ }
+
+ var jsonml = [ [ "hr" ] ];
+
+ // if there's a leading abutting block, process it
+ if ( m[ 1 ] ) {
+ jsonml.unshift.apply( jsonml, this.processBlock( m[ 1 ], [] ) );
+ }
+
+ // if there's a trailing abutting block, stick it into next
+ if ( m[ 3 ] ) {
+ next.unshift( mk_block( m[ 3 ] ) );
+ }
+
+ return jsonml;
+ },
+
+ // There are two types of lists. Tight and loose. Tight lists have no whitespace
+ // between the items (and result in text just in the ) and loose lists,
+ // which have an empty line between list items, resulting in (one or more)
+ // paragraphs inside the .
+ //
+ // There are all sorts weird edge cases about the original markdown.pl's
+ // handling of lists:
+ //
+ // * Nested lists are supposed to be indented by four chars per level. But
+ // if they aren't, you can get a nested list by indenting by less than
+ // four so long as the indent doesn't match an indent of an existing list
+ // item in the 'nest stack'.
+ //
+ // * The type of the list (bullet or number) is controlled just by the
+ // first item at the indent. Subsequent changes are ignored unless they
+ // are for nested lists
+ //
+ lists: (function( ) {
+ // Use a closure to hide a few variables.
+ var any_list = "[*+-]|\\d+\\.",
+ bullet_list = /[*+-]/,
+ number_list = /\d+\./,
+ // Capture leading indent as it matters for determining nested lists.
+ is_list_re = new RegExp( "^( {0,3})(" + any_list + ")[ \t]+" ),
+ indent_re = "(?: {0,3}\\t| {4})";
+
+ // TODO: Cache this regexp for certain depths.
+ // Create a regexp suitable for matching an li for a given stack depth
+ function regex_for_depth( depth ) {
+
+ return new RegExp(
+ // m[1] = indent, m[2] = list_type
+ "(?:^(" + indent_re + "{0," + depth + "} {0,3})(" + any_list + ")\\s+)|" +
+ // m[3] = cont
+ "(^" + indent_re + "{0," + (depth-1) + "}[ ]{0,4})"
+ );
+ }
+ function expand_tab( input ) {
+ return input.replace( / {0,3}\t/g, " " );
+ }
+
+ // Add inline content `inline` to `li`. inline comes from processInline
+ // so is an array of content
+ function add(li, loose, inline, nl) {
+ if ( loose ) {
+ li.push( [ "para" ].concat(inline) );
+ return;
+ }
+ // Hmmm, should this be any block level element or just paras?
+ var add_to = li[li.length -1] instanceof Array && li[li.length - 1][0] == "para"
+ ? li[li.length -1]
+ : li;
+
+ // If there is already some content in this list, add the new line in
+ if ( nl && li.length > 1 ) inline.unshift(nl);
+
+ for ( var i = 0; i < inline.length; i++ ) {
+ var what = inline[i],
+ is_str = typeof what == "string";
+ if ( is_str && add_to.length > 1 && typeof add_to[add_to.length-1] == "string" ) {
+ add_to[ add_to.length-1 ] += what;
+ }
+ else {
+ add_to.push( what );
+ }
+ }
+ }
+
+ // contained means have an indent greater than the current one. On
+ // *every* line in the block
+ function get_contained_blocks( depth, blocks ) {
+
+ var re = new RegExp( "^(" + indent_re + "{" + depth + "}.*?\\n?)*$" ),
+ replace = new RegExp("^" + indent_re + "{" + depth + "}", "gm"),
+ ret = [];
+
+ while ( blocks.length > 0 ) {
+ if ( re.exec( blocks[0] ) ) {
+ var b = blocks.shift(),
+ // Now remove that indent
+ x = b.replace( replace, "");
+
+ ret.push( mk_block( x, b.trailing, b.lineNumber ) );
+ }
+ else {
+ break;
+ }
+ }
+ return ret;
+ }
+
+ // passed to stack.forEach to turn list items up the stack into paras
+ function paragraphify(s, i, stack) {
+ var list = s.list;
+ var last_li = list[list.length-1];
+
+ if ( last_li[1] instanceof Array && last_li[1][0] == "para" ) {
+ return;
+ }
+ if ( i + 1 == stack.length ) {
+ // Last stack frame
+ // Keep the same array, but replace the contents
+ last_li.push( ["para"].concat( last_li.splice(1, last_li.length - 1) ) );
+ }
+ else {
+ var sublist = last_li.pop();
+ last_li.push( ["para"].concat( last_li.splice(1, last_li.length - 1) ), sublist );
+ }
+ }
+
+ // The matcher function
+ return function( block, next ) {
+ var m = block.match( is_list_re );
+ if ( !m ) return undefined;
+
+ function make_list( m ) {
+ var list = bullet_list.exec( m[2] )
+ ? ["bulletlist"]
+ : ["numberlist"];
+
+ stack.push( { list: list, indent: m[1] } );
+ return list;
+ }
+
+
+ var stack = [], // Stack of lists for nesting.
+ list = make_list( m ),
+ last_li,
+ loose = false,
+ ret = [ stack[0].list ],
+ i;
+
+ // Loop to search over block looking for inner block elements and loose lists
+ loose_search:
+ while ( true ) {
+ // Split into lines preserving new lines at end of line
+ var lines = block.split( /(?=\n)/ );
+
+ // We have to grab all lines for a li and call processInline on them
+ // once as there are some inline things that can span lines.
+ var li_accumulate = "";
+
+ // Loop over the lines in this block looking for tight lists.
+ tight_search:
+ for ( var line_no = 0; line_no < lines.length; line_no++ ) {
+ var nl = "",
+ l = lines[line_no].replace(/^\n/, function(n) { nl = n; return ""; });
+
+ // TODO: really should cache this
+ var line_re = regex_for_depth( stack.length );
+
+ m = l.match( line_re );
+ //print( "line:", uneval(l), "\nline match:", uneval(m) );
+
+ // We have a list item
+ if ( m[1] !== undefined ) {
+ // Process the previous list item, if any
+ if ( li_accumulate.length ) {
+ add( last_li, loose, this.processInline( li_accumulate ), nl );
+ // Loose mode will have been dealt with. Reset it
+ loose = false;
+ li_accumulate = "";
+ }
+
+ m[1] = expand_tab( m[1] );
+ var wanted_depth = Math.floor(m[1].length/4)+1;
+ //print( "want:", wanted_depth, "stack:", stack.length);
+ if ( wanted_depth > stack.length ) {
+ // Deep enough for a nested list outright
+ //print ( "new nested list" );
+ list = make_list( m );
+ last_li.push( list );
+ last_li = list[1] = [ "listitem" ];
+ }
+ else {
+ // We aren't deep enough to be strictly a new level. This is
+ // where Md.pl goes nuts. If the indent matches a level in the
+ // stack, put it there, else put it one deeper then the
+ // wanted_depth deserves.
+ var found = false;
+ for ( i = 0; i < stack.length; i++ ) {
+ if ( stack[ i ].indent != m[1] ) continue;
+ list = stack[ i ].list;
+ stack.splice( i+1, stack.length - (i+1) );
+ found = true;
+ break;
+ }
+
+ if (!found) {
+ //print("not found. l:", uneval(l));
+ wanted_depth++;
+ if ( wanted_depth <= stack.length ) {
+ stack.splice(wanted_depth, stack.length - wanted_depth);
+ //print("Desired depth now", wanted_depth, "stack:", stack.length);
+ list = stack[wanted_depth-1].list;
+ //print("list:", uneval(list) );
+ }
+ else {
+ //print ("made new stack for messy indent");
+ list = make_list(m);
+ last_li.push(list);
+ }
+ }
+
+ //print( uneval(list), "last", list === stack[stack.length-1].list );
+ last_li = [ "listitem" ];
+ list.push(last_li);
+ } // end depth of shenegains
+ nl = "";
+ }
+
+ // Add content
+ if ( l.length > m[0].length ) {
+ li_accumulate += nl + l.substr( m[0].length );
+ }
+ } // tight_search
+
+ if ( li_accumulate.length ) {
+ add( last_li, loose, this.processInline( li_accumulate ), nl );
+ // Loose mode will have been dealt with. Reset it
+ loose = false;
+ li_accumulate = "";
+ }
+
+ // Look at the next block - we might have a loose list. Or an extra
+ // paragraph for the current li
+ var contained = get_contained_blocks( stack.length, next );
+
+ // Deal with code blocks or properly nested lists
+ if ( contained.length > 0 ) {
+ // Make sure all listitems up the stack are paragraphs
+ forEach( stack, paragraphify, this);
+
+ last_li.push.apply( last_li, this.toTree( contained, [] ) );
+ }
+
+ var next_block = next[0] && next[0].valueOf() || "";
+
+ if ( next_block.match(is_list_re) || next_block.match( /^ / ) ) {
+ block = next.shift();
+
+ // Check for an HR following a list: features/lists/hr_abutting
+ var hr = this.dialect.block.horizRule( block, next );
+
+ if ( hr ) {
+ ret.push.apply(ret, hr);
+ break;
+ }
+
+ // Make sure all listitems up the stack are paragraphs
+ forEach( stack, paragraphify, this);
+
+ loose = true;
+ continue loose_search;
+ }
+ break;
+ } // loose_search
+
+ return ret;
+ };
+ })(),
+
+ blockquote: function blockquote( block, next ) {
+ if ( !block.match( /^>/m ) )
+ return undefined;
+
+ var jsonml = [];
+
+ // separate out the leading abutting block, if any. I.e. in this case:
+ //
+ // a
+ // > b
+ //
+ if ( block[ 0 ] != ">" ) {
+ var lines = block.split( /\n/ ),
+ prev = [],
+ line_no = block.lineNumber;
+
+ // keep shifting lines until you find a crotchet
+ while ( lines.length && lines[ 0 ][ 0 ] != ">" ) {
+ prev.push( lines.shift() );
+ line_no++;
+ }
+
+ var abutting = mk_block( prev.join( "\n" ), "\n", block.lineNumber );
+ jsonml.push.apply( jsonml, this.processBlock( abutting, [] ) );
+ // reassemble new block of just block quotes!
+ block = mk_block( lines.join( "\n" ), block.trailing, line_no );
+ }
+
+
+ // if the next block is also a blockquote merge it in
+ while ( next.length && next[ 0 ][ 0 ] == ">" ) {
+ var b = next.shift();
+ block = mk_block( block + block.trailing + b, b.trailing, block.lineNumber );
+ }
+
+ // Strip off the leading "> " and re-process as a block.
+ var input = block.replace( /^> ?/gm, "" ),
+ old_tree = this.tree,
+ processedBlock = this.toTree( input, [ "blockquote" ] ),
+ attr = extract_attr( processedBlock );
+
+ // If any link references were found get rid of them
+ if ( attr && attr.references ) {
+ delete attr.references;
+ // And then remove the attribute object if it's empty
+ if ( isEmpty( attr ) ) {
+ processedBlock.splice( 1, 1 );
+ }
+ }
+
+ jsonml.push( processedBlock );
+ return jsonml;
+ },
+
+ referenceDefn: function referenceDefn( block, next) {
+ var re = /^\s*\[(.*?)\]:\s*(\S+)(?:\s+(?:(['"])(.*?)\3|\((.*?)\)))?\n?/;
+ // interesting matches are [ , ref_id, url, , title, title ]
+
+ if ( !block.match(re) )
+ return undefined;
+
+ // make an attribute node if it doesn't exist
+ if ( !extract_attr( this.tree ) ) {
+ this.tree.splice( 1, 0, {} );
+ }
+
+ var attrs = extract_attr( this.tree );
+
+ // make a references hash if it doesn't exist
+ if ( attrs.references === undefined ) {
+ attrs.references = {};
+ }
+
+ var b = this.loop_re_over_block(re, block, function( m ) {
+
+ if ( m[2] && m[2][0] == "<" && m[2][m[2].length-1] == ">" )
+ m[2] = m[2].substring( 1, m[2].length - 1 );
+
+ var ref = attrs.references[ m[1].toLowerCase() ] = {
+ href: m[2]
+ };
+
+ if ( m[4] !== undefined )
+ ref.title = m[4];
+ else if ( m[5] !== undefined )
+ ref.title = m[5];
+
+ } );
+
+ if ( b.length )
+ next.unshift( mk_block( b, block.trailing ) );
+
+ return [];
+ },
+
+ para: function para( block, next ) {
+ // everything's a para!
+ return [ ["para"].concat( this.processInline( block ) ) ];
+ }
+ }
+};
+
+Markdown.dialects.Gruber.inline = {
+
+ __oneElement__: function oneElement( text, patterns_or_re, previous_nodes ) {
+ var m,
+ res,
+ lastIndex = 0;
+
+ patterns_or_re = patterns_or_re || this.dialect.inline.__patterns__;
+ var re = new RegExp( "([\\s\\S]*?)(" + (patterns_or_re.source || patterns_or_re) + ")" );
+
+ m = re.exec( text );
+ if (!m) {
+ // Just boring text
+ return [ text.length, text ];
+ }
+ else if ( m[1] ) {
+ // Some un-interesting text matched. Return that first
+ return [ m[1].length, m[1] ];
+ }
+
+ var res;
+ if ( m[2] in this.dialect.inline ) {
+ res = this.dialect.inline[ m[2] ].call(
+ this,
+ text.substr( m.index ), m, previous_nodes || [] );
+ }
+ // Default for now to make dev easier. just slurp special and output it.
+ res = res || [ m[2].length, m[2] ];
+ return res;
+ },
+
+ __call__: function inline( text, patterns ) {
+
+ var out = [],
+ res;
+
+ function add(x) {
+ //D:self.debug(" adding output", uneval(x));
+ if ( typeof x == "string" && typeof out[out.length-1] == "string" )
+ out[ out.length-1 ] += x;
+ else
+ out.push(x);
+ }
+
+ while ( text.length > 0 ) {
+ res = this.dialect.inline.__oneElement__.call(this, text, patterns, out );
+ text = text.substr( res.shift() );
+ forEach(res, add )
+ }
+
+ return out;
+ },
+
+ // These characters are intersting elsewhere, so have rules for them so that
+ // chunks of plain text blocks don't include them
+ "]": function () {},
+ "}": function () {},
+
+ __escape__ : /^\\[\\`\*_{}\[\]()#\+.!\-]/,
+
+ "\\": function escaped( text ) {
+ // [ length of input processed, node/children to add... ]
+ // Only esacape: \ ` * _ { } [ ] ( ) # * + - . !
+ if ( this.dialect.inline.__escape__.exec( text ) )
+ return [ 2, text.charAt( 1 ) ];
+ else
+ // Not an esacpe
+ return [ 1, "\\" ];
+ },
+
+ "![": function image( text ) {
+
+ // Unlike images, alt text is plain text only. no other elements are
+ // allowed in there
+
+ // ![Alt text](/path/to/img.jpg "Optional title")
+ // 1 2 3 4 <--- captures
+ var m = text.match( /^!\[(.*?)\][ \t]*\([ \t]*([^")]*?)(?:[ \t]+(["'])(.*?)\3)?[ \t]*\)/ );
+
+ if ( m ) {
+ if ( m[2] && m[2][0] == "<" && m[2][m[2].length-1] == ">" )
+ m[2] = m[2].substring( 1, m[2].length - 1 );
+
+ m[2] = this.dialect.inline.__call__.call( this, m[2], /\\/ )[0];
+
+ var attrs = { alt: m[1], href: m[2] || "" };
+ if ( m[4] !== undefined)
+ attrs.title = m[4];
+
+ return [ m[0].length, [ "img", attrs ] ];
+ }
+
+ // ![Alt text][id]
+ m = text.match( /^!\[(.*?)\][ \t]*\[(.*?)\]/ );
+
+ if ( m ) {
+ // We can't check if the reference is known here as it likely wont be
+ // found till after. Check it in md tree->hmtl tree conversion
+ return [ m[0].length, [ "img_ref", { alt: m[1], ref: m[2].toLowerCase(), original: m[0] } ] ];
+ }
+
+ // Just consume the '!['
+ return [ 2, "![" ];
+ },
+
+ "[": function link( text ) {
+
+ var orig = String(text);
+ // Inline content is possible inside `link text`
+ var res = Markdown.DialectHelpers.inline_until_char.call( this, text.substr(1), "]" );
+
+ // No closing ']' found. Just consume the [
+ if ( !res ) return [ 1, "[" ];
+
+ var consumed = 1 + res[ 0 ],
+ children = res[ 1 ],
+ link,
+ attrs;
+
+ // At this point the first [...] has been parsed. See what follows to find
+ // out which kind of link we are (reference or direct url)
+ text = text.substr( consumed );
+
+ // [link text](/path/to/img.jpg "Optional title")
+ // 1 2 3 <--- captures
+ // This will capture up to the last paren in the block. We then pull
+ // back based on if there a matching ones in the url
+ // ([here](/url/(test))
+ // The parens have to be balanced
+ var m = text.match( /^\s*\([ \t]*([^"']*)(?:[ \t]+(["'])(.*?)\2)?[ \t]*\)/ );
+ if ( m ) {
+ var url = m[1];
+ consumed += m[0].length;
+
+ if ( url && url[0] == "<" && url[url.length-1] == ">" )
+ url = url.substring( 1, url.length - 1 );
+
+ // If there is a title we don't have to worry about parens in the url
+ if ( !m[3] ) {
+ var open_parens = 1; // One open that isn't in the capture
+ for ( var len = 0; len < url.length; len++ ) {
+ switch ( url[len] ) {
+ case "(":
+ open_parens++;
+ break;
+ case ")":
+ if ( --open_parens == 0) {
+ consumed -= url.length - len;
+ url = url.substring(0, len);
+ }
+ break;
+ }
+ }
+ }
+
+ // Process escapes only
+ url = this.dialect.inline.__call__.call( this, url, /\\/ )[0];
+
+ attrs = { href: url || "" };
+ if ( m[3] !== undefined)
+ attrs.title = m[3];
+
+ link = [ "link", attrs ].concat( children );
+ return [ consumed, link ];
+ }
+
+ // [Alt text][id]
+ // [Alt text] [id]
+ m = text.match( /^\s*\[(.*?)\]/ );
+
+ if ( m ) {
+
+ consumed += m[ 0 ].length;
+
+ // [links][] uses links as its reference
+ attrs = { ref: ( m[ 1 ] || String(children) ).toLowerCase(), original: orig.substr( 0, consumed ) };
+
+ link = [ "link_ref", attrs ].concat( children );
+
+ // We can't check if the reference is known here as it likely wont be
+ // found till after. Check it in md tree->hmtl tree conversion.
+ // Store the original so that conversion can revert if the ref isn't found.
+ return [ consumed, link ];
+ }
+
+ // [id]
+ // Only if id is plain (no formatting.)
+ if ( children.length == 1 && typeof children[0] == "string" ) {
+
+ attrs = { ref: children[0].toLowerCase(), original: orig.substr( 0, consumed ) };
+ link = [ "link_ref", attrs, children[0] ];
+ return [ consumed, link ];
+ }
+
+ // Just consume the "["
+ return [ 1, "[" ];
+ },
+
+
+ "<": function autoLink( text ) {
+ var m;
+
+ if ( ( m = text.match( /^<(?:((https?|ftp|mailto):[^>]+)|(.*?@.*?\.[a-zA-Z]+))>/ ) ) != null ) {
+ if ( m[3] ) {
+ return [ m[0].length, [ "link", { href: "mailto:" + m[3] }, m[3] ] ];
+
+ }
+ else if ( m[2] == "mailto" ) {
+ return [ m[0].length, [ "link", { href: m[1] }, m[1].substr("mailto:".length ) ] ];
+ }
+ else
+ return [ m[0].length, [ "link", { href: m[1] }, m[1] ] ];
+ }
+
+ return [ 1, "<" ];
+ },
+
+ "`": function inlineCode( text ) {
+ // Inline code block. as many backticks as you like to start it
+ // Always skip over the opening ticks.
+ var m = text.match( /(`+)(([\s\S]*?)\1)/ );
+
+ if ( m && m[2] )
+ return [ m[1].length + m[2].length, [ "inlinecode", m[3] ] ];
+ else {
+ // TODO: No matching end code found - warn!
+ return [ 1, "`" ];
+ }
+ },
+
+ " \n": function lineBreak( text ) {
+ return [ 3, [ "linebreak" ] ];
+ }
+
+};
+
+// Meta Helper/generator method for em and strong handling
+function strong_em( tag, md ) {
+
+ var state_slot = tag + "_state",
+ other_slot = tag == "strong" ? "em_state" : "strong_state";
+
+ function CloseTag(len) {
+ this.len_after = len;
+ this.name = "close_" + md;
+ }
+
+ return function ( text, orig_match ) {
+
+ if ( this[state_slot][0] == md ) {
+ // Most recent em is of this type
+ //D:this.debug("closing", md);
+ this[state_slot].shift();
+
+ // "Consume" everything to go back to the recrusion in the else-block below
+ return[ text.length, new CloseTag(text.length-md.length) ];
+ }
+ else {
+ // Store a clone of the em/strong states
+ var other = this[other_slot].slice(),
+ state = this[state_slot].slice();
+
+ this[state_slot].unshift(md);
+
+ //D:this.debug_indent += " ";
+
+ // Recurse
+ var res = this.processInline( text.substr( md.length ) );
+ //D:this.debug_indent = this.debug_indent.substr(2);
+
+ var last = res[res.length - 1];
+
+ //D:this.debug("processInline from", tag + ": ", uneval( res ) );
+
+ var check = this[state_slot].shift();
+ if ( last instanceof CloseTag ) {
+ res.pop();
+ // We matched! Huzzah.
+ var consumed = text.length - last.len_after;
+ return [ consumed, [ tag ].concat(res) ];
+ }
+ else {
+ // Restore the state of the other kind. We might have mistakenly closed it.
+ this[other_slot] = other;
+ this[state_slot] = state;
+
+ // We can't reuse the processed result as it could have wrong parsing contexts in it.
+ return [ md.length, md ];
+ }
+ }
+ }; // End returned function
+}
+
+Markdown.dialects.Gruber.inline["**"] = strong_em("strong", "**");
+Markdown.dialects.Gruber.inline["__"] = strong_em("strong", "__");
+Markdown.dialects.Gruber.inline["*"] = strong_em("em", "*");
+Markdown.dialects.Gruber.inline["_"] = strong_em("em", "_");
+
+
+// Build default order from insertion order.
+Markdown.buildBlockOrder = function(d) {
+ var ord = [];
+ for ( var i in d ) {
+ if ( i == "__order__" || i == "__call__" ) continue;
+ ord.push( i );
+ }
+ d.__order__ = ord;
+};
+
+// Build patterns for inline matcher
+Markdown.buildInlinePatterns = function(d) {
+ var patterns = [];
+
+ for ( var i in d ) {
+ // __foo__ is reserved and not a pattern
+ if ( i.match( /^__.*__$/) ) continue;
+ var l = i.replace( /([\\.*+?|()\[\]{}])/g, "\\$1" )
+ .replace( /\n/, "\\n" );
+ patterns.push( i.length == 1 ? l : "(?:" + l + ")" );
+ }
+
+ patterns = patterns.join("|");
+ d.__patterns__ = patterns;
+ //print("patterns:", uneval( patterns ) );
+
+ var fn = d.__call__;
+ d.__call__ = function(text, pattern) {
+ if ( pattern != undefined ) {
+ return fn.call(this, text, pattern);
+ }
+ else
+ {
+ return fn.call(this, text, patterns);
+ }
+ };
+};
+
+Markdown.DialectHelpers = {};
+Markdown.DialectHelpers.inline_until_char = function( text, want ) {
+ var consumed = 0,
+ nodes = [];
+
+ while ( true ) {
+ if ( text.charAt( consumed ) == want ) {
+ // Found the character we were looking for
+ consumed++;
+ return [ consumed, nodes ];
+ }
+
+ if ( consumed >= text.length ) {
+ // No closing char found. Abort.
+ return null;
+ }
+
+ var res = this.dialect.inline.__oneElement__.call(this, text.substr( consumed ) );
+ consumed += res[ 0 ];
+ // Add any returned nodes.
+ nodes.push.apply( nodes, res.slice( 1 ) );
+ }
+}
+
+// Helper function to make sub-classing a dialect easier
+Markdown.subclassDialect = function( d ) {
+ function Block() {}
+ Block.prototype = d.block;
+ function Inline() {}
+ Inline.prototype = d.inline;
+
+ return { block: new Block(), inline: new Inline() };
+};
+
+Markdown.buildBlockOrder ( Markdown.dialects.Gruber.block );
+Markdown.buildInlinePatterns( Markdown.dialects.Gruber.inline );
+
+Markdown.dialects.Maruku = Markdown.subclassDialect( Markdown.dialects.Gruber );
+
+Markdown.dialects.Maruku.processMetaHash = function processMetaHash( meta_string ) {
+ var meta = split_meta_hash( meta_string ),
+ attr = {};
+
+ for ( var i = 0; i < meta.length; ++i ) {
+ // id: #foo
+ if ( /^#/.test( meta[ i ] ) ) {
+ attr.id = meta[ i ].substring( 1 );
+ }
+ // class: .foo
+ else if ( /^\./.test( meta[ i ] ) ) {
+ // if class already exists, append the new one
+ if ( attr["class"] ) {
+ attr["class"] = attr["class"] + meta[ i ].replace( /./, " " );
+ }
+ else {
+ attr["class"] = meta[ i ].substring( 1 );
+ }
+ }
+ // attribute: foo=bar
+ else if ( /\=/.test( meta[ i ] ) ) {
+ var s = meta[ i ].split( /\=/ );
+ attr[ s[ 0 ] ] = s[ 1 ];
+ }
+ }
+
+ return attr;
+}
+
+function split_meta_hash( meta_string ) {
+ var meta = meta_string.split( "" ),
+ parts = [ "" ],
+ in_quotes = false;
+
+ while ( meta.length ) {
+ var letter = meta.shift();
+ switch ( letter ) {
+ case " " :
+ // if we're in a quoted section, keep it
+ if ( in_quotes ) {
+ parts[ parts.length - 1 ] += letter;
+ }
+ // otherwise make a new part
+ else {
+ parts.push( "" );
+ }
+ break;
+ case "'" :
+ case '"' :
+ // reverse the quotes and move straight on
+ in_quotes = !in_quotes;
+ break;
+ case "\\" :
+ // shift off the next letter to be used straight away.
+ // it was escaped so we'll keep it whatever it is
+ letter = meta.shift();
+ default :
+ parts[ parts.length - 1 ] += letter;
+ break;
+ }
+ }
+
+ return parts;
+}
+
+Markdown.dialects.Maruku.block.document_meta = function document_meta( block, next ) {
+ // we're only interested in the first block
+ if ( block.lineNumber > 1 ) return undefined;
+
+ // document_meta blocks consist of one or more lines of `Key: Value\n`
+ if ( ! block.match( /^(?:\w+:.*\n)*\w+:.*$/ ) ) return undefined;
+
+ // make an attribute node if it doesn't exist
+ if ( !extract_attr( this.tree ) ) {
+ this.tree.splice( 1, 0, {} );
+ }
+
+ var pairs = block.split( /\n/ );
+ for ( p in pairs ) {
+ var m = pairs[ p ].match( /(\w+):\s*(.*)$/ ),
+ key = m[ 1 ].toLowerCase(),
+ value = m[ 2 ];
+
+ this.tree[ 1 ][ key ] = value;
+ }
+
+ // document_meta produces no content!
+ return [];
+};
+
+Markdown.dialects.Maruku.block.block_meta = function block_meta( block, next ) {
+ // check if the last line of the block is an meta hash
+ var m = block.match( /(^|\n) {0,3}\{:\s*((?:\\\}|[^\}])*)\s*\}$/ );
+ if ( !m ) return undefined;
+
+ // process the meta hash
+ var attr = this.dialect.processMetaHash( m[ 2 ] );
+
+ var hash;
+
+ // if we matched ^ then we need to apply meta to the previous block
+ if ( m[ 1 ] === "" ) {
+ var node = this.tree[ this.tree.length - 1 ];
+ hash = extract_attr( node );
+
+ // if the node is a string (rather than JsonML), bail
+ if ( typeof node === "string" ) return undefined;
+
+ // create the attribute hash if it doesn't exist
+ if ( !hash ) {
+ hash = {};
+ node.splice( 1, 0, hash );
+ }
+
+ // add the attributes in
+ for ( a in attr ) {
+ hash[ a ] = attr[ a ];
+ }
+
+ // return nothing so the meta hash is removed
+ return [];
+ }
+
+ // pull the meta hash off the block and process what's left
+ var b = block.replace( /\n.*$/, "" ),
+ result = this.processBlock( b, [] );
+
+ // get or make the attributes hash
+ hash = extract_attr( result[ 0 ] );
+ if ( !hash ) {
+ hash = {};
+ result[ 0 ].splice( 1, 0, hash );
+ }
+
+ // attach the attributes to the block
+ for ( a in attr ) {
+ hash[ a ] = attr[ a ];
+ }
+
+ return result;
+};
+
+Markdown.dialects.Maruku.block.definition_list = function definition_list( block, next ) {
+ // one or more terms followed by one or more definitions, in a single block
+ var tight = /^((?:[^\s:].*\n)+):\s+([\s\S]+)$/,
+ list = [ "dl" ],
+ i, m;
+
+ // see if we're dealing with a tight or loose block
+ if ( ( m = block.match( tight ) ) ) {
+ // pull subsequent tight DL blocks out of `next`
+ var blocks = [ block ];
+ while ( next.length && tight.exec( next[ 0 ] ) ) {
+ blocks.push( next.shift() );
+ }
+
+ for ( var b = 0; b < blocks.length; ++b ) {
+ var m = blocks[ b ].match( tight ),
+ terms = m[ 1 ].replace( /\n$/, "" ).split( /\n/ ),
+ defns = m[ 2 ].split( /\n:\s+/ );
+
+ // print( uneval( m ) );
+
+ for ( i = 0; i < terms.length; ++i ) {
+ list.push( [ "dt", terms[ i ] ] );
+ }
+
+ for ( i = 0; i < defns.length; ++i ) {
+ // run inline processing over the definition
+ list.push( [ "dd" ].concat( this.processInline( defns[ i ].replace( /(\n)\s+/, "$1" ) ) ) );
+ }
+ }
+ }
+ else {
+ return undefined;
+ }
+
+ return [ list ];
+};
+
+// splits on unescaped instances of @ch. If @ch is not a character the result
+// can be unpredictable
+
+Markdown.dialects.Maruku.block.table = function table (block, next) {
+
+ var _split_on_unescaped = function(s, ch) {
+ ch = ch || '\\s';
+ if (ch.match(/^[\\|\[\]{}?*.+^$]$/)) { ch = '\\' + ch; }
+ var res = [ ],
+ r = new RegExp('^((?:\\\\.|[^\\\\' + ch + '])*)' + ch + '(.*)'),
+ m;
+ while(m = s.match(r)) {
+ res.push(m[1]);
+ s = m[2];
+ }
+ res.push(s);
+ return res;
+ }
+
+ var leading_pipe = /^ {0,3}\|(.+)\n {0,3}\|\s*([\-:]+[\-| :]*)\n((?:\s*\|.*(?:\n|$))*)(?=\n|$)/,
+ // find at least an unescaped pipe in each line
+ no_leading_pipe = /^ {0,3}(\S(?:\\.|[^\\|])*\|.*)\n {0,3}([\-:]+\s*\|[\-| :]*)\n((?:(?:\\.|[^\\|])*\|.*(?:\n|$))*)(?=\n|$)/,
+ i, m;
+ if (m = block.match(leading_pipe)) {
+ // remove leading pipes in contents
+ // (header and horizontal rule already have the leading pipe left out)
+ m[3] = m[3].replace(/^\s*\|/gm, '');
+ } else if (! ( m = block.match(no_leading_pipe))) {
+ return undefined;
+ }
+
+ var table = [ "table", [ "thead", [ "tr" ] ], [ "tbody" ] ];
+
+ // remove trailing pipes, then split on pipes
+ // (no escaped pipes are allowed in horizontal rule)
+ m[2] = m[2].replace(/\|\s*$/, '').split('|');
+
+ // process alignment
+ var html_attrs = [ ];
+ forEach (m[2], function (s) {
+ if (s.match(/^\s*-+:\s*$/)) html_attrs.push({align: "right"});
+ else if (s.match(/^\s*:-+\s*$/)) html_attrs.push({align: "left"});
+ else if (s.match(/^\s*:-+:\s*$/)) html_attrs.push({align: "center"});
+ else html_attrs.push({});
+ });
+
+ // now for the header, avoid escaped pipes
+ m[1] = _split_on_unescaped(m[1].replace(/\|\s*$/, ''), '|');
+ for (i = 0; i < m[1].length; i++) {
+ table[1][1].push(['th', html_attrs[i] || {}].concat(
+ this.processInline(m[1][i].trim())));
+ }
+
+ // now for body contents
+ forEach (m[3].replace(/\|\s*$/mg, '').split('\n'), function (row) {
+ var html_row = ['tr'];
+ row = _split_on_unescaped(row, '|');
+ for (i = 0; i < row.length; i++) {
+ html_row.push(['td', html_attrs[i] || {}].concat(this.processInline(row[i].trim())));
+ }
+ table[2].push(html_row);
+ }, this);
+
+ return [table];
+}
+
+Markdown.dialects.Maruku.inline[ "{:" ] = function inline_meta( text, matches, out ) {
+ if ( !out.length ) {
+ return [ 2, "{:" ];
+ }
+
+ // get the preceeding element
+ var before = out[ out.length - 1 ];
+
+ if ( typeof before === "string" ) {
+ return [ 2, "{:" ];
+ }
+
+ // match a meta hash
+ var m = text.match( /^\{:\s*((?:\\\}|[^\}])*)\s*\}/ );
+
+ // no match, false alarm
+ if ( !m ) {
+ return [ 2, "{:" ];
+ }
+
+ // attach the attributes to the preceeding element
+ var meta = this.dialect.processMetaHash( m[ 1 ] ),
+ attr = extract_attr( before );
+
+ if ( !attr ) {
+ attr = {};
+ before.splice( 1, 0, attr );
+ }
+
+ for ( var k in meta ) {
+ attr[ k ] = meta[ k ];
+ }
+
+ // cut out the string and replace it with nothing
+ return [ m[ 0 ].length, "" ];
+};
+
+Markdown.dialects.Maruku.inline.__escape__ = /^\\[\\`\*_{}\[\]()#\+.!\-|:]/;
+
+Markdown.buildBlockOrder ( Markdown.dialects.Maruku.block );
+Markdown.buildInlinePatterns( Markdown.dialects.Maruku.inline );
+
+var isArray = Array.isArray || function(obj) {
+ return Object.prototype.toString.call(obj) == "[object Array]";
+};
+
+var forEach;
+// Don't mess with Array.prototype. Its not friendly
+if ( Array.prototype.forEach ) {
+ forEach = function( arr, cb, thisp ) {
+ return arr.forEach( cb, thisp );
+ };
+}
+else {
+ forEach = function(arr, cb, thisp) {
+ for (var i = 0; i < arr.length; i++) {
+ cb.call(thisp || arr, arr[i], i, arr);
+ }
+ }
+}
+
+var isEmpty = function( obj ) {
+ for ( var key in obj ) {
+ if ( hasOwnProperty.call( obj, key ) ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function extract_attr( jsonml ) {
+ return isArray(jsonml)
+ && jsonml.length > 1
+ && typeof jsonml[ 1 ] === "object"
+ && !( isArray(jsonml[ 1 ]) )
+ ? jsonml[ 1 ]
+ : undefined;
+}
+
+
+
+/**
+ * renderJsonML( jsonml[, options] ) -> String
+ * - jsonml (Array): JsonML array to render to XML
+ * - options (Object): options
+ *
+ * Converts the given JsonML into well-formed XML.
+ *
+ * The options currently understood are:
+ *
+ * - root (Boolean): wether or not the root node should be included in the
+ * output, or just its children. The default `false` is to not include the
+ * root itself.
+ */
+expose.renderJsonML = function( jsonml, options ) {
+ options = options || {};
+ // include the root element in the rendered output?
+ options.root = options.root || false;
+
+ var content = [];
+
+ if ( options.root ) {
+ content.push( render_tree( jsonml ) );
+ }
+ else {
+ jsonml.shift(); // get rid of the tag
+ if ( jsonml.length && typeof jsonml[ 0 ] === "object" && !( jsonml[ 0 ] instanceof Array ) ) {
+ jsonml.shift(); // get rid of the attributes
+ }
+
+ while ( jsonml.length ) {
+ content.push( render_tree( jsonml.shift() ) );
+ }
+ }
+
+ return content.join( "\n\n" );
+};
+
+function escapeHTML( text ) {
+ return text.replace( /&/g, "&" )
+ .replace( //g, ">" )
+ .replace( /"/g, """ )
+ .replace( /'/g, "'" );
+}
+
+function render_tree( jsonml ) {
+ // basic case
+ if ( typeof jsonml === "string" ) {
+ return escapeHTML( jsonml );
+ }
+
+ var tag = jsonml.shift(),
+ attributes = {},
+ content = [];
+
+ if ( jsonml.length && typeof jsonml[ 0 ] === "object" && !( jsonml[ 0 ] instanceof Array ) ) {
+ attributes = jsonml.shift();
+ }
+
+ while ( jsonml.length ) {
+ content.push( render_tree( jsonml.shift() ) );
+ }
+
+ var tag_attrs = "";
+ for ( var a in attributes ) {
+ tag_attrs += " " + a + '="' + escapeHTML( attributes[ a ] ) + '"';
+ }
+
+ // be careful about adding whitespace here for inline elements
+ if ( tag == "img" || tag == "br" || tag == "hr" ) {
+ return "<"+ tag + tag_attrs + "/>";
+ }
+ else {
+ return "<"+ tag + tag_attrs + ">" + content.join( "" ) + "" + tag + ">";
+ }
+}
+
+function convert_tree_to_html( tree, references, options ) {
+ var i;
+ options = options || {};
+
+ // shallow clone
+ var jsonml = tree.slice( 0 );
+
+ if ( typeof options.preprocessTreeNode === "function" ) {
+ jsonml = options.preprocessTreeNode(jsonml, references);
+ }
+
+ // Clone attributes if they exist
+ var attrs = extract_attr( jsonml );
+ if ( attrs ) {
+ jsonml[ 1 ] = {};
+ for ( i in attrs ) {
+ jsonml[ 1 ][ i ] = attrs[ i ];
+ }
+ attrs = jsonml[ 1 ];
+ }
+
+ // basic case
+ if ( typeof jsonml === "string" ) {
+ return jsonml;
+ }
+
+ // convert this node
+ switch ( jsonml[ 0 ] ) {
+ case "header":
+ jsonml[ 0 ] = "h" + jsonml[ 1 ].level;
+ delete jsonml[ 1 ].level;
+ break;
+ case "bulletlist":
+ jsonml[ 0 ] = "ul";
+ break;
+ case "numberlist":
+ jsonml[ 0 ] = "ol";
+ break;
+ case "listitem":
+ jsonml[ 0 ] = "li";
+ break;
+ case "para":
+ jsonml[ 0 ] = "p";
+ break;
+ case "markdown":
+ jsonml[ 0 ] = "html";
+ if ( attrs ) delete attrs.references;
+ break;
+ case "code_block":
+ jsonml[ 0 ] = "pre";
+ i = attrs ? 2 : 1;
+ var code = [ "code" ];
+ code.push.apply( code, jsonml.splice( i, jsonml.length - i ) );
+ jsonml[ i ] = code;
+ break;
+ case "inlinecode":
+ jsonml[ 0 ] = "code";
+ break;
+ case "img":
+ jsonml[ 1 ].src = jsonml[ 1 ].href;
+ delete jsonml[ 1 ].href;
+ break;
+ case "linebreak":
+ jsonml[ 0 ] = "br";
+ break;
+ case "link":
+ jsonml[ 0 ] = "a";
+ break;
+ case "link_ref":
+ jsonml[ 0 ] = "a";
+
+ // grab this ref and clean up the attribute node
+ var ref = references[ attrs.ref ];
+
+ // if the reference exists, make the link
+ if ( ref ) {
+ delete attrs.ref;
+
+ // add in the href and title, if present
+ attrs.href = ref.href;
+ if ( ref.title ) {
+ attrs.title = ref.title;
+ }
+
+ // get rid of the unneeded original text
+ delete attrs.original;
+ }
+ // the reference doesn't exist, so revert to plain text
+ else {
+ return attrs.original;
+ }
+ break;
+ case "img_ref":
+ jsonml[ 0 ] = "img";
+
+ // grab this ref and clean up the attribute node
+ var ref = references[ attrs.ref ];
+
+ // if the reference exists, make the link
+ if ( ref ) {
+ delete attrs.ref;
+
+ // add in the href and title, if present
+ attrs.src = ref.href;
+ if ( ref.title ) {
+ attrs.title = ref.title;
+ }
+
+ // get rid of the unneeded original text
+ delete attrs.original;
+ }
+ // the reference doesn't exist, so revert to plain text
+ else {
+ return attrs.original;
+ }
+ break;
+ }
+
+ // convert all the children
+ i = 1;
+
+ // deal with the attribute node, if it exists
+ if ( attrs ) {
+ // if there are keys, skip over it
+ for ( var key in jsonml[ 1 ] ) {
+ i = 2;
+ break;
+ }
+ // if there aren't, remove it
+ if ( i === 1 ) {
+ jsonml.splice( i, 1 );
+ }
+ }
+
+ for ( ; i < jsonml.length; ++i ) {
+ jsonml[ i ] = convert_tree_to_html( jsonml[ i ], references, options );
+ }
+
+ return jsonml;
+}
+
+
+// merges adjacent text nodes into a single node
+function merge_text_nodes( jsonml ) {
+ // skip the tag name and attribute hash
+ var i = extract_attr( jsonml ) ? 2 : 1;
+
+ while ( i < jsonml.length ) {
+ // if it's a string check the next item too
+ if ( typeof jsonml[ i ] === "string" ) {
+ if ( i + 1 < jsonml.length && typeof jsonml[ i + 1 ] === "string" ) {
+ // merge the second string into the first and remove it
+ jsonml[ i ] += jsonml.splice( i + 1, 1 )[ 0 ];
+ }
+ else {
+ ++i;
+ }
+ }
+ // if it's not a string recurse
+ else {
+ merge_text_nodes( jsonml[ i ] );
+ ++i;
+ }
+ }
+}
+
+} )( (function() {
+ if ( typeof exports === "undefined" ) {
+ window.markdown = {};
+ return window.markdown;
+ }
+ else {
+ return exports;
+ }
+} )() );
diff --git a/vendor/assets/javascripts/momentjs.js b/vendor/assets/javascripts/momentjs.js
new file mode 100644
index 000000000..41e96b95f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs.js
@@ -0,0 +1 @@
+//= require momentjs/moment.js
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/af.js b/vendor/assets/javascripts/momentjs/dist/locale/af.js
new file mode 100644
index 000000000..374d8536b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/af.js
@@ -0,0 +1,71 @@
+//! moment.js locale configuration
+//! locale : Afrikaans [af]
+//! author : Werner Mollentze : https://github.com/wernerm
+
+import moment from '../moment';
+
+export default moment.defineLocale('af', {
+ months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
+ weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
+ '_'
+ ),
+ weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
+ weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
+ meridiemParse: /vm|nm/i,
+ isPM: function (input) {
+ return /^nm$/i.test(input);
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'vm' : 'VM';
+ } else {
+ return isLower ? 'nm' : 'NM';
+ }
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Vandag om] LT',
+ nextDay: '[Môre om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[Gister om] LT',
+ lastWeek: '[Laas] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'oor %s',
+ past: '%s gelede',
+ s: "'n paar sekondes",
+ ss: '%d sekondes',
+ m: "'n minuut",
+ mm: '%d minute',
+ h: "'n uur",
+ hh: '%d ure',
+ d: "'n dag",
+ dd: '%d dae',
+ M: "'n maand",
+ MM: '%d maande',
+ y: "'n jaar",
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ ); // Thanks to Joris Röling : https://github.com/jjupiter
+ },
+ week: {
+ dow: 1, // Maandag is die eerste dag van die week.
+ doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ar-dz.js b/vendor/assets/javascripts/momentjs/dist/locale/ar-dz.js
new file mode 100644
index 000000000..12687a6c5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ar-dz.js
@@ -0,0 +1,156 @@
+//! moment.js locale configuration
+//! locale : Arabic (Algeria) [ar-dz]
+//! author : Amine Roukh: https://github.com/Amine27
+//! author : Abdel Said: https://github.com/abdelsaid
+//! author : Ahmed Elkhatib
+//! author : forabi https://github.com/forabi
+//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
+
+import moment from '../moment';
+
+var pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months = [
+ 'جانفي',
+ 'فيفري',
+ 'مارس',
+ 'أفريل',
+ 'ماي',
+ 'جوان',
+ 'جويلية',
+ 'أوت',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+export default moment.defineLocale('ar-dz', {
+ months: months,
+ monthsShort: months,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ar-kw.js b/vendor/assets/javascripts/momentjs/dist/locale/ar-kw.js
new file mode 100644
index 000000000..c2b0f8765
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ar-kw.js
@@ -0,0 +1,55 @@
+//! moment.js locale configuration
+//! locale : Arabic (Kuwait) [ar-kw]
+//! author : Nusret Parlak: https://github.com/nusretparlak
+
+import moment from '../moment';
+
+export default moment.defineLocale('ar-kw', {
+ months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ar-ly.js b/vendor/assets/javascripts/momentjs/dist/locale/ar-ly.js
new file mode 100644
index 000000000..a8d4056d1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ar-ly.js
@@ -0,0 +1,171 @@
+//! moment.js locale configuration
+//! locale : Arabic (Libya) [ar-ly]
+//! author : Ali Hmer: https://github.com/kikoanis
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '1',
+ 2: '2',
+ 3: '3',
+ 4: '4',
+ 5: '5',
+ 6: '6',
+ 7: '7',
+ 8: '8',
+ 9: '9',
+ 0: '0',
+ },
+ pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months = [
+ 'يناير',
+ 'فبراير',
+ 'مارس',
+ 'أبريل',
+ 'مايو',
+ 'يونيو',
+ 'يوليو',
+ 'أغسطس',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+export default moment.defineLocale('ar-ly', {
+ months: months,
+ monthsShort: months,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ar-ma.js b/vendor/assets/javascripts/momentjs/dist/locale/ar-ma.js
new file mode 100644
index 000000000..4010aa01d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ar-ma.js
@@ -0,0 +1,56 @@
+//! moment.js locale configuration
+//! locale : Arabic (Morocco) [ar-ma]
+//! author : ElFadili Yassine : https://github.com/ElFadiliY
+//! author : Abdel Said : https://github.com/abdelsaid
+
+import moment from '../moment';
+
+export default moment.defineLocale('ar-ma', {
+ months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ar-sa.js b/vendor/assets/javascripts/momentjs/dist/locale/ar-sa.js
new file mode 100644
index 000000000..4505ea1cf
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ar-sa.js
@@ -0,0 +1,105 @@
+//! moment.js locale configuration
+//! locale : Arabic (Saudi Arabia) [ar-sa]
+//! author : Suhail Alkowaileet : https://github.com/xsoh
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ };
+
+export default moment.defineLocale('ar-sa', {
+ months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ar-tn.js b/vendor/assets/javascripts/momentjs/dist/locale/ar-tn.js
new file mode 100644
index 000000000..0f416ae5c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ar-tn.js
@@ -0,0 +1,55 @@
+//! moment.js locale configuration
+//! locale : Arabic (Tunisia) [ar-tn]
+//! author : Nader Toukabri : https://github.com/naderio
+
+import moment from '../moment';
+
+export default moment.defineLocale('ar-tn', {
+ months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ar.js b/vendor/assets/javascripts/momentjs/dist/locale/ar.js
new file mode 100644
index 000000000..fb430b964
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ar.js
@@ -0,0 +1,189 @@
+//! moment.js locale configuration
+//! locale : Arabic [ar]
+//! author : Abdel Said: https://github.com/abdelsaid
+//! author : Ahmed Elkhatib
+//! author : forabi https://github.com/forabi
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ },
+ pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months = [
+ 'يناير',
+ 'فبراير',
+ 'مارس',
+ 'أبريل',
+ 'مايو',
+ 'يونيو',
+ 'يوليو',
+ 'أغسطس',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+export default moment.defineLocale('ar', {
+ months: months,
+ monthsShort: months,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/az.js b/vendor/assets/javascripts/momentjs/dist/locale/az.js
new file mode 100644
index 000000000..2e06aa17a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/az.js
@@ -0,0 +1,102 @@
+//! moment.js locale configuration
+//! locale : Azerbaijani [az]
+//! author : topchiyev : https://github.com/topchiyev
+
+import moment from '../moment';
+
+var suffixes = {
+ 1: '-inci',
+ 5: '-inci',
+ 8: '-inci',
+ 70: '-inci',
+ 80: '-inci',
+ 2: '-nci',
+ 7: '-nci',
+ 20: '-nci',
+ 50: '-nci',
+ 3: '-üncü',
+ 4: '-üncü',
+ 100: '-üncü',
+ 6: '-ncı',
+ 9: '-uncu',
+ 10: '-uncu',
+ 30: '-uncu',
+ 60: '-ıncı',
+ 90: '-ıncı',
+};
+
+export default moment.defineLocale('az', {
+ months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
+ weekdays:
+ 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
+ '_'
+ ),
+ weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
+ weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün saat] LT',
+ nextDay: '[sabah saat] LT',
+ nextWeek: '[gələn həftə] dddd [saat] LT',
+ lastDay: '[dünən] LT',
+ lastWeek: '[keçən həftə] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s sonra',
+ past: '%s əvvəl',
+ s: 'bir neçə saniyə',
+ ss: '%d saniyə',
+ m: 'bir dəqiqə',
+ mm: '%d dəqiqə',
+ h: 'bir saat',
+ hh: '%d saat',
+ d: 'bir gün',
+ dd: '%d gün',
+ M: 'bir ay',
+ MM: '%d ay',
+ y: 'bir il',
+ yy: '%d il',
+ },
+ meridiemParse: /gecə|səhər|gündüz|axşam/,
+ isPM: function (input) {
+ return /^(gündüz|axşam)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'gecə';
+ } else if (hour < 12) {
+ return 'səhər';
+ } else if (hour < 17) {
+ return 'gündüz';
+ } else {
+ return 'axşam';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
+ ordinal: function (number) {
+ if (number === 0) {
+ // special case for zero
+ return number + '-ıncı';
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/be.js b/vendor/assets/javascripts/momentjs/dist/locale/be.js
new file mode 100644
index 000000000..4b4d1cb27
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/be.js
@@ -0,0 +1,142 @@
+//! moment.js locale configuration
+//! locale : Belarusian [be]
+//! author : Dmitry Demidov : https://github.com/demidov91
+//! author: Praleska: http://praleska.pro/
+//! Author : Menelion Elensúle : https://github.com/Oire
+
+import moment from '../moment';
+
+function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+}
+function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
+ mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
+ hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
+ dd: 'дзень_дні_дзён',
+ MM: 'месяц_месяцы_месяцаў',
+ yy: 'год_гады_гадоў',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'хвіліна' : 'хвіліну';
+ } else if (key === 'h') {
+ return withoutSuffix ? 'гадзіна' : 'гадзіну';
+ } else {
+ return number + ' ' + plural(format[key], +number);
+ }
+}
+
+export default moment.defineLocale('be', {
+ months: {
+ format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
+ '_'
+ ),
+ standalone:
+ 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
+ weekdays: {
+ format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
+ '_'
+ ),
+ standalone:
+ 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
+ '_'
+ ),
+ isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
+ },
+ weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+ weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY г.',
+ LLL: 'D MMMM YYYY г., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY г., HH:mm',
+ },
+ calendar: {
+ sameDay: '[Сёння ў] LT',
+ nextDay: '[Заўтра ў] LT',
+ lastDay: '[Учора ў] LT',
+ nextWeek: function () {
+ return '[У] dddd [ў] LT';
+ },
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 5:
+ case 6:
+ return '[У мінулую] dddd [ў] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[У мінулы] dddd [ў] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'праз %s',
+ past: '%s таму',
+ s: 'некалькі секунд',
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: relativeTimeWithPlural,
+ hh: relativeTimeWithPlural,
+ d: 'дзень',
+ dd: relativeTimeWithPlural,
+ M: 'месяц',
+ MM: relativeTimeWithPlural,
+ y: 'год',
+ yy: relativeTimeWithPlural,
+ },
+ meridiemParse: /ночы|раніцы|дня|вечара/,
+ isPM: function (input) {
+ return /^(дня|вечара)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночы';
+ } else if (hour < 12) {
+ return 'раніцы';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечара';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ case 'w':
+ case 'W':
+ return (number % 10 === 2 || number % 10 === 3) &&
+ number % 100 !== 12 &&
+ number % 100 !== 13
+ ? number + '-і'
+ : number + '-ы';
+ case 'D':
+ return number + '-га';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/bg.js b/vendor/assets/javascripts/momentjs/dist/locale/bg.js
new file mode 100644
index 000000000..e8b060fab
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/bg.js
@@ -0,0 +1,87 @@
+//! moment.js locale configuration
+//! locale : Bulgarian [bg]
+//! author : Krasen Borisov : https://github.com/kraz
+
+import moment from '../moment';
+
+export default moment.defineLocale('bg', {
+ months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
+ '_'
+ ),
+ monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
+ '_'
+ ),
+ weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
+ weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Днес в] LT',
+ nextDay: '[Утре в] LT',
+ nextWeek: 'dddd [в] LT',
+ lastDay: '[Вчера в] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 6:
+ return '[Миналата] dddd [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[Миналия] dddd [в] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'след %s',
+ past: 'преди %s',
+ s: 'няколко секунди',
+ ss: '%d секунди',
+ m: 'минута',
+ mm: '%d минути',
+ h: 'час',
+ hh: '%d часа',
+ d: 'ден',
+ dd: '%d дена',
+ w: 'седмица',
+ ww: '%d седмици',
+ M: 'месец',
+ MM: '%d месеца',
+ y: 'година',
+ yy: '%d години',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+ ordinal: function (number) {
+ var lastDigit = number % 10,
+ last2Digits = number % 100;
+ if (number === 0) {
+ return number + '-ев';
+ } else if (last2Digits === 0) {
+ return number + '-ен';
+ } else if (last2Digits > 10 && last2Digits < 20) {
+ return number + '-ти';
+ } else if (lastDigit === 1) {
+ return number + '-ви';
+ } else if (lastDigit === 2) {
+ return number + '-ри';
+ } else if (lastDigit === 7 || lastDigit === 8) {
+ return number + '-ми';
+ } else {
+ return number + '-ти';
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/bm.js b/vendor/assets/javascripts/momentjs/dist/locale/bm.js
new file mode 100644
index 000000000..037d018ec
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/bm.js
@@ -0,0 +1,52 @@
+//! moment.js locale configuration
+//! locale : Bambara [bm]
+//! author : Estelle Comment : https://github.com/estellecomment
+// Language contact person : Abdoufata Kane : https://github.com/abdoufata
+
+import moment from '../moment';
+
+export default moment.defineLocale('bm', {
+ months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
+ '_'
+ ),
+ monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
+ weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
+ weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
+ weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'MMMM [tile] D [san] YYYY',
+ LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
+ LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
+ },
+ calendar: {
+ sameDay: '[Bi lɛrɛ] LT',
+ nextDay: '[Sini lɛrɛ] LT',
+ nextWeek: 'dddd [don lɛrɛ] LT',
+ lastDay: '[Kunu lɛrɛ] LT',
+ lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s kɔnɔ',
+ past: 'a bɛ %s bɔ',
+ s: 'sanga dama dama',
+ ss: 'sekondi %d',
+ m: 'miniti kelen',
+ mm: 'miniti %d',
+ h: 'lɛrɛ kelen',
+ hh: 'lɛrɛ %d',
+ d: 'tile kelen',
+ dd: 'tile %d',
+ M: 'kalo kelen',
+ MM: 'kalo %d',
+ y: 'san kelen',
+ yy: 'san %d',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/bn-bd.js b/vendor/assets/javascripts/momentjs/dist/locale/bn-bd.js
new file mode 100644
index 000000000..054f44fcc
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/bn-bd.js
@@ -0,0 +1,129 @@
+//! moment.js locale configuration
+//! locale : Bengali (Bangladesh) [bn-bd]
+//! author : Asraf Hossain Patoary : https://github.com/ashwoolford
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
+ },
+ numberMap = {
+ '১': '1',
+ '২': '2',
+ '৩': '3',
+ '৪': '4',
+ '৫': '5',
+ '৬': '6',
+ '৭': '7',
+ '৮': '8',
+ '৯': '9',
+ '০': '0',
+ };
+
+export default moment.defineLocale('bn-bd', {
+ months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
+ '_'
+ ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
+ weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
+ '_'
+ ),
+ weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+ weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm সময়',
+ LTS: 'A h:mm:ss সময়',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm সময়',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
+ },
+ calendar: {
+ sameDay: '[আজ] LT',
+ nextDay: '[আগামীকাল] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[গতকাল] LT',
+ lastWeek: '[গত] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s পরে',
+ past: '%s আগে',
+ s: 'কয়েক সেকেন্ড',
+ ss: '%d সেকেন্ড',
+ m: 'এক মিনিট',
+ mm: '%d মিনিট',
+ h: 'এক ঘন্টা',
+ hh: '%d ঘন্টা',
+ d: 'এক দিন',
+ dd: '%d দিন',
+ M: 'এক মাস',
+ MM: '%d মাস',
+ y: 'এক বছর',
+ yy: '%d বছর',
+ },
+ preparse: function (string) {
+ return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+
+ meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'রাত') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ভোর') {
+ return hour;
+ } else if (meridiem === 'সকাল') {
+ return hour;
+ } else if (meridiem === 'দুপুর') {
+ return hour >= 3 ? hour : hour + 12;
+ } else if (meridiem === 'বিকাল') {
+ return hour + 12;
+ } else if (meridiem === 'সন্ধ্যা') {
+ return hour + 12;
+ }
+ },
+
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'রাত';
+ } else if (hour < 6) {
+ return 'ভোর';
+ } else if (hour < 12) {
+ return 'সকাল';
+ } else if (hour < 15) {
+ return 'দুপুর';
+ } else if (hour < 18) {
+ return 'বিকাল';
+ } else if (hour < 20) {
+ return 'সন্ধ্যা';
+ } else {
+ return 'রাত';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/bn.js b/vendor/assets/javascripts/momentjs/dist/locale/bn.js
new file mode 100644
index 000000000..14ba050f2
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/bn.js
@@ -0,0 +1,119 @@
+//! moment.js locale configuration
+//! locale : Bengali [bn]
+//! author : Kaushik Gandhi : https://github.com/kaushikgandhi
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
+ },
+ numberMap = {
+ '১': '1',
+ '২': '2',
+ '৩': '3',
+ '৪': '4',
+ '৫': '5',
+ '৬': '6',
+ '৭': '7',
+ '৮': '8',
+ '৯': '9',
+ '০': '0',
+ };
+
+export default moment.defineLocale('bn', {
+ months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
+ '_'
+ ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
+ weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
+ '_'
+ ),
+ weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+ weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm সময়',
+ LTS: 'A h:mm:ss সময়',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm সময়',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
+ },
+ calendar: {
+ sameDay: '[আজ] LT',
+ nextDay: '[আগামীকাল] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[গতকাল] LT',
+ lastWeek: '[গত] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s পরে',
+ past: '%s আগে',
+ s: 'কয়েক সেকেন্ড',
+ ss: '%d সেকেন্ড',
+ m: 'এক মিনিট',
+ mm: '%d মিনিট',
+ h: 'এক ঘন্টা',
+ hh: '%d ঘন্টা',
+ d: 'এক দিন',
+ dd: '%d দিন',
+ M: 'এক মাস',
+ MM: '%d মাস',
+ y: 'এক বছর',
+ yy: '%d বছর',
+ },
+ preparse: function (string) {
+ return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'রাত' && hour >= 4) ||
+ (meridiem === 'দুপুর' && hour < 5) ||
+ meridiem === 'বিকাল'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'রাত';
+ } else if (hour < 10) {
+ return 'সকাল';
+ } else if (hour < 17) {
+ return 'দুপুর';
+ } else if (hour < 20) {
+ return 'বিকাল';
+ } else {
+ return 'রাত';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/bo.js b/vendor/assets/javascripts/momentjs/dist/locale/bo.js
new file mode 100644
index 000000000..4fbca2e33
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/bo.js
@@ -0,0 +1,124 @@
+//! moment.js locale configuration
+//! locale : Tibetan [bo]
+//! author : Thupten N. Chakrishar : https://github.com/vajradog
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '༡',
+ 2: '༢',
+ 3: '༣',
+ 4: '༤',
+ 5: '༥',
+ 6: '༦',
+ 7: '༧',
+ 8: '༨',
+ 9: '༩',
+ 0: '༠',
+ },
+ numberMap = {
+ '༡': '1',
+ '༢': '2',
+ '༣': '3',
+ '༤': '4',
+ '༥': '5',
+ '༦': '6',
+ '༧': '7',
+ '༨': '8',
+ '༩': '9',
+ '༠': '0',
+ };
+
+export default moment.defineLocale('bo', {
+ months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
+ '_'
+ ),
+ monthsShortRegex: /^(ཟླ་\d{1,2})/,
+ monthsParseExact: true,
+ weekdays:
+ 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
+ '_'
+ ),
+ weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
+ '_'
+ ),
+ weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[དི་རིང] LT',
+ nextDay: '[སང་ཉིན] LT',
+ nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
+ lastDay: '[ཁ་སང] LT',
+ lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ལ་',
+ past: '%s སྔན་ལ',
+ s: 'ལམ་སང',
+ ss: '%d སྐར་ཆ།',
+ m: 'སྐར་མ་གཅིག',
+ mm: '%d སྐར་མ',
+ h: 'ཆུ་ཚོད་གཅིག',
+ hh: '%d ཆུ་ཚོད',
+ d: 'ཉིན་གཅིག',
+ dd: '%d ཉིན་',
+ M: 'ཟླ་བ་གཅིག',
+ MM: '%d ཟླ་བ',
+ y: 'ལོ་གཅིག',
+ yy: '%d ལོ',
+ },
+ preparse: function (string) {
+ return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'མཚན་མོ' && hour >= 4) ||
+ (meridiem === 'ཉིན་གུང' && hour < 5) ||
+ meridiem === 'དགོང་དག'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'མཚན་མོ';
+ } else if (hour < 10) {
+ return 'ཞོགས་ཀས';
+ } else if (hour < 17) {
+ return 'ཉིན་གུང';
+ } else if (hour < 20) {
+ return 'དགོང་དག';
+ } else {
+ return 'མཚན་མོ';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/br.js b/vendor/assets/javascripts/momentjs/dist/locale/br.js
new file mode 100644
index 000000000..a7dda4902
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/br.js
@@ -0,0 +1,168 @@
+//! moment.js locale configuration
+//! locale : Breton [br]
+//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
+
+import moment from '../moment';
+
+function relativeTimeWithMutation(number, withoutSuffix, key) {
+ var format = {
+ mm: 'munutenn',
+ MM: 'miz',
+ dd: 'devezh',
+ };
+ return number + ' ' + mutation(format[key], number);
+}
+function specialMutationForYears(number) {
+ switch (lastNumber(number)) {
+ case 1:
+ case 3:
+ case 4:
+ case 5:
+ case 9:
+ return number + ' bloaz';
+ default:
+ return number + ' vloaz';
+ }
+}
+function lastNumber(number) {
+ if (number > 9) {
+ return lastNumber(number % 10);
+ }
+ return number;
+}
+function mutation(text, number) {
+ if (number === 2) {
+ return softMutation(text);
+ }
+ return text;
+}
+function softMutation(text) {
+ var mutationTable = {
+ m: 'v',
+ b: 'v',
+ d: 'z',
+ };
+ if (mutationTable[text.charAt(0)] === undefined) {
+ return text;
+ }
+ return mutationTable[text.charAt(0)] + text.substring(1);
+}
+
+var monthsParse = [
+ /^gen/i,
+ /^c[ʼ\']hwe/i,
+ /^meu/i,
+ /^ebr/i,
+ /^mae/i,
+ /^(mez|eve)/i,
+ /^gou/i,
+ /^eos/i,
+ /^gwe/i,
+ /^her/i,
+ /^du/i,
+ /^ker/i,
+ ],
+ monthsRegex =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ monthsStrictRegex =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
+ monthsShortStrictRegex =
+ /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ fullWeekdaysParse = [
+ /^sul/i,
+ /^lun/i,
+ /^meurzh/i,
+ /^merc[ʼ\']her/i,
+ /^yaou/i,
+ /^gwener/i,
+ /^sadorn/i,
+ ],
+ shortWeekdaysParse = [
+ /^Sul/i,
+ /^Lun/i,
+ /^Meu/i,
+ /^Mer/i,
+ /^Yao/i,
+ /^Gwe/i,
+ /^Sad/i,
+ ],
+ minWeekdaysParse = [
+ /^Su/i,
+ /^Lu/i,
+ /^Me([^r]|$)/i,
+ /^Mer/i,
+ /^Ya/i,
+ /^Gw/i,
+ /^Sa/i,
+ ];
+
+export default moment.defineLocale('br', {
+ months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
+ '_'
+ ),
+ monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
+ weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
+ weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
+ weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
+ weekdaysParse: minWeekdaysParse,
+ fullWeekdaysParse: fullWeekdaysParse,
+ shortWeekdaysParse: shortWeekdaysParse,
+ minWeekdaysParse: minWeekdaysParse,
+
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex: monthsStrictRegex,
+ monthsShortStrictRegex: monthsShortStrictRegex,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [a viz] MMMM YYYY',
+ LLL: 'D [a viz] MMMM YYYY HH:mm',
+ LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hiziv da] LT',
+ nextDay: '[Warcʼhoazh da] LT',
+ nextWeek: 'dddd [da] LT',
+ lastDay: '[Decʼh da] LT',
+ lastWeek: 'dddd [paset da] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'a-benn %s',
+ past: '%s ʼzo',
+ s: 'un nebeud segondennoù',
+ ss: '%d eilenn',
+ m: 'ur vunutenn',
+ mm: relativeTimeWithMutation,
+ h: 'un eur',
+ hh: '%d eur',
+ d: 'un devezh',
+ dd: relativeTimeWithMutation,
+ M: 'ur miz',
+ MM: relativeTimeWithMutation,
+ y: 'ur bloaz',
+ yy: specialMutationForYears,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'añ' : 'vet';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
+ isPM: function (token) {
+ return token === 'g.m.';
+ },
+ meridiem: function (hour, minute, isLower) {
+ return hour < 12 ? 'a.m.' : 'g.m.';
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/bs.js b/vendor/assets/javascripts/momentjs/dist/locale/bs.js
new file mode 100644
index 000000000..3d62945b8
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/bs.js
@@ -0,0 +1,150 @@
+//! moment.js locale configuration
+//! locale : Bosnian [bs]
+//! author : Nedim Cholich : https://github.com/frontyard
+//! based on (hr) translation by Bojan Marković
+
+import moment from '../moment';
+
+function translate(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ if (number === 1) {
+ result += 'sekunda';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sekunde';
+ } else {
+ result += 'sekundi';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
+ }
+}
+
+export default moment.defineLocale('bs', {
+ months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[jučer u] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ return '[prošlu] dddd [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'par sekundi',
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: 'dan',
+ dd: translate,
+ M: 'mjesec',
+ MM: translate,
+ y: 'godinu',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ca.js b/vendor/assets/javascripts/momentjs/dist/locale/ca.js
new file mode 100644
index 000000000..0fe9da472
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ca.js
@@ -0,0 +1,100 @@
+//! moment.js locale configuration
+//! locale : Catalan [ca]
+//! author : Juan G. Hurtado : https://github.com/juanghurtado
+
+import moment from '../moment';
+
+export default moment.defineLocale('ca', {
+ months: {
+ standalone:
+ 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
+ '_'
+ ),
+ format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\s)+MMMM/,
+ },
+ monthsShort:
+ 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
+ '_'
+ ),
+ weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
+ weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [de] YYYY',
+ ll: 'D MMM YYYY',
+ LLL: 'D MMMM [de] YYYY [a les] H:mm',
+ lll: 'D MMM YYYY, H:mm',
+ LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
+ llll: 'ddd D MMM YYYY, H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ nextDay: function () {
+ return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ lastDay: function () {
+ return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [passat a ' +
+ (this.hours() !== 1 ? 'les' : 'la') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: "d'aquí %s",
+ past: 'fa %s',
+ s: 'uns segons',
+ ss: '%d segons',
+ m: 'un minut',
+ mm: '%d minuts',
+ h: 'una hora',
+ hh: '%d hores',
+ d: 'un dia',
+ dd: '%d dies',
+ M: 'un mes',
+ MM: '%d mesos',
+ y: 'un any',
+ yy: '%d anys',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
+ ordinal: function (number, period) {
+ var output =
+ number === 1
+ ? 'r'
+ : number === 2
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
+ if (period === 'w' || period === 'W') {
+ output = 'a';
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/cs.js b/vendor/assets/javascripts/momentjs/dist/locale/cs.js
new file mode 100644
index 000000000..7a98abacc
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/cs.js
@@ -0,0 +1,180 @@
+//! moment.js locale configuration
+//! locale : Czech [cs]
+//! author : petrbela : https://github.com/petrbela
+
+import moment from '../moment';
+
+var months = {
+ format: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
+ '_'
+ ),
+ standalone:
+ 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(
+ '_'
+ ),
+ },
+ monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
+ monthsParse = [
+ /^led/i,
+ /^úno/i,
+ /^bře/i,
+ /^dub/i,
+ /^kvě/i,
+ /^(čvn|červen$|června)/i,
+ /^(čvc|červenec|července)/i,
+ /^srp/i,
+ /^zář/i,
+ /^říj/i,
+ /^lis/i,
+ /^pro/i,
+ ],
+ // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
+ // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
+ monthsRegex =
+ /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
+
+function plural(n) {
+ return n > 1 && n < 5 && ~~(n / 10) !== 1;
+}
+function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
+ case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'sekundy' : 'sekund');
+ } else {
+ return result + 'sekundami';
+ }
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'minuty' : 'minut');
+ } else {
+ return result + 'minutami';
+ }
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'hodiny' : 'hodin');
+ } else {
+ return result + 'hodinami';
+ }
+ case 'd': // a day / in a day / a day ago
+ return withoutSuffix || isFuture ? 'den' : 'dnem';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'dny' : 'dní');
+ } else {
+ return result + 'dny';
+ }
+ case 'M': // a month / in a month / a month ago
+ return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'měsíce' : 'měsíců');
+ } else {
+ return result + 'měsíci';
+ }
+ case 'y': // a year / in a year / a year ago
+ return withoutSuffix || isFuture ? 'rok' : 'rokem';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'roky' : 'let');
+ } else {
+ return result + 'lety';
+ }
+ }
+}
+
+export default moment.defineLocale('cs', {
+ months: months,
+ monthsShort: monthsShort,
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
+ // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
+ monthsStrictRegex:
+ /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
+ monthsShortStrictRegex:
+ /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
+ weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
+ weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd D. MMMM YYYY H:mm',
+ l: 'D. M. YYYY',
+ },
+ calendar: {
+ sameDay: '[dnes v] LT',
+ nextDay: '[zítra v] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v neděli v] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [v] LT';
+ case 3:
+ return '[ve středu v] LT';
+ case 4:
+ return '[ve čtvrtek v] LT';
+ case 5:
+ return '[v pátek v] LT';
+ case 6:
+ return '[v sobotu v] LT';
+ }
+ },
+ lastDay: '[včera v] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[minulou neděli v] LT';
+ case 1:
+ case 2:
+ return '[minulé] dddd [v] LT';
+ case 3:
+ return '[minulou středu v] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [v] LT';
+ case 6:
+ return '[minulou sobotu v] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'před %s',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/cv.js b/vendor/assets/javascripts/momentjs/dist/locale/cv.js
new file mode 100644
index 000000000..f349157db
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/cv.js
@@ -0,0 +1,63 @@
+//! moment.js locale configuration
+//! locale : Chuvash [cv]
+//! author : Anatoly Mironov : https://github.com/mirontoli
+
+import moment from '../moment';
+
+export default moment.defineLocale('cv', {
+ months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
+ '_'
+ ),
+ monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
+ weekdays:
+ 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
+ '_'
+ ),
+ weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
+ weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
+ LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+ LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+ },
+ calendar: {
+ sameDay: '[Паян] LT [сехетре]',
+ nextDay: '[Ыран] LT [сехетре]',
+ lastDay: '[Ӗнер] LT [сехетре]',
+ nextWeek: '[Ҫитес] dddd LT [сехетре]',
+ lastWeek: '[Иртнӗ] dddd LT [сехетре]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (output) {
+ var affix = /сехет$/i.exec(output)
+ ? 'рен'
+ : /ҫул$/i.exec(output)
+ ? 'тан'
+ : 'ран';
+ return output + affix;
+ },
+ past: '%s каялла',
+ s: 'пӗр-ик ҫеккунт',
+ ss: '%d ҫеккунт',
+ m: 'пӗр минут',
+ mm: '%d минут',
+ h: 'пӗр сехет',
+ hh: '%d сехет',
+ d: 'пӗр кун',
+ dd: '%d кун',
+ M: 'пӗр уйӑх',
+ MM: '%d уйӑх',
+ y: 'пӗр ҫул',
+ yy: '%d ҫул',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
+ ordinal: '%d-мӗш',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/cy.js b/vendor/assets/javascripts/momentjs/dist/locale/cy.js
new file mode 100644
index 000000000..e12344a1d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/cy.js
@@ -0,0 +1,98 @@
+//! moment.js locale configuration
+//! locale : Welsh [cy]
+//! author : Robert Allen : https://github.com/robgallen
+//! author : https://github.com/ryangreaves
+
+import moment from '../moment';
+
+export default moment.defineLocale('cy', {
+ months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
+ '_'
+ ),
+ monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
+ '_'
+ ),
+ weekdays:
+ 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
+ weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
+ weekdaysParseExact: true,
+ // time formats are the same as en-gb
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Heddiw am] LT',
+ nextDay: '[Yfory am] LT',
+ nextWeek: 'dddd [am] LT',
+ lastDay: '[Ddoe am] LT',
+ lastWeek: 'dddd [diwethaf am] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'mewn %s',
+ past: '%s yn ôl',
+ s: 'ychydig eiliadau',
+ ss: '%d eiliad',
+ m: 'munud',
+ mm: '%d munud',
+ h: 'awr',
+ hh: '%d awr',
+ d: 'diwrnod',
+ dd: '%d diwrnod',
+ M: 'mis',
+ MM: '%d mis',
+ y: 'blwyddyn',
+ yy: '%d flynedd',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
+ // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
+ ordinal: function (number) {
+ var b = number,
+ output = '',
+ lookup = [
+ '',
+ 'af',
+ 'il',
+ 'ydd',
+ 'ydd',
+ 'ed',
+ 'ed',
+ 'ed',
+ 'fed',
+ 'fed',
+ 'fed', // 1af to 10fed
+ 'eg',
+ 'fed',
+ 'eg',
+ 'eg',
+ 'fed',
+ 'eg',
+ 'eg',
+ 'fed',
+ 'eg',
+ 'fed', // 11eg to 20fed
+ ];
+ if (b > 20) {
+ if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
+ output = 'fed'; // not 30ain, 70ain or 90ain
+ } else {
+ output = 'ain';
+ }
+ } else if (b > 0) {
+ output = lookup[b];
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/da.js b/vendor/assets/javascripts/momentjs/dist/locale/da.js
new file mode 100644
index 000000000..d1fc181dd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/da.js
@@ -0,0 +1,53 @@
+//! moment.js locale configuration
+//! locale : Danish [da]
+//! author : Ulrik Nielsen : https://github.com/mrbase
+
+import moment from '../moment';
+
+export default moment.defineLocale('da', {
+ months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
+ weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i dag kl.] LT',
+ nextDay: '[i morgen kl.] LT',
+ nextWeek: 'på dddd [kl.] LT',
+ lastDay: '[i går kl.] LT',
+ lastWeek: '[i] dddd[s kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s siden',
+ s: 'få sekunder',
+ ss: '%d sekunder',
+ m: 'et minut',
+ mm: '%d minutter',
+ h: 'en time',
+ hh: '%d timer',
+ d: 'en dag',
+ dd: '%d dage',
+ M: 'en måned',
+ MM: '%d måneder',
+ y: 'et år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/de-at.js b/vendor/assets/javascripts/momentjs/dist/locale/de-at.js
new file mode 100644
index 000000000..8318fec1e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/de-at.js
@@ -0,0 +1,79 @@
+//! moment.js locale configuration
+//! locale : German (Austria) [de-at]
+//! author : lluchs : https://github.com/lluchs
+//! author: Menelion Elensúle: https://github.com/Oire
+//! author : Martin Groller : https://github.com/MadMG
+//! author : Mikolaj Dadela : https://github.com/mik01aj
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('de-at', {
+ months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime,
+ mm: '%d Minuten',
+ h: processRelativeTime,
+ hh: '%d Stunden',
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/de-ch.js b/vendor/assets/javascripts/momentjs/dist/locale/de-ch.js
new file mode 100644
index 000000000..4e675073c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/de-ch.js
@@ -0,0 +1,78 @@
+//! moment.js locale configuration
+//! locale : German (Switzerland) [de-ch]
+//! author : sschueller : https://github.com/sschueller
+
+// based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de#
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('de-ch', {
+ months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime,
+ mm: '%d Minuten',
+ h: processRelativeTime,
+ hh: '%d Stunden',
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/de.js b/vendor/assets/javascripts/momentjs/dist/locale/de.js
new file mode 100644
index 000000000..cb9c8d5ca
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/de.js
@@ -0,0 +1,78 @@
+//! moment.js locale configuration
+//! locale : German [de]
+//! author : lluchs : https://github.com/lluchs
+//! author: Menelion Elensúle: https://github.com/Oire
+//! author : Mikolaj Dadela : https://github.com/mik01aj
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('de', {
+ months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime,
+ mm: '%d Minuten',
+ h: processRelativeTime,
+ hh: '%d Stunden',
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/dv.js b/vendor/assets/javascripts/momentjs/dist/locale/dv.js
new file mode 100644
index 000000000..26520d410
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/dv.js
@@ -0,0 +1,90 @@
+//! moment.js locale configuration
+//! locale : Maldivian [dv]
+//! author : Jawish Hameed : https://github.com/jawish
+
+import moment from '../moment';
+
+var months = [
+ 'ޖެނުއަރީ',
+ 'ފެބްރުއަރީ',
+ 'މާރިޗު',
+ 'އޭޕްރީލު',
+ 'މޭ',
+ 'ޖޫން',
+ 'ޖުލައި',
+ 'އޯގަސްޓު',
+ 'ސެޕްޓެމްބަރު',
+ 'އޮކްޓޯބަރު',
+ 'ނޮވެމްބަރު',
+ 'ޑިސެމްބަރު',
+ ],
+ weekdays = [
+ 'އާދިއްތަ',
+ 'ހޯމަ',
+ 'އަންގާރަ',
+ 'ބުދަ',
+ 'ބުރާސްފަތި',
+ 'ހުކުރު',
+ 'ހޮނިހިރު',
+ ];
+
+export default moment.defineLocale('dv', {
+ months: months,
+ monthsShort: months,
+ weekdays: weekdays,
+ weekdaysShort: weekdays,
+ weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/M/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /މކ|މފ/,
+ isPM: function (input) {
+ return 'މފ' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'މކ';
+ } else {
+ return 'މފ';
+ }
+ },
+ calendar: {
+ sameDay: '[މިއަދު] LT',
+ nextDay: '[މާދަމާ] LT',
+ nextWeek: 'dddd LT',
+ lastDay: '[އިއްޔެ] LT',
+ lastWeek: '[ފާއިތުވި] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ތެރޭގައި %s',
+ past: 'ކުރިން %s',
+ s: 'ސިކުންތުކޮޅެއް',
+ ss: 'd% ސިކުންތު',
+ m: 'މިނިޓެއް',
+ mm: 'މިނިޓު %d',
+ h: 'ގަޑިއިރެއް',
+ hh: 'ގަޑިއިރު %d',
+ d: 'ދުވަހެއް',
+ dd: 'ދުވަސް %d',
+ M: 'މަހެއް',
+ MM: 'މަސް %d',
+ y: 'އަހަރެއް',
+ yy: 'އަހަރު %d',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 7, // Sunday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/el.js b/vendor/assets/javascripts/momentjs/dist/locale/el.js
new file mode 100644
index 000000000..8a596f10e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/el.js
@@ -0,0 +1,106 @@
+//! moment.js locale configuration
+//! locale : Greek [el]
+//! author : Aggelos Karalias : https://github.com/mehiel
+
+import moment from '../moment';
+
+function isFunction(input) {
+ return (
+ (typeof Function !== 'undefined' && input instanceof Function) ||
+ Object.prototype.toString.call(input) === '[object Function]'
+ );
+}
+
+export default moment.defineLocale('el', {
+ monthsNominativeEl:
+ 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
+ '_'
+ ),
+ monthsGenitiveEl:
+ 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
+ '_'
+ ),
+ months: function (momentToFormat, format) {
+ if (!momentToFormat) {
+ return this._monthsNominativeEl;
+ } else if (
+ typeof format === 'string' &&
+ /D/.test(format.substring(0, format.indexOf('MMMM')))
+ ) {
+ // if there is a day number before 'MMMM'
+ return this._monthsGenitiveEl[momentToFormat.month()];
+ } else {
+ return this._monthsNominativeEl[momentToFormat.month()];
+ }
+ },
+ monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
+ weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
+ '_'
+ ),
+ weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
+ weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'μμ' : 'ΜΜ';
+ } else {
+ return isLower ? 'πμ' : 'ΠΜ';
+ }
+ },
+ isPM: function (input) {
+ return (input + '').toLowerCase()[0] === 'μ';
+ },
+ meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendarEl: {
+ sameDay: '[Σήμερα {}] LT',
+ nextDay: '[Αύριο {}] LT',
+ nextWeek: 'dddd [{}] LT',
+ lastDay: '[Χθες {}] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 6:
+ return '[το προηγούμενο] dddd [{}] LT';
+ default:
+ return '[την προηγούμενη] dddd [{}] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ calendar: function (key, mom) {
+ var output = this._calendarEl[key],
+ hours = mom && mom.hours();
+ if (isFunction(output)) {
+ output = output.apply(mom);
+ }
+ return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
+ },
+ relativeTime: {
+ future: 'σε %s',
+ past: '%s πριν',
+ s: 'λίγα δευτερόλεπτα',
+ ss: '%d δευτερόλεπτα',
+ m: 'ένα λεπτό',
+ mm: '%d λεπτά',
+ h: 'μία ώρα',
+ hh: '%d ώρες',
+ d: 'μία μέρα',
+ dd: '%d μέρες',
+ M: 'ένας μήνας',
+ MM: '%d μήνες',
+ y: 'ένας χρόνος',
+ yy: '%d χρόνια',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}η/,
+ ordinal: '%dη',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4st is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/en-au.js b/vendor/assets/javascripts/momentjs/dist/locale/en-au.js
new file mode 100644
index 000000000..8ee6197f2
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/en-au.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (Australia) [en-au]
+//! author : Jared Morse : https://github.com/jarcoal
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-au', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/en-ca.js b/vendor/assets/javascripts/momentjs/dist/locale/en-ca.js
new file mode 100644
index 000000000..bc4e9a532
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/en-ca.js
@@ -0,0 +1,64 @@
+//! moment.js locale configuration
+//! locale : English (Canada) [en-ca]
+//! author : Jonathan Abourbih : https://github.com/jonbca
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-ca', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'YYYY-MM-DD',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY h:mm A',
+ LLLL: 'dddd, MMMM D, YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/en-gb.js b/vendor/assets/javascripts/momentjs/dist/locale/en-gb.js
new file mode 100644
index 000000000..9391cc943
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/en-gb.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (United Kingdom) [en-gb]
+//! author : Chris Gedrim : https://github.com/chrisgedrim
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-gb', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/en-ie.js b/vendor/assets/javascripts/momentjs/dist/locale/en-ie.js
new file mode 100644
index 000000000..8200e55fd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/en-ie.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (Ireland) [en-ie]
+//! author : Chris Cartlidge : https://github.com/chriscartlidge
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-ie', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/en-il.js b/vendor/assets/javascripts/momentjs/dist/locale/en-il.js
new file mode 100644
index 000000000..ba16f103c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/en-il.js
@@ -0,0 +1,64 @@
+//! moment.js locale configuration
+//! locale : English (Israel) [en-il]
+//! author : Chris Gedrim : https://github.com/chrisgedrim
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-il', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/en-in.js b/vendor/assets/javascripts/momentjs/dist/locale/en-in.js
new file mode 100644
index 000000000..7d940d2f0
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/en-in.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (India) [en-in]
+//! author : Jatin Agrawal : https://github.com/jatinag22
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-in', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 1st is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/en-nz.js b/vendor/assets/javascripts/momentjs/dist/locale/en-nz.js
new file mode 100644
index 000000000..dff324cc2
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/en-nz.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (New Zealand) [en-nz]
+//! author : Luke McGregor : https://github.com/lukemcgregor
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-nz', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/en-sg.js b/vendor/assets/javascripts/momentjs/dist/locale/en-sg.js
new file mode 100644
index 000000000..433531e01
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/en-sg.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (Singapore) [en-sg]
+//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-sg', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/eo.js b/vendor/assets/javascripts/momentjs/dist/locale/eo.js
new file mode 100644
index 000000000..38d494aca
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/eo.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : Esperanto [eo]
+//! author : Colin Dean : https://github.com/colindean
+//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
+//! comment : miestasmia corrected the translation by colindean
+//! comment : Vivakvo corrected the translation by colindean and miestasmia
+
+import moment from '../moment';
+
+export default moment.defineLocale('eo', {
+ months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
+ weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
+ weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: '[la] D[-an de] MMMM, YYYY',
+ LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
+ LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
+ llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',
+ },
+ meridiemParse: /[ap]\.t\.m/i,
+ isPM: function (input) {
+ return input.charAt(0).toLowerCase() === 'p';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'p.t.m.' : 'P.T.M.';
+ } else {
+ return isLower ? 'a.t.m.' : 'A.T.M.';
+ }
+ },
+ calendar: {
+ sameDay: '[Hodiaŭ je] LT',
+ nextDay: '[Morgaŭ je] LT',
+ nextWeek: 'dddd[n je] LT',
+ lastDay: '[Hieraŭ je] LT',
+ lastWeek: '[pasintan] dddd[n je] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'post %s',
+ past: 'antaŭ %s',
+ s: 'kelkaj sekundoj',
+ ss: '%d sekundoj',
+ m: 'unu minuto',
+ mm: '%d minutoj',
+ h: 'unu horo',
+ hh: '%d horoj',
+ d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
+ dd: '%d tagoj',
+ M: 'unu monato',
+ MM: '%d monatoj',
+ y: 'unu jaro',
+ yy: '%d jaroj',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}a/,
+ ordinal: '%da',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/es-do.js b/vendor/assets/javascripts/momentjs/dist/locale/es-do.js
new file mode 100644
index 000000000..8c3ccfd2d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/es-do.js
@@ -0,0 +1,108 @@
+//! moment.js locale configuration
+//! locale : Spanish (Dominican Republic) [es-do]
+
+import moment from '../moment';
+
+var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+export default moment.defineLocale('es-do', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY h:mm A',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/es-mx.js b/vendor/assets/javascripts/momentjs/dist/locale/es-mx.js
new file mode 100644
index 000000000..43dd7ccfb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/es-mx.js
@@ -0,0 +1,110 @@
+//! moment.js locale configuration
+//! locale : Spanish (Mexico) [es-mx]
+//! author : JC Franco : https://github.com/jcfranco
+
+import moment from '../moment';
+
+var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+export default moment.defineLocale('es-mx', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ invalidDate: 'Fecha inválida',
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/es-us.js b/vendor/assets/javascripts/momentjs/dist/locale/es-us.js
new file mode 100644
index 000000000..bac8cd897
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/es-us.js
@@ -0,0 +1,110 @@
+//! moment.js locale configuration
+//! locale : Spanish (United States) [es-us]
+//! author : bustta : https://github.com/bustta
+//! author : chrisrodz : https://github.com/chrisrodz
+
+import moment from '../moment';
+
+var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+export default moment.defineLocale('es-us', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'MM/DD/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY h:mm A',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/es.js b/vendor/assets/javascripts/momentjs/dist/locale/es.js
new file mode 100644
index 000000000..a3428ad54
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/es.js
@@ -0,0 +1,110 @@
+//! moment.js locale configuration
+//! locale : Spanish [es]
+//! author : Julio Napurí : https://github.com/julionc
+
+import moment from '../moment';
+
+var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+export default moment.defineLocale('es', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ invalidDate: 'Fecha inválida',
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/et.js b/vendor/assets/javascripts/momentjs/dist/locale/et.js
new file mode 100644
index 000000000..5da4ec460
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/et.js
@@ -0,0 +1,78 @@
+//! moment.js locale configuration
+//! locale : Estonian [et]
+//! author : Henry Kehlmann : https://github.com/madhenry
+//! improvements : Illimar Tambek : https://github.com/ragulka
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
+ ss: [number + 'sekundi', number + 'sekundit'],
+ m: ['ühe minuti', 'üks minut'],
+ mm: [number + ' minuti', number + ' minutit'],
+ h: ['ühe tunni', 'tund aega', 'üks tund'],
+ hh: [number + ' tunni', number + ' tundi'],
+ d: ['ühe päeva', 'üks päev'],
+ M: ['kuu aja', 'kuu aega', 'üks kuu'],
+ MM: [number + ' kuu', number + ' kuud'],
+ y: ['ühe aasta', 'aasta', 'üks aasta'],
+ yy: [number + ' aasta', number + ' aastat'],
+ };
+ if (withoutSuffix) {
+ return format[key][2] ? format[key][2] : format[key][1];
+ }
+ return isFuture ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('et', {
+ months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
+ weekdays:
+ 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
+ '_'
+ ),
+ weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
+ weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Täna,] LT',
+ nextDay: '[Homme,] LT',
+ nextWeek: '[Järgmine] dddd LT',
+ lastDay: '[Eile,] LT',
+ lastWeek: '[Eelmine] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s pärast',
+ past: '%s tagasi',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: '%d päeva',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/eu.js b/vendor/assets/javascripts/momentjs/dist/locale/eu.js
new file mode 100644
index 000000000..261a17b29
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/eu.js
@@ -0,0 +1,65 @@
+//! moment.js locale configuration
+//! locale : Basque [eu]
+//! author : Eneko Illarramendi : https://github.com/eillarra
+
+import moment from '../moment';
+
+export default moment.defineLocale('eu', {
+ months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
+ '_'
+ ),
+ monthsShort:
+ 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
+ '_'
+ ),
+ weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
+ weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY[ko] MMMM[ren] D[a]',
+ LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
+ LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
+ l: 'YYYY-M-D',
+ ll: 'YYYY[ko] MMM D[a]',
+ lll: 'YYYY[ko] MMM D[a] HH:mm',
+ llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',
+ },
+ calendar: {
+ sameDay: '[gaur] LT[etan]',
+ nextDay: '[bihar] LT[etan]',
+ nextWeek: 'dddd LT[etan]',
+ lastDay: '[atzo] LT[etan]',
+ lastWeek: '[aurreko] dddd LT[etan]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s barru',
+ past: 'duela %s',
+ s: 'segundo batzuk',
+ ss: '%d segundo',
+ m: 'minutu bat',
+ mm: '%d minutu',
+ h: 'ordu bat',
+ hh: '%d ordu',
+ d: 'egun bat',
+ dd: '%d egun',
+ M: 'hilabete bat',
+ MM: '%d hilabete',
+ y: 'urte bat',
+ yy: '%d urte',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/fa.js b/vendor/assets/javascripts/momentjs/dist/locale/fa.js
new file mode 100644
index 000000000..52ffb72d4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/fa.js
@@ -0,0 +1,113 @@
+//! moment.js locale configuration
+//! locale : Persian [fa]
+//! author : Ebrahim Byagowi : https://github.com/ebraminio
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '۱',
+ 2: '۲',
+ 3: '۳',
+ 4: '۴',
+ 5: '۵',
+ 6: '۶',
+ 7: '۷',
+ 8: '۸',
+ 9: '۹',
+ 0: '۰',
+ },
+ numberMap = {
+ '۱': '1',
+ '۲': '2',
+ '۳': '3',
+ '۴': '4',
+ '۵': '5',
+ '۶': '6',
+ '۷': '7',
+ '۸': '8',
+ '۹': '9',
+ '۰': '0',
+ };
+
+export default moment.defineLocale('fa', {
+ months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
+ '_'
+ ),
+ weekdays:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
+ weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /قبل از ظهر|بعد از ظهر/,
+ isPM: function (input) {
+ return /بعد از ظهر/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'قبل از ظهر';
+ } else {
+ return 'بعد از ظهر';
+ }
+ },
+ calendar: {
+ sameDay: '[امروز ساعت] LT',
+ nextDay: '[فردا ساعت] LT',
+ nextWeek: 'dddd [ساعت] LT',
+ lastDay: '[دیروز ساعت] LT',
+ lastWeek: 'dddd [پیش] [ساعت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'در %s',
+ past: '%s پیش',
+ s: 'چند ثانیه',
+ ss: '%d ثانیه',
+ m: 'یک دقیقه',
+ mm: '%d دقیقه',
+ h: 'یک ساعت',
+ hh: '%d ساعت',
+ d: 'یک روز',
+ dd: '%d روز',
+ M: 'یک ماه',
+ MM: '%d ماه',
+ y: 'یک سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[۰-۹]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}م/,
+ ordinal: '%dم',
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/fi.js b/vendor/assets/javascripts/momentjs/dist/locale/fi.js
new file mode 100644
index 000000000..2e20bff79
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/fi.js
@@ -0,0 +1,124 @@
+//! moment.js locale configuration
+//! locale : Finnish [fi]
+//! author : Tarmo Aidantausta : https://github.com/bleadof
+
+import moment from '../moment';
+
+var numbersPast =
+ 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
+ ' '
+ ),
+ numbersFuture = [
+ 'nolla',
+ 'yhden',
+ 'kahden',
+ 'kolmen',
+ 'neljän',
+ 'viiden',
+ 'kuuden',
+ numbersPast[7],
+ numbersPast[8],
+ numbersPast[9],
+ ];
+function translate(number, withoutSuffix, key, isFuture) {
+ var result = '';
+ switch (key) {
+ case 's':
+ return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
+ case 'ss':
+ result = isFuture ? 'sekunnin' : 'sekuntia';
+ break;
+ case 'm':
+ return isFuture ? 'minuutin' : 'minuutti';
+ case 'mm':
+ result = isFuture ? 'minuutin' : 'minuuttia';
+ break;
+ case 'h':
+ return isFuture ? 'tunnin' : 'tunti';
+ case 'hh':
+ result = isFuture ? 'tunnin' : 'tuntia';
+ break;
+ case 'd':
+ return isFuture ? 'päivän' : 'päivä';
+ case 'dd':
+ result = isFuture ? 'päivän' : 'päivää';
+ break;
+ case 'M':
+ return isFuture ? 'kuukauden' : 'kuukausi';
+ case 'MM':
+ result = isFuture ? 'kuukauden' : 'kuukautta';
+ break;
+ case 'y':
+ return isFuture ? 'vuoden' : 'vuosi';
+ case 'yy':
+ result = isFuture ? 'vuoden' : 'vuotta';
+ break;
+ }
+ result = verbalNumber(number, isFuture) + ' ' + result;
+ return result;
+}
+function verbalNumber(number, isFuture) {
+ return number < 10
+ ? isFuture
+ ? numbersFuture[number]
+ : numbersPast[number]
+ : number;
+}
+
+export default moment.defineLocale('fi', {
+ months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
+ '_'
+ ),
+ monthsShort:
+ 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
+ '_'
+ ),
+ weekdays:
+ 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
+ '_'
+ ),
+ weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
+ weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD.MM.YYYY',
+ LL: 'Do MMMM[ta] YYYY',
+ LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
+ LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
+ l: 'D.M.YYYY',
+ ll: 'Do MMM YYYY',
+ lll: 'Do MMM YYYY, [klo] HH.mm',
+ llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
+ },
+ calendar: {
+ sameDay: '[tänään] [klo] LT',
+ nextDay: '[huomenna] [klo] LT',
+ nextWeek: 'dddd [klo] LT',
+ lastDay: '[eilen] [klo] LT',
+ lastWeek: '[viime] dddd[na] [klo] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s päästä',
+ past: '%s sitten',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/fil.js b/vendor/assets/javascripts/momentjs/dist/locale/fil.js
new file mode 100644
index 000000000..e0447aaf5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/fil.js
@@ -0,0 +1,58 @@
+//! moment.js locale configuration
+//! locale : Filipino [fil]
+//! author : Dan Hagman : https://github.com/hagmandan
+//! author : Matthew Co : https://github.com/matthewdeeco
+
+import moment from '../moment';
+
+export default moment.defineLocale('fil', {
+ months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
+ '_'
+ ),
+ monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+ weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+ weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'MM/D/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY HH:mm',
+ LLLL: 'dddd, MMMM DD, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: 'LT [ngayong araw]',
+ nextDay: '[Bukas ng] LT',
+ nextWeek: 'LT [sa susunod na] dddd',
+ lastDay: 'LT [kahapon]',
+ lastWeek: 'LT [noong nakaraang] dddd',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'sa loob ng %s',
+ past: '%s ang nakalipas',
+ s: 'ilang segundo',
+ ss: '%d segundo',
+ m: 'isang minuto',
+ mm: '%d minuto',
+ h: 'isang oras',
+ hh: '%d oras',
+ d: 'isang araw',
+ dd: '%d araw',
+ M: 'isang buwan',
+ MM: '%d buwan',
+ y: 'isang taon',
+ yy: '%d taon',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/fo.js b/vendor/assets/javascripts/momentjs/dist/locale/fo.js
new file mode 100644
index 000000000..c8fd0bc4d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/fo.js
@@ -0,0 +1,57 @@
+//! moment.js locale configuration
+//! locale : Faroese [fo]
+//! author : Ragnar Johannesen : https://github.com/ragnar123
+//! author : Kristian Sakarisson : https://github.com/sakarisson
+
+import moment from '../moment';
+
+export default moment.defineLocale('fo', {
+ months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
+ weekdays:
+ 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
+ '_'
+ ),
+ weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
+ weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D. MMMM, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Í dag kl.] LT',
+ nextDay: '[Í morgin kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[Í gjár kl.] LT',
+ lastWeek: '[síðstu] dddd [kl] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'um %s',
+ past: '%s síðani',
+ s: 'fá sekund',
+ ss: '%d sekundir',
+ m: 'ein minuttur',
+ mm: '%d minuttir',
+ h: 'ein tími',
+ hh: '%d tímar',
+ d: 'ein dagur',
+ dd: '%d dagar',
+ M: 'ein mánaður',
+ MM: '%d mánaðir',
+ y: 'eitt ár',
+ yy: '%d ár',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/fr-ca.js b/vendor/assets/javascripts/momentjs/dist/locale/fr-ca.js
new file mode 100644
index 000000000..6187291c5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/fr-ca.js
@@ -0,0 +1,70 @@
+//! moment.js locale configuration
+//! locale : French (Canada) [fr-ca]
+//! author : Jonathan Abourbih : https://github.com/jonbca
+
+import moment from '../moment';
+
+export default moment.defineLocale('fr-ca', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'D':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/fr-ch.js b/vendor/assets/javascripts/momentjs/dist/locale/fr-ch.js
new file mode 100644
index 000000000..2cc90d8a3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/fr-ch.js
@@ -0,0 +1,74 @@
+//! moment.js locale configuration
+//! locale : French (Switzerland) [fr-ch]
+//! author : Gaspard Bucher : https://github.com/gaspard
+
+import moment from '../moment';
+
+export default moment.defineLocale('fr-ch', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'D':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/fr.js b/vendor/assets/javascripts/momentjs/dist/locale/fr.js
new file mode 100644
index 000000000..a3afb4b9f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/fr.js
@@ -0,0 +1,108 @@
+//! moment.js locale configuration
+//! locale : French [fr]
+//! author : John Fischer : https://github.com/jfroffice
+
+import moment from '../moment';
+
+var monthsStrictRegex =
+ /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsShortStrictRegex =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
+ monthsRegex =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsParse = [
+ /^janv/i,
+ /^févr/i,
+ /^mars/i,
+ /^avr/i,
+ /^mai/i,
+ /^juin/i,
+ /^juil/i,
+ /^août/i,
+ /^sept/i,
+ /^oct/i,
+ /^nov/i,
+ /^déc/i,
+ ];
+
+export default moment.defineLocale('fr', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex: monthsStrictRegex,
+ monthsShortStrictRegex: monthsShortStrictRegex,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ w: 'une semaine',
+ ww: '%d semaines',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // TODO: Return 'e' when day of month > 1. Move this case inside
+ // block for masculine words below.
+ // See https://github.com/moment/moment/issues/3375
+ case 'D':
+ return number + (number === 1 ? 'er' : '');
+
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/fy.js b/vendor/assets/javascripts/momentjs/dist/locale/fy.js
new file mode 100644
index 000000000..4844587d7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/fy.js
@@ -0,0 +1,75 @@
+//! moment.js locale configuration
+//! locale : Frisian [fy]
+//! author : Robin van der Vliet : https://github.com/robin0van0der0v
+
+import moment from '../moment';
+
+var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
+
+export default moment.defineLocale('fy', {
+ months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots[m.month()];
+ } else {
+ return monthsShortWithDots[m.month()];
+ }
+ },
+ monthsParseExact: true,
+ weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
+ '_'
+ ),
+ weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
+ weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[hjoed om] LT',
+ nextDay: '[moarn om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[juster om] LT',
+ lastWeek: '[ôfrûne] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'oer %s',
+ past: '%s lyn',
+ s: 'in pear sekonden',
+ ss: '%d sekonden',
+ m: 'ien minút',
+ mm: '%d minuten',
+ h: 'ien oere',
+ hh: '%d oeren',
+ d: 'ien dei',
+ dd: '%d dagen',
+ M: 'ien moanne',
+ MM: '%d moannen',
+ y: 'ien jier',
+ yy: '%d jierren',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ga.js b/vendor/assets/javascripts/momentjs/dist/locale/ga.js
new file mode 100644
index 000000000..7f36fb661
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ga.js
@@ -0,0 +1,95 @@
+//! moment.js locale configuration
+//! locale : Irish or Irish Gaelic [ga]
+//! author : André Silva : https://github.com/askpt
+
+import moment from '../moment';
+
+var months = [
+ 'Eanáir',
+ 'Feabhra',
+ 'Márta',
+ 'Aibreán',
+ 'Bealtaine',
+ 'Meitheamh',
+ 'Iúil',
+ 'Lúnasa',
+ 'Meán Fómhair',
+ 'Deireadh Fómhair',
+ 'Samhain',
+ 'Nollaig',
+ ],
+ monthsShort = [
+ 'Ean',
+ 'Feabh',
+ 'Márt',
+ 'Aib',
+ 'Beal',
+ 'Meith',
+ 'Iúil',
+ 'Lún',
+ 'M.F.',
+ 'D.F.',
+ 'Samh',
+ 'Noll',
+ ],
+ weekdays = [
+ 'Dé Domhnaigh',
+ 'Dé Luain',
+ 'Dé Máirt',
+ 'Dé Céadaoin',
+ 'Déardaoin',
+ 'Dé hAoine',
+ 'Dé Sathairn',
+ ],
+ weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
+ weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
+
+export default moment.defineLocale('ga', {
+ months: months,
+ monthsShort: monthsShort,
+ monthsParseExact: true,
+ weekdays: weekdays,
+ weekdaysShort: weekdaysShort,
+ weekdaysMin: weekdaysMin,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Inniu ag] LT',
+ nextDay: '[Amárach ag] LT',
+ nextWeek: 'dddd [ag] LT',
+ lastDay: '[Inné ag] LT',
+ lastWeek: 'dddd [seo caite] [ag] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'i %s',
+ past: '%s ó shin',
+ s: 'cúpla soicind',
+ ss: '%d soicind',
+ m: 'nóiméad',
+ mm: '%d nóiméad',
+ h: 'uair an chloig',
+ hh: '%d uair an chloig',
+ d: 'lá',
+ dd: '%d lá',
+ M: 'mí',
+ MM: '%d míonna',
+ y: 'bliain',
+ yy: '%d bliain',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/gd.js b/vendor/assets/javascripts/momentjs/dist/locale/gd.js
new file mode 100644
index 000000000..81f735b88
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/gd.js
@@ -0,0 +1,95 @@
+//! moment.js locale configuration
+//! locale : Scottish Gaelic [gd]
+//! author : Jon Ashdown : https://github.com/jonashdown
+
+import moment from '../moment';
+
+var months = [
+ 'Am Faoilleach',
+ 'An Gearran',
+ 'Am Màrt',
+ 'An Giblean',
+ 'An Cèitean',
+ 'An t-Ògmhios',
+ 'An t-Iuchar',
+ 'An Lùnastal',
+ 'An t-Sultain',
+ 'An Dàmhair',
+ 'An t-Samhain',
+ 'An Dùbhlachd',
+ ],
+ monthsShort = [
+ 'Faoi',
+ 'Gear',
+ 'Màrt',
+ 'Gibl',
+ 'Cèit',
+ 'Ògmh',
+ 'Iuch',
+ 'Lùn',
+ 'Sult',
+ 'Dàmh',
+ 'Samh',
+ 'Dùbh',
+ ],
+ weekdays = [
+ 'Didòmhnaich',
+ 'Diluain',
+ 'Dimàirt',
+ 'Diciadain',
+ 'Diardaoin',
+ 'Dihaoine',
+ 'Disathairne',
+ ],
+ weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
+ weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
+
+export default moment.defineLocale('gd', {
+ months: months,
+ monthsShort: monthsShort,
+ monthsParseExact: true,
+ weekdays: weekdays,
+ weekdaysShort: weekdaysShort,
+ weekdaysMin: weekdaysMin,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[An-diugh aig] LT',
+ nextDay: '[A-màireach aig] LT',
+ nextWeek: 'dddd [aig] LT',
+ lastDay: '[An-dè aig] LT',
+ lastWeek: 'dddd [seo chaidh] [aig] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ann an %s',
+ past: 'bho chionn %s',
+ s: 'beagan diogan',
+ ss: '%d diogan',
+ m: 'mionaid',
+ mm: '%d mionaidean',
+ h: 'uair',
+ hh: '%d uairean',
+ d: 'latha',
+ dd: '%d latha',
+ M: 'mìos',
+ MM: '%d mìosan',
+ y: 'bliadhna',
+ yy: '%d bliadhna',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/gl.js b/vendor/assets/javascripts/momentjs/dist/locale/gl.js
new file mode 100644
index 000000000..980591c47
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/gl.js
@@ -0,0 +1,75 @@
+//! moment.js locale configuration
+//! locale : Galician [gl]
+//! author : Juan G. Hurtado : https://github.com/juanghurtado
+
+import moment from '../moment';
+
+export default moment.defineLocale('gl', {
+ months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
+ '_'
+ ),
+ monthsShort:
+ 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
+ },
+ lastDay: function () {
+ return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (str) {
+ if (str.indexOf('un') === 0) {
+ return 'n' + str;
+ }
+ return 'en ' + str;
+ },
+ past: 'hai %s',
+ s: 'uns segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'unha hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/gom-deva.js b/vendor/assets/javascripts/momentjs/dist/locale/gom-deva.js
new file mode 100644
index 000000000..294e35867
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/gom-deva.js
@@ -0,0 +1,126 @@
+//! moment.js locale configuration
+//! locale : Konkani Devanagari script [gom-deva]
+//! author : The Discoverer : https://github.com/WikiDiscoverer
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
+ ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
+ m: ['एका मिणटान', 'एक मिनूट'],
+ mm: [number + ' मिणटांनी', number + ' मिणटां'],
+ h: ['एका वरान', 'एक वर'],
+ hh: [number + ' वरांनी', number + ' वरां'],
+ d: ['एका दिसान', 'एक दीस'],
+ dd: [number + ' दिसांनी', number + ' दीस'],
+ M: ['एका म्हयन्यान', 'एक म्हयनो'],
+ MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
+ y: ['एका वर्सान', 'एक वर्स'],
+ yy: [number + ' वर्सांनी', number + ' वर्सां'],
+ };
+ return isFuture ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('gom-deva', {
+ months: {
+ standalone:
+ 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
+ '_'
+ ),
+ format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
+ '_'
+ ),
+ isFormat: /MMMM(\s)+D[oD]?/,
+ },
+ monthsShort:
+ 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
+ weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
+ weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'A h:mm [वाजतां]',
+ LTS: 'A h:mm:ss [वाजतां]',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY A h:mm [वाजतां]',
+ LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
+ llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
+ },
+ calendar: {
+ sameDay: '[आयज] LT',
+ nextDay: '[फाल्यां] LT',
+ nextWeek: '[फुडलो] dddd[,] LT',
+ lastDay: '[काल] LT',
+ lastWeek: '[फाटलो] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s',
+ past: '%s आदीं',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // the ordinal 'वेर' only applies to day of the month
+ case 'D':
+ return number + 'वेर';
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ case 'w':
+ case 'W':
+ return number;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
+ },
+ meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'राती') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सकाळीं') {
+ return hour;
+ } else if (meridiem === 'दनपारां') {
+ return hour > 12 ? hour : hour + 12;
+ } else if (meridiem === 'सांजे') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'राती';
+ } else if (hour < 12) {
+ return 'सकाळीं';
+ } else if (hour < 16) {
+ return 'दनपारां';
+ } else if (hour < 20) {
+ return 'सांजे';
+ } else {
+ return 'राती';
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/gom-latn.js b/vendor/assets/javascripts/momentjs/dist/locale/gom-latn.js
new file mode 100644
index 000000000..d237161f7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/gom-latn.js
@@ -0,0 +1,124 @@
+//! moment.js locale configuration
+//! locale : Konkani Latin script [gom-latn]
+//! author : The Discoverer : https://github.com/WikiDiscoverer
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['thoddea sekondamni', 'thodde sekond'],
+ ss: [number + ' sekondamni', number + ' sekond'],
+ m: ['eka mintan', 'ek minut'],
+ mm: [number + ' mintamni', number + ' mintam'],
+ h: ['eka voran', 'ek vor'],
+ hh: [number + ' voramni', number + ' voram'],
+ d: ['eka disan', 'ek dis'],
+ dd: [number + ' disamni', number + ' dis'],
+ M: ['eka mhoinean', 'ek mhoino'],
+ MM: [number + ' mhoineamni', number + ' mhoine'],
+ y: ['eka vorsan', 'ek voros'],
+ yy: [number + ' vorsamni', number + ' vorsam'],
+ };
+ return isFuture ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('gom-latn', {
+ months: {
+ standalone:
+ 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
+ '_'
+ ),
+ format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
+ '_'
+ ),
+ isFormat: /MMMM(\s)+D[oD]?/,
+ },
+ monthsShort:
+ 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
+ weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
+ weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'A h:mm [vazta]',
+ LTS: 'A h:mm:ss [vazta]',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY A h:mm [vazta]',
+ LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
+ llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
+ },
+ calendar: {
+ sameDay: '[Aiz] LT',
+ nextDay: '[Faleam] LT',
+ nextWeek: '[Fuddlo] dddd[,] LT',
+ lastDay: '[Kal] LT',
+ lastWeek: '[Fattlo] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s',
+ past: '%s adim',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // the ordinal 'er' only applies to day of the month
+ case 'D':
+ return number + 'er';
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ case 'w':
+ case 'W':
+ return number;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
+ },
+ meridiemParse: /rati|sokallim|donparam|sanje/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'rati') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'sokallim') {
+ return hour;
+ } else if (meridiem === 'donparam') {
+ return hour > 12 ? hour : hour + 12;
+ } else if (meridiem === 'sanje') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'rati';
+ } else if (hour < 12) {
+ return 'sokallim';
+ } else if (hour < 16) {
+ return 'donparam';
+ } else if (hour < 20) {
+ return 'sanje';
+ } else {
+ return 'rati';
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/gu.js b/vendor/assets/javascripts/momentjs/dist/locale/gu.js
new file mode 100644
index 000000000..d432d2c33
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/gu.js
@@ -0,0 +1,122 @@
+//! moment.js locale configuration
+//! locale : Gujarati [gu]
+//! author : Kaushik Thanki : https://github.com/Kaushik1987
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '૧',
+ 2: '૨',
+ 3: '૩',
+ 4: '૪',
+ 5: '૫',
+ 6: '૬',
+ 7: '૭',
+ 8: '૮',
+ 9: '૯',
+ 0: '૦',
+ },
+ numberMap = {
+ '૧': '1',
+ '૨': '2',
+ '૩': '3',
+ '૪': '4',
+ '૫': '5',
+ '૬': '6',
+ '૭': '7',
+ '૮': '8',
+ '૯': '9',
+ '૦': '0',
+ };
+
+export default moment.defineLocale('gu', {
+ months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
+ '_'
+ ),
+ monthsShort:
+ 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
+ '_'
+ ),
+ weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
+ weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm વાગ્યે',
+ LTS: 'A h:mm:ss વાગ્યે',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
+ },
+ calendar: {
+ sameDay: '[આજ] LT',
+ nextDay: '[કાલે] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ગઇકાલે] LT',
+ lastWeek: '[પાછલા] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s મા',
+ past: '%s પહેલા',
+ s: 'અમુક પળો',
+ ss: '%d સેકંડ',
+ m: 'એક મિનિટ',
+ mm: '%d મિનિટ',
+ h: 'એક કલાક',
+ hh: '%d કલાક',
+ d: 'એક દિવસ',
+ dd: '%d દિવસ',
+ M: 'એક મહિનો',
+ MM: '%d મહિનો',
+ y: 'એક વર્ષ',
+ yy: '%d વર્ષ',
+ },
+ preparse: function (string) {
+ return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
+ meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'રાત') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'સવાર') {
+ return hour;
+ } else if (meridiem === 'બપોર') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'સાંજ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'રાત';
+ } else if (hour < 10) {
+ return 'સવાર';
+ } else if (hour < 17) {
+ return 'બપોર';
+ } else if (hour < 20) {
+ return 'સાંજ';
+ } else {
+ return 'રાત';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/he.js b/vendor/assets/javascripts/momentjs/dist/locale/he.js
new file mode 100644
index 000000000..08add2cf6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/he.js
@@ -0,0 +1,94 @@
+//! moment.js locale configuration
+//! locale : Hebrew [he]
+//! author : Tomer Cohen : https://github.com/tomer
+//! author : Moshe Simantov : https://github.com/DevelopmentIL
+//! author : Tal Ater : https://github.com/TalAter
+
+import moment from '../moment';
+
+export default moment.defineLocale('he', {
+ months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
+ weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
+ weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
+ weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [ב]MMMM YYYY',
+ LLL: 'D [ב]MMMM YYYY HH:mm',
+ LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
+ l: 'D/M/YYYY',
+ ll: 'D MMM YYYY',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd, D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[היום ב־]LT',
+ nextDay: '[מחר ב־]LT',
+ nextWeek: 'dddd [בשעה] LT',
+ lastDay: '[אתמול ב־]LT',
+ lastWeek: '[ביום] dddd [האחרון בשעה] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'בעוד %s',
+ past: 'לפני %s',
+ s: 'מספר שניות',
+ ss: '%d שניות',
+ m: 'דקה',
+ mm: '%d דקות',
+ h: 'שעה',
+ hh: function (number) {
+ if (number === 2) {
+ return 'שעתיים';
+ }
+ return number + ' שעות';
+ },
+ d: 'יום',
+ dd: function (number) {
+ if (number === 2) {
+ return 'יומיים';
+ }
+ return number + ' ימים';
+ },
+ M: 'חודש',
+ MM: function (number) {
+ if (number === 2) {
+ return 'חודשיים';
+ }
+ return number + ' חודשים';
+ },
+ y: 'שנה',
+ yy: function (number) {
+ if (number === 2) {
+ return 'שנתיים';
+ } else if (number % 10 === 0 && number !== 10) {
+ return number + ' שנה';
+ }
+ return number + ' שנים';
+ },
+ },
+ meridiemParse:
+ /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
+ isPM: function (input) {
+ return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 5) {
+ return 'לפנות בוקר';
+ } else if (hour < 10) {
+ return 'בבוקר';
+ } else if (hour < 12) {
+ return isLower ? 'לפנה"צ' : 'לפני הצהריים';
+ } else if (hour < 18) {
+ return isLower ? 'אחה"צ' : 'אחרי הצהריים';
+ } else {
+ return 'בערב';
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/hi.js b/vendor/assets/javascripts/momentjs/dist/locale/hi.js
new file mode 100644
index 000000000..2e3a973af
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/hi.js
@@ -0,0 +1,168 @@
+//! moment.js locale configuration
+//! locale : Hindi [hi]
+//! author : Mayank Singhal : https://github.com/mayanksinghal
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ },
+ monthsParse = [
+ /^जन/i,
+ /^फ़र|फर/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सितं|सित/i,
+ /^अक्टू/i,
+ /^नव|नवं/i,
+ /^दिसं|दिस/i,
+ ],
+ shortMonthsParse = [
+ /^जन/i,
+ /^फ़र/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सित/i,
+ /^अक्टू/i,
+ /^नव/i,
+ /^दिस/i,
+ ];
+
+export default moment.defineLocale('hi', {
+ months: {
+ format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
+ '_'
+ ),
+ standalone:
+ 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
+ weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm बजे',
+ LTS: 'A h:mm:ss बजे',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm बजे',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
+ },
+
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: shortMonthsParse,
+
+ monthsRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsShortRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsStrictRegex:
+ /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
+
+ monthsShortStrictRegex:
+ /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
+
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[कल] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[कल] LT',
+ lastWeek: '[पिछले] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s में',
+ past: '%s पहले',
+ s: 'कुछ ही क्षण',
+ ss: '%d सेकंड',
+ m: 'एक मिनट',
+ mm: '%d मिनट',
+ h: 'एक घंटा',
+ hh: '%d घंटे',
+ d: 'एक दिन',
+ dd: '%d दिन',
+ M: 'एक महीने',
+ MM: '%d महीने',
+ y: 'एक वर्ष',
+ yy: '%d वर्ष',
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // Hindi notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
+ meridiemParse: /रात|सुबह|दोपहर|शाम/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'रात') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सुबह') {
+ return hour;
+ } else if (meridiem === 'दोपहर') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'शाम') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'रात';
+ } else if (hour < 10) {
+ return 'सुबह';
+ } else if (hour < 17) {
+ return 'दोपहर';
+ } else if (hour < 20) {
+ return 'शाम';
+ } else {
+ return 'रात';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/hr.js b/vendor/assets/javascripts/momentjs/dist/locale/hr.js
new file mode 100644
index 000000000..48c1e9ebc
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/hr.js
@@ -0,0 +1,156 @@
+//! moment.js locale configuration
+//! locale : Croatian [hr]
+//! author : Bojan Marković : https://github.com/bmarkovic
+
+import moment from '../moment';
+
+function translate(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ if (number === 1) {
+ result += 'sekunda';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sekunde';
+ } else {
+ result += 'sekundi';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
+ }
+}
+
+export default moment.defineLocale('hr', {
+ months: {
+ format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
+ '_'
+ ),
+ standalone:
+ 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'Do MMMM YYYY',
+ LLL: 'Do MMMM YYYY H:mm',
+ LLLL: 'dddd, Do MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[jučer u] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[prošlu] [nedjelju] [u] LT';
+ case 3:
+ return '[prošlu] [srijedu] [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'par sekundi',
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: 'dan',
+ dd: translate,
+ M: 'mjesec',
+ MM: translate,
+ y: 'godinu',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/hu.js b/vendor/assets/javascripts/momentjs/dist/locale/hu.js
new file mode 100644
index 000000000..f2f59817e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/hu.js
@@ -0,0 +1,118 @@
+//! moment.js locale configuration
+//! locale : Hungarian [hu]
+//! author : Adam Brunner : https://github.com/adambrunner
+//! author : Peter Viszt : https://github.com/passatgt
+
+import moment from '../moment';
+
+var weekEndings =
+ 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
+function translate(number, withoutSuffix, key, isFuture) {
+ var num = number;
+ switch (key) {
+ case 's':
+ return isFuture || withoutSuffix
+ ? 'néhány másodperc'
+ : 'néhány másodperce';
+ case 'ss':
+ return num + (isFuture || withoutSuffix)
+ ? ' másodperc'
+ : ' másodperce';
+ case 'm':
+ return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'mm':
+ return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'h':
+ return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'hh':
+ return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'd':
+ return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'dd':
+ return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'M':
+ return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'MM':
+ return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'y':
+ return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
+ case 'yy':
+ return num + (isFuture || withoutSuffix ? ' év' : ' éve');
+ }
+ return '';
+}
+function week(isFuture) {
+ return (
+ (isFuture ? '' : '[múlt] ') +
+ '[' +
+ weekEndings[this.day()] +
+ '] LT[-kor]'
+ );
+}
+
+export default moment.defineLocale('hu', {
+ months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
+ weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
+ weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'YYYY.MM.DD.',
+ LL: 'YYYY. MMMM D.',
+ LLL: 'YYYY. MMMM D. H:mm',
+ LLLL: 'YYYY. MMMM D., dddd H:mm',
+ },
+ meridiemParse: /de|du/i,
+ isPM: function (input) {
+ return input.charAt(1).toLowerCase() === 'u';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower === true ? 'de' : 'DE';
+ } else {
+ return isLower === true ? 'du' : 'DU';
+ }
+ },
+ calendar: {
+ sameDay: '[ma] LT[-kor]',
+ nextDay: '[holnap] LT[-kor]',
+ nextWeek: function () {
+ return week.call(this, true);
+ },
+ lastDay: '[tegnap] LT[-kor]',
+ lastWeek: function () {
+ return week.call(this, false);
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s múlva',
+ past: '%s',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/hy-am.js b/vendor/assets/javascripts/momentjs/dist/locale/hy-am.js
new file mode 100644
index 000000000..283cfbd97
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/hy-am.js
@@ -0,0 +1,94 @@
+//! moment.js locale configuration
+//! locale : Armenian [hy-am]
+//! author : Armendarabyan : https://github.com/armendarabyan
+
+import moment from '../moment';
+
+export default moment.defineLocale('hy-am', {
+ months: {
+ format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
+ '_'
+ ),
+ standalone:
+ 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
+ weekdays:
+ 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
+ '_'
+ ),
+ weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+ weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY թ.',
+ LLL: 'D MMMM YYYY թ., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY թ., HH:mm',
+ },
+ calendar: {
+ sameDay: '[այսօր] LT',
+ nextDay: '[վաղը] LT',
+ lastDay: '[երեկ] LT',
+ nextWeek: function () {
+ return 'dddd [օրը ժամը] LT';
+ },
+ lastWeek: function () {
+ return '[անցած] dddd [օրը ժամը] LT';
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s հետո',
+ past: '%s առաջ',
+ s: 'մի քանի վայրկյան',
+ ss: '%d վայրկյան',
+ m: 'րոպե',
+ mm: '%d րոպե',
+ h: 'ժամ',
+ hh: '%d ժամ',
+ d: 'օր',
+ dd: '%d օր',
+ M: 'ամիս',
+ MM: '%d ամիս',
+ y: 'տարի',
+ yy: '%d տարի',
+ },
+ meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
+ isPM: function (input) {
+ return /^(ցերեկվա|երեկոյան)$/.test(input);
+ },
+ meridiem: function (hour) {
+ if (hour < 4) {
+ return 'գիշերվա';
+ } else if (hour < 12) {
+ return 'առավոտվա';
+ } else if (hour < 17) {
+ return 'ցերեկվա';
+ } else {
+ return 'երեկոյան';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'DDD':
+ case 'w':
+ case 'W':
+ case 'DDDo':
+ if (number === 1) {
+ return number + '-ին';
+ }
+ return number + '-րդ';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/id.js b/vendor/assets/javascripts/momentjs/dist/locale/id.js
new file mode 100644
index 000000000..3260e1c4a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/id.js
@@ -0,0 +1,76 @@
+//! moment.js locale configuration
+//! locale : Indonesian [id]
+//! author : Mohammad Satrio Utomo : https://github.com/tyok
+//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
+
+import moment from '../moment';
+
+export default moment.defineLocale('id', {
+ months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
+ weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
+ weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
+ weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|siang|sore|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'siang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sore' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'siang';
+ } else if (hours < 19) {
+ return 'sore';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Besok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kemarin pukul] LT',
+ lastWeek: 'dddd [lalu pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lalu',
+ s: 'beberapa detik',
+ ss: '%d detik',
+ m: 'semenit',
+ mm: '%d menit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/is.js b/vendor/assets/javascripts/momentjs/dist/locale/is.js
new file mode 100644
index 000000000..d2c6f47ea
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/is.js
@@ -0,0 +1,140 @@
+//! moment.js locale configuration
+//! locale : Icelandic [is]
+//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
+
+import moment from '../moment';
+
+function plural(n) {
+ if (n % 100 === 11) {
+ return true;
+ } else if (n % 10 === 1) {
+ return false;
+ }
+ return true;
+}
+function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's':
+ return withoutSuffix || isFuture
+ ? 'nokkrar sekúndur'
+ : 'nokkrum sekúndum';
+ case 'ss':
+ if (plural(number)) {
+ return (
+ result +
+ (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
+ );
+ }
+ return result + 'sekúnda';
+ case 'm':
+ return withoutSuffix ? 'mínúta' : 'mínútu';
+ case 'mm':
+ if (plural(number)) {
+ return (
+ result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
+ );
+ } else if (withoutSuffix) {
+ return result + 'mínúta';
+ }
+ return result + 'mínútu';
+ case 'hh':
+ if (plural(number)) {
+ return (
+ result +
+ (withoutSuffix || isFuture
+ ? 'klukkustundir'
+ : 'klukkustundum')
+ );
+ }
+ return result + 'klukkustund';
+ case 'd':
+ if (withoutSuffix) {
+ return 'dagur';
+ }
+ return isFuture ? 'dag' : 'degi';
+ case 'dd':
+ if (plural(number)) {
+ if (withoutSuffix) {
+ return result + 'dagar';
+ }
+ return result + (isFuture ? 'daga' : 'dögum');
+ } else if (withoutSuffix) {
+ return result + 'dagur';
+ }
+ return result + (isFuture ? 'dag' : 'degi');
+ case 'M':
+ if (withoutSuffix) {
+ return 'mánuður';
+ }
+ return isFuture ? 'mánuð' : 'mánuði';
+ case 'MM':
+ if (plural(number)) {
+ if (withoutSuffix) {
+ return result + 'mánuðir';
+ }
+ return result + (isFuture ? 'mánuði' : 'mánuðum');
+ } else if (withoutSuffix) {
+ return result + 'mánuður';
+ }
+ return result + (isFuture ? 'mánuð' : 'mánuði');
+ case 'y':
+ return withoutSuffix || isFuture ? 'ár' : 'ári';
+ case 'yy':
+ if (plural(number)) {
+ return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
+ }
+ return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
+ }
+}
+
+export default moment.defineLocale('is', {
+ months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
+ weekdays:
+ 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
+ '_'
+ ),
+ weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
+ weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] H:mm',
+ LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
+ },
+ calendar: {
+ sameDay: '[í dag kl.] LT',
+ nextDay: '[á morgun kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[í gær kl.] LT',
+ lastWeek: '[síðasta] dddd [kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'eftir %s',
+ past: 'fyrir %s síðan',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: 'klukkustund',
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/it-ch.js b/vendor/assets/javascripts/momentjs/dist/locale/it-ch.js
new file mode 100644
index 000000000..343745328
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/it-ch.js
@@ -0,0 +1,64 @@
+//! moment.js locale configuration
+//! locale : Italian (Switzerland) [it-ch]
+//! author : xfh : https://github.com/xfh
+
+import moment from '../moment';
+
+export default moment.defineLocale('it-ch', {
+ months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
+ '_'
+ ),
+ monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+ weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
+ weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Oggi alle] LT',
+ nextDay: '[Domani alle] LT',
+ nextWeek: 'dddd [alle] LT',
+ lastDay: '[Ieri alle] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[la scorsa] dddd [alle] LT';
+ default:
+ return '[lo scorso] dddd [alle] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (s) {
+ return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
+ },
+ past: '%s fa',
+ s: 'alcuni secondi',
+ ss: '%d secondi',
+ m: 'un minuto',
+ mm: '%d minuti',
+ h: "un'ora",
+ hh: '%d ore',
+ d: 'un giorno',
+ dd: '%d giorni',
+ M: 'un mese',
+ MM: '%d mesi',
+ y: 'un anno',
+ yy: '%d anni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/it.js b/vendor/assets/javascripts/momentjs/dist/locale/it.js
new file mode 100644
index 000000000..46aaccfbe
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/it.js
@@ -0,0 +1,106 @@
+//! moment.js locale configuration
+//! locale : Italian [it]
+//! author : Lorenzo : https://github.com/aliem
+//! author: Mattia Larentis: https://github.com/nostalgiaz
+//! author: Marco : https://github.com/Manfre98
+
+import moment from '../moment';
+
+export default moment.defineLocale('it', {
+ months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
+ '_'
+ ),
+ monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+ weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
+ weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return (
+ '[Oggi a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ nextDay: function () {
+ return (
+ '[Domani a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ nextWeek: function () {
+ return (
+ 'dddd [a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ lastDay: function () {
+ return (
+ '[Ieri a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return (
+ '[La scorsa] dddd [a' +
+ (this.hours() > 1
+ ? 'lle '
+ : this.hours() === 0
+ ? ' '
+ : "ll'") +
+ ']LT'
+ );
+ default:
+ return (
+ '[Lo scorso] dddd [a' +
+ (this.hours() > 1
+ ? 'lle '
+ : this.hours() === 0
+ ? ' '
+ : "ll'") +
+ ']LT'
+ );
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'tra %s',
+ past: '%s fa',
+ s: 'alcuni secondi',
+ ss: '%d secondi',
+ m: 'un minuto',
+ mm: '%d minuti',
+ h: "un'ora",
+ hh: '%d ore',
+ d: 'un giorno',
+ dd: '%d giorni',
+ w: 'una settimana',
+ ww: '%d settimane',
+ M: 'un mese',
+ MM: '%d mesi',
+ y: 'un anno',
+ yy: '%d anni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ja.js b/vendor/assets/javascripts/momentjs/dist/locale/ja.js
new file mode 100644
index 000000000..abe921ad4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ja.js
@@ -0,0 +1,148 @@
+//! moment.js locale configuration
+//! locale : Japanese [ja]
+//! author : LI Long : https://github.com/baryon
+
+import moment from '../moment';
+
+export default moment.defineLocale('ja', {
+ eras: [
+ {
+ since: '2019-05-01',
+ offset: 1,
+ name: '令和',
+ narrow: '㋿',
+ abbr: 'R',
+ },
+ {
+ since: '1989-01-08',
+ until: '2019-04-30',
+ offset: 1,
+ name: '平成',
+ narrow: '㍻',
+ abbr: 'H',
+ },
+ {
+ since: '1926-12-25',
+ until: '1989-01-07',
+ offset: 1,
+ name: '昭和',
+ narrow: '㍼',
+ abbr: 'S',
+ },
+ {
+ since: '1912-07-30',
+ until: '1926-12-24',
+ offset: 1,
+ name: '大正',
+ narrow: '㍽',
+ abbr: 'T',
+ },
+ {
+ since: '1873-01-01',
+ until: '1912-07-29',
+ offset: 6,
+ name: '明治',
+ narrow: '㍾',
+ abbr: 'M',
+ },
+ {
+ since: '0001-01-01',
+ until: '1873-12-31',
+ offset: 1,
+ name: '西暦',
+ narrow: 'AD',
+ abbr: 'AD',
+ },
+ {
+ since: '0000-12-31',
+ until: -Infinity,
+ offset: 1,
+ name: '紀元前',
+ narrow: 'BC',
+ abbr: 'BC',
+ },
+ ],
+ eraYearOrdinalRegex: /(元|\d+)年/,
+ eraYearOrdinalParse: function (input, match) {
+ return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
+ },
+ months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
+ weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
+ weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日 dddd HH:mm',
+ l: 'YYYY/MM/DD',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日(ddd) HH:mm',
+ },
+ meridiemParse: /午前|午後/i,
+ isPM: function (input) {
+ return input === '午後';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return '午前';
+ } else {
+ return '午後';
+ }
+ },
+ calendar: {
+ sameDay: '[今日] LT',
+ nextDay: '[明日] LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ return '[来週]dddd LT';
+ } else {
+ return 'dddd LT';
+ }
+ },
+ lastDay: '[昨日] LT',
+ lastWeek: function (now) {
+ if (this.week() !== now.week()) {
+ return '[先週]dddd LT';
+ } else {
+ return 'dddd LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}日/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'y':
+ return number === 1 ? '元年' : number + '年';
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '数秒',
+ ss: '%d秒',
+ m: '1分',
+ mm: '%d分',
+ h: '1時間',
+ hh: '%d時間',
+ d: '1日',
+ dd: '%d日',
+ M: '1ヶ月',
+ MM: '%dヶ月',
+ y: '1年',
+ yy: '%d年',
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/jv.js b/vendor/assets/javascripts/momentjs/dist/locale/jv.js
new file mode 100644
index 000000000..b52f48d18
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/jv.js
@@ -0,0 +1,76 @@
+//! moment.js locale configuration
+//! locale : Javanese [jv]
+//! author : Rony Lantip : https://github.com/lantip
+//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
+
+import moment from '../moment';
+
+export default moment.defineLocale('jv', {
+ months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
+ weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
+ weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
+ weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /enjing|siyang|sonten|ndalu/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'enjing') {
+ return hour;
+ } else if (meridiem === 'siyang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'enjing';
+ } else if (hours < 15) {
+ return 'siyang';
+ } else if (hours < 19) {
+ return 'sonten';
+ } else {
+ return 'ndalu';
+ }
+ },
+ calendar: {
+ sameDay: '[Dinten puniko pukul] LT',
+ nextDay: '[Mbenjang pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kala wingi pukul] LT',
+ lastWeek: 'dddd [kepengker pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'wonten ing %s',
+ past: '%s ingkang kepengker',
+ s: 'sawetawis detik',
+ ss: '%d detik',
+ m: 'setunggal menit',
+ mm: '%d menit',
+ h: 'setunggal jam',
+ hh: '%d jam',
+ d: 'sedinten',
+ dd: '%d dinten',
+ M: 'sewulan',
+ MM: '%d wulan',
+ y: 'setaun',
+ yy: '%d taun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ka.js b/vendor/assets/javascripts/momentjs/dist/locale/ka.js
new file mode 100644
index 000000000..15b6ead4f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ka.js
@@ -0,0 +1,92 @@
+//! moment.js locale configuration
+//! locale : Georgian [ka]
+//! author : Irakli Janiashvili : https://github.com/IrakliJani
+
+import moment from '../moment';
+
+export default moment.defineLocale('ka', {
+ months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
+ '_'
+ ),
+ monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
+ weekdays: {
+ standalone:
+ 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
+ '_'
+ ),
+ format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
+ '_'
+ ),
+ isFormat: /(წინა|შემდეგ)/,
+ },
+ weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
+ weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[დღეს] LT[-ზე]',
+ nextDay: '[ხვალ] LT[-ზე]',
+ lastDay: '[გუშინ] LT[-ზე]',
+ nextWeek: '[შემდეგ] dddd LT[-ზე]',
+ lastWeek: '[წინა] dddd LT-ზე',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (s) {
+ return s.replace(
+ /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,
+ function ($0, $1, $2) {
+ return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
+ }
+ );
+ },
+ past: function (s) {
+ if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
+ return s.replace(/(ი|ე)$/, 'ის წინ');
+ }
+ if (/წელი/.test(s)) {
+ return s.replace(/წელი$/, 'წლის წინ');
+ }
+ return s;
+ },
+ s: 'რამდენიმე წამი',
+ ss: '%d წამი',
+ m: 'წუთი',
+ mm: '%d წუთი',
+ h: 'საათი',
+ hh: '%d საათი',
+ d: 'დღე',
+ dd: '%d დღე',
+ M: 'თვე',
+ MM: '%d თვე',
+ y: 'წელი',
+ yy: '%d წელი',
+ },
+ dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
+ ordinal: function (number) {
+ if (number === 0) {
+ return number;
+ }
+ if (number === 1) {
+ return number + '-ლი';
+ }
+ if (
+ number < 20 ||
+ (number <= 100 && number % 20 === 0) ||
+ number % 100 === 0
+ ) {
+ return 'მე-' + number;
+ }
+ return number + '-ე';
+ },
+ week: {
+ dow: 1,
+ doy: 7,
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/kk.js b/vendor/assets/javascripts/momentjs/dist/locale/kk.js
new file mode 100644
index 000000000..9cab15256
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/kk.js
@@ -0,0 +1,82 @@
+//! moment.js locale configuration
+//! locale : Kazakh [kk]
+//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
+
+import moment from '../moment';
+
+var suffixes = {
+ 0: '-ші',
+ 1: '-ші',
+ 2: '-ші',
+ 3: '-ші',
+ 4: '-ші',
+ 5: '-ші',
+ 6: '-шы',
+ 7: '-ші',
+ 8: '-ші',
+ 9: '-шы',
+ 10: '-шы',
+ 20: '-шы',
+ 30: '-шы',
+ 40: '-шы',
+ 50: '-ші',
+ 60: '-шы',
+ 70: '-ші',
+ 80: '-ші',
+ 90: '-шы',
+ 100: '-ші',
+};
+
+export default moment.defineLocale('kk', {
+ months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
+ '_'
+ ),
+ monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
+ weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
+ '_'
+ ),
+ weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
+ weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бүгін сағат] LT',
+ nextDay: '[Ертең сағат] LT',
+ nextWeek: 'dddd [сағат] LT',
+ lastDay: '[Кеше сағат] LT',
+ lastWeek: '[Өткен аптаның] dddd [сағат] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ішінде',
+ past: '%s бұрын',
+ s: 'бірнеше секунд',
+ ss: '%d секунд',
+ m: 'бір минут',
+ mm: '%d минут',
+ h: 'бір сағат',
+ hh: '%d сағат',
+ d: 'бір күн',
+ dd: '%d күн',
+ M: 'бір ай',
+ MM: '%d ай',
+ y: 'бір жыл',
+ yy: '%d жыл',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes[number] || suffixes[a] || suffixes[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/km.js b/vendor/assets/javascripts/momentjs/dist/locale/km.js
new file mode 100644
index 000000000..984c4dcc6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/km.js
@@ -0,0 +1,103 @@
+//! moment.js locale configuration
+//! locale : Cambodian [km]
+//! author : Kruy Vanna : https://github.com/kruyvanna
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '១',
+ 2: '២',
+ 3: '៣',
+ 4: '៤',
+ 5: '៥',
+ 6: '៦',
+ 7: '៧',
+ 8: '៨',
+ 9: '៩',
+ 0: '០',
+ },
+ numberMap = {
+ '១': '1',
+ '២': '2',
+ '៣': '3',
+ '៤': '4',
+ '៥': '5',
+ '៦': '6',
+ '៧': '7',
+ '៨': '8',
+ '៩': '9',
+ '០': '0',
+ };
+
+export default moment.defineLocale('km', {
+ months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
+ '_'
+ ),
+ weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
+ weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
+ weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ព្រឹក|ល្ងាច/,
+ isPM: function (input) {
+ return input === 'ល្ងាច';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ព្រឹក';
+ } else {
+ return 'ល្ងាច';
+ }
+ },
+ calendar: {
+ sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
+ nextDay: '[ស្អែក ម៉ោង] LT',
+ nextWeek: 'dddd [ម៉ោង] LT',
+ lastDay: '[ម្សិលមិញ ម៉ោង] LT',
+ lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sទៀត',
+ past: '%sមុន',
+ s: 'ប៉ុន្មានវិនាទី',
+ ss: '%d វិនាទី',
+ m: 'មួយនាទី',
+ mm: '%d នាទី',
+ h: 'មួយម៉ោង',
+ hh: '%d ម៉ោង',
+ d: 'មួយថ្ងៃ',
+ dd: '%d ថ្ងៃ',
+ M: 'មួយខែ',
+ MM: '%d ខែ',
+ y: 'មួយឆ្នាំ',
+ yy: '%d ឆ្នាំ',
+ },
+ dayOfMonthOrdinalParse: /ទី\d{1,2}/,
+ ordinal: 'ទី%d',
+ preparse: function (string) {
+ return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/kn.js b/vendor/assets/javascripts/momentjs/dist/locale/kn.js
new file mode 100644
index 000000000..e7cb35441
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/kn.js
@@ -0,0 +1,124 @@
+//! moment.js locale configuration
+//! locale : Kannada [kn]
+//! author : Rajeev Naik : https://github.com/rajeevnaikte
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '೧',
+ 2: '೨',
+ 3: '೩',
+ 4: '೪',
+ 5: '೫',
+ 6: '೬',
+ 7: '೭',
+ 8: '೮',
+ 9: '೯',
+ 0: '೦',
+ },
+ numberMap = {
+ '೧': '1',
+ '೨': '2',
+ '೩': '3',
+ '೪': '4',
+ '೫': '5',
+ '೬': '6',
+ '೭': '7',
+ '೮': '8',
+ '೯': '9',
+ '೦': '0',
+ };
+
+export default moment.defineLocale('kn', {
+ months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
+ '_'
+ ),
+ weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
+ weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[ಇಂದು] LT',
+ nextDay: '[ನಾಳೆ] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ನಿನ್ನೆ] LT',
+ lastWeek: '[ಕೊನೆಯ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ನಂತರ',
+ past: '%s ಹಿಂದೆ',
+ s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
+ ss: '%d ಸೆಕೆಂಡುಗಳು',
+ m: 'ಒಂದು ನಿಮಿಷ',
+ mm: '%d ನಿಮಿಷ',
+ h: 'ಒಂದು ಗಂಟೆ',
+ hh: '%d ಗಂಟೆ',
+ d: 'ಒಂದು ದಿನ',
+ dd: '%d ದಿನ',
+ M: 'ಒಂದು ತಿಂಗಳು',
+ MM: '%d ತಿಂಗಳು',
+ y: 'ಒಂದು ವರ್ಷ',
+ yy: '%d ವರ್ಷ',
+ },
+ preparse: function (string) {
+ return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ರಾತ್ರಿ') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
+ return hour;
+ } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'ಸಂಜೆ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ರಾತ್ರಿ';
+ } else if (hour < 10) {
+ return 'ಬೆಳಿಗ್ಗೆ';
+ } else if (hour < 17) {
+ return 'ಮಧ್ಯಾಹ್ನ';
+ } else if (hour < 20) {
+ return 'ಸಂಜೆ';
+ } else {
+ return 'ರಾತ್ರಿ';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
+ ordinal: function (number) {
+ return number + 'ನೇ';
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ko.js b/vendor/assets/javascripts/momentjs/dist/locale/ko.js
new file mode 100644
index 000000000..c45f3e3bd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ko.js
@@ -0,0 +1,75 @@
+//! moment.js locale configuration
+//! locale : Korean [ko]
+//! author : Kyungwook, Park : https://github.com/kyungw00k
+//! author : Jeeeyul Lee
+
+import moment from '../moment';
+
+export default moment.defineLocale('ko', {
+ months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
+ monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
+ '_'
+ ),
+ weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
+ weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
+ weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'YYYY.MM.DD.',
+ LL: 'YYYY년 MMMM D일',
+ LLL: 'YYYY년 MMMM D일 A h:mm',
+ LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
+ l: 'YYYY.MM.DD.',
+ ll: 'YYYY년 MMMM D일',
+ lll: 'YYYY년 MMMM D일 A h:mm',
+ llll: 'YYYY년 MMMM D일 dddd A h:mm',
+ },
+ calendar: {
+ sameDay: '오늘 LT',
+ nextDay: '내일 LT',
+ nextWeek: 'dddd LT',
+ lastDay: '어제 LT',
+ lastWeek: '지난주 dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s 후',
+ past: '%s 전',
+ s: '몇 초',
+ ss: '%d초',
+ m: '1분',
+ mm: '%d분',
+ h: '한 시간',
+ hh: '%d시간',
+ d: '하루',
+ dd: '%d일',
+ M: '한 달',
+ MM: '%d달',
+ y: '일 년',
+ yy: '%d년',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '일';
+ case 'M':
+ return number + '월';
+ case 'w':
+ case 'W':
+ return number + '주';
+ default:
+ return number;
+ }
+ },
+ meridiemParse: /오전|오후/,
+ isPM: function (token) {
+ return token === '오후';
+ },
+ meridiem: function (hour, minute, isUpper) {
+ return hour < 12 ? '오전' : '오후';
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ku.js b/vendor/assets/javascripts/momentjs/dist/locale/ku.js
new file mode 100644
index 000000000..e705f0169
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ku.js
@@ -0,0 +1,118 @@
+//! moment.js locale configuration
+//! locale : Kurdish [ku]
+//! author : Shahram Mebashar : https://github.com/ShahramMebashar
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ },
+ months = [
+ 'کانونی دووەم',
+ 'شوبات',
+ 'ئازار',
+ 'نیسان',
+ 'ئایار',
+ 'حوزەیران',
+ 'تەمموز',
+ 'ئاب',
+ 'ئەیلوول',
+ 'تشرینی یەكەم',
+ 'تشرینی دووەم',
+ 'كانونی یەکەم',
+ ];
+
+export default moment.defineLocale('ku', {
+ months: months,
+ monthsShort: months,
+ weekdays:
+ 'یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه'.split('_'),
+ weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ئێواره|بهیانی/,
+ isPM: function (input) {
+ return /ئێواره/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'بهیانی';
+ } else {
+ return 'ئێواره';
+ }
+ },
+ calendar: {
+ sameDay: '[ئهمرۆ كاتژمێر] LT',
+ nextDay: '[بهیانی كاتژمێر] LT',
+ nextWeek: 'dddd [كاتژمێر] LT',
+ lastDay: '[دوێنێ كاتژمێر] LT',
+ lastWeek: 'dddd [كاتژمێر] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'له %s',
+ past: '%s',
+ s: 'چهند چركهیهك',
+ ss: 'چركه %d',
+ m: 'یهك خولهك',
+ mm: '%d خولهك',
+ h: 'یهك كاتژمێر',
+ hh: '%d كاتژمێر',
+ d: 'یهك ڕۆژ',
+ dd: '%d ڕۆژ',
+ M: 'یهك مانگ',
+ MM: '%d مانگ',
+ y: 'یهك ساڵ',
+ yy: '%d ساڵ',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ky.js b/vendor/assets/javascripts/momentjs/dist/locale/ky.js
new file mode 100644
index 000000000..2108d0906
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ky.js
@@ -0,0 +1,84 @@
+//! moment.js locale configuration
+//! locale : Kyrgyz [ky]
+//! author : Chyngyz Arystan uulu : https://github.com/chyngyz
+
+import moment from '../moment';
+
+var suffixes = {
+ 0: '-чү',
+ 1: '-чи',
+ 2: '-чи',
+ 3: '-чү',
+ 4: '-чү',
+ 5: '-чи',
+ 6: '-чы',
+ 7: '-чи',
+ 8: '-чи',
+ 9: '-чу',
+ 10: '-чу',
+ 20: '-чы',
+ 30: '-чу',
+ 40: '-чы',
+ 50: '-чү',
+ 60: '-чы',
+ 70: '-чи',
+ 80: '-чи',
+ 90: '-чу',
+ 100: '-чү',
+};
+
+export default moment.defineLocale('ky', {
+ months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
+ '_'
+ ),
+ monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
+ '_'
+ ),
+ weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
+ '_'
+ ),
+ weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
+ weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бүгүн саат] LT',
+ nextDay: '[Эртең саат] LT',
+ nextWeek: 'dddd [саат] LT',
+ lastDay: '[Кечээ саат] LT',
+ lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ичинде',
+ past: '%s мурун',
+ s: 'бирнече секунд',
+ ss: '%d секунд',
+ m: 'бир мүнөт',
+ mm: '%d мүнөт',
+ h: 'бир саат',
+ hh: '%d саат',
+ d: 'бир күн',
+ dd: '%d күн',
+ M: 'бир ай',
+ MM: '%d ай',
+ y: 'бир жыл',
+ yy: '%d жыл',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes[number] || suffixes[a] || suffixes[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/lb.js b/vendor/assets/javascripts/momentjs/dist/locale/lb.js
new file mode 100644
index 000000000..f01e66274
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/lb.js
@@ -0,0 +1,137 @@
+//! moment.js locale configuration
+//! locale : Luxembourgish [lb]
+//! author : mweimerskirch : https://github.com/mweimerskirch
+//! author : David Raison : https://github.com/kwisatz
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eng Minutt', 'enger Minutt'],
+ h: ['eng Stonn', 'enger Stonn'],
+ d: ['een Dag', 'engem Dag'],
+ M: ['ee Mount', 'engem Mount'],
+ y: ['ee Joer', 'engem Joer'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+}
+function processFutureTime(string) {
+ var number = string.substr(0, string.indexOf(' '));
+ if (eifelerRegelAppliesToNumber(number)) {
+ return 'a ' + string;
+ }
+ return 'an ' + string;
+}
+function processPastTime(string) {
+ var number = string.substr(0, string.indexOf(' '));
+ if (eifelerRegelAppliesToNumber(number)) {
+ return 'viru ' + string;
+ }
+ return 'virun ' + string;
+}
+/**
+ * Returns true if the word before the given number loses the '-n' ending.
+ * e.g. 'an 10 Deeg' but 'a 5 Deeg'
+ *
+ * @param number {integer}
+ * @returns {boolean}
+ */
+function eifelerRegelAppliesToNumber(number) {
+ number = parseInt(number, 10);
+ if (isNaN(number)) {
+ return false;
+ }
+ if (number < 0) {
+ // Negative Number --> always true
+ return true;
+ } else if (number < 10) {
+ // Only 1 digit
+ if (4 <= number && number <= 7) {
+ return true;
+ }
+ return false;
+ } else if (number < 100) {
+ // 2 digits
+ var lastDigit = number % 10,
+ firstDigit = number / 10;
+ if (lastDigit === 0) {
+ return eifelerRegelAppliesToNumber(firstDigit);
+ }
+ return eifelerRegelAppliesToNumber(lastDigit);
+ } else if (number < 10000) {
+ // 3 or 4 digits --> recursively check first digit
+ while (number >= 10) {
+ number = number / 10;
+ }
+ return eifelerRegelAppliesToNumber(number);
+ } else {
+ // Anything larger than 4 digits: recursively check first n-3 digits
+ number = number / 1000;
+ return eifelerRegelAppliesToNumber(number);
+ }
+}
+
+export default moment.defineLocale('lb', {
+ months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm [Auer]',
+ LTS: 'H:mm:ss [Auer]',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm [Auer]',
+ LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
+ },
+ calendar: {
+ sameDay: '[Haut um] LT',
+ sameElse: 'L',
+ nextDay: '[Muer um] LT',
+ nextWeek: 'dddd [um] LT',
+ lastDay: '[Gëschter um] LT',
+ lastWeek: function () {
+ // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
+ switch (this.day()) {
+ case 2:
+ case 4:
+ return '[Leschten] dddd [um] LT';
+ default:
+ return '[Leschte] dddd [um] LT';
+ }
+ },
+ },
+ relativeTime: {
+ future: processFutureTime,
+ past: processPastTime,
+ s: 'e puer Sekonnen',
+ ss: '%d Sekonnen',
+ m: processRelativeTime,
+ mm: '%d Minutten',
+ h: processRelativeTime,
+ hh: '%d Stonnen',
+ d: processRelativeTime,
+ dd: '%d Deeg',
+ M: processRelativeTime,
+ MM: '%d Méint',
+ y: processRelativeTime,
+ yy: '%d Joer',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/lo.js b/vendor/assets/javascripts/momentjs/dist/locale/lo.js
new file mode 100644
index 000000000..cd6cc2021
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/lo.js
@@ -0,0 +1,66 @@
+//! moment.js locale configuration
+//! locale : Lao [lo]
+//! author : Ryan Hart : https://github.com/ryanhart2
+
+import moment from '../moment';
+
+export default moment.defineLocale('lo', {
+ months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
+ '_'
+ ),
+ weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+ weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+ weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'ວັນdddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
+ isPM: function (input) {
+ return input === 'ຕອນແລງ';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ຕອນເຊົ້າ';
+ } else {
+ return 'ຕອນແລງ';
+ }
+ },
+ calendar: {
+ sameDay: '[ມື້ນີ້ເວລາ] LT',
+ nextDay: '[ມື້ອື່ນເວລາ] LT',
+ nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
+ lastDay: '[ມື້ວານນີ້ເວລາ] LT',
+ lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ອີກ %s',
+ past: '%sຜ່ານມາ',
+ s: 'ບໍ່ເທົ່າໃດວິນາທີ',
+ ss: '%d ວິນາທີ',
+ m: '1 ນາທີ',
+ mm: '%d ນາທີ',
+ h: '1 ຊົ່ວໂມງ',
+ hh: '%d ຊົ່ວໂມງ',
+ d: '1 ມື້',
+ dd: '%d ມື້',
+ M: '1 ເດືອນ',
+ MM: '%d ເດືອນ',
+ y: '1 ປີ',
+ yy: '%d ປີ',
+ },
+ dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
+ ordinal: function (number) {
+ return 'ທີ່' + number;
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/lt.js b/vendor/assets/javascripts/momentjs/dist/locale/lt.js
new file mode 100644
index 000000000..f01126136
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/lt.js
@@ -0,0 +1,125 @@
+//! moment.js locale configuration
+//! locale : Lithuanian [lt]
+//! author : Mindaugas Mozūras : https://github.com/mmozuras
+
+import moment from '../moment';
+
+var units = {
+ ss: 'sekundė_sekundžių_sekundes',
+ m: 'minutė_minutės_minutę',
+ mm: 'minutės_minučių_minutes',
+ h: 'valanda_valandos_valandą',
+ hh: 'valandos_valandų_valandas',
+ d: 'diena_dienos_dieną',
+ dd: 'dienos_dienų_dienas',
+ M: 'mėnuo_mėnesio_mėnesį',
+ MM: 'mėnesiai_mėnesių_mėnesius',
+ y: 'metai_metų_metus',
+ yy: 'metai_metų_metus',
+};
+function translateSeconds(number, withoutSuffix, key, isFuture) {
+ if (withoutSuffix) {
+ return 'kelios sekundės';
+ } else {
+ return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
+ }
+}
+function translateSingular(number, withoutSuffix, key, isFuture) {
+ return withoutSuffix
+ ? forms(key)[0]
+ : isFuture
+ ? forms(key)[1]
+ : forms(key)[2];
+}
+function special(number) {
+ return number % 10 === 0 || (number > 10 && number < 20);
+}
+function forms(key) {
+ return units[key].split('_');
+}
+function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ if (number === 1) {
+ return (
+ result + translateSingular(number, withoutSuffix, key[0], isFuture)
+ );
+ } else if (withoutSuffix) {
+ return result + (special(number) ? forms(key)[1] : forms(key)[0]);
+ } else {
+ if (isFuture) {
+ return result + forms(key)[1];
+ } else {
+ return result + (special(number) ? forms(key)[1] : forms(key)[2]);
+ }
+ }
+}
+export default moment.defineLocale('lt', {
+ months: {
+ format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
+ '_'
+ ),
+ standalone:
+ 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
+ },
+ monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
+ weekdays: {
+ format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
+ '_'
+ ),
+ standalone:
+ 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
+ '_'
+ ),
+ isFormat: /dddd HH:mm/,
+ },
+ weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
+ weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY [m.] MMMM D [d.]',
+ LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
+ l: 'YYYY-MM-DD',
+ ll: 'YYYY [m.] MMMM D [d.]',
+ lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
+ },
+ calendar: {
+ sameDay: '[Šiandien] LT',
+ nextDay: '[Rytoj] LT',
+ nextWeek: 'dddd LT',
+ lastDay: '[Vakar] LT',
+ lastWeek: '[Praėjusį] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'po %s',
+ past: 'prieš %s',
+ s: translateSeconds,
+ ss: translate,
+ m: translateSingular,
+ mm: translate,
+ h: translateSingular,
+ hh: translate,
+ d: translateSingular,
+ dd: translate,
+ M: translateSingular,
+ MM: translate,
+ y: translateSingular,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-oji/,
+ ordinal: function (number) {
+ return number + '-oji';
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/lv.js b/vendor/assets/javascripts/momentjs/dist/locale/lv.js
new file mode 100644
index 000000000..3a8965350
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/lv.js
@@ -0,0 +1,94 @@
+//! moment.js locale configuration
+//! locale : Latvian [lv]
+//! author : Kristaps Karlsons : https://github.com/skakri
+//! author : Jānis Elmeris : https://github.com/JanisE
+
+import moment from '../moment';
+
+var units = {
+ ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
+ m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ h: 'stundas_stundām_stunda_stundas'.split('_'),
+ hh: 'stundas_stundām_stunda_stundas'.split('_'),
+ d: 'dienas_dienām_diena_dienas'.split('_'),
+ dd: 'dienas_dienām_diena_dienas'.split('_'),
+ M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ y: 'gada_gadiem_gads_gadi'.split('_'),
+ yy: 'gada_gadiem_gads_gadi'.split('_'),
+};
+/**
+ * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
+ */
+function format(forms, number, withoutSuffix) {
+ if (withoutSuffix) {
+ // E.g. "21 minūte", "3 minūtes".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
+ } else {
+ // E.g. "21 minūtes" as in "pēc 21 minūtes".
+ // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
+ }
+}
+function relativeTimeWithPlural(number, withoutSuffix, key) {
+ return number + ' ' + format(units[key], number, withoutSuffix);
+}
+function relativeTimeWithSingular(number, withoutSuffix, key) {
+ return format(units[key], number, withoutSuffix);
+}
+function relativeSeconds(number, withoutSuffix) {
+ return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
+}
+
+export default moment.defineLocale('lv', {
+ months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
+ weekdays:
+ 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY.',
+ LL: 'YYYY. [gada] D. MMMM',
+ LLL: 'YYYY. [gada] D. MMMM, HH:mm',
+ LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
+ },
+ calendar: {
+ sameDay: '[Šodien pulksten] LT',
+ nextDay: '[Rīt pulksten] LT',
+ nextWeek: 'dddd [pulksten] LT',
+ lastDay: '[Vakar pulksten] LT',
+ lastWeek: '[Pagājušā] dddd [pulksten] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'pēc %s',
+ past: 'pirms %s',
+ s: relativeSeconds,
+ ss: relativeTimeWithPlural,
+ m: relativeTimeWithSingular,
+ mm: relativeTimeWithPlural,
+ h: relativeTimeWithSingular,
+ hh: relativeTimeWithPlural,
+ d: relativeTimeWithSingular,
+ dd: relativeTimeWithPlural,
+ M: relativeTimeWithSingular,
+ MM: relativeTimeWithPlural,
+ y: relativeTimeWithSingular,
+ yy: relativeTimeWithPlural,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/me.js b/vendor/assets/javascripts/momentjs/dist/locale/me.js
new file mode 100644
index 000000000..c0986df67
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/me.js
@@ -0,0 +1,117 @@
+//! moment.js locale configuration
+//! locale : Montenegrin [me]
+//! author : Miodrag Nikač : https://github.com/miodragnikac
+
+import moment from '../moment';
+
+var translator = {
+ words: {
+ //Different grammatical cases
+ ss: ['sekund', 'sekunda', 'sekundi'],
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ dd: ['dan', 'dana', 'dana'],
+ MM: ['mjesec', 'mjeseca', 'mjeseci'],
+ yy: ['godina', 'godine', 'godina'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ return number === 1
+ ? wordKey[0]
+ : number >= 2 && number <= 4
+ ? wordKey[1]
+ : wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key) {
+ var wordKey = translator.words[key];
+ if (key.length === 1) {
+ return withoutSuffix ? wordKey[0] : wordKey[1];
+ } else {
+ return (
+ number +
+ ' ' +
+ translator.correctGrammaticalCase(number, wordKey)
+ );
+ }
+ },
+};
+
+export default moment.defineLocale('me', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sjutra u] LT',
+
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[juče u] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[prošle] [nedjelje] [u] LT',
+ '[prošlog] [ponedjeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srijede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'nekoliko sekundi',
+ ss: translator.translate,
+ m: translator.translate,
+ mm: translator.translate,
+ h: translator.translate,
+ hh: translator.translate,
+ d: 'dan',
+ dd: translator.translate,
+ M: 'mjesec',
+ MM: translator.translate,
+ y: 'godinu',
+ yy: translator.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/mi.js b/vendor/assets/javascripts/momentjs/dist/locale/mi.js
new file mode 100644
index 000000000..635a56ac2
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/mi.js
@@ -0,0 +1,60 @@
+//! moment.js locale configuration
+//! locale : Maori [mi]
+//! author : John Corrigan : https://github.com/johnideal
+
+import moment from '../moment';
+
+export default moment.defineLocale('mi', {
+ months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
+ '_'
+ ),
+ monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
+ weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
+ weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+ weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [i] HH:mm',
+ LLLL: 'dddd, D MMMM YYYY [i] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i teie mahana, i] LT',
+ nextDay: '[apopo i] LT',
+ nextWeek: 'dddd [i] LT',
+ lastDay: '[inanahi i] LT',
+ lastWeek: 'dddd [whakamutunga i] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'i roto i %s',
+ past: '%s i mua',
+ s: 'te hēkona ruarua',
+ ss: '%d hēkona',
+ m: 'he meneti',
+ mm: '%d meneti',
+ h: 'te haora',
+ hh: '%d haora',
+ d: 'he ra',
+ dd: '%d ra',
+ M: 'he marama',
+ MM: '%d marama',
+ y: 'he tau',
+ yy: '%d tau',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/mk.js b/vendor/assets/javascripts/momentjs/dist/locale/mk.js
new file mode 100644
index 000000000..f3ecad75c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/mk.js
@@ -0,0 +1,85 @@
+//! moment.js locale configuration
+//! locale : Macedonian [mk]
+//! author : Borislav Mickov : https://github.com/B0k0
+//! author : Sashko Todorov : https://github.com/bkyceh
+import moment from '../moment';
+
+export default moment.defineLocale('mk', {
+ months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
+ '_'
+ ),
+ monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
+ '_'
+ ),
+ weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
+ weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Денес во] LT',
+ nextDay: '[Утре во] LT',
+ nextWeek: '[Во] dddd [во] LT',
+ lastDay: '[Вчера во] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 6:
+ return '[Изминатата] dddd [во] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[Изминатиот] dddd [во] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: 'пред %s',
+ s: 'неколку секунди',
+ ss: '%d секунди',
+ m: 'една минута',
+ mm: '%d минути',
+ h: 'еден час',
+ hh: '%d часа',
+ d: 'еден ден',
+ dd: '%d дена',
+ M: 'еден месец',
+ MM: '%d месеци',
+ y: 'една година',
+ yy: '%d години',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+ ordinal: function (number) {
+ var lastDigit = number % 10,
+ last2Digits = number % 100;
+ if (number === 0) {
+ return number + '-ев';
+ } else if (last2Digits === 0) {
+ return number + '-ен';
+ } else if (last2Digits > 10 && last2Digits < 20) {
+ return number + '-ти';
+ } else if (lastDigit === 1) {
+ return number + '-ви';
+ } else if (lastDigit === 2) {
+ return number + '-ри';
+ } else if (lastDigit === 7 || lastDigit === 8) {
+ return number + '-ми';
+ } else {
+ return number + '-ти';
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ml.js b/vendor/assets/javascripts/momentjs/dist/locale/ml.js
new file mode 100644
index 000000000..5df6ae4c9
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ml.js
@@ -0,0 +1,82 @@
+//! moment.js locale configuration
+//! locale : Malayalam [ml]
+//! author : Floyd Pink : https://github.com/floydpink
+
+import moment from '../moment';
+
+export default moment.defineLocale('ml', {
+ months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
+ '_'
+ ),
+ weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
+ weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm -നു',
+ LTS: 'A h:mm:ss -നു',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm -നു',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',
+ },
+ calendar: {
+ sameDay: '[ഇന്ന്] LT',
+ nextDay: '[നാളെ] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ഇന്നലെ] LT',
+ lastWeek: '[കഴിഞ്ഞ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s കഴിഞ്ഞ്',
+ past: '%s മുൻപ്',
+ s: 'അൽപ നിമിഷങ്ങൾ',
+ ss: '%d സെക്കൻഡ്',
+ m: 'ഒരു മിനിറ്റ്',
+ mm: '%d മിനിറ്റ്',
+ h: 'ഒരു മണിക്കൂർ',
+ hh: '%d മണിക്കൂർ',
+ d: 'ഒരു ദിവസം',
+ dd: '%d ദിവസം',
+ M: 'ഒരു മാസം',
+ MM: '%d മാസം',
+ y: 'ഒരു വർഷം',
+ yy: '%d വർഷം',
+ },
+ meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'രാത്രി' && hour >= 4) ||
+ meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
+ meridiem === 'വൈകുന്നേരം'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'രാത്രി';
+ } else if (hour < 12) {
+ return 'രാവിലെ';
+ } else if (hour < 17) {
+ return 'ഉച്ച കഴിഞ്ഞ്';
+ } else if (hour < 20) {
+ return 'വൈകുന്നേരം';
+ } else {
+ return 'രാത്രി';
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/mn.js b/vendor/assets/javascripts/momentjs/dist/locale/mn.js
new file mode 100644
index 000000000..36cf69f29
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/mn.js
@@ -0,0 +1,100 @@
+//! moment.js locale configuration
+//! locale : Mongolian [mn]
+//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
+
+import moment from '../moment';
+
+function translate(number, withoutSuffix, key, isFuture) {
+ switch (key) {
+ case 's':
+ return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
+ case 'ss':
+ return number + (withoutSuffix ? ' секунд' : ' секундын');
+ case 'm':
+ case 'mm':
+ return number + (withoutSuffix ? ' минут' : ' минутын');
+ case 'h':
+ case 'hh':
+ return number + (withoutSuffix ? ' цаг' : ' цагийн');
+ case 'd':
+ case 'dd':
+ return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
+ case 'M':
+ case 'MM':
+ return number + (withoutSuffix ? ' сар' : ' сарын');
+ case 'y':
+ case 'yy':
+ return number + (withoutSuffix ? ' жил' : ' жилийн');
+ default:
+ return number;
+ }
+}
+
+export default moment.defineLocale('mn', {
+ months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
+ '_'
+ ),
+ monthsShort:
+ '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
+ weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
+ weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY оны MMMMын D',
+ LLL: 'YYYY оны MMMMын D HH:mm',
+ LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
+ },
+ meridiemParse: /ҮӨ|ҮХ/i,
+ isPM: function (input) {
+ return input === 'ҮХ';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ҮӨ';
+ } else {
+ return 'ҮХ';
+ }
+ },
+ calendar: {
+ sameDay: '[Өнөөдөр] LT',
+ nextDay: '[Маргааш] LT',
+ nextWeek: '[Ирэх] dddd LT',
+ lastDay: '[Өчигдөр] LT',
+ lastWeek: '[Өнгөрсөн] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s дараа',
+ past: '%s өмнө',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + ' өдөр';
+ default:
+ return number;
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/mr.js b/vendor/assets/javascripts/momentjs/dist/locale/mr.js
new file mode 100644
index 000000000..d174909b3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/mr.js
@@ -0,0 +1,203 @@
+//! moment.js locale configuration
+//! locale : Marathi [mr]
+//! author : Harshad Kale : https://github.com/kalehv
+//! author : Vivek Athalye : https://github.com/vnathalye
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ };
+
+function relativeTimeMr(number, withoutSuffix, string, isFuture) {
+ var output = '';
+ if (withoutSuffix) {
+ switch (string) {
+ case 's':
+ output = 'काही सेकंद';
+ break;
+ case 'ss':
+ output = '%d सेकंद';
+ break;
+ case 'm':
+ output = 'एक मिनिट';
+ break;
+ case 'mm':
+ output = '%d मिनिटे';
+ break;
+ case 'h':
+ output = 'एक तास';
+ break;
+ case 'hh':
+ output = '%d तास';
+ break;
+ case 'd':
+ output = 'एक दिवस';
+ break;
+ case 'dd':
+ output = '%d दिवस';
+ break;
+ case 'M':
+ output = 'एक महिना';
+ break;
+ case 'MM':
+ output = '%d महिने';
+ break;
+ case 'y':
+ output = 'एक वर्ष';
+ break;
+ case 'yy':
+ output = '%d वर्षे';
+ break;
+ }
+ } else {
+ switch (string) {
+ case 's':
+ output = 'काही सेकंदां';
+ break;
+ case 'ss':
+ output = '%d सेकंदां';
+ break;
+ case 'm':
+ output = 'एका मिनिटा';
+ break;
+ case 'mm':
+ output = '%d मिनिटां';
+ break;
+ case 'h':
+ output = 'एका तासा';
+ break;
+ case 'hh':
+ output = '%d तासां';
+ break;
+ case 'd':
+ output = 'एका दिवसा';
+ break;
+ case 'dd':
+ output = '%d दिवसां';
+ break;
+ case 'M':
+ output = 'एका महिन्या';
+ break;
+ case 'MM':
+ output = '%d महिन्यां';
+ break;
+ case 'y':
+ output = 'एका वर्षा';
+ break;
+ case 'yy':
+ output = '%d वर्षां';
+ break;
+ }
+ }
+ return output.replace(/%d/i, number);
+}
+
+export default moment.defineLocale('mr', {
+ months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
+ '_'
+ ),
+ monthsShort:
+ 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm वाजता',
+ LTS: 'A h:mm:ss वाजता',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm वाजता',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',
+ },
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[उद्या] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[काल] LT',
+ lastWeek: '[मागील] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sमध्ये',
+ past: '%sपूर्वी',
+ s: relativeTimeMr,
+ ss: relativeTimeMr,
+ m: relativeTimeMr,
+ mm: relativeTimeMr,
+ h: relativeTimeMr,
+ hh: relativeTimeMr,
+ d: relativeTimeMr,
+ dd: relativeTimeMr,
+ M: relativeTimeMr,
+ MM: relativeTimeMr,
+ y: relativeTimeMr,
+ yy: relativeTimeMr,
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
+ return hour;
+ } else if (
+ meridiem === 'दुपारी' ||
+ meridiem === 'सायंकाळी' ||
+ meridiem === 'रात्री'
+ ) {
+ return hour >= 12 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour >= 0 && hour < 6) {
+ return 'पहाटे';
+ } else if (hour < 12) {
+ return 'सकाळी';
+ } else if (hour < 17) {
+ return 'दुपारी';
+ } else if (hour < 20) {
+ return 'सायंकाळी';
+ } else {
+ return 'रात्री';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ms-my.js b/vendor/assets/javascripts/momentjs/dist/locale/ms-my.js
new file mode 100644
index 000000000..f8adf9885
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ms-my.js
@@ -0,0 +1,76 @@
+//! moment.js locale configuration
+//! locale : Malay [ms-my]
+//! note : DEPRECATED, the correct one is [ms]
+//! author : Weldan Jamili : https://github.com/weldan
+
+import moment from '../moment';
+
+export default moment.defineLocale('ms-my', {
+ months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+ weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+ weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+ weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'tengahari';
+ } else if (hours < 19) {
+ return 'petang';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Esok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kelmarin pukul] LT',
+ lastWeek: 'dddd [lepas pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lepas',
+ s: 'beberapa saat',
+ ss: '%d saat',
+ m: 'seminit',
+ mm: '%d minit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ms.js b/vendor/assets/javascripts/momentjs/dist/locale/ms.js
new file mode 100644
index 000000000..335cc90d5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ms.js
@@ -0,0 +1,75 @@
+//! moment.js locale configuration
+//! locale : Malay [ms]
+//! author : Weldan Jamili : https://github.com/weldan
+
+import moment from '../moment';
+
+export default moment.defineLocale('ms', {
+ months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+ weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+ weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+ weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'tengahari';
+ } else if (hours < 19) {
+ return 'petang';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Esok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kelmarin pukul] LT',
+ lastWeek: 'dddd [lepas pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lepas',
+ s: 'beberapa saat',
+ ss: '%d saat',
+ m: 'seminit',
+ mm: '%d minit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/mt.js b/vendor/assets/javascripts/momentjs/dist/locale/mt.js
new file mode 100644
index 000000000..850cf6a4a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/mt.js
@@ -0,0 +1,56 @@
+//! moment.js locale configuration
+//! locale : Maltese (Malta) [mt]
+//! author : Alessandro Maruccia : https://github.com/alesma
+
+import moment from '../moment';
+
+export default moment.defineLocale('mt', {
+ months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
+ weekdays:
+ 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
+ '_'
+ ),
+ weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
+ weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Illum fil-]LT',
+ nextDay: '[Għada fil-]LT',
+ nextWeek: 'dddd [fil-]LT',
+ lastDay: '[Il-bieraħ fil-]LT',
+ lastWeek: 'dddd [li għadda] [fil-]LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'f’ %s',
+ past: '%s ilu',
+ s: 'ftit sekondi',
+ ss: '%d sekondi',
+ m: 'minuta',
+ mm: '%d minuti',
+ h: 'siegħa',
+ hh: '%d siegħat',
+ d: 'ġurnata',
+ dd: '%d ġranet',
+ M: 'xahar',
+ MM: '%d xhur',
+ y: 'sena',
+ yy: '%d sni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/my.js b/vendor/assets/javascripts/momentjs/dist/locale/my.js
new file mode 100644
index 000000000..034b221ab
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/my.js
@@ -0,0 +1,91 @@
+//! moment.js locale configuration
+//! locale : Burmese [my]
+//! author : Squar team, mysquar.com
+//! author : David Rossellat : https://github.com/gholadr
+//! author : Tin Aung Lin : https://github.com/thanyawzinmin
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '၁',
+ 2: '၂',
+ 3: '၃',
+ 4: '၄',
+ 5: '၅',
+ 6: '၆',
+ 7: '၇',
+ 8: '၈',
+ 9: '၉',
+ 0: '၀',
+ },
+ numberMap = {
+ '၁': '1',
+ '၂': '2',
+ '၃': '3',
+ '၄': '4',
+ '၅': '5',
+ '၆': '6',
+ '၇': '7',
+ '၈': '8',
+ '၉': '9',
+ '၀': '0',
+ };
+
+export default moment.defineLocale('my', {
+ months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
+ '_'
+ ),
+ monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
+ weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
+ '_'
+ ),
+ weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+ weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[ယနေ.] LT [မှာ]',
+ nextDay: '[မနက်ဖြန်] LT [မှာ]',
+ nextWeek: 'dddd LT [မှာ]',
+ lastDay: '[မနေ.က] LT [မှာ]',
+ lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'လာမည့် %s မှာ',
+ past: 'လွန်ခဲ့သော %s က',
+ s: 'စက္ကန်.အနည်းငယ်',
+ ss: '%d စက္ကန့်',
+ m: 'တစ်မိနစ်',
+ mm: '%d မိနစ်',
+ h: 'တစ်နာရီ',
+ hh: '%d နာရီ',
+ d: 'တစ်ရက်',
+ dd: '%d ရက်',
+ M: 'တစ်လ',
+ MM: '%d လ',
+ y: 'တစ်နှစ်',
+ yy: '%d နှစ်',
+ },
+ preparse: function (string) {
+ return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/nb.js b/vendor/assets/javascripts/momentjs/dist/locale/nb.js
new file mode 100644
index 000000000..c218f518f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/nb.js
@@ -0,0 +1,60 @@
+//! moment.js locale configuration
+//! locale : Norwegian Bokmål [nb]
+//! authors : Espen Hovlandsdal : https://github.com/rexxars
+//! Sigurd Gartmann : https://github.com/sigurdga
+//! Stephen Ramthun : https://github.com/stephenramthun
+
+import moment from '../moment';
+
+export default moment.defineLocale('nb', {
+ months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
+ weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] HH:mm',
+ LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i dag kl.] LT',
+ nextDay: '[i morgen kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[i går kl.] LT',
+ lastWeek: '[forrige] dddd [kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s siden',
+ s: 'noen sekunder',
+ ss: '%d sekunder',
+ m: 'ett minutt',
+ mm: '%d minutter',
+ h: 'en time',
+ hh: '%d timer',
+ d: 'en dag',
+ dd: '%d dager',
+ w: 'en uke',
+ ww: '%d uker',
+ M: 'en måned',
+ MM: '%d måneder',
+ y: 'ett år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ne.js b/vendor/assets/javascripts/momentjs/dist/locale/ne.js
new file mode 100644
index 000000000..1f0a0edc3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ne.js
@@ -0,0 +1,121 @@
+//! moment.js locale configuration
+//! locale : Nepalese [ne]
+//! author : suvash : https://github.com/suvash
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ };
+
+export default moment.defineLocale('ne', {
+ months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
+ '_'
+ ),
+ monthsShort:
+ 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
+ '_'
+ ),
+ weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
+ weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'Aको h:mm बजे',
+ LTS: 'Aको h:mm:ss बजे',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, Aको h:mm बजे',
+ LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'राति') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'बिहान') {
+ return hour;
+ } else if (meridiem === 'दिउँसो') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'साँझ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 3) {
+ return 'राति';
+ } else if (hour < 12) {
+ return 'बिहान';
+ } else if (hour < 16) {
+ return 'दिउँसो';
+ } else if (hour < 20) {
+ return 'साँझ';
+ } else {
+ return 'राति';
+ }
+ },
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[भोलि] LT',
+ nextWeek: '[आउँदो] dddd[,] LT',
+ lastDay: '[हिजो] LT',
+ lastWeek: '[गएको] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sमा',
+ past: '%s अगाडि',
+ s: 'केही क्षण',
+ ss: '%d सेकेण्ड',
+ m: 'एक मिनेट',
+ mm: '%d मिनेट',
+ h: 'एक घण्टा',
+ hh: '%d घण्टा',
+ d: 'एक दिन',
+ dd: '%d दिन',
+ M: 'एक महिना',
+ MM: '%d महिना',
+ y: 'एक बर्ष',
+ yy: '%d बर्ष',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/nl-be.js b/vendor/assets/javascripts/momentjs/dist/locale/nl-be.js
new file mode 100644
index 000000000..a1ab29586
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/nl-be.js
@@ -0,0 +1,102 @@
+//! moment.js locale configuration
+//! locale : Dutch (Belgium) [nl-be]
+//! author : Joris Röling : https://github.com/jorisroling
+//! author : Jacob Middag : https://github.com/middagj
+
+import moment from '../moment';
+
+var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ monthsParse = [
+ /^jan/i,
+ /^feb/i,
+ /^maart|mrt.?$/i,
+ /^apr/i,
+ /^mei$/i,
+ /^jun[i.]?$/i,
+ /^jul[i.]?$/i,
+ /^aug/i,
+ /^sep/i,
+ /^okt/i,
+ /^nov/i,
+ /^dec/i,
+ ],
+ monthsRegex =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+export default moment.defineLocale('nl-be', {
+ months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots[m.month()];
+ } else {
+ return monthsShortWithDots[m.month()];
+ }
+ },
+
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+ weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+ weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[vandaag om] LT',
+ nextDay: '[morgen om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[gisteren om] LT',
+ lastWeek: '[afgelopen] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'over %s',
+ past: '%s geleden',
+ s: 'een paar seconden',
+ ss: '%d seconden',
+ m: 'één minuut',
+ mm: '%d minuten',
+ h: 'één uur',
+ hh: '%d uur',
+ d: 'één dag',
+ dd: '%d dagen',
+ M: 'één maand',
+ MM: '%d maanden',
+ y: 'één jaar',
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/nl.js b/vendor/assets/javascripts/momentjs/dist/locale/nl.js
new file mode 100644
index 000000000..7d0711261
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/nl.js
@@ -0,0 +1,104 @@
+//! moment.js locale configuration
+//! locale : Dutch [nl]
+//! author : Joris Röling : https://github.com/jorisroling
+//! author : Jacob Middag : https://github.com/middagj
+
+import moment from '../moment';
+
+var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ monthsParse = [
+ /^jan/i,
+ /^feb/i,
+ /^maart|mrt.?$/i,
+ /^apr/i,
+ /^mei$/i,
+ /^jun[i.]?$/i,
+ /^jul[i.]?$/i,
+ /^aug/i,
+ /^sep/i,
+ /^okt/i,
+ /^nov/i,
+ /^dec/i,
+ ],
+ monthsRegex =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+export default moment.defineLocale('nl', {
+ months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots[m.month()];
+ } else {
+ return monthsShortWithDots[m.month()];
+ }
+ },
+
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+ weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+ weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[vandaag om] LT',
+ nextDay: '[morgen om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[gisteren om] LT',
+ lastWeek: '[afgelopen] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'over %s',
+ past: '%s geleden',
+ s: 'een paar seconden',
+ ss: '%d seconden',
+ m: 'één minuut',
+ mm: '%d minuten',
+ h: 'één uur',
+ hh: '%d uur',
+ d: 'één dag',
+ dd: '%d dagen',
+ w: 'één week',
+ ww: '%d weken',
+ M: 'één maand',
+ MM: '%d maanden',
+ y: 'één jaar',
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/nn.js b/vendor/assets/javascripts/momentjs/dist/locale/nn.js
new file mode 100644
index 000000000..0da11504d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/nn.js
@@ -0,0 +1,59 @@
+//! moment.js locale configuration
+//! locale : Nynorsk [nn]
+//! authors : https://github.com/mechuwind
+//! Stephen Ramthun : https://github.com/stephenramthun
+
+import moment from '../moment';
+
+export default moment.defineLocale('nn', {
+ months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
+ weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
+ weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] H:mm',
+ LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[I dag klokka] LT',
+ nextDay: '[I morgon klokka] LT',
+ nextWeek: 'dddd [klokka] LT',
+ lastDay: '[I går klokka] LT',
+ lastWeek: '[Føregåande] dddd [klokka] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s sidan',
+ s: 'nokre sekund',
+ ss: '%d sekund',
+ m: 'eit minutt',
+ mm: '%d minutt',
+ h: 'ein time',
+ hh: '%d timar',
+ d: 'ein dag',
+ dd: '%d dagar',
+ w: 'ei veke',
+ ww: '%d veker',
+ M: 'ein månad',
+ MM: '%d månader',
+ y: 'eit år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/oc-lnc.js b/vendor/assets/javascripts/momentjs/dist/locale/oc-lnc.js
new file mode 100644
index 000000000..cc055613a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/oc-lnc.js
@@ -0,0 +1,85 @@
+//! moment.js locale configuration
+//! locale : Occitan, lengadocian dialecte [oc-lnc]
+//! author : Quentin PAGÈS : https://github.com/Quenty31
+
+import moment from '../moment';
+
+export default moment.defineLocale('oc-lnc', {
+ months: {
+ standalone:
+ 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
+ '_'
+ ),
+ format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\s)+MMMM/,
+ },
+ monthsShort:
+ 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
+ '_'
+ ),
+ weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
+ weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [de] YYYY',
+ ll: 'D MMM YYYY',
+ LLL: 'D MMMM [de] YYYY [a] H:mm',
+ lll: 'D MMM YYYY, H:mm',
+ LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
+ llll: 'ddd D MMM YYYY, H:mm',
+ },
+ calendar: {
+ sameDay: '[uèi a] LT',
+ nextDay: '[deman a] LT',
+ nextWeek: 'dddd [a] LT',
+ lastDay: '[ièr a] LT',
+ lastWeek: 'dddd [passat a] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: "d'aquí %s",
+ past: 'fa %s',
+ s: 'unas segondas',
+ ss: '%d segondas',
+ m: 'una minuta',
+ mm: '%d minutas',
+ h: 'una ora',
+ hh: '%d oras',
+ d: 'un jorn',
+ dd: '%d jorns',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
+ ordinal: function (number, period) {
+ var output =
+ number === 1
+ ? 'r'
+ : number === 2
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
+ if (period === 'w' || period === 'W') {
+ output = 'a';
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4,
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/pa-in.js b/vendor/assets/javascripts/momentjs/dist/locale/pa-in.js
new file mode 100644
index 000000000..e39dbd58c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/pa-in.js
@@ -0,0 +1,122 @@
+//! moment.js locale configuration
+//! locale : Punjabi (India) [pa-in]
+//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '੧',
+ 2: '੨',
+ 3: '੩',
+ 4: '੪',
+ 5: '੫',
+ 6: '੬',
+ 7: '੭',
+ 8: '੮',
+ 9: '੯',
+ 0: '੦',
+ },
+ numberMap = {
+ '੧': '1',
+ '੨': '2',
+ '੩': '3',
+ '੪': '4',
+ '੫': '5',
+ '੬': '6',
+ '੭': '7',
+ '੮': '8',
+ '੯': '9',
+ '੦': '0',
+ };
+
+export default moment.defineLocale('pa-in', {
+ // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
+ months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
+ '_'
+ ),
+ weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
+ '_'
+ ),
+ weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+ weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm ਵਜੇ',
+ LTS: 'A h:mm:ss ਵਜੇ',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
+ },
+ calendar: {
+ sameDay: '[ਅਜ] LT',
+ nextDay: '[ਕਲ] LT',
+ nextWeek: '[ਅਗਲਾ] dddd, LT',
+ lastDay: '[ਕਲ] LT',
+ lastWeek: '[ਪਿਛਲੇ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ਵਿੱਚ',
+ past: '%s ਪਿਛਲੇ',
+ s: 'ਕੁਝ ਸਕਿੰਟ',
+ ss: '%d ਸਕਿੰਟ',
+ m: 'ਇਕ ਮਿੰਟ',
+ mm: '%d ਮਿੰਟ',
+ h: 'ਇੱਕ ਘੰਟਾ',
+ hh: '%d ਘੰਟੇ',
+ d: 'ਇੱਕ ਦਿਨ',
+ dd: '%d ਦਿਨ',
+ M: 'ਇੱਕ ਮਹੀਨਾ',
+ MM: '%d ਮਹੀਨੇ',
+ y: 'ਇੱਕ ਸਾਲ',
+ yy: '%d ਸਾਲ',
+ },
+ preparse: function (string) {
+ return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
+ meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ਰਾਤ') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ਸਵੇਰ') {
+ return hour;
+ } else if (meridiem === 'ਦੁਪਹਿਰ') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'ਸ਼ਾਮ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ਰਾਤ';
+ } else if (hour < 10) {
+ return 'ਸਵੇਰ';
+ } else if (hour < 17) {
+ return 'ਦੁਪਹਿਰ';
+ } else if (hour < 20) {
+ return 'ਸ਼ਾਮ';
+ } else {
+ return 'ਰਾਤ';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/pl.js b/vendor/assets/javascripts/momentjs/dist/locale/pl.js
new file mode 100644
index 000000000..0608c0db1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/pl.js
@@ -0,0 +1,140 @@
+//! moment.js locale configuration
+//! locale : Polish [pl]
+//! author : Rafal Hirsz : https://github.com/evoL
+
+import moment from '../moment';
+
+var monthsNominative =
+ 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
+ '_'
+ ),
+ monthsSubjective =
+ 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
+ '_'
+ ),
+ monthsParse = [
+ /^sty/i,
+ /^lut/i,
+ /^mar/i,
+ /^kwi/i,
+ /^maj/i,
+ /^cze/i,
+ /^lip/i,
+ /^sie/i,
+ /^wrz/i,
+ /^paź/i,
+ /^lis/i,
+ /^gru/i,
+ ];
+function plural(n) {
+ return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
+}
+function translate(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ return result + (plural(number) ? 'sekundy' : 'sekund');
+ case 'm':
+ return withoutSuffix ? 'minuta' : 'minutę';
+ case 'mm':
+ return result + (plural(number) ? 'minuty' : 'minut');
+ case 'h':
+ return withoutSuffix ? 'godzina' : 'godzinę';
+ case 'hh':
+ return result + (plural(number) ? 'godziny' : 'godzin');
+ case 'ww':
+ return result + (plural(number) ? 'tygodnie' : 'tygodni');
+ case 'MM':
+ return result + (plural(number) ? 'miesiące' : 'miesięcy');
+ case 'yy':
+ return result + (plural(number) ? 'lata' : 'lat');
+ }
+}
+
+export default moment.defineLocale('pl', {
+ months: function (momentToFormat, format) {
+ if (!momentToFormat) {
+ return monthsNominative;
+ } else if (/D MMMM/.test(format)) {
+ return monthsSubjective[momentToFormat.month()];
+ } else {
+ return monthsNominative[momentToFormat.month()];
+ }
+ },
+ monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays:
+ 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
+ weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
+ weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Dziś o] LT',
+ nextDay: '[Jutro o] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[W niedzielę o] LT';
+
+ case 2:
+ return '[We wtorek o] LT';
+
+ case 3:
+ return '[W środę o] LT';
+
+ case 6:
+ return '[W sobotę o] LT';
+
+ default:
+ return '[W] dddd [o] LT';
+ }
+ },
+ lastDay: '[Wczoraj o] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[W zeszłą niedzielę o] LT';
+ case 3:
+ return '[W zeszłą środę o] LT';
+ case 6:
+ return '[W zeszłą sobotę o] LT';
+ default:
+ return '[W zeszły] dddd [o] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: '%s temu',
+ s: 'kilka sekund',
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: '1 dzień',
+ dd: '%d dni',
+ w: 'tydzień',
+ ww: translate,
+ M: 'miesiąc',
+ MM: translate,
+ y: 'rok',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/pt-br.js b/vendor/assets/javascripts/momentjs/dist/locale/pt-br.js
new file mode 100644
index 000000000..eb9aa64ac
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/pt-br.js
@@ -0,0 +1,58 @@
+//! moment.js locale configuration
+//! locale : Portuguese (Brazil) [pt-br]
+//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
+
+import moment from '../moment';
+
+export default moment.defineLocale('pt-br', {
+ months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
+ weekdays:
+ 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
+ weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hoje às] LT',
+ nextDay: '[Amanhã às] LT',
+ nextWeek: 'dddd [às] LT',
+ lastDay: '[Ontem às] LT',
+ lastWeek: function () {
+ return this.day() === 0 || this.day() === 6
+ ? '[Último] dddd [às] LT' // Saturday + Sunday
+ : '[Última] dddd [às] LT'; // Monday - Friday
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'em %s',
+ past: 'há %s',
+ s: 'poucos segundos',
+ ss: '%d segundos',
+ m: 'um minuto',
+ mm: '%d minutos',
+ h: 'uma hora',
+ hh: '%d horas',
+ d: 'um dia',
+ dd: '%d dias',
+ M: 'um mês',
+ MM: '%d meses',
+ y: 'um ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ invalidDate: 'Data inválida',
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/pt.js b/vendor/assets/javascripts/momentjs/dist/locale/pt.js
new file mode 100644
index 000000000..d9b605575
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/pt.js
@@ -0,0 +1,63 @@
+//! moment.js locale configuration
+//! locale : Portuguese [pt]
+//! author : Jefferson : https://github.com/jalex79
+
+import moment from '../moment';
+
+export default moment.defineLocale('pt', {
+ months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
+ weekdays:
+ 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
+ weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY HH:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hoje às] LT',
+ nextDay: '[Amanhã às] LT',
+ nextWeek: 'dddd [às] LT',
+ lastDay: '[Ontem às] LT',
+ lastWeek: function () {
+ return this.day() === 0 || this.day() === 6
+ ? '[Último] dddd [às] LT' // Saturday + Sunday
+ : '[Última] dddd [às] LT'; // Monday - Friday
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'em %s',
+ past: 'há %s',
+ s: 'segundos',
+ ss: '%d segundos',
+ m: 'um minuto',
+ mm: '%d minutos',
+ h: 'uma hora',
+ hh: '%d horas',
+ d: 'um dia',
+ dd: '%d dias',
+ w: 'uma semana',
+ ww: '%d semanas',
+ M: 'um mês',
+ MM: '%d meses',
+ y: 'um ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ro.js b/vendor/assets/javascripts/momentjs/dist/locale/ro.js
new file mode 100644
index 000000000..d5bc5ea76
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ro.js
@@ -0,0 +1,76 @@
+//! moment.js locale configuration
+//! locale : Romanian [ro]
+//! author : Vlad Gurdiga : https://github.com/gurdiga
+//! author : Valentin Agachi : https://github.com/avaly
+//! author : Emanuel Cepoi : https://github.com/cepem
+
+import moment from '../moment';
+
+function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: 'secunde',
+ mm: 'minute',
+ hh: 'ore',
+ dd: 'zile',
+ ww: 'săptămâni',
+ MM: 'luni',
+ yy: 'ani',
+ },
+ separator = ' ';
+ if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
+ separator = ' de ';
+ }
+ return number + separator + format[key];
+}
+
+export default moment.defineLocale('ro', {
+ months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
+ weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
+ weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[azi la] LT',
+ nextDay: '[mâine la] LT',
+ nextWeek: 'dddd [la] LT',
+ lastDay: '[ieri la] LT',
+ lastWeek: '[fosta] dddd [la] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'peste %s',
+ past: '%s în urmă',
+ s: 'câteva secunde',
+ ss: relativeTimeWithPlural,
+ m: 'un minut',
+ mm: relativeTimeWithPlural,
+ h: 'o oră',
+ hh: relativeTimeWithPlural,
+ d: 'o zi',
+ dd: relativeTimeWithPlural,
+ w: 'o săptămână',
+ ww: relativeTimeWithPlural,
+ M: 'o lună',
+ MM: relativeTimeWithPlural,
+ y: 'un an',
+ yy: relativeTimeWithPlural,
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ru.js b/vendor/assets/javascripts/momentjs/dist/locale/ru.js
new file mode 100644
index 000000000..9f17e18ea
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ru.js
@@ -0,0 +1,213 @@
+//! moment.js locale configuration
+//! locale : Russian [ru]
+//! author : Viktorminator : https://github.com/Viktorminator
+//! author : Menelion Elensúle : https://github.com/Oire
+//! author : Коренберг Марк : https://github.com/socketpair
+
+import moment from '../moment';
+
+function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+}
+function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
+ mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
+ hh: 'час_часа_часов',
+ dd: 'день_дня_дней',
+ ww: 'неделя_недели_недель',
+ MM: 'месяц_месяца_месяцев',
+ yy: 'год_года_лет',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'минута' : 'минуту';
+ } else {
+ return number + ' ' + plural(format[key], +number);
+ }
+}
+var monthsParse = [
+ /^янв/i,
+ /^фев/i,
+ /^мар/i,
+ /^апр/i,
+ /^ма[йя]/i,
+ /^июн/i,
+ /^июл/i,
+ /^авг/i,
+ /^сен/i,
+ /^окт/i,
+ /^ноя/i,
+ /^дек/i,
+];
+
+// http://new.gramota.ru/spravka/rules/139-prop : § 103
+// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
+// CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
+export default moment.defineLocale('ru', {
+ months: {
+ format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
+ '_'
+ ),
+ standalone:
+ 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
+ '_'
+ ),
+ },
+ monthsShort: {
+ // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
+ format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
+ '_'
+ ),
+ standalone:
+ 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
+ '_'
+ ),
+ },
+ weekdays: {
+ standalone:
+ 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
+ '_'
+ ),
+ format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
+ '_'
+ ),
+ isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
+ },
+ weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
+ monthsRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+ // копия предыдущего
+ monthsShortRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+ // полные названия с падежами
+ monthsStrictRegex:
+ /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
+
+ // Выражение, которое соответствует только сокращённым формам
+ monthsShortStrictRegex:
+ /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY г.',
+ LLL: 'D MMMM YYYY г., H:mm',
+ LLLL: 'dddd, D MMMM YYYY г., H:mm',
+ },
+ calendar: {
+ sameDay: '[Сегодня, в] LT',
+ nextDay: '[Завтра, в] LT',
+ lastDay: '[Вчера, в] LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В следующее] dddd, [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В следующий] dddd, [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В следующую] dddd, [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd, [в] LT';
+ } else {
+ return '[В] dddd, [в] LT';
+ }
+ }
+ },
+ lastWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В прошлое] dddd, [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В прошлый] dddd, [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В прошлую] dddd, [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd, [в] LT';
+ } else {
+ return '[В] dddd, [в] LT';
+ }
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'через %s',
+ past: '%s назад',
+ s: 'несколько секунд',
+ ss: relativeTimeWithPlural,
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: 'час',
+ hh: relativeTimeWithPlural,
+ d: 'день',
+ dd: relativeTimeWithPlural,
+ w: 'неделя',
+ ww: relativeTimeWithPlural,
+ M: 'месяц',
+ MM: relativeTimeWithPlural,
+ y: 'год',
+ yy: relativeTimeWithPlural,
+ },
+ meridiemParse: /ночи|утра|дня|вечера/i,
+ isPM: function (input) {
+ return /^(дня|вечера)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночи';
+ } else if (hour < 12) {
+ return 'утра';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечера';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ case 'w':
+ case 'W':
+ return number + '-я';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/sd.js b/vendor/assets/javascripts/momentjs/dist/locale/sd.js
new file mode 100644
index 000000000..20f10590a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/sd.js
@@ -0,0 +1,81 @@
+//! moment.js locale configuration
+//! locale : Sindhi [sd]
+//! author : Narain Sagar : https://github.com/narainsagar
+
+import moment from '../moment';
+
+var months = [
+ 'جنوري',
+ 'فيبروري',
+ 'مارچ',
+ 'اپريل',
+ 'مئي',
+ 'جون',
+ 'جولاءِ',
+ 'آگسٽ',
+ 'سيپٽمبر',
+ 'آڪٽوبر',
+ 'نومبر',
+ 'ڊسمبر',
+ ],
+ days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
+
+export default moment.defineLocale('sd', {
+ months: months,
+ monthsShort: months,
+ weekdays: days,
+ weekdaysShort: days,
+ weekdaysMin: days,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd، D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /صبح|شام/,
+ isPM: function (input) {
+ return 'شام' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'صبح';
+ }
+ return 'شام';
+ },
+ calendar: {
+ sameDay: '[اڄ] LT',
+ nextDay: '[سڀاڻي] LT',
+ nextWeek: 'dddd [اڳين هفتي تي] LT',
+ lastDay: '[ڪالهه] LT',
+ lastWeek: '[گزريل هفتي] dddd [تي] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s پوء',
+ past: '%s اڳ',
+ s: 'چند سيڪنڊ',
+ ss: '%d سيڪنڊ',
+ m: 'هڪ منٽ',
+ mm: '%d منٽ',
+ h: 'هڪ ڪلاڪ',
+ hh: '%d ڪلاڪ',
+ d: 'هڪ ڏينهن',
+ dd: '%d ڏينهن',
+ M: 'هڪ مهينو',
+ MM: '%d مهينا',
+ y: 'هڪ سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/se.js b/vendor/assets/javascripts/momentjs/dist/locale/se.js
new file mode 100644
index 000000000..e8eec580b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/se.js
@@ -0,0 +1,57 @@
+//! moment.js locale configuration
+//! locale : Northern Sami [se]
+//! authors : Bård Rolstad Henriksen : https://github.com/karamell
+
+import moment from '../moment';
+
+export default moment.defineLocale('se', {
+ months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
+ weekdays:
+ 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
+ '_'
+ ),
+ weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
+ weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'MMMM D. [b.] YYYY',
+ LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
+ LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[otne ti] LT',
+ nextDay: '[ihttin ti] LT',
+ nextWeek: 'dddd [ti] LT',
+ lastDay: '[ikte ti] LT',
+ lastWeek: '[ovddit] dddd [ti] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s geažes',
+ past: 'maŋit %s',
+ s: 'moadde sekunddat',
+ ss: '%d sekunddat',
+ m: 'okta minuhta',
+ mm: '%d minuhtat',
+ h: 'okta diimmu',
+ hh: '%d diimmut',
+ d: 'okta beaivi',
+ dd: '%d beaivvit',
+ M: 'okta mánnu',
+ MM: '%d mánut',
+ y: 'okta jahki',
+ yy: '%d jagit',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/si.js b/vendor/assets/javascripts/momentjs/dist/locale/si.js
new file mode 100644
index 000000000..0f2498ca0
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/si.js
@@ -0,0 +1,69 @@
+//! moment.js locale configuration
+//! locale : Sinhalese [si]
+//! author : Sampath Sitinamaluwa : https://github.com/sampathsris
+
+import moment from '../moment';
+
+/*jshint -W100*/
+export default moment.defineLocale('si', {
+ months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
+ '_'
+ ),
+ monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
+ '_'
+ ),
+ weekdays:
+ 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
+ '_'
+ ),
+ weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),
+ weekdaysMin: 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'a h:mm',
+ LTS: 'a h:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY MMMM D',
+ LLL: 'YYYY MMMM D, a h:mm',
+ LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',
+ },
+ calendar: {
+ sameDay: '[අද] LT[ට]',
+ nextDay: '[හෙට] LT[ට]',
+ nextWeek: 'dddd LT[ට]',
+ lastDay: '[ඊයේ] LT[ට]',
+ lastWeek: '[පසුගිය] dddd LT[ට]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sකින්',
+ past: '%sකට පෙර',
+ s: 'තත්පර කිහිපය',
+ ss: 'තත්පර %d',
+ m: 'මිනිත්තුව',
+ mm: 'මිනිත්තු %d',
+ h: 'පැය',
+ hh: 'පැය %d',
+ d: 'දිනය',
+ dd: 'දින %d',
+ M: 'මාසය',
+ MM: 'මාස %d',
+ y: 'වසර',
+ yy: 'වසර %d',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
+ ordinal: function (number) {
+ return number + ' වැනි';
+ },
+ meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
+ isPM: function (input) {
+ return input === 'ප.ව.' || input === 'පස් වරු';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'ප.ව.' : 'පස් වරු';
+ } else {
+ return isLower ? 'පෙ.ව.' : 'පෙර වරු';
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/sk.js b/vendor/assets/javascripts/momentjs/dist/locale/sk.js
new file mode 100644
index 000000000..7162ed677
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/sk.js
@@ -0,0 +1,145 @@
+//! moment.js locale configuration
+//! locale : Slovak [sk]
+//! author : Martin Minka : https://github.com/k2s
+//! based on work of petrbela : https://github.com/petrbela
+
+import moment from '../moment';
+
+var months =
+ 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
+ '_'
+ ),
+ monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
+function plural(n) {
+ return n > 1 && n < 5;
+}
+function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
+ case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'sekundy' : 'sekúnd');
+ } else {
+ return result + 'sekundami';
+ }
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'minúty' : 'minút');
+ } else {
+ return result + 'minútami';
+ }
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'hodiny' : 'hodín');
+ } else {
+ return result + 'hodinami';
+ }
+ case 'd': // a day / in a day / a day ago
+ return withoutSuffix || isFuture ? 'deň' : 'dňom';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'dni' : 'dní');
+ } else {
+ return result + 'dňami';
+ }
+ case 'M': // a month / in a month / a month ago
+ return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'mesiace' : 'mesiacov');
+ } else {
+ return result + 'mesiacmi';
+ }
+ case 'y': // a year / in a year / a year ago
+ return withoutSuffix || isFuture ? 'rok' : 'rokom';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'roky' : 'rokov');
+ } else {
+ return result + 'rokmi';
+ }
+ }
+}
+
+export default moment.defineLocale('sk', {
+ months: months,
+ monthsShort: monthsShort,
+ weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
+ weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
+ weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[dnes o] LT',
+ nextDay: '[zajtra o] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [o] LT';
+ case 3:
+ return '[v stredu o] LT';
+ case 4:
+ return '[vo štvrtok o] LT';
+ case 5:
+ return '[v piatok o] LT';
+ case 6:
+ return '[v sobotu o] LT';
+ }
+ },
+ lastDay: '[včera o] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[minulú nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[minulý] dddd [o] LT';
+ case 3:
+ return '[minulú stredu o] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [o] LT';
+ case 6:
+ return '[minulú sobotu o] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'pred %s',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/sl.js b/vendor/assets/javascripts/momentjs/dist/locale/sl.js
new file mode 100644
index 000000000..0290a8ec7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/sl.js
@@ -0,0 +1,171 @@
+//! moment.js locale configuration
+//! locale : Slovenian [sl]
+//! author : Robert Sedovšek : https://github.com/sedovsek
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's':
+ return withoutSuffix || isFuture
+ ? 'nekaj sekund'
+ : 'nekaj sekundami';
+ case 'ss':
+ if (number === 1) {
+ result += withoutSuffix ? 'sekundo' : 'sekundi';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
+ } else {
+ result += 'sekund';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'ena minuta' : 'eno minuto';
+ case 'mm':
+ if (number === 1) {
+ result += withoutSuffix ? 'minuta' : 'minuto';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'minute' : 'minutami';
+ } else {
+ result += withoutSuffix || isFuture ? 'minut' : 'minutami';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'ena ura' : 'eno uro';
+ case 'hh':
+ if (number === 1) {
+ result += withoutSuffix ? 'ura' : 'uro';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'uri' : 'urama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'ure' : 'urami';
+ } else {
+ result += withoutSuffix || isFuture ? 'ur' : 'urami';
+ }
+ return result;
+ case 'd':
+ return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
+ case 'dd':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'dan' : 'dnem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
+ } else {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
+ }
+ return result;
+ case 'M':
+ return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
+ case 'MM':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
+ } else {
+ result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
+ }
+ return result;
+ case 'y':
+ return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
+ case 'yy':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'leto' : 'letom';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'leti' : 'letoma';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'leta' : 'leti';
+ } else {
+ result += withoutSuffix || isFuture ? 'let' : 'leti';
+ }
+ return result;
+ }
+}
+
+export default moment.defineLocale('sl', {
+ months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
+ weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
+ weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD. MM. YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danes ob] LT',
+ nextDay: '[jutri ob] LT',
+
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v] [nedeljo] [ob] LT';
+ case 3:
+ return '[v] [sredo] [ob] LT';
+ case 6:
+ return '[v] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[v] dddd [ob] LT';
+ }
+ },
+ lastDay: '[včeraj ob] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[prejšnjo] [nedeljo] [ob] LT';
+ case 3:
+ return '[prejšnjo] [sredo] [ob] LT';
+ case 6:
+ return '[prejšnjo] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prejšnji] dddd [ob] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'čez %s',
+ past: 'pred %s',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/sq.js b/vendor/assets/javascripts/momentjs/dist/locale/sq.js
new file mode 100644
index 000000000..3b3bcfa9f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/sq.js
@@ -0,0 +1,65 @@
+//! moment.js locale configuration
+//! locale : Albanian [sq]
+//! author : Flakërim Ismani : https://github.com/flakerimi
+//! author : Menelion Elensúle : https://github.com/Oire
+//! author : Oerd Cukalla : https://github.com/oerd
+
+import moment from '../moment';
+
+export default moment.defineLocale('sq', {
+ months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
+ weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
+ '_'
+ ),
+ weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
+ weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
+ weekdaysParseExact: true,
+ meridiemParse: /PD|MD/,
+ isPM: function (input) {
+ return input.charAt(0) === 'M';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ return hours < 12 ? 'PD' : 'MD';
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Sot në] LT',
+ nextDay: '[Nesër në] LT',
+ nextWeek: 'dddd [në] LT',
+ lastDay: '[Dje në] LT',
+ lastWeek: 'dddd [e kaluar në] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'në %s',
+ past: '%s më parë',
+ s: 'disa sekonda',
+ ss: '%d sekonda',
+ m: 'një minutë',
+ mm: '%d minuta',
+ h: 'një orë',
+ hh: '%d orë',
+ d: 'një ditë',
+ dd: '%d ditë',
+ M: 'një muaj',
+ MM: '%d muaj',
+ y: 'një vit',
+ yy: '%d vite',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/sr-cyrl.js b/vendor/assets/javascripts/momentjs/dist/locale/sr-cyrl.js
new file mode 100644
index 000000000..5e0581014
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/sr-cyrl.js
@@ -0,0 +1,127 @@
+//! moment.js locale configuration
+//! locale : Serbian Cyrillic [sr-cyrl]
+//! author : Milan Janačković : https://github.com/milan-j
+//! author : Stefan Crnjaković : https://github.com/crnjakovic
+
+import moment from '../moment';
+
+var translator = {
+ words: {
+ //Different grammatical cases
+ ss: ['секунда', 'секунде', 'секунди'],
+ m: ['један минут', 'једног минута'],
+ mm: ['минут', 'минута', 'минута'],
+ h: ['један сат', 'једног сата'],
+ hh: ['сат', 'сата', 'сати'],
+ d: ['један дан', 'једног дана'],
+ dd: ['дан', 'дана', 'дана'],
+ M: ['један месец', 'једног месеца'],
+ MM: ['месец', 'месеца', 'месеци'],
+ y: ['једну годину', 'једне године'],
+ yy: ['годину', 'године', 'година'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator.words[key],
+ word;
+
+ if (key.length === 1) {
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'једна година';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'годину') {
+ return number + ' година';
+ }
+
+ return number + ' ' + word;
+ },
+};
+
+export default moment.defineLocale('sr-cyrl', {
+ months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
+ '_'
+ ),
+ monthsShort:
+ 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
+ weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
+ weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
+ },
+ calendar: {
+ sameDay: '[данас у] LT',
+ nextDay: '[сутра у] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[у] [недељу] [у] LT';
+ case 3:
+ return '[у] [среду] [у] LT';
+ case 6:
+ return '[у] [суботу] [у] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[у] dddd [у] LT';
+ }
+ },
+ lastDay: '[јуче у] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[прошле] [недеље] [у] LT',
+ '[прошлог] [понедељка] [у] LT',
+ '[прошлог] [уторка] [у] LT',
+ '[прошле] [среде] [у] LT',
+ '[прошлог] [четвртка] [у] LT',
+ '[прошлог] [петка] [у] LT',
+ '[прошле] [суботе] [у] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: 'пре %s',
+ s: 'неколико секунди',
+ ss: translator.translate,
+ m: translator.translate,
+ mm: translator.translate,
+ h: translator.translate,
+ hh: translator.translate,
+ d: translator.translate,
+ dd: translator.translate,
+ M: translator.translate,
+ MM: translator.translate,
+ y: translator.translate,
+ yy: translator.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/sr.js b/vendor/assets/javascripts/momentjs/dist/locale/sr.js
new file mode 100644
index 000000000..a407ec761
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/sr.js
@@ -0,0 +1,129 @@
+//! moment.js locale configuration
+//! locale : Serbian [sr]
+//! author : Milan Janačković : https://github.com/milan-j
+//! author : Stefan Crnjaković : https://github.com/crnjakovic
+
+import moment from '../moment';
+
+var translator = {
+ words: {
+ //Different grammatical cases
+ ss: ['sekunda', 'sekunde', 'sekundi'],
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ d: ['jedan dan', 'jednog dana'],
+ dd: ['dan', 'dana', 'dana'],
+ M: ['jedan mesec', 'jednog meseca'],
+ MM: ['mesec', 'meseca', 'meseci'],
+ y: ['jednu godinu', 'jedne godine'],
+ yy: ['godinu', 'godine', 'godina'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator.words[key],
+ word;
+
+ if (key.length === 1) {
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'jedna godina';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'godinu') {
+ return number + ' godina';
+ }
+
+ return number + ' ' + word;
+ },
+};
+
+export default moment.defineLocale('sr', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedelju] [u] LT';
+ case 3:
+ return '[u] [sredu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[juče u] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[prošle] [nedelje] [u] LT',
+ '[prošlog] [ponedeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'pre %s',
+ s: 'nekoliko sekundi',
+ ss: translator.translate,
+ m: translator.translate,
+ mm: translator.translate,
+ h: translator.translate,
+ hh: translator.translate,
+ d: translator.translate,
+ dd: translator.translate,
+ M: translator.translate,
+ MM: translator.translate,
+ y: translator.translate,
+ yy: translator.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ss.js b/vendor/assets/javascripts/momentjs/dist/locale/ss.js
new file mode 100644
index 000000000..60db499eb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ss.js
@@ -0,0 +1,84 @@
+//! moment.js locale configuration
+//! locale : siSwati [ss]
+//! author : Nicolai Davies : https://github.com/nicolaidavies
+
+import moment from '../moment';
+
+export default moment.defineLocale('ss', {
+ months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
+ '_'
+ ),
+ monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
+ weekdays:
+ 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
+ weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Namuhla nga] LT',
+ nextDay: '[Kusasa nga] LT',
+ nextWeek: 'dddd [nga] LT',
+ lastDay: '[Itolo nga] LT',
+ lastWeek: 'dddd [leliphelile] [nga] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'nga %s',
+ past: 'wenteka nga %s',
+ s: 'emizuzwana lomcane',
+ ss: '%d mzuzwana',
+ m: 'umzuzu',
+ mm: '%d emizuzu',
+ h: 'lihora',
+ hh: '%d emahora',
+ d: 'lilanga',
+ dd: '%d emalanga',
+ M: 'inyanga',
+ MM: '%d tinyanga',
+ y: 'umnyaka',
+ yy: '%d iminyaka',
+ },
+ meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'ekuseni';
+ } else if (hours < 15) {
+ return 'emini';
+ } else if (hours < 19) {
+ return 'entsambama';
+ } else {
+ return 'ebusuku';
+ }
+ },
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ekuseni') {
+ return hour;
+ } else if (meridiem === 'emini') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
+ if (hour === 0) {
+ return 0;
+ }
+ return hour + 12;
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: '%d',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/sv.js b/vendor/assets/javascripts/momentjs/dist/locale/sv.js
new file mode 100644
index 000000000..6f5c1d999
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/sv.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : Swedish [sv]
+//! author : Jens Alm : https://github.com/ulmus
+
+import moment from '../moment';
+
+export default moment.defineLocale('sv', {
+ months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
+ weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
+ weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [kl.] HH:mm',
+ LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Idag] LT',
+ nextDay: '[Imorgon] LT',
+ lastDay: '[Igår] LT',
+ nextWeek: '[På] dddd LT',
+ lastWeek: '[I] dddd[s] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: 'för %s sedan',
+ s: 'några sekunder',
+ ss: '%d sekunder',
+ m: 'en minut',
+ mm: '%d minuter',
+ h: 'en timme',
+ hh: '%d timmar',
+ d: 'en dag',
+ dd: '%d dagar',
+ M: 'en månad',
+ MM: '%d månader',
+ y: 'ett år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? ':e'
+ : b === 1
+ ? ':a'
+ : b === 2
+ ? ':a'
+ : b === 3
+ ? ':e'
+ : ':e';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/sw.js b/vendor/assets/javascripts/momentjs/dist/locale/sw.js
new file mode 100644
index 000000000..35a266832
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/sw.js
@@ -0,0 +1,55 @@
+//! moment.js locale configuration
+//! locale : Swahili [sw]
+//! author : Fahad Kassim : https://github.com/fadsel
+
+import moment from '../moment';
+
+export default moment.defineLocale('sw', {
+ months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
+ weekdays:
+ 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
+ '_'
+ ),
+ weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
+ weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'hh:mm A',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[leo saa] LT',
+ nextDay: '[kesho saa] LT',
+ nextWeek: '[wiki ijayo] dddd [saat] LT',
+ lastDay: '[jana] LT',
+ lastWeek: '[wiki iliyopita] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s baadaye',
+ past: 'tokea %s',
+ s: 'hivi punde',
+ ss: 'sekunde %d',
+ m: 'dakika moja',
+ mm: 'dakika %d',
+ h: 'saa limoja',
+ hh: 'masaa %d',
+ d: 'siku moja',
+ dd: 'siku %d',
+ M: 'mwezi mmoja',
+ MM: 'miezi %d',
+ y: 'mwaka mmoja',
+ yy: 'miaka %d',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ta.js b/vendor/assets/javascripts/momentjs/dist/locale/ta.js
new file mode 100644
index 000000000..fdfa1ba1a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ta.js
@@ -0,0 +1,131 @@
+//! moment.js locale configuration
+//! locale : Tamil [ta]
+//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '௧',
+ 2: '௨',
+ 3: '௩',
+ 4: '௪',
+ 5: '௫',
+ 6: '௬',
+ 7: '௭',
+ 8: '௮',
+ 9: '௯',
+ 0: '௦',
+ },
+ numberMap = {
+ '௧': '1',
+ '௨': '2',
+ '௩': '3',
+ '௪': '4',
+ '௫': '5',
+ '௬': '6',
+ '௭': '7',
+ '௮': '8',
+ '௯': '9',
+ '௦': '0',
+ };
+
+export default moment.defineLocale('ta', {
+ months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
+ '_'
+ ),
+ weekdays:
+ 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
+ '_'
+ ),
+ weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
+ '_'
+ ),
+ weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, HH:mm',
+ LLLL: 'dddd, D MMMM YYYY, HH:mm',
+ },
+ calendar: {
+ sameDay: '[இன்று] LT',
+ nextDay: '[நாளை] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[நேற்று] LT',
+ lastWeek: '[கடந்த வாரம்] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s இல்',
+ past: '%s முன்',
+ s: 'ஒரு சில விநாடிகள்',
+ ss: '%d விநாடிகள்',
+ m: 'ஒரு நிமிடம்',
+ mm: '%d நிமிடங்கள்',
+ h: 'ஒரு மணி நேரம்',
+ hh: '%d மணி நேரம்',
+ d: 'ஒரு நாள்',
+ dd: '%d நாட்கள்',
+ M: 'ஒரு மாதம்',
+ MM: '%d மாதங்கள்',
+ y: 'ஒரு வருடம்',
+ yy: '%d ஆண்டுகள்',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}வது/,
+ ordinal: function (number) {
+ return number + 'வது';
+ },
+ preparse: function (string) {
+ return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // refer http://ta.wikipedia.org/s/1er1
+ meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 2) {
+ return ' யாமம்';
+ } else if (hour < 6) {
+ return ' வைகறை'; // வைகறை
+ } else if (hour < 10) {
+ return ' காலை'; // காலை
+ } else if (hour < 14) {
+ return ' நண்பகல்'; // நண்பகல்
+ } else if (hour < 18) {
+ return ' எற்பாடு'; // எற்பாடு
+ } else if (hour < 22) {
+ return ' மாலை'; // மாலை
+ } else {
+ return ' யாமம்';
+ }
+ },
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'யாமம்') {
+ return hour < 2 ? hour : hour + 12;
+ } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
+ return hour;
+ } else if (meridiem === 'நண்பகல்') {
+ return hour >= 10 ? hour : hour + 12;
+ } else {
+ return hour + 12;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/te.js b/vendor/assets/javascripts/momentjs/dist/locale/te.js
new file mode 100644
index 000000000..56f9f163d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/te.js
@@ -0,0 +1,88 @@
+//! moment.js locale configuration
+//! locale : Telugu [te]
+//! author : Krishna Chaitanya Thota : https://github.com/kcthota
+
+import moment from '../moment';
+
+export default moment.defineLocale('te', {
+ months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
+ '_'
+ ),
+ monthsShort:
+ 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
+ '_'
+ ),
+ weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
+ weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[నేడు] LT',
+ nextDay: '[రేపు] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[నిన్న] LT',
+ lastWeek: '[గత] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s లో',
+ past: '%s క్రితం',
+ s: 'కొన్ని క్షణాలు',
+ ss: '%d సెకన్లు',
+ m: 'ఒక నిమిషం',
+ mm: '%d నిమిషాలు',
+ h: 'ఒక గంట',
+ hh: '%d గంటలు',
+ d: 'ఒక రోజు',
+ dd: '%d రోజులు',
+ M: 'ఒక నెల',
+ MM: '%d నెలలు',
+ y: 'ఒక సంవత్సరం',
+ yy: '%d సంవత్సరాలు',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}వ/,
+ ordinal: '%dవ',
+ meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'రాత్రి') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ఉదయం') {
+ return hour;
+ } else if (meridiem === 'మధ్యాహ్నం') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'సాయంత్రం') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'రాత్రి';
+ } else if (hour < 10) {
+ return 'ఉదయం';
+ } else if (hour < 17) {
+ return 'మధ్యాహ్నం';
+ } else if (hour < 20) {
+ return 'సాయంత్రం';
+ } else {
+ return 'రాత్రి';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/tet.js b/vendor/assets/javascripts/momentjs/dist/locale/tet.js
new file mode 100644
index 000000000..8d834d71f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/tet.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : Tetun Dili (East Timor) [tet]
+//! author : Joshua Brooks : https://github.com/joshbrooks
+//! author : Onorio De J. Afonso : https://github.com/marobo
+//! author : Sonia Simoes : https://github.com/soniasimoes
+
+import moment from '../moment';
+
+export default moment.defineLocale('tet', {
+ months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
+ weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
+ weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
+ weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Ohin iha] LT',
+ nextDay: '[Aban iha] LT',
+ nextWeek: 'dddd [iha] LT',
+ lastDay: '[Horiseik iha] LT',
+ lastWeek: 'dddd [semana kotuk] [iha] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'iha %s',
+ past: '%s liuba',
+ s: 'segundu balun',
+ ss: 'segundu %d',
+ m: 'minutu ida',
+ mm: 'minutu %d',
+ h: 'oras ida',
+ hh: 'oras %d',
+ d: 'loron ida',
+ dd: 'loron %d',
+ M: 'fulan ida',
+ MM: 'fulan %d',
+ y: 'tinan ida',
+ yy: 'tinan %d',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/tg.js b/vendor/assets/javascripts/momentjs/dist/locale/tg.js
new file mode 100644
index 000000000..60d33c756
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/tg.js
@@ -0,0 +1,117 @@
+//! moment.js locale configuration
+//! locale : Tajik [tg]
+//! author : Orif N. Jr. : https://github.com/orif-jr
+
+import moment from '../moment';
+
+var suffixes = {
+ 0: '-ум',
+ 1: '-ум',
+ 2: '-юм',
+ 3: '-юм',
+ 4: '-ум',
+ 5: '-ум',
+ 6: '-ум',
+ 7: '-ум',
+ 8: '-ум',
+ 9: '-ум',
+ 10: '-ум',
+ 12: '-ум',
+ 13: '-ум',
+ 20: '-ум',
+ 30: '-юм',
+ 40: '-ум',
+ 50: '-ум',
+ 60: '-ум',
+ 70: '-ум',
+ 80: '-ум',
+ 90: '-ум',
+ 100: '-ум',
+};
+
+export default moment.defineLocale('tg', {
+ months: {
+ format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
+ '_'
+ ),
+ standalone:
+ 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+ weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
+ '_'
+ ),
+ weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
+ weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Имрӯз соати] LT',
+ nextDay: '[Фардо соати] LT',
+ lastDay: '[Дирӯз соати] LT',
+ nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
+ lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'баъди %s',
+ past: '%s пеш',
+ s: 'якчанд сония',
+ m: 'як дақиқа',
+ mm: '%d дақиқа',
+ h: 'як соат',
+ hh: '%d соат',
+ d: 'як рӯз',
+ dd: '%d рӯз',
+ M: 'як моҳ',
+ MM: '%d моҳ',
+ y: 'як сол',
+ yy: '%d сол',
+ },
+ meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'шаб') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'субҳ') {
+ return hour;
+ } else if (meridiem === 'рӯз') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'бегоҳ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'шаб';
+ } else if (hour < 11) {
+ return 'субҳ';
+ } else if (hour < 16) {
+ return 'рӯз';
+ } else if (hour < 19) {
+ return 'бегоҳ';
+ } else {
+ return 'шаб';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes[number] || suffixes[a] || suffixes[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/th.js b/vendor/assets/javascripts/momentjs/dist/locale/th.js
new file mode 100644
index 000000000..b3a5560ef
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/th.js
@@ -0,0 +1,65 @@
+//! moment.js locale configuration
+//! locale : Thai [th]
+//! author : Kridsada Thanabulpong : https://github.com/sirn
+
+import moment from '../moment';
+
+export default moment.defineLocale('th', {
+ months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
+ weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
+ weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY เวลา H:mm',
+ LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',
+ },
+ meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
+ isPM: function (input) {
+ return input === 'หลังเที่ยง';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ก่อนเที่ยง';
+ } else {
+ return 'หลังเที่ยง';
+ }
+ },
+ calendar: {
+ sameDay: '[วันนี้ เวลา] LT',
+ nextDay: '[พรุ่งนี้ เวลา] LT',
+ nextWeek: 'dddd[หน้า เวลา] LT',
+ lastDay: '[เมื่อวานนี้ เวลา] LT',
+ lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'อีก %s',
+ past: '%sที่แล้ว',
+ s: 'ไม่กี่วินาที',
+ ss: '%d วินาที',
+ m: '1 นาที',
+ mm: '%d นาที',
+ h: '1 ชั่วโมง',
+ hh: '%d ชั่วโมง',
+ d: '1 วัน',
+ dd: '%d วัน',
+ w: '1 สัปดาห์',
+ ww: '%d สัปดาห์',
+ M: '1 เดือน',
+ MM: '%d เดือน',
+ y: '1 ปี',
+ yy: '%d ปี',
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/tk.js b/vendor/assets/javascripts/momentjs/dist/locale/tk.js
new file mode 100644
index 000000000..b26f99e3d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/tk.js
@@ -0,0 +1,91 @@
+//! moment.js locale configuration
+//! locale : Turkmen [tk]
+//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy
+
+import moment from '../moment';
+
+var suffixes = {
+ 1: "'inji",
+ 5: "'inji",
+ 8: "'inji",
+ 70: "'inji",
+ 80: "'inji",
+ 2: "'nji",
+ 7: "'nji",
+ 20: "'nji",
+ 50: "'nji",
+ 3: "'ünji",
+ 4: "'ünji",
+ 100: "'ünji",
+ 6: "'njy",
+ 9: "'unjy",
+ 10: "'unjy",
+ 30: "'unjy",
+ 60: "'ynjy",
+ 90: "'ynjy",
+};
+
+export default moment.defineLocale('tk', {
+ months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
+ weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
+ '_'
+ ),
+ weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
+ weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün sagat] LT',
+ nextDay: '[ertir sagat] LT',
+ nextWeek: '[indiki] dddd [sagat] LT',
+ lastDay: '[düýn] LT',
+ lastWeek: '[geçen] dddd [sagat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s soň',
+ past: '%s öň',
+ s: 'birnäçe sekunt',
+ m: 'bir minut',
+ mm: '%d minut',
+ h: 'bir sagat',
+ hh: '%d sagat',
+ d: 'bir gün',
+ dd: '%d gün',
+ M: 'bir aý',
+ MM: '%d aý',
+ y: 'bir ýyl',
+ yy: '%d ýyl',
+ },
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'Do':
+ case 'DD':
+ return number;
+ default:
+ if (number === 0) {
+ // special case for zero
+ return number + "'unjy";
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/tl-ph.js b/vendor/assets/javascripts/momentjs/dist/locale/tl-ph.js
new file mode 100644
index 000000000..581d74af5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/tl-ph.js
@@ -0,0 +1,57 @@
+//! moment.js locale configuration
+//! locale : Tagalog (Philippines) [tl-ph]
+//! author : Dan Hagman : https://github.com/hagmandan
+
+import moment from '../moment';
+
+export default moment.defineLocale('tl-ph', {
+ months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
+ '_'
+ ),
+ monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+ weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+ weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'MM/D/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY HH:mm',
+ LLLL: 'dddd, MMMM DD, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: 'LT [ngayong araw]',
+ nextDay: '[Bukas ng] LT',
+ nextWeek: 'LT [sa susunod na] dddd',
+ lastDay: 'LT [kahapon]',
+ lastWeek: 'LT [noong nakaraang] dddd',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'sa loob ng %s',
+ past: '%s ang nakalipas',
+ s: 'ilang segundo',
+ ss: '%d segundo',
+ m: 'isang minuto',
+ mm: '%d minuto',
+ h: 'isang oras',
+ hh: '%d oras',
+ d: 'isang araw',
+ dd: '%d araw',
+ M: 'isang buwan',
+ MM: '%d buwan',
+ y: 'isang taon',
+ yy: '%d taon',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/tlh.js b/vendor/assets/javascripts/momentjs/dist/locale/tlh.js
new file mode 100644
index 000000000..95b91513c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/tlh.js
@@ -0,0 +1,124 @@
+//! moment.js locale configuration
+//! locale : Klingon [tlh]
+//! author : Dominika Kruk : https://github.com/amaranthrose
+
+import moment from '../moment';
+
+var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
+
+function translateFuture(output) {
+ var time = output;
+ time =
+ output.indexOf('jaj') !== -1
+ ? time.slice(0, -3) + 'leS'
+ : output.indexOf('jar') !== -1
+ ? time.slice(0, -3) + 'waQ'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'nem'
+ : time + ' pIq';
+ return time;
+}
+
+function translatePast(output) {
+ var time = output;
+ time =
+ output.indexOf('jaj') !== -1
+ ? time.slice(0, -3) + 'Hu’'
+ : output.indexOf('jar') !== -1
+ ? time.slice(0, -3) + 'wen'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'ben'
+ : time + ' ret';
+ return time;
+}
+
+function translate(number, withoutSuffix, string, isFuture) {
+ var numberNoun = numberAsNoun(number);
+ switch (string) {
+ case 'ss':
+ return numberNoun + ' lup';
+ case 'mm':
+ return numberNoun + ' tup';
+ case 'hh':
+ return numberNoun + ' rep';
+ case 'dd':
+ return numberNoun + ' jaj';
+ case 'MM':
+ return numberNoun + ' jar';
+ case 'yy':
+ return numberNoun + ' DIS';
+ }
+}
+
+function numberAsNoun(number) {
+ var hundred = Math.floor((number % 1000) / 100),
+ ten = Math.floor((number % 100) / 10),
+ one = number % 10,
+ word = '';
+ if (hundred > 0) {
+ word += numbersNouns[hundred] + 'vatlh';
+ }
+ if (ten > 0) {
+ word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
+ }
+ if (one > 0) {
+ word += (word !== '' ? ' ' : '') + numbersNouns[one];
+ }
+ return word === '' ? 'pagh' : word;
+}
+
+export default moment.defineLocale('tlh', {
+ months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+ weekdaysMin:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[DaHjaj] LT',
+ nextDay: '[wa’leS] LT',
+ nextWeek: 'LLL',
+ lastDay: '[wa’Hu’] LT',
+ lastWeek: 'LLL',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: translateFuture,
+ past: translatePast,
+ s: 'puS lup',
+ ss: translate,
+ m: 'wa’ tup',
+ mm: translate,
+ h: 'wa’ rep',
+ hh: translate,
+ d: 'wa’ jaj',
+ dd: translate,
+ M: 'wa’ jar',
+ MM: translate,
+ y: 'wa’ DIS',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/tr.js b/vendor/assets/javascripts/momentjs/dist/locale/tr.js
new file mode 100644
index 000000000..c5abbdc06
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/tr.js
@@ -0,0 +1,106 @@
+//! moment.js locale configuration
+//! locale : Turkish [tr]
+//! authors : Erhan Gundogan : https://github.com/erhangundogan,
+//! Burak Yiğit Kaya: https://github.com/BYK
+
+import moment from '../moment';
+
+var suffixes = {
+ 1: "'inci",
+ 5: "'inci",
+ 8: "'inci",
+ 70: "'inci",
+ 80: "'inci",
+ 2: "'nci",
+ 7: "'nci",
+ 20: "'nci",
+ 50: "'nci",
+ 3: "'üncü",
+ 4: "'üncü",
+ 100: "'üncü",
+ 6: "'ncı",
+ 9: "'uncu",
+ 10: "'uncu",
+ 30: "'uncu",
+ 60: "'ıncı",
+ 90: "'ıncı",
+};
+
+export default moment.defineLocale('tr', {
+ months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
+ '_'
+ ),
+ monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
+ weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
+ '_'
+ ),
+ weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),
+ weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'öö' : 'ÖÖ';
+ } else {
+ return isLower ? 'ös' : 'ÖS';
+ }
+ },
+ meridiemParse: /öö|ÖÖ|ös|ÖS/,
+ isPM: function (input) {
+ return input === 'ös' || input === 'ÖS';
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün saat] LT',
+ nextDay: '[yarın saat] LT',
+ nextWeek: '[gelecek] dddd [saat] LT',
+ lastDay: '[dün] LT',
+ lastWeek: '[geçen] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s sonra',
+ past: '%s önce',
+ s: 'birkaç saniye',
+ ss: '%d saniye',
+ m: 'bir dakika',
+ mm: '%d dakika',
+ h: 'bir saat',
+ hh: '%d saat',
+ d: 'bir gün',
+ dd: '%d gün',
+ w: 'bir hafta',
+ ww: '%d hafta',
+ M: 'bir ay',
+ MM: '%d ay',
+ y: 'bir yıl',
+ yy: '%d yıl',
+ },
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'Do':
+ case 'DD':
+ return number;
+ default:
+ if (number === 0) {
+ // special case for zero
+ return number + "'ıncı";
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/tzl.js b/vendor/assets/javascripts/momentjs/dist/locale/tzl.js
new file mode 100644
index 000000000..62bfcdc5f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/tzl.js
@@ -0,0 +1,89 @@
+//! moment.js locale configuration
+//! locale : Talossan [tzl]
+//! author : Robin van der Vliet : https://github.com/robin0van0der0v
+//! author : Iustì Canun
+
+import moment from '../moment';
+
+// After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
+// This is currently too difficult (maybe even impossible) to add.
+export default moment.defineLocale('tzl', {
+ months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
+ weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
+ weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
+ weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM [dallas] YYYY',
+ LLL: 'D. MMMM [dallas] YYYY HH.mm',
+ LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',
+ },
+ meridiemParse: /d\'o|d\'a/i,
+ isPM: function (input) {
+ return "d'o" === input.toLowerCase();
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? "d'o" : "D'O";
+ } else {
+ return isLower ? "d'a" : "D'A";
+ }
+ },
+ calendar: {
+ sameDay: '[oxhi à] LT',
+ nextDay: '[demà à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[ieiri à] LT',
+ lastWeek: '[sür el] dddd [lasteu à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'osprei %s',
+ past: 'ja%s',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['viensas secunds', "'iensas secunds"],
+ ss: [number + ' secunds', '' + number + ' secunds'],
+ m: ["'n míut", "'iens míut"],
+ mm: [number + ' míuts', '' + number + ' míuts'],
+ h: ["'n þora", "'iensa þora"],
+ hh: [number + ' þoras', '' + number + ' þoras'],
+ d: ["'n ziua", "'iensa ziua"],
+ dd: [number + ' ziuas', '' + number + ' ziuas'],
+ M: ["'n mes", "'iens mes"],
+ MM: [number + ' mesen', '' + number + ' mesen'],
+ y: ["'n ar", "'iens ar"],
+ yy: [number + ' ars', '' + number + ' ars'],
+ };
+ return isFuture
+ ? format[key][0]
+ : withoutSuffix
+ ? format[key][0]
+ : format[key][1];
+}
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/tzm-latn.js b/vendor/assets/javascripts/momentjs/dist/locale/tzm-latn.js
new file mode 100644
index 000000000..6a427d8e6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/tzm-latn.js
@@ -0,0 +1,54 @@
+//! moment.js locale configuration
+//! locale : Central Atlas Tamazight Latin [tzm-latn]
+//! author : Abdel Said : https://github.com/abdelsaid
+
+import moment from '../moment';
+
+export default moment.defineLocale('tzm-latn', {
+ months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
+ '_'
+ ),
+ monthsShort:
+ 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
+ '_'
+ ),
+ weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[asdkh g] LT',
+ nextDay: '[aska g] LT',
+ nextWeek: 'dddd [g] LT',
+ lastDay: '[assant g] LT',
+ lastWeek: 'dddd [g] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dadkh s yan %s',
+ past: 'yan %s',
+ s: 'imik',
+ ss: '%d imik',
+ m: 'minuḍ',
+ mm: '%d minuḍ',
+ h: 'saɛa',
+ hh: '%d tassaɛin',
+ d: 'ass',
+ dd: '%d ossan',
+ M: 'ayowr',
+ MM: '%d iyyirn',
+ y: 'asgas',
+ yy: '%d isgasn',
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/tzm.js b/vendor/assets/javascripts/momentjs/dist/locale/tzm.js
new file mode 100644
index 000000000..1e5d5978e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/tzm.js
@@ -0,0 +1,54 @@
+//! moment.js locale configuration
+//! locale : Central Atlas Tamazight [tzm]
+//! author : Abdel Said : https://github.com/abdelsaid
+
+import moment from '../moment';
+
+export default moment.defineLocale('tzm', {
+ months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
+ '_'
+ ),
+ weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
+ nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
+ nextWeek: 'dddd [ⴴ] LT',
+ lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
+ lastWeek: 'dddd [ⴴ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
+ past: 'ⵢⴰⵏ %s',
+ s: 'ⵉⵎⵉⴽ',
+ ss: '%d ⵉⵎⵉⴽ',
+ m: 'ⵎⵉⵏⵓⴺ',
+ mm: '%d ⵎⵉⵏⵓⴺ',
+ h: 'ⵙⴰⵄⴰ',
+ hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
+ d: 'ⴰⵙⵙ',
+ dd: '%d oⵙⵙⴰⵏ',
+ M: 'ⴰⵢoⵓⵔ',
+ MM: '%d ⵉⵢⵢⵉⵔⵏ',
+ y: 'ⴰⵙⴳⴰⵙ',
+ yy: '%d ⵉⵙⴳⴰⵙⵏ',
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ug-cn.js b/vendor/assets/javascripts/momentjs/dist/locale/ug-cn.js
new file mode 100644
index 000000000..ad6fa947b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ug-cn.js
@@ -0,0 +1,111 @@
+//! moment.js locale configuration
+//! locale : Uyghur (China) [ug-cn]
+//! author: boyaq : https://github.com/boyaq
+
+import moment from '../moment';
+
+export default moment.defineLocale('ug-cn', {
+ months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
+ '_'
+ ),
+ weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
+ '_'
+ ),
+ weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
+ weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
+ LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
+ LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
+ },
+ meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ meridiem === 'يېرىم كېچە' ||
+ meridiem === 'سەھەر' ||
+ meridiem === 'چۈشتىن بۇرۇن'
+ ) {
+ return hour;
+ } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
+ return hour + 12;
+ } else {
+ return hour >= 11 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return 'يېرىم كېچە';
+ } else if (hm < 900) {
+ return 'سەھەر';
+ } else if (hm < 1130) {
+ return 'چۈشتىن بۇرۇن';
+ } else if (hm < 1230) {
+ return 'چۈش';
+ } else if (hm < 1800) {
+ return 'چۈشتىن كېيىن';
+ } else {
+ return 'كەچ';
+ }
+ },
+ calendar: {
+ sameDay: '[بۈگۈن سائەت] LT',
+ nextDay: '[ئەتە سائەت] LT',
+ nextWeek: '[كېلەركى] dddd [سائەت] LT',
+ lastDay: '[تۆنۈگۈن] LT',
+ lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s كېيىن',
+ past: '%s بۇرۇن',
+ s: 'نەچچە سېكونت',
+ ss: '%d سېكونت',
+ m: 'بىر مىنۇت',
+ mm: '%d مىنۇت',
+ h: 'بىر سائەت',
+ hh: '%d سائەت',
+ d: 'بىر كۈن',
+ dd: '%d كۈن',
+ M: 'بىر ئاي',
+ MM: '%d ئاي',
+ y: 'بىر يىل',
+ yy: '%d يىل',
+ },
+
+ dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '-كۈنى';
+ case 'w':
+ case 'W':
+ return number + '-ھەپتە';
+ default:
+ return number;
+ }
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/uk.js b/vendor/assets/javascripts/momentjs/dist/locale/uk.js
new file mode 100644
index 000000000..8879b5e2a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/uk.js
@@ -0,0 +1,167 @@
+//! moment.js locale configuration
+//! locale : Ukrainian [uk]
+//! author : zemlanin : https://github.com/zemlanin
+//! Author : Menelion Elensúle : https://github.com/Oire
+
+import moment from '../moment';
+
+function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+}
+function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
+ mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
+ hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
+ dd: 'день_дні_днів',
+ MM: 'місяць_місяці_місяців',
+ yy: 'рік_роки_років',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'хвилина' : 'хвилину';
+ } else if (key === 'h') {
+ return withoutSuffix ? 'година' : 'годину';
+ } else {
+ return number + ' ' + plural(format[key], +number);
+ }
+}
+function weekdaysCaseReplace(m, format) {
+ var weekdays = {
+ nominative:
+ 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
+ '_'
+ ),
+ accusative:
+ 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
+ '_'
+ ),
+ genitive:
+ 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
+ '_'
+ ),
+ },
+ nounCase;
+
+ if (m === true) {
+ return weekdays['nominative']
+ .slice(1, 7)
+ .concat(weekdays['nominative'].slice(0, 1));
+ }
+ if (!m) {
+ return weekdays['nominative'];
+ }
+
+ nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
+ ? 'accusative'
+ : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
+ ? 'genitive'
+ : 'nominative';
+ return weekdays[nounCase][m.day()];
+}
+function processHoursFunction(str) {
+ return function () {
+ return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
+ };
+}
+
+export default moment.defineLocale('uk', {
+ months: {
+ format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
+ '_'
+ ),
+ standalone:
+ 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
+ '_'
+ ),
+ weekdays: weekdaysCaseReplace,
+ weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY р.',
+ LLL: 'D MMMM YYYY р., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY р., HH:mm',
+ },
+ calendar: {
+ sameDay: processHoursFunction('[Сьогодні '),
+ nextDay: processHoursFunction('[Завтра '),
+ lastDay: processHoursFunction('[Вчора '),
+ nextWeek: processHoursFunction('[У] dddd ['),
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 5:
+ case 6:
+ return processHoursFunction('[Минулої] dddd [').call(this);
+ case 1:
+ case 2:
+ case 4:
+ return processHoursFunction('[Минулого] dddd [').call(this);
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: '%s тому',
+ s: 'декілька секунд',
+ ss: relativeTimeWithPlural,
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: 'годину',
+ hh: relativeTimeWithPlural,
+ d: 'день',
+ dd: relativeTimeWithPlural,
+ M: 'місяць',
+ MM: relativeTimeWithPlural,
+ y: 'рік',
+ yy: relativeTimeWithPlural,
+ },
+ // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
+ meridiemParse: /ночі|ранку|дня|вечора/,
+ isPM: function (input) {
+ return /^(дня|вечора)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночі';
+ } else if (hour < 12) {
+ return 'ранку';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечора';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ case 'w':
+ case 'W':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/ur.js b/vendor/assets/javascripts/momentjs/dist/locale/ur.js
new file mode 100644
index 000000000..ca5e25246
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/ur.js
@@ -0,0 +1,82 @@
+//! moment.js locale configuration
+//! locale : Urdu [ur]
+//! author : Sawood Alam : https://github.com/ibnesayeed
+//! author : Zack : https://github.com/ZackVision
+
+import moment from '../moment';
+
+var months = [
+ 'جنوری',
+ 'فروری',
+ 'مارچ',
+ 'اپریل',
+ 'مئی',
+ 'جون',
+ 'جولائی',
+ 'اگست',
+ 'ستمبر',
+ 'اکتوبر',
+ 'نومبر',
+ 'دسمبر',
+ ],
+ days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
+
+export default moment.defineLocale('ur', {
+ months: months,
+ monthsShort: months,
+ weekdays: days,
+ weekdaysShort: days,
+ weekdaysMin: days,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd، D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /صبح|شام/,
+ isPM: function (input) {
+ return 'شام' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'صبح';
+ }
+ return 'شام';
+ },
+ calendar: {
+ sameDay: '[آج بوقت] LT',
+ nextDay: '[کل بوقت] LT',
+ nextWeek: 'dddd [بوقت] LT',
+ lastDay: '[گذشتہ روز بوقت] LT',
+ lastWeek: '[گذشتہ] dddd [بوقت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s بعد',
+ past: '%s قبل',
+ s: 'چند سیکنڈ',
+ ss: '%d سیکنڈ',
+ m: 'ایک منٹ',
+ mm: '%d منٹ',
+ h: 'ایک گھنٹہ',
+ hh: '%d گھنٹے',
+ d: 'ایک دن',
+ dd: '%d دن',
+ M: 'ایک ماہ',
+ MM: '%d ماہ',
+ y: 'ایک سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/uz-latn.js b/vendor/assets/javascripts/momentjs/dist/locale/uz-latn.js
new file mode 100644
index 000000000..a2d577ecb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/uz-latn.js
@@ -0,0 +1,54 @@
+//! moment.js locale configuration
+//! locale : Uzbek Latin [uz-latn]
+//! author : Rasulbek Mirzayev : github.com/Rasulbeeek
+
+import moment from '../moment';
+
+export default moment.defineLocale('uz-latn', {
+ months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
+ weekdays:
+ 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
+ '_'
+ ),
+ weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
+ weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'D MMMM YYYY, dddd HH:mm',
+ },
+ calendar: {
+ sameDay: '[Bugun soat] LT [da]',
+ nextDay: '[Ertaga] LT [da]',
+ nextWeek: 'dddd [kuni soat] LT [da]',
+ lastDay: '[Kecha soat] LT [da]',
+ lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'Yaqin %s ichida',
+ past: 'Bir necha %s oldin',
+ s: 'soniya',
+ ss: '%d soniya',
+ m: 'bir daqiqa',
+ mm: '%d daqiqa',
+ h: 'bir soat',
+ hh: '%d soat',
+ d: 'bir kun',
+ dd: '%d kun',
+ M: 'bir oy',
+ MM: '%d oy',
+ y: 'bir yil',
+ yy: '%d yil',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/uz.js b/vendor/assets/javascripts/momentjs/dist/locale/uz.js
new file mode 100644
index 000000000..03914dd2d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/uz.js
@@ -0,0 +1,51 @@
+//! moment.js locale configuration
+//! locale : Uzbek [uz]
+//! author : Sardor Muminov : https://github.com/muminoff
+
+import moment from '../moment';
+
+export default moment.defineLocale('uz', {
+ months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
+ '_'
+ ),
+ monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+ weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
+ weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
+ weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'D MMMM YYYY, dddd HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бугун соат] LT [да]',
+ nextDay: '[Эртага] LT [да]',
+ nextWeek: 'dddd [куни соат] LT [да]',
+ lastDay: '[Кеча соат] LT [да]',
+ lastWeek: '[Утган] dddd [куни соат] LT [да]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'Якин %s ичида',
+ past: 'Бир неча %s олдин',
+ s: 'фурсат',
+ ss: '%d фурсат',
+ m: 'бир дакика',
+ mm: '%d дакика',
+ h: 'бир соат',
+ hh: '%d соат',
+ d: 'бир кун',
+ dd: '%d кун',
+ M: 'бир ой',
+ MM: '%d ой',
+ y: 'бир йил',
+ yy: '%d йил',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/vi.js b/vendor/assets/javascripts/momentjs/dist/locale/vi.js
new file mode 100644
index 000000000..2b11cf6bd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/vi.js
@@ -0,0 +1,80 @@
+//! moment.js locale configuration
+//! locale : Vietnamese [vi]
+//! author : Bang Nguyen : https://github.com/bangnk
+//! author : Chien Kira : https://github.com/chienkira
+
+import moment from '../moment';
+
+export default moment.defineLocale('vi', {
+ months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
+ '_'
+ ),
+ weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysParseExact: true,
+ meridiemParse: /sa|ch/i,
+ isPM: function (input) {
+ return /^ch$/i.test(input);
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'sa' : 'SA';
+ } else {
+ return isLower ? 'ch' : 'CH';
+ }
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [năm] YYYY',
+ LLL: 'D MMMM [năm] YYYY HH:mm',
+ LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
+ l: 'DD/M/YYYY',
+ ll: 'D MMM YYYY',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd, D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hôm nay lúc] LT',
+ nextDay: '[Ngày mai lúc] LT',
+ nextWeek: 'dddd [tuần tới lúc] LT',
+ lastDay: '[Hôm qua lúc] LT',
+ lastWeek: 'dddd [tuần trước lúc] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s tới',
+ past: '%s trước',
+ s: 'vài giây',
+ ss: '%d giây',
+ m: 'một phút',
+ mm: '%d phút',
+ h: 'một giờ',
+ hh: '%d giờ',
+ d: 'một ngày',
+ dd: '%d ngày',
+ w: 'một tuần',
+ ww: '%d tuần',
+ M: 'một tháng',
+ MM: '%d tháng',
+ y: 'một năm',
+ yy: '%d năm',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/x-pseudo.js b/vendor/assets/javascripts/momentjs/dist/locale/x-pseudo.js
new file mode 100644
index 000000000..f8adbb8ff
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/x-pseudo.js
@@ -0,0 +1,73 @@
+//! moment.js locale configuration
+//! locale : Pseudo [x-pseudo]
+//! author : Andrew Hood : https://github.com/andrewhood125
+
+import moment from '../moment';
+
+export default moment.defineLocale('x-pseudo', {
+ months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
+ '_'
+ ),
+ monthsShort:
+ 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
+ '_'
+ ),
+ weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
+ weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[T~ódá~ý át] LT',
+ nextDay: '[T~ómó~rró~w át] LT',
+ nextWeek: 'dddd [át] LT',
+ lastDay: '[Ý~ést~érdá~ý át] LT',
+ lastWeek: '[L~ást] dddd [át] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'í~ñ %s',
+ past: '%s á~gó',
+ s: 'á ~féw ~sécó~ñds',
+ ss: '%d s~écóñ~ds',
+ m: 'á ~míñ~úté',
+ mm: '%d m~íñú~tés',
+ h: 'á~ñ hó~úr',
+ hh: '%d h~óúrs',
+ d: 'á ~dáý',
+ dd: '%d d~áýs',
+ M: 'á ~móñ~th',
+ MM: '%d m~óñt~hs',
+ y: 'á ~ýéár',
+ yy: '%d ý~éárs',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/yo.js b/vendor/assets/javascripts/momentjs/dist/locale/yo.js
new file mode 100644
index 000000000..2fcb6e4f5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/yo.js
@@ -0,0 +1,53 @@
+//! moment.js locale configuration
+//! locale : Yoruba Nigeria [yo]
+//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
+
+import moment from '../moment';
+
+export default moment.defineLocale('yo', {
+ months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
+ '_'
+ ),
+ monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
+ weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
+ weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
+ weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Ònì ni] LT',
+ nextDay: '[Ọ̀la ni] LT',
+ nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
+ lastDay: '[Àna ni] LT',
+ lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ní %s',
+ past: '%s kọjá',
+ s: 'ìsẹjú aayá die',
+ ss: 'aayá %d',
+ m: 'ìsẹjú kan',
+ mm: 'ìsẹjú %d',
+ h: 'wákati kan',
+ hh: 'wákati %d',
+ d: 'ọjọ́ kan',
+ dd: 'ọjọ́ %d',
+ M: 'osù kan',
+ MM: 'osù %d',
+ y: 'ọdún kan',
+ yy: 'ọdún %d',
+ },
+ dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
+ ordinal: 'ọjọ́ %d',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/zh-cn.js b/vendor/assets/javascripts/momentjs/dist/locale/zh-cn.js
new file mode 100644
index 000000000..2345ee6c1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/zh-cn.js
@@ -0,0 +1,120 @@
+//! moment.js locale configuration
+//! locale : Chinese (China) [zh-cn]
+//! author : suupic : https://github.com/suupic
+//! author : Zeno Zeng : https://github.com/zenozeng
+//! author : uu109 : https://github.com/uu109
+
+import moment from '../moment';
+
+export default moment.defineLocale('zh-cn', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日Ah点mm分',
+ LLLL: 'YYYY年M月D日ddddAh点mm分',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ } else {
+ // '中午'
+ return hour >= 11 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天]LT',
+ nextDay: '[明天]LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ return '[下]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
+ lastDay: '[昨天]LT',
+ lastWeek: function (now) {
+ if (this.week() !== now.week()) {
+ return '[上]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '周';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s后',
+ past: '%s前',
+ s: '几秒',
+ ss: '%d 秒',
+ m: '1 分钟',
+ mm: '%d 分钟',
+ h: '1 小时',
+ hh: '%d 小时',
+ d: '1 天',
+ dd: '%d 天',
+ w: '1 周',
+ ww: '%d 周',
+ M: '1 个月',
+ MM: '%d 个月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ week: {
+ // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/zh-hk.js b/vendor/assets/javascripts/momentjs/dist/locale/zh-hk.js
new file mode 100644
index 000000000..78a10190e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/zh-hk.js
@@ -0,0 +1,101 @@
+//! moment.js locale configuration
+//! locale : Chinese (Hong Kong) [zh-hk]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
+//! author : Konstantin : https://github.com/skfd
+//! author : Anthony : https://github.com/anthonylau
+
+import moment from '../moment';
+
+export default moment.defineLocale('zh-hk', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1200) {
+ return '上午';
+ } else if (hm === 1200) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天]LT',
+ nextDay: '[明天]LT',
+ nextWeek: '[下]ddddLT',
+ lastDay: '[昨天]LT',
+ lastWeek: '[上]ddddLT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/zh-mo.js b/vendor/assets/javascripts/momentjs/dist/locale/zh-mo.js
new file mode 100644
index 000000000..9ed795d28
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/zh-mo.js
@@ -0,0 +1,100 @@
+//! moment.js locale configuration
+//! locale : Chinese (Macau) [zh-mo]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
+//! author : Tan Yuanhong : https://github.com/le0tan
+
+import moment from '../moment';
+
+export default moment.defineLocale('zh-mo', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'D/M/YYYY',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天] LT',
+ nextDay: '[明天] LT',
+ nextWeek: '[下]dddd LT',
+ lastDay: '[昨天] LT',
+ lastWeek: '[上]dddd LT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s內',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/locale/zh-tw.js b/vendor/assets/javascripts/momentjs/dist/locale/zh-tw.js
new file mode 100644
index 000000000..aa98ab105
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/locale/zh-tw.js
@@ -0,0 +1,99 @@
+//! moment.js locale configuration
+//! locale : Chinese (Taiwan) [zh-tw]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
+
+import moment from '../moment';
+
+export default moment.defineLocale('zh-tw', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天] LT',
+ nextDay: '[明天] LT',
+ nextWeek: '[下]dddd LT',
+ lastDay: '[昨天] LT',
+ lastWeek: '[上]dddd LT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/dist/moment.js b/vendor/assets/javascripts/momentjs/dist/moment.js
new file mode 100644
index 000000000..0d696333b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/dist/moment.js
@@ -0,0 +1,5677 @@
+//! moment.js
+//! version : 2.29.4
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+
+var hookCallback;
+
+function hooks() {
+ return hookCallback.apply(null, arguments);
+}
+
+// This is done to register the method called with moment()
+// without creating circular dependencies.
+function setHookCallback(callback) {
+ hookCallback = callback;
+}
+
+function isArray(input) {
+ return (
+ input instanceof Array ||
+ Object.prototype.toString.call(input) === '[object Array]'
+ );
+}
+
+function isObject(input) {
+ // IE8 will treat undefined and null as object if it wasn't for
+ // input != null
+ return (
+ input != null &&
+ Object.prototype.toString.call(input) === '[object Object]'
+ );
+}
+
+function hasOwnProp(a, b) {
+ return Object.prototype.hasOwnProperty.call(a, b);
+}
+
+function isObjectEmpty(obj) {
+ if (Object.getOwnPropertyNames) {
+ return Object.getOwnPropertyNames(obj).length === 0;
+ } else {
+ var k;
+ for (k in obj) {
+ if (hasOwnProp(obj, k)) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+
+function isUndefined(input) {
+ return input === void 0;
+}
+
+function isNumber(input) {
+ return (
+ typeof input === 'number' ||
+ Object.prototype.toString.call(input) === '[object Number]'
+ );
+}
+
+function isDate(input) {
+ return (
+ input instanceof Date ||
+ Object.prototype.toString.call(input) === '[object Date]'
+ );
+}
+
+function map(arr, fn) {
+ var res = [],
+ i,
+ arrLen = arr.length;
+ for (i = 0; i < arrLen; ++i) {
+ res.push(fn(arr[i], i));
+ }
+ return res;
+}
+
+function extend(a, b) {
+ for (var i in b) {
+ if (hasOwnProp(b, i)) {
+ a[i] = b[i];
+ }
+ }
+
+ if (hasOwnProp(b, 'toString')) {
+ a.toString = b.toString;
+ }
+
+ if (hasOwnProp(b, 'valueOf')) {
+ a.valueOf = b.valueOf;
+ }
+
+ return a;
+}
+
+function createUTC(input, format, locale, strict) {
+ return createLocalOrUTC(input, format, locale, strict, true).utc();
+}
+
+function defaultParsingFlags() {
+ // We need to deep clone this object.
+ return {
+ empty: false,
+ unusedTokens: [],
+ unusedInput: [],
+ overflow: -2,
+ charsLeftOver: 0,
+ nullInput: false,
+ invalidEra: null,
+ invalidMonth: null,
+ invalidFormat: false,
+ userInvalidated: false,
+ iso: false,
+ parsedDateParts: [],
+ era: null,
+ meridiem: null,
+ rfc2822: false,
+ weekdayMismatch: false,
+ };
+}
+
+function getParsingFlags(m) {
+ if (m._pf == null) {
+ m._pf = defaultParsingFlags();
+ }
+ return m._pf;
+}
+
+var some;
+if (Array.prototype.some) {
+ some = Array.prototype.some;
+} else {
+ some = function (fun) {
+ var t = Object(this),
+ len = t.length >>> 0,
+ i;
+
+ for (i = 0; i < len; i++) {
+ if (i in t && fun.call(this, t[i], i, t)) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+}
+
+function isValid(m) {
+ if (m._isValid == null) {
+ var flags = getParsingFlags(m),
+ parsedParts = some.call(flags.parsedDateParts, function (i) {
+ return i != null;
+ }),
+ isNowValid =
+ !isNaN(m._d.getTime()) &&
+ flags.overflow < 0 &&
+ !flags.empty &&
+ !flags.invalidEra &&
+ !flags.invalidMonth &&
+ !flags.invalidWeekday &&
+ !flags.weekdayMismatch &&
+ !flags.nullInput &&
+ !flags.invalidFormat &&
+ !flags.userInvalidated &&
+ (!flags.meridiem || (flags.meridiem && parsedParts));
+
+ if (m._strict) {
+ isNowValid =
+ isNowValid &&
+ flags.charsLeftOver === 0 &&
+ flags.unusedTokens.length === 0 &&
+ flags.bigHour === undefined;
+ }
+
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
+ m._isValid = isNowValid;
+ } else {
+ return isNowValid;
+ }
+ }
+ return m._isValid;
+}
+
+function createInvalid(flags) {
+ var m = createUTC(NaN);
+ if (flags != null) {
+ extend(getParsingFlags(m), flags);
+ } else {
+ getParsingFlags(m).userInvalidated = true;
+ }
+
+ return m;
+}
+
+// Plugins that add properties should also add the key here (null value),
+// so we can properly clone ourselves.
+var momentProperties = (hooks.momentProperties = []),
+ updateInProgress = false;
+
+function copyConfig(to, from) {
+ var i,
+ prop,
+ val,
+ momentPropertiesLen = momentProperties.length;
+
+ if (!isUndefined(from._isAMomentObject)) {
+ to._isAMomentObject = from._isAMomentObject;
+ }
+ if (!isUndefined(from._i)) {
+ to._i = from._i;
+ }
+ if (!isUndefined(from._f)) {
+ to._f = from._f;
+ }
+ if (!isUndefined(from._l)) {
+ to._l = from._l;
+ }
+ if (!isUndefined(from._strict)) {
+ to._strict = from._strict;
+ }
+ if (!isUndefined(from._tzm)) {
+ to._tzm = from._tzm;
+ }
+ if (!isUndefined(from._isUTC)) {
+ to._isUTC = from._isUTC;
+ }
+ if (!isUndefined(from._offset)) {
+ to._offset = from._offset;
+ }
+ if (!isUndefined(from._pf)) {
+ to._pf = getParsingFlags(from);
+ }
+ if (!isUndefined(from._locale)) {
+ to._locale = from._locale;
+ }
+
+ if (momentPropertiesLen > 0) {
+ for (i = 0; i < momentPropertiesLen; i++) {
+ prop = momentProperties[i];
+ val = from[prop];
+ if (!isUndefined(val)) {
+ to[prop] = val;
+ }
+ }
+ }
+
+ return to;
+}
+
+// Moment prototype object
+function Moment(config) {
+ copyConfig(this, config);
+ this._d = new Date(config._d != null ? config._d.getTime() : NaN);
+ if (!this.isValid()) {
+ this._d = new Date(NaN);
+ }
+ // Prevent infinite loop in case updateOffset creates new moment
+ // objects.
+ if (updateInProgress === false) {
+ updateInProgress = true;
+ hooks.updateOffset(this);
+ updateInProgress = false;
+ }
+}
+
+function isMoment(obj) {
+ return (
+ obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
+ );
+}
+
+function warn(msg) {
+ if (
+ hooks.suppressDeprecationWarnings === false &&
+ typeof console !== 'undefined' &&
+ console.warn
+ ) {
+ console.warn('Deprecation warning: ' + msg);
+ }
+}
+
+function deprecate(msg, fn) {
+ var firstTime = true;
+
+ return extend(function () {
+ if (hooks.deprecationHandler != null) {
+ hooks.deprecationHandler(null, msg);
+ }
+ if (firstTime) {
+ var args = [],
+ arg,
+ i,
+ key,
+ argLen = arguments.length;
+ for (i = 0; i < argLen; i++) {
+ arg = '';
+ if (typeof arguments[i] === 'object') {
+ arg += '\n[' + i + '] ';
+ for (key in arguments[0]) {
+ if (hasOwnProp(arguments[0], key)) {
+ arg += key + ': ' + arguments[0][key] + ', ';
+ }
+ }
+ arg = arg.slice(0, -2); // Remove trailing comma and space
+ } else {
+ arg = arguments[i];
+ }
+ args.push(arg);
+ }
+ warn(
+ msg +
+ '\nArguments: ' +
+ Array.prototype.slice.call(args).join('') +
+ '\n' +
+ new Error().stack
+ );
+ firstTime = false;
+ }
+ return fn.apply(this, arguments);
+ }, fn);
+}
+
+var deprecations = {};
+
+function deprecateSimple(name, msg) {
+ if (hooks.deprecationHandler != null) {
+ hooks.deprecationHandler(name, msg);
+ }
+ if (!deprecations[name]) {
+ warn(msg);
+ deprecations[name] = true;
+ }
+}
+
+hooks.suppressDeprecationWarnings = false;
+hooks.deprecationHandler = null;
+
+function isFunction(input) {
+ return (
+ (typeof Function !== 'undefined' && input instanceof Function) ||
+ Object.prototype.toString.call(input) === '[object Function]'
+ );
+}
+
+function set(config) {
+ var prop, i;
+ for (i in config) {
+ if (hasOwnProp(config, i)) {
+ prop = config[i];
+ if (isFunction(prop)) {
+ this[i] = prop;
+ } else {
+ this['_' + i] = prop;
+ }
+ }
+ }
+ this._config = config;
+ // Lenient ordinal parsing accepts just a number in addition to
+ // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
+ // TODO: Remove "ordinalParse" fallback in next major release.
+ this._dayOfMonthOrdinalParseLenient = new RegExp(
+ (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
+ '|' +
+ /\d{1,2}/.source
+ );
+}
+
+function mergeConfigs(parentConfig, childConfig) {
+ var res = extend({}, parentConfig),
+ prop;
+ for (prop in childConfig) {
+ if (hasOwnProp(childConfig, prop)) {
+ if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
+ res[prop] = {};
+ extend(res[prop], parentConfig[prop]);
+ extend(res[prop], childConfig[prop]);
+ } else if (childConfig[prop] != null) {
+ res[prop] = childConfig[prop];
+ } else {
+ delete res[prop];
+ }
+ }
+ }
+ for (prop in parentConfig) {
+ if (
+ hasOwnProp(parentConfig, prop) &&
+ !hasOwnProp(childConfig, prop) &&
+ isObject(parentConfig[prop])
+ ) {
+ // make sure changes to properties don't modify parent config
+ res[prop] = extend({}, res[prop]);
+ }
+ }
+ return res;
+}
+
+function Locale(config) {
+ if (config != null) {
+ this.set(config);
+ }
+}
+
+var keys;
+
+if (Object.keys) {
+ keys = Object.keys;
+} else {
+ keys = function (obj) {
+ var i,
+ res = [];
+ for (i in obj) {
+ if (hasOwnProp(obj, i)) {
+ res.push(i);
+ }
+ }
+ return res;
+ };
+}
+
+var defaultCalendar = {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+};
+
+function calendar(key, mom, now) {
+ var output = this._calendar[key] || this._calendar['sameElse'];
+ return isFunction(output) ? output.call(mom, now) : output;
+}
+
+function zeroFill(number, targetLength, forceSign) {
+ var absNumber = '' + Math.abs(number),
+ zerosToFill = targetLength - absNumber.length,
+ sign = number >= 0;
+ return (
+ (sign ? (forceSign ? '+' : '') : '-') +
+ Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
+ absNumber
+ );
+}
+
+var formattingTokens =
+ /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
+ localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
+ formatFunctions = {},
+ formatTokenFunctions = {};
+
+// token: 'M'
+// padded: ['MM', 2]
+// ordinal: 'Mo'
+// callback: function () { this.month() + 1 }
+function addFormatToken(token, padded, ordinal, callback) {
+ var func = callback;
+ if (typeof callback === 'string') {
+ func = function () {
+ return this[callback]();
+ };
+ }
+ if (token) {
+ formatTokenFunctions[token] = func;
+ }
+ if (padded) {
+ formatTokenFunctions[padded[0]] = function () {
+ return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
+ };
+ }
+ if (ordinal) {
+ formatTokenFunctions[ordinal] = function () {
+ return this.localeData().ordinal(
+ func.apply(this, arguments),
+ token
+ );
+ };
+ }
+}
+
+function removeFormattingTokens(input) {
+ if (input.match(/\[[\s\S]/)) {
+ return input.replace(/^\[|\]$/g, '');
+ }
+ return input.replace(/\\/g, '');
+}
+
+function makeFormatFunction(format) {
+ var array = format.match(formattingTokens),
+ i,
+ length;
+
+ for (i = 0, length = array.length; i < length; i++) {
+ if (formatTokenFunctions[array[i]]) {
+ array[i] = formatTokenFunctions[array[i]];
+ } else {
+ array[i] = removeFormattingTokens(array[i]);
+ }
+ }
+
+ return function (mom) {
+ var output = '',
+ i;
+ for (i = 0; i < length; i++) {
+ output += isFunction(array[i])
+ ? array[i].call(mom, format)
+ : array[i];
+ }
+ return output;
+ };
+}
+
+// format date using native date object
+function formatMoment(m, format) {
+ if (!m.isValid()) {
+ return m.localeData().invalidDate();
+ }
+
+ format = expandFormat(format, m.localeData());
+ formatFunctions[format] =
+ formatFunctions[format] || makeFormatFunction(format);
+
+ return formatFunctions[format](m);
+}
+
+function expandFormat(format, locale) {
+ var i = 5;
+
+ function replaceLongDateFormatTokens(input) {
+ return locale.longDateFormat(input) || input;
+ }
+
+ localFormattingTokens.lastIndex = 0;
+ while (i >= 0 && localFormattingTokens.test(format)) {
+ format = format.replace(
+ localFormattingTokens,
+ replaceLongDateFormatTokens
+ );
+ localFormattingTokens.lastIndex = 0;
+ i -= 1;
+ }
+
+ return format;
+}
+
+var defaultLongDateFormat = {
+ LTS: 'h:mm:ss A',
+ LT: 'h:mm A',
+ L: 'MM/DD/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY h:mm A',
+ LLLL: 'dddd, MMMM D, YYYY h:mm A',
+};
+
+function longDateFormat(key) {
+ var format = this._longDateFormat[key],
+ formatUpper = this._longDateFormat[key.toUpperCase()];
+
+ if (format || !formatUpper) {
+ return format;
+ }
+
+ this._longDateFormat[key] = formatUpper
+ .match(formattingTokens)
+ .map(function (tok) {
+ if (
+ tok === 'MMMM' ||
+ tok === 'MM' ||
+ tok === 'DD' ||
+ tok === 'dddd'
+ ) {
+ return tok.slice(1);
+ }
+ return tok;
+ })
+ .join('');
+
+ return this._longDateFormat[key];
+}
+
+var defaultInvalidDate = 'Invalid date';
+
+function invalidDate() {
+ return this._invalidDate;
+}
+
+var defaultOrdinal = '%d',
+ defaultDayOfMonthOrdinalParse = /\d{1,2}/;
+
+function ordinal(number) {
+ return this._ordinal.replace('%d', number);
+}
+
+var defaultRelativeTime = {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ w: 'a week',
+ ww: '%d weeks',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+};
+
+function relativeTime(number, withoutSuffix, string, isFuture) {
+ var output = this._relativeTime[string];
+ return isFunction(output)
+ ? output(number, withoutSuffix, string, isFuture)
+ : output.replace(/%d/i, number);
+}
+
+function pastFuture(diff, output) {
+ var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
+ return isFunction(format) ? format(output) : format.replace(/%s/i, output);
+}
+
+var aliases = {};
+
+function addUnitAlias(unit, shorthand) {
+ var lowerCase = unit.toLowerCase();
+ aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
+}
+
+function normalizeUnits(units) {
+ return typeof units === 'string'
+ ? aliases[units] || aliases[units.toLowerCase()]
+ : undefined;
+}
+
+function normalizeObjectUnits(inputObject) {
+ var normalizedInput = {},
+ normalizedProp,
+ prop;
+
+ for (prop in inputObject) {
+ if (hasOwnProp(inputObject, prop)) {
+ normalizedProp = normalizeUnits(prop);
+ if (normalizedProp) {
+ normalizedInput[normalizedProp] = inputObject[prop];
+ }
+ }
+ }
+
+ return normalizedInput;
+}
+
+var priorities = {};
+
+function addUnitPriority(unit, priority) {
+ priorities[unit] = priority;
+}
+
+function getPrioritizedUnits(unitsObj) {
+ var units = [],
+ u;
+ for (u in unitsObj) {
+ if (hasOwnProp(unitsObj, u)) {
+ units.push({ unit: u, priority: priorities[u] });
+ }
+ }
+ units.sort(function (a, b) {
+ return a.priority - b.priority;
+ });
+ return units;
+}
+
+function isLeapYear(year) {
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
+}
+
+function absFloor(number) {
+ if (number < 0) {
+ // -0 -> 0
+ return Math.ceil(number) || 0;
+ } else {
+ return Math.floor(number);
+ }
+}
+
+function toInt(argumentForCoercion) {
+ var coercedNumber = +argumentForCoercion,
+ value = 0;
+
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
+ value = absFloor(coercedNumber);
+ }
+
+ return value;
+}
+
+function makeGetSet(unit, keepTime) {
+ return function (value) {
+ if (value != null) {
+ set$1(this, unit, value);
+ hooks.updateOffset(this, keepTime);
+ return this;
+ } else {
+ return get(this, unit);
+ }
+ };
+}
+
+function get(mom, unit) {
+ return mom.isValid()
+ ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
+ : NaN;
+}
+
+function set$1(mom, unit, value) {
+ if (mom.isValid() && !isNaN(value)) {
+ if (
+ unit === 'FullYear' &&
+ isLeapYear(mom.year()) &&
+ mom.month() === 1 &&
+ mom.date() === 29
+ ) {
+ value = toInt(value);
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
+ value,
+ mom.month(),
+ daysInMonth(value, mom.month())
+ );
+ } else {
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
+ }
+ }
+}
+
+// MOMENTS
+
+function stringGet(units) {
+ units = normalizeUnits(units);
+ if (isFunction(this[units])) {
+ return this[units]();
+ }
+ return this;
+}
+
+function stringSet(units, value) {
+ if (typeof units === 'object') {
+ units = normalizeObjectUnits(units);
+ var prioritized = getPrioritizedUnits(units),
+ i,
+ prioritizedLen = prioritized.length;
+ for (i = 0; i < prioritizedLen; i++) {
+ this[prioritized[i].unit](units[prioritized[i].unit]);
+ }
+ } else {
+ units = normalizeUnits(units);
+ if (isFunction(this[units])) {
+ return this[units](value);
+ }
+ }
+ return this;
+}
+
+var match1 = /\d/, // 0 - 9
+ match2 = /\d\d/, // 00 - 99
+ match3 = /\d{3}/, // 000 - 999
+ match4 = /\d{4}/, // 0000 - 9999
+ match6 = /[+-]?\d{6}/, // -999999 - 999999
+ match1to2 = /\d\d?/, // 0 - 99
+ match3to4 = /\d\d\d\d?/, // 999 - 9999
+ match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
+ match1to3 = /\d{1,3}/, // 0 - 999
+ match1to4 = /\d{1,4}/, // 0 - 9999
+ match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
+ matchUnsigned = /\d+/, // 0 - inf
+ matchSigned = /[+-]?\d+/, // -inf - inf
+ matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
+ matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
+ matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
+ // any word (or two) characters or numbers including two/three word month in arabic.
+ // includes scottish gaelic two word and hyphenated months
+ matchWord =
+ /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
+ regexes;
+
+regexes = {};
+
+function addRegexToken(token, regex, strictRegex) {
+ regexes[token] = isFunction(regex)
+ ? regex
+ : function (isStrict, localeData) {
+ return isStrict && strictRegex ? strictRegex : regex;
+ };
+}
+
+function getParseRegexForToken(token, config) {
+ if (!hasOwnProp(regexes, token)) {
+ return new RegExp(unescapeFormat(token));
+ }
+
+ return regexes[token](config._strict, config._locale);
+}
+
+// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
+function unescapeFormat(s) {
+ return regexEscape(
+ s
+ .replace('\\', '')
+ .replace(
+ /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
+ function (matched, p1, p2, p3, p4) {
+ return p1 || p2 || p3 || p4;
+ }
+ )
+ );
+}
+
+function regexEscape(s) {
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+}
+
+var tokens = {};
+
+function addParseToken(token, callback) {
+ var i,
+ func = callback,
+ tokenLen;
+ if (typeof token === 'string') {
+ token = [token];
+ }
+ if (isNumber(callback)) {
+ func = function (input, array) {
+ array[callback] = toInt(input);
+ };
+ }
+ tokenLen = token.length;
+ for (i = 0; i < tokenLen; i++) {
+ tokens[token[i]] = func;
+ }
+}
+
+function addWeekParseToken(token, callback) {
+ addParseToken(token, function (input, array, config, token) {
+ config._w = config._w || {};
+ callback(input, config._w, config, token);
+ });
+}
+
+function addTimeToArrayFromToken(token, input, config) {
+ if (input != null && hasOwnProp(tokens, token)) {
+ tokens[token](input, config._a, config, token);
+ }
+}
+
+var YEAR = 0,
+ MONTH = 1,
+ DATE = 2,
+ HOUR = 3,
+ MINUTE = 4,
+ SECOND = 5,
+ MILLISECOND = 6,
+ WEEK = 7,
+ WEEKDAY = 8;
+
+function mod(n, x) {
+ return ((n % x) + x) % x;
+}
+
+var indexOf;
+
+if (Array.prototype.indexOf) {
+ indexOf = Array.prototype.indexOf;
+} else {
+ indexOf = function (o) {
+ // I know
+ var i;
+ for (i = 0; i < this.length; ++i) {
+ if (this[i] === o) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+
+function daysInMonth(year, month) {
+ if (isNaN(year) || isNaN(month)) {
+ return NaN;
+ }
+ var modMonth = mod(month, 12);
+ year += (month - modMonth) / 12;
+ return modMonth === 1
+ ? isLeapYear(year)
+ ? 29
+ : 28
+ : 31 - ((modMonth % 7) % 2);
+}
+
+// FORMATTING
+
+addFormatToken('M', ['MM', 2], 'Mo', function () {
+ return this.month() + 1;
+});
+
+addFormatToken('MMM', 0, 0, function (format) {
+ return this.localeData().monthsShort(this, format);
+});
+
+addFormatToken('MMMM', 0, 0, function (format) {
+ return this.localeData().months(this, format);
+});
+
+// ALIASES
+
+addUnitAlias('month', 'M');
+
+// PRIORITY
+
+addUnitPriority('month', 8);
+
+// PARSING
+
+addRegexToken('M', match1to2);
+addRegexToken('MM', match1to2, match2);
+addRegexToken('MMM', function (isStrict, locale) {
+ return locale.monthsShortRegex(isStrict);
+});
+addRegexToken('MMMM', function (isStrict, locale) {
+ return locale.monthsRegex(isStrict);
+});
+
+addParseToken(['M', 'MM'], function (input, array) {
+ array[MONTH] = toInt(input) - 1;
+});
+
+addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
+ var month = config._locale.monthsParse(input, token, config._strict);
+ // if we didn't find a month name, mark the date as invalid.
+ if (month != null) {
+ array[MONTH] = month;
+ } else {
+ getParsingFlags(config).invalidMonth = input;
+ }
+});
+
+// LOCALES
+
+var defaultLocaleMonths =
+ 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ defaultLocaleMonthsShort =
+ 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
+ defaultMonthsShortRegex = matchWord,
+ defaultMonthsRegex = matchWord;
+
+function localeMonths(m, format) {
+ if (!m) {
+ return isArray(this._months)
+ ? this._months
+ : this._months['standalone'];
+ }
+ return isArray(this._months)
+ ? this._months[m.month()]
+ : this._months[
+ (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
+ ? 'format'
+ : 'standalone'
+ ][m.month()];
+}
+
+function localeMonthsShort(m, format) {
+ if (!m) {
+ return isArray(this._monthsShort)
+ ? this._monthsShort
+ : this._monthsShort['standalone'];
+ }
+ return isArray(this._monthsShort)
+ ? this._monthsShort[m.month()]
+ : this._monthsShort[
+ MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
+ ][m.month()];
+}
+
+function handleStrictParse(monthName, format, strict) {
+ var i,
+ ii,
+ mom,
+ llc = monthName.toLocaleLowerCase();
+ if (!this._monthsParse) {
+ // this is not used
+ this._monthsParse = [];
+ this._longMonthsParse = [];
+ this._shortMonthsParse = [];
+ for (i = 0; i < 12; ++i) {
+ mom = createUTC([2000, i]);
+ this._shortMonthsParse[i] = this.monthsShort(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
+ }
+ }
+
+ if (strict) {
+ if (format === 'MMM') {
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._longMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ } else {
+ if (format === 'MMM') {
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._longMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._longMonthsParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ }
+}
+
+function localeMonthsParse(monthName, format, strict) {
+ var i, mom, regex;
+
+ if (this._monthsParseExact) {
+ return handleStrictParse.call(this, monthName, format, strict);
+ }
+
+ if (!this._monthsParse) {
+ this._monthsParse = [];
+ this._longMonthsParse = [];
+ this._shortMonthsParse = [];
+ }
+
+ // TODO: add sorting
+ // Sorting makes sure if one month (or abbr) is a prefix of another
+ // see sorting in computeMonthsParse
+ for (i = 0; i < 12; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, i]);
+ if (strict && !this._longMonthsParse[i]) {
+ this._longMonthsParse[i] = new RegExp(
+ '^' + this.months(mom, '').replace('.', '') + '$',
+ 'i'
+ );
+ this._shortMonthsParse[i] = new RegExp(
+ '^' + this.monthsShort(mom, '').replace('.', '') + '$',
+ 'i'
+ );
+ }
+ if (!strict && !this._monthsParse[i]) {
+ regex =
+ '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
+ this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (
+ strict &&
+ format === 'MMMM' &&
+ this._longMonthsParse[i].test(monthName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'MMM' &&
+ this._shortMonthsParse[i].test(monthName)
+ ) {
+ return i;
+ } else if (!strict && this._monthsParse[i].test(monthName)) {
+ return i;
+ }
+ }
+}
+
+// MOMENTS
+
+function setMonth(mom, value) {
+ var dayOfMonth;
+
+ if (!mom.isValid()) {
+ // No op
+ return mom;
+ }
+
+ if (typeof value === 'string') {
+ if (/^\d+$/.test(value)) {
+ value = toInt(value);
+ } else {
+ value = mom.localeData().monthsParse(value);
+ // TODO: Another silent failure?
+ if (!isNumber(value)) {
+ return mom;
+ }
+ }
+ }
+
+ dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
+ return mom;
+}
+
+function getSetMonth(value) {
+ if (value != null) {
+ setMonth(this, value);
+ hooks.updateOffset(this, true);
+ return this;
+ } else {
+ return get(this, 'Month');
+ }
+}
+
+function getDaysInMonth() {
+ return daysInMonth(this.year(), this.month());
+}
+
+function monthsShortRegex(isStrict) {
+ if (this._monthsParseExact) {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ computeMonthsParse.call(this);
+ }
+ if (isStrict) {
+ return this._monthsShortStrictRegex;
+ } else {
+ return this._monthsShortRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_monthsShortRegex')) {
+ this._monthsShortRegex = defaultMonthsShortRegex;
+ }
+ return this._monthsShortStrictRegex && isStrict
+ ? this._monthsShortStrictRegex
+ : this._monthsShortRegex;
+ }
+}
+
+function monthsRegex(isStrict) {
+ if (this._monthsParseExact) {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ computeMonthsParse.call(this);
+ }
+ if (isStrict) {
+ return this._monthsStrictRegex;
+ } else {
+ return this._monthsRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ this._monthsRegex = defaultMonthsRegex;
+ }
+ return this._monthsStrictRegex && isStrict
+ ? this._monthsStrictRegex
+ : this._monthsRegex;
+ }
+}
+
+function computeMonthsParse() {
+ function cmpLenRev(a, b) {
+ return b.length - a.length;
+ }
+
+ var shortPieces = [],
+ longPieces = [],
+ mixedPieces = [],
+ i,
+ mom;
+ for (i = 0; i < 12; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, i]);
+ shortPieces.push(this.monthsShort(mom, ''));
+ longPieces.push(this.months(mom, ''));
+ mixedPieces.push(this.months(mom, ''));
+ mixedPieces.push(this.monthsShort(mom, ''));
+ }
+ // Sorting makes sure if one month (or abbr) is a prefix of another it
+ // will match the longer piece.
+ shortPieces.sort(cmpLenRev);
+ longPieces.sort(cmpLenRev);
+ mixedPieces.sort(cmpLenRev);
+ for (i = 0; i < 12; i++) {
+ shortPieces[i] = regexEscape(shortPieces[i]);
+ longPieces[i] = regexEscape(longPieces[i]);
+ }
+ for (i = 0; i < 24; i++) {
+ mixedPieces[i] = regexEscape(mixedPieces[i]);
+ }
+
+ this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._monthsShortRegex = this._monthsRegex;
+ this._monthsStrictRegex = new RegExp(
+ '^(' + longPieces.join('|') + ')',
+ 'i'
+ );
+ this._monthsShortStrictRegex = new RegExp(
+ '^(' + shortPieces.join('|') + ')',
+ 'i'
+ );
+}
+
+// FORMATTING
+
+addFormatToken('Y', 0, 0, function () {
+ var y = this.year();
+ return y <= 9999 ? zeroFill(y, 4) : '+' + y;
+});
+
+addFormatToken(0, ['YY', 2], 0, function () {
+ return this.year() % 100;
+});
+
+addFormatToken(0, ['YYYY', 4], 0, 'year');
+addFormatToken(0, ['YYYYY', 5], 0, 'year');
+addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
+
+// ALIASES
+
+addUnitAlias('year', 'y');
+
+// PRIORITIES
+
+addUnitPriority('year', 1);
+
+// PARSING
+
+addRegexToken('Y', matchSigned);
+addRegexToken('YY', match1to2, match2);
+addRegexToken('YYYY', match1to4, match4);
+addRegexToken('YYYYY', match1to6, match6);
+addRegexToken('YYYYYY', match1to6, match6);
+
+addParseToken(['YYYYY', 'YYYYYY'], YEAR);
+addParseToken('YYYY', function (input, array) {
+ array[YEAR] =
+ input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
+});
+addParseToken('YY', function (input, array) {
+ array[YEAR] = hooks.parseTwoDigitYear(input);
+});
+addParseToken('Y', function (input, array) {
+ array[YEAR] = parseInt(input, 10);
+});
+
+// HELPERS
+
+function daysInYear(year) {
+ return isLeapYear(year) ? 366 : 365;
+}
+
+// HOOKS
+
+hooks.parseTwoDigitYear = function (input) {
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
+};
+
+// MOMENTS
+
+var getSetYear = makeGetSet('FullYear', true);
+
+function getIsLeapYear() {
+ return isLeapYear(this.year());
+}
+
+function createDate(y, m, d, h, M, s, ms) {
+ // can't just apply() to create a date:
+ // https://stackoverflow.com/q/181348
+ var date;
+ // the date constructor remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ date = new Date(y + 400, m, d, h, M, s, ms);
+ if (isFinite(date.getFullYear())) {
+ date.setFullYear(y);
+ }
+ } else {
+ date = new Date(y, m, d, h, M, s, ms);
+ }
+
+ return date;
+}
+
+function createUTCDate(y) {
+ var date, args;
+ // the Date.UTC function remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ args = Array.prototype.slice.call(arguments);
+ // preserve leap years using a full 400 year cycle, then reset
+ args[0] = y + 400;
+ date = new Date(Date.UTC.apply(null, args));
+ if (isFinite(date.getUTCFullYear())) {
+ date.setUTCFullYear(y);
+ }
+ } else {
+ date = new Date(Date.UTC.apply(null, arguments));
+ }
+
+ return date;
+}
+
+// start-of-first-week - start-of-year
+function firstWeekOffset(year, dow, doy) {
+ var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
+ fwd = 7 + dow - doy,
+ // first-week day local weekday -- which local weekday is fwd
+ fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
+
+ return -fwdlw + fwd - 1;
+}
+
+// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
+function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
+ var localWeekday = (7 + weekday - dow) % 7,
+ weekOffset = firstWeekOffset(year, dow, doy),
+ dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
+ resYear,
+ resDayOfYear;
+
+ if (dayOfYear <= 0) {
+ resYear = year - 1;
+ resDayOfYear = daysInYear(resYear) + dayOfYear;
+ } else if (dayOfYear > daysInYear(year)) {
+ resYear = year + 1;
+ resDayOfYear = dayOfYear - daysInYear(year);
+ } else {
+ resYear = year;
+ resDayOfYear = dayOfYear;
+ }
+
+ return {
+ year: resYear,
+ dayOfYear: resDayOfYear,
+ };
+}
+
+function weekOfYear(mom, dow, doy) {
+ var weekOffset = firstWeekOffset(mom.year(), dow, doy),
+ week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
+ resWeek,
+ resYear;
+
+ if (week < 1) {
+ resYear = mom.year() - 1;
+ resWeek = week + weeksInYear(resYear, dow, doy);
+ } else if (week > weeksInYear(mom.year(), dow, doy)) {
+ resWeek = week - weeksInYear(mom.year(), dow, doy);
+ resYear = mom.year() + 1;
+ } else {
+ resYear = mom.year();
+ resWeek = week;
+ }
+
+ return {
+ week: resWeek,
+ year: resYear,
+ };
+}
+
+function weeksInYear(year, dow, doy) {
+ var weekOffset = firstWeekOffset(year, dow, doy),
+ weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
+ return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
+}
+
+// FORMATTING
+
+addFormatToken('w', ['ww', 2], 'wo', 'week');
+addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
+
+// ALIASES
+
+addUnitAlias('week', 'w');
+addUnitAlias('isoWeek', 'W');
+
+// PRIORITIES
+
+addUnitPriority('week', 5);
+addUnitPriority('isoWeek', 5);
+
+// PARSING
+
+addRegexToken('w', match1to2);
+addRegexToken('ww', match1to2, match2);
+addRegexToken('W', match1to2);
+addRegexToken('WW', match1to2, match2);
+
+addWeekParseToken(
+ ['w', 'ww', 'W', 'WW'],
+ function (input, week, config, token) {
+ week[token.substr(0, 1)] = toInt(input);
+ }
+);
+
+// HELPERS
+
+// LOCALES
+
+function localeWeek(mom) {
+ return weekOfYear(mom, this._week.dow, this._week.doy).week;
+}
+
+var defaultLocaleWeek = {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+};
+
+function localeFirstDayOfWeek() {
+ return this._week.dow;
+}
+
+function localeFirstDayOfYear() {
+ return this._week.doy;
+}
+
+// MOMENTS
+
+function getSetWeek(input) {
+ var week = this.localeData().week(this);
+ return input == null ? week : this.add((input - week) * 7, 'd');
+}
+
+function getSetISOWeek(input) {
+ var week = weekOfYear(this, 1, 4).week;
+ return input == null ? week : this.add((input - week) * 7, 'd');
+}
+
+// FORMATTING
+
+addFormatToken('d', 0, 'do', 'day');
+
+addFormatToken('dd', 0, 0, function (format) {
+ return this.localeData().weekdaysMin(this, format);
+});
+
+addFormatToken('ddd', 0, 0, function (format) {
+ return this.localeData().weekdaysShort(this, format);
+});
+
+addFormatToken('dddd', 0, 0, function (format) {
+ return this.localeData().weekdays(this, format);
+});
+
+addFormatToken('e', 0, 0, 'weekday');
+addFormatToken('E', 0, 0, 'isoWeekday');
+
+// ALIASES
+
+addUnitAlias('day', 'd');
+addUnitAlias('weekday', 'e');
+addUnitAlias('isoWeekday', 'E');
+
+// PRIORITY
+addUnitPriority('day', 11);
+addUnitPriority('weekday', 11);
+addUnitPriority('isoWeekday', 11);
+
+// PARSING
+
+addRegexToken('d', match1to2);
+addRegexToken('e', match1to2);
+addRegexToken('E', match1to2);
+addRegexToken('dd', function (isStrict, locale) {
+ return locale.weekdaysMinRegex(isStrict);
+});
+addRegexToken('ddd', function (isStrict, locale) {
+ return locale.weekdaysShortRegex(isStrict);
+});
+addRegexToken('dddd', function (isStrict, locale) {
+ return locale.weekdaysRegex(isStrict);
+});
+
+addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
+ var weekday = config._locale.weekdaysParse(input, token, config._strict);
+ // if we didn't get a weekday name, mark the date as invalid
+ if (weekday != null) {
+ week.d = weekday;
+ } else {
+ getParsingFlags(config).invalidWeekday = input;
+ }
+});
+
+addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
+ week[token] = toInt(input);
+});
+
+// HELPERS
+
+function parseWeekday(input, locale) {
+ if (typeof input !== 'string') {
+ return input;
+ }
+
+ if (!isNaN(input)) {
+ return parseInt(input, 10);
+ }
+
+ input = locale.weekdaysParse(input);
+ if (typeof input === 'number') {
+ return input;
+ }
+
+ return null;
+}
+
+function parseIsoWeekday(input, locale) {
+ if (typeof input === 'string') {
+ return locale.weekdaysParse(input) % 7 || 7;
+ }
+ return isNaN(input) ? null : input;
+}
+
+// LOCALES
+function shiftWeekdays(ws, n) {
+ return ws.slice(n, 7).concat(ws.slice(0, n));
+}
+
+var defaultLocaleWeekdays =
+ 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ defaultWeekdaysRegex = matchWord,
+ defaultWeekdaysShortRegex = matchWord,
+ defaultWeekdaysMinRegex = matchWord;
+
+function localeWeekdays(m, format) {
+ var weekdays = isArray(this._weekdays)
+ ? this._weekdays
+ : this._weekdays[
+ m && m !== true && this._weekdays.isFormat.test(format)
+ ? 'format'
+ : 'standalone'
+ ];
+ return m === true
+ ? shiftWeekdays(weekdays, this._week.dow)
+ : m
+ ? weekdays[m.day()]
+ : weekdays;
+}
+
+function localeWeekdaysShort(m) {
+ return m === true
+ ? shiftWeekdays(this._weekdaysShort, this._week.dow)
+ : m
+ ? this._weekdaysShort[m.day()]
+ : this._weekdaysShort;
+}
+
+function localeWeekdaysMin(m) {
+ return m === true
+ ? shiftWeekdays(this._weekdaysMin, this._week.dow)
+ : m
+ ? this._weekdaysMin[m.day()]
+ : this._weekdaysMin;
+}
+
+function handleStrictParse$1(weekdayName, format, strict) {
+ var i,
+ ii,
+ mom,
+ llc = weekdayName.toLocaleLowerCase();
+ if (!this._weekdaysParse) {
+ this._weekdaysParse = [];
+ this._shortWeekdaysParse = [];
+ this._minWeekdaysParse = [];
+
+ for (i = 0; i < 7; ++i) {
+ mom = createUTC([2000, 1]).day(i);
+ this._minWeekdaysParse[i] = this.weekdaysMin(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._shortWeekdaysParse[i] = this.weekdaysShort(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
+ }
+ }
+
+ if (strict) {
+ if (format === 'dddd') {
+ ii = indexOf.call(this._weekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else if (format === 'ddd') {
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ } else {
+ if (format === 'dddd') {
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else if (format === 'ddd') {
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ }
+}
+
+function localeWeekdaysParse(weekdayName, format, strict) {
+ var i, mom, regex;
+
+ if (this._weekdaysParseExact) {
+ return handleStrictParse$1.call(this, weekdayName, format, strict);
+ }
+
+ if (!this._weekdaysParse) {
+ this._weekdaysParse = [];
+ this._minWeekdaysParse = [];
+ this._shortWeekdaysParse = [];
+ this._fullWeekdaysParse = [];
+ }
+
+ for (i = 0; i < 7; i++) {
+ // make the regex if we don't have it already
+
+ mom = createUTC([2000, 1]).day(i);
+ if (strict && !this._fullWeekdaysParse[i]) {
+ this._fullWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ this._shortWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ this._minWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ }
+ if (!this._weekdaysParse[i]) {
+ regex =
+ '^' +
+ this.weekdays(mom, '') +
+ '|^' +
+ this.weekdaysShort(mom, '') +
+ '|^' +
+ this.weekdaysMin(mom, '');
+ this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (
+ strict &&
+ format === 'dddd' &&
+ this._fullWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'ddd' &&
+ this._shortWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'dd' &&
+ this._minWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
+ return i;
+ }
+ }
+}
+
+// MOMENTS
+
+function getSetDayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
+ if (input != null) {
+ input = parseWeekday(input, this.localeData());
+ return this.add(input - day, 'd');
+ } else {
+ return day;
+ }
+}
+
+function getSetLocaleDayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
+ return input == null ? weekday : this.add(input - weekday, 'd');
+}
+
+function getSetISODayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+
+ // behaves the same as moment#day except
+ // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
+ // as a setter, sunday should belong to the previous week.
+
+ if (input != null) {
+ var weekday = parseIsoWeekday(input, this.localeData());
+ return this.day(this.day() % 7 ? weekday : weekday - 7);
+ } else {
+ return this.day() || 7;
+ }
+}
+
+function weekdaysRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysStrictRegex;
+ } else {
+ return this._weekdaysRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ this._weekdaysRegex = defaultWeekdaysRegex;
+ }
+ return this._weekdaysStrictRegex && isStrict
+ ? this._weekdaysStrictRegex
+ : this._weekdaysRegex;
+ }
+}
+
+function weekdaysShortRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysShortStrictRegex;
+ } else {
+ return this._weekdaysShortRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysShortRegex')) {
+ this._weekdaysShortRegex = defaultWeekdaysShortRegex;
+ }
+ return this._weekdaysShortStrictRegex && isStrict
+ ? this._weekdaysShortStrictRegex
+ : this._weekdaysShortRegex;
+ }
+}
+
+function weekdaysMinRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysMinStrictRegex;
+ } else {
+ return this._weekdaysMinRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysMinRegex')) {
+ this._weekdaysMinRegex = defaultWeekdaysMinRegex;
+ }
+ return this._weekdaysMinStrictRegex && isStrict
+ ? this._weekdaysMinStrictRegex
+ : this._weekdaysMinRegex;
+ }
+}
+
+function computeWeekdaysParse() {
+ function cmpLenRev(a, b) {
+ return b.length - a.length;
+ }
+
+ var minPieces = [],
+ shortPieces = [],
+ longPieces = [],
+ mixedPieces = [],
+ i,
+ mom,
+ minp,
+ shortp,
+ longp;
+ for (i = 0; i < 7; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, 1]).day(i);
+ minp = regexEscape(this.weekdaysMin(mom, ''));
+ shortp = regexEscape(this.weekdaysShort(mom, ''));
+ longp = regexEscape(this.weekdays(mom, ''));
+ minPieces.push(minp);
+ shortPieces.push(shortp);
+ longPieces.push(longp);
+ mixedPieces.push(minp);
+ mixedPieces.push(shortp);
+ mixedPieces.push(longp);
+ }
+ // Sorting makes sure if one weekday (or abbr) is a prefix of another it
+ // will match the longer piece.
+ minPieces.sort(cmpLenRev);
+ shortPieces.sort(cmpLenRev);
+ longPieces.sort(cmpLenRev);
+ mixedPieces.sort(cmpLenRev);
+
+ this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._weekdaysShortRegex = this._weekdaysRegex;
+ this._weekdaysMinRegex = this._weekdaysRegex;
+
+ this._weekdaysStrictRegex = new RegExp(
+ '^(' + longPieces.join('|') + ')',
+ 'i'
+ );
+ this._weekdaysShortStrictRegex = new RegExp(
+ '^(' + shortPieces.join('|') + ')',
+ 'i'
+ );
+ this._weekdaysMinStrictRegex = new RegExp(
+ '^(' + minPieces.join('|') + ')',
+ 'i'
+ );
+}
+
+// FORMATTING
+
+function hFormat() {
+ return this.hours() % 12 || 12;
+}
+
+function kFormat() {
+ return this.hours() || 24;
+}
+
+addFormatToken('H', ['HH', 2], 0, 'hour');
+addFormatToken('h', ['hh', 2], 0, hFormat);
+addFormatToken('k', ['kk', 2], 0, kFormat);
+
+addFormatToken('hmm', 0, 0, function () {
+ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
+});
+
+addFormatToken('hmmss', 0, 0, function () {
+ return (
+ '' +
+ hFormat.apply(this) +
+ zeroFill(this.minutes(), 2) +
+ zeroFill(this.seconds(), 2)
+ );
+});
+
+addFormatToken('Hmm', 0, 0, function () {
+ return '' + this.hours() + zeroFill(this.minutes(), 2);
+});
+
+addFormatToken('Hmmss', 0, 0, function () {
+ return (
+ '' +
+ this.hours() +
+ zeroFill(this.minutes(), 2) +
+ zeroFill(this.seconds(), 2)
+ );
+});
+
+function meridiem(token, lowercase) {
+ addFormatToken(token, 0, 0, function () {
+ return this.localeData().meridiem(
+ this.hours(),
+ this.minutes(),
+ lowercase
+ );
+ });
+}
+
+meridiem('a', true);
+meridiem('A', false);
+
+// ALIASES
+
+addUnitAlias('hour', 'h');
+
+// PRIORITY
+addUnitPriority('hour', 13);
+
+// PARSING
+
+function matchMeridiem(isStrict, locale) {
+ return locale._meridiemParse;
+}
+
+addRegexToken('a', matchMeridiem);
+addRegexToken('A', matchMeridiem);
+addRegexToken('H', match1to2);
+addRegexToken('h', match1to2);
+addRegexToken('k', match1to2);
+addRegexToken('HH', match1to2, match2);
+addRegexToken('hh', match1to2, match2);
+addRegexToken('kk', match1to2, match2);
+
+addRegexToken('hmm', match3to4);
+addRegexToken('hmmss', match5to6);
+addRegexToken('Hmm', match3to4);
+addRegexToken('Hmmss', match5to6);
+
+addParseToken(['H', 'HH'], HOUR);
+addParseToken(['k', 'kk'], function (input, array, config) {
+ var kInput = toInt(input);
+ array[HOUR] = kInput === 24 ? 0 : kInput;
+});
+addParseToken(['a', 'A'], function (input, array, config) {
+ config._isPm = config._locale.isPM(input);
+ config._meridiem = input;
+});
+addParseToken(['h', 'hh'], function (input, array, config) {
+ array[HOUR] = toInt(input);
+ getParsingFlags(config).bigHour = true;
+});
+addParseToken('hmm', function (input, array, config) {
+ var pos = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos));
+ array[MINUTE] = toInt(input.substr(pos));
+ getParsingFlags(config).bigHour = true;
+});
+addParseToken('hmmss', function (input, array, config) {
+ var pos1 = input.length - 4,
+ pos2 = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos1));
+ array[MINUTE] = toInt(input.substr(pos1, 2));
+ array[SECOND] = toInt(input.substr(pos2));
+ getParsingFlags(config).bigHour = true;
+});
+addParseToken('Hmm', function (input, array, config) {
+ var pos = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos));
+ array[MINUTE] = toInt(input.substr(pos));
+});
+addParseToken('Hmmss', function (input, array, config) {
+ var pos1 = input.length - 4,
+ pos2 = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos1));
+ array[MINUTE] = toInt(input.substr(pos1, 2));
+ array[SECOND] = toInt(input.substr(pos2));
+});
+
+// LOCALES
+
+function localeIsPM(input) {
+ // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
+ // Using charAt should be more compatible.
+ return (input + '').toLowerCase().charAt(0) === 'p';
+}
+
+var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
+ // Setting the hour should keep the time, because the user explicitly
+ // specified which hour they want. So trying to maintain the same hour (in
+ // a new timezone) makes sense. Adding/subtracting hours does not follow
+ // this rule.
+ getSetHour = makeGetSet('Hours', true);
+
+function localeMeridiem(hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'pm' : 'PM';
+ } else {
+ return isLower ? 'am' : 'AM';
+ }
+}
+
+var baseConfig = {
+ calendar: defaultCalendar,
+ longDateFormat: defaultLongDateFormat,
+ invalidDate: defaultInvalidDate,
+ ordinal: defaultOrdinal,
+ dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
+ relativeTime: defaultRelativeTime,
+
+ months: defaultLocaleMonths,
+ monthsShort: defaultLocaleMonthsShort,
+
+ week: defaultLocaleWeek,
+
+ weekdays: defaultLocaleWeekdays,
+ weekdaysMin: defaultLocaleWeekdaysMin,
+ weekdaysShort: defaultLocaleWeekdaysShort,
+
+ meridiemParse: defaultLocaleMeridiemParse,
+};
+
+// internal storage for locale config files
+var locales = {},
+ localeFamilies = {},
+ globalLocale;
+
+function commonPrefix(arr1, arr2) {
+ var i,
+ minl = Math.min(arr1.length, arr2.length);
+ for (i = 0; i < minl; i += 1) {
+ if (arr1[i] !== arr2[i]) {
+ return i;
+ }
+ }
+ return minl;
+}
+
+function normalizeLocale(key) {
+ return key ? key.toLowerCase().replace('_', '-') : key;
+}
+
+// pick the locale from the array
+// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
+// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
+function chooseLocale(names) {
+ var i = 0,
+ j,
+ next,
+ locale,
+ split;
+
+ while (i < names.length) {
+ split = normalizeLocale(names[i]).split('-');
+ j = split.length;
+ next = normalizeLocale(names[i + 1]);
+ next = next ? next.split('-') : null;
+ while (j > 0) {
+ locale = loadLocale(split.slice(0, j).join('-'));
+ if (locale) {
+ return locale;
+ }
+ if (
+ next &&
+ next.length >= j &&
+ commonPrefix(split, next) >= j - 1
+ ) {
+ //the next array item is better than a shallower substring of this one
+ break;
+ }
+ j--;
+ }
+ i++;
+ }
+ return globalLocale;
+}
+
+function isLocaleNameSane(name) {
+ // Prevent names that look like filesystem paths, i.e contain '/' or '\'
+ return name.match('^[^/\\\\]*$') != null;
+}
+
+function loadLocale(name) {
+ var oldLocale = null,
+ aliasedRequire;
+ // TODO: Find a better way to register and load all the locales in Node
+ if (
+ locales[name] === undefined &&
+ typeof module !== 'undefined' &&
+ module &&
+ module.exports &&
+ isLocaleNameSane(name)
+ ) {
+ try {
+ oldLocale = globalLocale._abbr;
+ aliasedRequire = require;
+ aliasedRequire('./locale/' + name);
+ getSetGlobalLocale(oldLocale);
+ } catch (e) {
+ // mark as not found to avoid repeating expensive file require call causing high CPU
+ // when trying to find en-US, en_US, en-us for every format call
+ locales[name] = null; // null means not found
+ }
+ }
+ return locales[name];
+}
+
+// This function will load locale and then set the global locale. If
+// no arguments are passed in, it will simply return the current global
+// locale key.
+function getSetGlobalLocale(key, values) {
+ var data;
+ if (key) {
+ if (isUndefined(values)) {
+ data = getLocale(key);
+ } else {
+ data = defineLocale(key, values);
+ }
+
+ if (data) {
+ // moment.duration._locale = moment._locale = data;
+ globalLocale = data;
+ } else {
+ if (typeof console !== 'undefined' && console.warn) {
+ //warn user if arguments are passed but the locale could not be set
+ console.warn(
+ 'Locale ' + key + ' not found. Did you forget to load it?'
+ );
+ }
+ }
+ }
+
+ return globalLocale._abbr;
+}
+
+function defineLocale(name, config) {
+ if (config !== null) {
+ var locale,
+ parentConfig = baseConfig;
+ config.abbr = name;
+ if (locales[name] != null) {
+ deprecateSimple(
+ 'defineLocaleOverride',
+ 'use moment.updateLocale(localeName, config) to change ' +
+ 'an existing locale. moment.defineLocale(localeName, ' +
+ 'config) should only be used for creating a new locale ' +
+ 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
+ );
+ parentConfig = locales[name]._config;
+ } else if (config.parentLocale != null) {
+ if (locales[config.parentLocale] != null) {
+ parentConfig = locales[config.parentLocale]._config;
+ } else {
+ locale = loadLocale(config.parentLocale);
+ if (locale != null) {
+ parentConfig = locale._config;
+ } else {
+ if (!localeFamilies[config.parentLocale]) {
+ localeFamilies[config.parentLocale] = [];
+ }
+ localeFamilies[config.parentLocale].push({
+ name: name,
+ config: config,
+ });
+ return null;
+ }
+ }
+ }
+ locales[name] = new Locale(mergeConfigs(parentConfig, config));
+
+ if (localeFamilies[name]) {
+ localeFamilies[name].forEach(function (x) {
+ defineLocale(x.name, x.config);
+ });
+ }
+
+ // backwards compat for now: also set the locale
+ // make sure we set the locale AFTER all child locales have been
+ // created, so we won't end up with the child locale set.
+ getSetGlobalLocale(name);
+
+ return locales[name];
+ } else {
+ // useful for testing
+ delete locales[name];
+ return null;
+ }
+}
+
+function updateLocale(name, config) {
+ if (config != null) {
+ var locale,
+ tmpLocale,
+ parentConfig = baseConfig;
+
+ if (locales[name] != null && locales[name].parentLocale != null) {
+ // Update existing child locale in-place to avoid memory-leaks
+ locales[name].set(mergeConfigs(locales[name]._config, config));
+ } else {
+ // MERGE
+ tmpLocale = loadLocale(name);
+ if (tmpLocale != null) {
+ parentConfig = tmpLocale._config;
+ }
+ config = mergeConfigs(parentConfig, config);
+ if (tmpLocale == null) {
+ // updateLocale is called for creating a new locale
+ // Set abbr so it will have a name (getters return
+ // undefined otherwise).
+ config.abbr = name;
+ }
+ locale = new Locale(config);
+ locale.parentLocale = locales[name];
+ locales[name] = locale;
+ }
+
+ // backwards compat for now: also set the locale
+ getSetGlobalLocale(name);
+ } else {
+ // pass null for config to unupdate, useful for tests
+ if (locales[name] != null) {
+ if (locales[name].parentLocale != null) {
+ locales[name] = locales[name].parentLocale;
+ if (name === getSetGlobalLocale()) {
+ getSetGlobalLocale(name);
+ }
+ } else if (locales[name] != null) {
+ delete locales[name];
+ }
+ }
+ }
+ return locales[name];
+}
+
+// returns locale data
+function getLocale(key) {
+ var locale;
+
+ if (key && key._locale && key._locale._abbr) {
+ key = key._locale._abbr;
+ }
+
+ if (!key) {
+ return globalLocale;
+ }
+
+ if (!isArray(key)) {
+ //short-circuit everything else
+ locale = loadLocale(key);
+ if (locale) {
+ return locale;
+ }
+ key = [key];
+ }
+
+ return chooseLocale(key);
+}
+
+function listLocales() {
+ return keys(locales);
+}
+
+function checkOverflow(m) {
+ var overflow,
+ a = m._a;
+
+ if (a && getParsingFlags(m).overflow === -2) {
+ overflow =
+ a[MONTH] < 0 || a[MONTH] > 11
+ ? MONTH
+ : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
+ ? DATE
+ : a[HOUR] < 0 ||
+ a[HOUR] > 24 ||
+ (a[HOUR] === 24 &&
+ (a[MINUTE] !== 0 ||
+ a[SECOND] !== 0 ||
+ a[MILLISECOND] !== 0))
+ ? HOUR
+ : a[MINUTE] < 0 || a[MINUTE] > 59
+ ? MINUTE
+ : a[SECOND] < 0 || a[SECOND] > 59
+ ? SECOND
+ : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
+ ? MILLISECOND
+ : -1;
+
+ if (
+ getParsingFlags(m)._overflowDayOfYear &&
+ (overflow < YEAR || overflow > DATE)
+ ) {
+ overflow = DATE;
+ }
+ if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
+ overflow = WEEK;
+ }
+ if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
+ overflow = WEEKDAY;
+ }
+
+ getParsingFlags(m).overflow = overflow;
+ }
+
+ return m;
+}
+
+// iso 8601 regex
+// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
+var extendedIsoRegex =
+ /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+ basicIsoRegex =
+ /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+ tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
+ isoDates = [
+ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
+ ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
+ ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
+ ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
+ ['YYYY-DDD', /\d{4}-\d{3}/],
+ ['YYYY-MM', /\d{4}-\d\d/, false],
+ ['YYYYYYMMDD', /[+-]\d{10}/],
+ ['YYYYMMDD', /\d{8}/],
+ ['GGGG[W]WWE', /\d{4}W\d{3}/],
+ ['GGGG[W]WW', /\d{4}W\d{2}/, false],
+ ['YYYYDDD', /\d{7}/],
+ ['YYYYMM', /\d{6}/, false],
+ ['YYYY', /\d{4}/, false],
+ ],
+ // iso time formats and regexes
+ isoTimes = [
+ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
+ ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
+ ['HH:mm:ss', /\d\d:\d\d:\d\d/],
+ ['HH:mm', /\d\d:\d\d/],
+ ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
+ ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
+ ['HHmmss', /\d\d\d\d\d\d/],
+ ['HHmm', /\d\d\d\d/],
+ ['HH', /\d\d/],
+ ],
+ aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
+ // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
+ rfc2822 =
+ /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
+ obsOffsets = {
+ UT: 0,
+ GMT: 0,
+ EDT: -4 * 60,
+ EST: -5 * 60,
+ CDT: -5 * 60,
+ CST: -6 * 60,
+ MDT: -6 * 60,
+ MST: -7 * 60,
+ PDT: -7 * 60,
+ PST: -8 * 60,
+ };
+
+// date from iso format
+function configFromISO(config) {
+ var i,
+ l,
+ string = config._i,
+ match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
+ allowTime,
+ dateFormat,
+ timeFormat,
+ tzFormat,
+ isoDatesLen = isoDates.length,
+ isoTimesLen = isoTimes.length;
+
+ if (match) {
+ getParsingFlags(config).iso = true;
+ for (i = 0, l = isoDatesLen; i < l; i++) {
+ if (isoDates[i][1].exec(match[1])) {
+ dateFormat = isoDates[i][0];
+ allowTime = isoDates[i][2] !== false;
+ break;
+ }
+ }
+ if (dateFormat == null) {
+ config._isValid = false;
+ return;
+ }
+ if (match[3]) {
+ for (i = 0, l = isoTimesLen; i < l; i++) {
+ if (isoTimes[i][1].exec(match[3])) {
+ // match[2] should be 'T' or space
+ timeFormat = (match[2] || ' ') + isoTimes[i][0];
+ break;
+ }
+ }
+ if (timeFormat == null) {
+ config._isValid = false;
+ return;
+ }
+ }
+ if (!allowTime && timeFormat != null) {
+ config._isValid = false;
+ return;
+ }
+ if (match[4]) {
+ if (tzRegex.exec(match[4])) {
+ tzFormat = 'Z';
+ } else {
+ config._isValid = false;
+ return;
+ }
+ }
+ config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
+ configFromStringAndFormat(config);
+ } else {
+ config._isValid = false;
+ }
+}
+
+function extractFromRFC2822Strings(
+ yearStr,
+ monthStr,
+ dayStr,
+ hourStr,
+ minuteStr,
+ secondStr
+) {
+ var result = [
+ untruncateYear(yearStr),
+ defaultLocaleMonthsShort.indexOf(monthStr),
+ parseInt(dayStr, 10),
+ parseInt(hourStr, 10),
+ parseInt(minuteStr, 10),
+ ];
+
+ if (secondStr) {
+ result.push(parseInt(secondStr, 10));
+ }
+
+ return result;
+}
+
+function untruncateYear(yearStr) {
+ var year = parseInt(yearStr, 10);
+ if (year <= 49) {
+ return 2000 + year;
+ } else if (year <= 999) {
+ return 1900 + year;
+ }
+ return year;
+}
+
+function preprocessRFC2822(s) {
+ // Remove comments and folding whitespace and replace multiple-spaces with a single space
+ return s
+ .replace(/\([^()]*\)|[\n\t]/g, ' ')
+ .replace(/(\s\s+)/g, ' ')
+ .replace(/^\s\s*/, '')
+ .replace(/\s\s*$/, '');
+}
+
+function checkWeekday(weekdayStr, parsedInput, config) {
+ if (weekdayStr) {
+ // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
+ var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
+ weekdayActual = new Date(
+ parsedInput[0],
+ parsedInput[1],
+ parsedInput[2]
+ ).getDay();
+ if (weekdayProvided !== weekdayActual) {
+ getParsingFlags(config).weekdayMismatch = true;
+ config._isValid = false;
+ return false;
+ }
+ }
+ return true;
+}
+
+function calculateOffset(obsOffset, militaryOffset, numOffset) {
+ if (obsOffset) {
+ return obsOffsets[obsOffset];
+ } else if (militaryOffset) {
+ // the only allowed military tz is Z
+ return 0;
+ } else {
+ var hm = parseInt(numOffset, 10),
+ m = hm % 100,
+ h = (hm - m) / 100;
+ return h * 60 + m;
+ }
+}
+
+// date and time from ref 2822 format
+function configFromRFC2822(config) {
+ var match = rfc2822.exec(preprocessRFC2822(config._i)),
+ parsedArray;
+ if (match) {
+ parsedArray = extractFromRFC2822Strings(
+ match[4],
+ match[3],
+ match[2],
+ match[5],
+ match[6],
+ match[7]
+ );
+ if (!checkWeekday(match[1], parsedArray, config)) {
+ return;
+ }
+
+ config._a = parsedArray;
+ config._tzm = calculateOffset(match[8], match[9], match[10]);
+
+ config._d = createUTCDate.apply(null, config._a);
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
+
+ getParsingFlags(config).rfc2822 = true;
+ } else {
+ config._isValid = false;
+ }
+}
+
+// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
+function configFromString(config) {
+ var matched = aspNetJsonRegex.exec(config._i);
+ if (matched !== null) {
+ config._d = new Date(+matched[1]);
+ return;
+ }
+
+ configFromISO(config);
+ if (config._isValid === false) {
+ delete config._isValid;
+ } else {
+ return;
+ }
+
+ configFromRFC2822(config);
+ if (config._isValid === false) {
+ delete config._isValid;
+ } else {
+ return;
+ }
+
+ if (config._strict) {
+ config._isValid = false;
+ } else {
+ // Final attempt, use Input Fallback
+ hooks.createFromInputFallback(config);
+ }
+}
+
+hooks.createFromInputFallback = deprecate(
+ 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
+ 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
+ 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
+ function (config) {
+ config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
+ }
+);
+
+// Pick the first defined of two or three arguments.
+function defaults(a, b, c) {
+ if (a != null) {
+ return a;
+ }
+ if (b != null) {
+ return b;
+ }
+ return c;
+}
+
+function currentDateArray(config) {
+ // hooks is actually the exported moment object
+ var nowValue = new Date(hooks.now());
+ if (config._useUTC) {
+ return [
+ nowValue.getUTCFullYear(),
+ nowValue.getUTCMonth(),
+ nowValue.getUTCDate(),
+ ];
+ }
+ return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
+}
+
+// convert an array to a date.
+// the array should mirror the parameters below
+// note: all values past the year are optional and will default to the lowest possible value.
+// [year, month, day , hour, minute, second, millisecond]
+function configFromArray(config) {
+ var i,
+ date,
+ input = [],
+ currentDate,
+ expectedWeekday,
+ yearToUse;
+
+ if (config._d) {
+ return;
+ }
+
+ currentDate = currentDateArray(config);
+
+ //compute day of the year from weeks and weekdays
+ if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
+ dayOfYearFromWeekInfo(config);
+ }
+
+ //if the day of the year is set, figure out what it is
+ if (config._dayOfYear != null) {
+ yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
+
+ if (
+ config._dayOfYear > daysInYear(yearToUse) ||
+ config._dayOfYear === 0
+ ) {
+ getParsingFlags(config)._overflowDayOfYear = true;
+ }
+
+ date = createUTCDate(yearToUse, 0, config._dayOfYear);
+ config._a[MONTH] = date.getUTCMonth();
+ config._a[DATE] = date.getUTCDate();
+ }
+
+ // Default to current date.
+ // * if no year, month, day of month are given, default to today
+ // * if day of month is given, default month and year
+ // * if month is given, default only year
+ // * if year is given, don't default anything
+ for (i = 0; i < 3 && config._a[i] == null; ++i) {
+ config._a[i] = input[i] = currentDate[i];
+ }
+
+ // Zero out whatever was not defaulted, including time
+ for (; i < 7; i++) {
+ config._a[i] = input[i] =
+ config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
+ }
+
+ // Check for 24:00:00.000
+ if (
+ config._a[HOUR] === 24 &&
+ config._a[MINUTE] === 0 &&
+ config._a[SECOND] === 0 &&
+ config._a[MILLISECOND] === 0
+ ) {
+ config._nextDay = true;
+ config._a[HOUR] = 0;
+ }
+
+ config._d = (config._useUTC ? createUTCDate : createDate).apply(
+ null,
+ input
+ );
+ expectedWeekday = config._useUTC
+ ? config._d.getUTCDay()
+ : config._d.getDay();
+
+ // Apply timezone offset from input. The actual utcOffset can be changed
+ // with parseZone.
+ if (config._tzm != null) {
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
+ }
+
+ if (config._nextDay) {
+ config._a[HOUR] = 24;
+ }
+
+ // check for mismatching day of week
+ if (
+ config._w &&
+ typeof config._w.d !== 'undefined' &&
+ config._w.d !== expectedWeekday
+ ) {
+ getParsingFlags(config).weekdayMismatch = true;
+ }
+}
+
+function dayOfYearFromWeekInfo(config) {
+ var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
+
+ w = config._w;
+ if (w.GG != null || w.W != null || w.E != null) {
+ dow = 1;
+ doy = 4;
+
+ // TODO: We need to take the current isoWeekYear, but that depends on
+ // how we interpret now (local, utc, fixed offset). So create
+ // a now version of current config (take local/utc/offset flags, and
+ // create now).
+ weekYear = defaults(
+ w.GG,
+ config._a[YEAR],
+ weekOfYear(createLocal(), 1, 4).year
+ );
+ week = defaults(w.W, 1);
+ weekday = defaults(w.E, 1);
+ if (weekday < 1 || weekday > 7) {
+ weekdayOverflow = true;
+ }
+ } else {
+ dow = config._locale._week.dow;
+ doy = config._locale._week.doy;
+
+ curWeek = weekOfYear(createLocal(), dow, doy);
+
+ weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
+
+ // Default to current week.
+ week = defaults(w.w, curWeek.week);
+
+ if (w.d != null) {
+ // weekday -- low day numbers are considered next week
+ weekday = w.d;
+ if (weekday < 0 || weekday > 6) {
+ weekdayOverflow = true;
+ }
+ } else if (w.e != null) {
+ // local weekday -- counting starts from beginning of week
+ weekday = w.e + dow;
+ if (w.e < 0 || w.e > 6) {
+ weekdayOverflow = true;
+ }
+ } else {
+ // default to beginning of week
+ weekday = dow;
+ }
+ }
+ if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
+ getParsingFlags(config)._overflowWeeks = true;
+ } else if (weekdayOverflow != null) {
+ getParsingFlags(config)._overflowWeekday = true;
+ } else {
+ temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
+ config._a[YEAR] = temp.year;
+ config._dayOfYear = temp.dayOfYear;
+ }
+}
+
+// constant that refers to the ISO standard
+hooks.ISO_8601 = function () {};
+
+// constant that refers to the RFC 2822 form
+hooks.RFC_2822 = function () {};
+
+// date from string and format string
+function configFromStringAndFormat(config) {
+ // TODO: Move this to another part of the creation flow to prevent circular deps
+ if (config._f === hooks.ISO_8601) {
+ configFromISO(config);
+ return;
+ }
+ if (config._f === hooks.RFC_2822) {
+ configFromRFC2822(config);
+ return;
+ }
+ config._a = [];
+ getParsingFlags(config).empty = true;
+
+ // This array is used to make a Date, either with `new Date` or `Date.UTC`
+ var string = '' + config._i,
+ i,
+ parsedInput,
+ tokens,
+ token,
+ skipped,
+ stringLength = string.length,
+ totalParsedInputLength = 0,
+ era,
+ tokenLen;
+
+ tokens =
+ expandFormat(config._f, config._locale).match(formattingTokens) || [];
+ tokenLen = tokens.length;
+ for (i = 0; i < tokenLen; i++) {
+ token = tokens[i];
+ parsedInput = (string.match(getParseRegexForToken(token, config)) ||
+ [])[0];
+ if (parsedInput) {
+ skipped = string.substr(0, string.indexOf(parsedInput));
+ if (skipped.length > 0) {
+ getParsingFlags(config).unusedInput.push(skipped);
+ }
+ string = string.slice(
+ string.indexOf(parsedInput) + parsedInput.length
+ );
+ totalParsedInputLength += parsedInput.length;
+ }
+ // don't parse if it's not a known token
+ if (formatTokenFunctions[token]) {
+ if (parsedInput) {
+ getParsingFlags(config).empty = false;
+ } else {
+ getParsingFlags(config).unusedTokens.push(token);
+ }
+ addTimeToArrayFromToken(token, parsedInput, config);
+ } else if (config._strict && !parsedInput) {
+ getParsingFlags(config).unusedTokens.push(token);
+ }
+ }
+
+ // add remaining unparsed input length to the string
+ getParsingFlags(config).charsLeftOver =
+ stringLength - totalParsedInputLength;
+ if (string.length > 0) {
+ getParsingFlags(config).unusedInput.push(string);
+ }
+
+ // clear _12h flag if hour is <= 12
+ if (
+ config._a[HOUR] <= 12 &&
+ getParsingFlags(config).bigHour === true &&
+ config._a[HOUR] > 0
+ ) {
+ getParsingFlags(config).bigHour = undefined;
+ }
+
+ getParsingFlags(config).parsedDateParts = config._a.slice(0);
+ getParsingFlags(config).meridiem = config._meridiem;
+ // handle meridiem
+ config._a[HOUR] = meridiemFixWrap(
+ config._locale,
+ config._a[HOUR],
+ config._meridiem
+ );
+
+ // handle era
+ era = getParsingFlags(config).era;
+ if (era !== null) {
+ config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
+ }
+
+ configFromArray(config);
+ checkOverflow(config);
+}
+
+function meridiemFixWrap(locale, hour, meridiem) {
+ var isPm;
+
+ if (meridiem == null) {
+ // nothing to do
+ return hour;
+ }
+ if (locale.meridiemHour != null) {
+ return locale.meridiemHour(hour, meridiem);
+ } else if (locale.isPM != null) {
+ // Fallback
+ isPm = locale.isPM(meridiem);
+ if (isPm && hour < 12) {
+ hour += 12;
+ }
+ if (!isPm && hour === 12) {
+ hour = 0;
+ }
+ return hour;
+ } else {
+ // this is not supposed to happen
+ return hour;
+ }
+}
+
+// date from string and array of format strings
+function configFromStringAndArray(config) {
+ var tempConfig,
+ bestMoment,
+ scoreToBeat,
+ i,
+ currentScore,
+ validFormatFound,
+ bestFormatIsValid = false,
+ configfLen = config._f.length;
+
+ if (configfLen === 0) {
+ getParsingFlags(config).invalidFormat = true;
+ config._d = new Date(NaN);
+ return;
+ }
+
+ for (i = 0; i < configfLen; i++) {
+ currentScore = 0;
+ validFormatFound = false;
+ tempConfig = copyConfig({}, config);
+ if (config._useUTC != null) {
+ tempConfig._useUTC = config._useUTC;
+ }
+ tempConfig._f = config._f[i];
+ configFromStringAndFormat(tempConfig);
+
+ if (isValid(tempConfig)) {
+ validFormatFound = true;
+ }
+
+ // if there is any input that was not parsed add a penalty for that format
+ currentScore += getParsingFlags(tempConfig).charsLeftOver;
+
+ //or tokens
+ currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
+
+ getParsingFlags(tempConfig).score = currentScore;
+
+ if (!bestFormatIsValid) {
+ if (
+ scoreToBeat == null ||
+ currentScore < scoreToBeat ||
+ validFormatFound
+ ) {
+ scoreToBeat = currentScore;
+ bestMoment = tempConfig;
+ if (validFormatFound) {
+ bestFormatIsValid = true;
+ }
+ }
+ } else {
+ if (currentScore < scoreToBeat) {
+ scoreToBeat = currentScore;
+ bestMoment = tempConfig;
+ }
+ }
+ }
+
+ extend(config, bestMoment || tempConfig);
+}
+
+function configFromObject(config) {
+ if (config._d) {
+ return;
+ }
+
+ var i = normalizeObjectUnits(config._i),
+ dayOrDate = i.day === undefined ? i.date : i.day;
+ config._a = map(
+ [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
+ function (obj) {
+ return obj && parseInt(obj, 10);
+ }
+ );
+
+ configFromArray(config);
+}
+
+function createFromConfig(config) {
+ var res = new Moment(checkOverflow(prepareConfig(config)));
+ if (res._nextDay) {
+ // Adding is smart enough around DST
+ res.add(1, 'd');
+ res._nextDay = undefined;
+ }
+
+ return res;
+}
+
+function prepareConfig(config) {
+ var input = config._i,
+ format = config._f;
+
+ config._locale = config._locale || getLocale(config._l);
+
+ if (input === null || (format === undefined && input === '')) {
+ return createInvalid({ nullInput: true });
+ }
+
+ if (typeof input === 'string') {
+ config._i = input = config._locale.preparse(input);
+ }
+
+ if (isMoment(input)) {
+ return new Moment(checkOverflow(input));
+ } else if (isDate(input)) {
+ config._d = input;
+ } else if (isArray(format)) {
+ configFromStringAndArray(config);
+ } else if (format) {
+ configFromStringAndFormat(config);
+ } else {
+ configFromInput(config);
+ }
+
+ if (!isValid(config)) {
+ config._d = null;
+ }
+
+ return config;
+}
+
+function configFromInput(config) {
+ var input = config._i;
+ if (isUndefined(input)) {
+ config._d = new Date(hooks.now());
+ } else if (isDate(input)) {
+ config._d = new Date(input.valueOf());
+ } else if (typeof input === 'string') {
+ configFromString(config);
+ } else if (isArray(input)) {
+ config._a = map(input.slice(0), function (obj) {
+ return parseInt(obj, 10);
+ });
+ configFromArray(config);
+ } else if (isObject(input)) {
+ configFromObject(config);
+ } else if (isNumber(input)) {
+ // from milliseconds
+ config._d = new Date(input);
+ } else {
+ hooks.createFromInputFallback(config);
+ }
+}
+
+function createLocalOrUTC(input, format, locale, strict, isUTC) {
+ var c = {};
+
+ if (format === true || format === false) {
+ strict = format;
+ format = undefined;
+ }
+
+ if (locale === true || locale === false) {
+ strict = locale;
+ locale = undefined;
+ }
+
+ if (
+ (isObject(input) && isObjectEmpty(input)) ||
+ (isArray(input) && input.length === 0)
+ ) {
+ input = undefined;
+ }
+ // object construction must be done this way.
+ // https://github.com/moment/moment/issues/1423
+ c._isAMomentObject = true;
+ c._useUTC = c._isUTC = isUTC;
+ c._l = locale;
+ c._i = input;
+ c._f = format;
+ c._strict = strict;
+
+ return createFromConfig(c);
+}
+
+function createLocal(input, format, locale, strict) {
+ return createLocalOrUTC(input, format, locale, strict, false);
+}
+
+var prototypeMin = deprecate(
+ 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
+ function () {
+ var other = createLocal.apply(null, arguments);
+ if (this.isValid() && other.isValid()) {
+ return other < this ? this : other;
+ } else {
+ return createInvalid();
+ }
+ }
+ ),
+ prototypeMax = deprecate(
+ 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
+ function () {
+ var other = createLocal.apply(null, arguments);
+ if (this.isValid() && other.isValid()) {
+ return other > this ? this : other;
+ } else {
+ return createInvalid();
+ }
+ }
+ );
+
+// Pick a moment m from moments so that m[fn](other) is true for all
+// other. This relies on the function fn to be transitive.
+//
+// moments should either be an array of moment objects or an array, whose
+// first element is an array of moment objects.
+function pickBy(fn, moments) {
+ var res, i;
+ if (moments.length === 1 && isArray(moments[0])) {
+ moments = moments[0];
+ }
+ if (!moments.length) {
+ return createLocal();
+ }
+ res = moments[0];
+ for (i = 1; i < moments.length; ++i) {
+ if (!moments[i].isValid() || moments[i][fn](res)) {
+ res = moments[i];
+ }
+ }
+ return res;
+}
+
+// TODO: Use [].sort instead?
+function min() {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isBefore', args);
+}
+
+function max() {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isAfter', args);
+}
+
+var now = function () {
+ return Date.now ? Date.now() : +new Date();
+};
+
+var ordering = [
+ 'year',
+ 'quarter',
+ 'month',
+ 'week',
+ 'day',
+ 'hour',
+ 'minute',
+ 'second',
+ 'millisecond',
+];
+
+function isDurationValid(m) {
+ var key,
+ unitHasDecimal = false,
+ i,
+ orderLen = ordering.length;
+ for (key in m) {
+ if (
+ hasOwnProp(m, key) &&
+ !(
+ indexOf.call(ordering, key) !== -1 &&
+ (m[key] == null || !isNaN(m[key]))
+ )
+ ) {
+ return false;
+ }
+ }
+
+ for (i = 0; i < orderLen; ++i) {
+ if (m[ordering[i]]) {
+ if (unitHasDecimal) {
+ return false; // only allow non-integers for smallest unit
+ }
+ if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
+ unitHasDecimal = true;
+ }
+ }
+ }
+
+ return true;
+}
+
+function isValid$1() {
+ return this._isValid;
+}
+
+function createInvalid$1() {
+ return createDuration(NaN);
+}
+
+function Duration(duration) {
+ var normalizedInput = normalizeObjectUnits(duration),
+ years = normalizedInput.year || 0,
+ quarters = normalizedInput.quarter || 0,
+ months = normalizedInput.month || 0,
+ weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
+ days = normalizedInput.day || 0,
+ hours = normalizedInput.hour || 0,
+ minutes = normalizedInput.minute || 0,
+ seconds = normalizedInput.second || 0,
+ milliseconds = normalizedInput.millisecond || 0;
+
+ this._isValid = isDurationValid(normalizedInput);
+
+ // representation for dateAddRemove
+ this._milliseconds =
+ +milliseconds +
+ seconds * 1e3 + // 1000
+ minutes * 6e4 + // 1000 * 60
+ hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
+ // Because of dateAddRemove treats 24 hours as different from a
+ // day when working around DST, we need to store them separately
+ this._days = +days + weeks * 7;
+ // It is impossible to translate months into days without knowing
+ // which months you are are talking about, so we have to store
+ // it separately.
+ this._months = +months + quarters * 3 + years * 12;
+
+ this._data = {};
+
+ this._locale = getLocale();
+
+ this._bubble();
+}
+
+function isDuration(obj) {
+ return obj instanceof Duration;
+}
+
+function absRound(number) {
+ if (number < 0) {
+ return Math.round(-1 * number) * -1;
+ } else {
+ return Math.round(number);
+ }
+}
+
+// compare two arrays, return the number of differences
+function compareArrays(array1, array2, dontConvert) {
+ var len = Math.min(array1.length, array2.length),
+ lengthDiff = Math.abs(array1.length - array2.length),
+ diffs = 0,
+ i;
+ for (i = 0; i < len; i++) {
+ if (
+ (dontConvert && array1[i] !== array2[i]) ||
+ (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
+ ) {
+ diffs++;
+ }
+ }
+ return diffs + lengthDiff;
+}
+
+// FORMATTING
+
+function offset(token, separator) {
+ addFormatToken(token, 0, 0, function () {
+ var offset = this.utcOffset(),
+ sign = '+';
+ if (offset < 0) {
+ offset = -offset;
+ sign = '-';
+ }
+ return (
+ sign +
+ zeroFill(~~(offset / 60), 2) +
+ separator +
+ zeroFill(~~offset % 60, 2)
+ );
+ });
+}
+
+offset('Z', ':');
+offset('ZZ', '');
+
+// PARSING
+
+addRegexToken('Z', matchShortOffset);
+addRegexToken('ZZ', matchShortOffset);
+addParseToken(['Z', 'ZZ'], function (input, array, config) {
+ config._useUTC = true;
+ config._tzm = offsetFromString(matchShortOffset, input);
+});
+
+// HELPERS
+
+// timezone chunker
+// '+10:00' > ['10', '00']
+// '-1530' > ['-15', '30']
+var chunkOffset = /([\+\-]|\d\d)/gi;
+
+function offsetFromString(matcher, string) {
+ var matches = (string || '').match(matcher),
+ chunk,
+ parts,
+ minutes;
+
+ if (matches === null) {
+ return null;
+ }
+
+ chunk = matches[matches.length - 1] || [];
+ parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
+ minutes = +(parts[1] * 60) + toInt(parts[2]);
+
+ return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
+}
+
+// Return a moment from input, that is local/utc/zone equivalent to model.
+function cloneWithOffset(input, model) {
+ var res, diff;
+ if (model._isUTC) {
+ res = model.clone();
+ diff =
+ (isMoment(input) || isDate(input)
+ ? input.valueOf()
+ : createLocal(input).valueOf()) - res.valueOf();
+ // Use low-level api, because this fn is low-level api.
+ res._d.setTime(res._d.valueOf() + diff);
+ hooks.updateOffset(res, false);
+ return res;
+ } else {
+ return createLocal(input).local();
+ }
+}
+
+function getDateOffset(m) {
+ // On Firefox.24 Date#getTimezoneOffset returns a floating point.
+ // https://github.com/moment/moment/pull/1871
+ return -Math.round(m._d.getTimezoneOffset());
+}
+
+// HOOKS
+
+// This function will be called whenever a moment is mutated.
+// It is intended to keep the offset in sync with the timezone.
+hooks.updateOffset = function () {};
+
+// MOMENTS
+
+// keepLocalTime = true means only change the timezone, without
+// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
+// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
+// +0200, so we adjust the time as needed, to be valid.
+//
+// Keeping the time actually adds/subtracts (one hour)
+// from the actual represented time. That is why we call updateOffset
+// a second time. In case it wants us to change the offset again
+// _changeInProgress == true case, then we have to adjust, because
+// there is no such time in the given timezone.
+function getSetOffset(input, keepLocalTime, keepMinutes) {
+ var offset = this._offset || 0,
+ localAdjust;
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ if (input != null) {
+ if (typeof input === 'string') {
+ input = offsetFromString(matchShortOffset, input);
+ if (input === null) {
+ return this;
+ }
+ } else if (Math.abs(input) < 16 && !keepMinutes) {
+ input = input * 60;
+ }
+ if (!this._isUTC && keepLocalTime) {
+ localAdjust = getDateOffset(this);
+ }
+ this._offset = input;
+ this._isUTC = true;
+ if (localAdjust != null) {
+ this.add(localAdjust, 'm');
+ }
+ if (offset !== input) {
+ if (!keepLocalTime || this._changeInProgress) {
+ addSubtract(
+ this,
+ createDuration(input - offset, 'm'),
+ 1,
+ false
+ );
+ } else if (!this._changeInProgress) {
+ this._changeInProgress = true;
+ hooks.updateOffset(this, true);
+ this._changeInProgress = null;
+ }
+ }
+ return this;
+ } else {
+ return this._isUTC ? offset : getDateOffset(this);
+ }
+}
+
+function getSetZone(input, keepLocalTime) {
+ if (input != null) {
+ if (typeof input !== 'string') {
+ input = -input;
+ }
+
+ this.utcOffset(input, keepLocalTime);
+
+ return this;
+ } else {
+ return -this.utcOffset();
+ }
+}
+
+function setOffsetToUTC(keepLocalTime) {
+ return this.utcOffset(0, keepLocalTime);
+}
+
+function setOffsetToLocal(keepLocalTime) {
+ if (this._isUTC) {
+ this.utcOffset(0, keepLocalTime);
+ this._isUTC = false;
+
+ if (keepLocalTime) {
+ this.subtract(getDateOffset(this), 'm');
+ }
+ }
+ return this;
+}
+
+function setOffsetToParsedOffset() {
+ if (this._tzm != null) {
+ this.utcOffset(this._tzm, false, true);
+ } else if (typeof this._i === 'string') {
+ var tZone = offsetFromString(matchOffset, this._i);
+ if (tZone != null) {
+ this.utcOffset(tZone);
+ } else {
+ this.utcOffset(0, true);
+ }
+ }
+ return this;
+}
+
+function hasAlignedHourOffset(input) {
+ if (!this.isValid()) {
+ return false;
+ }
+ input = input ? createLocal(input).utcOffset() : 0;
+
+ return (this.utcOffset() - input) % 60 === 0;
+}
+
+function isDaylightSavingTime() {
+ return (
+ this.utcOffset() > this.clone().month(0).utcOffset() ||
+ this.utcOffset() > this.clone().month(5).utcOffset()
+ );
+}
+
+function isDaylightSavingTimeShifted() {
+ if (!isUndefined(this._isDSTShifted)) {
+ return this._isDSTShifted;
+ }
+
+ var c = {},
+ other;
+
+ copyConfig(c, this);
+ c = prepareConfig(c);
+
+ if (c._a) {
+ other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
+ this._isDSTShifted =
+ this.isValid() && compareArrays(c._a, other.toArray()) > 0;
+ } else {
+ this._isDSTShifted = false;
+ }
+
+ return this._isDSTShifted;
+}
+
+function isLocal() {
+ return this.isValid() ? !this._isUTC : false;
+}
+
+function isUtcOffset() {
+ return this.isValid() ? this._isUTC : false;
+}
+
+function isUtc() {
+ return this.isValid() ? this._isUTC && this._offset === 0 : false;
+}
+
+// ASP.NET json date format regex
+var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
+ // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
+ // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
+ // and further modified to allow for strings containing both week and day
+ isoRegex =
+ /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
+
+function createDuration(input, key) {
+ var duration = input,
+ // matching against regexp is expensive, do it on demand
+ match = null,
+ sign,
+ ret,
+ diffRes;
+
+ if (isDuration(input)) {
+ duration = {
+ ms: input._milliseconds,
+ d: input._days,
+ M: input._months,
+ };
+ } else if (isNumber(input) || !isNaN(+input)) {
+ duration = {};
+ if (key) {
+ duration[key] = +input;
+ } else {
+ duration.milliseconds = +input;
+ }
+ } else if ((match = aspNetRegex.exec(input))) {
+ sign = match[1] === '-' ? -1 : 1;
+ duration = {
+ y: 0,
+ d: toInt(match[DATE]) * sign,
+ h: toInt(match[HOUR]) * sign,
+ m: toInt(match[MINUTE]) * sign,
+ s: toInt(match[SECOND]) * sign,
+ ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
+ };
+ } else if ((match = isoRegex.exec(input))) {
+ sign = match[1] === '-' ? -1 : 1;
+ duration = {
+ y: parseIso(match[2], sign),
+ M: parseIso(match[3], sign),
+ w: parseIso(match[4], sign),
+ d: parseIso(match[5], sign),
+ h: parseIso(match[6], sign),
+ m: parseIso(match[7], sign),
+ s: parseIso(match[8], sign),
+ };
+ } else if (duration == null) {
+ // checks for null or undefined
+ duration = {};
+ } else if (
+ typeof duration === 'object' &&
+ ('from' in duration || 'to' in duration)
+ ) {
+ diffRes = momentsDifference(
+ createLocal(duration.from),
+ createLocal(duration.to)
+ );
+
+ duration = {};
+ duration.ms = diffRes.milliseconds;
+ duration.M = diffRes.months;
+ }
+
+ ret = new Duration(duration);
+
+ if (isDuration(input) && hasOwnProp(input, '_locale')) {
+ ret._locale = input._locale;
+ }
+
+ if (isDuration(input) && hasOwnProp(input, '_isValid')) {
+ ret._isValid = input._isValid;
+ }
+
+ return ret;
+}
+
+createDuration.fn = Duration.prototype;
+createDuration.invalid = createInvalid$1;
+
+function parseIso(inp, sign) {
+ // We'd normally use ~~inp for this, but unfortunately it also
+ // converts floats to ints.
+ // inp may be undefined, so careful calling replace on it.
+ var res = inp && parseFloat(inp.replace(',', '.'));
+ // apply sign while we're at it
+ return (isNaN(res) ? 0 : res) * sign;
+}
+
+function positiveMomentsDifference(base, other) {
+ var res = {};
+
+ res.months =
+ other.month() - base.month() + (other.year() - base.year()) * 12;
+ if (base.clone().add(res.months, 'M').isAfter(other)) {
+ --res.months;
+ }
+
+ res.milliseconds = +other - +base.clone().add(res.months, 'M');
+
+ return res;
+}
+
+function momentsDifference(base, other) {
+ var res;
+ if (!(base.isValid() && other.isValid())) {
+ return { milliseconds: 0, months: 0 };
+ }
+
+ other = cloneWithOffset(other, base);
+ if (base.isBefore(other)) {
+ res = positiveMomentsDifference(base, other);
+ } else {
+ res = positiveMomentsDifference(other, base);
+ res.milliseconds = -res.milliseconds;
+ res.months = -res.months;
+ }
+
+ return res;
+}
+
+// TODO: remove 'name' arg after deprecation is removed
+function createAdder(direction, name) {
+ return function (val, period) {
+ var dur, tmp;
+ //invert the arguments, but complain about it
+ if (period !== null && !isNaN(+period)) {
+ deprecateSimple(
+ name,
+ 'moment().' +
+ name +
+ '(period, number) is deprecated. Please use moment().' +
+ name +
+ '(number, period). ' +
+ 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
+ );
+ tmp = val;
+ val = period;
+ period = tmp;
+ }
+
+ dur = createDuration(val, period);
+ addSubtract(this, dur, direction);
+ return this;
+ };
+}
+
+function addSubtract(mom, duration, isAdding, updateOffset) {
+ var milliseconds = duration._milliseconds,
+ days = absRound(duration._days),
+ months = absRound(duration._months);
+
+ if (!mom.isValid()) {
+ // No op
+ return;
+ }
+
+ updateOffset = updateOffset == null ? true : updateOffset;
+
+ if (months) {
+ setMonth(mom, get(mom, 'Month') + months * isAdding);
+ }
+ if (days) {
+ set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
+ }
+ if (milliseconds) {
+ mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
+ }
+ if (updateOffset) {
+ hooks.updateOffset(mom, days || months);
+ }
+}
+
+var add = createAdder(1, 'add'),
+ subtract = createAdder(-1, 'subtract');
+
+function isString(input) {
+ return typeof input === 'string' || input instanceof String;
+}
+
+// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
+function isMomentInput(input) {
+ return (
+ isMoment(input) ||
+ isDate(input) ||
+ isString(input) ||
+ isNumber(input) ||
+ isNumberOrStringArray(input) ||
+ isMomentInputObject(input) ||
+ input === null ||
+ input === undefined
+ );
+}
+
+function isMomentInputObject(input) {
+ var objectTest = isObject(input) && !isObjectEmpty(input),
+ propertyTest = false,
+ properties = [
+ 'years',
+ 'year',
+ 'y',
+ 'months',
+ 'month',
+ 'M',
+ 'days',
+ 'day',
+ 'd',
+ 'dates',
+ 'date',
+ 'D',
+ 'hours',
+ 'hour',
+ 'h',
+ 'minutes',
+ 'minute',
+ 'm',
+ 'seconds',
+ 'second',
+ 's',
+ 'milliseconds',
+ 'millisecond',
+ 'ms',
+ ],
+ i,
+ property,
+ propertyLen = properties.length;
+
+ for (i = 0; i < propertyLen; i += 1) {
+ property = properties[i];
+ propertyTest = propertyTest || hasOwnProp(input, property);
+ }
+
+ return objectTest && propertyTest;
+}
+
+function isNumberOrStringArray(input) {
+ var arrayTest = isArray(input),
+ dataTypeTest = false;
+ if (arrayTest) {
+ dataTypeTest =
+ input.filter(function (item) {
+ return !isNumber(item) && isString(input);
+ }).length === 0;
+ }
+ return arrayTest && dataTypeTest;
+}
+
+function isCalendarSpec(input) {
+ var objectTest = isObject(input) && !isObjectEmpty(input),
+ propertyTest = false,
+ properties = [
+ 'sameDay',
+ 'nextDay',
+ 'lastDay',
+ 'nextWeek',
+ 'lastWeek',
+ 'sameElse',
+ ],
+ i,
+ property;
+
+ for (i = 0; i < properties.length; i += 1) {
+ property = properties[i];
+ propertyTest = propertyTest || hasOwnProp(input, property);
+ }
+
+ return objectTest && propertyTest;
+}
+
+function getCalendarFormat(myMoment, now) {
+ var diff = myMoment.diff(now, 'days', true);
+ return diff < -6
+ ? 'sameElse'
+ : diff < -1
+ ? 'lastWeek'
+ : diff < 0
+ ? 'lastDay'
+ : diff < 1
+ ? 'sameDay'
+ : diff < 2
+ ? 'nextDay'
+ : diff < 7
+ ? 'nextWeek'
+ : 'sameElse';
+}
+
+function calendar$1(time, formats) {
+ // Support for single parameter, formats only overload to the calendar function
+ if (arguments.length === 1) {
+ if (!arguments[0]) {
+ time = undefined;
+ formats = undefined;
+ } else if (isMomentInput(arguments[0])) {
+ time = arguments[0];
+ formats = undefined;
+ } else if (isCalendarSpec(arguments[0])) {
+ formats = arguments[0];
+ time = undefined;
+ }
+ }
+ // We want to compare the start of today, vs this.
+ // Getting start-of-today depends on whether we're local/utc/offset or not.
+ var now = time || createLocal(),
+ sod = cloneWithOffset(now, this).startOf('day'),
+ format = hooks.calendarFormat(this, sod) || 'sameElse',
+ output =
+ formats &&
+ (isFunction(formats[format])
+ ? formats[format].call(this, now)
+ : formats[format]);
+
+ return this.format(
+ output || this.localeData().calendar(format, this, createLocal(now))
+ );
+}
+
+function clone() {
+ return new Moment(this);
+}
+
+function isAfter(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input);
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() > localInput.valueOf();
+ } else {
+ return localInput.valueOf() < this.clone().startOf(units).valueOf();
+ }
+}
+
+function isBefore(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input);
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() < localInput.valueOf();
+ } else {
+ return this.clone().endOf(units).valueOf() < localInput.valueOf();
+ }
+}
+
+function isBetween(from, to, units, inclusivity) {
+ var localFrom = isMoment(from) ? from : createLocal(from),
+ localTo = isMoment(to) ? to : createLocal(to);
+ if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
+ return false;
+ }
+ inclusivity = inclusivity || '()';
+ return (
+ (inclusivity[0] === '('
+ ? this.isAfter(localFrom, units)
+ : !this.isBefore(localFrom, units)) &&
+ (inclusivity[1] === ')'
+ ? this.isBefore(localTo, units)
+ : !this.isAfter(localTo, units))
+ );
+}
+
+function isSame(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input),
+ inputMs;
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() === localInput.valueOf();
+ } else {
+ inputMs = localInput.valueOf();
+ return (
+ this.clone().startOf(units).valueOf() <= inputMs &&
+ inputMs <= this.clone().endOf(units).valueOf()
+ );
+ }
+}
+
+function isSameOrAfter(input, units) {
+ return this.isSame(input, units) || this.isAfter(input, units);
+}
+
+function isSameOrBefore(input, units) {
+ return this.isSame(input, units) || this.isBefore(input, units);
+}
+
+function diff(input, units, asFloat) {
+ var that, zoneDelta, output;
+
+ if (!this.isValid()) {
+ return NaN;
+ }
+
+ that = cloneWithOffset(input, this);
+
+ if (!that.isValid()) {
+ return NaN;
+ }
+
+ zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
+
+ units = normalizeUnits(units);
+
+ switch (units) {
+ case 'year':
+ output = monthDiff(this, that) / 12;
+ break;
+ case 'month':
+ output = monthDiff(this, that);
+ break;
+ case 'quarter':
+ output = monthDiff(this, that) / 3;
+ break;
+ case 'second':
+ output = (this - that) / 1e3;
+ break; // 1000
+ case 'minute':
+ output = (this - that) / 6e4;
+ break; // 1000 * 60
+ case 'hour':
+ output = (this - that) / 36e5;
+ break; // 1000 * 60 * 60
+ case 'day':
+ output = (this - that - zoneDelta) / 864e5;
+ break; // 1000 * 60 * 60 * 24, negate dst
+ case 'week':
+ output = (this - that - zoneDelta) / 6048e5;
+ break; // 1000 * 60 * 60 * 24 * 7, negate dst
+ default:
+ output = this - that;
+ }
+
+ return asFloat ? output : absFloor(output);
+}
+
+function monthDiff(a, b) {
+ if (a.date() < b.date()) {
+ // end-of-month calculations work correct when the start month has more
+ // days than the end month.
+ return -monthDiff(b, a);
+ }
+ // difference in months
+ var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
+ // b is in (anchor - 1 month, anchor + 1 month)
+ anchor = a.clone().add(wholeMonthDiff, 'months'),
+ anchor2,
+ adjust;
+
+ if (b - anchor < 0) {
+ anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
+ // linear across the month
+ adjust = (b - anchor) / (anchor - anchor2);
+ } else {
+ anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
+ // linear across the month
+ adjust = (b - anchor) / (anchor2 - anchor);
+ }
+
+ //check for negative zero, return zero if negative zero
+ return -(wholeMonthDiff + adjust) || 0;
+}
+
+hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
+hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
+
+function toString() {
+ return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
+}
+
+function toISOString(keepOffset) {
+ if (!this.isValid()) {
+ return null;
+ }
+ var utc = keepOffset !== true,
+ m = utc ? this.clone().utc() : this;
+ if (m.year() < 0 || m.year() > 9999) {
+ return formatMoment(
+ m,
+ utc
+ ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
+ : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
+ );
+ }
+ if (isFunction(Date.prototype.toISOString)) {
+ // native implementation is ~50x faster, use it when we can
+ if (utc) {
+ return this.toDate().toISOString();
+ } else {
+ return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
+ .toISOString()
+ .replace('Z', formatMoment(m, 'Z'));
+ }
+ }
+ return formatMoment(
+ m,
+ utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
+ );
+}
+
+/**
+ * Return a human readable representation of a moment that can
+ * also be evaluated to get a new moment which is the same
+ *
+ * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
+ */
+function inspect() {
+ if (!this.isValid()) {
+ return 'moment.invalid(/* ' + this._i + ' */)';
+ }
+ var func = 'moment',
+ zone = '',
+ prefix,
+ year,
+ datetime,
+ suffix;
+ if (!this.isLocal()) {
+ func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
+ zone = 'Z';
+ }
+ prefix = '[' + func + '("]';
+ year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
+ datetime = '-MM-DD[T]HH:mm:ss.SSS';
+ suffix = zone + '[")]';
+
+ return this.format(prefix + year + datetime + suffix);
+}
+
+function format(inputString) {
+ if (!inputString) {
+ inputString = this.isUtc()
+ ? hooks.defaultFormatUtc
+ : hooks.defaultFormat;
+ }
+ var output = formatMoment(this, inputString);
+ return this.localeData().postformat(output);
+}
+
+function from(time, withoutSuffix) {
+ if (
+ this.isValid() &&
+ ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
+ ) {
+ return createDuration({ to: this, from: time })
+ .locale(this.locale())
+ .humanize(!withoutSuffix);
+ } else {
+ return this.localeData().invalidDate();
+ }
+}
+
+function fromNow(withoutSuffix) {
+ return this.from(createLocal(), withoutSuffix);
+}
+
+function to(time, withoutSuffix) {
+ if (
+ this.isValid() &&
+ ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
+ ) {
+ return createDuration({ from: this, to: time })
+ .locale(this.locale())
+ .humanize(!withoutSuffix);
+ } else {
+ return this.localeData().invalidDate();
+ }
+}
+
+function toNow(withoutSuffix) {
+ return this.to(createLocal(), withoutSuffix);
+}
+
+// If passed a locale key, it will set the locale for this
+// instance. Otherwise, it will return the locale configuration
+// variables for this instance.
+function locale(key) {
+ var newLocaleData;
+
+ if (key === undefined) {
+ return this._locale._abbr;
+ } else {
+ newLocaleData = getLocale(key);
+ if (newLocaleData != null) {
+ this._locale = newLocaleData;
+ }
+ return this;
+ }
+}
+
+var lang = deprecate(
+ 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
+ function (key) {
+ if (key === undefined) {
+ return this.localeData();
+ } else {
+ return this.locale(key);
+ }
+ }
+);
+
+function localeData() {
+ return this._locale;
+}
+
+var MS_PER_SECOND = 1000,
+ MS_PER_MINUTE = 60 * MS_PER_SECOND,
+ MS_PER_HOUR = 60 * MS_PER_MINUTE,
+ MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
+
+// actual modulo - handles negative numbers (for dates before 1970):
+function mod$1(dividend, divisor) {
+ return ((dividend % divisor) + divisor) % divisor;
+}
+
+function localStartOfDate(y, m, d) {
+ // the date constructor remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ return new Date(y + 400, m, d) - MS_PER_400_YEARS;
+ } else {
+ return new Date(y, m, d).valueOf();
+ }
+}
+
+function utcStartOfDate(y, m, d) {
+ // Date.UTC remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
+ } else {
+ return Date.UTC(y, m, d);
+ }
+}
+
+function startOf(units) {
+ var time, startOfDate;
+ units = normalizeUnits(units);
+ if (units === undefined || units === 'millisecond' || !this.isValid()) {
+ return this;
+ }
+
+ startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
+
+ switch (units) {
+ case 'year':
+ time = startOfDate(this.year(), 0, 1);
+ break;
+ case 'quarter':
+ time = startOfDate(
+ this.year(),
+ this.month() - (this.month() % 3),
+ 1
+ );
+ break;
+ case 'month':
+ time = startOfDate(this.year(), this.month(), 1);
+ break;
+ case 'week':
+ time = startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - this.weekday()
+ );
+ break;
+ case 'isoWeek':
+ time = startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - (this.isoWeekday() - 1)
+ );
+ break;
+ case 'day':
+ case 'date':
+ time = startOfDate(this.year(), this.month(), this.date());
+ break;
+ case 'hour':
+ time = this._d.valueOf();
+ time -= mod$1(
+ time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
+ MS_PER_HOUR
+ );
+ break;
+ case 'minute':
+ time = this._d.valueOf();
+ time -= mod$1(time, MS_PER_MINUTE);
+ break;
+ case 'second':
+ time = this._d.valueOf();
+ time -= mod$1(time, MS_PER_SECOND);
+ break;
+ }
+
+ this._d.setTime(time);
+ hooks.updateOffset(this, true);
+ return this;
+}
+
+function endOf(units) {
+ var time, startOfDate;
+ units = normalizeUnits(units);
+ if (units === undefined || units === 'millisecond' || !this.isValid()) {
+ return this;
+ }
+
+ startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
+
+ switch (units) {
+ case 'year':
+ time = startOfDate(this.year() + 1, 0, 1) - 1;
+ break;
+ case 'quarter':
+ time =
+ startOfDate(
+ this.year(),
+ this.month() - (this.month() % 3) + 3,
+ 1
+ ) - 1;
+ break;
+ case 'month':
+ time = startOfDate(this.year(), this.month() + 1, 1) - 1;
+ break;
+ case 'week':
+ time =
+ startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - this.weekday() + 7
+ ) - 1;
+ break;
+ case 'isoWeek':
+ time =
+ startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - (this.isoWeekday() - 1) + 7
+ ) - 1;
+ break;
+ case 'day':
+ case 'date':
+ time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
+ break;
+ case 'hour':
+ time = this._d.valueOf();
+ time +=
+ MS_PER_HOUR -
+ mod$1(
+ time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
+ MS_PER_HOUR
+ ) -
+ 1;
+ break;
+ case 'minute':
+ time = this._d.valueOf();
+ time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
+ break;
+ case 'second':
+ time = this._d.valueOf();
+ time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
+ break;
+ }
+
+ this._d.setTime(time);
+ hooks.updateOffset(this, true);
+ return this;
+}
+
+function valueOf() {
+ return this._d.valueOf() - (this._offset || 0) * 60000;
+}
+
+function unix() {
+ return Math.floor(this.valueOf() / 1000);
+}
+
+function toDate() {
+ return new Date(this.valueOf());
+}
+
+function toArray() {
+ var m = this;
+ return [
+ m.year(),
+ m.month(),
+ m.date(),
+ m.hour(),
+ m.minute(),
+ m.second(),
+ m.millisecond(),
+ ];
+}
+
+function toObject() {
+ var m = this;
+ return {
+ years: m.year(),
+ months: m.month(),
+ date: m.date(),
+ hours: m.hours(),
+ minutes: m.minutes(),
+ seconds: m.seconds(),
+ milliseconds: m.milliseconds(),
+ };
+}
+
+function toJSON() {
+ // new Date(NaN).toJSON() === null
+ return this.isValid() ? this.toISOString() : null;
+}
+
+function isValid$2() {
+ return isValid(this);
+}
+
+function parsingFlags() {
+ return extend({}, getParsingFlags(this));
+}
+
+function invalidAt() {
+ return getParsingFlags(this).overflow;
+}
+
+function creationData() {
+ return {
+ input: this._i,
+ format: this._f,
+ locale: this._locale,
+ isUTC: this._isUTC,
+ strict: this._strict,
+ };
+}
+
+addFormatToken('N', 0, 0, 'eraAbbr');
+addFormatToken('NN', 0, 0, 'eraAbbr');
+addFormatToken('NNN', 0, 0, 'eraAbbr');
+addFormatToken('NNNN', 0, 0, 'eraName');
+addFormatToken('NNNNN', 0, 0, 'eraNarrow');
+
+addFormatToken('y', ['y', 1], 'yo', 'eraYear');
+addFormatToken('y', ['yy', 2], 0, 'eraYear');
+addFormatToken('y', ['yyy', 3], 0, 'eraYear');
+addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
+
+addRegexToken('N', matchEraAbbr);
+addRegexToken('NN', matchEraAbbr);
+addRegexToken('NNN', matchEraAbbr);
+addRegexToken('NNNN', matchEraName);
+addRegexToken('NNNNN', matchEraNarrow);
+
+addParseToken(
+ ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
+ function (input, array, config, token) {
+ var era = config._locale.erasParse(input, token, config._strict);
+ if (era) {
+ getParsingFlags(config).era = era;
+ } else {
+ getParsingFlags(config).invalidEra = input;
+ }
+ }
+);
+
+addRegexToken('y', matchUnsigned);
+addRegexToken('yy', matchUnsigned);
+addRegexToken('yyy', matchUnsigned);
+addRegexToken('yyyy', matchUnsigned);
+addRegexToken('yo', matchEraYearOrdinal);
+
+addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
+addParseToken(['yo'], function (input, array, config, token) {
+ var match;
+ if (config._locale._eraYearOrdinalRegex) {
+ match = input.match(config._locale._eraYearOrdinalRegex);
+ }
+
+ if (config._locale.eraYearOrdinalParse) {
+ array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
+ } else {
+ array[YEAR] = parseInt(input, 10);
+ }
+});
+
+function localeEras(m, format) {
+ var i,
+ l,
+ date,
+ eras = this._eras || getLocale('en')._eras;
+ for (i = 0, l = eras.length; i < l; ++i) {
+ switch (typeof eras[i].since) {
+ case 'string':
+ // truncate time
+ date = hooks(eras[i].since).startOf('day');
+ eras[i].since = date.valueOf();
+ break;
+ }
+
+ switch (typeof eras[i].until) {
+ case 'undefined':
+ eras[i].until = +Infinity;
+ break;
+ case 'string':
+ // truncate time
+ date = hooks(eras[i].until).startOf('day').valueOf();
+ eras[i].until = date.valueOf();
+ break;
+ }
+ }
+ return eras;
+}
+
+function localeErasParse(eraName, format, strict) {
+ var i,
+ l,
+ eras = this.eras(),
+ name,
+ abbr,
+ narrow;
+ eraName = eraName.toUpperCase();
+
+ for (i = 0, l = eras.length; i < l; ++i) {
+ name = eras[i].name.toUpperCase();
+ abbr = eras[i].abbr.toUpperCase();
+ narrow = eras[i].narrow.toUpperCase();
+
+ if (strict) {
+ switch (format) {
+ case 'N':
+ case 'NN':
+ case 'NNN':
+ if (abbr === eraName) {
+ return eras[i];
+ }
+ break;
+
+ case 'NNNN':
+ if (name === eraName) {
+ return eras[i];
+ }
+ break;
+
+ case 'NNNNN':
+ if (narrow === eraName) {
+ return eras[i];
+ }
+ break;
+ }
+ } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
+ return eras[i];
+ }
+ }
+}
+
+function localeErasConvertYear(era, year) {
+ var dir = era.since <= era.until ? +1 : -1;
+ if (year === undefined) {
+ return hooks(era.since).year();
+ } else {
+ return hooks(era.since).year() + (year - era.offset) * dir;
+ }
+}
+
+function getEraName() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].name;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].name;
+ }
+ }
+
+ return '';
+}
+
+function getEraNarrow() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].narrow;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].narrow;
+ }
+ }
+
+ return '';
+}
+
+function getEraAbbr() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].abbr;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].abbr;
+ }
+ }
+
+ return '';
+}
+
+function getEraYear() {
+ var i,
+ l,
+ dir,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ dir = eras[i].since <= eras[i].until ? +1 : -1;
+
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (
+ (eras[i].since <= val && val <= eras[i].until) ||
+ (eras[i].until <= val && val <= eras[i].since)
+ ) {
+ return (
+ (this.year() - hooks(eras[i].since).year()) * dir +
+ eras[i].offset
+ );
+ }
+ }
+
+ return this.year();
+}
+
+function erasNameRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasNameRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasNameRegex : this._erasRegex;
+}
+
+function erasAbbrRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasAbbrRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasAbbrRegex : this._erasRegex;
+}
+
+function erasNarrowRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasNarrowRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasNarrowRegex : this._erasRegex;
+}
+
+function matchEraAbbr(isStrict, locale) {
+ return locale.erasAbbrRegex(isStrict);
+}
+
+function matchEraName(isStrict, locale) {
+ return locale.erasNameRegex(isStrict);
+}
+
+function matchEraNarrow(isStrict, locale) {
+ return locale.erasNarrowRegex(isStrict);
+}
+
+function matchEraYearOrdinal(isStrict, locale) {
+ return locale._eraYearOrdinalRegex || matchUnsigned;
+}
+
+function computeErasParse() {
+ var abbrPieces = [],
+ namePieces = [],
+ narrowPieces = [],
+ mixedPieces = [],
+ i,
+ l,
+ eras = this.eras();
+
+ for (i = 0, l = eras.length; i < l; ++i) {
+ namePieces.push(regexEscape(eras[i].name));
+ abbrPieces.push(regexEscape(eras[i].abbr));
+ narrowPieces.push(regexEscape(eras[i].narrow));
+
+ mixedPieces.push(regexEscape(eras[i].name));
+ mixedPieces.push(regexEscape(eras[i].abbr));
+ mixedPieces.push(regexEscape(eras[i].narrow));
+ }
+
+ this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
+ this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
+ this._erasNarrowRegex = new RegExp(
+ '^(' + narrowPieces.join('|') + ')',
+ 'i'
+ );
+}
+
+// FORMATTING
+
+addFormatToken(0, ['gg', 2], 0, function () {
+ return this.weekYear() % 100;
+});
+
+addFormatToken(0, ['GG', 2], 0, function () {
+ return this.isoWeekYear() % 100;
+});
+
+function addWeekYearFormatToken(token, getter) {
+ addFormatToken(0, [token, token.length], 0, getter);
+}
+
+addWeekYearFormatToken('gggg', 'weekYear');
+addWeekYearFormatToken('ggggg', 'weekYear');
+addWeekYearFormatToken('GGGG', 'isoWeekYear');
+addWeekYearFormatToken('GGGGG', 'isoWeekYear');
+
+// ALIASES
+
+addUnitAlias('weekYear', 'gg');
+addUnitAlias('isoWeekYear', 'GG');
+
+// PRIORITY
+
+addUnitPriority('weekYear', 1);
+addUnitPriority('isoWeekYear', 1);
+
+// PARSING
+
+addRegexToken('G', matchSigned);
+addRegexToken('g', matchSigned);
+addRegexToken('GG', match1to2, match2);
+addRegexToken('gg', match1to2, match2);
+addRegexToken('GGGG', match1to4, match4);
+addRegexToken('gggg', match1to4, match4);
+addRegexToken('GGGGG', match1to6, match6);
+addRegexToken('ggggg', match1to6, match6);
+
+addWeekParseToken(
+ ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
+ function (input, week, config, token) {
+ week[token.substr(0, 2)] = toInt(input);
+ }
+);
+
+addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
+ week[token] = hooks.parseTwoDigitYear(input);
+});
+
+// MOMENTS
+
+function getSetWeekYear(input) {
+ return getSetWeekYearHelper.call(
+ this,
+ input,
+ this.week(),
+ this.weekday(),
+ this.localeData()._week.dow,
+ this.localeData()._week.doy
+ );
+}
+
+function getSetISOWeekYear(input) {
+ return getSetWeekYearHelper.call(
+ this,
+ input,
+ this.isoWeek(),
+ this.isoWeekday(),
+ 1,
+ 4
+ );
+}
+
+function getISOWeeksInYear() {
+ return weeksInYear(this.year(), 1, 4);
+}
+
+function getISOWeeksInISOWeekYear() {
+ return weeksInYear(this.isoWeekYear(), 1, 4);
+}
+
+function getWeeksInYear() {
+ var weekInfo = this.localeData()._week;
+ return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
+}
+
+function getWeeksInWeekYear() {
+ var weekInfo = this.localeData()._week;
+ return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
+}
+
+function getSetWeekYearHelper(input, week, weekday, dow, doy) {
+ var weeksTarget;
+ if (input == null) {
+ return weekOfYear(this, dow, doy).year;
+ } else {
+ weeksTarget = weeksInYear(input, dow, doy);
+ if (week > weeksTarget) {
+ week = weeksTarget;
+ }
+ return setWeekAll.call(this, input, week, weekday, dow, doy);
+ }
+}
+
+function setWeekAll(weekYear, week, weekday, dow, doy) {
+ var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
+ date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
+
+ this.year(date.getUTCFullYear());
+ this.month(date.getUTCMonth());
+ this.date(date.getUTCDate());
+ return this;
+}
+
+// FORMATTING
+
+addFormatToken('Q', 0, 'Qo', 'quarter');
+
+// ALIASES
+
+addUnitAlias('quarter', 'Q');
+
+// PRIORITY
+
+addUnitPriority('quarter', 7);
+
+// PARSING
+
+addRegexToken('Q', match1);
+addParseToken('Q', function (input, array) {
+ array[MONTH] = (toInt(input) - 1) * 3;
+});
+
+// MOMENTS
+
+function getSetQuarter(input) {
+ return input == null
+ ? Math.ceil((this.month() + 1) / 3)
+ : this.month((input - 1) * 3 + (this.month() % 3));
+}
+
+// FORMATTING
+
+addFormatToken('D', ['DD', 2], 'Do', 'date');
+
+// ALIASES
+
+addUnitAlias('date', 'D');
+
+// PRIORITY
+addUnitPriority('date', 9);
+
+// PARSING
+
+addRegexToken('D', match1to2);
+addRegexToken('DD', match1to2, match2);
+addRegexToken('Do', function (isStrict, locale) {
+ // TODO: Remove "ordinalParse" fallback in next major release.
+ return isStrict
+ ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
+ : locale._dayOfMonthOrdinalParseLenient;
+});
+
+addParseToken(['D', 'DD'], DATE);
+addParseToken('Do', function (input, array) {
+ array[DATE] = toInt(input.match(match1to2)[0]);
+});
+
+// MOMENTS
+
+var getSetDayOfMonth = makeGetSet('Date', true);
+
+// FORMATTING
+
+addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
+
+// ALIASES
+
+addUnitAlias('dayOfYear', 'DDD');
+
+// PRIORITY
+addUnitPriority('dayOfYear', 4);
+
+// PARSING
+
+addRegexToken('DDD', match1to3);
+addRegexToken('DDDD', match3);
+addParseToken(['DDD', 'DDDD'], function (input, array, config) {
+ config._dayOfYear = toInt(input);
+});
+
+// HELPERS
+
+// MOMENTS
+
+function getSetDayOfYear(input) {
+ var dayOfYear =
+ Math.round(
+ (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
+ ) + 1;
+ return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
+}
+
+// FORMATTING
+
+addFormatToken('m', ['mm', 2], 0, 'minute');
+
+// ALIASES
+
+addUnitAlias('minute', 'm');
+
+// PRIORITY
+
+addUnitPriority('minute', 14);
+
+// PARSING
+
+addRegexToken('m', match1to2);
+addRegexToken('mm', match1to2, match2);
+addParseToken(['m', 'mm'], MINUTE);
+
+// MOMENTS
+
+var getSetMinute = makeGetSet('Minutes', false);
+
+// FORMATTING
+
+addFormatToken('s', ['ss', 2], 0, 'second');
+
+// ALIASES
+
+addUnitAlias('second', 's');
+
+// PRIORITY
+
+addUnitPriority('second', 15);
+
+// PARSING
+
+addRegexToken('s', match1to2);
+addRegexToken('ss', match1to2, match2);
+addParseToken(['s', 'ss'], SECOND);
+
+// MOMENTS
+
+var getSetSecond = makeGetSet('Seconds', false);
+
+// FORMATTING
+
+addFormatToken('S', 0, 0, function () {
+ return ~~(this.millisecond() / 100);
+});
+
+addFormatToken(0, ['SS', 2], 0, function () {
+ return ~~(this.millisecond() / 10);
+});
+
+addFormatToken(0, ['SSS', 3], 0, 'millisecond');
+addFormatToken(0, ['SSSS', 4], 0, function () {
+ return this.millisecond() * 10;
+});
+addFormatToken(0, ['SSSSS', 5], 0, function () {
+ return this.millisecond() * 100;
+});
+addFormatToken(0, ['SSSSSS', 6], 0, function () {
+ return this.millisecond() * 1000;
+});
+addFormatToken(0, ['SSSSSSS', 7], 0, function () {
+ return this.millisecond() * 10000;
+});
+addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
+ return this.millisecond() * 100000;
+});
+addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
+ return this.millisecond() * 1000000;
+});
+
+// ALIASES
+
+addUnitAlias('millisecond', 'ms');
+
+// PRIORITY
+
+addUnitPriority('millisecond', 16);
+
+// PARSING
+
+addRegexToken('S', match1to3, match1);
+addRegexToken('SS', match1to3, match2);
+addRegexToken('SSS', match1to3, match3);
+
+var token, getSetMillisecond;
+for (token = 'SSSS'; token.length <= 9; token += 'S') {
+ addRegexToken(token, matchUnsigned);
+}
+
+function parseMs(input, array) {
+ array[MILLISECOND] = toInt(('0.' + input) * 1000);
+}
+
+for (token = 'S'; token.length <= 9; token += 'S') {
+ addParseToken(token, parseMs);
+}
+
+getSetMillisecond = makeGetSet('Milliseconds', false);
+
+// FORMATTING
+
+addFormatToken('z', 0, 0, 'zoneAbbr');
+addFormatToken('zz', 0, 0, 'zoneName');
+
+// MOMENTS
+
+function getZoneAbbr() {
+ return this._isUTC ? 'UTC' : '';
+}
+
+function getZoneName() {
+ return this._isUTC ? 'Coordinated Universal Time' : '';
+}
+
+var proto = Moment.prototype;
+
+proto.add = add;
+proto.calendar = calendar$1;
+proto.clone = clone;
+proto.diff = diff;
+proto.endOf = endOf;
+proto.format = format;
+proto.from = from;
+proto.fromNow = fromNow;
+proto.to = to;
+proto.toNow = toNow;
+proto.get = stringGet;
+proto.invalidAt = invalidAt;
+proto.isAfter = isAfter;
+proto.isBefore = isBefore;
+proto.isBetween = isBetween;
+proto.isSame = isSame;
+proto.isSameOrAfter = isSameOrAfter;
+proto.isSameOrBefore = isSameOrBefore;
+proto.isValid = isValid$2;
+proto.lang = lang;
+proto.locale = locale;
+proto.localeData = localeData;
+proto.max = prototypeMax;
+proto.min = prototypeMin;
+proto.parsingFlags = parsingFlags;
+proto.set = stringSet;
+proto.startOf = startOf;
+proto.subtract = subtract;
+proto.toArray = toArray;
+proto.toObject = toObject;
+proto.toDate = toDate;
+proto.toISOString = toISOString;
+proto.inspect = inspect;
+if (typeof Symbol !== 'undefined' && Symbol.for != null) {
+ proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
+ return 'Moment<' + this.format() + '>';
+ };
+}
+proto.toJSON = toJSON;
+proto.toString = toString;
+proto.unix = unix;
+proto.valueOf = valueOf;
+proto.creationData = creationData;
+proto.eraName = getEraName;
+proto.eraNarrow = getEraNarrow;
+proto.eraAbbr = getEraAbbr;
+proto.eraYear = getEraYear;
+proto.year = getSetYear;
+proto.isLeapYear = getIsLeapYear;
+proto.weekYear = getSetWeekYear;
+proto.isoWeekYear = getSetISOWeekYear;
+proto.quarter = proto.quarters = getSetQuarter;
+proto.month = getSetMonth;
+proto.daysInMonth = getDaysInMonth;
+proto.week = proto.weeks = getSetWeek;
+proto.isoWeek = proto.isoWeeks = getSetISOWeek;
+proto.weeksInYear = getWeeksInYear;
+proto.weeksInWeekYear = getWeeksInWeekYear;
+proto.isoWeeksInYear = getISOWeeksInYear;
+proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
+proto.date = getSetDayOfMonth;
+proto.day = proto.days = getSetDayOfWeek;
+proto.weekday = getSetLocaleDayOfWeek;
+proto.isoWeekday = getSetISODayOfWeek;
+proto.dayOfYear = getSetDayOfYear;
+proto.hour = proto.hours = getSetHour;
+proto.minute = proto.minutes = getSetMinute;
+proto.second = proto.seconds = getSetSecond;
+proto.millisecond = proto.milliseconds = getSetMillisecond;
+proto.utcOffset = getSetOffset;
+proto.utc = setOffsetToUTC;
+proto.local = setOffsetToLocal;
+proto.parseZone = setOffsetToParsedOffset;
+proto.hasAlignedHourOffset = hasAlignedHourOffset;
+proto.isDST = isDaylightSavingTime;
+proto.isLocal = isLocal;
+proto.isUtcOffset = isUtcOffset;
+proto.isUtc = isUtc;
+proto.isUTC = isUtc;
+proto.zoneAbbr = getZoneAbbr;
+proto.zoneName = getZoneName;
+proto.dates = deprecate(
+ 'dates accessor is deprecated. Use date instead.',
+ getSetDayOfMonth
+);
+proto.months = deprecate(
+ 'months accessor is deprecated. Use month instead',
+ getSetMonth
+);
+proto.years = deprecate(
+ 'years accessor is deprecated. Use year instead',
+ getSetYear
+);
+proto.zone = deprecate(
+ 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
+ getSetZone
+);
+proto.isDSTShifted = deprecate(
+ 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
+ isDaylightSavingTimeShifted
+);
+
+function createUnix(input) {
+ return createLocal(input * 1000);
+}
+
+function createInZone() {
+ return createLocal.apply(null, arguments).parseZone();
+}
+
+function preParsePostFormat(string) {
+ return string;
+}
+
+var proto$1 = Locale.prototype;
+
+proto$1.calendar = calendar;
+proto$1.longDateFormat = longDateFormat;
+proto$1.invalidDate = invalidDate;
+proto$1.ordinal = ordinal;
+proto$1.preparse = preParsePostFormat;
+proto$1.postformat = preParsePostFormat;
+proto$1.relativeTime = relativeTime;
+proto$1.pastFuture = pastFuture;
+proto$1.set = set;
+proto$1.eras = localeEras;
+proto$1.erasParse = localeErasParse;
+proto$1.erasConvertYear = localeErasConvertYear;
+proto$1.erasAbbrRegex = erasAbbrRegex;
+proto$1.erasNameRegex = erasNameRegex;
+proto$1.erasNarrowRegex = erasNarrowRegex;
+
+proto$1.months = localeMonths;
+proto$1.monthsShort = localeMonthsShort;
+proto$1.monthsParse = localeMonthsParse;
+proto$1.monthsRegex = monthsRegex;
+proto$1.monthsShortRegex = monthsShortRegex;
+proto$1.week = localeWeek;
+proto$1.firstDayOfYear = localeFirstDayOfYear;
+proto$1.firstDayOfWeek = localeFirstDayOfWeek;
+
+proto$1.weekdays = localeWeekdays;
+proto$1.weekdaysMin = localeWeekdaysMin;
+proto$1.weekdaysShort = localeWeekdaysShort;
+proto$1.weekdaysParse = localeWeekdaysParse;
+
+proto$1.weekdaysRegex = weekdaysRegex;
+proto$1.weekdaysShortRegex = weekdaysShortRegex;
+proto$1.weekdaysMinRegex = weekdaysMinRegex;
+
+proto$1.isPM = localeIsPM;
+proto$1.meridiem = localeMeridiem;
+
+function get$1(format, index, field, setter) {
+ var locale = getLocale(),
+ utc = createUTC().set(setter, index);
+ return locale[field](utc, format);
+}
+
+function listMonthsImpl(format, index, field) {
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+
+ if (index != null) {
+ return get$1(format, index, field, 'month');
+ }
+
+ var i,
+ out = [];
+ for (i = 0; i < 12; i++) {
+ out[i] = get$1(format, i, field, 'month');
+ }
+ return out;
+}
+
+// ()
+// (5)
+// (fmt, 5)
+// (fmt)
+// (true)
+// (true, 5)
+// (true, fmt, 5)
+// (true, fmt)
+function listWeekdaysImpl(localeSorted, format, index, field) {
+ if (typeof localeSorted === 'boolean') {
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+ } else {
+ format = localeSorted;
+ index = format;
+ localeSorted = false;
+
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+ }
+
+ var locale = getLocale(),
+ shift = localeSorted ? locale._week.dow : 0,
+ i,
+ out = [];
+
+ if (index != null) {
+ return get$1(format, (index + shift) % 7, field, 'day');
+ }
+
+ for (i = 0; i < 7; i++) {
+ out[i] = get$1(format, (i + shift) % 7, field, 'day');
+ }
+ return out;
+}
+
+function listMonths(format, index) {
+ return listMonthsImpl(format, index, 'months');
+}
+
+function listMonthsShort(format, index) {
+ return listMonthsImpl(format, index, 'monthsShort');
+}
+
+function listWeekdays(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
+}
+
+function listWeekdaysShort(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
+}
+
+function listWeekdaysMin(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
+}
+
+getSetGlobalLocale('en', {
+ eras: [
+ {
+ since: '0001-01-01',
+ until: +Infinity,
+ offset: 1,
+ name: 'Anno Domini',
+ narrow: 'AD',
+ abbr: 'AD',
+ },
+ {
+ since: '0000-12-31',
+ until: -Infinity,
+ offset: 1,
+ name: 'Before Christ',
+ narrow: 'BC',
+ abbr: 'BC',
+ },
+ ],
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ toInt((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+});
+
+// Side effect imports
+
+hooks.lang = deprecate(
+ 'moment.lang is deprecated. Use moment.locale instead.',
+ getSetGlobalLocale
+);
+hooks.langData = deprecate(
+ 'moment.langData is deprecated. Use moment.localeData instead.',
+ getLocale
+);
+
+var mathAbs = Math.abs;
+
+function abs() {
+ var data = this._data;
+
+ this._milliseconds = mathAbs(this._milliseconds);
+ this._days = mathAbs(this._days);
+ this._months = mathAbs(this._months);
+
+ data.milliseconds = mathAbs(data.milliseconds);
+ data.seconds = mathAbs(data.seconds);
+ data.minutes = mathAbs(data.minutes);
+ data.hours = mathAbs(data.hours);
+ data.months = mathAbs(data.months);
+ data.years = mathAbs(data.years);
+
+ return this;
+}
+
+function addSubtract$1(duration, input, value, direction) {
+ var other = createDuration(input, value);
+
+ duration._milliseconds += direction * other._milliseconds;
+ duration._days += direction * other._days;
+ duration._months += direction * other._months;
+
+ return duration._bubble();
+}
+
+// supports only 2.0-style add(1, 's') or add(duration)
+function add$1(input, value) {
+ return addSubtract$1(this, input, value, 1);
+}
+
+// supports only 2.0-style subtract(1, 's') or subtract(duration)
+function subtract$1(input, value) {
+ return addSubtract$1(this, input, value, -1);
+}
+
+function absCeil(number) {
+ if (number < 0) {
+ return Math.floor(number);
+ } else {
+ return Math.ceil(number);
+ }
+}
+
+function bubble() {
+ var milliseconds = this._milliseconds,
+ days = this._days,
+ months = this._months,
+ data = this._data,
+ seconds,
+ minutes,
+ hours,
+ years,
+ monthsFromDays;
+
+ // if we have a mix of positive and negative values, bubble down first
+ // check: https://github.com/moment/moment/issues/2166
+ if (
+ !(
+ (milliseconds >= 0 && days >= 0 && months >= 0) ||
+ (milliseconds <= 0 && days <= 0 && months <= 0)
+ )
+ ) {
+ milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
+ days = 0;
+ months = 0;
+ }
+
+ // The following code bubbles up values, see the tests for
+ // examples of what that means.
+ data.milliseconds = milliseconds % 1000;
+
+ seconds = absFloor(milliseconds / 1000);
+ data.seconds = seconds % 60;
+
+ minutes = absFloor(seconds / 60);
+ data.minutes = minutes % 60;
+
+ hours = absFloor(minutes / 60);
+ data.hours = hours % 24;
+
+ days += absFloor(hours / 24);
+
+ // convert days to months
+ monthsFromDays = absFloor(daysToMonths(days));
+ months += monthsFromDays;
+ days -= absCeil(monthsToDays(monthsFromDays));
+
+ // 12 months -> 1 year
+ years = absFloor(months / 12);
+ months %= 12;
+
+ data.days = days;
+ data.months = months;
+ data.years = years;
+
+ return this;
+}
+
+function daysToMonths(days) {
+ // 400 years have 146097 days (taking into account leap year rules)
+ // 400 years have 12 months === 4800
+ return (days * 4800) / 146097;
+}
+
+function monthsToDays(months) {
+ // the reverse of daysToMonths
+ return (months * 146097) / 4800;
+}
+
+function as(units) {
+ if (!this.isValid()) {
+ return NaN;
+ }
+ var days,
+ months,
+ milliseconds = this._milliseconds;
+
+ units = normalizeUnits(units);
+
+ if (units === 'month' || units === 'quarter' || units === 'year') {
+ days = this._days + milliseconds / 864e5;
+ months = this._months + daysToMonths(days);
+ switch (units) {
+ case 'month':
+ return months;
+ case 'quarter':
+ return months / 3;
+ case 'year':
+ return months / 12;
+ }
+ } else {
+ // handle milliseconds separately because of floating point math errors (issue #1867)
+ days = this._days + Math.round(monthsToDays(this._months));
+ switch (units) {
+ case 'week':
+ return days / 7 + milliseconds / 6048e5;
+ case 'day':
+ return days + milliseconds / 864e5;
+ case 'hour':
+ return days * 24 + milliseconds / 36e5;
+ case 'minute':
+ return days * 1440 + milliseconds / 6e4;
+ case 'second':
+ return days * 86400 + milliseconds / 1000;
+ // Math.floor prevents floating point math errors here
+ case 'millisecond':
+ return Math.floor(days * 864e5) + milliseconds;
+ default:
+ throw new Error('Unknown unit ' + units);
+ }
+ }
+}
+
+// TODO: Use this.as('ms')?
+function valueOf$1() {
+ if (!this.isValid()) {
+ return NaN;
+ }
+ return (
+ this._milliseconds +
+ this._days * 864e5 +
+ (this._months % 12) * 2592e6 +
+ toInt(this._months / 12) * 31536e6
+ );
+}
+
+function makeAs(alias) {
+ return function () {
+ return this.as(alias);
+ };
+}
+
+var asMilliseconds = makeAs('ms'),
+ asSeconds = makeAs('s'),
+ asMinutes = makeAs('m'),
+ asHours = makeAs('h'),
+ asDays = makeAs('d'),
+ asWeeks = makeAs('w'),
+ asMonths = makeAs('M'),
+ asQuarters = makeAs('Q'),
+ asYears = makeAs('y');
+
+function clone$1() {
+ return createDuration(this);
+}
+
+function get$2(units) {
+ units = normalizeUnits(units);
+ return this.isValid() ? this[units + 's']() : NaN;
+}
+
+function makeGetter(name) {
+ return function () {
+ return this.isValid() ? this._data[name] : NaN;
+ };
+}
+
+var milliseconds = makeGetter('milliseconds'),
+ seconds = makeGetter('seconds'),
+ minutes = makeGetter('minutes'),
+ hours = makeGetter('hours'),
+ days = makeGetter('days'),
+ months = makeGetter('months'),
+ years = makeGetter('years');
+
+function weeks() {
+ return absFloor(this.days() / 7);
+}
+
+var round = Math.round,
+ thresholds = {
+ ss: 44, // a few seconds to seconds
+ s: 45, // seconds to minute
+ m: 45, // minutes to hour
+ h: 22, // hours to day
+ d: 26, // days to month/week
+ w: null, // weeks to month
+ M: 11, // months to year
+ };
+
+// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
+function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
+ return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
+}
+
+function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
+ var duration = createDuration(posNegDuration).abs(),
+ seconds = round(duration.as('s')),
+ minutes = round(duration.as('m')),
+ hours = round(duration.as('h')),
+ days = round(duration.as('d')),
+ months = round(duration.as('M')),
+ weeks = round(duration.as('w')),
+ years = round(duration.as('y')),
+ a =
+ (seconds <= thresholds.ss && ['s', seconds]) ||
+ (seconds < thresholds.s && ['ss', seconds]) ||
+ (minutes <= 1 && ['m']) ||
+ (minutes < thresholds.m && ['mm', minutes]) ||
+ (hours <= 1 && ['h']) ||
+ (hours < thresholds.h && ['hh', hours]) ||
+ (days <= 1 && ['d']) ||
+ (days < thresholds.d && ['dd', days]);
+
+ if (thresholds.w != null) {
+ a =
+ a ||
+ (weeks <= 1 && ['w']) ||
+ (weeks < thresholds.w && ['ww', weeks]);
+ }
+ a = a ||
+ (months <= 1 && ['M']) ||
+ (months < thresholds.M && ['MM', months]) ||
+ (years <= 1 && ['y']) || ['yy', years];
+
+ a[2] = withoutSuffix;
+ a[3] = +posNegDuration > 0;
+ a[4] = locale;
+ return substituteTimeAgo.apply(null, a);
+}
+
+// This function allows you to set the rounding function for relative time strings
+function getSetRelativeTimeRounding(roundingFunction) {
+ if (roundingFunction === undefined) {
+ return round;
+ }
+ if (typeof roundingFunction === 'function') {
+ round = roundingFunction;
+ return true;
+ }
+ return false;
+}
+
+// This function allows you to set a threshold for relative time strings
+function getSetRelativeTimeThreshold(threshold, limit) {
+ if (thresholds[threshold] === undefined) {
+ return false;
+ }
+ if (limit === undefined) {
+ return thresholds[threshold];
+ }
+ thresholds[threshold] = limit;
+ if (threshold === 's') {
+ thresholds.ss = limit - 1;
+ }
+ return true;
+}
+
+function humanize(argWithSuffix, argThresholds) {
+ if (!this.isValid()) {
+ return this.localeData().invalidDate();
+ }
+
+ var withSuffix = false,
+ th = thresholds,
+ locale,
+ output;
+
+ if (typeof argWithSuffix === 'object') {
+ argThresholds = argWithSuffix;
+ argWithSuffix = false;
+ }
+ if (typeof argWithSuffix === 'boolean') {
+ withSuffix = argWithSuffix;
+ }
+ if (typeof argThresholds === 'object') {
+ th = Object.assign({}, thresholds, argThresholds);
+ if (argThresholds.s != null && argThresholds.ss == null) {
+ th.ss = argThresholds.s - 1;
+ }
+ }
+
+ locale = this.localeData();
+ output = relativeTime$1(this, !withSuffix, th, locale);
+
+ if (withSuffix) {
+ output = locale.pastFuture(+this, output);
+ }
+
+ return locale.postformat(output);
+}
+
+var abs$1 = Math.abs;
+
+function sign(x) {
+ return (x > 0) - (x < 0) || +x;
+}
+
+function toISOString$1() {
+ // for ISO strings we do not use the normal bubbling rules:
+ // * milliseconds bubble up until they become hours
+ // * days do not bubble at all
+ // * months bubble up until they become years
+ // This is because there is no context-free conversion between hours and days
+ // (think of clock changes)
+ // and also not between days and months (28-31 days per month)
+ if (!this.isValid()) {
+ return this.localeData().invalidDate();
+ }
+
+ var seconds = abs$1(this._milliseconds) / 1000,
+ days = abs$1(this._days),
+ months = abs$1(this._months),
+ minutes,
+ hours,
+ years,
+ s,
+ total = this.asSeconds(),
+ totalSign,
+ ymSign,
+ daysSign,
+ hmsSign;
+
+ if (!total) {
+ // this is the same as C#'s (Noda) and python (isodate)...
+ // but not other JS (goog.date)
+ return 'P0D';
+ }
+
+ // 3600 seconds -> 60 minutes -> 1 hour
+ minutes = absFloor(seconds / 60);
+ hours = absFloor(minutes / 60);
+ seconds %= 60;
+ minutes %= 60;
+
+ // 12 months -> 1 year
+ years = absFloor(months / 12);
+ months %= 12;
+
+ // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
+ s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
+
+ totalSign = total < 0 ? '-' : '';
+ ymSign = sign(this._months) !== sign(total) ? '-' : '';
+ daysSign = sign(this._days) !== sign(total) ? '-' : '';
+ hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
+
+ return (
+ totalSign +
+ 'P' +
+ (years ? ymSign + years + 'Y' : '') +
+ (months ? ymSign + months + 'M' : '') +
+ (days ? daysSign + days + 'D' : '') +
+ (hours || minutes || seconds ? 'T' : '') +
+ (hours ? hmsSign + hours + 'H' : '') +
+ (minutes ? hmsSign + minutes + 'M' : '') +
+ (seconds ? hmsSign + s + 'S' : '')
+ );
+}
+
+var proto$2 = Duration.prototype;
+
+proto$2.isValid = isValid$1;
+proto$2.abs = abs;
+proto$2.add = add$1;
+proto$2.subtract = subtract$1;
+proto$2.as = as;
+proto$2.asMilliseconds = asMilliseconds;
+proto$2.asSeconds = asSeconds;
+proto$2.asMinutes = asMinutes;
+proto$2.asHours = asHours;
+proto$2.asDays = asDays;
+proto$2.asWeeks = asWeeks;
+proto$2.asMonths = asMonths;
+proto$2.asQuarters = asQuarters;
+proto$2.asYears = asYears;
+proto$2.valueOf = valueOf$1;
+proto$2._bubble = bubble;
+proto$2.clone = clone$1;
+proto$2.get = get$2;
+proto$2.milliseconds = milliseconds;
+proto$2.seconds = seconds;
+proto$2.minutes = minutes;
+proto$2.hours = hours;
+proto$2.days = days;
+proto$2.weeks = weeks;
+proto$2.months = months;
+proto$2.years = years;
+proto$2.humanize = humanize;
+proto$2.toISOString = toISOString$1;
+proto$2.toString = toISOString$1;
+proto$2.toJSON = toISOString$1;
+proto$2.locale = locale;
+proto$2.localeData = localeData;
+
+proto$2.toIsoString = deprecate(
+ 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
+ toISOString$1
+);
+proto$2.lang = lang;
+
+// FORMATTING
+
+addFormatToken('X', 0, 0, 'unix');
+addFormatToken('x', 0, 0, 'valueOf');
+
+// PARSING
+
+addRegexToken('x', matchSigned);
+addRegexToken('X', matchTimestamp);
+addParseToken('X', function (input, array, config) {
+ config._d = new Date(parseFloat(input) * 1000);
+});
+addParseToken('x', function (input, array, config) {
+ config._d = new Date(toInt(input));
+});
+
+//! moment.js
+
+hooks.version = '2.29.4';
+
+setHookCallback(createLocal);
+
+hooks.fn = proto;
+hooks.min = min;
+hooks.max = max;
+hooks.now = now;
+hooks.utc = createUTC;
+hooks.unix = createUnix;
+hooks.months = listMonths;
+hooks.isDate = isDate;
+hooks.locale = getSetGlobalLocale;
+hooks.invalid = createInvalid;
+hooks.duration = createDuration;
+hooks.isMoment = isMoment;
+hooks.weekdays = listWeekdays;
+hooks.parseZone = createInZone;
+hooks.localeData = getLocale;
+hooks.isDuration = isDuration;
+hooks.monthsShort = listMonthsShort;
+hooks.weekdaysMin = listWeekdaysMin;
+hooks.defineLocale = defineLocale;
+hooks.updateLocale = updateLocale;
+hooks.locales = listLocales;
+hooks.weekdaysShort = listWeekdaysShort;
+hooks.normalizeUnits = normalizeUnits;
+hooks.relativeTimeRounding = getSetRelativeTimeRounding;
+hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
+hooks.calendarFormat = getCalendarFormat;
+hooks.prototype = proto;
+
+// currently HTML5 input type only supports 24-hour formats
+hooks.HTML5_FMT = {
+ DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', //
+ DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', //
+ DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', //
+ DATE: 'YYYY-MM-DD', //
+ TIME: 'HH:mm', //
+ TIME_SECONDS: 'HH:mm:ss', //
+ TIME_MS: 'HH:mm:ss.SSS', //
+ WEEK: 'GGGG-[W]WW', //
+ MONTH: 'YYYY-MM', //
+};
+
+export default hooks;
diff --git a/vendor/assets/javascripts/momentjs/locale/af.js b/vendor/assets/javascripts/momentjs/locale/af.js
new file mode 100644
index 000000000..e77b15b23
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/af.js
@@ -0,0 +1,82 @@
+//! moment.js locale configuration
+//! locale : Afrikaans [af]
+//! author : Werner Mollentze : https://github.com/wernerm
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var af = moment.defineLocale('af', {
+ months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
+ weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
+ '_'
+ ),
+ weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
+ weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
+ meridiemParse: /vm|nm/i,
+ isPM: function (input) {
+ return /^nm$/i.test(input);
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'vm' : 'VM';
+ } else {
+ return isLower ? 'nm' : 'NM';
+ }
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Vandag om] LT',
+ nextDay: '[Môre om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[Gister om] LT',
+ lastWeek: '[Laas] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'oor %s',
+ past: '%s gelede',
+ s: "'n paar sekondes",
+ ss: '%d sekondes',
+ m: "'n minuut",
+ mm: '%d minute',
+ h: "'n uur",
+ hh: '%d ure',
+ d: "'n dag",
+ dd: '%d dae',
+ M: "'n maand",
+ MM: '%d maande',
+ y: "'n jaar",
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ ); // Thanks to Joris Röling : https://github.com/jjupiter
+ },
+ week: {
+ dow: 1, // Maandag is die eerste dag van die week.
+ doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
+ },
+ });
+
+ return af;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ar-dz.js b/vendor/assets/javascripts/momentjs/locale/ar-dz.js
new file mode 100644
index 000000000..109f6158a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ar-dz.js
@@ -0,0 +1,167 @@
+//! moment.js locale configuration
+//! locale : Arabic (Algeria) [ar-dz]
+//! author : Amine Roukh: https://github.com/Amine27
+//! author : Abdel Said: https://github.com/abdelsaid
+//! author : Ahmed Elkhatib
+//! author : forabi https://github.com/forabi
+//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months = [
+ 'جانفي',
+ 'فيفري',
+ 'مارس',
+ 'أفريل',
+ 'ماي',
+ 'جوان',
+ 'جويلية',
+ 'أوت',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+ var arDz = moment.defineLocale('ar-dz', {
+ months: months,
+ monthsShort: months,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return arDz;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ar-kw.js b/vendor/assets/javascripts/momentjs/locale/ar-kw.js
new file mode 100644
index 000000000..c6ecef89f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ar-kw.js
@@ -0,0 +1,66 @@
+//! moment.js locale configuration
+//! locale : Arabic (Kuwait) [ar-kw]
+//! author : Nusret Parlak: https://github.com/nusretparlak
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var arKw = moment.defineLocale('ar-kw', {
+ months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ return arKw;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ar-ly.js b/vendor/assets/javascripts/momentjs/locale/ar-ly.js
new file mode 100644
index 000000000..436b8f31b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ar-ly.js
@@ -0,0 +1,182 @@
+//! moment.js locale configuration
+//! locale : Arabic (Libya) [ar-ly]
+//! author : Ali Hmer: https://github.com/kikoanis
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '1',
+ 2: '2',
+ 3: '3',
+ 4: '4',
+ 5: '5',
+ 6: '6',
+ 7: '7',
+ 8: '8',
+ 9: '9',
+ 0: '0',
+ },
+ pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months = [
+ 'يناير',
+ 'فبراير',
+ 'مارس',
+ 'أبريل',
+ 'مايو',
+ 'يونيو',
+ 'يوليو',
+ 'أغسطس',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+ var arLy = moment.defineLocale('ar-ly', {
+ months: months,
+ monthsShort: months,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ return arLy;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ar-ma.js b/vendor/assets/javascripts/momentjs/locale/ar-ma.js
new file mode 100644
index 000000000..11f061a19
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ar-ma.js
@@ -0,0 +1,67 @@
+//! moment.js locale configuration
+//! locale : Arabic (Morocco) [ar-ma]
+//! author : ElFadili Yassine : https://github.com/ElFadiliY
+//! author : Abdel Said : https://github.com/abdelsaid
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var arMa = moment.defineLocale('ar-ma', {
+ months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return arMa;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ar-sa.js b/vendor/assets/javascripts/momentjs/locale/ar-sa.js
new file mode 100644
index 000000000..e329df08b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ar-sa.js
@@ -0,0 +1,116 @@
+//! moment.js locale configuration
+//! locale : Arabic (Saudi Arabia) [ar-sa]
+//! author : Suhail Alkowaileet : https://github.com/xsoh
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ };
+
+ var arSa = moment.defineLocale('ar-sa', {
+ months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return arSa;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ar-tn.js b/vendor/assets/javascripts/momentjs/locale/ar-tn.js
new file mode 100644
index 000000000..a390ed229
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ar-tn.js
@@ -0,0 +1,66 @@
+//! moment.js locale configuration
+//! locale : Arabic (Tunisia) [ar-tn]
+//! author : Nader Toukabri : https://github.com/naderio
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var arTn = moment.defineLocale('ar-tn', {
+ months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return arTn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ar.js b/vendor/assets/javascripts/momentjs/locale/ar.js
new file mode 100644
index 000000000..7394244eb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ar.js
@@ -0,0 +1,200 @@
+//! moment.js locale configuration
+//! locale : Arabic [ar]
+//! author : Abdel Said: https://github.com/abdelsaid
+//! author : Ahmed Elkhatib
+//! author : forabi https://github.com/forabi
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ },
+ pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months = [
+ 'يناير',
+ 'فبراير',
+ 'مارس',
+ 'أبريل',
+ 'مايو',
+ 'يونيو',
+ 'يوليو',
+ 'أغسطس',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+ var ar = moment.defineLocale('ar', {
+ months: months,
+ monthsShort: months,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ return ar;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/az.js b/vendor/assets/javascripts/momentjs/locale/az.js
new file mode 100644
index 000000000..472bee160
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/az.js
@@ -0,0 +1,113 @@
+//! moment.js locale configuration
+//! locale : Azerbaijani [az]
+//! author : topchiyev : https://github.com/topchiyev
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var suffixes = {
+ 1: '-inci',
+ 5: '-inci',
+ 8: '-inci',
+ 70: '-inci',
+ 80: '-inci',
+ 2: '-nci',
+ 7: '-nci',
+ 20: '-nci',
+ 50: '-nci',
+ 3: '-üncü',
+ 4: '-üncü',
+ 100: '-üncü',
+ 6: '-ncı',
+ 9: '-uncu',
+ 10: '-uncu',
+ 30: '-uncu',
+ 60: '-ıncı',
+ 90: '-ıncı',
+ };
+
+ var az = moment.defineLocale('az', {
+ months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
+ weekdays:
+ 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
+ '_'
+ ),
+ weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
+ weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün saat] LT',
+ nextDay: '[sabah saat] LT',
+ nextWeek: '[gələn həftə] dddd [saat] LT',
+ lastDay: '[dünən] LT',
+ lastWeek: '[keçən həftə] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s sonra',
+ past: '%s əvvəl',
+ s: 'bir neçə saniyə',
+ ss: '%d saniyə',
+ m: 'bir dəqiqə',
+ mm: '%d dəqiqə',
+ h: 'bir saat',
+ hh: '%d saat',
+ d: 'bir gün',
+ dd: '%d gün',
+ M: 'bir ay',
+ MM: '%d ay',
+ y: 'bir il',
+ yy: '%d il',
+ },
+ meridiemParse: /gecə|səhər|gündüz|axşam/,
+ isPM: function (input) {
+ return /^(gündüz|axşam)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'gecə';
+ } else if (hour < 12) {
+ return 'səhər';
+ } else if (hour < 17) {
+ return 'gündüz';
+ } else {
+ return 'axşam';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
+ ordinal: function (number) {
+ if (number === 0) {
+ // special case for zero
+ return number + '-ıncı';
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return az;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/be.js b/vendor/assets/javascripts/momentjs/locale/be.js
new file mode 100644
index 000000000..363191221
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/be.js
@@ -0,0 +1,153 @@
+//! moment.js locale configuration
+//! locale : Belarusian [be]
+//! author : Dmitry Demidov : https://github.com/demidov91
+//! author: Praleska: http://praleska.pro/
+//! Author : Menelion Elensúle : https://github.com/Oire
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+ }
+ function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
+ mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
+ hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
+ dd: 'дзень_дні_дзён',
+ MM: 'месяц_месяцы_месяцаў',
+ yy: 'год_гады_гадоў',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'хвіліна' : 'хвіліну';
+ } else if (key === 'h') {
+ return withoutSuffix ? 'гадзіна' : 'гадзіну';
+ } else {
+ return number + ' ' + plural(format[key], +number);
+ }
+ }
+
+ var be = moment.defineLocale('be', {
+ months: {
+ format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
+ '_'
+ ),
+ standalone:
+ 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
+ weekdays: {
+ format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
+ '_'
+ ),
+ standalone:
+ 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
+ '_'
+ ),
+ isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
+ },
+ weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+ weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY г.',
+ LLL: 'D MMMM YYYY г., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY г., HH:mm',
+ },
+ calendar: {
+ sameDay: '[Сёння ў] LT',
+ nextDay: '[Заўтра ў] LT',
+ lastDay: '[Учора ў] LT',
+ nextWeek: function () {
+ return '[У] dddd [ў] LT';
+ },
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 5:
+ case 6:
+ return '[У мінулую] dddd [ў] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[У мінулы] dddd [ў] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'праз %s',
+ past: '%s таму',
+ s: 'некалькі секунд',
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: relativeTimeWithPlural,
+ hh: relativeTimeWithPlural,
+ d: 'дзень',
+ dd: relativeTimeWithPlural,
+ M: 'месяц',
+ MM: relativeTimeWithPlural,
+ y: 'год',
+ yy: relativeTimeWithPlural,
+ },
+ meridiemParse: /ночы|раніцы|дня|вечара/,
+ isPM: function (input) {
+ return /^(дня|вечара)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночы';
+ } else if (hour < 12) {
+ return 'раніцы';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечара';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ case 'w':
+ case 'W':
+ return (number % 10 === 2 || number % 10 === 3) &&
+ number % 100 !== 12 &&
+ number % 100 !== 13
+ ? number + '-і'
+ : number + '-ы';
+ case 'D':
+ return number + '-га';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return be;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/bg.js b/vendor/assets/javascripts/momentjs/locale/bg.js
new file mode 100644
index 000000000..5a1bda825
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/bg.js
@@ -0,0 +1,98 @@
+//! moment.js locale configuration
+//! locale : Bulgarian [bg]
+//! author : Krasen Borisov : https://github.com/kraz
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var bg = moment.defineLocale('bg', {
+ months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
+ '_'
+ ),
+ monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
+ '_'
+ ),
+ weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
+ weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Днес в] LT',
+ nextDay: '[Утре в] LT',
+ nextWeek: 'dddd [в] LT',
+ lastDay: '[Вчера в] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 6:
+ return '[Миналата] dddd [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[Миналия] dddd [в] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'след %s',
+ past: 'преди %s',
+ s: 'няколко секунди',
+ ss: '%d секунди',
+ m: 'минута',
+ mm: '%d минути',
+ h: 'час',
+ hh: '%d часа',
+ d: 'ден',
+ dd: '%d дена',
+ w: 'седмица',
+ ww: '%d седмици',
+ M: 'месец',
+ MM: '%d месеца',
+ y: 'година',
+ yy: '%d години',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+ ordinal: function (number) {
+ var lastDigit = number % 10,
+ last2Digits = number % 100;
+ if (number === 0) {
+ return number + '-ев';
+ } else if (last2Digits === 0) {
+ return number + '-ен';
+ } else if (last2Digits > 10 && last2Digits < 20) {
+ return number + '-ти';
+ } else if (lastDigit === 1) {
+ return number + '-ви';
+ } else if (lastDigit === 2) {
+ return number + '-ри';
+ } else if (lastDigit === 7 || lastDigit === 8) {
+ return number + '-ми';
+ } else {
+ return number + '-ти';
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return bg;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/bm.js b/vendor/assets/javascripts/momentjs/locale/bm.js
new file mode 100644
index 000000000..302410cb0
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/bm.js
@@ -0,0 +1,62 @@
+//! moment.js locale configuration
+//! locale : Bambara [bm]
+//! author : Estelle Comment : https://github.com/estellecomment
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var bm = moment.defineLocale('bm', {
+ months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
+ '_'
+ ),
+ monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
+ weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
+ weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
+ weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'MMMM [tile] D [san] YYYY',
+ LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
+ LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
+ },
+ calendar: {
+ sameDay: '[Bi lɛrɛ] LT',
+ nextDay: '[Sini lɛrɛ] LT',
+ nextWeek: 'dddd [don lɛrɛ] LT',
+ lastDay: '[Kunu lɛrɛ] LT',
+ lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s kɔnɔ',
+ past: 'a bɛ %s bɔ',
+ s: 'sanga dama dama',
+ ss: 'sekondi %d',
+ m: 'miniti kelen',
+ mm: 'miniti %d',
+ h: 'lɛrɛ kelen',
+ hh: 'lɛrɛ %d',
+ d: 'tile kelen',
+ dd: 'tile %d',
+ M: 'kalo kelen',
+ MM: 'kalo %d',
+ y: 'san kelen',
+ yy: 'san %d',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return bm;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/bn-bd.js b/vendor/assets/javascripts/momentjs/locale/bn-bd.js
new file mode 100644
index 000000000..1154aa4ef
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/bn-bd.js
@@ -0,0 +1,140 @@
+//! moment.js locale configuration
+//! locale : Bengali (Bangladesh) [bn-bd]
+//! author : Asraf Hossain Patoary : https://github.com/ashwoolford
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
+ },
+ numberMap = {
+ '১': '1',
+ '২': '2',
+ '৩': '3',
+ '৪': '4',
+ '৫': '5',
+ '৬': '6',
+ '৭': '7',
+ '৮': '8',
+ '৯': '9',
+ '০': '0',
+ };
+
+ var bnBd = moment.defineLocale('bn-bd', {
+ months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
+ '_'
+ ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
+ weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
+ '_'
+ ),
+ weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+ weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm সময়',
+ LTS: 'A h:mm:ss সময়',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm সময়',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
+ },
+ calendar: {
+ sameDay: '[আজ] LT',
+ nextDay: '[আগামীকাল] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[গতকাল] LT',
+ lastWeek: '[গত] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s পরে',
+ past: '%s আগে',
+ s: 'কয়েক সেকেন্ড',
+ ss: '%d সেকেন্ড',
+ m: 'এক মিনিট',
+ mm: '%d মিনিট',
+ h: 'এক ঘন্টা',
+ hh: '%d ঘন্টা',
+ d: 'এক দিন',
+ dd: '%d দিন',
+ M: 'এক মাস',
+ MM: '%d মাস',
+ y: 'এক বছর',
+ yy: '%d বছর',
+ },
+ preparse: function (string) {
+ return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+
+ meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'রাত') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ভোর') {
+ return hour;
+ } else if (meridiem === 'সকাল') {
+ return hour;
+ } else if (meridiem === 'দুপুর') {
+ return hour >= 3 ? hour : hour + 12;
+ } else if (meridiem === 'বিকাল') {
+ return hour + 12;
+ } else if (meridiem === 'সন্ধ্যা') {
+ return hour + 12;
+ }
+ },
+
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'রাত';
+ } else if (hour < 6) {
+ return 'ভোর';
+ } else if (hour < 12) {
+ return 'সকাল';
+ } else if (hour < 15) {
+ return 'দুপুর';
+ } else if (hour < 18) {
+ return 'বিকাল';
+ } else if (hour < 20) {
+ return 'সন্ধ্যা';
+ } else {
+ return 'রাত';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return bnBd;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/bn.js b/vendor/assets/javascripts/momentjs/locale/bn.js
new file mode 100644
index 000000000..e5e3e5f51
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/bn.js
@@ -0,0 +1,130 @@
+//! moment.js locale configuration
+//! locale : Bengali [bn]
+//! author : Kaushik Gandhi : https://github.com/kaushikgandhi
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
+ },
+ numberMap = {
+ '১': '1',
+ '২': '2',
+ '৩': '3',
+ '৪': '4',
+ '৫': '5',
+ '৬': '6',
+ '৭': '7',
+ '৮': '8',
+ '৯': '9',
+ '০': '0',
+ };
+
+ var bn = moment.defineLocale('bn', {
+ months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
+ '_'
+ ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
+ weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
+ '_'
+ ),
+ weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+ weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm সময়',
+ LTS: 'A h:mm:ss সময়',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm সময়',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
+ },
+ calendar: {
+ sameDay: '[আজ] LT',
+ nextDay: '[আগামীকাল] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[গতকাল] LT',
+ lastWeek: '[গত] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s পরে',
+ past: '%s আগে',
+ s: 'কয়েক সেকেন্ড',
+ ss: '%d সেকেন্ড',
+ m: 'এক মিনিট',
+ mm: '%d মিনিট',
+ h: 'এক ঘন্টা',
+ hh: '%d ঘন্টা',
+ d: 'এক দিন',
+ dd: '%d দিন',
+ M: 'এক মাস',
+ MM: '%d মাস',
+ y: 'এক বছর',
+ yy: '%d বছর',
+ },
+ preparse: function (string) {
+ return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'রাত' && hour >= 4) ||
+ (meridiem === 'দুপুর' && hour < 5) ||
+ meridiem === 'বিকাল'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'রাত';
+ } else if (hour < 10) {
+ return 'সকাল';
+ } else if (hour < 17) {
+ return 'দুপুর';
+ } else if (hour < 20) {
+ return 'বিকাল';
+ } else {
+ return 'রাত';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return bn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/bo.js b/vendor/assets/javascripts/momentjs/locale/bo.js
new file mode 100644
index 000000000..c4a7c5210
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/bo.js
@@ -0,0 +1,135 @@
+//! moment.js locale configuration
+//! locale : Tibetan [bo]
+//! author : Thupten N. Chakrishar : https://github.com/vajradog
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '༡',
+ 2: '༢',
+ 3: '༣',
+ 4: '༤',
+ 5: '༥',
+ 6: '༦',
+ 7: '༧',
+ 8: '༨',
+ 9: '༩',
+ 0: '༠',
+ },
+ numberMap = {
+ '༡': '1',
+ '༢': '2',
+ '༣': '3',
+ '༤': '4',
+ '༥': '5',
+ '༦': '6',
+ '༧': '7',
+ '༨': '8',
+ '༩': '9',
+ '༠': '0',
+ };
+
+ var bo = moment.defineLocale('bo', {
+ months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
+ '_'
+ ),
+ monthsShortRegex: /^(ཟླ་\d{1,2})/,
+ monthsParseExact: true,
+ weekdays:
+ 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
+ '_'
+ ),
+ weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
+ '_'
+ ),
+ weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[དི་རིང] LT',
+ nextDay: '[སང་ཉིན] LT',
+ nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
+ lastDay: '[ཁ་སང] LT',
+ lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ལ་',
+ past: '%s སྔན་ལ',
+ s: 'ལམ་སང',
+ ss: '%d སྐར་ཆ།',
+ m: 'སྐར་མ་གཅིག',
+ mm: '%d སྐར་མ',
+ h: 'ཆུ་ཚོད་གཅིག',
+ hh: '%d ཆུ་ཚོད',
+ d: 'ཉིན་གཅིག',
+ dd: '%d ཉིན་',
+ M: 'ཟླ་བ་གཅིག',
+ MM: '%d ཟླ་བ',
+ y: 'ལོ་གཅིག',
+ yy: '%d ལོ',
+ },
+ preparse: function (string) {
+ return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'མཚན་མོ' && hour >= 4) ||
+ (meridiem === 'ཉིན་གུང' && hour < 5) ||
+ meridiem === 'དགོང་དག'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'མཚན་མོ';
+ } else if (hour < 10) {
+ return 'ཞོགས་ཀས';
+ } else if (hour < 17) {
+ return 'ཉིན་གུང';
+ } else if (hour < 20) {
+ return 'དགོང་དག';
+ } else {
+ return 'མཚན་མོ';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return bo;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/br.js b/vendor/assets/javascripts/momentjs/locale/br.js
new file mode 100644
index 000000000..bd047fe43
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/br.js
@@ -0,0 +1,179 @@
+//! moment.js locale configuration
+//! locale : Breton [br]
+//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function relativeTimeWithMutation(number, withoutSuffix, key) {
+ var format = {
+ mm: 'munutenn',
+ MM: 'miz',
+ dd: 'devezh',
+ };
+ return number + ' ' + mutation(format[key], number);
+ }
+ function specialMutationForYears(number) {
+ switch (lastNumber(number)) {
+ case 1:
+ case 3:
+ case 4:
+ case 5:
+ case 9:
+ return number + ' bloaz';
+ default:
+ return number + ' vloaz';
+ }
+ }
+ function lastNumber(number) {
+ if (number > 9) {
+ return lastNumber(number % 10);
+ }
+ return number;
+ }
+ function mutation(text, number) {
+ if (number === 2) {
+ return softMutation(text);
+ }
+ return text;
+ }
+ function softMutation(text) {
+ var mutationTable = {
+ m: 'v',
+ b: 'v',
+ d: 'z',
+ };
+ if (mutationTable[text.charAt(0)] === undefined) {
+ return text;
+ }
+ return mutationTable[text.charAt(0)] + text.substring(1);
+ }
+
+ var monthsParse = [
+ /^gen/i,
+ /^c[ʼ\']hwe/i,
+ /^meu/i,
+ /^ebr/i,
+ /^mae/i,
+ /^(mez|eve)/i,
+ /^gou/i,
+ /^eos/i,
+ /^gwe/i,
+ /^her/i,
+ /^du/i,
+ /^ker/i,
+ ],
+ monthsRegex =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ monthsStrictRegex =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
+ monthsShortStrictRegex =
+ /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ fullWeekdaysParse = [
+ /^sul/i,
+ /^lun/i,
+ /^meurzh/i,
+ /^merc[ʼ\']her/i,
+ /^yaou/i,
+ /^gwener/i,
+ /^sadorn/i,
+ ],
+ shortWeekdaysParse = [
+ /^Sul/i,
+ /^Lun/i,
+ /^Meu/i,
+ /^Mer/i,
+ /^Yao/i,
+ /^Gwe/i,
+ /^Sad/i,
+ ],
+ minWeekdaysParse = [
+ /^Su/i,
+ /^Lu/i,
+ /^Me([^r]|$)/i,
+ /^Mer/i,
+ /^Ya/i,
+ /^Gw/i,
+ /^Sa/i,
+ ];
+
+ var br = moment.defineLocale('br', {
+ months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
+ '_'
+ ),
+ monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
+ weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
+ weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
+ weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
+ weekdaysParse: minWeekdaysParse,
+ fullWeekdaysParse: fullWeekdaysParse,
+ shortWeekdaysParse: shortWeekdaysParse,
+ minWeekdaysParse: minWeekdaysParse,
+
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex: monthsStrictRegex,
+ monthsShortStrictRegex: monthsShortStrictRegex,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [a viz] MMMM YYYY',
+ LLL: 'D [a viz] MMMM YYYY HH:mm',
+ LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hiziv da] LT',
+ nextDay: '[Warcʼhoazh da] LT',
+ nextWeek: 'dddd [da] LT',
+ lastDay: '[Decʼh da] LT',
+ lastWeek: 'dddd [paset da] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'a-benn %s',
+ past: '%s ʼzo',
+ s: 'un nebeud segondennoù',
+ ss: '%d eilenn',
+ m: 'ur vunutenn',
+ mm: relativeTimeWithMutation,
+ h: 'un eur',
+ hh: '%d eur',
+ d: 'un devezh',
+ dd: relativeTimeWithMutation,
+ M: 'ur miz',
+ MM: relativeTimeWithMutation,
+ y: 'ur bloaz',
+ yy: specialMutationForYears,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'añ' : 'vet';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
+ isPM: function (token) {
+ return token === 'g.m.';
+ },
+ meridiem: function (hour, minute, isLower) {
+ return hour < 12 ? 'a.m.' : 'g.m.';
+ },
+ });
+
+ return br;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/bs.js b/vendor/assets/javascripts/momentjs/locale/bs.js
new file mode 100644
index 000000000..e0d6c8511
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/bs.js
@@ -0,0 +1,161 @@
+//! moment.js locale configuration
+//! locale : Bosnian [bs]
+//! author : Nedim Cholich : https://github.com/frontyard
+//! based on (hr) translation by Bojan Marković
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function translate(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ if (number === 1) {
+ result += 'sekunda';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sekunde';
+ } else {
+ result += 'sekundi';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
+ }
+ }
+
+ var bs = moment.defineLocale('bs', {
+ months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[jučer u] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ return '[prošlu] dddd [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'par sekundi',
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: 'dan',
+ dd: translate,
+ M: 'mjesec',
+ MM: translate,
+ y: 'godinu',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return bs;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ca.js b/vendor/assets/javascripts/momentjs/locale/ca.js
new file mode 100644
index 000000000..133071f06
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ca.js
@@ -0,0 +1,111 @@
+//! moment.js locale configuration
+//! locale : Catalan [ca]
+//! author : Juan G. Hurtado : https://github.com/juanghurtado
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var ca = moment.defineLocale('ca', {
+ months: {
+ standalone:
+ 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
+ '_'
+ ),
+ format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\s)+MMMM/,
+ },
+ monthsShort:
+ 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
+ '_'
+ ),
+ weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
+ weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [de] YYYY',
+ ll: 'D MMM YYYY',
+ LLL: 'D MMMM [de] YYYY [a les] H:mm',
+ lll: 'D MMM YYYY, H:mm',
+ LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
+ llll: 'ddd D MMM YYYY, H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ nextDay: function () {
+ return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ lastDay: function () {
+ return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [passat a ' +
+ (this.hours() !== 1 ? 'les' : 'la') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: "d'aquí %s",
+ past: 'fa %s',
+ s: 'uns segons',
+ ss: '%d segons',
+ m: 'un minut',
+ mm: '%d minuts',
+ h: 'una hora',
+ hh: '%d hores',
+ d: 'un dia',
+ dd: '%d dies',
+ M: 'un mes',
+ MM: '%d mesos',
+ y: 'un any',
+ yy: '%d anys',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
+ ordinal: function (number, period) {
+ var output =
+ number === 1
+ ? 'r'
+ : number === 2
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
+ if (period === 'w' || period === 'W') {
+ output = 'a';
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return ca;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/cs.js b/vendor/assets/javascripts/momentjs/locale/cs.js
new file mode 100644
index 000000000..43d0ebd3b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/cs.js
@@ -0,0 +1,191 @@
+//! moment.js locale configuration
+//! locale : Czech [cs]
+//! author : petrbela : https://github.com/petrbela
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var months = {
+ format: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
+ '_'
+ ),
+ standalone:
+ 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(
+ '_'
+ ),
+ },
+ monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
+ monthsParse = [
+ /^led/i,
+ /^úno/i,
+ /^bře/i,
+ /^dub/i,
+ /^kvě/i,
+ /^(čvn|červen$|června)/i,
+ /^(čvc|červenec|července)/i,
+ /^srp/i,
+ /^zář/i,
+ /^říj/i,
+ /^lis/i,
+ /^pro/i,
+ ],
+ // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
+ // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
+ monthsRegex =
+ /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
+
+ function plural(n) {
+ return n > 1 && n < 5 && ~~(n / 10) !== 1;
+ }
+ function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
+ case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'sekundy' : 'sekund');
+ } else {
+ return result + 'sekundami';
+ }
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'minuty' : 'minut');
+ } else {
+ return result + 'minutami';
+ }
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'hodiny' : 'hodin');
+ } else {
+ return result + 'hodinami';
+ }
+ case 'd': // a day / in a day / a day ago
+ return withoutSuffix || isFuture ? 'den' : 'dnem';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'dny' : 'dní');
+ } else {
+ return result + 'dny';
+ }
+ case 'M': // a month / in a month / a month ago
+ return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'měsíce' : 'měsíců');
+ } else {
+ return result + 'měsíci';
+ }
+ case 'y': // a year / in a year / a year ago
+ return withoutSuffix || isFuture ? 'rok' : 'rokem';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'roky' : 'let');
+ } else {
+ return result + 'lety';
+ }
+ }
+ }
+
+ var cs = moment.defineLocale('cs', {
+ months: months,
+ monthsShort: monthsShort,
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
+ // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
+ monthsStrictRegex:
+ /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
+ monthsShortStrictRegex:
+ /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
+ weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
+ weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd D. MMMM YYYY H:mm',
+ l: 'D. M. YYYY',
+ },
+ calendar: {
+ sameDay: '[dnes v] LT',
+ nextDay: '[zítra v] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v neděli v] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [v] LT';
+ case 3:
+ return '[ve středu v] LT';
+ case 4:
+ return '[ve čtvrtek v] LT';
+ case 5:
+ return '[v pátek v] LT';
+ case 6:
+ return '[v sobotu v] LT';
+ }
+ },
+ lastDay: '[včera v] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[minulou neděli v] LT';
+ case 1:
+ case 2:
+ return '[minulé] dddd [v] LT';
+ case 3:
+ return '[minulou středu v] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [v] LT';
+ case 6:
+ return '[minulou sobotu v] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'před %s',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return cs;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/cv.js b/vendor/assets/javascripts/momentjs/locale/cv.js
new file mode 100644
index 000000000..abb1d4f50
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/cv.js
@@ -0,0 +1,74 @@
+//! moment.js locale configuration
+//! locale : Chuvash [cv]
+//! author : Anatoly Mironov : https://github.com/mirontoli
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var cv = moment.defineLocale('cv', {
+ months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
+ '_'
+ ),
+ monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
+ weekdays:
+ 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
+ '_'
+ ),
+ weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
+ weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
+ LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+ LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+ },
+ calendar: {
+ sameDay: '[Паян] LT [сехетре]',
+ nextDay: '[Ыран] LT [сехетре]',
+ lastDay: '[Ӗнер] LT [сехетре]',
+ nextWeek: '[Ҫитес] dddd LT [сехетре]',
+ lastWeek: '[Иртнӗ] dddd LT [сехетре]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (output) {
+ var affix = /сехет$/i.exec(output)
+ ? 'рен'
+ : /ҫул$/i.exec(output)
+ ? 'тан'
+ : 'ран';
+ return output + affix;
+ },
+ past: '%s каялла',
+ s: 'пӗр-ик ҫеккунт',
+ ss: '%d ҫеккунт',
+ m: 'пӗр минут',
+ mm: '%d минут',
+ h: 'пӗр сехет',
+ hh: '%d сехет',
+ d: 'пӗр кун',
+ dd: '%d кун',
+ M: 'пӗр уйӑх',
+ MM: '%d уйӑх',
+ y: 'пӗр ҫул',
+ yy: '%d ҫул',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
+ ordinal: '%d-мӗш',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return cv;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/cy.js b/vendor/assets/javascripts/momentjs/locale/cy.js
new file mode 100644
index 000000000..3b987f277
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/cy.js
@@ -0,0 +1,109 @@
+//! moment.js locale configuration
+//! locale : Welsh [cy]
+//! author : Robert Allen : https://github.com/robgallen
+//! author : https://github.com/ryangreaves
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var cy = moment.defineLocale('cy', {
+ months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
+ '_'
+ ),
+ monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
+ '_'
+ ),
+ weekdays:
+ 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
+ weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
+ weekdaysParseExact: true,
+ // time formats are the same as en-gb
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Heddiw am] LT',
+ nextDay: '[Yfory am] LT',
+ nextWeek: 'dddd [am] LT',
+ lastDay: '[Ddoe am] LT',
+ lastWeek: 'dddd [diwethaf am] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'mewn %s',
+ past: '%s yn ôl',
+ s: 'ychydig eiliadau',
+ ss: '%d eiliad',
+ m: 'munud',
+ mm: '%d munud',
+ h: 'awr',
+ hh: '%d awr',
+ d: 'diwrnod',
+ dd: '%d diwrnod',
+ M: 'mis',
+ MM: '%d mis',
+ y: 'blwyddyn',
+ yy: '%d flynedd',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
+ // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
+ ordinal: function (number) {
+ var b = number,
+ output = '',
+ lookup = [
+ '',
+ 'af',
+ 'il',
+ 'ydd',
+ 'ydd',
+ 'ed',
+ 'ed',
+ 'ed',
+ 'fed',
+ 'fed',
+ 'fed', // 1af to 10fed
+ 'eg',
+ 'fed',
+ 'eg',
+ 'eg',
+ 'fed',
+ 'eg',
+ 'eg',
+ 'fed',
+ 'eg',
+ 'fed', // 11eg to 20fed
+ ];
+ if (b > 20) {
+ if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
+ output = 'fed'; // not 30ain, 70ain or 90ain
+ } else {
+ output = 'ain';
+ }
+ } else if (b > 0) {
+ output = lookup[b];
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return cy;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/da.js b/vendor/assets/javascripts/momentjs/locale/da.js
new file mode 100644
index 000000000..2ed05839c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/da.js
@@ -0,0 +1,64 @@
+//! moment.js locale configuration
+//! locale : Danish [da]
+//! author : Ulrik Nielsen : https://github.com/mrbase
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var da = moment.defineLocale('da', {
+ months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
+ weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i dag kl.] LT',
+ nextDay: '[i morgen kl.] LT',
+ nextWeek: 'på dddd [kl.] LT',
+ lastDay: '[i går kl.] LT',
+ lastWeek: '[i] dddd[s kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s siden',
+ s: 'få sekunder',
+ ss: '%d sekunder',
+ m: 'et minut',
+ mm: '%d minutter',
+ h: 'en time',
+ hh: '%d timer',
+ d: 'en dag',
+ dd: '%d dage',
+ M: 'en måned',
+ MM: '%d måneder',
+ y: 'et år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return da;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/de-at.js b/vendor/assets/javascripts/momentjs/locale/de-at.js
new file mode 100644
index 000000000..7c3130284
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/de-at.js
@@ -0,0 +1,90 @@
+//! moment.js locale configuration
+//! locale : German (Austria) [de-at]
+//! author : lluchs : https://github.com/lluchs
+//! author: Menelion Elensúle: https://github.com/Oire
+//! author : Martin Groller : https://github.com/MadMG
+//! author : Mikolaj Dadela : https://github.com/mik01aj
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+
+ var deAt = moment.defineLocale('de-at', {
+ months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime,
+ mm: '%d Minuten',
+ h: processRelativeTime,
+ hh: '%d Stunden',
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return deAt;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/de-ch.js b/vendor/assets/javascripts/momentjs/locale/de-ch.js
new file mode 100644
index 000000000..10fed176d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/de-ch.js
@@ -0,0 +1,87 @@
+//! moment.js locale configuration
+//! locale : German (Switzerland) [de-ch]
+//! author : sschueller : https://github.com/sschueller
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+
+ var deCh = moment.defineLocale('de-ch', {
+ months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime,
+ mm: '%d Minuten',
+ h: processRelativeTime,
+ hh: '%d Stunden',
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return deCh;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/de.js b/vendor/assets/javascripts/momentjs/locale/de.js
new file mode 100644
index 000000000..cc061ebf4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/de.js
@@ -0,0 +1,89 @@
+//! moment.js locale configuration
+//! locale : German [de]
+//! author : lluchs : https://github.com/lluchs
+//! author: Menelion Elensúle: https://github.com/Oire
+//! author : Mikolaj Dadela : https://github.com/mik01aj
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+
+ var de = moment.defineLocale('de', {
+ months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime,
+ mm: '%d Minuten',
+ h: processRelativeTime,
+ hh: '%d Stunden',
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return de;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/dv.js b/vendor/assets/javascripts/momentjs/locale/dv.js
new file mode 100644
index 000000000..e6cc8f649
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/dv.js
@@ -0,0 +1,101 @@
+//! moment.js locale configuration
+//! locale : Maldivian [dv]
+//! author : Jawish Hameed : https://github.com/jawish
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var months = [
+ 'ޖެނުއަރީ',
+ 'ފެބްރުއަރީ',
+ 'މާރިޗު',
+ 'އޭޕްރީލު',
+ 'މޭ',
+ 'ޖޫން',
+ 'ޖުލައި',
+ 'އޯގަސްޓު',
+ 'ސެޕްޓެމްބަރު',
+ 'އޮކްޓޯބަރު',
+ 'ނޮވެމްބަރު',
+ 'ޑިސެމްބަރު',
+ ],
+ weekdays = [
+ 'އާދިއްތަ',
+ 'ހޯމަ',
+ 'އަންގާރަ',
+ 'ބުދަ',
+ 'ބުރާސްފަތި',
+ 'ހުކުރު',
+ 'ހޮނިހިރު',
+ ];
+
+ var dv = moment.defineLocale('dv', {
+ months: months,
+ monthsShort: months,
+ weekdays: weekdays,
+ weekdaysShort: weekdays,
+ weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/M/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /މކ|މފ/,
+ isPM: function (input) {
+ return 'މފ' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'މކ';
+ } else {
+ return 'މފ';
+ }
+ },
+ calendar: {
+ sameDay: '[މިއަދު] LT',
+ nextDay: '[މާދަމާ] LT',
+ nextWeek: 'dddd LT',
+ lastDay: '[އިއްޔެ] LT',
+ lastWeek: '[ފާއިތުވި] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ތެރޭގައި %s',
+ past: 'ކުރިން %s',
+ s: 'ސިކުންތުކޮޅެއް',
+ ss: 'd% ސިކުންތު',
+ m: 'މިނިޓެއް',
+ mm: 'މިނިޓު %d',
+ h: 'ގަޑިއިރެއް',
+ hh: 'ގަޑިއިރު %d',
+ d: 'ދުވަހެއް',
+ dd: 'ދުވަސް %d',
+ M: 'މަހެއް',
+ MM: 'މަސް %d',
+ y: 'އަހަރެއް',
+ yy: 'އަހަރު %d',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 7, // Sunday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ return dv;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/el.js b/vendor/assets/javascripts/momentjs/locale/el.js
new file mode 100644
index 000000000..a14785979
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/el.js
@@ -0,0 +1,117 @@
+//! moment.js locale configuration
+//! locale : Greek [el]
+//! author : Aggelos Karalias : https://github.com/mehiel
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function isFunction(input) {
+ return (
+ (typeof Function !== 'undefined' && input instanceof Function) ||
+ Object.prototype.toString.call(input) === '[object Function]'
+ );
+ }
+
+ var el = moment.defineLocale('el', {
+ monthsNominativeEl:
+ 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
+ '_'
+ ),
+ monthsGenitiveEl:
+ 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
+ '_'
+ ),
+ months: function (momentToFormat, format) {
+ if (!momentToFormat) {
+ return this._monthsNominativeEl;
+ } else if (
+ typeof format === 'string' &&
+ /D/.test(format.substring(0, format.indexOf('MMMM')))
+ ) {
+ // if there is a day number before 'MMMM'
+ return this._monthsGenitiveEl[momentToFormat.month()];
+ } else {
+ return this._monthsNominativeEl[momentToFormat.month()];
+ }
+ },
+ monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
+ weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
+ '_'
+ ),
+ weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
+ weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'μμ' : 'ΜΜ';
+ } else {
+ return isLower ? 'πμ' : 'ΠΜ';
+ }
+ },
+ isPM: function (input) {
+ return (input + '').toLowerCase()[0] === 'μ';
+ },
+ meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendarEl: {
+ sameDay: '[Σήμερα {}] LT',
+ nextDay: '[Αύριο {}] LT',
+ nextWeek: 'dddd [{}] LT',
+ lastDay: '[Χθες {}] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 6:
+ return '[το προηγούμενο] dddd [{}] LT';
+ default:
+ return '[την προηγούμενη] dddd [{}] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ calendar: function (key, mom) {
+ var output = this._calendarEl[key],
+ hours = mom && mom.hours();
+ if (isFunction(output)) {
+ output = output.apply(mom);
+ }
+ return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
+ },
+ relativeTime: {
+ future: 'σε %s',
+ past: '%s πριν',
+ s: 'λίγα δευτερόλεπτα',
+ ss: '%d δευτερόλεπτα',
+ m: 'ένα λεπτό',
+ mm: '%d λεπτά',
+ h: 'μία ώρα',
+ hh: '%d ώρες',
+ d: 'μία μέρα',
+ dd: '%d μέρες',
+ M: 'ένας μήνας',
+ MM: '%d μήνες',
+ y: 'ένας χρόνος',
+ yy: '%d χρόνια',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}η/,
+ ordinal: '%dη',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4st is the first week of the year.
+ },
+ });
+
+ return el;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/en-au.js b/vendor/assets/javascripts/momentjs/locale/en-au.js
new file mode 100644
index 000000000..6e320ba59
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/en-au.js
@@ -0,0 +1,79 @@
+//! moment.js locale configuration
+//! locale : English (Australia) [en-au]
+//! author : Jared Morse : https://github.com/jarcoal
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var enAu = moment.defineLocale('en-au', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return enAu;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/en-ca.js b/vendor/assets/javascripts/momentjs/locale/en-ca.js
new file mode 100644
index 000000000..bc574f1a4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/en-ca.js
@@ -0,0 +1,75 @@
+//! moment.js locale configuration
+//! locale : English (Canada) [en-ca]
+//! author : Jonathan Abourbih : https://github.com/jonbca
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var enCa = moment.defineLocale('en-ca', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'YYYY-MM-DD',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY h:mm A',
+ LLLL: 'dddd, MMMM D, YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ });
+
+ return enCa;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/en-gb.js b/vendor/assets/javascripts/momentjs/locale/en-gb.js
new file mode 100644
index 000000000..828791e25
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/en-gb.js
@@ -0,0 +1,79 @@
+//! moment.js locale configuration
+//! locale : English (United Kingdom) [en-gb]
+//! author : Chris Gedrim : https://github.com/chrisgedrim
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var enGb = moment.defineLocale('en-gb', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return enGb;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/en-ie.js b/vendor/assets/javascripts/momentjs/locale/en-ie.js
new file mode 100644
index 000000000..086cf395d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/en-ie.js
@@ -0,0 +1,79 @@
+//! moment.js locale configuration
+//! locale : English (Ireland) [en-ie]
+//! author : Chris Cartlidge : https://github.com/chriscartlidge
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var enIe = moment.defineLocale('en-ie', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return enIe;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/en-il.js b/vendor/assets/javascripts/momentjs/locale/en-il.js
new file mode 100644
index 000000000..e52503ce8
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/en-il.js
@@ -0,0 +1,75 @@
+//! moment.js locale configuration
+//! locale : English (Israel) [en-il]
+//! author : Chris Gedrim : https://github.com/chrisgedrim
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var enIl = moment.defineLocale('en-il', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ });
+
+ return enIl;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/en-in.js b/vendor/assets/javascripts/momentjs/locale/en-in.js
new file mode 100644
index 000000000..06b9abc41
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/en-in.js
@@ -0,0 +1,79 @@
+//! moment.js locale configuration
+//! locale : English (India) [en-in]
+//! author : Jatin Agrawal : https://github.com/jatinag22
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var enIn = moment.defineLocale('en-in', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 1st is the first week of the year.
+ },
+ });
+
+ return enIn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/en-nz.js b/vendor/assets/javascripts/momentjs/locale/en-nz.js
new file mode 100644
index 000000000..3bc7e9f60
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/en-nz.js
@@ -0,0 +1,79 @@
+//! moment.js locale configuration
+//! locale : English (New Zealand) [en-nz]
+//! author : Luke McGregor : https://github.com/lukemcgregor
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var enNz = moment.defineLocale('en-nz', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return enNz;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/en-sg.js b/vendor/assets/javascripts/momentjs/locale/en-sg.js
new file mode 100644
index 000000000..4de803c13
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/en-sg.js
@@ -0,0 +1,79 @@
+//! moment.js locale configuration
+//! locale : English (Singapore) [en-sg]
+//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var enSg = moment.defineLocale('en-sg', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return enSg;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/eo.js b/vendor/assets/javascripts/momentjs/locale/eo.js
new file mode 100644
index 000000000..799dad0cd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/eo.js
@@ -0,0 +1,79 @@
+//! moment.js locale configuration
+//! locale : Esperanto [eo]
+//! author : Colin Dean : https://github.com/colindean
+//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
+//! comment : miestasmia corrected the translation by colindean
+//! comment : Vivakvo corrected the translation by colindean and miestasmia
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var eo = moment.defineLocale('eo', {
+ months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
+ weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
+ weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: '[la] D[-an de] MMMM, YYYY',
+ LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
+ LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
+ llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',
+ },
+ meridiemParse: /[ap]\.t\.m/i,
+ isPM: function (input) {
+ return input.charAt(0).toLowerCase() === 'p';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'p.t.m.' : 'P.T.M.';
+ } else {
+ return isLower ? 'a.t.m.' : 'A.T.M.';
+ }
+ },
+ calendar: {
+ sameDay: '[Hodiaŭ je] LT',
+ nextDay: '[Morgaŭ je] LT',
+ nextWeek: 'dddd[n je] LT',
+ lastDay: '[Hieraŭ je] LT',
+ lastWeek: '[pasintan] dddd[n je] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'post %s',
+ past: 'antaŭ %s',
+ s: 'kelkaj sekundoj',
+ ss: '%d sekundoj',
+ m: 'unu minuto',
+ mm: '%d minutoj',
+ h: 'unu horo',
+ hh: '%d horoj',
+ d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
+ dd: '%d tagoj',
+ M: 'unu monato',
+ MM: '%d monatoj',
+ y: 'unu jaro',
+ yy: '%d jaroj',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}a/,
+ ordinal: '%da',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return eo;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/es-do.js b/vendor/assets/javascripts/momentjs/locale/es-do.js
new file mode 100644
index 000000000..8a557c331
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/es-do.js
@@ -0,0 +1,119 @@
+//! moment.js locale configuration
+//! locale : Spanish (Dominican Republic) [es-do]
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ var esDo = moment.defineLocale('es-do', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY h:mm A',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return esDo;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/es-mx.js b/vendor/assets/javascripts/momentjs/locale/es-mx.js
new file mode 100644
index 000000000..a233e402e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/es-mx.js
@@ -0,0 +1,121 @@
+//! moment.js locale configuration
+//! locale : Spanish (Mexico) [es-mx]
+//! author : JC Franco : https://github.com/jcfranco
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ var esMx = moment.defineLocale('es-mx', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ invalidDate: 'Fecha inválida',
+ });
+
+ return esMx;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/es-us.js b/vendor/assets/javascripts/momentjs/locale/es-us.js
new file mode 100644
index 000000000..2c52254cd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/es-us.js
@@ -0,0 +1,121 @@
+//! moment.js locale configuration
+//! locale : Spanish (United States) [es-us]
+//! author : bustta : https://github.com/bustta
+//! author : chrisrodz : https://github.com/chrisrodz
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ var esUs = moment.defineLocale('es-us', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'MM/DD/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY h:mm A',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return esUs;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/es.js b/vendor/assets/javascripts/momentjs/locale/es.js
new file mode 100644
index 000000000..7fc46286a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/es.js
@@ -0,0 +1,121 @@
+//! moment.js locale configuration
+//! locale : Spanish [es]
+//! author : Julio Napurí : https://github.com/julionc
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ var es = moment.defineLocale('es', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ invalidDate: 'Fecha inválida',
+ });
+
+ return es;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/et.js b/vendor/assets/javascripts/momentjs/locale/et.js
new file mode 100644
index 000000000..7c8760d8b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/et.js
@@ -0,0 +1,89 @@
+//! moment.js locale configuration
+//! locale : Estonian [et]
+//! author : Henry Kehlmann : https://github.com/madhenry
+//! improvements : Illimar Tambek : https://github.com/ragulka
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
+ ss: [number + 'sekundi', number + 'sekundit'],
+ m: ['ühe minuti', 'üks minut'],
+ mm: [number + ' minuti', number + ' minutit'],
+ h: ['ühe tunni', 'tund aega', 'üks tund'],
+ hh: [number + ' tunni', number + ' tundi'],
+ d: ['ühe päeva', 'üks päev'],
+ M: ['kuu aja', 'kuu aega', 'üks kuu'],
+ MM: [number + ' kuu', number + ' kuud'],
+ y: ['ühe aasta', 'aasta', 'üks aasta'],
+ yy: [number + ' aasta', number + ' aastat'],
+ };
+ if (withoutSuffix) {
+ return format[key][2] ? format[key][2] : format[key][1];
+ }
+ return isFuture ? format[key][0] : format[key][1];
+ }
+
+ var et = moment.defineLocale('et', {
+ months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
+ weekdays:
+ 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
+ '_'
+ ),
+ weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
+ weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Täna,] LT',
+ nextDay: '[Homme,] LT',
+ nextWeek: '[Järgmine] dddd LT',
+ lastDay: '[Eile,] LT',
+ lastWeek: '[Eelmine] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s pärast',
+ past: '%s tagasi',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: '%d päeva',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return et;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/eu.js b/vendor/assets/javascripts/momentjs/locale/eu.js
new file mode 100644
index 000000000..ca2e54763
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/eu.js
@@ -0,0 +1,76 @@
+//! moment.js locale configuration
+//! locale : Basque [eu]
+//! author : Eneko Illarramendi : https://github.com/eillarra
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var eu = moment.defineLocale('eu', {
+ months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
+ '_'
+ ),
+ monthsShort:
+ 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
+ '_'
+ ),
+ weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
+ weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY[ko] MMMM[ren] D[a]',
+ LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
+ LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
+ l: 'YYYY-M-D',
+ ll: 'YYYY[ko] MMM D[a]',
+ lll: 'YYYY[ko] MMM D[a] HH:mm',
+ llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',
+ },
+ calendar: {
+ sameDay: '[gaur] LT[etan]',
+ nextDay: '[bihar] LT[etan]',
+ nextWeek: 'dddd LT[etan]',
+ lastDay: '[atzo] LT[etan]',
+ lastWeek: '[aurreko] dddd LT[etan]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s barru',
+ past: 'duela %s',
+ s: 'segundo batzuk',
+ ss: '%d segundo',
+ m: 'minutu bat',
+ mm: '%d minutu',
+ h: 'ordu bat',
+ hh: '%d ordu',
+ d: 'egun bat',
+ dd: '%d egun',
+ M: 'hilabete bat',
+ MM: '%d hilabete',
+ y: 'urte bat',
+ yy: '%d urte',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return eu;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/fa.js b/vendor/assets/javascripts/momentjs/locale/fa.js
new file mode 100644
index 000000000..845757b8d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/fa.js
@@ -0,0 +1,124 @@
+//! moment.js locale configuration
+//! locale : Persian [fa]
+//! author : Ebrahim Byagowi : https://github.com/ebraminio
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '۱',
+ 2: '۲',
+ 3: '۳',
+ 4: '۴',
+ 5: '۵',
+ 6: '۶',
+ 7: '۷',
+ 8: '۸',
+ 9: '۹',
+ 0: '۰',
+ },
+ numberMap = {
+ '۱': '1',
+ '۲': '2',
+ '۳': '3',
+ '۴': '4',
+ '۵': '5',
+ '۶': '6',
+ '۷': '7',
+ '۸': '8',
+ '۹': '9',
+ '۰': '0',
+ };
+
+ var fa = moment.defineLocale('fa', {
+ months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
+ '_'
+ ),
+ weekdays:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
+ weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /قبل از ظهر|بعد از ظهر/,
+ isPM: function (input) {
+ return /بعد از ظهر/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'قبل از ظهر';
+ } else {
+ return 'بعد از ظهر';
+ }
+ },
+ calendar: {
+ sameDay: '[امروز ساعت] LT',
+ nextDay: '[فردا ساعت] LT',
+ nextWeek: 'dddd [ساعت] LT',
+ lastDay: '[دیروز ساعت] LT',
+ lastWeek: 'dddd [پیش] [ساعت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'در %s',
+ past: '%s پیش',
+ s: 'چند ثانیه',
+ ss: '%d ثانیه',
+ m: 'یک دقیقه',
+ mm: '%d دقیقه',
+ h: 'یک ساعت',
+ hh: '%d ساعت',
+ d: 'یک روز',
+ dd: '%d روز',
+ M: 'یک ماه',
+ MM: '%d ماه',
+ y: 'یک سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[۰-۹]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}م/,
+ ordinal: '%dم',
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ return fa;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/fi.js b/vendor/assets/javascripts/momentjs/locale/fi.js
new file mode 100644
index 000000000..07e57cf6e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/fi.js
@@ -0,0 +1,135 @@
+//! moment.js locale configuration
+//! locale : Finnish [fi]
+//! author : Tarmo Aidantausta : https://github.com/bleadof
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var numbersPast =
+ 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
+ ' '
+ ),
+ numbersFuture = [
+ 'nolla',
+ 'yhden',
+ 'kahden',
+ 'kolmen',
+ 'neljän',
+ 'viiden',
+ 'kuuden',
+ numbersPast[7],
+ numbersPast[8],
+ numbersPast[9],
+ ];
+ function translate(number, withoutSuffix, key, isFuture) {
+ var result = '';
+ switch (key) {
+ case 's':
+ return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
+ case 'ss':
+ result = isFuture ? 'sekunnin' : 'sekuntia';
+ break;
+ case 'm':
+ return isFuture ? 'minuutin' : 'minuutti';
+ case 'mm':
+ result = isFuture ? 'minuutin' : 'minuuttia';
+ break;
+ case 'h':
+ return isFuture ? 'tunnin' : 'tunti';
+ case 'hh':
+ result = isFuture ? 'tunnin' : 'tuntia';
+ break;
+ case 'd':
+ return isFuture ? 'päivän' : 'päivä';
+ case 'dd':
+ result = isFuture ? 'päivän' : 'päivää';
+ break;
+ case 'M':
+ return isFuture ? 'kuukauden' : 'kuukausi';
+ case 'MM':
+ result = isFuture ? 'kuukauden' : 'kuukautta';
+ break;
+ case 'y':
+ return isFuture ? 'vuoden' : 'vuosi';
+ case 'yy':
+ result = isFuture ? 'vuoden' : 'vuotta';
+ break;
+ }
+ result = verbalNumber(number, isFuture) + ' ' + result;
+ return result;
+ }
+ function verbalNumber(number, isFuture) {
+ return number < 10
+ ? isFuture
+ ? numbersFuture[number]
+ : numbersPast[number]
+ : number;
+ }
+
+ var fi = moment.defineLocale('fi', {
+ months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
+ '_'
+ ),
+ monthsShort:
+ 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
+ '_'
+ ),
+ weekdays:
+ 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
+ '_'
+ ),
+ weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
+ weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD.MM.YYYY',
+ LL: 'Do MMMM[ta] YYYY',
+ LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
+ LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
+ l: 'D.M.YYYY',
+ ll: 'Do MMM YYYY',
+ lll: 'Do MMM YYYY, [klo] HH.mm',
+ llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
+ },
+ calendar: {
+ sameDay: '[tänään] [klo] LT',
+ nextDay: '[huomenna] [klo] LT',
+ nextWeek: 'dddd [klo] LT',
+ lastDay: '[eilen] [klo] LT',
+ lastWeek: '[viime] dddd[na] [klo] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s päästä',
+ past: '%s sitten',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return fi;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/fil.js b/vendor/assets/javascripts/momentjs/locale/fil.js
new file mode 100644
index 000000000..13103e8d3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/fil.js
@@ -0,0 +1,69 @@
+//! moment.js locale configuration
+//! locale : Filipino [fil]
+//! author : Dan Hagman : https://github.com/hagmandan
+//! author : Matthew Co : https://github.com/matthewdeeco
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var fil = moment.defineLocale('fil', {
+ months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
+ '_'
+ ),
+ monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+ weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+ weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'MM/D/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY HH:mm',
+ LLLL: 'dddd, MMMM DD, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: 'LT [ngayong araw]',
+ nextDay: '[Bukas ng] LT',
+ nextWeek: 'LT [sa susunod na] dddd',
+ lastDay: 'LT [kahapon]',
+ lastWeek: 'LT [noong nakaraang] dddd',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'sa loob ng %s',
+ past: '%s ang nakalipas',
+ s: 'ilang segundo',
+ ss: '%d segundo',
+ m: 'isang minuto',
+ mm: '%d minuto',
+ h: 'isang oras',
+ hh: '%d oras',
+ d: 'isang araw',
+ dd: '%d araw',
+ M: 'isang buwan',
+ MM: '%d buwan',
+ y: 'isang taon',
+ yy: '%d taon',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return fil;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/fo.js b/vendor/assets/javascripts/momentjs/locale/fo.js
new file mode 100644
index 000000000..217fcfbb3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/fo.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : Faroese [fo]
+//! author : Ragnar Johannesen : https://github.com/ragnar123
+//! author : Kristian Sakarisson : https://github.com/sakarisson
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var fo = moment.defineLocale('fo', {
+ months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
+ weekdays:
+ 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
+ '_'
+ ),
+ weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
+ weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D. MMMM, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Í dag kl.] LT',
+ nextDay: '[Í morgin kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[Í gjár kl.] LT',
+ lastWeek: '[síðstu] dddd [kl] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'um %s',
+ past: '%s síðani',
+ s: 'fá sekund',
+ ss: '%d sekundir',
+ m: 'ein minuttur',
+ mm: '%d minuttir',
+ h: 'ein tími',
+ hh: '%d tímar',
+ d: 'ein dagur',
+ dd: '%d dagar',
+ M: 'ein mánaður',
+ MM: '%d mánaðir',
+ y: 'eitt ár',
+ yy: '%d ár',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return fo;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/fr-ca.js b/vendor/assets/javascripts/momentjs/locale/fr-ca.js
new file mode 100644
index 000000000..7d48fd7b7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/fr-ca.js
@@ -0,0 +1,81 @@
+//! moment.js locale configuration
+//! locale : French (Canada) [fr-ca]
+//! author : Jonathan Abourbih : https://github.com/jonbca
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var frCa = moment.defineLocale('fr-ca', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'D':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ });
+
+ return frCa;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/fr-ch.js b/vendor/assets/javascripts/momentjs/locale/fr-ch.js
new file mode 100644
index 000000000..c28d81cfb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/fr-ch.js
@@ -0,0 +1,85 @@
+//! moment.js locale configuration
+//! locale : French (Switzerland) [fr-ch]
+//! author : Gaspard Bucher : https://github.com/gaspard
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var frCh = moment.defineLocale('fr-ch', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'D':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return frCh;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/fr.js b/vendor/assets/javascripts/momentjs/locale/fr.js
new file mode 100644
index 000000000..4e5536b49
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/fr.js
@@ -0,0 +1,119 @@
+//! moment.js locale configuration
+//! locale : French [fr]
+//! author : John Fischer : https://github.com/jfroffice
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var monthsStrictRegex =
+ /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsShortStrictRegex =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
+ monthsRegex =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsParse = [
+ /^janv/i,
+ /^févr/i,
+ /^mars/i,
+ /^avr/i,
+ /^mai/i,
+ /^juin/i,
+ /^juil/i,
+ /^août/i,
+ /^sept/i,
+ /^oct/i,
+ /^nov/i,
+ /^déc/i,
+ ];
+
+ var fr = moment.defineLocale('fr', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex: monthsStrictRegex,
+ monthsShortStrictRegex: monthsShortStrictRegex,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ w: 'une semaine',
+ ww: '%d semaines',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // TODO: Return 'e' when day of month > 1. Move this case inside
+ // block for masculine words below.
+ // See https://github.com/moment/moment/issues/3375
+ case 'D':
+ return number + (number === 1 ? 'er' : '');
+
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return fr;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/fy.js b/vendor/assets/javascripts/momentjs/locale/fy.js
new file mode 100644
index 000000000..46cac083d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/fy.js
@@ -0,0 +1,86 @@
+//! moment.js locale configuration
+//! locale : Frisian [fy]
+//! author : Robin van der Vliet : https://github.com/robin0van0der0v
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
+
+ var fy = moment.defineLocale('fy', {
+ months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots[m.month()];
+ } else {
+ return monthsShortWithDots[m.month()];
+ }
+ },
+ monthsParseExact: true,
+ weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
+ '_'
+ ),
+ weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
+ weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[hjoed om] LT',
+ nextDay: '[moarn om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[juster om] LT',
+ lastWeek: '[ôfrûne] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'oer %s',
+ past: '%s lyn',
+ s: 'in pear sekonden',
+ ss: '%d sekonden',
+ m: 'ien minút',
+ mm: '%d minuten',
+ h: 'ien oere',
+ hh: '%d oeren',
+ d: 'ien dei',
+ dd: '%d dagen',
+ M: 'ien moanne',
+ MM: '%d moannen',
+ y: 'ien jier',
+ yy: '%d jierren',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return fy;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ga.js b/vendor/assets/javascripts/momentjs/locale/ga.js
new file mode 100644
index 000000000..96f988c80
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ga.js
@@ -0,0 +1,106 @@
+//! moment.js locale configuration
+//! locale : Irish or Irish Gaelic [ga]
+//! author : André Silva : https://github.com/askpt
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var months = [
+ 'Eanáir',
+ 'Feabhra',
+ 'Márta',
+ 'Aibreán',
+ 'Bealtaine',
+ 'Meitheamh',
+ 'Iúil',
+ 'Lúnasa',
+ 'Meán Fómhair',
+ 'Deireadh Fómhair',
+ 'Samhain',
+ 'Nollaig',
+ ],
+ monthsShort = [
+ 'Ean',
+ 'Feabh',
+ 'Márt',
+ 'Aib',
+ 'Beal',
+ 'Meith',
+ 'Iúil',
+ 'Lún',
+ 'M.F.',
+ 'D.F.',
+ 'Samh',
+ 'Noll',
+ ],
+ weekdays = [
+ 'Dé Domhnaigh',
+ 'Dé Luain',
+ 'Dé Máirt',
+ 'Dé Céadaoin',
+ 'Déardaoin',
+ 'Dé hAoine',
+ 'Dé Sathairn',
+ ],
+ weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
+ weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
+
+ var ga = moment.defineLocale('ga', {
+ months: months,
+ monthsShort: monthsShort,
+ monthsParseExact: true,
+ weekdays: weekdays,
+ weekdaysShort: weekdaysShort,
+ weekdaysMin: weekdaysMin,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Inniu ag] LT',
+ nextDay: '[Amárach ag] LT',
+ nextWeek: 'dddd [ag] LT',
+ lastDay: '[Inné ag] LT',
+ lastWeek: 'dddd [seo caite] [ag] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'i %s',
+ past: '%s ó shin',
+ s: 'cúpla soicind',
+ ss: '%d soicind',
+ m: 'nóiméad',
+ mm: '%d nóiméad',
+ h: 'uair an chloig',
+ hh: '%d uair an chloig',
+ d: 'lá',
+ dd: '%d lá',
+ M: 'mí',
+ MM: '%d míonna',
+ y: 'bliain',
+ yy: '%d bliain',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return ga;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/gd.js b/vendor/assets/javascripts/momentjs/locale/gd.js
new file mode 100644
index 000000000..b053838e6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/gd.js
@@ -0,0 +1,106 @@
+//! moment.js locale configuration
+//! locale : Scottish Gaelic [gd]
+//! author : Jon Ashdown : https://github.com/jonashdown
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var months = [
+ 'Am Faoilleach',
+ 'An Gearran',
+ 'Am Màrt',
+ 'An Giblean',
+ 'An Cèitean',
+ 'An t-Ògmhios',
+ 'An t-Iuchar',
+ 'An Lùnastal',
+ 'An t-Sultain',
+ 'An Dàmhair',
+ 'An t-Samhain',
+ 'An Dùbhlachd',
+ ],
+ monthsShort = [
+ 'Faoi',
+ 'Gear',
+ 'Màrt',
+ 'Gibl',
+ 'Cèit',
+ 'Ògmh',
+ 'Iuch',
+ 'Lùn',
+ 'Sult',
+ 'Dàmh',
+ 'Samh',
+ 'Dùbh',
+ ],
+ weekdays = [
+ 'Didòmhnaich',
+ 'Diluain',
+ 'Dimàirt',
+ 'Diciadain',
+ 'Diardaoin',
+ 'Dihaoine',
+ 'Disathairne',
+ ],
+ weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
+ weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
+
+ var gd = moment.defineLocale('gd', {
+ months: months,
+ monthsShort: monthsShort,
+ monthsParseExact: true,
+ weekdays: weekdays,
+ weekdaysShort: weekdaysShort,
+ weekdaysMin: weekdaysMin,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[An-diugh aig] LT',
+ nextDay: '[A-màireach aig] LT',
+ nextWeek: 'dddd [aig] LT',
+ lastDay: '[An-dè aig] LT',
+ lastWeek: 'dddd [seo chaidh] [aig] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ann an %s',
+ past: 'bho chionn %s',
+ s: 'beagan diogan',
+ ss: '%d diogan',
+ m: 'mionaid',
+ mm: '%d mionaidean',
+ h: 'uair',
+ hh: '%d uairean',
+ d: 'latha',
+ dd: '%d latha',
+ M: 'mìos',
+ MM: '%d mìosan',
+ y: 'bliadhna',
+ yy: '%d bliadhna',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return gd;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/gl.js b/vendor/assets/javascripts/momentjs/locale/gl.js
new file mode 100644
index 000000000..16dcb5ab0
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/gl.js
@@ -0,0 +1,86 @@
+//! moment.js locale configuration
+//! locale : Galician [gl]
+//! author : Juan G. Hurtado : https://github.com/juanghurtado
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var gl = moment.defineLocale('gl', {
+ months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
+ '_'
+ ),
+ monthsShort:
+ 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
+ },
+ lastDay: function () {
+ return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (str) {
+ if (str.indexOf('un') === 0) {
+ return 'n' + str;
+ }
+ return 'en ' + str;
+ },
+ past: 'hai %s',
+ s: 'uns segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'unha hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return gl;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/gom-deva.js b/vendor/assets/javascripts/momentjs/locale/gom-deva.js
new file mode 100644
index 000000000..ae93d0d16
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/gom-deva.js
@@ -0,0 +1,137 @@
+//! moment.js locale configuration
+//! locale : Konkani Devanagari script [gom-deva]
+//! author : The Discoverer : https://github.com/WikiDiscoverer
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
+ ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
+ m: ['एका मिणटान', 'एक मिनूट'],
+ mm: [number + ' मिणटांनी', number + ' मिणटां'],
+ h: ['एका वरान', 'एक वर'],
+ hh: [number + ' वरांनी', number + ' वरां'],
+ d: ['एका दिसान', 'एक दीस'],
+ dd: [number + ' दिसांनी', number + ' दीस'],
+ M: ['एका म्हयन्यान', 'एक म्हयनो'],
+ MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
+ y: ['एका वर्सान', 'एक वर्स'],
+ yy: [number + ' वर्सांनी', number + ' वर्सां'],
+ };
+ return isFuture ? format[key][0] : format[key][1];
+ }
+
+ var gomDeva = moment.defineLocale('gom-deva', {
+ months: {
+ standalone:
+ 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
+ '_'
+ ),
+ format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
+ '_'
+ ),
+ isFormat: /MMMM(\s)+D[oD]?/,
+ },
+ monthsShort:
+ 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
+ weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
+ weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'A h:mm [वाजतां]',
+ LTS: 'A h:mm:ss [वाजतां]',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY A h:mm [वाजतां]',
+ LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
+ llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
+ },
+ calendar: {
+ sameDay: '[आयज] LT',
+ nextDay: '[फाल्यां] LT',
+ nextWeek: '[फुडलो] dddd[,] LT',
+ lastDay: '[काल] LT',
+ lastWeek: '[फाटलो] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s',
+ past: '%s आदीं',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // the ordinal 'वेर' only applies to day of the month
+ case 'D':
+ return number + 'वेर';
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ case 'w':
+ case 'W':
+ return number;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
+ },
+ meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'राती') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सकाळीं') {
+ return hour;
+ } else if (meridiem === 'दनपारां') {
+ return hour > 12 ? hour : hour + 12;
+ } else if (meridiem === 'सांजे') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'राती';
+ } else if (hour < 12) {
+ return 'सकाळीं';
+ } else if (hour < 16) {
+ return 'दनपारां';
+ } else if (hour < 20) {
+ return 'सांजे';
+ } else {
+ return 'राती';
+ }
+ },
+ });
+
+ return gomDeva;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/gom-latn.js b/vendor/assets/javascripts/momentjs/locale/gom-latn.js
new file mode 100644
index 000000000..93cbe159b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/gom-latn.js
@@ -0,0 +1,135 @@
+//! moment.js locale configuration
+//! locale : Konkani Latin script [gom-latn]
+//! author : The Discoverer : https://github.com/WikiDiscoverer
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['thoddea sekondamni', 'thodde sekond'],
+ ss: [number + ' sekondamni', number + ' sekond'],
+ m: ['eka mintan', 'ek minut'],
+ mm: [number + ' mintamni', number + ' mintam'],
+ h: ['eka voran', 'ek vor'],
+ hh: [number + ' voramni', number + ' voram'],
+ d: ['eka disan', 'ek dis'],
+ dd: [number + ' disamni', number + ' dis'],
+ M: ['eka mhoinean', 'ek mhoino'],
+ MM: [number + ' mhoineamni', number + ' mhoine'],
+ y: ['eka vorsan', 'ek voros'],
+ yy: [number + ' vorsamni', number + ' vorsam'],
+ };
+ return isFuture ? format[key][0] : format[key][1];
+ }
+
+ var gomLatn = moment.defineLocale('gom-latn', {
+ months: {
+ standalone:
+ 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
+ '_'
+ ),
+ format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
+ '_'
+ ),
+ isFormat: /MMMM(\s)+D[oD]?/,
+ },
+ monthsShort:
+ 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
+ weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
+ weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'A h:mm [vazta]',
+ LTS: 'A h:mm:ss [vazta]',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY A h:mm [vazta]',
+ LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
+ llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
+ },
+ calendar: {
+ sameDay: '[Aiz] LT',
+ nextDay: '[Faleam] LT',
+ nextWeek: '[Fuddlo] dddd[,] LT',
+ lastDay: '[Kal] LT',
+ lastWeek: '[Fattlo] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s',
+ past: '%s adim',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // the ordinal 'er' only applies to day of the month
+ case 'D':
+ return number + 'er';
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ case 'w':
+ case 'W':
+ return number;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
+ },
+ meridiemParse: /rati|sokallim|donparam|sanje/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'rati') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'sokallim') {
+ return hour;
+ } else if (meridiem === 'donparam') {
+ return hour > 12 ? hour : hour + 12;
+ } else if (meridiem === 'sanje') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'rati';
+ } else if (hour < 12) {
+ return 'sokallim';
+ } else if (hour < 16) {
+ return 'donparam';
+ } else if (hour < 20) {
+ return 'sanje';
+ } else {
+ return 'rati';
+ }
+ },
+ });
+
+ return gomLatn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/gu.js b/vendor/assets/javascripts/momentjs/locale/gu.js
new file mode 100644
index 000000000..6583f7763
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/gu.js
@@ -0,0 +1,133 @@
+//! moment.js locale configuration
+//! locale : Gujarati [gu]
+//! author : Kaushik Thanki : https://github.com/Kaushik1987
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '૧',
+ 2: '૨',
+ 3: '૩',
+ 4: '૪',
+ 5: '૫',
+ 6: '૬',
+ 7: '૭',
+ 8: '૮',
+ 9: '૯',
+ 0: '૦',
+ },
+ numberMap = {
+ '૧': '1',
+ '૨': '2',
+ '૩': '3',
+ '૪': '4',
+ '૫': '5',
+ '૬': '6',
+ '૭': '7',
+ '૮': '8',
+ '૯': '9',
+ '૦': '0',
+ };
+
+ var gu = moment.defineLocale('gu', {
+ months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
+ '_'
+ ),
+ monthsShort:
+ 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
+ '_'
+ ),
+ weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
+ weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm વાગ્યે',
+ LTS: 'A h:mm:ss વાગ્યે',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
+ },
+ calendar: {
+ sameDay: '[આજ] LT',
+ nextDay: '[કાલે] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ગઇકાલે] LT',
+ lastWeek: '[પાછલા] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s મા',
+ past: '%s પહેલા',
+ s: 'અમુક પળો',
+ ss: '%d સેકંડ',
+ m: 'એક મિનિટ',
+ mm: '%d મિનિટ',
+ h: 'એક કલાક',
+ hh: '%d કલાક',
+ d: 'એક દિવસ',
+ dd: '%d દિવસ',
+ M: 'એક મહિનો',
+ MM: '%d મહિનો',
+ y: 'એક વર્ષ',
+ yy: '%d વર્ષ',
+ },
+ preparse: function (string) {
+ return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
+ meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'રાત') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'સવાર') {
+ return hour;
+ } else if (meridiem === 'બપોર') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'સાંજ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'રાત';
+ } else if (hour < 10) {
+ return 'સવાર';
+ } else if (hour < 17) {
+ return 'બપોર';
+ } else if (hour < 20) {
+ return 'સાંજ';
+ } else {
+ return 'રાત';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return gu;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/he.js b/vendor/assets/javascripts/momentjs/locale/he.js
new file mode 100644
index 000000000..e19a0f984
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/he.js
@@ -0,0 +1,105 @@
+//! moment.js locale configuration
+//! locale : Hebrew [he]
+//! author : Tomer Cohen : https://github.com/tomer
+//! author : Moshe Simantov : https://github.com/DevelopmentIL
+//! author : Tal Ater : https://github.com/TalAter
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var he = moment.defineLocale('he', {
+ months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
+ weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
+ weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
+ weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [ב]MMMM YYYY',
+ LLL: 'D [ב]MMMM YYYY HH:mm',
+ LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
+ l: 'D/M/YYYY',
+ ll: 'D MMM YYYY',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd, D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[היום ב־]LT',
+ nextDay: '[מחר ב־]LT',
+ nextWeek: 'dddd [בשעה] LT',
+ lastDay: '[אתמול ב־]LT',
+ lastWeek: '[ביום] dddd [האחרון בשעה] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'בעוד %s',
+ past: 'לפני %s',
+ s: 'מספר שניות',
+ ss: '%d שניות',
+ m: 'דקה',
+ mm: '%d דקות',
+ h: 'שעה',
+ hh: function (number) {
+ if (number === 2) {
+ return 'שעתיים';
+ }
+ return number + ' שעות';
+ },
+ d: 'יום',
+ dd: function (number) {
+ if (number === 2) {
+ return 'יומיים';
+ }
+ return number + ' ימים';
+ },
+ M: 'חודש',
+ MM: function (number) {
+ if (number === 2) {
+ return 'חודשיים';
+ }
+ return number + ' חודשים';
+ },
+ y: 'שנה',
+ yy: function (number) {
+ if (number === 2) {
+ return 'שנתיים';
+ } else if (number % 10 === 0 && number !== 10) {
+ return number + ' שנה';
+ }
+ return number + ' שנים';
+ },
+ },
+ meridiemParse:
+ /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
+ isPM: function (input) {
+ return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 5) {
+ return 'לפנות בוקר';
+ } else if (hour < 10) {
+ return 'בבוקר';
+ } else if (hour < 12) {
+ return isLower ? 'לפנה"צ' : 'לפני הצהריים';
+ } else if (hour < 18) {
+ return isLower ? 'אחה"צ' : 'אחרי הצהריים';
+ } else {
+ return 'בערב';
+ }
+ },
+ });
+
+ return he;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/hi.js b/vendor/assets/javascripts/momentjs/locale/hi.js
new file mode 100644
index 000000000..56515bdc1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/hi.js
@@ -0,0 +1,179 @@
+//! moment.js locale configuration
+//! locale : Hindi [hi]
+//! author : Mayank Singhal : https://github.com/mayanksinghal
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ },
+ monthsParse = [
+ /^जन/i,
+ /^फ़र|फर/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सितं|सित/i,
+ /^अक्टू/i,
+ /^नव|नवं/i,
+ /^दिसं|दिस/i,
+ ],
+ shortMonthsParse = [
+ /^जन/i,
+ /^फ़र/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सित/i,
+ /^अक्टू/i,
+ /^नव/i,
+ /^दिस/i,
+ ];
+
+ var hi = moment.defineLocale('hi', {
+ months: {
+ format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
+ '_'
+ ),
+ standalone:
+ 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
+ weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm बजे',
+ LTS: 'A h:mm:ss बजे',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm बजे',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
+ },
+
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: shortMonthsParse,
+
+ monthsRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsShortRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsStrictRegex:
+ /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
+
+ monthsShortStrictRegex:
+ /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
+
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[कल] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[कल] LT',
+ lastWeek: '[पिछले] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s में',
+ past: '%s पहले',
+ s: 'कुछ ही क्षण',
+ ss: '%d सेकंड',
+ m: 'एक मिनट',
+ mm: '%d मिनट',
+ h: 'एक घंटा',
+ hh: '%d घंटे',
+ d: 'एक दिन',
+ dd: '%d दिन',
+ M: 'एक महीने',
+ MM: '%d महीने',
+ y: 'एक वर्ष',
+ yy: '%d वर्ष',
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // Hindi notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
+ meridiemParse: /रात|सुबह|दोपहर|शाम/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'रात') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सुबह') {
+ return hour;
+ } else if (meridiem === 'दोपहर') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'शाम') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'रात';
+ } else if (hour < 10) {
+ return 'सुबह';
+ } else if (hour < 17) {
+ return 'दोपहर';
+ } else if (hour < 20) {
+ return 'शाम';
+ } else {
+ return 'रात';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return hi;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/hr.js b/vendor/assets/javascripts/momentjs/locale/hr.js
new file mode 100644
index 000000000..f41cce061
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/hr.js
@@ -0,0 +1,167 @@
+//! moment.js locale configuration
+//! locale : Croatian [hr]
+//! author : Bojan Marković : https://github.com/bmarkovic
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function translate(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ if (number === 1) {
+ result += 'sekunda';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sekunde';
+ } else {
+ result += 'sekundi';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
+ }
+ }
+
+ var hr = moment.defineLocale('hr', {
+ months: {
+ format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
+ '_'
+ ),
+ standalone:
+ 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'Do MMMM YYYY',
+ LLL: 'Do MMMM YYYY H:mm',
+ LLLL: 'dddd, Do MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[jučer u] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[prošlu] [nedjelju] [u] LT';
+ case 3:
+ return '[prošlu] [srijedu] [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'par sekundi',
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: 'dan',
+ dd: translate,
+ M: 'mjesec',
+ MM: translate,
+ y: 'godinu',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return hr;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/hu.js b/vendor/assets/javascripts/momentjs/locale/hu.js
new file mode 100644
index 000000000..162959d84
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/hu.js
@@ -0,0 +1,129 @@
+//! moment.js locale configuration
+//! locale : Hungarian [hu]
+//! author : Adam Brunner : https://github.com/adambrunner
+//! author : Peter Viszt : https://github.com/passatgt
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var weekEndings =
+ 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
+ function translate(number, withoutSuffix, key, isFuture) {
+ var num = number;
+ switch (key) {
+ case 's':
+ return isFuture || withoutSuffix
+ ? 'néhány másodperc'
+ : 'néhány másodperce';
+ case 'ss':
+ return num + (isFuture || withoutSuffix)
+ ? ' másodperc'
+ : ' másodperce';
+ case 'm':
+ return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'mm':
+ return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'h':
+ return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'hh':
+ return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'd':
+ return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'dd':
+ return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'M':
+ return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'MM':
+ return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'y':
+ return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
+ case 'yy':
+ return num + (isFuture || withoutSuffix ? ' év' : ' éve');
+ }
+ return '';
+ }
+ function week(isFuture) {
+ return (
+ (isFuture ? '' : '[múlt] ') +
+ '[' +
+ weekEndings[this.day()] +
+ '] LT[-kor]'
+ );
+ }
+
+ var hu = moment.defineLocale('hu', {
+ months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
+ weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
+ weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'YYYY.MM.DD.',
+ LL: 'YYYY. MMMM D.',
+ LLL: 'YYYY. MMMM D. H:mm',
+ LLLL: 'YYYY. MMMM D., dddd H:mm',
+ },
+ meridiemParse: /de|du/i,
+ isPM: function (input) {
+ return input.charAt(1).toLowerCase() === 'u';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower === true ? 'de' : 'DE';
+ } else {
+ return isLower === true ? 'du' : 'DU';
+ }
+ },
+ calendar: {
+ sameDay: '[ma] LT[-kor]',
+ nextDay: '[holnap] LT[-kor]',
+ nextWeek: function () {
+ return week.call(this, true);
+ },
+ lastDay: '[tegnap] LT[-kor]',
+ lastWeek: function () {
+ return week.call(this, false);
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s múlva',
+ past: '%s',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return hu;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/hy-am.js b/vendor/assets/javascripts/momentjs/locale/hy-am.js
new file mode 100644
index 000000000..9c65b1e92
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/hy-am.js
@@ -0,0 +1,105 @@
+//! moment.js locale configuration
+//! locale : Armenian [hy-am]
+//! author : Armendarabyan : https://github.com/armendarabyan
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var hyAm = moment.defineLocale('hy-am', {
+ months: {
+ format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
+ '_'
+ ),
+ standalone:
+ 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
+ weekdays:
+ 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
+ '_'
+ ),
+ weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+ weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY թ.',
+ LLL: 'D MMMM YYYY թ., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY թ., HH:mm',
+ },
+ calendar: {
+ sameDay: '[այսօր] LT',
+ nextDay: '[վաղը] LT',
+ lastDay: '[երեկ] LT',
+ nextWeek: function () {
+ return 'dddd [օրը ժամը] LT';
+ },
+ lastWeek: function () {
+ return '[անցած] dddd [օրը ժամը] LT';
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s հետո',
+ past: '%s առաջ',
+ s: 'մի քանի վայրկյան',
+ ss: '%d վայրկյան',
+ m: 'րոպե',
+ mm: '%d րոպե',
+ h: 'ժամ',
+ hh: '%d ժամ',
+ d: 'օր',
+ dd: '%d օր',
+ M: 'ամիս',
+ MM: '%d ամիս',
+ y: 'տարի',
+ yy: '%d տարի',
+ },
+ meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
+ isPM: function (input) {
+ return /^(ցերեկվա|երեկոյան)$/.test(input);
+ },
+ meridiem: function (hour) {
+ if (hour < 4) {
+ return 'գիշերվա';
+ } else if (hour < 12) {
+ return 'առավոտվա';
+ } else if (hour < 17) {
+ return 'ցերեկվա';
+ } else {
+ return 'երեկոյան';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'DDD':
+ case 'w':
+ case 'W':
+ case 'DDDo':
+ if (number === 1) {
+ return number + '-ին';
+ }
+ return number + '-րդ';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return hyAm;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/id.js b/vendor/assets/javascripts/momentjs/locale/id.js
new file mode 100644
index 000000000..9f8ff0a05
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/id.js
@@ -0,0 +1,87 @@
+//! moment.js locale configuration
+//! locale : Indonesian [id]
+//! author : Mohammad Satrio Utomo : https://github.com/tyok
+//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var id = moment.defineLocale('id', {
+ months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
+ weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
+ weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
+ weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|siang|sore|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'siang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sore' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'siang';
+ } else if (hours < 19) {
+ return 'sore';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Besok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kemarin pukul] LT',
+ lastWeek: 'dddd [lalu pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lalu',
+ s: 'beberapa detik',
+ ss: '%d detik',
+ m: 'semenit',
+ mm: '%d menit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return id;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/is.js b/vendor/assets/javascripts/momentjs/locale/is.js
new file mode 100644
index 000000000..02520062d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/is.js
@@ -0,0 +1,151 @@
+//! moment.js locale configuration
+//! locale : Icelandic [is]
+//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function plural(n) {
+ if (n % 100 === 11) {
+ return true;
+ } else if (n % 10 === 1) {
+ return false;
+ }
+ return true;
+ }
+ function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's':
+ return withoutSuffix || isFuture
+ ? 'nokkrar sekúndur'
+ : 'nokkrum sekúndum';
+ case 'ss':
+ if (plural(number)) {
+ return (
+ result +
+ (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
+ );
+ }
+ return result + 'sekúnda';
+ case 'm':
+ return withoutSuffix ? 'mínúta' : 'mínútu';
+ case 'mm':
+ if (plural(number)) {
+ return (
+ result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
+ );
+ } else if (withoutSuffix) {
+ return result + 'mínúta';
+ }
+ return result + 'mínútu';
+ case 'hh':
+ if (plural(number)) {
+ return (
+ result +
+ (withoutSuffix || isFuture
+ ? 'klukkustundir'
+ : 'klukkustundum')
+ );
+ }
+ return result + 'klukkustund';
+ case 'd':
+ if (withoutSuffix) {
+ return 'dagur';
+ }
+ return isFuture ? 'dag' : 'degi';
+ case 'dd':
+ if (plural(number)) {
+ if (withoutSuffix) {
+ return result + 'dagar';
+ }
+ return result + (isFuture ? 'daga' : 'dögum');
+ } else if (withoutSuffix) {
+ return result + 'dagur';
+ }
+ return result + (isFuture ? 'dag' : 'degi');
+ case 'M':
+ if (withoutSuffix) {
+ return 'mánuður';
+ }
+ return isFuture ? 'mánuð' : 'mánuði';
+ case 'MM':
+ if (plural(number)) {
+ if (withoutSuffix) {
+ return result + 'mánuðir';
+ }
+ return result + (isFuture ? 'mánuði' : 'mánuðum');
+ } else if (withoutSuffix) {
+ return result + 'mánuður';
+ }
+ return result + (isFuture ? 'mánuð' : 'mánuði');
+ case 'y':
+ return withoutSuffix || isFuture ? 'ár' : 'ári';
+ case 'yy':
+ if (plural(number)) {
+ return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
+ }
+ return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
+ }
+ }
+
+ var is = moment.defineLocale('is', {
+ months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
+ weekdays:
+ 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
+ '_'
+ ),
+ weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
+ weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] H:mm',
+ LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
+ },
+ calendar: {
+ sameDay: '[í dag kl.] LT',
+ nextDay: '[á morgun kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[í gær kl.] LT',
+ lastWeek: '[síðasta] dddd [kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'eftir %s',
+ past: 'fyrir %s síðan',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: 'klukkustund',
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return is;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/it-ch.js b/vendor/assets/javascripts/momentjs/locale/it-ch.js
new file mode 100644
index 000000000..8042827dd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/it-ch.js
@@ -0,0 +1,75 @@
+//! moment.js locale configuration
+//! locale : Italian (Switzerland) [it-ch]
+//! author : xfh : https://github.com/xfh
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var itCh = moment.defineLocale('it-ch', {
+ months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
+ '_'
+ ),
+ monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+ weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
+ weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Oggi alle] LT',
+ nextDay: '[Domani alle] LT',
+ nextWeek: 'dddd [alle] LT',
+ lastDay: '[Ieri alle] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[la scorsa] dddd [alle] LT';
+ default:
+ return '[lo scorso] dddd [alle] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (s) {
+ return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
+ },
+ past: '%s fa',
+ s: 'alcuni secondi',
+ ss: '%d secondi',
+ m: 'un minuto',
+ mm: '%d minuti',
+ h: "un'ora",
+ hh: '%d ore',
+ d: 'un giorno',
+ dd: '%d giorni',
+ M: 'un mese',
+ MM: '%d mesi',
+ y: 'un anno',
+ yy: '%d anni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return itCh;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/it.js b/vendor/assets/javascripts/momentjs/locale/it.js
new file mode 100644
index 000000000..2ac903775
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/it.js
@@ -0,0 +1,117 @@
+//! moment.js locale configuration
+//! locale : Italian [it]
+//! author : Lorenzo : https://github.com/aliem
+//! author: Mattia Larentis: https://github.com/nostalgiaz
+//! author: Marco : https://github.com/Manfre98
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var it = moment.defineLocale('it', {
+ months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
+ '_'
+ ),
+ monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+ weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
+ weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return (
+ '[Oggi a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ nextDay: function () {
+ return (
+ '[Domani a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ nextWeek: function () {
+ return (
+ 'dddd [a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ lastDay: function () {
+ return (
+ '[Ieri a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return (
+ '[La scorsa] dddd [a' +
+ (this.hours() > 1
+ ? 'lle '
+ : this.hours() === 0
+ ? ' '
+ : "ll'") +
+ ']LT'
+ );
+ default:
+ return (
+ '[Lo scorso] dddd [a' +
+ (this.hours() > 1
+ ? 'lle '
+ : this.hours() === 0
+ ? ' '
+ : "ll'") +
+ ']LT'
+ );
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'tra %s',
+ past: '%s fa',
+ s: 'alcuni secondi',
+ ss: '%d secondi',
+ m: 'un minuto',
+ mm: '%d minuti',
+ h: "un'ora",
+ hh: '%d ore',
+ d: 'un giorno',
+ dd: '%d giorni',
+ w: 'una settimana',
+ ww: '%d settimane',
+ M: 'un mese',
+ MM: '%d mesi',
+ y: 'un anno',
+ yy: '%d anni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return it;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ja.js b/vendor/assets/javascripts/momentjs/locale/ja.js
new file mode 100644
index 000000000..88d845483
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ja.js
@@ -0,0 +1,159 @@
+//! moment.js locale configuration
+//! locale : Japanese [ja]
+//! author : LI Long : https://github.com/baryon
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var ja = moment.defineLocale('ja', {
+ eras: [
+ {
+ since: '2019-05-01',
+ offset: 1,
+ name: '令和',
+ narrow: '㋿',
+ abbr: 'R',
+ },
+ {
+ since: '1989-01-08',
+ until: '2019-04-30',
+ offset: 1,
+ name: '平成',
+ narrow: '㍻',
+ abbr: 'H',
+ },
+ {
+ since: '1926-12-25',
+ until: '1989-01-07',
+ offset: 1,
+ name: '昭和',
+ narrow: '㍼',
+ abbr: 'S',
+ },
+ {
+ since: '1912-07-30',
+ until: '1926-12-24',
+ offset: 1,
+ name: '大正',
+ narrow: '㍽',
+ abbr: 'T',
+ },
+ {
+ since: '1873-01-01',
+ until: '1912-07-29',
+ offset: 6,
+ name: '明治',
+ narrow: '㍾',
+ abbr: 'M',
+ },
+ {
+ since: '0001-01-01',
+ until: '1873-12-31',
+ offset: 1,
+ name: '西暦',
+ narrow: 'AD',
+ abbr: 'AD',
+ },
+ {
+ since: '0000-12-31',
+ until: -Infinity,
+ offset: 1,
+ name: '紀元前',
+ narrow: 'BC',
+ abbr: 'BC',
+ },
+ ],
+ eraYearOrdinalRegex: /(元|\d+)年/,
+ eraYearOrdinalParse: function (input, match) {
+ return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
+ },
+ months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
+ weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
+ weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日 dddd HH:mm',
+ l: 'YYYY/MM/DD',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日(ddd) HH:mm',
+ },
+ meridiemParse: /午前|午後/i,
+ isPM: function (input) {
+ return input === '午後';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return '午前';
+ } else {
+ return '午後';
+ }
+ },
+ calendar: {
+ sameDay: '[今日] LT',
+ nextDay: '[明日] LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ return '[来週]dddd LT';
+ } else {
+ return 'dddd LT';
+ }
+ },
+ lastDay: '[昨日] LT',
+ lastWeek: function (now) {
+ if (this.week() !== now.week()) {
+ return '[先週]dddd LT';
+ } else {
+ return 'dddd LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}日/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'y':
+ return number === 1 ? '元年' : number + '年';
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '数秒',
+ ss: '%d秒',
+ m: '1分',
+ mm: '%d分',
+ h: '1時間',
+ hh: '%d時間',
+ d: '1日',
+ dd: '%d日',
+ M: '1ヶ月',
+ MM: '%dヶ月',
+ y: '1年',
+ yy: '%d年',
+ },
+ });
+
+ return ja;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/jv.js b/vendor/assets/javascripts/momentjs/locale/jv.js
new file mode 100644
index 000000000..ab6655fe9
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/jv.js
@@ -0,0 +1,87 @@
+//! moment.js locale configuration
+//! locale : Javanese [jv]
+//! author : Rony Lantip : https://github.com/lantip
+//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var jv = moment.defineLocale('jv', {
+ months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
+ weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
+ weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
+ weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /enjing|siyang|sonten|ndalu/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'enjing') {
+ return hour;
+ } else if (meridiem === 'siyang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'enjing';
+ } else if (hours < 15) {
+ return 'siyang';
+ } else if (hours < 19) {
+ return 'sonten';
+ } else {
+ return 'ndalu';
+ }
+ },
+ calendar: {
+ sameDay: '[Dinten puniko pukul] LT',
+ nextDay: '[Mbenjang pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kala wingi pukul] LT',
+ lastWeek: 'dddd [kepengker pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'wonten ing %s',
+ past: '%s ingkang kepengker',
+ s: 'sawetawis detik',
+ ss: '%d detik',
+ m: 'setunggal menit',
+ mm: '%d menit',
+ h: 'setunggal jam',
+ hh: '%d jam',
+ d: 'sedinten',
+ dd: '%d dinten',
+ M: 'sewulan',
+ MM: '%d wulan',
+ y: 'setaun',
+ yy: '%d taun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return jv;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ka.js b/vendor/assets/javascripts/momentjs/locale/ka.js
new file mode 100644
index 000000000..635766940
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ka.js
@@ -0,0 +1,103 @@
+//! moment.js locale configuration
+//! locale : Georgian [ka]
+//! author : Irakli Janiashvili : https://github.com/IrakliJani
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var ka = moment.defineLocale('ka', {
+ months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
+ '_'
+ ),
+ monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
+ weekdays: {
+ standalone:
+ 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
+ '_'
+ ),
+ format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
+ '_'
+ ),
+ isFormat: /(წინა|შემდეგ)/,
+ },
+ weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
+ weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[დღეს] LT[-ზე]',
+ nextDay: '[ხვალ] LT[-ზე]',
+ lastDay: '[გუშინ] LT[-ზე]',
+ nextWeek: '[შემდეგ] dddd LT[-ზე]',
+ lastWeek: '[წინა] dddd LT-ზე',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (s) {
+ return s.replace(
+ /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,
+ function ($0, $1, $2) {
+ return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
+ }
+ );
+ },
+ past: function (s) {
+ if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
+ return s.replace(/(ი|ე)$/, 'ის წინ');
+ }
+ if (/წელი/.test(s)) {
+ return s.replace(/წელი$/, 'წლის წინ');
+ }
+ return s;
+ },
+ s: 'რამდენიმე წამი',
+ ss: '%d წამი',
+ m: 'წუთი',
+ mm: '%d წუთი',
+ h: 'საათი',
+ hh: '%d საათი',
+ d: 'დღე',
+ dd: '%d დღე',
+ M: 'თვე',
+ MM: '%d თვე',
+ y: 'წელი',
+ yy: '%d წელი',
+ },
+ dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
+ ordinal: function (number) {
+ if (number === 0) {
+ return number;
+ }
+ if (number === 1) {
+ return number + '-ლი';
+ }
+ if (
+ number < 20 ||
+ (number <= 100 && number % 20 === 0) ||
+ number % 100 === 0
+ ) {
+ return 'მე-' + number;
+ }
+ return number + '-ე';
+ },
+ week: {
+ dow: 1,
+ doy: 7,
+ },
+ });
+
+ return ka;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/kk.js b/vendor/assets/javascripts/momentjs/locale/kk.js
new file mode 100644
index 000000000..38f2e8c1c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/kk.js
@@ -0,0 +1,93 @@
+//! moment.js locale configuration
+//! locale : Kazakh [kk]
+//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var suffixes = {
+ 0: '-ші',
+ 1: '-ші',
+ 2: '-ші',
+ 3: '-ші',
+ 4: '-ші',
+ 5: '-ші',
+ 6: '-шы',
+ 7: '-ші',
+ 8: '-ші',
+ 9: '-шы',
+ 10: '-шы',
+ 20: '-шы',
+ 30: '-шы',
+ 40: '-шы',
+ 50: '-ші',
+ 60: '-шы',
+ 70: '-ші',
+ 80: '-ші',
+ 90: '-шы',
+ 100: '-ші',
+ };
+
+ var kk = moment.defineLocale('kk', {
+ months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
+ '_'
+ ),
+ monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
+ weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
+ '_'
+ ),
+ weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
+ weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бүгін сағат] LT',
+ nextDay: '[Ертең сағат] LT',
+ nextWeek: 'dddd [сағат] LT',
+ lastDay: '[Кеше сағат] LT',
+ lastWeek: '[Өткен аптаның] dddd [сағат] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ішінде',
+ past: '%s бұрын',
+ s: 'бірнеше секунд',
+ ss: '%d секунд',
+ m: 'бір минут',
+ mm: '%d минут',
+ h: 'бір сағат',
+ hh: '%d сағат',
+ d: 'бір күн',
+ dd: '%d күн',
+ M: 'бір ай',
+ MM: '%d ай',
+ y: 'бір жыл',
+ yy: '%d жыл',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes[number] || suffixes[a] || suffixes[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return kk;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/km.js b/vendor/assets/javascripts/momentjs/locale/km.js
new file mode 100644
index 000000000..5306436e5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/km.js
@@ -0,0 +1,114 @@
+//! moment.js locale configuration
+//! locale : Cambodian [km]
+//! author : Kruy Vanna : https://github.com/kruyvanna
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '១',
+ 2: '២',
+ 3: '៣',
+ 4: '៤',
+ 5: '៥',
+ 6: '៦',
+ 7: '៧',
+ 8: '៨',
+ 9: '៩',
+ 0: '០',
+ },
+ numberMap = {
+ '១': '1',
+ '២': '2',
+ '៣': '3',
+ '៤': '4',
+ '៥': '5',
+ '៦': '6',
+ '៧': '7',
+ '៨': '8',
+ '៩': '9',
+ '០': '0',
+ };
+
+ var km = moment.defineLocale('km', {
+ months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
+ '_'
+ ),
+ weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
+ weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
+ weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ព្រឹក|ល្ងាច/,
+ isPM: function (input) {
+ return input === 'ល្ងាច';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ព្រឹក';
+ } else {
+ return 'ល្ងាច';
+ }
+ },
+ calendar: {
+ sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
+ nextDay: '[ស្អែក ម៉ោង] LT',
+ nextWeek: 'dddd [ម៉ោង] LT',
+ lastDay: '[ម្សិលមិញ ម៉ោង] LT',
+ lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sទៀត',
+ past: '%sមុន',
+ s: 'ប៉ុន្មានវិនាទី',
+ ss: '%d វិនាទី',
+ m: 'មួយនាទី',
+ mm: '%d នាទី',
+ h: 'មួយម៉ោង',
+ hh: '%d ម៉ោង',
+ d: 'មួយថ្ងៃ',
+ dd: '%d ថ្ងៃ',
+ M: 'មួយខែ',
+ MM: '%d ខែ',
+ y: 'មួយឆ្នាំ',
+ yy: '%d ឆ្នាំ',
+ },
+ dayOfMonthOrdinalParse: /ទី\d{1,2}/,
+ ordinal: 'ទី%d',
+ preparse: function (string) {
+ return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return km;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/kn.js b/vendor/assets/javascripts/momentjs/locale/kn.js
new file mode 100644
index 000000000..5fe70b0ba
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/kn.js
@@ -0,0 +1,135 @@
+//! moment.js locale configuration
+//! locale : Kannada [kn]
+//! author : Rajeev Naik : https://github.com/rajeevnaikte
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '೧',
+ 2: '೨',
+ 3: '೩',
+ 4: '೪',
+ 5: '೫',
+ 6: '೬',
+ 7: '೭',
+ 8: '೮',
+ 9: '೯',
+ 0: '೦',
+ },
+ numberMap = {
+ '೧': '1',
+ '೨': '2',
+ '೩': '3',
+ '೪': '4',
+ '೫': '5',
+ '೬': '6',
+ '೭': '7',
+ '೮': '8',
+ '೯': '9',
+ '೦': '0',
+ };
+
+ var kn = moment.defineLocale('kn', {
+ months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
+ '_'
+ ),
+ weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
+ weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[ಇಂದು] LT',
+ nextDay: '[ನಾಳೆ] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ನಿನ್ನೆ] LT',
+ lastWeek: '[ಕೊನೆಯ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ನಂತರ',
+ past: '%s ಹಿಂದೆ',
+ s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
+ ss: '%d ಸೆಕೆಂಡುಗಳು',
+ m: 'ಒಂದು ನಿಮಿಷ',
+ mm: '%d ನಿಮಿಷ',
+ h: 'ಒಂದು ಗಂಟೆ',
+ hh: '%d ಗಂಟೆ',
+ d: 'ಒಂದು ದಿನ',
+ dd: '%d ದಿನ',
+ M: 'ಒಂದು ತಿಂಗಳು',
+ MM: '%d ತಿಂಗಳು',
+ y: 'ಒಂದು ವರ್ಷ',
+ yy: '%d ವರ್ಷ',
+ },
+ preparse: function (string) {
+ return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ರಾತ್ರಿ') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
+ return hour;
+ } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'ಸಂಜೆ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ರಾತ್ರಿ';
+ } else if (hour < 10) {
+ return 'ಬೆಳಿಗ್ಗೆ';
+ } else if (hour < 17) {
+ return 'ಮಧ್ಯಾಹ್ನ';
+ } else if (hour < 20) {
+ return 'ಸಂಜೆ';
+ } else {
+ return 'ರಾತ್ರಿ';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
+ ordinal: function (number) {
+ return number + 'ನೇ';
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return kn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ko.js b/vendor/assets/javascripts/momentjs/locale/ko.js
new file mode 100644
index 000000000..c81c13ea6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ko.js
@@ -0,0 +1,86 @@
+//! moment.js locale configuration
+//! locale : Korean [ko]
+//! author : Kyungwook, Park : https://github.com/kyungw00k
+//! author : Jeeeyul Lee
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var ko = moment.defineLocale('ko', {
+ months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
+ monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
+ '_'
+ ),
+ weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
+ weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
+ weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'YYYY.MM.DD.',
+ LL: 'YYYY년 MMMM D일',
+ LLL: 'YYYY년 MMMM D일 A h:mm',
+ LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
+ l: 'YYYY.MM.DD.',
+ ll: 'YYYY년 MMMM D일',
+ lll: 'YYYY년 MMMM D일 A h:mm',
+ llll: 'YYYY년 MMMM D일 dddd A h:mm',
+ },
+ calendar: {
+ sameDay: '오늘 LT',
+ nextDay: '내일 LT',
+ nextWeek: 'dddd LT',
+ lastDay: '어제 LT',
+ lastWeek: '지난주 dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s 후',
+ past: '%s 전',
+ s: '몇 초',
+ ss: '%d초',
+ m: '1분',
+ mm: '%d분',
+ h: '한 시간',
+ hh: '%d시간',
+ d: '하루',
+ dd: '%d일',
+ M: '한 달',
+ MM: '%d달',
+ y: '일 년',
+ yy: '%d년',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '일';
+ case 'M':
+ return number + '월';
+ case 'w':
+ case 'W':
+ return number + '주';
+ default:
+ return number;
+ }
+ },
+ meridiemParse: /오전|오후/,
+ isPM: function (token) {
+ return token === '오후';
+ },
+ meridiem: function (hour, minute, isUpper) {
+ return hour < 12 ? '오전' : '오후';
+ },
+ });
+
+ return ko;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ku.js b/vendor/assets/javascripts/momentjs/locale/ku.js
new file mode 100644
index 000000000..71c56a114
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ku.js
@@ -0,0 +1,129 @@
+//! moment.js locale configuration
+//! locale : Kurdish [ku]
+//! author : Shahram Mebashar : https://github.com/ShahramMebashar
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ },
+ months = [
+ 'کانونی دووەم',
+ 'شوبات',
+ 'ئازار',
+ 'نیسان',
+ 'ئایار',
+ 'حوزەیران',
+ 'تەمموز',
+ 'ئاب',
+ 'ئەیلوول',
+ 'تشرینی یەكەم',
+ 'تشرینی دووەم',
+ 'كانونی یەکەم',
+ ];
+
+ var ku = moment.defineLocale('ku', {
+ months: months,
+ monthsShort: months,
+ weekdays:
+ 'یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه'.split('_'),
+ weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ئێواره|بهیانی/,
+ isPM: function (input) {
+ return /ئێواره/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'بهیانی';
+ } else {
+ return 'ئێواره';
+ }
+ },
+ calendar: {
+ sameDay: '[ئهمرۆ كاتژمێر] LT',
+ nextDay: '[بهیانی كاتژمێر] LT',
+ nextWeek: 'dddd [كاتژمێر] LT',
+ lastDay: '[دوێنێ كاتژمێر] LT',
+ lastWeek: 'dddd [كاتژمێر] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'له %s',
+ past: '%s',
+ s: 'چهند چركهیهك',
+ ss: 'چركه %d',
+ m: 'یهك خولهك',
+ mm: '%d خولهك',
+ h: 'یهك كاتژمێر',
+ hh: '%d كاتژمێر',
+ d: 'یهك ڕۆژ',
+ dd: '%d ڕۆژ',
+ M: 'یهك مانگ',
+ MM: '%d مانگ',
+ y: 'یهك ساڵ',
+ yy: '%d ساڵ',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ return ku;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ky.js b/vendor/assets/javascripts/momentjs/locale/ky.js
new file mode 100644
index 000000000..6dce60615
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ky.js
@@ -0,0 +1,95 @@
+//! moment.js locale configuration
+//! locale : Kyrgyz [ky]
+//! author : Chyngyz Arystan uulu : https://github.com/chyngyz
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var suffixes = {
+ 0: '-чү',
+ 1: '-чи',
+ 2: '-чи',
+ 3: '-чү',
+ 4: '-чү',
+ 5: '-чи',
+ 6: '-чы',
+ 7: '-чи',
+ 8: '-чи',
+ 9: '-чу',
+ 10: '-чу',
+ 20: '-чы',
+ 30: '-чу',
+ 40: '-чы',
+ 50: '-чү',
+ 60: '-чы',
+ 70: '-чи',
+ 80: '-чи',
+ 90: '-чу',
+ 100: '-чү',
+ };
+
+ var ky = moment.defineLocale('ky', {
+ months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
+ '_'
+ ),
+ monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
+ '_'
+ ),
+ weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
+ '_'
+ ),
+ weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
+ weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бүгүн саат] LT',
+ nextDay: '[Эртең саат] LT',
+ nextWeek: 'dddd [саат] LT',
+ lastDay: '[Кечээ саат] LT',
+ lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ичинде',
+ past: '%s мурун',
+ s: 'бирнече секунд',
+ ss: '%d секунд',
+ m: 'бир мүнөт',
+ mm: '%d мүнөт',
+ h: 'бир саат',
+ hh: '%d саат',
+ d: 'бир күн',
+ dd: '%d күн',
+ M: 'бир ай',
+ MM: '%d ай',
+ y: 'бир жыл',
+ yy: '%d жыл',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes[number] || suffixes[a] || suffixes[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return ky;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/lb.js b/vendor/assets/javascripts/momentjs/locale/lb.js
new file mode 100644
index 000000000..ffcb7584f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/lb.js
@@ -0,0 +1,148 @@
+//! moment.js locale configuration
+//! locale : Luxembourgish [lb]
+//! author : mweimerskirch : https://github.com/mweimerskirch
+//! author : David Raison : https://github.com/kwisatz
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eng Minutt', 'enger Minutt'],
+ h: ['eng Stonn', 'enger Stonn'],
+ d: ['een Dag', 'engem Dag'],
+ M: ['ee Mount', 'engem Mount'],
+ y: ['ee Joer', 'engem Joer'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+ function processFutureTime(string) {
+ var number = string.substr(0, string.indexOf(' '));
+ if (eifelerRegelAppliesToNumber(number)) {
+ return 'a ' + string;
+ }
+ return 'an ' + string;
+ }
+ function processPastTime(string) {
+ var number = string.substr(0, string.indexOf(' '));
+ if (eifelerRegelAppliesToNumber(number)) {
+ return 'viru ' + string;
+ }
+ return 'virun ' + string;
+ }
+ /**
+ * Returns true if the word before the given number loses the '-n' ending.
+ * e.g. 'an 10 Deeg' but 'a 5 Deeg'
+ *
+ * @param number {integer}
+ * @returns {boolean}
+ */
+ function eifelerRegelAppliesToNumber(number) {
+ number = parseInt(number, 10);
+ if (isNaN(number)) {
+ return false;
+ }
+ if (number < 0) {
+ // Negative Number --> always true
+ return true;
+ } else if (number < 10) {
+ // Only 1 digit
+ if (4 <= number && number <= 7) {
+ return true;
+ }
+ return false;
+ } else if (number < 100) {
+ // 2 digits
+ var lastDigit = number % 10,
+ firstDigit = number / 10;
+ if (lastDigit === 0) {
+ return eifelerRegelAppliesToNumber(firstDigit);
+ }
+ return eifelerRegelAppliesToNumber(lastDigit);
+ } else if (number < 10000) {
+ // 3 or 4 digits --> recursively check first digit
+ while (number >= 10) {
+ number = number / 10;
+ }
+ return eifelerRegelAppliesToNumber(number);
+ } else {
+ // Anything larger than 4 digits: recursively check first n-3 digits
+ number = number / 1000;
+ return eifelerRegelAppliesToNumber(number);
+ }
+ }
+
+ var lb = moment.defineLocale('lb', {
+ months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm [Auer]',
+ LTS: 'H:mm:ss [Auer]',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm [Auer]',
+ LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
+ },
+ calendar: {
+ sameDay: '[Haut um] LT',
+ sameElse: 'L',
+ nextDay: '[Muer um] LT',
+ nextWeek: 'dddd [um] LT',
+ lastDay: '[Gëschter um] LT',
+ lastWeek: function () {
+ // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
+ switch (this.day()) {
+ case 2:
+ case 4:
+ return '[Leschten] dddd [um] LT';
+ default:
+ return '[Leschte] dddd [um] LT';
+ }
+ },
+ },
+ relativeTime: {
+ future: processFutureTime,
+ past: processPastTime,
+ s: 'e puer Sekonnen',
+ ss: '%d Sekonnen',
+ m: processRelativeTime,
+ mm: '%d Minutten',
+ h: processRelativeTime,
+ hh: '%d Stonnen',
+ d: processRelativeTime,
+ dd: '%d Deeg',
+ M: processRelativeTime,
+ MM: '%d Méint',
+ y: processRelativeTime,
+ yy: '%d Joer',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return lb;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/lo.js b/vendor/assets/javascripts/momentjs/locale/lo.js
new file mode 100644
index 000000000..18fc666d5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/lo.js
@@ -0,0 +1,77 @@
+//! moment.js locale configuration
+//! locale : Lao [lo]
+//! author : Ryan Hart : https://github.com/ryanhart2
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var lo = moment.defineLocale('lo', {
+ months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
+ '_'
+ ),
+ weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+ weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+ weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'ວັນdddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
+ isPM: function (input) {
+ return input === 'ຕອນແລງ';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ຕອນເຊົ້າ';
+ } else {
+ return 'ຕອນແລງ';
+ }
+ },
+ calendar: {
+ sameDay: '[ມື້ນີ້ເວລາ] LT',
+ nextDay: '[ມື້ອື່ນເວລາ] LT',
+ nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
+ lastDay: '[ມື້ວານນີ້ເວລາ] LT',
+ lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ອີກ %s',
+ past: '%sຜ່ານມາ',
+ s: 'ບໍ່ເທົ່າໃດວິນາທີ',
+ ss: '%d ວິນາທີ',
+ m: '1 ນາທີ',
+ mm: '%d ນາທີ',
+ h: '1 ຊົ່ວໂມງ',
+ hh: '%d ຊົ່ວໂມງ',
+ d: '1 ມື້',
+ dd: '%d ມື້',
+ M: '1 ເດືອນ',
+ MM: '%d ເດືອນ',
+ y: '1 ປີ',
+ yy: '%d ປີ',
+ },
+ dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
+ ordinal: function (number) {
+ return 'ທີ່' + number;
+ },
+ });
+
+ return lo;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/lt.js b/vendor/assets/javascripts/momentjs/locale/lt.js
new file mode 100644
index 000000000..e20d20801
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/lt.js
@@ -0,0 +1,136 @@
+//! moment.js locale configuration
+//! locale : Lithuanian [lt]
+//! author : Mindaugas Mozūras : https://github.com/mmozuras
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var units = {
+ ss: 'sekundė_sekundžių_sekundes',
+ m: 'minutė_minutės_minutę',
+ mm: 'minutės_minučių_minutes',
+ h: 'valanda_valandos_valandą',
+ hh: 'valandos_valandų_valandas',
+ d: 'diena_dienos_dieną',
+ dd: 'dienos_dienų_dienas',
+ M: 'mėnuo_mėnesio_mėnesį',
+ MM: 'mėnesiai_mėnesių_mėnesius',
+ y: 'metai_metų_metus',
+ yy: 'metai_metų_metus',
+ };
+ function translateSeconds(number, withoutSuffix, key, isFuture) {
+ if (withoutSuffix) {
+ return 'kelios sekundės';
+ } else {
+ return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
+ }
+ }
+ function translateSingular(number, withoutSuffix, key, isFuture) {
+ return withoutSuffix
+ ? forms(key)[0]
+ : isFuture
+ ? forms(key)[1]
+ : forms(key)[2];
+ }
+ function special(number) {
+ return number % 10 === 0 || (number > 10 && number < 20);
+ }
+ function forms(key) {
+ return units[key].split('_');
+ }
+ function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ if (number === 1) {
+ return (
+ result + translateSingular(number, withoutSuffix, key[0], isFuture)
+ );
+ } else if (withoutSuffix) {
+ return result + (special(number) ? forms(key)[1] : forms(key)[0]);
+ } else {
+ if (isFuture) {
+ return result + forms(key)[1];
+ } else {
+ return result + (special(number) ? forms(key)[1] : forms(key)[2]);
+ }
+ }
+ }
+ var lt = moment.defineLocale('lt', {
+ months: {
+ format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
+ '_'
+ ),
+ standalone:
+ 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
+ },
+ monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
+ weekdays: {
+ format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
+ '_'
+ ),
+ standalone:
+ 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
+ '_'
+ ),
+ isFormat: /dddd HH:mm/,
+ },
+ weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
+ weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY [m.] MMMM D [d.]',
+ LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
+ l: 'YYYY-MM-DD',
+ ll: 'YYYY [m.] MMMM D [d.]',
+ lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
+ },
+ calendar: {
+ sameDay: '[Šiandien] LT',
+ nextDay: '[Rytoj] LT',
+ nextWeek: 'dddd LT',
+ lastDay: '[Vakar] LT',
+ lastWeek: '[Praėjusį] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'po %s',
+ past: 'prieš %s',
+ s: translateSeconds,
+ ss: translate,
+ m: translateSingular,
+ mm: translate,
+ h: translateSingular,
+ hh: translate,
+ d: translateSingular,
+ dd: translate,
+ M: translateSingular,
+ MM: translate,
+ y: translateSingular,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-oji/,
+ ordinal: function (number) {
+ return number + '-oji';
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return lt;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/lv.js b/vendor/assets/javascripts/momentjs/locale/lv.js
new file mode 100644
index 000000000..109fdfe3c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/lv.js
@@ -0,0 +1,105 @@
+//! moment.js locale configuration
+//! locale : Latvian [lv]
+//! author : Kristaps Karlsons : https://github.com/skakri
+//! author : Jānis Elmeris : https://github.com/JanisE
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var units = {
+ ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
+ m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ h: 'stundas_stundām_stunda_stundas'.split('_'),
+ hh: 'stundas_stundām_stunda_stundas'.split('_'),
+ d: 'dienas_dienām_diena_dienas'.split('_'),
+ dd: 'dienas_dienām_diena_dienas'.split('_'),
+ M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ y: 'gada_gadiem_gads_gadi'.split('_'),
+ yy: 'gada_gadiem_gads_gadi'.split('_'),
+ };
+ /**
+ * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
+ */
+ function format(forms, number, withoutSuffix) {
+ if (withoutSuffix) {
+ // E.g. "21 minūte", "3 minūtes".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
+ } else {
+ // E.g. "21 minūtes" as in "pēc 21 minūtes".
+ // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
+ }
+ }
+ function relativeTimeWithPlural(number, withoutSuffix, key) {
+ return number + ' ' + format(units[key], number, withoutSuffix);
+ }
+ function relativeTimeWithSingular(number, withoutSuffix, key) {
+ return format(units[key], number, withoutSuffix);
+ }
+ function relativeSeconds(number, withoutSuffix) {
+ return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
+ }
+
+ var lv = moment.defineLocale('lv', {
+ months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
+ weekdays:
+ 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY.',
+ LL: 'YYYY. [gada] D. MMMM',
+ LLL: 'YYYY. [gada] D. MMMM, HH:mm',
+ LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
+ },
+ calendar: {
+ sameDay: '[Šodien pulksten] LT',
+ nextDay: '[Rīt pulksten] LT',
+ nextWeek: 'dddd [pulksten] LT',
+ lastDay: '[Vakar pulksten] LT',
+ lastWeek: '[Pagājušā] dddd [pulksten] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'pēc %s',
+ past: 'pirms %s',
+ s: relativeSeconds,
+ ss: relativeTimeWithPlural,
+ m: relativeTimeWithSingular,
+ mm: relativeTimeWithPlural,
+ h: relativeTimeWithSingular,
+ hh: relativeTimeWithPlural,
+ d: relativeTimeWithSingular,
+ dd: relativeTimeWithPlural,
+ M: relativeTimeWithSingular,
+ MM: relativeTimeWithPlural,
+ y: relativeTimeWithSingular,
+ yy: relativeTimeWithPlural,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return lv;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/me.js b/vendor/assets/javascripts/momentjs/locale/me.js
new file mode 100644
index 000000000..21b682689
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/me.js
@@ -0,0 +1,128 @@
+//! moment.js locale configuration
+//! locale : Montenegrin [me]
+//! author : Miodrag Nikač : https://github.com/miodragnikac
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var translator = {
+ words: {
+ //Different grammatical cases
+ ss: ['sekund', 'sekunda', 'sekundi'],
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ dd: ['dan', 'dana', 'dana'],
+ MM: ['mjesec', 'mjeseca', 'mjeseci'],
+ yy: ['godina', 'godine', 'godina'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ return number === 1
+ ? wordKey[0]
+ : number >= 2 && number <= 4
+ ? wordKey[1]
+ : wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key) {
+ var wordKey = translator.words[key];
+ if (key.length === 1) {
+ return withoutSuffix ? wordKey[0] : wordKey[1];
+ } else {
+ return (
+ number +
+ ' ' +
+ translator.correctGrammaticalCase(number, wordKey)
+ );
+ }
+ },
+ };
+
+ var me = moment.defineLocale('me', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sjutra u] LT',
+
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[juče u] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[prošle] [nedjelje] [u] LT',
+ '[prošlog] [ponedjeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srijede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'nekoliko sekundi',
+ ss: translator.translate,
+ m: translator.translate,
+ mm: translator.translate,
+ h: translator.translate,
+ hh: translator.translate,
+ d: 'dan',
+ dd: translator.translate,
+ M: 'mjesec',
+ MM: translator.translate,
+ y: 'godinu',
+ yy: translator.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return me;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/mi.js b/vendor/assets/javascripts/momentjs/locale/mi.js
new file mode 100644
index 000000000..f95f9cb67
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/mi.js
@@ -0,0 +1,71 @@
+//! moment.js locale configuration
+//! locale : Maori [mi]
+//! author : John Corrigan : https://github.com/johnideal
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var mi = moment.defineLocale('mi', {
+ months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
+ '_'
+ ),
+ monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
+ weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
+ weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+ weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [i] HH:mm',
+ LLLL: 'dddd, D MMMM YYYY [i] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i teie mahana, i] LT',
+ nextDay: '[apopo i] LT',
+ nextWeek: 'dddd [i] LT',
+ lastDay: '[inanahi i] LT',
+ lastWeek: 'dddd [whakamutunga i] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'i roto i %s',
+ past: '%s i mua',
+ s: 'te hēkona ruarua',
+ ss: '%d hēkona',
+ m: 'he meneti',
+ mm: '%d meneti',
+ h: 'te haora',
+ hh: '%d haora',
+ d: 'he ra',
+ dd: '%d ra',
+ M: 'he marama',
+ MM: '%d marama',
+ y: 'he tau',
+ yy: '%d tau',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return mi;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/mk.js b/vendor/assets/javascripts/momentjs/locale/mk.js
new file mode 100644
index 000000000..c66500dcc
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/mk.js
@@ -0,0 +1,97 @@
+//! moment.js locale configuration
+//! locale : Macedonian [mk]
+//! author : Borislav Mickov : https://github.com/B0k0
+//! author : Sashko Todorov : https://github.com/bkyceh
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var mk = moment.defineLocale('mk', {
+ months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
+ '_'
+ ),
+ monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
+ '_'
+ ),
+ weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
+ weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Денес во] LT',
+ nextDay: '[Утре во] LT',
+ nextWeek: '[Во] dddd [во] LT',
+ lastDay: '[Вчера во] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 6:
+ return '[Изминатата] dddd [во] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[Изминатиот] dddd [во] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: 'пред %s',
+ s: 'неколку секунди',
+ ss: '%d секунди',
+ m: 'една минута',
+ mm: '%d минути',
+ h: 'еден час',
+ hh: '%d часа',
+ d: 'еден ден',
+ dd: '%d дена',
+ M: 'еден месец',
+ MM: '%d месеци',
+ y: 'една година',
+ yy: '%d години',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+ ordinal: function (number) {
+ var lastDigit = number % 10,
+ last2Digits = number % 100;
+ if (number === 0) {
+ return number + '-ев';
+ } else if (last2Digits === 0) {
+ return number + '-ен';
+ } else if (last2Digits > 10 && last2Digits < 20) {
+ return number + '-ти';
+ } else if (lastDigit === 1) {
+ return number + '-ви';
+ } else if (lastDigit === 2) {
+ return number + '-ри';
+ } else if (lastDigit === 7 || lastDigit === 8) {
+ return number + '-ми';
+ } else {
+ return number + '-ти';
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return mk;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ml.js b/vendor/assets/javascripts/momentjs/locale/ml.js
new file mode 100644
index 000000000..6a7298ceb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ml.js
@@ -0,0 +1,93 @@
+//! moment.js locale configuration
+//! locale : Malayalam [ml]
+//! author : Floyd Pink : https://github.com/floydpink
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var ml = moment.defineLocale('ml', {
+ months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
+ '_'
+ ),
+ weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
+ weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm -നു',
+ LTS: 'A h:mm:ss -നു',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm -നു',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',
+ },
+ calendar: {
+ sameDay: '[ഇന്ന്] LT',
+ nextDay: '[നാളെ] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ഇന്നലെ] LT',
+ lastWeek: '[കഴിഞ്ഞ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s കഴിഞ്ഞ്',
+ past: '%s മുൻപ്',
+ s: 'അൽപ നിമിഷങ്ങൾ',
+ ss: '%d സെക്കൻഡ്',
+ m: 'ഒരു മിനിറ്റ്',
+ mm: '%d മിനിറ്റ്',
+ h: 'ഒരു മണിക്കൂർ',
+ hh: '%d മണിക്കൂർ',
+ d: 'ഒരു ദിവസം',
+ dd: '%d ദിവസം',
+ M: 'ഒരു മാസം',
+ MM: '%d മാസം',
+ y: 'ഒരു വർഷം',
+ yy: '%d വർഷം',
+ },
+ meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'രാത്രി' && hour >= 4) ||
+ meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
+ meridiem === 'വൈകുന്നേരം'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'രാത്രി';
+ } else if (hour < 12) {
+ return 'രാവിലെ';
+ } else if (hour < 17) {
+ return 'ഉച്ച കഴിഞ്ഞ്';
+ } else if (hour < 20) {
+ return 'വൈകുന്നേരം';
+ } else {
+ return 'രാത്രി';
+ }
+ },
+ });
+
+ return ml;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/mn.js b/vendor/assets/javascripts/momentjs/locale/mn.js
new file mode 100644
index 000000000..a37b792b4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/mn.js
@@ -0,0 +1,111 @@
+//! moment.js locale configuration
+//! locale : Mongolian [mn]
+//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function translate(number, withoutSuffix, key, isFuture) {
+ switch (key) {
+ case 's':
+ return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
+ case 'ss':
+ return number + (withoutSuffix ? ' секунд' : ' секундын');
+ case 'm':
+ case 'mm':
+ return number + (withoutSuffix ? ' минут' : ' минутын');
+ case 'h':
+ case 'hh':
+ return number + (withoutSuffix ? ' цаг' : ' цагийн');
+ case 'd':
+ case 'dd':
+ return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
+ case 'M':
+ case 'MM':
+ return number + (withoutSuffix ? ' сар' : ' сарын');
+ case 'y':
+ case 'yy':
+ return number + (withoutSuffix ? ' жил' : ' жилийн');
+ default:
+ return number;
+ }
+ }
+
+ var mn = moment.defineLocale('mn', {
+ months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
+ '_'
+ ),
+ monthsShort:
+ '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
+ weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
+ weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY оны MMMMын D',
+ LLL: 'YYYY оны MMMMын D HH:mm',
+ LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
+ },
+ meridiemParse: /ҮӨ|ҮХ/i,
+ isPM: function (input) {
+ return input === 'ҮХ';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ҮӨ';
+ } else {
+ return 'ҮХ';
+ }
+ },
+ calendar: {
+ sameDay: '[Өнөөдөр] LT',
+ nextDay: '[Маргааш] LT',
+ nextWeek: '[Ирэх] dddd LT',
+ lastDay: '[Өчигдөр] LT',
+ lastWeek: '[Өнгөрсөн] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s дараа',
+ past: '%s өмнө',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + ' өдөр';
+ default:
+ return number;
+ }
+ },
+ });
+
+ return mn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/mr.js b/vendor/assets/javascripts/momentjs/locale/mr.js
new file mode 100644
index 000000000..73d576233
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/mr.js
@@ -0,0 +1,214 @@
+//! moment.js locale configuration
+//! locale : Marathi [mr]
+//! author : Harshad Kale : https://github.com/kalehv
+//! author : Vivek Athalye : https://github.com/vnathalye
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ };
+
+ function relativeTimeMr(number, withoutSuffix, string, isFuture) {
+ var output = '';
+ if (withoutSuffix) {
+ switch (string) {
+ case 's':
+ output = 'काही सेकंद';
+ break;
+ case 'ss':
+ output = '%d सेकंद';
+ break;
+ case 'm':
+ output = 'एक मिनिट';
+ break;
+ case 'mm':
+ output = '%d मिनिटे';
+ break;
+ case 'h':
+ output = 'एक तास';
+ break;
+ case 'hh':
+ output = '%d तास';
+ break;
+ case 'd':
+ output = 'एक दिवस';
+ break;
+ case 'dd':
+ output = '%d दिवस';
+ break;
+ case 'M':
+ output = 'एक महिना';
+ break;
+ case 'MM':
+ output = '%d महिने';
+ break;
+ case 'y':
+ output = 'एक वर्ष';
+ break;
+ case 'yy':
+ output = '%d वर्षे';
+ break;
+ }
+ } else {
+ switch (string) {
+ case 's':
+ output = 'काही सेकंदां';
+ break;
+ case 'ss':
+ output = '%d सेकंदां';
+ break;
+ case 'm':
+ output = 'एका मिनिटा';
+ break;
+ case 'mm':
+ output = '%d मिनिटां';
+ break;
+ case 'h':
+ output = 'एका तासा';
+ break;
+ case 'hh':
+ output = '%d तासां';
+ break;
+ case 'd':
+ output = 'एका दिवसा';
+ break;
+ case 'dd':
+ output = '%d दिवसां';
+ break;
+ case 'M':
+ output = 'एका महिन्या';
+ break;
+ case 'MM':
+ output = '%d महिन्यां';
+ break;
+ case 'y':
+ output = 'एका वर्षा';
+ break;
+ case 'yy':
+ output = '%d वर्षां';
+ break;
+ }
+ }
+ return output.replace(/%d/i, number);
+ }
+
+ var mr = moment.defineLocale('mr', {
+ months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
+ '_'
+ ),
+ monthsShort:
+ 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm वाजता',
+ LTS: 'A h:mm:ss वाजता',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm वाजता',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',
+ },
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[उद्या] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[काल] LT',
+ lastWeek: '[मागील] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sमध्ये',
+ past: '%sपूर्वी',
+ s: relativeTimeMr,
+ ss: relativeTimeMr,
+ m: relativeTimeMr,
+ mm: relativeTimeMr,
+ h: relativeTimeMr,
+ hh: relativeTimeMr,
+ d: relativeTimeMr,
+ dd: relativeTimeMr,
+ M: relativeTimeMr,
+ MM: relativeTimeMr,
+ y: relativeTimeMr,
+ yy: relativeTimeMr,
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
+ return hour;
+ } else if (
+ meridiem === 'दुपारी' ||
+ meridiem === 'सायंकाळी' ||
+ meridiem === 'रात्री'
+ ) {
+ return hour >= 12 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour >= 0 && hour < 6) {
+ return 'पहाटे';
+ } else if (hour < 12) {
+ return 'सकाळी';
+ } else if (hour < 17) {
+ return 'दुपारी';
+ } else if (hour < 20) {
+ return 'सायंकाळी';
+ } else {
+ return 'रात्री';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return mr;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ms-my.js b/vendor/assets/javascripts/momentjs/locale/ms-my.js
new file mode 100644
index 000000000..8d66c2b03
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ms-my.js
@@ -0,0 +1,87 @@
+//! moment.js locale configuration
+//! locale : Malay [ms-my]
+//! note : DEPRECATED, the correct one is [ms]
+//! author : Weldan Jamili : https://github.com/weldan
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var msMy = moment.defineLocale('ms-my', {
+ months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+ weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+ weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+ weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'tengahari';
+ } else if (hours < 19) {
+ return 'petang';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Esok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kelmarin pukul] LT',
+ lastWeek: 'dddd [lepas pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lepas',
+ s: 'beberapa saat',
+ ss: '%d saat',
+ m: 'seminit',
+ mm: '%d minit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return msMy;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ms.js b/vendor/assets/javascripts/momentjs/locale/ms.js
new file mode 100644
index 000000000..37782fb40
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ms.js
@@ -0,0 +1,86 @@
+//! moment.js locale configuration
+//! locale : Malay [ms]
+//! author : Weldan Jamili : https://github.com/weldan
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var ms = moment.defineLocale('ms', {
+ months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+ weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+ weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+ weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'tengahari';
+ } else if (hours < 19) {
+ return 'petang';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Esok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kelmarin pukul] LT',
+ lastWeek: 'dddd [lepas pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lepas',
+ s: 'beberapa saat',
+ ss: '%d saat',
+ m: 'seminit',
+ mm: '%d minit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return ms;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/mt.js b/vendor/assets/javascripts/momentjs/locale/mt.js
new file mode 100644
index 000000000..94b2559a2
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/mt.js
@@ -0,0 +1,67 @@
+//! moment.js locale configuration
+//! locale : Maltese (Malta) [mt]
+//! author : Alessandro Maruccia : https://github.com/alesma
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var mt = moment.defineLocale('mt', {
+ months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
+ weekdays:
+ 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
+ '_'
+ ),
+ weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
+ weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Illum fil-]LT',
+ nextDay: '[Għada fil-]LT',
+ nextWeek: 'dddd [fil-]LT',
+ lastDay: '[Il-bieraħ fil-]LT',
+ lastWeek: 'dddd [li għadda] [fil-]LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'f’ %s',
+ past: '%s ilu',
+ s: 'ftit sekondi',
+ ss: '%d sekondi',
+ m: 'minuta',
+ mm: '%d minuti',
+ h: 'siegħa',
+ hh: '%d siegħat',
+ d: 'ġurnata',
+ dd: '%d ġranet',
+ M: 'xahar',
+ MM: '%d xhur',
+ y: 'sena',
+ yy: '%d sni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return mt;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/my.js b/vendor/assets/javascripts/momentjs/locale/my.js
new file mode 100644
index 000000000..c1ef2dff5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/my.js
@@ -0,0 +1,102 @@
+//! moment.js locale configuration
+//! locale : Burmese [my]
+//! author : Squar team, mysquar.com
+//! author : David Rossellat : https://github.com/gholadr
+//! author : Tin Aung Lin : https://github.com/thanyawzinmin
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '၁',
+ 2: '၂',
+ 3: '၃',
+ 4: '၄',
+ 5: '၅',
+ 6: '၆',
+ 7: '၇',
+ 8: '၈',
+ 9: '၉',
+ 0: '၀',
+ },
+ numberMap = {
+ '၁': '1',
+ '၂': '2',
+ '၃': '3',
+ '၄': '4',
+ '၅': '5',
+ '၆': '6',
+ '၇': '7',
+ '၈': '8',
+ '၉': '9',
+ '၀': '0',
+ };
+
+ var my = moment.defineLocale('my', {
+ months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
+ '_'
+ ),
+ monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
+ weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
+ '_'
+ ),
+ weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+ weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[ယနေ.] LT [မှာ]',
+ nextDay: '[မနက်ဖြန်] LT [မှာ]',
+ nextWeek: 'dddd LT [မှာ]',
+ lastDay: '[မနေ.က] LT [မှာ]',
+ lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'လာမည့် %s မှာ',
+ past: 'လွန်ခဲ့သော %s က',
+ s: 'စက္ကန်.အနည်းငယ်',
+ ss: '%d စက္ကန့်',
+ m: 'တစ်မိနစ်',
+ mm: '%d မိနစ်',
+ h: 'တစ်နာရီ',
+ hh: '%d နာရီ',
+ d: 'တစ်ရက်',
+ dd: '%d ရက်',
+ M: 'တစ်လ',
+ MM: '%d လ',
+ y: 'တစ်နှစ်',
+ yy: '%d နှစ်',
+ },
+ preparse: function (string) {
+ return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return my;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/nb.js b/vendor/assets/javascripts/momentjs/locale/nb.js
new file mode 100644
index 000000000..74da7aff5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/nb.js
@@ -0,0 +1,71 @@
+//! moment.js locale configuration
+//! locale : Norwegian Bokmål [nb]
+//! authors : Espen Hovlandsdal : https://github.com/rexxars
+//! Sigurd Gartmann : https://github.com/sigurdga
+//! Stephen Ramthun : https://github.com/stephenramthun
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var nb = moment.defineLocale('nb', {
+ months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
+ weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] HH:mm',
+ LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i dag kl.] LT',
+ nextDay: '[i morgen kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[i går kl.] LT',
+ lastWeek: '[forrige] dddd [kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s siden',
+ s: 'noen sekunder',
+ ss: '%d sekunder',
+ m: 'ett minutt',
+ mm: '%d minutter',
+ h: 'en time',
+ hh: '%d timer',
+ d: 'en dag',
+ dd: '%d dager',
+ w: 'en uke',
+ ww: '%d uker',
+ M: 'en måned',
+ MM: '%d måneder',
+ y: 'ett år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return nb;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ne.js b/vendor/assets/javascripts/momentjs/locale/ne.js
new file mode 100644
index 000000000..d455e004b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ne.js
@@ -0,0 +1,132 @@
+//! moment.js locale configuration
+//! locale : Nepalese [ne]
+//! author : suvash : https://github.com/suvash
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ };
+
+ var ne = moment.defineLocale('ne', {
+ months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
+ '_'
+ ),
+ monthsShort:
+ 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
+ '_'
+ ),
+ weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
+ weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'Aको h:mm बजे',
+ LTS: 'Aको h:mm:ss बजे',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, Aको h:mm बजे',
+ LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'राति') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'बिहान') {
+ return hour;
+ } else if (meridiem === 'दिउँसो') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'साँझ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 3) {
+ return 'राति';
+ } else if (hour < 12) {
+ return 'बिहान';
+ } else if (hour < 16) {
+ return 'दिउँसो';
+ } else if (hour < 20) {
+ return 'साँझ';
+ } else {
+ return 'राति';
+ }
+ },
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[भोलि] LT',
+ nextWeek: '[आउँदो] dddd[,] LT',
+ lastDay: '[हिजो] LT',
+ lastWeek: '[गएको] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sमा',
+ past: '%s अगाडि',
+ s: 'केही क्षण',
+ ss: '%d सेकेण्ड',
+ m: 'एक मिनेट',
+ mm: '%d मिनेट',
+ h: 'एक घण्टा',
+ hh: '%d घण्टा',
+ d: 'एक दिन',
+ dd: '%d दिन',
+ M: 'एक महिना',
+ MM: '%d महिना',
+ y: 'एक बर्ष',
+ yy: '%d बर्ष',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return ne;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/nl-be.js b/vendor/assets/javascripts/momentjs/locale/nl-be.js
new file mode 100644
index 000000000..207938394
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/nl-be.js
@@ -0,0 +1,113 @@
+//! moment.js locale configuration
+//! locale : Dutch (Belgium) [nl-be]
+//! author : Joris Röling : https://github.com/jorisroling
+//! author : Jacob Middag : https://github.com/middagj
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ monthsParse = [
+ /^jan/i,
+ /^feb/i,
+ /^maart|mrt.?$/i,
+ /^apr/i,
+ /^mei$/i,
+ /^jun[i.]?$/i,
+ /^jul[i.]?$/i,
+ /^aug/i,
+ /^sep/i,
+ /^okt/i,
+ /^nov/i,
+ /^dec/i,
+ ],
+ monthsRegex =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+ var nlBe = moment.defineLocale('nl-be', {
+ months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots[m.month()];
+ } else {
+ return monthsShortWithDots[m.month()];
+ }
+ },
+
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+ weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+ weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[vandaag om] LT',
+ nextDay: '[morgen om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[gisteren om] LT',
+ lastWeek: '[afgelopen] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'over %s',
+ past: '%s geleden',
+ s: 'een paar seconden',
+ ss: '%d seconden',
+ m: 'één minuut',
+ mm: '%d minuten',
+ h: 'één uur',
+ hh: '%d uur',
+ d: 'één dag',
+ dd: '%d dagen',
+ M: 'één maand',
+ MM: '%d maanden',
+ y: 'één jaar',
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return nlBe;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/nl.js b/vendor/assets/javascripts/momentjs/locale/nl.js
new file mode 100644
index 000000000..770e90fe9
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/nl.js
@@ -0,0 +1,115 @@
+//! moment.js locale configuration
+//! locale : Dutch [nl]
+//! author : Joris Röling : https://github.com/jorisroling
+//! author : Jacob Middag : https://github.com/middagj
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ monthsParse = [
+ /^jan/i,
+ /^feb/i,
+ /^maart|mrt.?$/i,
+ /^apr/i,
+ /^mei$/i,
+ /^jun[i.]?$/i,
+ /^jul[i.]?$/i,
+ /^aug/i,
+ /^sep/i,
+ /^okt/i,
+ /^nov/i,
+ /^dec/i,
+ ],
+ monthsRegex =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+ var nl = moment.defineLocale('nl', {
+ months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots[m.month()];
+ } else {
+ return monthsShortWithDots[m.month()];
+ }
+ },
+
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+ weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+ weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[vandaag om] LT',
+ nextDay: '[morgen om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[gisteren om] LT',
+ lastWeek: '[afgelopen] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'over %s',
+ past: '%s geleden',
+ s: 'een paar seconden',
+ ss: '%d seconden',
+ m: 'één minuut',
+ mm: '%d minuten',
+ h: 'één uur',
+ hh: '%d uur',
+ d: 'één dag',
+ dd: '%d dagen',
+ w: 'één week',
+ ww: '%d weken',
+ M: 'één maand',
+ MM: '%d maanden',
+ y: 'één jaar',
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return nl;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/nn.js b/vendor/assets/javascripts/momentjs/locale/nn.js
new file mode 100644
index 000000000..c65268ea8
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/nn.js
@@ -0,0 +1,70 @@
+//! moment.js locale configuration
+//! locale : Nynorsk [nn]
+//! authors : https://github.com/mechuwind
+//! Stephen Ramthun : https://github.com/stephenramthun
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var nn = moment.defineLocale('nn', {
+ months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
+ weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
+ weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] H:mm',
+ LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[I dag klokka] LT',
+ nextDay: '[I morgon klokka] LT',
+ nextWeek: 'dddd [klokka] LT',
+ lastDay: '[I går klokka] LT',
+ lastWeek: '[Føregåande] dddd [klokka] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s sidan',
+ s: 'nokre sekund',
+ ss: '%d sekund',
+ m: 'eit minutt',
+ mm: '%d minutt',
+ h: 'ein time',
+ hh: '%d timar',
+ d: 'ein dag',
+ dd: '%d dagar',
+ w: 'ei veke',
+ ww: '%d veker',
+ M: 'ein månad',
+ MM: '%d månader',
+ y: 'eit år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return nn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/oc-lnc.js b/vendor/assets/javascripts/momentjs/locale/oc-lnc.js
new file mode 100644
index 000000000..ba8f43324
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/oc-lnc.js
@@ -0,0 +1,96 @@
+//! moment.js locale configuration
+//! locale : Occitan, lengadocian dialecte [oc-lnc]
+//! author : Quentin PAGÈS : https://github.com/Quenty31
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var ocLnc = moment.defineLocale('oc-lnc', {
+ months: {
+ standalone:
+ 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
+ '_'
+ ),
+ format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\s)+MMMM/,
+ },
+ monthsShort:
+ 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
+ '_'
+ ),
+ weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
+ weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [de] YYYY',
+ ll: 'D MMM YYYY',
+ LLL: 'D MMMM [de] YYYY [a] H:mm',
+ lll: 'D MMM YYYY, H:mm',
+ LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
+ llll: 'ddd D MMM YYYY, H:mm',
+ },
+ calendar: {
+ sameDay: '[uèi a] LT',
+ nextDay: '[deman a] LT',
+ nextWeek: 'dddd [a] LT',
+ lastDay: '[ièr a] LT',
+ lastWeek: 'dddd [passat a] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: "d'aquí %s",
+ past: 'fa %s',
+ s: 'unas segondas',
+ ss: '%d segondas',
+ m: 'una minuta',
+ mm: '%d minutas',
+ h: 'una ora',
+ hh: '%d oras',
+ d: 'un jorn',
+ dd: '%d jorns',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
+ ordinal: function (number, period) {
+ var output =
+ number === 1
+ ? 'r'
+ : number === 2
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
+ if (period === 'w' || period === 'W') {
+ output = 'a';
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4,
+ },
+ });
+
+ return ocLnc;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/pa-in.js b/vendor/assets/javascripts/momentjs/locale/pa-in.js
new file mode 100644
index 000000000..d57eb7501
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/pa-in.js
@@ -0,0 +1,133 @@
+//! moment.js locale configuration
+//! locale : Punjabi (India) [pa-in]
+//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '੧',
+ 2: '੨',
+ 3: '੩',
+ 4: '੪',
+ 5: '੫',
+ 6: '੬',
+ 7: '੭',
+ 8: '੮',
+ 9: '੯',
+ 0: '੦',
+ },
+ numberMap = {
+ '੧': '1',
+ '੨': '2',
+ '੩': '3',
+ '੪': '4',
+ '੫': '5',
+ '੬': '6',
+ '੭': '7',
+ '੮': '8',
+ '੯': '9',
+ '੦': '0',
+ };
+
+ var paIn = moment.defineLocale('pa-in', {
+ // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
+ months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
+ '_'
+ ),
+ weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
+ '_'
+ ),
+ weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+ weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm ਵਜੇ',
+ LTS: 'A h:mm:ss ਵਜੇ',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
+ },
+ calendar: {
+ sameDay: '[ਅਜ] LT',
+ nextDay: '[ਕਲ] LT',
+ nextWeek: '[ਅਗਲਾ] dddd, LT',
+ lastDay: '[ਕਲ] LT',
+ lastWeek: '[ਪਿਛਲੇ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ਵਿੱਚ',
+ past: '%s ਪਿਛਲੇ',
+ s: 'ਕੁਝ ਸਕਿੰਟ',
+ ss: '%d ਸਕਿੰਟ',
+ m: 'ਇਕ ਮਿੰਟ',
+ mm: '%d ਮਿੰਟ',
+ h: 'ਇੱਕ ਘੰਟਾ',
+ hh: '%d ਘੰਟੇ',
+ d: 'ਇੱਕ ਦਿਨ',
+ dd: '%d ਦਿਨ',
+ M: 'ਇੱਕ ਮਹੀਨਾ',
+ MM: '%d ਮਹੀਨੇ',
+ y: 'ਇੱਕ ਸਾਲ',
+ yy: '%d ਸਾਲ',
+ },
+ preparse: function (string) {
+ return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
+ meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ਰਾਤ') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ਸਵੇਰ') {
+ return hour;
+ } else if (meridiem === 'ਦੁਪਹਿਰ') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'ਸ਼ਾਮ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ਰਾਤ';
+ } else if (hour < 10) {
+ return 'ਸਵੇਰ';
+ } else if (hour < 17) {
+ return 'ਦੁਪਹਿਰ';
+ } else if (hour < 20) {
+ return 'ਸ਼ਾਮ';
+ } else {
+ return 'ਰਾਤ';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return paIn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/pl.js b/vendor/assets/javascripts/momentjs/locale/pl.js
new file mode 100644
index 000000000..0750bb3bc
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/pl.js
@@ -0,0 +1,151 @@
+//! moment.js locale configuration
+//! locale : Polish [pl]
+//! author : Rafal Hirsz : https://github.com/evoL
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var monthsNominative =
+ 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
+ '_'
+ ),
+ monthsSubjective =
+ 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
+ '_'
+ ),
+ monthsParse = [
+ /^sty/i,
+ /^lut/i,
+ /^mar/i,
+ /^kwi/i,
+ /^maj/i,
+ /^cze/i,
+ /^lip/i,
+ /^sie/i,
+ /^wrz/i,
+ /^paź/i,
+ /^lis/i,
+ /^gru/i,
+ ];
+ function plural(n) {
+ return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
+ }
+ function translate(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ return result + (plural(number) ? 'sekundy' : 'sekund');
+ case 'm':
+ return withoutSuffix ? 'minuta' : 'minutę';
+ case 'mm':
+ return result + (plural(number) ? 'minuty' : 'minut');
+ case 'h':
+ return withoutSuffix ? 'godzina' : 'godzinę';
+ case 'hh':
+ return result + (plural(number) ? 'godziny' : 'godzin');
+ case 'ww':
+ return result + (plural(number) ? 'tygodnie' : 'tygodni');
+ case 'MM':
+ return result + (plural(number) ? 'miesiące' : 'miesięcy');
+ case 'yy':
+ return result + (plural(number) ? 'lata' : 'lat');
+ }
+ }
+
+ var pl = moment.defineLocale('pl', {
+ months: function (momentToFormat, format) {
+ if (!momentToFormat) {
+ return monthsNominative;
+ } else if (/D MMMM/.test(format)) {
+ return monthsSubjective[momentToFormat.month()];
+ } else {
+ return monthsNominative[momentToFormat.month()];
+ }
+ },
+ monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays:
+ 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
+ weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
+ weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Dziś o] LT',
+ nextDay: '[Jutro o] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[W niedzielę o] LT';
+
+ case 2:
+ return '[We wtorek o] LT';
+
+ case 3:
+ return '[W środę o] LT';
+
+ case 6:
+ return '[W sobotę o] LT';
+
+ default:
+ return '[W] dddd [o] LT';
+ }
+ },
+ lastDay: '[Wczoraj o] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[W zeszłą niedzielę o] LT';
+ case 3:
+ return '[W zeszłą środę o] LT';
+ case 6:
+ return '[W zeszłą sobotę o] LT';
+ default:
+ return '[W zeszły] dddd [o] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: '%s temu',
+ s: 'kilka sekund',
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: '1 dzień',
+ dd: '%d dni',
+ w: 'tydzień',
+ ww: translate,
+ M: 'miesiąc',
+ MM: translate,
+ y: 'rok',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return pl;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/pt-br.js b/vendor/assets/javascripts/momentjs/locale/pt-br.js
new file mode 100644
index 000000000..ee123bda7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/pt-br.js
@@ -0,0 +1,69 @@
+//! moment.js locale configuration
+//! locale : Portuguese (Brazil) [pt-br]
+//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var ptBr = moment.defineLocale('pt-br', {
+ months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
+ weekdays:
+ 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
+ weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hoje às] LT',
+ nextDay: '[Amanhã às] LT',
+ nextWeek: 'dddd [às] LT',
+ lastDay: '[Ontem às] LT',
+ lastWeek: function () {
+ return this.day() === 0 || this.day() === 6
+ ? '[Último] dddd [às] LT' // Saturday + Sunday
+ : '[Última] dddd [às] LT'; // Monday - Friday
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'em %s',
+ past: 'há %s',
+ s: 'poucos segundos',
+ ss: '%d segundos',
+ m: 'um minuto',
+ mm: '%d minutos',
+ h: 'uma hora',
+ hh: '%d horas',
+ d: 'um dia',
+ dd: '%d dias',
+ M: 'um mês',
+ MM: '%d meses',
+ y: 'um ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ invalidDate: 'Data inválida',
+ });
+
+ return ptBr;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/pt.js b/vendor/assets/javascripts/momentjs/locale/pt.js
new file mode 100644
index 000000000..a113ed7b9
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/pt.js
@@ -0,0 +1,74 @@
+//! moment.js locale configuration
+//! locale : Portuguese [pt]
+//! author : Jefferson : https://github.com/jalex79
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var pt = moment.defineLocale('pt', {
+ months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
+ weekdays:
+ 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
+ weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY HH:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hoje às] LT',
+ nextDay: '[Amanhã às] LT',
+ nextWeek: 'dddd [às] LT',
+ lastDay: '[Ontem às] LT',
+ lastWeek: function () {
+ return this.day() === 0 || this.day() === 6
+ ? '[Último] dddd [às] LT' // Saturday + Sunday
+ : '[Última] dddd [às] LT'; // Monday - Friday
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'em %s',
+ past: 'há %s',
+ s: 'segundos',
+ ss: '%d segundos',
+ m: 'um minuto',
+ mm: '%d minutos',
+ h: 'uma hora',
+ hh: '%d horas',
+ d: 'um dia',
+ dd: '%d dias',
+ w: 'uma semana',
+ ww: '%d semanas',
+ M: 'um mês',
+ MM: '%d meses',
+ y: 'um ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return pt;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ro.js b/vendor/assets/javascripts/momentjs/locale/ro.js
new file mode 100644
index 000000000..c2a9dd87e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ro.js
@@ -0,0 +1,87 @@
+//! moment.js locale configuration
+//! locale : Romanian [ro]
+//! author : Vlad Gurdiga : https://github.com/gurdiga
+//! author : Valentin Agachi : https://github.com/avaly
+//! author : Emanuel Cepoi : https://github.com/cepem
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: 'secunde',
+ mm: 'minute',
+ hh: 'ore',
+ dd: 'zile',
+ ww: 'săptămâni',
+ MM: 'luni',
+ yy: 'ani',
+ },
+ separator = ' ';
+ if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
+ separator = ' de ';
+ }
+ return number + separator + format[key];
+ }
+
+ var ro = moment.defineLocale('ro', {
+ months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
+ weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
+ weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[azi la] LT',
+ nextDay: '[mâine la] LT',
+ nextWeek: 'dddd [la] LT',
+ lastDay: '[ieri la] LT',
+ lastWeek: '[fosta] dddd [la] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'peste %s',
+ past: '%s în urmă',
+ s: 'câteva secunde',
+ ss: relativeTimeWithPlural,
+ m: 'un minut',
+ mm: relativeTimeWithPlural,
+ h: 'o oră',
+ hh: relativeTimeWithPlural,
+ d: 'o zi',
+ dd: relativeTimeWithPlural,
+ w: 'o săptămână',
+ ww: relativeTimeWithPlural,
+ M: 'o lună',
+ MM: relativeTimeWithPlural,
+ y: 'un an',
+ yy: relativeTimeWithPlural,
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return ro;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ru.js b/vendor/assets/javascripts/momentjs/locale/ru.js
new file mode 100644
index 000000000..918e9d5e0
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ru.js
@@ -0,0 +1,224 @@
+//! moment.js locale configuration
+//! locale : Russian [ru]
+//! author : Viktorminator : https://github.com/Viktorminator
+//! author : Menelion Elensúle : https://github.com/Oire
+//! author : Коренберг Марк : https://github.com/socketpair
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+ }
+ function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
+ mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
+ hh: 'час_часа_часов',
+ dd: 'день_дня_дней',
+ ww: 'неделя_недели_недель',
+ MM: 'месяц_месяца_месяцев',
+ yy: 'год_года_лет',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'минута' : 'минуту';
+ } else {
+ return number + ' ' + plural(format[key], +number);
+ }
+ }
+ var monthsParse = [
+ /^янв/i,
+ /^фев/i,
+ /^мар/i,
+ /^апр/i,
+ /^ма[йя]/i,
+ /^июн/i,
+ /^июл/i,
+ /^авг/i,
+ /^сен/i,
+ /^окт/i,
+ /^ноя/i,
+ /^дек/i,
+ ];
+
+ // http://new.gramota.ru/spravka/rules/139-prop : § 103
+ // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
+ // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
+ var ru = moment.defineLocale('ru', {
+ months: {
+ format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
+ '_'
+ ),
+ standalone:
+ 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
+ '_'
+ ),
+ },
+ monthsShort: {
+ // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
+ format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
+ '_'
+ ),
+ standalone:
+ 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
+ '_'
+ ),
+ },
+ weekdays: {
+ standalone:
+ 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
+ '_'
+ ),
+ format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
+ '_'
+ ),
+ isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
+ },
+ weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
+ monthsRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+ // копия предыдущего
+ monthsShortRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+ // полные названия с падежами
+ monthsStrictRegex:
+ /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
+
+ // Выражение, которое соответствует только сокращённым формам
+ monthsShortStrictRegex:
+ /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY г.',
+ LLL: 'D MMMM YYYY г., H:mm',
+ LLLL: 'dddd, D MMMM YYYY г., H:mm',
+ },
+ calendar: {
+ sameDay: '[Сегодня, в] LT',
+ nextDay: '[Завтра, в] LT',
+ lastDay: '[Вчера, в] LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В следующее] dddd, [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В следующий] dddd, [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В следующую] dddd, [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd, [в] LT';
+ } else {
+ return '[В] dddd, [в] LT';
+ }
+ }
+ },
+ lastWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В прошлое] dddd, [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В прошлый] dddd, [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В прошлую] dddd, [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd, [в] LT';
+ } else {
+ return '[В] dddd, [в] LT';
+ }
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'через %s',
+ past: '%s назад',
+ s: 'несколько секунд',
+ ss: relativeTimeWithPlural,
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: 'час',
+ hh: relativeTimeWithPlural,
+ d: 'день',
+ dd: relativeTimeWithPlural,
+ w: 'неделя',
+ ww: relativeTimeWithPlural,
+ M: 'месяц',
+ MM: relativeTimeWithPlural,
+ y: 'год',
+ yy: relativeTimeWithPlural,
+ },
+ meridiemParse: /ночи|утра|дня|вечера/i,
+ isPM: function (input) {
+ return /^(дня|вечера)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночи';
+ } else if (hour < 12) {
+ return 'утра';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечера';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ case 'w':
+ case 'W':
+ return number + '-я';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return ru;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/sd.js b/vendor/assets/javascripts/momentjs/locale/sd.js
new file mode 100644
index 000000000..56ff8c7f4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/sd.js
@@ -0,0 +1,92 @@
+//! moment.js locale configuration
+//! locale : Sindhi [sd]
+//! author : Narain Sagar : https://github.com/narainsagar
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var months = [
+ 'جنوري',
+ 'فيبروري',
+ 'مارچ',
+ 'اپريل',
+ 'مئي',
+ 'جون',
+ 'جولاءِ',
+ 'آگسٽ',
+ 'سيپٽمبر',
+ 'آڪٽوبر',
+ 'نومبر',
+ 'ڊسمبر',
+ ],
+ days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
+
+ var sd = moment.defineLocale('sd', {
+ months: months,
+ monthsShort: months,
+ weekdays: days,
+ weekdaysShort: days,
+ weekdaysMin: days,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd، D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /صبح|شام/,
+ isPM: function (input) {
+ return 'شام' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'صبح';
+ }
+ return 'شام';
+ },
+ calendar: {
+ sameDay: '[اڄ] LT',
+ nextDay: '[سڀاڻي] LT',
+ nextWeek: 'dddd [اڳين هفتي تي] LT',
+ lastDay: '[ڪالهه] LT',
+ lastWeek: '[گزريل هفتي] dddd [تي] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s پوء',
+ past: '%s اڳ',
+ s: 'چند سيڪنڊ',
+ ss: '%d سيڪنڊ',
+ m: 'هڪ منٽ',
+ mm: '%d منٽ',
+ h: 'هڪ ڪلاڪ',
+ hh: '%d ڪلاڪ',
+ d: 'هڪ ڏينهن',
+ dd: '%d ڏينهن',
+ M: 'هڪ مهينو',
+ MM: '%d مهينا',
+ y: 'هڪ سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return sd;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/se.js b/vendor/assets/javascripts/momentjs/locale/se.js
new file mode 100644
index 000000000..289929a48
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/se.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : Northern Sami [se]
+//! authors : Bård Rolstad Henriksen : https://github.com/karamell
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var se = moment.defineLocale('se', {
+ months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
+ weekdays:
+ 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
+ '_'
+ ),
+ weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
+ weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'MMMM D. [b.] YYYY',
+ LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
+ LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[otne ti] LT',
+ nextDay: '[ihttin ti] LT',
+ nextWeek: 'dddd [ti] LT',
+ lastDay: '[ikte ti] LT',
+ lastWeek: '[ovddit] dddd [ti] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s geažes',
+ past: 'maŋit %s',
+ s: 'moadde sekunddat',
+ ss: '%d sekunddat',
+ m: 'okta minuhta',
+ mm: '%d minuhtat',
+ h: 'okta diimmu',
+ hh: '%d diimmut',
+ d: 'okta beaivi',
+ dd: '%d beaivvit',
+ M: 'okta mánnu',
+ MM: '%d mánut',
+ y: 'okta jahki',
+ yy: '%d jagit',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return se;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/si.js b/vendor/assets/javascripts/momentjs/locale/si.js
new file mode 100644
index 000000000..4421d044f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/si.js
@@ -0,0 +1,80 @@
+//! moment.js locale configuration
+//! locale : Sinhalese [si]
+//! author : Sampath Sitinamaluwa : https://github.com/sampathsris
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ /*jshint -W100*/
+ var si = moment.defineLocale('si', {
+ months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
+ '_'
+ ),
+ monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
+ '_'
+ ),
+ weekdays:
+ 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
+ '_'
+ ),
+ weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),
+ weekdaysMin: 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'a h:mm',
+ LTS: 'a h:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY MMMM D',
+ LLL: 'YYYY MMMM D, a h:mm',
+ LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',
+ },
+ calendar: {
+ sameDay: '[අද] LT[ට]',
+ nextDay: '[හෙට] LT[ට]',
+ nextWeek: 'dddd LT[ට]',
+ lastDay: '[ඊයේ] LT[ට]',
+ lastWeek: '[පසුගිය] dddd LT[ට]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sකින්',
+ past: '%sකට පෙර',
+ s: 'තත්පර කිහිපය',
+ ss: 'තත්පර %d',
+ m: 'මිනිත්තුව',
+ mm: 'මිනිත්තු %d',
+ h: 'පැය',
+ hh: 'පැය %d',
+ d: 'දිනය',
+ dd: 'දින %d',
+ M: 'මාසය',
+ MM: 'මාස %d',
+ y: 'වසර',
+ yy: 'වසර %d',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
+ ordinal: function (number) {
+ return number + ' වැනි';
+ },
+ meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
+ isPM: function (input) {
+ return input === 'ප.ව.' || input === 'පස් වරු';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'ප.ව.' : 'පස් වරු';
+ } else {
+ return isLower ? 'පෙ.ව.' : 'පෙර වරු';
+ }
+ },
+ });
+
+ return si;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/sk.js b/vendor/assets/javascripts/momentjs/locale/sk.js
new file mode 100644
index 000000000..99edae771
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/sk.js
@@ -0,0 +1,156 @@
+//! moment.js locale configuration
+//! locale : Slovak [sk]
+//! author : Martin Minka : https://github.com/k2s
+//! based on work of petrbela : https://github.com/petrbela
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var months =
+ 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
+ '_'
+ ),
+ monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
+ function plural(n) {
+ return n > 1 && n < 5;
+ }
+ function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
+ case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'sekundy' : 'sekúnd');
+ } else {
+ return result + 'sekundami';
+ }
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'minúty' : 'minút');
+ } else {
+ return result + 'minútami';
+ }
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'hodiny' : 'hodín');
+ } else {
+ return result + 'hodinami';
+ }
+ case 'd': // a day / in a day / a day ago
+ return withoutSuffix || isFuture ? 'deň' : 'dňom';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'dni' : 'dní');
+ } else {
+ return result + 'dňami';
+ }
+ case 'M': // a month / in a month / a month ago
+ return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'mesiace' : 'mesiacov');
+ } else {
+ return result + 'mesiacmi';
+ }
+ case 'y': // a year / in a year / a year ago
+ return withoutSuffix || isFuture ? 'rok' : 'rokom';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'roky' : 'rokov');
+ } else {
+ return result + 'rokmi';
+ }
+ }
+ }
+
+ var sk = moment.defineLocale('sk', {
+ months: months,
+ monthsShort: monthsShort,
+ weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
+ weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
+ weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[dnes o] LT',
+ nextDay: '[zajtra o] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [o] LT';
+ case 3:
+ return '[v stredu o] LT';
+ case 4:
+ return '[vo štvrtok o] LT';
+ case 5:
+ return '[v piatok o] LT';
+ case 6:
+ return '[v sobotu o] LT';
+ }
+ },
+ lastDay: '[včera o] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[minulú nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[minulý] dddd [o] LT';
+ case 3:
+ return '[minulú stredu o] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [o] LT';
+ case 6:
+ return '[minulú sobotu o] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'pred %s',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return sk;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/sl.js b/vendor/assets/javascripts/momentjs/locale/sl.js
new file mode 100644
index 000000000..38f12109a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/sl.js
@@ -0,0 +1,182 @@
+//! moment.js locale configuration
+//! locale : Slovenian [sl]
+//! author : Robert Sedovšek : https://github.com/sedovsek
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's':
+ return withoutSuffix || isFuture
+ ? 'nekaj sekund'
+ : 'nekaj sekundami';
+ case 'ss':
+ if (number === 1) {
+ result += withoutSuffix ? 'sekundo' : 'sekundi';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
+ } else {
+ result += 'sekund';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'ena minuta' : 'eno minuto';
+ case 'mm':
+ if (number === 1) {
+ result += withoutSuffix ? 'minuta' : 'minuto';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'minute' : 'minutami';
+ } else {
+ result += withoutSuffix || isFuture ? 'minut' : 'minutami';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'ena ura' : 'eno uro';
+ case 'hh':
+ if (number === 1) {
+ result += withoutSuffix ? 'ura' : 'uro';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'uri' : 'urama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'ure' : 'urami';
+ } else {
+ result += withoutSuffix || isFuture ? 'ur' : 'urami';
+ }
+ return result;
+ case 'd':
+ return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
+ case 'dd':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'dan' : 'dnem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
+ } else {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
+ }
+ return result;
+ case 'M':
+ return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
+ case 'MM':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
+ } else {
+ result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
+ }
+ return result;
+ case 'y':
+ return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
+ case 'yy':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'leto' : 'letom';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'leti' : 'letoma';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'leta' : 'leti';
+ } else {
+ result += withoutSuffix || isFuture ? 'let' : 'leti';
+ }
+ return result;
+ }
+ }
+
+ var sl = moment.defineLocale('sl', {
+ months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
+ weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
+ weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD. MM. YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danes ob] LT',
+ nextDay: '[jutri ob] LT',
+
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v] [nedeljo] [ob] LT';
+ case 3:
+ return '[v] [sredo] [ob] LT';
+ case 6:
+ return '[v] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[v] dddd [ob] LT';
+ }
+ },
+ lastDay: '[včeraj ob] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[prejšnjo] [nedeljo] [ob] LT';
+ case 3:
+ return '[prejšnjo] [sredo] [ob] LT';
+ case 6:
+ return '[prejšnjo] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prejšnji] dddd [ob] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'čez %s',
+ past: 'pred %s',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return sl;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/sq.js b/vendor/assets/javascripts/momentjs/locale/sq.js
new file mode 100644
index 000000000..154e3d603
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/sq.js
@@ -0,0 +1,76 @@
+//! moment.js locale configuration
+//! locale : Albanian [sq]
+//! author : Flakërim Ismani : https://github.com/flakerimi
+//! author : Menelion Elensúle : https://github.com/Oire
+//! author : Oerd Cukalla : https://github.com/oerd
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var sq = moment.defineLocale('sq', {
+ months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
+ weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
+ '_'
+ ),
+ weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
+ weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
+ weekdaysParseExact: true,
+ meridiemParse: /PD|MD/,
+ isPM: function (input) {
+ return input.charAt(0) === 'M';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ return hours < 12 ? 'PD' : 'MD';
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Sot në] LT',
+ nextDay: '[Nesër në] LT',
+ nextWeek: 'dddd [në] LT',
+ lastDay: '[Dje në] LT',
+ lastWeek: 'dddd [e kaluar në] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'në %s',
+ past: '%s më parë',
+ s: 'disa sekonda',
+ ss: '%d sekonda',
+ m: 'një minutë',
+ mm: '%d minuta',
+ h: 'një orë',
+ hh: '%d orë',
+ d: 'një ditë',
+ dd: '%d ditë',
+ M: 'një muaj',
+ MM: '%d muaj',
+ y: 'një vit',
+ yy: '%d vite',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return sq;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/sr-cyrl.js b/vendor/assets/javascripts/momentjs/locale/sr-cyrl.js
new file mode 100644
index 000000000..9da10fa60
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/sr-cyrl.js
@@ -0,0 +1,138 @@
+//! moment.js locale configuration
+//! locale : Serbian Cyrillic [sr-cyrl]
+//! author : Milan Janačković : https://github.com/milan-j
+//! author : Stefan Crnjaković : https://github.com/crnjakovic
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var translator = {
+ words: {
+ //Different grammatical cases
+ ss: ['секунда', 'секунде', 'секунди'],
+ m: ['један минут', 'једног минута'],
+ mm: ['минут', 'минута', 'минута'],
+ h: ['један сат', 'једног сата'],
+ hh: ['сат', 'сата', 'сати'],
+ d: ['један дан', 'једног дана'],
+ dd: ['дан', 'дана', 'дана'],
+ M: ['један месец', 'једног месеца'],
+ MM: ['месец', 'месеца', 'месеци'],
+ y: ['једну годину', 'једне године'],
+ yy: ['годину', 'године', 'година'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator.words[key],
+ word;
+
+ if (key.length === 1) {
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'једна година';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'годину') {
+ return number + ' година';
+ }
+
+ return number + ' ' + word;
+ },
+ };
+
+ var srCyrl = moment.defineLocale('sr-cyrl', {
+ months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
+ '_'
+ ),
+ monthsShort:
+ 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
+ weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
+ weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
+ },
+ calendar: {
+ sameDay: '[данас у] LT',
+ nextDay: '[сутра у] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[у] [недељу] [у] LT';
+ case 3:
+ return '[у] [среду] [у] LT';
+ case 6:
+ return '[у] [суботу] [у] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[у] dddd [у] LT';
+ }
+ },
+ lastDay: '[јуче у] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[прошле] [недеље] [у] LT',
+ '[прошлог] [понедељка] [у] LT',
+ '[прошлог] [уторка] [у] LT',
+ '[прошле] [среде] [у] LT',
+ '[прошлог] [четвртка] [у] LT',
+ '[прошлог] [петка] [у] LT',
+ '[прошле] [суботе] [у] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: 'пре %s',
+ s: 'неколико секунди',
+ ss: translator.translate,
+ m: translator.translate,
+ mm: translator.translate,
+ h: translator.translate,
+ hh: translator.translate,
+ d: translator.translate,
+ dd: translator.translate,
+ M: translator.translate,
+ MM: translator.translate,
+ y: translator.translate,
+ yy: translator.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
+ },
+ });
+
+ return srCyrl;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/sr.js b/vendor/assets/javascripts/momentjs/locale/sr.js
new file mode 100644
index 000000000..8f53e7ccf
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/sr.js
@@ -0,0 +1,140 @@
+//! moment.js locale configuration
+//! locale : Serbian [sr]
+//! author : Milan Janačković : https://github.com/milan-j
+//! author : Stefan Crnjaković : https://github.com/crnjakovic
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var translator = {
+ words: {
+ //Different grammatical cases
+ ss: ['sekunda', 'sekunde', 'sekundi'],
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ d: ['jedan dan', 'jednog dana'],
+ dd: ['dan', 'dana', 'dana'],
+ M: ['jedan mesec', 'jednog meseca'],
+ MM: ['mesec', 'meseca', 'meseci'],
+ y: ['jednu godinu', 'jedne godine'],
+ yy: ['godinu', 'godine', 'godina'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator.words[key],
+ word;
+
+ if (key.length === 1) {
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'jedna godina';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'godinu') {
+ return number + ' godina';
+ }
+
+ return number + ' ' + word;
+ },
+ };
+
+ var sr = moment.defineLocale('sr', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedelju] [u] LT';
+ case 3:
+ return '[u] [sredu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[juče u] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[prošle] [nedelje] [u] LT',
+ '[prošlog] [ponedeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'pre %s',
+ s: 'nekoliko sekundi',
+ ss: translator.translate,
+ m: translator.translate,
+ mm: translator.translate,
+ h: translator.translate,
+ hh: translator.translate,
+ d: translator.translate,
+ dd: translator.translate,
+ M: translator.translate,
+ MM: translator.translate,
+ y: translator.translate,
+ yy: translator.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return sr;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ss.js b/vendor/assets/javascripts/momentjs/locale/ss.js
new file mode 100644
index 000000000..ce8a657c1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ss.js
@@ -0,0 +1,95 @@
+//! moment.js locale configuration
+//! locale : siSwati [ss]
+//! author : Nicolai Davies : https://github.com/nicolaidavies
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var ss = moment.defineLocale('ss', {
+ months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
+ '_'
+ ),
+ monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
+ weekdays:
+ 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
+ weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Namuhla nga] LT',
+ nextDay: '[Kusasa nga] LT',
+ nextWeek: 'dddd [nga] LT',
+ lastDay: '[Itolo nga] LT',
+ lastWeek: 'dddd [leliphelile] [nga] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'nga %s',
+ past: 'wenteka nga %s',
+ s: 'emizuzwana lomcane',
+ ss: '%d mzuzwana',
+ m: 'umzuzu',
+ mm: '%d emizuzu',
+ h: 'lihora',
+ hh: '%d emahora',
+ d: 'lilanga',
+ dd: '%d emalanga',
+ M: 'inyanga',
+ MM: '%d tinyanga',
+ y: 'umnyaka',
+ yy: '%d iminyaka',
+ },
+ meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'ekuseni';
+ } else if (hours < 15) {
+ return 'emini';
+ } else if (hours < 19) {
+ return 'entsambama';
+ } else {
+ return 'ebusuku';
+ }
+ },
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ekuseni') {
+ return hour;
+ } else if (meridiem === 'emini') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
+ if (hour === 0) {
+ return 0;
+ }
+ return hour + 12;
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: '%d',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return ss;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/sv.js b/vendor/assets/javascripts/momentjs/locale/sv.js
new file mode 100644
index 000000000..90fe441fc
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/sv.js
@@ -0,0 +1,79 @@
+//! moment.js locale configuration
+//! locale : Swedish [sv]
+//! author : Jens Alm : https://github.com/ulmus
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var sv = moment.defineLocale('sv', {
+ months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
+ weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
+ weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [kl.] HH:mm',
+ LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Idag] LT',
+ nextDay: '[Imorgon] LT',
+ lastDay: '[Igår] LT',
+ nextWeek: '[På] dddd LT',
+ lastWeek: '[I] dddd[s] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: 'för %s sedan',
+ s: 'några sekunder',
+ ss: '%d sekunder',
+ m: 'en minut',
+ mm: '%d minuter',
+ h: 'en timme',
+ hh: '%d timmar',
+ d: 'en dag',
+ dd: '%d dagar',
+ M: 'en månad',
+ MM: '%d månader',
+ y: 'ett år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? ':e'
+ : b === 1
+ ? ':a'
+ : b === 2
+ ? ':a'
+ : b === 3
+ ? ':e'
+ : ':e';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return sv;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/sw.js b/vendor/assets/javascripts/momentjs/locale/sw.js
new file mode 100644
index 000000000..1a5ac6438
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/sw.js
@@ -0,0 +1,66 @@
+//! moment.js locale configuration
+//! locale : Swahili [sw]
+//! author : Fahad Kassim : https://github.com/fadsel
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var sw = moment.defineLocale('sw', {
+ months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
+ weekdays:
+ 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
+ '_'
+ ),
+ weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
+ weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'hh:mm A',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[leo saa] LT',
+ nextDay: '[kesho saa] LT',
+ nextWeek: '[wiki ijayo] dddd [saat] LT',
+ lastDay: '[jana] LT',
+ lastWeek: '[wiki iliyopita] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s baadaye',
+ past: 'tokea %s',
+ s: 'hivi punde',
+ ss: 'sekunde %d',
+ m: 'dakika moja',
+ mm: 'dakika %d',
+ h: 'saa limoja',
+ hh: 'masaa %d',
+ d: 'siku moja',
+ dd: 'siku %d',
+ M: 'mwezi mmoja',
+ MM: 'miezi %d',
+ y: 'mwaka mmoja',
+ yy: 'miaka %d',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return sw;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ta.js b/vendor/assets/javascripts/momentjs/locale/ta.js
new file mode 100644
index 000000000..0f288320e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ta.js
@@ -0,0 +1,142 @@
+//! moment.js locale configuration
+//! locale : Tamil [ta]
+//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '௧',
+ 2: '௨',
+ 3: '௩',
+ 4: '௪',
+ 5: '௫',
+ 6: '௬',
+ 7: '௭',
+ 8: '௮',
+ 9: '௯',
+ 0: '௦',
+ },
+ numberMap = {
+ '௧': '1',
+ '௨': '2',
+ '௩': '3',
+ '௪': '4',
+ '௫': '5',
+ '௬': '6',
+ '௭': '7',
+ '௮': '8',
+ '௯': '9',
+ '௦': '0',
+ };
+
+ var ta = moment.defineLocale('ta', {
+ months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
+ '_'
+ ),
+ weekdays:
+ 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
+ '_'
+ ),
+ weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
+ '_'
+ ),
+ weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, HH:mm',
+ LLLL: 'dddd, D MMMM YYYY, HH:mm',
+ },
+ calendar: {
+ sameDay: '[இன்று] LT',
+ nextDay: '[நாளை] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[நேற்று] LT',
+ lastWeek: '[கடந்த வாரம்] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s இல்',
+ past: '%s முன்',
+ s: 'ஒரு சில விநாடிகள்',
+ ss: '%d விநாடிகள்',
+ m: 'ஒரு நிமிடம்',
+ mm: '%d நிமிடங்கள்',
+ h: 'ஒரு மணி நேரம்',
+ hh: '%d மணி நேரம்',
+ d: 'ஒரு நாள்',
+ dd: '%d நாட்கள்',
+ M: 'ஒரு மாதம்',
+ MM: '%d மாதங்கள்',
+ y: 'ஒரு வருடம்',
+ yy: '%d ஆண்டுகள்',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}வது/,
+ ordinal: function (number) {
+ return number + 'வது';
+ },
+ preparse: function (string) {
+ return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // refer http://ta.wikipedia.org/s/1er1
+ meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 2) {
+ return ' யாமம்';
+ } else if (hour < 6) {
+ return ' வைகறை'; // வைகறை
+ } else if (hour < 10) {
+ return ' காலை'; // காலை
+ } else if (hour < 14) {
+ return ' நண்பகல்'; // நண்பகல்
+ } else if (hour < 18) {
+ return ' எற்பாடு'; // எற்பாடு
+ } else if (hour < 22) {
+ return ' மாலை'; // மாலை
+ } else {
+ return ' யாமம்';
+ }
+ },
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'யாமம்') {
+ return hour < 2 ? hour : hour + 12;
+ } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
+ return hour;
+ } else if (meridiem === 'நண்பகல்') {
+ return hour >= 10 ? hour : hour + 12;
+ } else {
+ return hour + 12;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return ta;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/te.js b/vendor/assets/javascripts/momentjs/locale/te.js
new file mode 100644
index 000000000..85bab7efd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/te.js
@@ -0,0 +1,99 @@
+//! moment.js locale configuration
+//! locale : Telugu [te]
+//! author : Krishna Chaitanya Thota : https://github.com/kcthota
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var te = moment.defineLocale('te', {
+ months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
+ '_'
+ ),
+ monthsShort:
+ 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
+ '_'
+ ),
+ weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
+ weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[నేడు] LT',
+ nextDay: '[రేపు] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[నిన్న] LT',
+ lastWeek: '[గత] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s లో',
+ past: '%s క్రితం',
+ s: 'కొన్ని క్షణాలు',
+ ss: '%d సెకన్లు',
+ m: 'ఒక నిమిషం',
+ mm: '%d నిమిషాలు',
+ h: 'ఒక గంట',
+ hh: '%d గంటలు',
+ d: 'ఒక రోజు',
+ dd: '%d రోజులు',
+ M: 'ఒక నెల',
+ MM: '%d నెలలు',
+ y: 'ఒక సంవత్సరం',
+ yy: '%d సంవత్సరాలు',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}వ/,
+ ordinal: '%dవ',
+ meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'రాత్రి') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ఉదయం') {
+ return hour;
+ } else if (meridiem === 'మధ్యాహ్నం') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'సాయంత్రం') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'రాత్రి';
+ } else if (hour < 10) {
+ return 'ఉదయం';
+ } else if (hour < 17) {
+ return 'మధ్యాహ్నం';
+ } else if (hour < 20) {
+ return 'సాయంత్రం';
+ } else {
+ return 'రాత్రి';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ return te;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/tet.js b/vendor/assets/javascripts/momentjs/locale/tet.js
new file mode 100644
index 000000000..931384a60
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/tet.js
@@ -0,0 +1,79 @@
+//! moment.js locale configuration
+//! locale : Tetun Dili (East Timor) [tet]
+//! author : Joshua Brooks : https://github.com/joshbrooks
+//! author : Onorio De J. Afonso : https://github.com/marobo
+//! author : Sonia Simoes : https://github.com/soniasimoes
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var tet = moment.defineLocale('tet', {
+ months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
+ weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
+ weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
+ weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Ohin iha] LT',
+ nextDay: '[Aban iha] LT',
+ nextWeek: 'dddd [iha] LT',
+ lastDay: '[Horiseik iha] LT',
+ lastWeek: 'dddd [semana kotuk] [iha] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'iha %s',
+ past: '%s liuba',
+ s: 'segundu balun',
+ ss: 'segundu %d',
+ m: 'minutu ida',
+ mm: 'minutu %d',
+ h: 'oras ida',
+ hh: 'oras %d',
+ d: 'loron ida',
+ dd: 'loron %d',
+ M: 'fulan ida',
+ MM: 'fulan %d',
+ y: 'tinan ida',
+ yy: 'tinan %d',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return tet;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/tg.js b/vendor/assets/javascripts/momentjs/locale/tg.js
new file mode 100644
index 000000000..bde72ad13
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/tg.js
@@ -0,0 +1,128 @@
+//! moment.js locale configuration
+//! locale : Tajik [tg]
+//! author : Orif N. Jr. : https://github.com/orif-jr
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var suffixes = {
+ 0: '-ум',
+ 1: '-ум',
+ 2: '-юм',
+ 3: '-юм',
+ 4: '-ум',
+ 5: '-ум',
+ 6: '-ум',
+ 7: '-ум',
+ 8: '-ум',
+ 9: '-ум',
+ 10: '-ум',
+ 12: '-ум',
+ 13: '-ум',
+ 20: '-ум',
+ 30: '-юм',
+ 40: '-ум',
+ 50: '-ум',
+ 60: '-ум',
+ 70: '-ум',
+ 80: '-ум',
+ 90: '-ум',
+ 100: '-ум',
+ };
+
+ var tg = moment.defineLocale('tg', {
+ months: {
+ format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
+ '_'
+ ),
+ standalone:
+ 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+ weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
+ '_'
+ ),
+ weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
+ weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Имрӯз соати] LT',
+ nextDay: '[Фардо соати] LT',
+ lastDay: '[Дирӯз соати] LT',
+ nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
+ lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'баъди %s',
+ past: '%s пеш',
+ s: 'якчанд сония',
+ m: 'як дақиқа',
+ mm: '%d дақиқа',
+ h: 'як соат',
+ hh: '%d соат',
+ d: 'як рӯз',
+ dd: '%d рӯз',
+ M: 'як моҳ',
+ MM: '%d моҳ',
+ y: 'як сол',
+ yy: '%d сол',
+ },
+ meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'шаб') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'субҳ') {
+ return hour;
+ } else if (meridiem === 'рӯз') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'бегоҳ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'шаб';
+ } else if (hour < 11) {
+ return 'субҳ';
+ } else if (hour < 16) {
+ return 'рӯз';
+ } else if (hour < 19) {
+ return 'бегоҳ';
+ } else {
+ return 'шаб';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes[number] || suffixes[a] || suffixes[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1th is the first week of the year.
+ },
+ });
+
+ return tg;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/th.js b/vendor/assets/javascripts/momentjs/locale/th.js
new file mode 100644
index 000000000..f83bad95e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/th.js
@@ -0,0 +1,76 @@
+//! moment.js locale configuration
+//! locale : Thai [th]
+//! author : Kridsada Thanabulpong : https://github.com/sirn
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var th = moment.defineLocale('th', {
+ months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
+ weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
+ weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY เวลา H:mm',
+ LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',
+ },
+ meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
+ isPM: function (input) {
+ return input === 'หลังเที่ยง';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ก่อนเที่ยง';
+ } else {
+ return 'หลังเที่ยง';
+ }
+ },
+ calendar: {
+ sameDay: '[วันนี้ เวลา] LT',
+ nextDay: '[พรุ่งนี้ เวลา] LT',
+ nextWeek: 'dddd[หน้า เวลา] LT',
+ lastDay: '[เมื่อวานนี้ เวลา] LT',
+ lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'อีก %s',
+ past: '%sที่แล้ว',
+ s: 'ไม่กี่วินาที',
+ ss: '%d วินาที',
+ m: '1 นาที',
+ mm: '%d นาที',
+ h: '1 ชั่วโมง',
+ hh: '%d ชั่วโมง',
+ d: '1 วัน',
+ dd: '%d วัน',
+ w: '1 สัปดาห์',
+ ww: '%d สัปดาห์',
+ M: '1 เดือน',
+ MM: '%d เดือน',
+ y: '1 ปี',
+ yy: '%d ปี',
+ },
+ });
+
+ return th;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/tk.js b/vendor/assets/javascripts/momentjs/locale/tk.js
new file mode 100644
index 000000000..24d4ede90
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/tk.js
@@ -0,0 +1,102 @@
+//! moment.js locale configuration
+//! locale : Turkmen [tk]
+//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var suffixes = {
+ 1: "'inji",
+ 5: "'inji",
+ 8: "'inji",
+ 70: "'inji",
+ 80: "'inji",
+ 2: "'nji",
+ 7: "'nji",
+ 20: "'nji",
+ 50: "'nji",
+ 3: "'ünji",
+ 4: "'ünji",
+ 100: "'ünji",
+ 6: "'njy",
+ 9: "'unjy",
+ 10: "'unjy",
+ 30: "'unjy",
+ 60: "'ynjy",
+ 90: "'ynjy",
+ };
+
+ var tk = moment.defineLocale('tk', {
+ months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
+ weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
+ '_'
+ ),
+ weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
+ weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün sagat] LT',
+ nextDay: '[ertir sagat] LT',
+ nextWeek: '[indiki] dddd [sagat] LT',
+ lastDay: '[düýn] LT',
+ lastWeek: '[geçen] dddd [sagat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s soň',
+ past: '%s öň',
+ s: 'birnäçe sekunt',
+ m: 'bir minut',
+ mm: '%d minut',
+ h: 'bir sagat',
+ hh: '%d sagat',
+ d: 'bir gün',
+ dd: '%d gün',
+ M: 'bir aý',
+ MM: '%d aý',
+ y: 'bir ýyl',
+ yy: '%d ýyl',
+ },
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'Do':
+ case 'DD':
+ return number;
+ default:
+ if (number === 0) {
+ // special case for zero
+ return number + "'unjy";
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return tk;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/tl-ph.js b/vendor/assets/javascripts/momentjs/locale/tl-ph.js
new file mode 100644
index 000000000..871b07841
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/tl-ph.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : Tagalog (Philippines) [tl-ph]
+//! author : Dan Hagman : https://github.com/hagmandan
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var tlPh = moment.defineLocale('tl-ph', {
+ months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
+ '_'
+ ),
+ monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+ weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+ weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'MM/D/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY HH:mm',
+ LLLL: 'dddd, MMMM DD, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: 'LT [ngayong araw]',
+ nextDay: '[Bukas ng] LT',
+ nextWeek: 'LT [sa susunod na] dddd',
+ lastDay: 'LT [kahapon]',
+ lastWeek: 'LT [noong nakaraang] dddd',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'sa loob ng %s',
+ past: '%s ang nakalipas',
+ s: 'ilang segundo',
+ ss: '%d segundo',
+ m: 'isang minuto',
+ mm: '%d minuto',
+ h: 'isang oras',
+ hh: '%d oras',
+ d: 'isang araw',
+ dd: '%d araw',
+ M: 'isang buwan',
+ MM: '%d buwan',
+ y: 'isang taon',
+ yy: '%d taon',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return tlPh;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/tlh.js b/vendor/assets/javascripts/momentjs/locale/tlh.js
new file mode 100644
index 000000000..ee39f1eb6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/tlh.js
@@ -0,0 +1,135 @@
+//! moment.js locale configuration
+//! locale : Klingon [tlh]
+//! author : Dominika Kruk : https://github.com/amaranthrose
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
+
+ function translateFuture(output) {
+ var time = output;
+ time =
+ output.indexOf('jaj') !== -1
+ ? time.slice(0, -3) + 'leS'
+ : output.indexOf('jar') !== -1
+ ? time.slice(0, -3) + 'waQ'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'nem'
+ : time + ' pIq';
+ return time;
+ }
+
+ function translatePast(output) {
+ var time = output;
+ time =
+ output.indexOf('jaj') !== -1
+ ? time.slice(0, -3) + 'Hu’'
+ : output.indexOf('jar') !== -1
+ ? time.slice(0, -3) + 'wen'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'ben'
+ : time + ' ret';
+ return time;
+ }
+
+ function translate(number, withoutSuffix, string, isFuture) {
+ var numberNoun = numberAsNoun(number);
+ switch (string) {
+ case 'ss':
+ return numberNoun + ' lup';
+ case 'mm':
+ return numberNoun + ' tup';
+ case 'hh':
+ return numberNoun + ' rep';
+ case 'dd':
+ return numberNoun + ' jaj';
+ case 'MM':
+ return numberNoun + ' jar';
+ case 'yy':
+ return numberNoun + ' DIS';
+ }
+ }
+
+ function numberAsNoun(number) {
+ var hundred = Math.floor((number % 1000) / 100),
+ ten = Math.floor((number % 100) / 10),
+ one = number % 10,
+ word = '';
+ if (hundred > 0) {
+ word += numbersNouns[hundred] + 'vatlh';
+ }
+ if (ten > 0) {
+ word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
+ }
+ if (one > 0) {
+ word += (word !== '' ? ' ' : '') + numbersNouns[one];
+ }
+ return word === '' ? 'pagh' : word;
+ }
+
+ var tlh = moment.defineLocale('tlh', {
+ months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+ weekdaysMin:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[DaHjaj] LT',
+ nextDay: '[wa’leS] LT',
+ nextWeek: 'LLL',
+ lastDay: '[wa’Hu’] LT',
+ lastWeek: 'LLL',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: translateFuture,
+ past: translatePast,
+ s: 'puS lup',
+ ss: translate,
+ m: 'wa’ tup',
+ mm: translate,
+ h: 'wa’ rep',
+ hh: translate,
+ d: 'wa’ jaj',
+ dd: translate,
+ M: 'wa’ jar',
+ MM: translate,
+ y: 'wa’ DIS',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return tlh;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/tr.js b/vendor/assets/javascripts/momentjs/locale/tr.js
new file mode 100644
index 000000000..663778e99
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/tr.js
@@ -0,0 +1,117 @@
+//! moment.js locale configuration
+//! locale : Turkish [tr]
+//! authors : Erhan Gundogan : https://github.com/erhangundogan,
+//! Burak Yiğit Kaya: https://github.com/BYK
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var suffixes = {
+ 1: "'inci",
+ 5: "'inci",
+ 8: "'inci",
+ 70: "'inci",
+ 80: "'inci",
+ 2: "'nci",
+ 7: "'nci",
+ 20: "'nci",
+ 50: "'nci",
+ 3: "'üncü",
+ 4: "'üncü",
+ 100: "'üncü",
+ 6: "'ncı",
+ 9: "'uncu",
+ 10: "'uncu",
+ 30: "'uncu",
+ 60: "'ıncı",
+ 90: "'ıncı",
+ };
+
+ var tr = moment.defineLocale('tr', {
+ months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
+ '_'
+ ),
+ monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
+ weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
+ '_'
+ ),
+ weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),
+ weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'öö' : 'ÖÖ';
+ } else {
+ return isLower ? 'ös' : 'ÖS';
+ }
+ },
+ meridiemParse: /öö|ÖÖ|ös|ÖS/,
+ isPM: function (input) {
+ return input === 'ös' || input === 'ÖS';
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün saat] LT',
+ nextDay: '[yarın saat] LT',
+ nextWeek: '[gelecek] dddd [saat] LT',
+ lastDay: '[dün] LT',
+ lastWeek: '[geçen] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s sonra',
+ past: '%s önce',
+ s: 'birkaç saniye',
+ ss: '%d saniye',
+ m: 'bir dakika',
+ mm: '%d dakika',
+ h: 'bir saat',
+ hh: '%d saat',
+ d: 'bir gün',
+ dd: '%d gün',
+ w: 'bir hafta',
+ ww: '%d hafta',
+ M: 'bir ay',
+ MM: '%d ay',
+ y: 'bir yıl',
+ yy: '%d yıl',
+ },
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'Do':
+ case 'DD':
+ return number;
+ default:
+ if (number === 0) {
+ // special case for zero
+ return number + "'ıncı";
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return tr;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/tzl.js b/vendor/assets/javascripts/momentjs/locale/tzl.js
new file mode 100644
index 000000000..5eb1c067e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/tzl.js
@@ -0,0 +1,100 @@
+//! moment.js locale configuration
+//! locale : Talossan [tzl]
+//! author : Robin van der Vliet : https://github.com/robin0van0der0v
+//! author : Iustì Canun
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
+ // This is currently too difficult (maybe even impossible) to add.
+ var tzl = moment.defineLocale('tzl', {
+ months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
+ weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
+ weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
+ weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM [dallas] YYYY',
+ LLL: 'D. MMMM [dallas] YYYY HH.mm',
+ LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',
+ },
+ meridiemParse: /d\'o|d\'a/i,
+ isPM: function (input) {
+ return "d'o" === input.toLowerCase();
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? "d'o" : "D'O";
+ } else {
+ return isLower ? "d'a" : "D'A";
+ }
+ },
+ calendar: {
+ sameDay: '[oxhi à] LT',
+ nextDay: '[demà à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[ieiri à] LT',
+ lastWeek: '[sür el] dddd [lasteu à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'osprei %s',
+ past: 'ja%s',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['viensas secunds', "'iensas secunds"],
+ ss: [number + ' secunds', '' + number + ' secunds'],
+ m: ["'n míut", "'iens míut"],
+ mm: [number + ' míuts', '' + number + ' míuts'],
+ h: ["'n þora", "'iensa þora"],
+ hh: [number + ' þoras', '' + number + ' þoras'],
+ d: ["'n ziua", "'iensa ziua"],
+ dd: [number + ' ziuas', '' + number + ' ziuas'],
+ M: ["'n mes", "'iens mes"],
+ MM: [number + ' mesen', '' + number + ' mesen'],
+ y: ["'n ar", "'iens ar"],
+ yy: [number + ' ars', '' + number + ' ars'],
+ };
+ return isFuture
+ ? format[key][0]
+ : withoutSuffix
+ ? format[key][0]
+ : format[key][1];
+ }
+
+ return tzl;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/tzm-latn.js b/vendor/assets/javascripts/momentjs/locale/tzm-latn.js
new file mode 100644
index 000000000..34425a7e4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/tzm-latn.js
@@ -0,0 +1,65 @@
+//! moment.js locale configuration
+//! locale : Central Atlas Tamazight Latin [tzm-latn]
+//! author : Abdel Said : https://github.com/abdelsaid
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var tzmLatn = moment.defineLocale('tzm-latn', {
+ months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
+ '_'
+ ),
+ monthsShort:
+ 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
+ '_'
+ ),
+ weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[asdkh g] LT',
+ nextDay: '[aska g] LT',
+ nextWeek: 'dddd [g] LT',
+ lastDay: '[assant g] LT',
+ lastWeek: 'dddd [g] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dadkh s yan %s',
+ past: 'yan %s',
+ s: 'imik',
+ ss: '%d imik',
+ m: 'minuḍ',
+ mm: '%d minuḍ',
+ h: 'saɛa',
+ hh: '%d tassaɛin',
+ d: 'ass',
+ dd: '%d ossan',
+ M: 'ayowr',
+ MM: '%d iyyirn',
+ y: 'asgas',
+ yy: '%d isgasn',
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ return tzmLatn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/tzm.js b/vendor/assets/javascripts/momentjs/locale/tzm.js
new file mode 100644
index 000000000..5db61f946
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/tzm.js
@@ -0,0 +1,65 @@
+//! moment.js locale configuration
+//! locale : Central Atlas Tamazight [tzm]
+//! author : Abdel Said : https://github.com/abdelsaid
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var tzm = moment.defineLocale('tzm', {
+ months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
+ '_'
+ ),
+ weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
+ nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
+ nextWeek: 'dddd [ⴴ] LT',
+ lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
+ lastWeek: 'dddd [ⴴ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
+ past: 'ⵢⴰⵏ %s',
+ s: 'ⵉⵎⵉⴽ',
+ ss: '%d ⵉⵎⵉⴽ',
+ m: 'ⵎⵉⵏⵓⴺ',
+ mm: '%d ⵎⵉⵏⵓⴺ',
+ h: 'ⵙⴰⵄⴰ',
+ hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
+ d: 'ⴰⵙⵙ',
+ dd: '%d oⵙⵙⴰⵏ',
+ M: 'ⴰⵢoⵓⵔ',
+ MM: '%d ⵉⵢⵢⵉⵔⵏ',
+ y: 'ⴰⵙⴳⴰⵙ',
+ yy: '%d ⵉⵙⴳⴰⵙⵏ',
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ return tzm;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ug-cn.js b/vendor/assets/javascripts/momentjs/locale/ug-cn.js
new file mode 100644
index 000000000..5efffdd45
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ug-cn.js
@@ -0,0 +1,122 @@
+//! moment.js locale configuration
+//! locale : Uyghur (China) [ug-cn]
+//! author: boyaq : https://github.com/boyaq
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var ugCn = moment.defineLocale('ug-cn', {
+ months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
+ '_'
+ ),
+ weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
+ '_'
+ ),
+ weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
+ weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
+ LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
+ LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
+ },
+ meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ meridiem === 'يېرىم كېچە' ||
+ meridiem === 'سەھەر' ||
+ meridiem === 'چۈشتىن بۇرۇن'
+ ) {
+ return hour;
+ } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
+ return hour + 12;
+ } else {
+ return hour >= 11 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return 'يېرىم كېچە';
+ } else if (hm < 900) {
+ return 'سەھەر';
+ } else if (hm < 1130) {
+ return 'چۈشتىن بۇرۇن';
+ } else if (hm < 1230) {
+ return 'چۈش';
+ } else if (hm < 1800) {
+ return 'چۈشتىن كېيىن';
+ } else {
+ return 'كەچ';
+ }
+ },
+ calendar: {
+ sameDay: '[بۈگۈن سائەت] LT',
+ nextDay: '[ئەتە سائەت] LT',
+ nextWeek: '[كېلەركى] dddd [سائەت] LT',
+ lastDay: '[تۆنۈگۈن] LT',
+ lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s كېيىن',
+ past: '%s بۇرۇن',
+ s: 'نەچچە سېكونت',
+ ss: '%d سېكونت',
+ m: 'بىر مىنۇت',
+ mm: '%d مىنۇت',
+ h: 'بىر سائەت',
+ hh: '%d سائەت',
+ d: 'بىر كۈن',
+ dd: '%d كۈن',
+ M: 'بىر ئاي',
+ MM: '%d ئاي',
+ y: 'بىر يىل',
+ yy: '%d يىل',
+ },
+
+ dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '-كۈنى';
+ case 'w':
+ case 'W':
+ return number + '-ھەپتە';
+ default:
+ return number;
+ }
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
+ },
+ });
+
+ return ugCn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/uk.js b/vendor/assets/javascripts/momentjs/locale/uk.js
new file mode 100644
index 000000000..89e04316e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/uk.js
@@ -0,0 +1,178 @@
+//! moment.js locale configuration
+//! locale : Ukrainian [uk]
+//! author : zemlanin : https://github.com/zemlanin
+//! Author : Menelion Elensúle : https://github.com/Oire
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+ }
+ function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
+ mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
+ hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
+ dd: 'день_дні_днів',
+ MM: 'місяць_місяці_місяців',
+ yy: 'рік_роки_років',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'хвилина' : 'хвилину';
+ } else if (key === 'h') {
+ return withoutSuffix ? 'година' : 'годину';
+ } else {
+ return number + ' ' + plural(format[key], +number);
+ }
+ }
+ function weekdaysCaseReplace(m, format) {
+ var weekdays = {
+ nominative:
+ 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
+ '_'
+ ),
+ accusative:
+ 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
+ '_'
+ ),
+ genitive:
+ 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
+ '_'
+ ),
+ },
+ nounCase;
+
+ if (m === true) {
+ return weekdays['nominative']
+ .slice(1, 7)
+ .concat(weekdays['nominative'].slice(0, 1));
+ }
+ if (!m) {
+ return weekdays['nominative'];
+ }
+
+ nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
+ ? 'accusative'
+ : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
+ ? 'genitive'
+ : 'nominative';
+ return weekdays[nounCase][m.day()];
+ }
+ function processHoursFunction(str) {
+ return function () {
+ return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
+ };
+ }
+
+ var uk = moment.defineLocale('uk', {
+ months: {
+ format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
+ '_'
+ ),
+ standalone:
+ 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
+ '_'
+ ),
+ weekdays: weekdaysCaseReplace,
+ weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY р.',
+ LLL: 'D MMMM YYYY р., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY р., HH:mm',
+ },
+ calendar: {
+ sameDay: processHoursFunction('[Сьогодні '),
+ nextDay: processHoursFunction('[Завтра '),
+ lastDay: processHoursFunction('[Вчора '),
+ nextWeek: processHoursFunction('[У] dddd ['),
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 5:
+ case 6:
+ return processHoursFunction('[Минулої] dddd [').call(this);
+ case 1:
+ case 2:
+ case 4:
+ return processHoursFunction('[Минулого] dddd [').call(this);
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: '%s тому',
+ s: 'декілька секунд',
+ ss: relativeTimeWithPlural,
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: 'годину',
+ hh: relativeTimeWithPlural,
+ d: 'день',
+ dd: relativeTimeWithPlural,
+ M: 'місяць',
+ MM: relativeTimeWithPlural,
+ y: 'рік',
+ yy: relativeTimeWithPlural,
+ },
+ // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
+ meridiemParse: /ночі|ранку|дня|вечора/,
+ isPM: function (input) {
+ return /^(дня|вечора)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночі';
+ } else if (hour < 12) {
+ return 'ранку';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечора';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ case 'w':
+ case 'W':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return uk;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/ur.js b/vendor/assets/javascripts/momentjs/locale/ur.js
new file mode 100644
index 000000000..9720dcf52
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/ur.js
@@ -0,0 +1,93 @@
+//! moment.js locale configuration
+//! locale : Urdu [ur]
+//! author : Sawood Alam : https://github.com/ibnesayeed
+//! author : Zack : https://github.com/ZackVision
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var months = [
+ 'جنوری',
+ 'فروری',
+ 'مارچ',
+ 'اپریل',
+ 'مئی',
+ 'جون',
+ 'جولائی',
+ 'اگست',
+ 'ستمبر',
+ 'اکتوبر',
+ 'نومبر',
+ 'دسمبر',
+ ],
+ days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
+
+ var ur = moment.defineLocale('ur', {
+ months: months,
+ monthsShort: months,
+ weekdays: days,
+ weekdaysShort: days,
+ weekdaysMin: days,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd، D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /صبح|شام/,
+ isPM: function (input) {
+ return 'شام' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'صبح';
+ }
+ return 'شام';
+ },
+ calendar: {
+ sameDay: '[آج بوقت] LT',
+ nextDay: '[کل بوقت] LT',
+ nextWeek: 'dddd [بوقت] LT',
+ lastDay: '[گذشتہ روز بوقت] LT',
+ lastWeek: '[گذشتہ] dddd [بوقت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s بعد',
+ past: '%s قبل',
+ s: 'چند سیکنڈ',
+ ss: '%d سیکنڈ',
+ m: 'ایک منٹ',
+ mm: '%d منٹ',
+ h: 'ایک گھنٹہ',
+ hh: '%d گھنٹے',
+ d: 'ایک دن',
+ dd: '%d دن',
+ M: 'ایک ماہ',
+ MM: '%d ماہ',
+ y: 'ایک سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return ur;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/uz-latn.js b/vendor/assets/javascripts/momentjs/locale/uz-latn.js
new file mode 100644
index 000000000..af08e60f0
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/uz-latn.js
@@ -0,0 +1,65 @@
+//! moment.js locale configuration
+//! locale : Uzbek Latin [uz-latn]
+//! author : Rasulbek Mirzayev : github.com/Rasulbeeek
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var uzLatn = moment.defineLocale('uz-latn', {
+ months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
+ weekdays:
+ 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
+ '_'
+ ),
+ weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
+ weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'D MMMM YYYY, dddd HH:mm',
+ },
+ calendar: {
+ sameDay: '[Bugun soat] LT [da]',
+ nextDay: '[Ertaga] LT [da]',
+ nextWeek: 'dddd [kuni soat] LT [da]',
+ lastDay: '[Kecha soat] LT [da]',
+ lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'Yaqin %s ichida',
+ past: 'Bir necha %s oldin',
+ s: 'soniya',
+ ss: '%d soniya',
+ m: 'bir daqiqa',
+ mm: '%d daqiqa',
+ h: 'bir soat',
+ hh: '%d soat',
+ d: 'bir kun',
+ dd: '%d kun',
+ M: 'bir oy',
+ MM: '%d oy',
+ y: 'bir yil',
+ yy: '%d yil',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ return uzLatn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/uz.js b/vendor/assets/javascripts/momentjs/locale/uz.js
new file mode 100644
index 000000000..a8a87fc89
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/uz.js
@@ -0,0 +1,62 @@
+//! moment.js locale configuration
+//! locale : Uzbek [uz]
+//! author : Sardor Muminov : https://github.com/muminoff
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var uz = moment.defineLocale('uz', {
+ months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
+ '_'
+ ),
+ monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+ weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
+ weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
+ weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'D MMMM YYYY, dddd HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бугун соат] LT [да]',
+ nextDay: '[Эртага] LT [да]',
+ nextWeek: 'dddd [куни соат] LT [да]',
+ lastDay: '[Кеча соат] LT [да]',
+ lastWeek: '[Утган] dddd [куни соат] LT [да]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'Якин %s ичида',
+ past: 'Бир неча %s олдин',
+ s: 'фурсат',
+ ss: '%d фурсат',
+ m: 'бир дакика',
+ mm: '%d дакика',
+ h: 'бир соат',
+ hh: '%d соат',
+ d: 'бир кун',
+ dd: '%d кун',
+ M: 'бир ой',
+ MM: '%d ой',
+ y: 'бир йил',
+ yy: '%d йил',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return uz;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/vi.js b/vendor/assets/javascripts/momentjs/locale/vi.js
new file mode 100644
index 000000000..fb6b4b40b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/vi.js
@@ -0,0 +1,91 @@
+//! moment.js locale configuration
+//! locale : Vietnamese [vi]
+//! author : Bang Nguyen : https://github.com/bangnk
+//! author : Chien Kira : https://github.com/chienkira
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var vi = moment.defineLocale('vi', {
+ months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
+ '_'
+ ),
+ weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysParseExact: true,
+ meridiemParse: /sa|ch/i,
+ isPM: function (input) {
+ return /^ch$/i.test(input);
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'sa' : 'SA';
+ } else {
+ return isLower ? 'ch' : 'CH';
+ }
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [năm] YYYY',
+ LLL: 'D MMMM [năm] YYYY HH:mm',
+ LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
+ l: 'DD/M/YYYY',
+ ll: 'D MMM YYYY',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd, D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hôm nay lúc] LT',
+ nextDay: '[Ngày mai lúc] LT',
+ nextWeek: 'dddd [tuần tới lúc] LT',
+ lastDay: '[Hôm qua lúc] LT',
+ lastWeek: 'dddd [tuần trước lúc] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s tới',
+ past: '%s trước',
+ s: 'vài giây',
+ ss: '%d giây',
+ m: 'một phút',
+ mm: '%d phút',
+ h: 'một giờ',
+ hh: '%d giờ',
+ d: 'một ngày',
+ dd: '%d ngày',
+ w: 'một tuần',
+ ww: '%d tuần',
+ M: 'một tháng',
+ MM: '%d tháng',
+ y: 'một năm',
+ yy: '%d năm',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return vi;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/x-pseudo.js b/vendor/assets/javascripts/momentjs/locale/x-pseudo.js
new file mode 100644
index 000000000..f67a2bfb8
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/x-pseudo.js
@@ -0,0 +1,84 @@
+//! moment.js locale configuration
+//! locale : Pseudo [x-pseudo]
+//! author : Andrew Hood : https://github.com/andrewhood125
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var xPseudo = moment.defineLocale('x-pseudo', {
+ months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
+ '_'
+ ),
+ monthsShort:
+ 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
+ '_'
+ ),
+ weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
+ weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[T~ódá~ý át] LT',
+ nextDay: '[T~ómó~rró~w át] LT',
+ nextWeek: 'dddd [át] LT',
+ lastDay: '[Ý~ést~érdá~ý át] LT',
+ lastWeek: '[L~ást] dddd [át] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'í~ñ %s',
+ past: '%s á~gó',
+ s: 'á ~féw ~sécó~ñds',
+ ss: '%d s~écóñ~ds',
+ m: 'á ~míñ~úté',
+ mm: '%d m~íñú~tés',
+ h: 'á~ñ hó~úr',
+ hh: '%d h~óúrs',
+ d: 'á ~dáý',
+ dd: '%d d~áýs',
+ M: 'á ~móñ~th',
+ MM: '%d m~óñt~hs',
+ y: 'á ~ýéár',
+ yy: '%d ý~éárs',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return xPseudo;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/yo.js b/vendor/assets/javascripts/momentjs/locale/yo.js
new file mode 100644
index 000000000..9fe818b58
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/yo.js
@@ -0,0 +1,64 @@
+//! moment.js locale configuration
+//! locale : Yoruba Nigeria [yo]
+//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var yo = moment.defineLocale('yo', {
+ months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
+ '_'
+ ),
+ monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
+ weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
+ weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
+ weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Ònì ni] LT',
+ nextDay: '[Ọ̀la ni] LT',
+ nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
+ lastDay: '[Àna ni] LT',
+ lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ní %s',
+ past: '%s kọjá',
+ s: 'ìsẹjú aayá die',
+ ss: 'aayá %d',
+ m: 'ìsẹjú kan',
+ mm: 'ìsẹjú %d',
+ h: 'wákati kan',
+ hh: 'wákati %d',
+ d: 'ọjọ́ kan',
+ dd: 'ọjọ́ %d',
+ M: 'osù kan',
+ MM: 'osù %d',
+ y: 'ọdún kan',
+ yy: 'ọdún %d',
+ },
+ dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
+ ordinal: 'ọjọ́ %d',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return yo;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/zh-cn.js b/vendor/assets/javascripts/momentjs/locale/zh-cn.js
new file mode 100644
index 000000000..c14ca47ca
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/zh-cn.js
@@ -0,0 +1,131 @@
+//! moment.js locale configuration
+//! locale : Chinese (China) [zh-cn]
+//! author : suupic : https://github.com/suupic
+//! author : Zeno Zeng : https://github.com/zenozeng
+//! author : uu109 : https://github.com/uu109
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var zhCn = moment.defineLocale('zh-cn', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日Ah点mm分',
+ LLLL: 'YYYY年M月D日ddddAh点mm分',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ } else {
+ // '中午'
+ return hour >= 11 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天]LT',
+ nextDay: '[明天]LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ return '[下]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
+ lastDay: '[昨天]LT',
+ lastWeek: function (now) {
+ if (this.week() !== now.week()) {
+ return '[上]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '周';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s后',
+ past: '%s前',
+ s: '几秒',
+ ss: '%d 秒',
+ m: '1 分钟',
+ mm: '%d 分钟',
+ h: '1 小时',
+ hh: '%d 小时',
+ d: '1 天',
+ dd: '%d 天',
+ w: '1 周',
+ ww: '%d 周',
+ M: '1 个月',
+ MM: '%d 个月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ week: {
+ // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ return zhCn;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/zh-hk.js b/vendor/assets/javascripts/momentjs/locale/zh-hk.js
new file mode 100644
index 000000000..de900fd15
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/zh-hk.js
@@ -0,0 +1,112 @@
+//! moment.js locale configuration
+//! locale : Chinese (Hong Kong) [zh-hk]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
+//! author : Konstantin : https://github.com/skfd
+//! author : Anthony : https://github.com/anthonylau
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var zhHk = moment.defineLocale('zh-hk', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1200) {
+ return '上午';
+ } else if (hm === 1200) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天]LT',
+ nextDay: '[明天]LT',
+ nextWeek: '[下]ddddLT',
+ lastDay: '[昨天]LT',
+ lastWeek: '[上]ddddLT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ });
+
+ return zhHk;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/zh-mo.js b/vendor/assets/javascripts/momentjs/locale/zh-mo.js
new file mode 100644
index 000000000..b32feab01
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/zh-mo.js
@@ -0,0 +1,111 @@
+//! moment.js locale configuration
+//! locale : Chinese (Macau) [zh-mo]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
+//! author : Tan Yuanhong : https://github.com/le0tan
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var zhMo = moment.defineLocale('zh-mo', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'D/M/YYYY',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天] LT',
+ nextDay: '[明天] LT',
+ nextWeek: '[下]dddd LT',
+ lastDay: '[昨天] LT',
+ lastWeek: '[上]dddd LT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s內',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ });
+
+ return zhMo;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/locale/zh-tw.js b/vendor/assets/javascripts/momentjs/locale/zh-tw.js
new file mode 100644
index 000000000..4f80ecec9
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/locale/zh-tw.js
@@ -0,0 +1,110 @@
+//! moment.js locale configuration
+//! locale : Chinese (Taiwan) [zh-tw]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ var zhTw = moment.defineLocale('zh-tw', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天] LT',
+ nextDay: '[明天] LT',
+ nextWeek: '[下]dddd LT',
+ lastDay: '[昨天] LT',
+ lastWeek: '[上]dddd LT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ });
+
+ return zhTw;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/min/locales.js b/vendor/assets/javascripts/momentjs/min/locales.js
new file mode 100644
index 000000000..b4d302c05
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/min/locales.js
@@ -0,0 +1,12570 @@
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('af', {
+ months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
+ weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
+ '_'
+ ),
+ weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
+ weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
+ meridiemParse: /vm|nm/i,
+ isPM: function (input) {
+ return /^nm$/i.test(input);
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'vm' : 'VM';
+ } else {
+ return isLower ? 'nm' : 'NM';
+ }
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Vandag om] LT',
+ nextDay: '[Môre om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[Gister om] LT',
+ lastWeek: '[Laas] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'oor %s',
+ past: '%s gelede',
+ s: "'n paar sekondes",
+ ss: '%d sekondes',
+ m: "'n minuut",
+ mm: '%d minute',
+ h: "'n uur",
+ hh: '%d ure',
+ d: "'n dag",
+ dd: '%d dae',
+ M: "'n maand",
+ MM: '%d maande',
+ y: "'n jaar",
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ ); // Thanks to Joris Röling : https://github.com/jjupiter
+ },
+ week: {
+ dow: 1, // Maandag is die eerste dag van die week.
+ doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months = [
+ 'جانفي',
+ 'فيفري',
+ 'مارس',
+ 'أفريل',
+ 'ماي',
+ 'جوان',
+ 'جويلية',
+ 'أوت',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+ moment.defineLocale('ar-dz', {
+ months: months,
+ monthsShort: months,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ar-kw', {
+ months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '1',
+ 2: '2',
+ 3: '3',
+ 4: '4',
+ 5: '5',
+ 6: '6',
+ 7: '7',
+ 8: '8',
+ 9: '9',
+ 0: '0',
+ },
+ pluralForm$1 = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals$1 = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize$1 = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm$1(number),
+ str = plurals$1[u][pluralForm$1(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months$1 = [
+ 'يناير',
+ 'فبراير',
+ 'مارس',
+ 'أبريل',
+ 'مايو',
+ 'يونيو',
+ 'يوليو',
+ 'أغسطس',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+ moment.defineLocale('ar-ly', {
+ months: months$1,
+ monthsShort: months$1,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize$1('s'),
+ ss: pluralize$1('s'),
+ m: pluralize$1('m'),
+ mm: pluralize$1('m'),
+ h: pluralize$1('h'),
+ hh: pluralize$1('h'),
+ d: pluralize$1('d'),
+ dd: pluralize$1('d'),
+ M: pluralize$1('M'),
+ MM: pluralize$1('M'),
+ y: pluralize$1('y'),
+ yy: pluralize$1('y'),
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ar-ma', {
+ months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$1 = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ };
+
+ moment.defineLocale('ar-sa', {
+ months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap$1[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ar-tn', {
+ months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$2 = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap$1 = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ },
+ pluralForm$2 = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals$2 = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize$2 = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm$2(number),
+ str = plurals$2[u][pluralForm$2(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months$2 = [
+ 'يناير',
+ 'فبراير',
+ 'مارس',
+ 'أبريل',
+ 'مايو',
+ 'يونيو',
+ 'يوليو',
+ 'أغسطس',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+ moment.defineLocale('ar', {
+ months: months$2,
+ monthsShort: months$2,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize$2('s'),
+ ss: pluralize$2('s'),
+ m: pluralize$2('m'),
+ mm: pluralize$2('m'),
+ h: pluralize$2('h'),
+ hh: pluralize$2('h'),
+ d: pluralize$2('d'),
+ dd: pluralize$2('d'),
+ M: pluralize$2('M'),
+ MM: pluralize$2('M'),
+ y: pluralize$2('y'),
+ yy: pluralize$2('y'),
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap$1[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap$2[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes = {
+ 1: '-inci',
+ 5: '-inci',
+ 8: '-inci',
+ 70: '-inci',
+ 80: '-inci',
+ 2: '-nci',
+ 7: '-nci',
+ 20: '-nci',
+ 50: '-nci',
+ 3: '-üncü',
+ 4: '-üncü',
+ 100: '-üncü',
+ 6: '-ncı',
+ 9: '-uncu',
+ 10: '-uncu',
+ 30: '-uncu',
+ 60: '-ıncı',
+ 90: '-ıncı',
+ };
+
+ moment.defineLocale('az', {
+ months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
+ weekdays:
+ 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
+ '_'
+ ),
+ weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
+ weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün saat] LT',
+ nextDay: '[sabah saat] LT',
+ nextWeek: '[gələn həftə] dddd [saat] LT',
+ lastDay: '[dünən] LT',
+ lastWeek: '[keçən həftə] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s sonra',
+ past: '%s əvvəl',
+ s: 'bir neçə saniyə',
+ ss: '%d saniyə',
+ m: 'bir dəqiqə',
+ mm: '%d dəqiqə',
+ h: 'bir saat',
+ hh: '%d saat',
+ d: 'bir gün',
+ dd: '%d gün',
+ M: 'bir ay',
+ MM: '%d ay',
+ y: 'bir il',
+ yy: '%d il',
+ },
+ meridiemParse: /gecə|səhər|gündüz|axşam/,
+ isPM: function (input) {
+ return /^(gündüz|axşam)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'gecə';
+ } else if (hour < 12) {
+ return 'səhər';
+ } else if (hour < 17) {
+ return 'gündüz';
+ } else {
+ return 'axşam';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
+ ordinal: function (number) {
+ if (number === 0) {
+ // special case for zero
+ return number + '-ıncı';
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+ }
+ function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
+ mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
+ hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
+ dd: 'дзень_дні_дзён',
+ MM: 'месяц_месяцы_месяцаў',
+ yy: 'год_гады_гадоў',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'хвіліна' : 'хвіліну';
+ } else if (key === 'h') {
+ return withoutSuffix ? 'гадзіна' : 'гадзіну';
+ } else {
+ return number + ' ' + plural(format[key], +number);
+ }
+ }
+
+ moment.defineLocale('be', {
+ months: {
+ format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
+ '_'
+ ),
+ standalone:
+ 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
+ weekdays: {
+ format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
+ '_'
+ ),
+ standalone:
+ 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
+ '_'
+ ),
+ isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
+ },
+ weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+ weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY г.',
+ LLL: 'D MMMM YYYY г., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY г., HH:mm',
+ },
+ calendar: {
+ sameDay: '[Сёння ў] LT',
+ nextDay: '[Заўтра ў] LT',
+ lastDay: '[Учора ў] LT',
+ nextWeek: function () {
+ return '[У] dddd [ў] LT';
+ },
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 5:
+ case 6:
+ return '[У мінулую] dddd [ў] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[У мінулы] dddd [ў] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'праз %s',
+ past: '%s таму',
+ s: 'некалькі секунд',
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: relativeTimeWithPlural,
+ hh: relativeTimeWithPlural,
+ d: 'дзень',
+ dd: relativeTimeWithPlural,
+ M: 'месяц',
+ MM: relativeTimeWithPlural,
+ y: 'год',
+ yy: relativeTimeWithPlural,
+ },
+ meridiemParse: /ночы|раніцы|дня|вечара/,
+ isPM: function (input) {
+ return /^(дня|вечара)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночы';
+ } else if (hour < 12) {
+ return 'раніцы';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечара';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ case 'w':
+ case 'W':
+ return (number % 10 === 2 || number % 10 === 3) &&
+ number % 100 !== 12 &&
+ number % 100 !== 13
+ ? number + '-і'
+ : number + '-ы';
+ case 'D':
+ return number + '-га';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('bg', {
+ months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
+ '_'
+ ),
+ monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
+ '_'
+ ),
+ weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
+ weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Днес в] LT',
+ nextDay: '[Утре в] LT',
+ nextWeek: 'dddd [в] LT',
+ lastDay: '[Вчера в] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 6:
+ return '[Миналата] dddd [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[Миналия] dddd [в] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'след %s',
+ past: 'преди %s',
+ s: 'няколко секунди',
+ ss: '%d секунди',
+ m: 'минута',
+ mm: '%d минути',
+ h: 'час',
+ hh: '%d часа',
+ d: 'ден',
+ dd: '%d дена',
+ w: 'седмица',
+ ww: '%d седмици',
+ M: 'месец',
+ MM: '%d месеца',
+ y: 'година',
+ yy: '%d години',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+ ordinal: function (number) {
+ var lastDigit = number % 10,
+ last2Digits = number % 100;
+ if (number === 0) {
+ return number + '-ев';
+ } else if (last2Digits === 0) {
+ return number + '-ен';
+ } else if (last2Digits > 10 && last2Digits < 20) {
+ return number + '-ти';
+ } else if (lastDigit === 1) {
+ return number + '-ви';
+ } else if (lastDigit === 2) {
+ return number + '-ри';
+ } else if (lastDigit === 7 || lastDigit === 8) {
+ return number + '-ми';
+ } else {
+ return number + '-ти';
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('bm', {
+ months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
+ '_'
+ ),
+ monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
+ weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
+ weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
+ weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'MMMM [tile] D [san] YYYY',
+ LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
+ LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
+ },
+ calendar: {
+ sameDay: '[Bi lɛrɛ] LT',
+ nextDay: '[Sini lɛrɛ] LT',
+ nextWeek: 'dddd [don lɛrɛ] LT',
+ lastDay: '[Kunu lɛrɛ] LT',
+ lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s kɔnɔ',
+ past: 'a bɛ %s bɔ',
+ s: 'sanga dama dama',
+ ss: 'sekondi %d',
+ m: 'miniti kelen',
+ mm: 'miniti %d',
+ h: 'lɛrɛ kelen',
+ hh: 'lɛrɛ %d',
+ d: 'tile kelen',
+ dd: 'tile %d',
+ M: 'kalo kelen',
+ MM: 'kalo %d',
+ y: 'san kelen',
+ yy: 'san %d',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$3 = {
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
+ },
+ numberMap$2 = {
+ '১': '1',
+ '২': '2',
+ '৩': '3',
+ '৪': '4',
+ '৫': '5',
+ '৬': '6',
+ '৭': '7',
+ '৮': '8',
+ '৯': '9',
+ '০': '0',
+ };
+
+ moment.defineLocale('bn-bd', {
+ months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
+ '_'
+ ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
+ weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
+ '_'
+ ),
+ weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+ weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm সময়',
+ LTS: 'A h:mm:ss সময়',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm সময়',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
+ },
+ calendar: {
+ sameDay: '[আজ] LT',
+ nextDay: '[আগামীকাল] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[গতকাল] LT',
+ lastWeek: '[গত] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s পরে',
+ past: '%s আগে',
+ s: 'কয়েক সেকেন্ড',
+ ss: '%d সেকেন্ড',
+ m: 'এক মিনিট',
+ mm: '%d মিনিট',
+ h: 'এক ঘন্টা',
+ hh: '%d ঘন্টা',
+ d: 'এক দিন',
+ dd: '%d দিন',
+ M: 'এক মাস',
+ MM: '%d মাস',
+ y: 'এক বছর',
+ yy: '%d বছর',
+ },
+ preparse: function (string) {
+ return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+ return numberMap$2[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$3[match];
+ });
+ },
+
+ meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'রাত') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ভোর') {
+ return hour;
+ } else if (meridiem === 'সকাল') {
+ return hour;
+ } else if (meridiem === 'দুপুর') {
+ return hour >= 3 ? hour : hour + 12;
+ } else if (meridiem === 'বিকাল') {
+ return hour + 12;
+ } else if (meridiem === 'সন্ধ্যা') {
+ return hour + 12;
+ }
+ },
+
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'রাত';
+ } else if (hour < 6) {
+ return 'ভোর';
+ } else if (hour < 12) {
+ return 'সকাল';
+ } else if (hour < 15) {
+ return 'দুপুর';
+ } else if (hour < 18) {
+ return 'বিকাল';
+ } else if (hour < 20) {
+ return 'সন্ধ্যা';
+ } else {
+ return 'রাত';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$4 = {
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
+ },
+ numberMap$3 = {
+ '১': '1',
+ '২': '2',
+ '৩': '3',
+ '৪': '4',
+ '৫': '5',
+ '৬': '6',
+ '৭': '7',
+ '৮': '8',
+ '৯': '9',
+ '০': '0',
+ };
+
+ moment.defineLocale('bn', {
+ months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
+ '_'
+ ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
+ weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
+ '_'
+ ),
+ weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+ weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm সময়',
+ LTS: 'A h:mm:ss সময়',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm সময়',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
+ },
+ calendar: {
+ sameDay: '[আজ] LT',
+ nextDay: '[আগামীকাল] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[গতকাল] LT',
+ lastWeek: '[গত] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s পরে',
+ past: '%s আগে',
+ s: 'কয়েক সেকেন্ড',
+ ss: '%d সেকেন্ড',
+ m: 'এক মিনিট',
+ mm: '%d মিনিট',
+ h: 'এক ঘন্টা',
+ hh: '%d ঘন্টা',
+ d: 'এক দিন',
+ dd: '%d দিন',
+ M: 'এক মাস',
+ MM: '%d মাস',
+ y: 'এক বছর',
+ yy: '%d বছর',
+ },
+ preparse: function (string) {
+ return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+ return numberMap$3[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$4[match];
+ });
+ },
+ meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'রাত' && hour >= 4) ||
+ (meridiem === 'দুপুর' && hour < 5) ||
+ meridiem === 'বিকাল'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'রাত';
+ } else if (hour < 10) {
+ return 'সকাল';
+ } else if (hour < 17) {
+ return 'দুপুর';
+ } else if (hour < 20) {
+ return 'বিকাল';
+ } else {
+ return 'রাত';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$5 = {
+ 1: '༡',
+ 2: '༢',
+ 3: '༣',
+ 4: '༤',
+ 5: '༥',
+ 6: '༦',
+ 7: '༧',
+ 8: '༨',
+ 9: '༩',
+ 0: '༠',
+ },
+ numberMap$4 = {
+ '༡': '1',
+ '༢': '2',
+ '༣': '3',
+ '༤': '4',
+ '༥': '5',
+ '༦': '6',
+ '༧': '7',
+ '༨': '8',
+ '༩': '9',
+ '༠': '0',
+ };
+
+ moment.defineLocale('bo', {
+ months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
+ '_'
+ ),
+ monthsShortRegex: /^(ཟླ་\d{1,2})/,
+ monthsParseExact: true,
+ weekdays:
+ 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
+ '_'
+ ),
+ weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
+ '_'
+ ),
+ weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[དི་རིང] LT',
+ nextDay: '[སང་ཉིན] LT',
+ nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
+ lastDay: '[ཁ་སང] LT',
+ lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ལ་',
+ past: '%s སྔན་ལ',
+ s: 'ལམ་སང',
+ ss: '%d སྐར་ཆ།',
+ m: 'སྐར་མ་གཅིག',
+ mm: '%d སྐར་མ',
+ h: 'ཆུ་ཚོད་གཅིག',
+ hh: '%d ཆུ་ཚོད',
+ d: 'ཉིན་གཅིག',
+ dd: '%d ཉིན་',
+ M: 'ཟླ་བ་གཅིག',
+ MM: '%d ཟླ་བ',
+ y: 'ལོ་གཅིག',
+ yy: '%d ལོ',
+ },
+ preparse: function (string) {
+ return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
+ return numberMap$4[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$5[match];
+ });
+ },
+ meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'མཚན་མོ' && hour >= 4) ||
+ (meridiem === 'ཉིན་གུང' && hour < 5) ||
+ meridiem === 'དགོང་དག'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'མཚན་མོ';
+ } else if (hour < 10) {
+ return 'ཞོགས་ཀས';
+ } else if (hour < 17) {
+ return 'ཉིན་གུང';
+ } else if (hour < 20) {
+ return 'དགོང་དག';
+ } else {
+ return 'མཚན་མོ';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function relativeTimeWithMutation(number, withoutSuffix, key) {
+ var format = {
+ mm: 'munutenn',
+ MM: 'miz',
+ dd: 'devezh',
+ };
+ return number + ' ' + mutation(format[key], number);
+ }
+ function specialMutationForYears(number) {
+ switch (lastNumber(number)) {
+ case 1:
+ case 3:
+ case 4:
+ case 5:
+ case 9:
+ return number + ' bloaz';
+ default:
+ return number + ' vloaz';
+ }
+ }
+ function lastNumber(number) {
+ if (number > 9) {
+ return lastNumber(number % 10);
+ }
+ return number;
+ }
+ function mutation(text, number) {
+ if (number === 2) {
+ return softMutation(text);
+ }
+ return text;
+ }
+ function softMutation(text) {
+ var mutationTable = {
+ m: 'v',
+ b: 'v',
+ d: 'z',
+ };
+ if (mutationTable[text.charAt(0)] === undefined) {
+ return text;
+ }
+ return mutationTable[text.charAt(0)] + text.substring(1);
+ }
+
+ var monthsParse = [
+ /^gen/i,
+ /^c[ʼ\']hwe/i,
+ /^meu/i,
+ /^ebr/i,
+ /^mae/i,
+ /^(mez|eve)/i,
+ /^gou/i,
+ /^eos/i,
+ /^gwe/i,
+ /^her/i,
+ /^du/i,
+ /^ker/i,
+ ],
+ monthsRegex =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ monthsStrictRegex =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
+ monthsShortStrictRegex =
+ /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ fullWeekdaysParse = [
+ /^sul/i,
+ /^lun/i,
+ /^meurzh/i,
+ /^merc[ʼ\']her/i,
+ /^yaou/i,
+ /^gwener/i,
+ /^sadorn/i,
+ ],
+ shortWeekdaysParse = [
+ /^Sul/i,
+ /^Lun/i,
+ /^Meu/i,
+ /^Mer/i,
+ /^Yao/i,
+ /^Gwe/i,
+ /^Sad/i,
+ ],
+ minWeekdaysParse = [
+ /^Su/i,
+ /^Lu/i,
+ /^Me([^r]|$)/i,
+ /^Mer/i,
+ /^Ya/i,
+ /^Gw/i,
+ /^Sa/i,
+ ];
+
+ moment.defineLocale('br', {
+ months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
+ '_'
+ ),
+ monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
+ weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
+ weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
+ weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
+ weekdaysParse: minWeekdaysParse,
+ fullWeekdaysParse: fullWeekdaysParse,
+ shortWeekdaysParse: shortWeekdaysParse,
+ minWeekdaysParse: minWeekdaysParse,
+
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex: monthsStrictRegex,
+ monthsShortStrictRegex: monthsShortStrictRegex,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [a viz] MMMM YYYY',
+ LLL: 'D [a viz] MMMM YYYY HH:mm',
+ LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hiziv da] LT',
+ nextDay: '[Warcʼhoazh da] LT',
+ nextWeek: 'dddd [da] LT',
+ lastDay: '[Decʼh da] LT',
+ lastWeek: 'dddd [paset da] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'a-benn %s',
+ past: '%s ʼzo',
+ s: 'un nebeud segondennoù',
+ ss: '%d eilenn',
+ m: 'ur vunutenn',
+ mm: relativeTimeWithMutation,
+ h: 'un eur',
+ hh: '%d eur',
+ d: 'un devezh',
+ dd: relativeTimeWithMutation,
+ M: 'ur miz',
+ MM: relativeTimeWithMutation,
+ y: 'ur bloaz',
+ yy: specialMutationForYears,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'añ' : 'vet';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
+ isPM: function (token) {
+ return token === 'g.m.';
+ },
+ meridiem: function (hour, minute, isLower) {
+ return hour < 12 ? 'a.m.' : 'g.m.';
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function translate(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ if (number === 1) {
+ result += 'sekunda';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sekunde';
+ } else {
+ result += 'sekundi';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
+ }
+ }
+
+ moment.defineLocale('bs', {
+ months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[jučer u] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ return '[prošlu] dddd [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'par sekundi',
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: 'dan',
+ dd: translate,
+ M: 'mjesec',
+ MM: translate,
+ y: 'godinu',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ca', {
+ months: {
+ standalone:
+ 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
+ '_'
+ ),
+ format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\s)+MMMM/,
+ },
+ monthsShort:
+ 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
+ '_'
+ ),
+ weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
+ weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [de] YYYY',
+ ll: 'D MMM YYYY',
+ LLL: 'D MMMM [de] YYYY [a les] H:mm',
+ lll: 'D MMM YYYY, H:mm',
+ LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
+ llll: 'ddd D MMM YYYY, H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ nextDay: function () {
+ return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ lastDay: function () {
+ return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [passat a ' +
+ (this.hours() !== 1 ? 'les' : 'la') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: "d'aquí %s",
+ past: 'fa %s',
+ s: 'uns segons',
+ ss: '%d segons',
+ m: 'un minut',
+ mm: '%d minuts',
+ h: 'una hora',
+ hh: '%d hores',
+ d: 'un dia',
+ dd: '%d dies',
+ M: 'un mes',
+ MM: '%d mesos',
+ y: 'un any',
+ yy: '%d anys',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
+ ordinal: function (number, period) {
+ var output =
+ number === 1
+ ? 'r'
+ : number === 2
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
+ if (period === 'w' || period === 'W') {
+ output = 'a';
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$3 = {
+ format: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
+ '_'
+ ),
+ standalone:
+ 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(
+ '_'
+ ),
+ },
+ monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
+ monthsParse$1 = [
+ /^led/i,
+ /^úno/i,
+ /^bře/i,
+ /^dub/i,
+ /^kvě/i,
+ /^(čvn|červen$|června)/i,
+ /^(čvc|červenec|července)/i,
+ /^srp/i,
+ /^zář/i,
+ /^říj/i,
+ /^lis/i,
+ /^pro/i,
+ ],
+ // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
+ // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
+ monthsRegex$1 =
+ /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
+
+ function plural$1(n) {
+ return n > 1 && n < 5 && ~~(n / 10) !== 1;
+ }
+ function translate$1(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
+ case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'sekundy' : 'sekund');
+ } else {
+ return result + 'sekundami';
+ }
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'minuty' : 'minut');
+ } else {
+ return result + 'minutami';
+ }
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'hodiny' : 'hodin');
+ } else {
+ return result + 'hodinami';
+ }
+ case 'd': // a day / in a day / a day ago
+ return withoutSuffix || isFuture ? 'den' : 'dnem';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'dny' : 'dní');
+ } else {
+ return result + 'dny';
+ }
+ case 'M': // a month / in a month / a month ago
+ return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'měsíce' : 'měsíců');
+ } else {
+ return result + 'měsíci';
+ }
+ case 'y': // a year / in a year / a year ago
+ return withoutSuffix || isFuture ? 'rok' : 'rokem';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'roky' : 'let');
+ } else {
+ return result + 'lety';
+ }
+ }
+ }
+
+ moment.defineLocale('cs', {
+ months: months$3,
+ monthsShort: monthsShort,
+ monthsRegex: monthsRegex$1,
+ monthsShortRegex: monthsRegex$1,
+ // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
+ // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
+ monthsStrictRegex:
+ /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
+ monthsShortStrictRegex:
+ /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
+ monthsParse: monthsParse$1,
+ longMonthsParse: monthsParse$1,
+ shortMonthsParse: monthsParse$1,
+ weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
+ weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
+ weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd D. MMMM YYYY H:mm',
+ l: 'D. M. YYYY',
+ },
+ calendar: {
+ sameDay: '[dnes v] LT',
+ nextDay: '[zítra v] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v neděli v] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [v] LT';
+ case 3:
+ return '[ve středu v] LT';
+ case 4:
+ return '[ve čtvrtek v] LT';
+ case 5:
+ return '[v pátek v] LT';
+ case 6:
+ return '[v sobotu v] LT';
+ }
+ },
+ lastDay: '[včera v] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[minulou neděli v] LT';
+ case 1:
+ case 2:
+ return '[minulé] dddd [v] LT';
+ case 3:
+ return '[minulou středu v] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [v] LT';
+ case 6:
+ return '[minulou sobotu v] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'před %s',
+ s: translate$1,
+ ss: translate$1,
+ m: translate$1,
+ mm: translate$1,
+ h: translate$1,
+ hh: translate$1,
+ d: translate$1,
+ dd: translate$1,
+ M: translate$1,
+ MM: translate$1,
+ y: translate$1,
+ yy: translate$1,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('cv', {
+ months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
+ '_'
+ ),
+ monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
+ weekdays:
+ 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
+ '_'
+ ),
+ weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
+ weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
+ LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+ LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+ },
+ calendar: {
+ sameDay: '[Паян] LT [сехетре]',
+ nextDay: '[Ыран] LT [сехетре]',
+ lastDay: '[Ӗнер] LT [сехетре]',
+ nextWeek: '[Ҫитес] dddd LT [сехетре]',
+ lastWeek: '[Иртнӗ] dddd LT [сехетре]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (output) {
+ var affix = /сехет$/i.exec(output)
+ ? 'рен'
+ : /ҫул$/i.exec(output)
+ ? 'тан'
+ : 'ран';
+ return output + affix;
+ },
+ past: '%s каялла',
+ s: 'пӗр-ик ҫеккунт',
+ ss: '%d ҫеккунт',
+ m: 'пӗр минут',
+ mm: '%d минут',
+ h: 'пӗр сехет',
+ hh: '%d сехет',
+ d: 'пӗр кун',
+ dd: '%d кун',
+ M: 'пӗр уйӑх',
+ MM: '%d уйӑх',
+ y: 'пӗр ҫул',
+ yy: '%d ҫул',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
+ ordinal: '%d-мӗш',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('cy', {
+ months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
+ '_'
+ ),
+ monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
+ '_'
+ ),
+ weekdays:
+ 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
+ weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
+ weekdaysParseExact: true,
+ // time formats are the same as en-gb
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Heddiw am] LT',
+ nextDay: '[Yfory am] LT',
+ nextWeek: 'dddd [am] LT',
+ lastDay: '[Ddoe am] LT',
+ lastWeek: 'dddd [diwethaf am] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'mewn %s',
+ past: '%s yn ôl',
+ s: 'ychydig eiliadau',
+ ss: '%d eiliad',
+ m: 'munud',
+ mm: '%d munud',
+ h: 'awr',
+ hh: '%d awr',
+ d: 'diwrnod',
+ dd: '%d diwrnod',
+ M: 'mis',
+ MM: '%d mis',
+ y: 'blwyddyn',
+ yy: '%d flynedd',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
+ // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
+ ordinal: function (number) {
+ var b = number,
+ output = '',
+ lookup = [
+ '',
+ 'af',
+ 'il',
+ 'ydd',
+ 'ydd',
+ 'ed',
+ 'ed',
+ 'ed',
+ 'fed',
+ 'fed',
+ 'fed', // 1af to 10fed
+ 'eg',
+ 'fed',
+ 'eg',
+ 'eg',
+ 'fed',
+ 'eg',
+ 'eg',
+ 'fed',
+ 'eg',
+ 'fed', // 11eg to 20fed
+ ];
+ if (b > 20) {
+ if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
+ output = 'fed'; // not 30ain, 70ain or 90ain
+ } else {
+ output = 'ain';
+ }
+ } else if (b > 0) {
+ output = lookup[b];
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('da', {
+ months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
+ weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i dag kl.] LT',
+ nextDay: '[i morgen kl.] LT',
+ nextWeek: 'på dddd [kl.] LT',
+ lastDay: '[i går kl.] LT',
+ lastWeek: '[i] dddd[s kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s siden',
+ s: 'få sekunder',
+ ss: '%d sekunder',
+ m: 'et minut',
+ mm: '%d minutter',
+ h: 'en time',
+ hh: '%d timer',
+ d: 'en dag',
+ dd: '%d dage',
+ M: 'en måned',
+ MM: '%d måneder',
+ y: 'et år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+
+ moment.defineLocale('de-at', {
+ months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime,
+ mm: '%d Minuten',
+ h: processRelativeTime,
+ hh: '%d Stunden',
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$1(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+
+ moment.defineLocale('de-ch', {
+ months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime$1,
+ mm: '%d Minuten',
+ h: processRelativeTime$1,
+ hh: '%d Stunden',
+ d: processRelativeTime$1,
+ dd: processRelativeTime$1,
+ w: processRelativeTime$1,
+ ww: '%d Wochen',
+ M: processRelativeTime$1,
+ MM: processRelativeTime$1,
+ y: processRelativeTime$1,
+ yy: processRelativeTime$1,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$2(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+
+ moment.defineLocale('de', {
+ months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime$2,
+ mm: '%d Minuten',
+ h: processRelativeTime$2,
+ hh: '%d Stunden',
+ d: processRelativeTime$2,
+ dd: processRelativeTime$2,
+ w: processRelativeTime$2,
+ ww: '%d Wochen',
+ M: processRelativeTime$2,
+ MM: processRelativeTime$2,
+ y: processRelativeTime$2,
+ yy: processRelativeTime$2,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$4 = [
+ 'ޖެނުއަރީ',
+ 'ފެބްރުއަރީ',
+ 'މާރިޗު',
+ 'އޭޕްރީލު',
+ 'މޭ',
+ 'ޖޫން',
+ 'ޖުލައި',
+ 'އޯގަސްޓު',
+ 'ސެޕްޓެމްބަރު',
+ 'އޮކްޓޯބަރު',
+ 'ނޮވެމްބަރު',
+ 'ޑިސެމްބަރު',
+ ],
+ weekdays = [
+ 'އާދިއްތަ',
+ 'ހޯމަ',
+ 'އަންގާރަ',
+ 'ބުދަ',
+ 'ބުރާސްފަތި',
+ 'ހުކުރު',
+ 'ހޮނިހިރު',
+ ];
+
+ moment.defineLocale('dv', {
+ months: months$4,
+ monthsShort: months$4,
+ weekdays: weekdays,
+ weekdaysShort: weekdays,
+ weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/M/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /މކ|މފ/,
+ isPM: function (input) {
+ return 'މފ' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'މކ';
+ } else {
+ return 'މފ';
+ }
+ },
+ calendar: {
+ sameDay: '[މިއަދު] LT',
+ nextDay: '[މާދަމާ] LT',
+ nextWeek: 'dddd LT',
+ lastDay: '[އިއްޔެ] LT',
+ lastWeek: '[ފާއިތުވި] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ތެރޭގައި %s',
+ past: 'ކުރިން %s',
+ s: 'ސިކުންތުކޮޅެއް',
+ ss: 'd% ސިކުންތު',
+ m: 'މިނިޓެއް',
+ mm: 'މިނިޓު %d',
+ h: 'ގަޑިއިރެއް',
+ hh: 'ގަޑިއިރު %d',
+ d: 'ދުވަހެއް',
+ dd: 'ދުވަސް %d',
+ M: 'މަހެއް',
+ MM: 'މަސް %d',
+ y: 'އަހަރެއް',
+ yy: 'އަހަރު %d',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 7, // Sunday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function isFunction(input) {
+ return (
+ (typeof Function !== 'undefined' && input instanceof Function) ||
+ Object.prototype.toString.call(input) === '[object Function]'
+ );
+ }
+
+ moment.defineLocale('el', {
+ monthsNominativeEl:
+ 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
+ '_'
+ ),
+ monthsGenitiveEl:
+ 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
+ '_'
+ ),
+ months: function (momentToFormat, format) {
+ if (!momentToFormat) {
+ return this._monthsNominativeEl;
+ } else if (
+ typeof format === 'string' &&
+ /D/.test(format.substring(0, format.indexOf('MMMM')))
+ ) {
+ // if there is a day number before 'MMMM'
+ return this._monthsGenitiveEl[momentToFormat.month()];
+ } else {
+ return this._monthsNominativeEl[momentToFormat.month()];
+ }
+ },
+ monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
+ weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
+ '_'
+ ),
+ weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
+ weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'μμ' : 'ΜΜ';
+ } else {
+ return isLower ? 'πμ' : 'ΠΜ';
+ }
+ },
+ isPM: function (input) {
+ return (input + '').toLowerCase()[0] === 'μ';
+ },
+ meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendarEl: {
+ sameDay: '[Σήμερα {}] LT',
+ nextDay: '[Αύριο {}] LT',
+ nextWeek: 'dddd [{}] LT',
+ lastDay: '[Χθες {}] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 6:
+ return '[το προηγούμενο] dddd [{}] LT';
+ default:
+ return '[την προηγούμενη] dddd [{}] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ calendar: function (key, mom) {
+ var output = this._calendarEl[key],
+ hours = mom && mom.hours();
+ if (isFunction(output)) {
+ output = output.apply(mom);
+ }
+ return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
+ },
+ relativeTime: {
+ future: 'σε %s',
+ past: '%s πριν',
+ s: 'λίγα δευτερόλεπτα',
+ ss: '%d δευτερόλεπτα',
+ m: 'ένα λεπτό',
+ mm: '%d λεπτά',
+ h: 'μία ώρα',
+ hh: '%d ώρες',
+ d: 'μία μέρα',
+ dd: '%d μέρες',
+ M: 'ένας μήνας',
+ MM: '%d μήνες',
+ y: 'ένας χρόνος',
+ yy: '%d χρόνια',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}η/,
+ ordinal: '%dη',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4st is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('en-au', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('en-ca', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'YYYY-MM-DD',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY h:mm A',
+ LLLL: 'dddd, MMMM D, YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('en-gb', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('en-ie', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('en-il', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('en-in', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 1st is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('en-nz', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('en-sg', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('eo', {
+ months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
+ weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
+ weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: '[la] D[-an de] MMMM, YYYY',
+ LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
+ LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
+ llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',
+ },
+ meridiemParse: /[ap]\.t\.m/i,
+ isPM: function (input) {
+ return input.charAt(0).toLowerCase() === 'p';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'p.t.m.' : 'P.T.M.';
+ } else {
+ return isLower ? 'a.t.m.' : 'A.T.M.';
+ }
+ },
+ calendar: {
+ sameDay: '[Hodiaŭ je] LT',
+ nextDay: '[Morgaŭ je] LT',
+ nextWeek: 'dddd[n je] LT',
+ lastDay: '[Hieraŭ je] LT',
+ lastWeek: '[pasintan] dddd[n je] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'post %s',
+ past: 'antaŭ %s',
+ s: 'kelkaj sekundoj',
+ ss: '%d sekundoj',
+ m: 'unu minuto',
+ mm: '%d minutoj',
+ h: 'unu horo',
+ hh: '%d horoj',
+ d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
+ dd: '%d tagoj',
+ M: 'unu monato',
+ MM: '%d monatoj',
+ y: 'unu jaro',
+ yy: '%d jaroj',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}a/,
+ ordinal: '%da',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse$2 = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex$2 =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ moment.defineLocale('es-do', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort$1[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex$2,
+ monthsShortRegex: monthsRegex$2,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse$2,
+ longMonthsParse: monthsParse$2,
+ shortMonthsParse: monthsParse$2,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY h:mm A',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortDot$1 =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse$3 = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex$3 =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ moment.defineLocale('es-mx', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot$1;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort$2[m.month()];
+ } else {
+ return monthsShortDot$1[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex$3,
+ monthsShortRegex: monthsRegex$3,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse$3,
+ longMonthsParse: monthsParse$3,
+ shortMonthsParse: monthsParse$3,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ invalidDate: 'Fecha inválida',
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortDot$2 =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse$4 = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex$4 =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ moment.defineLocale('es-us', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot$2;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort$3[m.month()];
+ } else {
+ return monthsShortDot$2[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex$4,
+ monthsShortRegex: monthsRegex$4,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse$4,
+ longMonthsParse: monthsParse$4,
+ shortMonthsParse: monthsParse$4,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'MM/DD/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY h:mm A',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortDot$3 =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort$4 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse$5 = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex$5 =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ moment.defineLocale('es', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot$3;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort$4[m.month()];
+ } else {
+ return monthsShortDot$3[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex$5,
+ monthsShortRegex: monthsRegex$5,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse$5,
+ longMonthsParse: monthsParse$5,
+ shortMonthsParse: monthsParse$5,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ invalidDate: 'Fecha inválida',
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$3(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
+ ss: [number + 'sekundi', number + 'sekundit'],
+ m: ['ühe minuti', 'üks minut'],
+ mm: [number + ' minuti', number + ' minutit'],
+ h: ['ühe tunni', 'tund aega', 'üks tund'],
+ hh: [number + ' tunni', number + ' tundi'],
+ d: ['ühe päeva', 'üks päev'],
+ M: ['kuu aja', 'kuu aega', 'üks kuu'],
+ MM: [number + ' kuu', number + ' kuud'],
+ y: ['ühe aasta', 'aasta', 'üks aasta'],
+ yy: [number + ' aasta', number + ' aastat'],
+ };
+ if (withoutSuffix) {
+ return format[key][2] ? format[key][2] : format[key][1];
+ }
+ return isFuture ? format[key][0] : format[key][1];
+ }
+
+ moment.defineLocale('et', {
+ months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
+ weekdays:
+ 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
+ '_'
+ ),
+ weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
+ weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Täna,] LT',
+ nextDay: '[Homme,] LT',
+ nextWeek: '[Järgmine] dddd LT',
+ lastDay: '[Eile,] LT',
+ lastWeek: '[Eelmine] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s pärast',
+ past: '%s tagasi',
+ s: processRelativeTime$3,
+ ss: processRelativeTime$3,
+ m: processRelativeTime$3,
+ mm: processRelativeTime$3,
+ h: processRelativeTime$3,
+ hh: processRelativeTime$3,
+ d: processRelativeTime$3,
+ dd: '%d päeva',
+ M: processRelativeTime$3,
+ MM: processRelativeTime$3,
+ y: processRelativeTime$3,
+ yy: processRelativeTime$3,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('eu', {
+ months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
+ '_'
+ ),
+ monthsShort:
+ 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
+ '_'
+ ),
+ weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
+ weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY[ko] MMMM[ren] D[a]',
+ LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
+ LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
+ l: 'YYYY-M-D',
+ ll: 'YYYY[ko] MMM D[a]',
+ lll: 'YYYY[ko] MMM D[a] HH:mm',
+ llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',
+ },
+ calendar: {
+ sameDay: '[gaur] LT[etan]',
+ nextDay: '[bihar] LT[etan]',
+ nextWeek: 'dddd LT[etan]',
+ lastDay: '[atzo] LT[etan]',
+ lastWeek: '[aurreko] dddd LT[etan]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s barru',
+ past: 'duela %s',
+ s: 'segundo batzuk',
+ ss: '%d segundo',
+ m: 'minutu bat',
+ mm: '%d minutu',
+ h: 'ordu bat',
+ hh: '%d ordu',
+ d: 'egun bat',
+ dd: '%d egun',
+ M: 'hilabete bat',
+ MM: '%d hilabete',
+ y: 'urte bat',
+ yy: '%d urte',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$6 = {
+ 1: '۱',
+ 2: '۲',
+ 3: '۳',
+ 4: '۴',
+ 5: '۵',
+ 6: '۶',
+ 7: '۷',
+ 8: '۸',
+ 9: '۹',
+ 0: '۰',
+ },
+ numberMap$5 = {
+ '۱': '1',
+ '۲': '2',
+ '۳': '3',
+ '۴': '4',
+ '۵': '5',
+ '۶': '6',
+ '۷': '7',
+ '۸': '8',
+ '۹': '9',
+ '۰': '0',
+ };
+
+ moment.defineLocale('fa', {
+ months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
+ '_'
+ ),
+ weekdays:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
+ weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /قبل از ظهر|بعد از ظهر/,
+ isPM: function (input) {
+ return /بعد از ظهر/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'قبل از ظهر';
+ } else {
+ return 'بعد از ظهر';
+ }
+ },
+ calendar: {
+ sameDay: '[امروز ساعت] LT',
+ nextDay: '[فردا ساعت] LT',
+ nextWeek: 'dddd [ساعت] LT',
+ lastDay: '[دیروز ساعت] LT',
+ lastWeek: 'dddd [پیش] [ساعت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'در %s',
+ past: '%s پیش',
+ s: 'چند ثانیه',
+ ss: '%d ثانیه',
+ m: 'یک دقیقه',
+ mm: '%d دقیقه',
+ h: 'یک ساعت',
+ hh: '%d ساعت',
+ d: 'یک روز',
+ dd: '%d روز',
+ M: 'یک ماه',
+ MM: '%d ماه',
+ y: 'یک سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[۰-۹]/g, function (match) {
+ return numberMap$5[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap$6[match];
+ })
+ .replace(/,/g, '،');
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}م/,
+ ordinal: '%dم',
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var numbersPast =
+ 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
+ ' '
+ ),
+ numbersFuture = [
+ 'nolla',
+ 'yhden',
+ 'kahden',
+ 'kolmen',
+ 'neljän',
+ 'viiden',
+ 'kuuden',
+ numbersPast[7],
+ numbersPast[8],
+ numbersPast[9],
+ ];
+ function translate$2(number, withoutSuffix, key, isFuture) {
+ var result = '';
+ switch (key) {
+ case 's':
+ return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
+ case 'ss':
+ result = isFuture ? 'sekunnin' : 'sekuntia';
+ break;
+ case 'm':
+ return isFuture ? 'minuutin' : 'minuutti';
+ case 'mm':
+ result = isFuture ? 'minuutin' : 'minuuttia';
+ break;
+ case 'h':
+ return isFuture ? 'tunnin' : 'tunti';
+ case 'hh':
+ result = isFuture ? 'tunnin' : 'tuntia';
+ break;
+ case 'd':
+ return isFuture ? 'päivän' : 'päivä';
+ case 'dd':
+ result = isFuture ? 'päivän' : 'päivää';
+ break;
+ case 'M':
+ return isFuture ? 'kuukauden' : 'kuukausi';
+ case 'MM':
+ result = isFuture ? 'kuukauden' : 'kuukautta';
+ break;
+ case 'y':
+ return isFuture ? 'vuoden' : 'vuosi';
+ case 'yy':
+ result = isFuture ? 'vuoden' : 'vuotta';
+ break;
+ }
+ result = verbalNumber(number, isFuture) + ' ' + result;
+ return result;
+ }
+ function verbalNumber(number, isFuture) {
+ return number < 10
+ ? isFuture
+ ? numbersFuture[number]
+ : numbersPast[number]
+ : number;
+ }
+
+ moment.defineLocale('fi', {
+ months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
+ '_'
+ ),
+ monthsShort:
+ 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
+ '_'
+ ),
+ weekdays:
+ 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
+ '_'
+ ),
+ weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
+ weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD.MM.YYYY',
+ LL: 'Do MMMM[ta] YYYY',
+ LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
+ LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
+ l: 'D.M.YYYY',
+ ll: 'Do MMM YYYY',
+ lll: 'Do MMM YYYY, [klo] HH.mm',
+ llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
+ },
+ calendar: {
+ sameDay: '[tänään] [klo] LT',
+ nextDay: '[huomenna] [klo] LT',
+ nextWeek: 'dddd [klo] LT',
+ lastDay: '[eilen] [klo] LT',
+ lastWeek: '[viime] dddd[na] [klo] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s päästä',
+ past: '%s sitten',
+ s: translate$2,
+ ss: translate$2,
+ m: translate$2,
+ mm: translate$2,
+ h: translate$2,
+ hh: translate$2,
+ d: translate$2,
+ dd: translate$2,
+ M: translate$2,
+ MM: translate$2,
+ y: translate$2,
+ yy: translate$2,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('fil', {
+ months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
+ '_'
+ ),
+ monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+ weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+ weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'MM/D/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY HH:mm',
+ LLLL: 'dddd, MMMM DD, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: 'LT [ngayong araw]',
+ nextDay: '[Bukas ng] LT',
+ nextWeek: 'LT [sa susunod na] dddd',
+ lastDay: 'LT [kahapon]',
+ lastWeek: 'LT [noong nakaraang] dddd',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'sa loob ng %s',
+ past: '%s ang nakalipas',
+ s: 'ilang segundo',
+ ss: '%d segundo',
+ m: 'isang minuto',
+ mm: '%d minuto',
+ h: 'isang oras',
+ hh: '%d oras',
+ d: 'isang araw',
+ dd: '%d araw',
+ M: 'isang buwan',
+ MM: '%d buwan',
+ y: 'isang taon',
+ yy: '%d taon',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('fo', {
+ months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
+ weekdays:
+ 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
+ '_'
+ ),
+ weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
+ weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D. MMMM, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Í dag kl.] LT',
+ nextDay: '[Í morgin kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[Í gjár kl.] LT',
+ lastWeek: '[síðstu] dddd [kl] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'um %s',
+ past: '%s síðani',
+ s: 'fá sekund',
+ ss: '%d sekundir',
+ m: 'ein minuttur',
+ mm: '%d minuttir',
+ h: 'ein tími',
+ hh: '%d tímar',
+ d: 'ein dagur',
+ dd: '%d dagar',
+ M: 'ein mánaður',
+ MM: '%d mánaðir',
+ y: 'eitt ár',
+ yy: '%d ár',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('fr-ca', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'D':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('fr-ch', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'D':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsStrictRegex$1 =
+ /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsShortStrictRegex$1 =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
+ monthsRegex$6 =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsParse$6 = [
+ /^janv/i,
+ /^févr/i,
+ /^mars/i,
+ /^avr/i,
+ /^mai/i,
+ /^juin/i,
+ /^juil/i,
+ /^août/i,
+ /^sept/i,
+ /^oct/i,
+ /^nov/i,
+ /^déc/i,
+ ];
+
+ moment.defineLocale('fr', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsRegex: monthsRegex$6,
+ monthsShortRegex: monthsRegex$6,
+ monthsStrictRegex: monthsStrictRegex$1,
+ monthsShortStrictRegex: monthsShortStrictRegex$1,
+ monthsParse: monthsParse$6,
+ longMonthsParse: monthsParse$6,
+ shortMonthsParse: monthsParse$6,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ w: 'une semaine',
+ ww: '%d semaines',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // TODO: Return 'e' when day of month > 1. Move this case inside
+ // block for masculine words below.
+ // See https://github.com/moment/moment/issues/3375
+ case 'D':
+ return number + (number === 1 ? 'er' : '');
+
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
+
+ moment.defineLocale('fy', {
+ months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots[m.month()];
+ } else {
+ return monthsShortWithDots[m.month()];
+ }
+ },
+ monthsParseExact: true,
+ weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
+ '_'
+ ),
+ weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
+ weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[hjoed om] LT',
+ nextDay: '[moarn om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[juster om] LT',
+ lastWeek: '[ôfrûne] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'oer %s',
+ past: '%s lyn',
+ s: 'in pear sekonden',
+ ss: '%d sekonden',
+ m: 'ien minút',
+ mm: '%d minuten',
+ h: 'ien oere',
+ hh: '%d oeren',
+ d: 'ien dei',
+ dd: '%d dagen',
+ M: 'ien moanne',
+ MM: '%d moannen',
+ y: 'ien jier',
+ yy: '%d jierren',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$5 = [
+ 'Eanáir',
+ 'Feabhra',
+ 'Márta',
+ 'Aibreán',
+ 'Bealtaine',
+ 'Meitheamh',
+ 'Iúil',
+ 'Lúnasa',
+ 'Meán Fómhair',
+ 'Deireadh Fómhair',
+ 'Samhain',
+ 'Nollaig',
+ ],
+ monthsShort$5 = [
+ 'Ean',
+ 'Feabh',
+ 'Márt',
+ 'Aib',
+ 'Beal',
+ 'Meith',
+ 'Iúil',
+ 'Lún',
+ 'M.F.',
+ 'D.F.',
+ 'Samh',
+ 'Noll',
+ ],
+ weekdays$1 = [
+ 'Dé Domhnaigh',
+ 'Dé Luain',
+ 'Dé Máirt',
+ 'Dé Céadaoin',
+ 'Déardaoin',
+ 'Dé hAoine',
+ 'Dé Sathairn',
+ ],
+ weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
+ weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
+
+ moment.defineLocale('ga', {
+ months: months$5,
+ monthsShort: monthsShort$5,
+ monthsParseExact: true,
+ weekdays: weekdays$1,
+ weekdaysShort: weekdaysShort,
+ weekdaysMin: weekdaysMin,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Inniu ag] LT',
+ nextDay: '[Amárach ag] LT',
+ nextWeek: 'dddd [ag] LT',
+ lastDay: '[Inné ag] LT',
+ lastWeek: 'dddd [seo caite] [ag] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'i %s',
+ past: '%s ó shin',
+ s: 'cúpla soicind',
+ ss: '%d soicind',
+ m: 'nóiméad',
+ mm: '%d nóiméad',
+ h: 'uair an chloig',
+ hh: '%d uair an chloig',
+ d: 'lá',
+ dd: '%d lá',
+ M: 'mí',
+ MM: '%d míonna',
+ y: 'bliain',
+ yy: '%d bliain',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$6 = [
+ 'Am Faoilleach',
+ 'An Gearran',
+ 'Am Màrt',
+ 'An Giblean',
+ 'An Cèitean',
+ 'An t-Ògmhios',
+ 'An t-Iuchar',
+ 'An Lùnastal',
+ 'An t-Sultain',
+ 'An Dàmhair',
+ 'An t-Samhain',
+ 'An Dùbhlachd',
+ ],
+ monthsShort$6 = [
+ 'Faoi',
+ 'Gear',
+ 'Màrt',
+ 'Gibl',
+ 'Cèit',
+ 'Ògmh',
+ 'Iuch',
+ 'Lùn',
+ 'Sult',
+ 'Dàmh',
+ 'Samh',
+ 'Dùbh',
+ ],
+ weekdays$2 = [
+ 'Didòmhnaich',
+ 'Diluain',
+ 'Dimàirt',
+ 'Diciadain',
+ 'Diardaoin',
+ 'Dihaoine',
+ 'Disathairne',
+ ],
+ weekdaysShort$1 = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
+ weekdaysMin$1 = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
+
+ moment.defineLocale('gd', {
+ months: months$6,
+ monthsShort: monthsShort$6,
+ monthsParseExact: true,
+ weekdays: weekdays$2,
+ weekdaysShort: weekdaysShort$1,
+ weekdaysMin: weekdaysMin$1,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[An-diugh aig] LT',
+ nextDay: '[A-màireach aig] LT',
+ nextWeek: 'dddd [aig] LT',
+ lastDay: '[An-dè aig] LT',
+ lastWeek: 'dddd [seo chaidh] [aig] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ann an %s',
+ past: 'bho chionn %s',
+ s: 'beagan diogan',
+ ss: '%d diogan',
+ m: 'mionaid',
+ mm: '%d mionaidean',
+ h: 'uair',
+ hh: '%d uairean',
+ d: 'latha',
+ dd: '%d latha',
+ M: 'mìos',
+ MM: '%d mìosan',
+ y: 'bliadhna',
+ yy: '%d bliadhna',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('gl', {
+ months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
+ '_'
+ ),
+ monthsShort:
+ 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
+ },
+ lastDay: function () {
+ return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (str) {
+ if (str.indexOf('un') === 0) {
+ return 'n' + str;
+ }
+ return 'en ' + str;
+ },
+ past: 'hai %s',
+ s: 'uns segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'unha hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$4(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
+ ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
+ m: ['एका मिणटान', 'एक मिनूट'],
+ mm: [number + ' मिणटांनी', number + ' मिणटां'],
+ h: ['एका वरान', 'एक वर'],
+ hh: [number + ' वरांनी', number + ' वरां'],
+ d: ['एका दिसान', 'एक दीस'],
+ dd: [number + ' दिसांनी', number + ' दीस'],
+ M: ['एका म्हयन्यान', 'एक म्हयनो'],
+ MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
+ y: ['एका वर्सान', 'एक वर्स'],
+ yy: [number + ' वर्सांनी', number + ' वर्सां'],
+ };
+ return isFuture ? format[key][0] : format[key][1];
+ }
+
+ moment.defineLocale('gom-deva', {
+ months: {
+ standalone:
+ 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
+ '_'
+ ),
+ format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
+ '_'
+ ),
+ isFormat: /MMMM(\s)+D[oD]?/,
+ },
+ monthsShort:
+ 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
+ weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
+ weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'A h:mm [वाजतां]',
+ LTS: 'A h:mm:ss [वाजतां]',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY A h:mm [वाजतां]',
+ LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
+ llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
+ },
+ calendar: {
+ sameDay: '[आयज] LT',
+ nextDay: '[फाल्यां] LT',
+ nextWeek: '[फुडलो] dddd[,] LT',
+ lastDay: '[काल] LT',
+ lastWeek: '[फाटलो] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s',
+ past: '%s आदीं',
+ s: processRelativeTime$4,
+ ss: processRelativeTime$4,
+ m: processRelativeTime$4,
+ mm: processRelativeTime$4,
+ h: processRelativeTime$4,
+ hh: processRelativeTime$4,
+ d: processRelativeTime$4,
+ dd: processRelativeTime$4,
+ M: processRelativeTime$4,
+ MM: processRelativeTime$4,
+ y: processRelativeTime$4,
+ yy: processRelativeTime$4,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // the ordinal 'वेर' only applies to day of the month
+ case 'D':
+ return number + 'वेर';
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ case 'w':
+ case 'W':
+ return number;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
+ },
+ meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'राती') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सकाळीं') {
+ return hour;
+ } else if (meridiem === 'दनपारां') {
+ return hour > 12 ? hour : hour + 12;
+ } else if (meridiem === 'सांजे') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'राती';
+ } else if (hour < 12) {
+ return 'सकाळीं';
+ } else if (hour < 16) {
+ return 'दनपारां';
+ } else if (hour < 20) {
+ return 'सांजे';
+ } else {
+ return 'राती';
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$5(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['thoddea sekondamni', 'thodde sekond'],
+ ss: [number + ' sekondamni', number + ' sekond'],
+ m: ['eka mintan', 'ek minut'],
+ mm: [number + ' mintamni', number + ' mintam'],
+ h: ['eka voran', 'ek vor'],
+ hh: [number + ' voramni', number + ' voram'],
+ d: ['eka disan', 'ek dis'],
+ dd: [number + ' disamni', number + ' dis'],
+ M: ['eka mhoinean', 'ek mhoino'],
+ MM: [number + ' mhoineamni', number + ' mhoine'],
+ y: ['eka vorsan', 'ek voros'],
+ yy: [number + ' vorsamni', number + ' vorsam'],
+ };
+ return isFuture ? format[key][0] : format[key][1];
+ }
+
+ moment.defineLocale('gom-latn', {
+ months: {
+ standalone:
+ 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
+ '_'
+ ),
+ format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
+ '_'
+ ),
+ isFormat: /MMMM(\s)+D[oD]?/,
+ },
+ monthsShort:
+ 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
+ weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
+ weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'A h:mm [vazta]',
+ LTS: 'A h:mm:ss [vazta]',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY A h:mm [vazta]',
+ LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
+ llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
+ },
+ calendar: {
+ sameDay: '[Aiz] LT',
+ nextDay: '[Faleam] LT',
+ nextWeek: '[Fuddlo] dddd[,] LT',
+ lastDay: '[Kal] LT',
+ lastWeek: '[Fattlo] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s',
+ past: '%s adim',
+ s: processRelativeTime$5,
+ ss: processRelativeTime$5,
+ m: processRelativeTime$5,
+ mm: processRelativeTime$5,
+ h: processRelativeTime$5,
+ hh: processRelativeTime$5,
+ d: processRelativeTime$5,
+ dd: processRelativeTime$5,
+ M: processRelativeTime$5,
+ MM: processRelativeTime$5,
+ y: processRelativeTime$5,
+ yy: processRelativeTime$5,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // the ordinal 'er' only applies to day of the month
+ case 'D':
+ return number + 'er';
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ case 'w':
+ case 'W':
+ return number;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
+ },
+ meridiemParse: /rati|sokallim|donparam|sanje/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'rati') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'sokallim') {
+ return hour;
+ } else if (meridiem === 'donparam') {
+ return hour > 12 ? hour : hour + 12;
+ } else if (meridiem === 'sanje') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'rati';
+ } else if (hour < 12) {
+ return 'sokallim';
+ } else if (hour < 16) {
+ return 'donparam';
+ } else if (hour < 20) {
+ return 'sanje';
+ } else {
+ return 'rati';
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$7 = {
+ 1: '૧',
+ 2: '૨',
+ 3: '૩',
+ 4: '૪',
+ 5: '૫',
+ 6: '૬',
+ 7: '૭',
+ 8: '૮',
+ 9: '૯',
+ 0: '૦',
+ },
+ numberMap$6 = {
+ '૧': '1',
+ '૨': '2',
+ '૩': '3',
+ '૪': '4',
+ '૫': '5',
+ '૬': '6',
+ '૭': '7',
+ '૮': '8',
+ '૯': '9',
+ '૦': '0',
+ };
+
+ moment.defineLocale('gu', {
+ months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
+ '_'
+ ),
+ monthsShort:
+ 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
+ '_'
+ ),
+ weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
+ weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm વાગ્યે',
+ LTS: 'A h:mm:ss વાગ્યે',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
+ },
+ calendar: {
+ sameDay: '[આજ] LT',
+ nextDay: '[કાલે] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ગઇકાલે] LT',
+ lastWeek: '[પાછલા] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s મા',
+ past: '%s પહેલા',
+ s: 'અમુક પળો',
+ ss: '%d સેકંડ',
+ m: 'એક મિનિટ',
+ mm: '%d મિનિટ',
+ h: 'એક કલાક',
+ hh: '%d કલાક',
+ d: 'એક દિવસ',
+ dd: '%d દિવસ',
+ M: 'એક મહિનો',
+ MM: '%d મહિનો',
+ y: 'એક વર્ષ',
+ yy: '%d વર્ષ',
+ },
+ preparse: function (string) {
+ return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
+ return numberMap$6[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$7[match];
+ });
+ },
+ // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
+ meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'રાત') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'સવાર') {
+ return hour;
+ } else if (meridiem === 'બપોર') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'સાંજ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'રાત';
+ } else if (hour < 10) {
+ return 'સવાર';
+ } else if (hour < 17) {
+ return 'બપોર';
+ } else if (hour < 20) {
+ return 'સાંજ';
+ } else {
+ return 'રાત';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('he', {
+ months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
+ weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
+ weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
+ weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [ב]MMMM YYYY',
+ LLL: 'D [ב]MMMM YYYY HH:mm',
+ LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
+ l: 'D/M/YYYY',
+ ll: 'D MMM YYYY',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd, D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[היום ב־]LT',
+ nextDay: '[מחר ב־]LT',
+ nextWeek: 'dddd [בשעה] LT',
+ lastDay: '[אתמול ב־]LT',
+ lastWeek: '[ביום] dddd [האחרון בשעה] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'בעוד %s',
+ past: 'לפני %s',
+ s: 'מספר שניות',
+ ss: '%d שניות',
+ m: 'דקה',
+ mm: '%d דקות',
+ h: 'שעה',
+ hh: function (number) {
+ if (number === 2) {
+ return 'שעתיים';
+ }
+ return number + ' שעות';
+ },
+ d: 'יום',
+ dd: function (number) {
+ if (number === 2) {
+ return 'יומיים';
+ }
+ return number + ' ימים';
+ },
+ M: 'חודש',
+ MM: function (number) {
+ if (number === 2) {
+ return 'חודשיים';
+ }
+ return number + ' חודשים';
+ },
+ y: 'שנה',
+ yy: function (number) {
+ if (number === 2) {
+ return 'שנתיים';
+ } else if (number % 10 === 0 && number !== 10) {
+ return number + ' שנה';
+ }
+ return number + ' שנים';
+ },
+ },
+ meridiemParse:
+ /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
+ isPM: function (input) {
+ return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 5) {
+ return 'לפנות בוקר';
+ } else if (hour < 10) {
+ return 'בבוקר';
+ } else if (hour < 12) {
+ return isLower ? 'לפנה"צ' : 'לפני הצהריים';
+ } else if (hour < 18) {
+ return isLower ? 'אחה"צ' : 'אחרי הצהריים';
+ } else {
+ return 'בערב';
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$8 = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap$7 = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ },
+ monthsParse$7 = [
+ /^जन/i,
+ /^फ़र|फर/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सितं|सित/i,
+ /^अक्टू/i,
+ /^नव|नवं/i,
+ /^दिसं|दिस/i,
+ ],
+ shortMonthsParse = [
+ /^जन/i,
+ /^फ़र/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सित/i,
+ /^अक्टू/i,
+ /^नव/i,
+ /^दिस/i,
+ ];
+
+ moment.defineLocale('hi', {
+ months: {
+ format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
+ '_'
+ ),
+ standalone:
+ 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
+ weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm बजे',
+ LTS: 'A h:mm:ss बजे',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm बजे',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
+ },
+
+ monthsParse: monthsParse$7,
+ longMonthsParse: monthsParse$7,
+ shortMonthsParse: shortMonthsParse,
+
+ monthsRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsShortRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsStrictRegex:
+ /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
+
+ monthsShortStrictRegex:
+ /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
+
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[कल] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[कल] LT',
+ lastWeek: '[पिछले] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s में',
+ past: '%s पहले',
+ s: 'कुछ ही क्षण',
+ ss: '%d सेकंड',
+ m: 'एक मिनट',
+ mm: '%d मिनट',
+ h: 'एक घंटा',
+ hh: '%d घंटे',
+ d: 'एक दिन',
+ dd: '%d दिन',
+ M: 'एक महीने',
+ MM: '%d महीने',
+ y: 'एक वर्ष',
+ yy: '%d वर्ष',
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap$7[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$8[match];
+ });
+ },
+ // Hindi notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
+ meridiemParse: /रात|सुबह|दोपहर|शाम/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'रात') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सुबह') {
+ return hour;
+ } else if (meridiem === 'दोपहर') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'शाम') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'रात';
+ } else if (hour < 10) {
+ return 'सुबह';
+ } else if (hour < 17) {
+ return 'दोपहर';
+ } else if (hour < 20) {
+ return 'शाम';
+ } else {
+ return 'रात';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function translate$3(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ if (number === 1) {
+ result += 'sekunda';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sekunde';
+ } else {
+ result += 'sekundi';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
+ }
+ }
+
+ moment.defineLocale('hr', {
+ months: {
+ format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
+ '_'
+ ),
+ standalone:
+ 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'Do MMMM YYYY',
+ LLL: 'Do MMMM YYYY H:mm',
+ LLLL: 'dddd, Do MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[jučer u] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[prošlu] [nedjelju] [u] LT';
+ case 3:
+ return '[prošlu] [srijedu] [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'par sekundi',
+ ss: translate$3,
+ m: translate$3,
+ mm: translate$3,
+ h: translate$3,
+ hh: translate$3,
+ d: 'dan',
+ dd: translate$3,
+ M: 'mjesec',
+ MM: translate$3,
+ y: 'godinu',
+ yy: translate$3,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var weekEndings =
+ 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
+ function translate$4(number, withoutSuffix, key, isFuture) {
+ var num = number;
+ switch (key) {
+ case 's':
+ return isFuture || withoutSuffix
+ ? 'néhány másodperc'
+ : 'néhány másodperce';
+ case 'ss':
+ return num + (isFuture || withoutSuffix)
+ ? ' másodperc'
+ : ' másodperce';
+ case 'm':
+ return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'mm':
+ return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'h':
+ return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'hh':
+ return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'd':
+ return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'dd':
+ return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'M':
+ return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'MM':
+ return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'y':
+ return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
+ case 'yy':
+ return num + (isFuture || withoutSuffix ? ' év' : ' éve');
+ }
+ return '';
+ }
+ function week(isFuture) {
+ return (
+ (isFuture ? '' : '[múlt] ') +
+ '[' +
+ weekEndings[this.day()] +
+ '] LT[-kor]'
+ );
+ }
+
+ moment.defineLocale('hu', {
+ months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
+ weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
+ weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'YYYY.MM.DD.',
+ LL: 'YYYY. MMMM D.',
+ LLL: 'YYYY. MMMM D. H:mm',
+ LLLL: 'YYYY. MMMM D., dddd H:mm',
+ },
+ meridiemParse: /de|du/i,
+ isPM: function (input) {
+ return input.charAt(1).toLowerCase() === 'u';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower === true ? 'de' : 'DE';
+ } else {
+ return isLower === true ? 'du' : 'DU';
+ }
+ },
+ calendar: {
+ sameDay: '[ma] LT[-kor]',
+ nextDay: '[holnap] LT[-kor]',
+ nextWeek: function () {
+ return week.call(this, true);
+ },
+ lastDay: '[tegnap] LT[-kor]',
+ lastWeek: function () {
+ return week.call(this, false);
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s múlva',
+ past: '%s',
+ s: translate$4,
+ ss: translate$4,
+ m: translate$4,
+ mm: translate$4,
+ h: translate$4,
+ hh: translate$4,
+ d: translate$4,
+ dd: translate$4,
+ M: translate$4,
+ MM: translate$4,
+ y: translate$4,
+ yy: translate$4,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('hy-am', {
+ months: {
+ format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
+ '_'
+ ),
+ standalone:
+ 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
+ weekdays:
+ 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
+ '_'
+ ),
+ weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+ weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY թ.',
+ LLL: 'D MMMM YYYY թ., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY թ., HH:mm',
+ },
+ calendar: {
+ sameDay: '[այսօր] LT',
+ nextDay: '[վաղը] LT',
+ lastDay: '[երեկ] LT',
+ nextWeek: function () {
+ return 'dddd [օրը ժամը] LT';
+ },
+ lastWeek: function () {
+ return '[անցած] dddd [օրը ժամը] LT';
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s հետո',
+ past: '%s առաջ',
+ s: 'մի քանի վայրկյան',
+ ss: '%d վայրկյան',
+ m: 'րոպե',
+ mm: '%d րոպե',
+ h: 'ժամ',
+ hh: '%d ժամ',
+ d: 'օր',
+ dd: '%d օր',
+ M: 'ամիս',
+ MM: '%d ամիս',
+ y: 'տարի',
+ yy: '%d տարի',
+ },
+ meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
+ isPM: function (input) {
+ return /^(ցերեկվա|երեկոյան)$/.test(input);
+ },
+ meridiem: function (hour) {
+ if (hour < 4) {
+ return 'գիշերվա';
+ } else if (hour < 12) {
+ return 'առավոտվա';
+ } else if (hour < 17) {
+ return 'ցերեկվա';
+ } else {
+ return 'երեկոյան';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'DDD':
+ case 'w':
+ case 'W':
+ case 'DDDo':
+ if (number === 1) {
+ return number + '-ին';
+ }
+ return number + '-րդ';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('id', {
+ months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
+ weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
+ weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
+ weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|siang|sore|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'siang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sore' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'siang';
+ } else if (hours < 19) {
+ return 'sore';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Besok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kemarin pukul] LT',
+ lastWeek: 'dddd [lalu pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lalu',
+ s: 'beberapa detik',
+ ss: '%d detik',
+ m: 'semenit',
+ mm: '%d menit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function plural$2(n) {
+ if (n % 100 === 11) {
+ return true;
+ } else if (n % 10 === 1) {
+ return false;
+ }
+ return true;
+ }
+ function translate$5(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's':
+ return withoutSuffix || isFuture
+ ? 'nokkrar sekúndur'
+ : 'nokkrum sekúndum';
+ case 'ss':
+ if (plural$2(number)) {
+ return (
+ result +
+ (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
+ );
+ }
+ return result + 'sekúnda';
+ case 'm':
+ return withoutSuffix ? 'mínúta' : 'mínútu';
+ case 'mm':
+ if (plural$2(number)) {
+ return (
+ result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
+ );
+ } else if (withoutSuffix) {
+ return result + 'mínúta';
+ }
+ return result + 'mínútu';
+ case 'hh':
+ if (plural$2(number)) {
+ return (
+ result +
+ (withoutSuffix || isFuture
+ ? 'klukkustundir'
+ : 'klukkustundum')
+ );
+ }
+ return result + 'klukkustund';
+ case 'd':
+ if (withoutSuffix) {
+ return 'dagur';
+ }
+ return isFuture ? 'dag' : 'degi';
+ case 'dd':
+ if (plural$2(number)) {
+ if (withoutSuffix) {
+ return result + 'dagar';
+ }
+ return result + (isFuture ? 'daga' : 'dögum');
+ } else if (withoutSuffix) {
+ return result + 'dagur';
+ }
+ return result + (isFuture ? 'dag' : 'degi');
+ case 'M':
+ if (withoutSuffix) {
+ return 'mánuður';
+ }
+ return isFuture ? 'mánuð' : 'mánuði';
+ case 'MM':
+ if (plural$2(number)) {
+ if (withoutSuffix) {
+ return result + 'mánuðir';
+ }
+ return result + (isFuture ? 'mánuði' : 'mánuðum');
+ } else if (withoutSuffix) {
+ return result + 'mánuður';
+ }
+ return result + (isFuture ? 'mánuð' : 'mánuði');
+ case 'y':
+ return withoutSuffix || isFuture ? 'ár' : 'ári';
+ case 'yy':
+ if (plural$2(number)) {
+ return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
+ }
+ return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
+ }
+ }
+
+ moment.defineLocale('is', {
+ months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
+ weekdays:
+ 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
+ '_'
+ ),
+ weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
+ weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] H:mm',
+ LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
+ },
+ calendar: {
+ sameDay: '[í dag kl.] LT',
+ nextDay: '[á morgun kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[í gær kl.] LT',
+ lastWeek: '[síðasta] dddd [kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'eftir %s',
+ past: 'fyrir %s síðan',
+ s: translate$5,
+ ss: translate$5,
+ m: translate$5,
+ mm: translate$5,
+ h: 'klukkustund',
+ hh: translate$5,
+ d: translate$5,
+ dd: translate$5,
+ M: translate$5,
+ MM: translate$5,
+ y: translate$5,
+ yy: translate$5,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('it-ch', {
+ months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
+ '_'
+ ),
+ monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+ weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
+ weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Oggi alle] LT',
+ nextDay: '[Domani alle] LT',
+ nextWeek: 'dddd [alle] LT',
+ lastDay: '[Ieri alle] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[la scorsa] dddd [alle] LT';
+ default:
+ return '[lo scorso] dddd [alle] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (s) {
+ return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
+ },
+ past: '%s fa',
+ s: 'alcuni secondi',
+ ss: '%d secondi',
+ m: 'un minuto',
+ mm: '%d minuti',
+ h: "un'ora",
+ hh: '%d ore',
+ d: 'un giorno',
+ dd: '%d giorni',
+ M: 'un mese',
+ MM: '%d mesi',
+ y: 'un anno',
+ yy: '%d anni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('it', {
+ months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
+ '_'
+ ),
+ monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+ weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
+ weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return (
+ '[Oggi a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ nextDay: function () {
+ return (
+ '[Domani a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ nextWeek: function () {
+ return (
+ 'dddd [a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ lastDay: function () {
+ return (
+ '[Ieri a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return (
+ '[La scorsa] dddd [a' +
+ (this.hours() > 1
+ ? 'lle '
+ : this.hours() === 0
+ ? ' '
+ : "ll'") +
+ ']LT'
+ );
+ default:
+ return (
+ '[Lo scorso] dddd [a' +
+ (this.hours() > 1
+ ? 'lle '
+ : this.hours() === 0
+ ? ' '
+ : "ll'") +
+ ']LT'
+ );
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'tra %s',
+ past: '%s fa',
+ s: 'alcuni secondi',
+ ss: '%d secondi',
+ m: 'un minuto',
+ mm: '%d minuti',
+ h: "un'ora",
+ hh: '%d ore',
+ d: 'un giorno',
+ dd: '%d giorni',
+ w: 'una settimana',
+ ww: '%d settimane',
+ M: 'un mese',
+ MM: '%d mesi',
+ y: 'un anno',
+ yy: '%d anni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ja', {
+ eras: [
+ {
+ since: '2019-05-01',
+ offset: 1,
+ name: '令和',
+ narrow: '㋿',
+ abbr: 'R',
+ },
+ {
+ since: '1989-01-08',
+ until: '2019-04-30',
+ offset: 1,
+ name: '平成',
+ narrow: '㍻',
+ abbr: 'H',
+ },
+ {
+ since: '1926-12-25',
+ until: '1989-01-07',
+ offset: 1,
+ name: '昭和',
+ narrow: '㍼',
+ abbr: 'S',
+ },
+ {
+ since: '1912-07-30',
+ until: '1926-12-24',
+ offset: 1,
+ name: '大正',
+ narrow: '㍽',
+ abbr: 'T',
+ },
+ {
+ since: '1873-01-01',
+ until: '1912-07-29',
+ offset: 6,
+ name: '明治',
+ narrow: '㍾',
+ abbr: 'M',
+ },
+ {
+ since: '0001-01-01',
+ until: '1873-12-31',
+ offset: 1,
+ name: '西暦',
+ narrow: 'AD',
+ abbr: 'AD',
+ },
+ {
+ since: '0000-12-31',
+ until: -Infinity,
+ offset: 1,
+ name: '紀元前',
+ narrow: 'BC',
+ abbr: 'BC',
+ },
+ ],
+ eraYearOrdinalRegex: /(元|\d+)年/,
+ eraYearOrdinalParse: function (input, match) {
+ return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
+ },
+ months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
+ weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
+ weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日 dddd HH:mm',
+ l: 'YYYY/MM/DD',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日(ddd) HH:mm',
+ },
+ meridiemParse: /午前|午後/i,
+ isPM: function (input) {
+ return input === '午後';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return '午前';
+ } else {
+ return '午後';
+ }
+ },
+ calendar: {
+ sameDay: '[今日] LT',
+ nextDay: '[明日] LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ return '[来週]dddd LT';
+ } else {
+ return 'dddd LT';
+ }
+ },
+ lastDay: '[昨日] LT',
+ lastWeek: function (now) {
+ if (this.week() !== now.week()) {
+ return '[先週]dddd LT';
+ } else {
+ return 'dddd LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}日/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'y':
+ return number === 1 ? '元年' : number + '年';
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '数秒',
+ ss: '%d秒',
+ m: '1分',
+ mm: '%d分',
+ h: '1時間',
+ hh: '%d時間',
+ d: '1日',
+ dd: '%d日',
+ M: '1ヶ月',
+ MM: '%dヶ月',
+ y: '1年',
+ yy: '%d年',
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('jv', {
+ months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
+ weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
+ weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
+ weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /enjing|siyang|sonten|ndalu/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'enjing') {
+ return hour;
+ } else if (meridiem === 'siyang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'enjing';
+ } else if (hours < 15) {
+ return 'siyang';
+ } else if (hours < 19) {
+ return 'sonten';
+ } else {
+ return 'ndalu';
+ }
+ },
+ calendar: {
+ sameDay: '[Dinten puniko pukul] LT',
+ nextDay: '[Mbenjang pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kala wingi pukul] LT',
+ lastWeek: 'dddd [kepengker pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'wonten ing %s',
+ past: '%s ingkang kepengker',
+ s: 'sawetawis detik',
+ ss: '%d detik',
+ m: 'setunggal menit',
+ mm: '%d menit',
+ h: 'setunggal jam',
+ hh: '%d jam',
+ d: 'sedinten',
+ dd: '%d dinten',
+ M: 'sewulan',
+ MM: '%d wulan',
+ y: 'setaun',
+ yy: '%d taun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ka', {
+ months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
+ '_'
+ ),
+ monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
+ weekdays: {
+ standalone:
+ 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
+ '_'
+ ),
+ format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
+ '_'
+ ),
+ isFormat: /(წინა|შემდეგ)/,
+ },
+ weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
+ weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[დღეს] LT[-ზე]',
+ nextDay: '[ხვალ] LT[-ზე]',
+ lastDay: '[გუშინ] LT[-ზე]',
+ nextWeek: '[შემდეგ] dddd LT[-ზე]',
+ lastWeek: '[წინა] dddd LT-ზე',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (s) {
+ return s.replace(
+ /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,
+ function ($0, $1, $2) {
+ return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
+ }
+ );
+ },
+ past: function (s) {
+ if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
+ return s.replace(/(ი|ე)$/, 'ის წინ');
+ }
+ if (/წელი/.test(s)) {
+ return s.replace(/წელი$/, 'წლის წინ');
+ }
+ return s;
+ },
+ s: 'რამდენიმე წამი',
+ ss: '%d წამი',
+ m: 'წუთი',
+ mm: '%d წუთი',
+ h: 'საათი',
+ hh: '%d საათი',
+ d: 'დღე',
+ dd: '%d დღე',
+ M: 'თვე',
+ MM: '%d თვე',
+ y: 'წელი',
+ yy: '%d წელი',
+ },
+ dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
+ ordinal: function (number) {
+ if (number === 0) {
+ return number;
+ }
+ if (number === 1) {
+ return number + '-ლი';
+ }
+ if (
+ number < 20 ||
+ (number <= 100 && number % 20 === 0) ||
+ number % 100 === 0
+ ) {
+ return 'მე-' + number;
+ }
+ return number + '-ე';
+ },
+ week: {
+ dow: 1,
+ doy: 7,
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes$1 = {
+ 0: '-ші',
+ 1: '-ші',
+ 2: '-ші',
+ 3: '-ші',
+ 4: '-ші',
+ 5: '-ші',
+ 6: '-шы',
+ 7: '-ші',
+ 8: '-ші',
+ 9: '-шы',
+ 10: '-шы',
+ 20: '-шы',
+ 30: '-шы',
+ 40: '-шы',
+ 50: '-ші',
+ 60: '-шы',
+ 70: '-ші',
+ 80: '-ші',
+ 90: '-шы',
+ 100: '-ші',
+ };
+
+ moment.defineLocale('kk', {
+ months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
+ '_'
+ ),
+ monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
+ weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
+ '_'
+ ),
+ weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
+ weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бүгін сағат] LT',
+ nextDay: '[Ертең сағат] LT',
+ nextWeek: 'dddd [сағат] LT',
+ lastDay: '[Кеше сағат] LT',
+ lastWeek: '[Өткен аптаның] dddd [сағат] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ішінде',
+ past: '%s бұрын',
+ s: 'бірнеше секунд',
+ ss: '%d секунд',
+ m: 'бір минут',
+ mm: '%d минут',
+ h: 'бір сағат',
+ hh: '%d сағат',
+ d: 'бір күн',
+ dd: '%d күн',
+ M: 'бір ай',
+ MM: '%d ай',
+ y: 'бір жыл',
+ yy: '%d жыл',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$9 = {
+ 1: '១',
+ 2: '២',
+ 3: '៣',
+ 4: '៤',
+ 5: '៥',
+ 6: '៦',
+ 7: '៧',
+ 8: '៨',
+ 9: '៩',
+ 0: '០',
+ },
+ numberMap$8 = {
+ '១': '1',
+ '២': '2',
+ '៣': '3',
+ '៤': '4',
+ '៥': '5',
+ '៦': '6',
+ '៧': '7',
+ '៨': '8',
+ '៩': '9',
+ '០': '0',
+ };
+
+ moment.defineLocale('km', {
+ months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
+ '_'
+ ),
+ weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
+ weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
+ weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ព្រឹក|ល្ងាច/,
+ isPM: function (input) {
+ return input === 'ល្ងាច';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ព្រឹក';
+ } else {
+ return 'ល្ងាច';
+ }
+ },
+ calendar: {
+ sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
+ nextDay: '[ស្អែក ម៉ោង] LT',
+ nextWeek: 'dddd [ម៉ោង] LT',
+ lastDay: '[ម្សិលមិញ ម៉ោង] LT',
+ lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sទៀត',
+ past: '%sមុន',
+ s: 'ប៉ុន្មានវិនាទី',
+ ss: '%d វិនាទី',
+ m: 'មួយនាទី',
+ mm: '%d នាទី',
+ h: 'មួយម៉ោង',
+ hh: '%d ម៉ោង',
+ d: 'មួយថ្ងៃ',
+ dd: '%d ថ្ងៃ',
+ M: 'មួយខែ',
+ MM: '%d ខែ',
+ y: 'មួយឆ្នាំ',
+ yy: '%d ឆ្នាំ',
+ },
+ dayOfMonthOrdinalParse: /ទី\d{1,2}/,
+ ordinal: 'ទី%d',
+ preparse: function (string) {
+ return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
+ return numberMap$8[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$9[match];
+ });
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$a = {
+ 1: '೧',
+ 2: '೨',
+ 3: '೩',
+ 4: '೪',
+ 5: '೫',
+ 6: '೬',
+ 7: '೭',
+ 8: '೮',
+ 9: '೯',
+ 0: '೦',
+ },
+ numberMap$9 = {
+ '೧': '1',
+ '೨': '2',
+ '೩': '3',
+ '೪': '4',
+ '೫': '5',
+ '೬': '6',
+ '೭': '7',
+ '೮': '8',
+ '೯': '9',
+ '೦': '0',
+ };
+
+ moment.defineLocale('kn', {
+ months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
+ '_'
+ ),
+ weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
+ weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[ಇಂದು] LT',
+ nextDay: '[ನಾಳೆ] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ನಿನ್ನೆ] LT',
+ lastWeek: '[ಕೊನೆಯ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ನಂತರ',
+ past: '%s ಹಿಂದೆ',
+ s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
+ ss: '%d ಸೆಕೆಂಡುಗಳು',
+ m: 'ಒಂದು ನಿಮಿಷ',
+ mm: '%d ನಿಮಿಷ',
+ h: 'ಒಂದು ಗಂಟೆ',
+ hh: '%d ಗಂಟೆ',
+ d: 'ಒಂದು ದಿನ',
+ dd: '%d ದಿನ',
+ M: 'ಒಂದು ತಿಂಗಳು',
+ MM: '%d ತಿಂಗಳು',
+ y: 'ಒಂದು ವರ್ಷ',
+ yy: '%d ವರ್ಷ',
+ },
+ preparse: function (string) {
+ return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
+ return numberMap$9[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$a[match];
+ });
+ },
+ meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ರಾತ್ರಿ') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
+ return hour;
+ } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'ಸಂಜೆ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ರಾತ್ರಿ';
+ } else if (hour < 10) {
+ return 'ಬೆಳಿಗ್ಗೆ';
+ } else if (hour < 17) {
+ return 'ಮಧ್ಯಾಹ್ನ';
+ } else if (hour < 20) {
+ return 'ಸಂಜೆ';
+ } else {
+ return 'ರಾತ್ರಿ';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
+ ordinal: function (number) {
+ return number + 'ನೇ';
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ko', {
+ months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
+ monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
+ '_'
+ ),
+ weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
+ weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
+ weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'YYYY.MM.DD.',
+ LL: 'YYYY년 MMMM D일',
+ LLL: 'YYYY년 MMMM D일 A h:mm',
+ LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
+ l: 'YYYY.MM.DD.',
+ ll: 'YYYY년 MMMM D일',
+ lll: 'YYYY년 MMMM D일 A h:mm',
+ llll: 'YYYY년 MMMM D일 dddd A h:mm',
+ },
+ calendar: {
+ sameDay: '오늘 LT',
+ nextDay: '내일 LT',
+ nextWeek: 'dddd LT',
+ lastDay: '어제 LT',
+ lastWeek: '지난주 dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s 후',
+ past: '%s 전',
+ s: '몇 초',
+ ss: '%d초',
+ m: '1분',
+ mm: '%d분',
+ h: '한 시간',
+ hh: '%d시간',
+ d: '하루',
+ dd: '%d일',
+ M: '한 달',
+ MM: '%d달',
+ y: '일 년',
+ yy: '%d년',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '일';
+ case 'M':
+ return number + '월';
+ case 'w':
+ case 'W':
+ return number + '주';
+ default:
+ return number;
+ }
+ },
+ meridiemParse: /오전|오후/,
+ isPM: function (token) {
+ return token === '오후';
+ },
+ meridiem: function (hour, minute, isUpper) {
+ return hour < 12 ? '오전' : '오후';
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$b = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap$a = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ },
+ months$7 = [
+ 'کانونی دووەم',
+ 'شوبات',
+ 'ئازار',
+ 'نیسان',
+ 'ئایار',
+ 'حوزەیران',
+ 'تەمموز',
+ 'ئاب',
+ 'ئەیلوول',
+ 'تشرینی یەكەم',
+ 'تشرینی دووەم',
+ 'كانونی یەکەم',
+ ];
+
+ moment.defineLocale('ku', {
+ months: months$7,
+ monthsShort: months$7,
+ weekdays:
+ 'یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه'.split('_'),
+ weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ئێواره|بهیانی/,
+ isPM: function (input) {
+ return /ئێواره/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'بهیانی';
+ } else {
+ return 'ئێواره';
+ }
+ },
+ calendar: {
+ sameDay: '[ئهمرۆ كاتژمێر] LT',
+ nextDay: '[بهیانی كاتژمێر] LT',
+ nextWeek: 'dddd [كاتژمێر] LT',
+ lastDay: '[دوێنێ كاتژمێر] LT',
+ lastWeek: 'dddd [كاتژمێر] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'له %s',
+ past: '%s',
+ s: 'چهند چركهیهك',
+ ss: 'چركه %d',
+ m: 'یهك خولهك',
+ mm: '%d خولهك',
+ h: 'یهك كاتژمێر',
+ hh: '%d كاتژمێر',
+ d: 'یهك ڕۆژ',
+ dd: '%d ڕۆژ',
+ M: 'یهك مانگ',
+ MM: '%d مانگ',
+ y: 'یهك ساڵ',
+ yy: '%d ساڵ',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap$a[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap$b[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes$2 = {
+ 0: '-чү',
+ 1: '-чи',
+ 2: '-чи',
+ 3: '-чү',
+ 4: '-чү',
+ 5: '-чи',
+ 6: '-чы',
+ 7: '-чи',
+ 8: '-чи',
+ 9: '-чу',
+ 10: '-чу',
+ 20: '-чы',
+ 30: '-чу',
+ 40: '-чы',
+ 50: '-чү',
+ 60: '-чы',
+ 70: '-чи',
+ 80: '-чи',
+ 90: '-чу',
+ 100: '-чү',
+ };
+
+ moment.defineLocale('ky', {
+ months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
+ '_'
+ ),
+ monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
+ '_'
+ ),
+ weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
+ '_'
+ ),
+ weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
+ weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бүгүн саат] LT',
+ nextDay: '[Эртең саат] LT',
+ nextWeek: 'dddd [саат] LT',
+ lastDay: '[Кечээ саат] LT',
+ lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ичинде',
+ past: '%s мурун',
+ s: 'бирнече секунд',
+ ss: '%d секунд',
+ m: 'бир мүнөт',
+ mm: '%d мүнөт',
+ h: 'бир саат',
+ hh: '%d саат',
+ d: 'бир күн',
+ dd: '%d күн',
+ M: 'бир ай',
+ MM: '%d ай',
+ y: 'бир жыл',
+ yy: '%d жыл',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$6(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eng Minutt', 'enger Minutt'],
+ h: ['eng Stonn', 'enger Stonn'],
+ d: ['een Dag', 'engem Dag'],
+ M: ['ee Mount', 'engem Mount'],
+ y: ['ee Joer', 'engem Joer'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+ function processFutureTime(string) {
+ var number = string.substr(0, string.indexOf(' '));
+ if (eifelerRegelAppliesToNumber(number)) {
+ return 'a ' + string;
+ }
+ return 'an ' + string;
+ }
+ function processPastTime(string) {
+ var number = string.substr(0, string.indexOf(' '));
+ if (eifelerRegelAppliesToNumber(number)) {
+ return 'viru ' + string;
+ }
+ return 'virun ' + string;
+ }
+ /**
+ * Returns true if the word before the given number loses the '-n' ending.
+ * e.g. 'an 10 Deeg' but 'a 5 Deeg'
+ *
+ * @param number {integer}
+ * @returns {boolean}
+ */
+ function eifelerRegelAppliesToNumber(number) {
+ number = parseInt(number, 10);
+ if (isNaN(number)) {
+ return false;
+ }
+ if (number < 0) {
+ // Negative Number --> always true
+ return true;
+ } else if (number < 10) {
+ // Only 1 digit
+ if (4 <= number && number <= 7) {
+ return true;
+ }
+ return false;
+ } else if (number < 100) {
+ // 2 digits
+ var lastDigit = number % 10,
+ firstDigit = number / 10;
+ if (lastDigit === 0) {
+ return eifelerRegelAppliesToNumber(firstDigit);
+ }
+ return eifelerRegelAppliesToNumber(lastDigit);
+ } else if (number < 10000) {
+ // 3 or 4 digits --> recursively check first digit
+ while (number >= 10) {
+ number = number / 10;
+ }
+ return eifelerRegelAppliesToNumber(number);
+ } else {
+ // Anything larger than 4 digits: recursively check first n-3 digits
+ number = number / 1000;
+ return eifelerRegelAppliesToNumber(number);
+ }
+ }
+
+ moment.defineLocale('lb', {
+ months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm [Auer]',
+ LTS: 'H:mm:ss [Auer]',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm [Auer]',
+ LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
+ },
+ calendar: {
+ sameDay: '[Haut um] LT',
+ sameElse: 'L',
+ nextDay: '[Muer um] LT',
+ nextWeek: 'dddd [um] LT',
+ lastDay: '[Gëschter um] LT',
+ lastWeek: function () {
+ // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
+ switch (this.day()) {
+ case 2:
+ case 4:
+ return '[Leschten] dddd [um] LT';
+ default:
+ return '[Leschte] dddd [um] LT';
+ }
+ },
+ },
+ relativeTime: {
+ future: processFutureTime,
+ past: processPastTime,
+ s: 'e puer Sekonnen',
+ ss: '%d Sekonnen',
+ m: processRelativeTime$6,
+ mm: '%d Minutten',
+ h: processRelativeTime$6,
+ hh: '%d Stonnen',
+ d: processRelativeTime$6,
+ dd: '%d Deeg',
+ M: processRelativeTime$6,
+ MM: '%d Méint',
+ y: processRelativeTime$6,
+ yy: '%d Joer',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('lo', {
+ months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
+ '_'
+ ),
+ weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+ weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+ weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'ວັນdddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
+ isPM: function (input) {
+ return input === 'ຕອນແລງ';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ຕອນເຊົ້າ';
+ } else {
+ return 'ຕອນແລງ';
+ }
+ },
+ calendar: {
+ sameDay: '[ມື້ນີ້ເວລາ] LT',
+ nextDay: '[ມື້ອື່ນເວລາ] LT',
+ nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
+ lastDay: '[ມື້ວານນີ້ເວລາ] LT',
+ lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ອີກ %s',
+ past: '%sຜ່ານມາ',
+ s: 'ບໍ່ເທົ່າໃດວິນາທີ',
+ ss: '%d ວິນາທີ',
+ m: '1 ນາທີ',
+ mm: '%d ນາທີ',
+ h: '1 ຊົ່ວໂມງ',
+ hh: '%d ຊົ່ວໂມງ',
+ d: '1 ມື້',
+ dd: '%d ມື້',
+ M: '1 ເດືອນ',
+ MM: '%d ເດືອນ',
+ y: '1 ປີ',
+ yy: '%d ປີ',
+ },
+ dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
+ ordinal: function (number) {
+ return 'ທີ່' + number;
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var units = {
+ ss: 'sekundė_sekundžių_sekundes',
+ m: 'minutė_minutės_minutę',
+ mm: 'minutės_minučių_minutes',
+ h: 'valanda_valandos_valandą',
+ hh: 'valandos_valandų_valandas',
+ d: 'diena_dienos_dieną',
+ dd: 'dienos_dienų_dienas',
+ M: 'mėnuo_mėnesio_mėnesį',
+ MM: 'mėnesiai_mėnesių_mėnesius',
+ y: 'metai_metų_metus',
+ yy: 'metai_metų_metus',
+ };
+ function translateSeconds(number, withoutSuffix, key, isFuture) {
+ if (withoutSuffix) {
+ return 'kelios sekundės';
+ } else {
+ return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
+ }
+ }
+ function translateSingular(number, withoutSuffix, key, isFuture) {
+ return withoutSuffix
+ ? forms(key)[0]
+ : isFuture
+ ? forms(key)[1]
+ : forms(key)[2];
+ }
+ function special(number) {
+ return number % 10 === 0 || (number > 10 && number < 20);
+ }
+ function forms(key) {
+ return units[key].split('_');
+ }
+ function translate$6(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ if (number === 1) {
+ return (
+ result + translateSingular(number, withoutSuffix, key[0], isFuture)
+ );
+ } else if (withoutSuffix) {
+ return result + (special(number) ? forms(key)[1] : forms(key)[0]);
+ } else {
+ if (isFuture) {
+ return result + forms(key)[1];
+ } else {
+ return result + (special(number) ? forms(key)[1] : forms(key)[2]);
+ }
+ }
+ }
+ moment.defineLocale('lt', {
+ months: {
+ format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
+ '_'
+ ),
+ standalone:
+ 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
+ },
+ monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
+ weekdays: {
+ format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
+ '_'
+ ),
+ standalone:
+ 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
+ '_'
+ ),
+ isFormat: /dddd HH:mm/,
+ },
+ weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
+ weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY [m.] MMMM D [d.]',
+ LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
+ l: 'YYYY-MM-DD',
+ ll: 'YYYY [m.] MMMM D [d.]',
+ lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
+ },
+ calendar: {
+ sameDay: '[Šiandien] LT',
+ nextDay: '[Rytoj] LT',
+ nextWeek: 'dddd LT',
+ lastDay: '[Vakar] LT',
+ lastWeek: '[Praėjusį] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'po %s',
+ past: 'prieš %s',
+ s: translateSeconds,
+ ss: translate$6,
+ m: translateSingular,
+ mm: translate$6,
+ h: translateSingular,
+ hh: translate$6,
+ d: translateSingular,
+ dd: translate$6,
+ M: translateSingular,
+ MM: translate$6,
+ y: translateSingular,
+ yy: translate$6,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-oji/,
+ ordinal: function (number) {
+ return number + '-oji';
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var units$1 = {
+ ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
+ m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ h: 'stundas_stundām_stunda_stundas'.split('_'),
+ hh: 'stundas_stundām_stunda_stundas'.split('_'),
+ d: 'dienas_dienām_diena_dienas'.split('_'),
+ dd: 'dienas_dienām_diena_dienas'.split('_'),
+ M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ y: 'gada_gadiem_gads_gadi'.split('_'),
+ yy: 'gada_gadiem_gads_gadi'.split('_'),
+ };
+ /**
+ * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
+ */
+ function format(forms, number, withoutSuffix) {
+ if (withoutSuffix) {
+ // E.g. "21 minūte", "3 minūtes".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
+ } else {
+ // E.g. "21 minūtes" as in "pēc 21 minūtes".
+ // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
+ }
+ }
+ function relativeTimeWithPlural$1(number, withoutSuffix, key) {
+ return number + ' ' + format(units$1[key], number, withoutSuffix);
+ }
+ function relativeTimeWithSingular(number, withoutSuffix, key) {
+ return format(units$1[key], number, withoutSuffix);
+ }
+ function relativeSeconds(number, withoutSuffix) {
+ return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
+ }
+
+ moment.defineLocale('lv', {
+ months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
+ weekdays:
+ 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY.',
+ LL: 'YYYY. [gada] D. MMMM',
+ LLL: 'YYYY. [gada] D. MMMM, HH:mm',
+ LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
+ },
+ calendar: {
+ sameDay: '[Šodien pulksten] LT',
+ nextDay: '[Rīt pulksten] LT',
+ nextWeek: 'dddd [pulksten] LT',
+ lastDay: '[Vakar pulksten] LT',
+ lastWeek: '[Pagājušā] dddd [pulksten] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'pēc %s',
+ past: 'pirms %s',
+ s: relativeSeconds,
+ ss: relativeTimeWithPlural$1,
+ m: relativeTimeWithSingular,
+ mm: relativeTimeWithPlural$1,
+ h: relativeTimeWithSingular,
+ hh: relativeTimeWithPlural$1,
+ d: relativeTimeWithSingular,
+ dd: relativeTimeWithPlural$1,
+ M: relativeTimeWithSingular,
+ MM: relativeTimeWithPlural$1,
+ y: relativeTimeWithSingular,
+ yy: relativeTimeWithPlural$1,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var translator = {
+ words: {
+ //Different grammatical cases
+ ss: ['sekund', 'sekunda', 'sekundi'],
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ dd: ['dan', 'dana', 'dana'],
+ MM: ['mjesec', 'mjeseca', 'mjeseci'],
+ yy: ['godina', 'godine', 'godina'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ return number === 1
+ ? wordKey[0]
+ : number >= 2 && number <= 4
+ ? wordKey[1]
+ : wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key) {
+ var wordKey = translator.words[key];
+ if (key.length === 1) {
+ return withoutSuffix ? wordKey[0] : wordKey[1];
+ } else {
+ return (
+ number +
+ ' ' +
+ translator.correctGrammaticalCase(number, wordKey)
+ );
+ }
+ },
+ };
+
+ moment.defineLocale('me', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sjutra u] LT',
+
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[juče u] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[prošle] [nedjelje] [u] LT',
+ '[prošlog] [ponedjeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srijede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'nekoliko sekundi',
+ ss: translator.translate,
+ m: translator.translate,
+ mm: translator.translate,
+ h: translator.translate,
+ hh: translator.translate,
+ d: 'dan',
+ dd: translator.translate,
+ M: 'mjesec',
+ MM: translator.translate,
+ y: 'godinu',
+ yy: translator.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('mi', {
+ months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
+ '_'
+ ),
+ monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
+ weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
+ weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+ weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [i] HH:mm',
+ LLLL: 'dddd, D MMMM YYYY [i] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i teie mahana, i] LT',
+ nextDay: '[apopo i] LT',
+ nextWeek: 'dddd [i] LT',
+ lastDay: '[inanahi i] LT',
+ lastWeek: 'dddd [whakamutunga i] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'i roto i %s',
+ past: '%s i mua',
+ s: 'te hēkona ruarua',
+ ss: '%d hēkona',
+ m: 'he meneti',
+ mm: '%d meneti',
+ h: 'te haora',
+ hh: '%d haora',
+ d: 'he ra',
+ dd: '%d ra',
+ M: 'he marama',
+ MM: '%d marama',
+ y: 'he tau',
+ yy: '%d tau',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('mk', {
+ months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
+ '_'
+ ),
+ monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
+ '_'
+ ),
+ weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
+ weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Денес во] LT',
+ nextDay: '[Утре во] LT',
+ nextWeek: '[Во] dddd [во] LT',
+ lastDay: '[Вчера во] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 6:
+ return '[Изминатата] dddd [во] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[Изминатиот] dddd [во] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: 'пред %s',
+ s: 'неколку секунди',
+ ss: '%d секунди',
+ m: 'една минута',
+ mm: '%d минути',
+ h: 'еден час',
+ hh: '%d часа',
+ d: 'еден ден',
+ dd: '%d дена',
+ M: 'еден месец',
+ MM: '%d месеци',
+ y: 'една година',
+ yy: '%d години',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+ ordinal: function (number) {
+ var lastDigit = number % 10,
+ last2Digits = number % 100;
+ if (number === 0) {
+ return number + '-ев';
+ } else if (last2Digits === 0) {
+ return number + '-ен';
+ } else if (last2Digits > 10 && last2Digits < 20) {
+ return number + '-ти';
+ } else if (lastDigit === 1) {
+ return number + '-ви';
+ } else if (lastDigit === 2) {
+ return number + '-ри';
+ } else if (lastDigit === 7 || lastDigit === 8) {
+ return number + '-ми';
+ } else {
+ return number + '-ти';
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ml', {
+ months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
+ '_'
+ ),
+ weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
+ weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm -നു',
+ LTS: 'A h:mm:ss -നു',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm -നു',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',
+ },
+ calendar: {
+ sameDay: '[ഇന്ന്] LT',
+ nextDay: '[നാളെ] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ഇന്നലെ] LT',
+ lastWeek: '[കഴിഞ്ഞ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s കഴിഞ്ഞ്',
+ past: '%s മുൻപ്',
+ s: 'അൽപ നിമിഷങ്ങൾ',
+ ss: '%d സെക്കൻഡ്',
+ m: 'ഒരു മിനിറ്റ്',
+ mm: '%d മിനിറ്റ്',
+ h: 'ഒരു മണിക്കൂർ',
+ hh: '%d മണിക്കൂർ',
+ d: 'ഒരു ദിവസം',
+ dd: '%d ദിവസം',
+ M: 'ഒരു മാസം',
+ MM: '%d മാസം',
+ y: 'ഒരു വർഷം',
+ yy: '%d വർഷം',
+ },
+ meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'രാത്രി' && hour >= 4) ||
+ meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
+ meridiem === 'വൈകുന്നേരം'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'രാത്രി';
+ } else if (hour < 12) {
+ return 'രാവിലെ';
+ } else if (hour < 17) {
+ return 'ഉച്ച കഴിഞ്ഞ്';
+ } else if (hour < 20) {
+ return 'വൈകുന്നേരം';
+ } else {
+ return 'രാത്രി';
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function translate$7(number, withoutSuffix, key, isFuture) {
+ switch (key) {
+ case 's':
+ return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
+ case 'ss':
+ return number + (withoutSuffix ? ' секунд' : ' секундын');
+ case 'm':
+ case 'mm':
+ return number + (withoutSuffix ? ' минут' : ' минутын');
+ case 'h':
+ case 'hh':
+ return number + (withoutSuffix ? ' цаг' : ' цагийн');
+ case 'd':
+ case 'dd':
+ return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
+ case 'M':
+ case 'MM':
+ return number + (withoutSuffix ? ' сар' : ' сарын');
+ case 'y':
+ case 'yy':
+ return number + (withoutSuffix ? ' жил' : ' жилийн');
+ default:
+ return number;
+ }
+ }
+
+ moment.defineLocale('mn', {
+ months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
+ '_'
+ ),
+ monthsShort:
+ '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
+ weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
+ weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY оны MMMMын D',
+ LLL: 'YYYY оны MMMMын D HH:mm',
+ LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
+ },
+ meridiemParse: /ҮӨ|ҮХ/i,
+ isPM: function (input) {
+ return input === 'ҮХ';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ҮӨ';
+ } else {
+ return 'ҮХ';
+ }
+ },
+ calendar: {
+ sameDay: '[Өнөөдөр] LT',
+ nextDay: '[Маргааш] LT',
+ nextWeek: '[Ирэх] dddd LT',
+ lastDay: '[Өчигдөр] LT',
+ lastWeek: '[Өнгөрсөн] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s дараа',
+ past: '%s өмнө',
+ s: translate$7,
+ ss: translate$7,
+ m: translate$7,
+ mm: translate$7,
+ h: translate$7,
+ hh: translate$7,
+ d: translate$7,
+ dd: translate$7,
+ M: translate$7,
+ MM: translate$7,
+ y: translate$7,
+ yy: translate$7,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + ' өдөр';
+ default:
+ return number;
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$c = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap$b = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ };
+
+ function relativeTimeMr(number, withoutSuffix, string, isFuture) {
+ var output = '';
+ if (withoutSuffix) {
+ switch (string) {
+ case 's':
+ output = 'काही सेकंद';
+ break;
+ case 'ss':
+ output = '%d सेकंद';
+ break;
+ case 'm':
+ output = 'एक मिनिट';
+ break;
+ case 'mm':
+ output = '%d मिनिटे';
+ break;
+ case 'h':
+ output = 'एक तास';
+ break;
+ case 'hh':
+ output = '%d तास';
+ break;
+ case 'd':
+ output = 'एक दिवस';
+ break;
+ case 'dd':
+ output = '%d दिवस';
+ break;
+ case 'M':
+ output = 'एक महिना';
+ break;
+ case 'MM':
+ output = '%d महिने';
+ break;
+ case 'y':
+ output = 'एक वर्ष';
+ break;
+ case 'yy':
+ output = '%d वर्षे';
+ break;
+ }
+ } else {
+ switch (string) {
+ case 's':
+ output = 'काही सेकंदां';
+ break;
+ case 'ss':
+ output = '%d सेकंदां';
+ break;
+ case 'm':
+ output = 'एका मिनिटा';
+ break;
+ case 'mm':
+ output = '%d मिनिटां';
+ break;
+ case 'h':
+ output = 'एका तासा';
+ break;
+ case 'hh':
+ output = '%d तासां';
+ break;
+ case 'd':
+ output = 'एका दिवसा';
+ break;
+ case 'dd':
+ output = '%d दिवसां';
+ break;
+ case 'M':
+ output = 'एका महिन्या';
+ break;
+ case 'MM':
+ output = '%d महिन्यां';
+ break;
+ case 'y':
+ output = 'एका वर्षा';
+ break;
+ case 'yy':
+ output = '%d वर्षां';
+ break;
+ }
+ }
+ return output.replace(/%d/i, number);
+ }
+
+ moment.defineLocale('mr', {
+ months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
+ '_'
+ ),
+ monthsShort:
+ 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm वाजता',
+ LTS: 'A h:mm:ss वाजता',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm वाजता',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',
+ },
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[उद्या] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[काल] LT',
+ lastWeek: '[मागील] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sमध्ये',
+ past: '%sपूर्वी',
+ s: relativeTimeMr,
+ ss: relativeTimeMr,
+ m: relativeTimeMr,
+ mm: relativeTimeMr,
+ h: relativeTimeMr,
+ hh: relativeTimeMr,
+ d: relativeTimeMr,
+ dd: relativeTimeMr,
+ M: relativeTimeMr,
+ MM: relativeTimeMr,
+ y: relativeTimeMr,
+ yy: relativeTimeMr,
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap$b[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$c[match];
+ });
+ },
+ meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
+ return hour;
+ } else if (
+ meridiem === 'दुपारी' ||
+ meridiem === 'सायंकाळी' ||
+ meridiem === 'रात्री'
+ ) {
+ return hour >= 12 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour >= 0 && hour < 6) {
+ return 'पहाटे';
+ } else if (hour < 12) {
+ return 'सकाळी';
+ } else if (hour < 17) {
+ return 'दुपारी';
+ } else if (hour < 20) {
+ return 'सायंकाळी';
+ } else {
+ return 'रात्री';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ms-my', {
+ months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+ weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+ weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+ weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'tengahari';
+ } else if (hours < 19) {
+ return 'petang';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Esok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kelmarin pukul] LT',
+ lastWeek: 'dddd [lepas pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lepas',
+ s: 'beberapa saat',
+ ss: '%d saat',
+ m: 'seminit',
+ mm: '%d minit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ms', {
+ months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+ weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+ weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+ weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'tengahari';
+ } else if (hours < 19) {
+ return 'petang';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Esok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kelmarin pukul] LT',
+ lastWeek: 'dddd [lepas pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lepas',
+ s: 'beberapa saat',
+ ss: '%d saat',
+ m: 'seminit',
+ mm: '%d minit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('mt', {
+ months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
+ weekdays:
+ 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
+ '_'
+ ),
+ weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
+ weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Illum fil-]LT',
+ nextDay: '[Għada fil-]LT',
+ nextWeek: 'dddd [fil-]LT',
+ lastDay: '[Il-bieraħ fil-]LT',
+ lastWeek: 'dddd [li għadda] [fil-]LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'f’ %s',
+ past: '%s ilu',
+ s: 'ftit sekondi',
+ ss: '%d sekondi',
+ m: 'minuta',
+ mm: '%d minuti',
+ h: 'siegħa',
+ hh: '%d siegħat',
+ d: 'ġurnata',
+ dd: '%d ġranet',
+ M: 'xahar',
+ MM: '%d xhur',
+ y: 'sena',
+ yy: '%d sni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$d = {
+ 1: '၁',
+ 2: '၂',
+ 3: '၃',
+ 4: '၄',
+ 5: '၅',
+ 6: '၆',
+ 7: '၇',
+ 8: '၈',
+ 9: '၉',
+ 0: '၀',
+ },
+ numberMap$c = {
+ '၁': '1',
+ '၂': '2',
+ '၃': '3',
+ '၄': '4',
+ '၅': '5',
+ '၆': '6',
+ '၇': '7',
+ '၈': '8',
+ '၉': '9',
+ '၀': '0',
+ };
+
+ moment.defineLocale('my', {
+ months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
+ '_'
+ ),
+ monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
+ weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
+ '_'
+ ),
+ weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+ weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[ယနေ.] LT [မှာ]',
+ nextDay: '[မနက်ဖြန်] LT [မှာ]',
+ nextWeek: 'dddd LT [မှာ]',
+ lastDay: '[မနေ.က] LT [မှာ]',
+ lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'လာမည့် %s မှာ',
+ past: 'လွန်ခဲ့သော %s က',
+ s: 'စက္ကန်.အနည်းငယ်',
+ ss: '%d စက္ကန့်',
+ m: 'တစ်မိနစ်',
+ mm: '%d မိနစ်',
+ h: 'တစ်နာရီ',
+ hh: '%d နာရီ',
+ d: 'တစ်ရက်',
+ dd: '%d ရက်',
+ M: 'တစ်လ',
+ MM: '%d လ',
+ y: 'တစ်နှစ်',
+ yy: '%d နှစ်',
+ },
+ preparse: function (string) {
+ return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
+ return numberMap$c[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$d[match];
+ });
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('nb', {
+ months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
+ weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] HH:mm',
+ LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i dag kl.] LT',
+ nextDay: '[i morgen kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[i går kl.] LT',
+ lastWeek: '[forrige] dddd [kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s siden',
+ s: 'noen sekunder',
+ ss: '%d sekunder',
+ m: 'ett minutt',
+ mm: '%d minutter',
+ h: 'en time',
+ hh: '%d timer',
+ d: 'en dag',
+ dd: '%d dager',
+ w: 'en uke',
+ ww: '%d uker',
+ M: 'en måned',
+ MM: '%d måneder',
+ y: 'ett år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$e = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap$d = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ };
+
+ moment.defineLocale('ne', {
+ months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
+ '_'
+ ),
+ monthsShort:
+ 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
+ '_'
+ ),
+ weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
+ weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'Aको h:mm बजे',
+ LTS: 'Aको h:mm:ss बजे',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, Aको h:mm बजे',
+ LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap$d[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$e[match];
+ });
+ },
+ meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'राति') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'बिहान') {
+ return hour;
+ } else if (meridiem === 'दिउँसो') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'साँझ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 3) {
+ return 'राति';
+ } else if (hour < 12) {
+ return 'बिहान';
+ } else if (hour < 16) {
+ return 'दिउँसो';
+ } else if (hour < 20) {
+ return 'साँझ';
+ } else {
+ return 'राति';
+ }
+ },
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[भोलि] LT',
+ nextWeek: '[आउँदो] dddd[,] LT',
+ lastDay: '[हिजो] LT',
+ lastWeek: '[गएको] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sमा',
+ past: '%s अगाडि',
+ s: 'केही क्षण',
+ ss: '%d सेकेण्ड',
+ m: 'एक मिनेट',
+ mm: '%d मिनेट',
+ h: 'एक घण्टा',
+ hh: '%d घण्टा',
+ d: 'एक दिन',
+ dd: '%d दिन',
+ M: 'एक महिना',
+ MM: '%d महिना',
+ y: 'एक बर्ष',
+ yy: '%d बर्ष',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortWithDots$1 =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots$1 =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ monthsParse$8 = [
+ /^jan/i,
+ /^feb/i,
+ /^maart|mrt.?$/i,
+ /^apr/i,
+ /^mei$/i,
+ /^jun[i.]?$/i,
+ /^jul[i.]?$/i,
+ /^aug/i,
+ /^sep/i,
+ /^okt/i,
+ /^nov/i,
+ /^dec/i,
+ ],
+ monthsRegex$7 =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+ moment.defineLocale('nl-be', {
+ months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots$1;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots$1[m.month()];
+ } else {
+ return monthsShortWithDots$1[m.month()];
+ }
+ },
+
+ monthsRegex: monthsRegex$7,
+ monthsShortRegex: monthsRegex$7,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+ monthsParse: monthsParse$8,
+ longMonthsParse: monthsParse$8,
+ shortMonthsParse: monthsParse$8,
+
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+ weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+ weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[vandaag om] LT',
+ nextDay: '[morgen om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[gisteren om] LT',
+ lastWeek: '[afgelopen] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'over %s',
+ past: '%s geleden',
+ s: 'een paar seconden',
+ ss: '%d seconden',
+ m: 'één minuut',
+ mm: '%d minuten',
+ h: 'één uur',
+ hh: '%d uur',
+ d: 'één dag',
+ dd: '%d dagen',
+ M: 'één maand',
+ MM: '%d maanden',
+ y: 'één jaar',
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortWithDots$2 =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots$2 =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ monthsParse$9 = [
+ /^jan/i,
+ /^feb/i,
+ /^maart|mrt.?$/i,
+ /^apr/i,
+ /^mei$/i,
+ /^jun[i.]?$/i,
+ /^jul[i.]?$/i,
+ /^aug/i,
+ /^sep/i,
+ /^okt/i,
+ /^nov/i,
+ /^dec/i,
+ ],
+ monthsRegex$8 =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+ moment.defineLocale('nl', {
+ months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots$2;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots$2[m.month()];
+ } else {
+ return monthsShortWithDots$2[m.month()];
+ }
+ },
+
+ monthsRegex: monthsRegex$8,
+ monthsShortRegex: monthsRegex$8,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+ monthsParse: monthsParse$9,
+ longMonthsParse: monthsParse$9,
+ shortMonthsParse: monthsParse$9,
+
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+ weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+ weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[vandaag om] LT',
+ nextDay: '[morgen om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[gisteren om] LT',
+ lastWeek: '[afgelopen] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'over %s',
+ past: '%s geleden',
+ s: 'een paar seconden',
+ ss: '%d seconden',
+ m: 'één minuut',
+ mm: '%d minuten',
+ h: 'één uur',
+ hh: '%d uur',
+ d: 'één dag',
+ dd: '%d dagen',
+ w: 'één week',
+ ww: '%d weken',
+ M: 'één maand',
+ MM: '%d maanden',
+ y: 'één jaar',
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('nn', {
+ months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
+ weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
+ weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] H:mm',
+ LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[I dag klokka] LT',
+ nextDay: '[I morgon klokka] LT',
+ nextWeek: 'dddd [klokka] LT',
+ lastDay: '[I går klokka] LT',
+ lastWeek: '[Føregåande] dddd [klokka] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s sidan',
+ s: 'nokre sekund',
+ ss: '%d sekund',
+ m: 'eit minutt',
+ mm: '%d minutt',
+ h: 'ein time',
+ hh: '%d timar',
+ d: 'ein dag',
+ dd: '%d dagar',
+ w: 'ei veke',
+ ww: '%d veker',
+ M: 'ein månad',
+ MM: '%d månader',
+ y: 'eit år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('oc-lnc', {
+ months: {
+ standalone:
+ 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
+ '_'
+ ),
+ format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\s)+MMMM/,
+ },
+ monthsShort:
+ 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
+ '_'
+ ),
+ weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
+ weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [de] YYYY',
+ ll: 'D MMM YYYY',
+ LLL: 'D MMMM [de] YYYY [a] H:mm',
+ lll: 'D MMM YYYY, H:mm',
+ LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
+ llll: 'ddd D MMM YYYY, H:mm',
+ },
+ calendar: {
+ sameDay: '[uèi a] LT',
+ nextDay: '[deman a] LT',
+ nextWeek: 'dddd [a] LT',
+ lastDay: '[ièr a] LT',
+ lastWeek: 'dddd [passat a] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: "d'aquí %s",
+ past: 'fa %s',
+ s: 'unas segondas',
+ ss: '%d segondas',
+ m: 'una minuta',
+ mm: '%d minutas',
+ h: 'una ora',
+ hh: '%d oras',
+ d: 'un jorn',
+ dd: '%d jorns',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
+ ordinal: function (number, period) {
+ var output =
+ number === 1
+ ? 'r'
+ : number === 2
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
+ if (period === 'w' || period === 'W') {
+ output = 'a';
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4,
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$f = {
+ 1: '੧',
+ 2: '੨',
+ 3: '੩',
+ 4: '੪',
+ 5: '੫',
+ 6: '੬',
+ 7: '੭',
+ 8: '੮',
+ 9: '੯',
+ 0: '੦',
+ },
+ numberMap$e = {
+ '੧': '1',
+ '੨': '2',
+ '੩': '3',
+ '੪': '4',
+ '੫': '5',
+ '੬': '6',
+ '੭': '7',
+ '੮': '8',
+ '੯': '9',
+ '੦': '0',
+ };
+
+ moment.defineLocale('pa-in', {
+ // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
+ months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
+ '_'
+ ),
+ weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
+ '_'
+ ),
+ weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+ weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm ਵਜੇ',
+ LTS: 'A h:mm:ss ਵਜੇ',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
+ },
+ calendar: {
+ sameDay: '[ਅਜ] LT',
+ nextDay: '[ਕਲ] LT',
+ nextWeek: '[ਅਗਲਾ] dddd, LT',
+ lastDay: '[ਕਲ] LT',
+ lastWeek: '[ਪਿਛਲੇ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ਵਿੱਚ',
+ past: '%s ਪਿਛਲੇ',
+ s: 'ਕੁਝ ਸਕਿੰਟ',
+ ss: '%d ਸਕਿੰਟ',
+ m: 'ਇਕ ਮਿੰਟ',
+ mm: '%d ਮਿੰਟ',
+ h: 'ਇੱਕ ਘੰਟਾ',
+ hh: '%d ਘੰਟੇ',
+ d: 'ਇੱਕ ਦਿਨ',
+ dd: '%d ਦਿਨ',
+ M: 'ਇੱਕ ਮਹੀਨਾ',
+ MM: '%d ਮਹੀਨੇ',
+ y: 'ਇੱਕ ਸਾਲ',
+ yy: '%d ਸਾਲ',
+ },
+ preparse: function (string) {
+ return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
+ return numberMap$e[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$f[match];
+ });
+ },
+ // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
+ meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ਰਾਤ') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ਸਵੇਰ') {
+ return hour;
+ } else if (meridiem === 'ਦੁਪਹਿਰ') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'ਸ਼ਾਮ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ਰਾਤ';
+ } else if (hour < 10) {
+ return 'ਸਵੇਰ';
+ } else if (hour < 17) {
+ return 'ਦੁਪਹਿਰ';
+ } else if (hour < 20) {
+ return 'ਸ਼ਾਮ';
+ } else {
+ return 'ਰਾਤ';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsNominative =
+ 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
+ '_'
+ ),
+ monthsSubjective =
+ 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
+ '_'
+ ),
+ monthsParse$a = [
+ /^sty/i,
+ /^lut/i,
+ /^mar/i,
+ /^kwi/i,
+ /^maj/i,
+ /^cze/i,
+ /^lip/i,
+ /^sie/i,
+ /^wrz/i,
+ /^paź/i,
+ /^lis/i,
+ /^gru/i,
+ ];
+ function plural$3(n) {
+ return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
+ }
+ function translate$8(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ return result + (plural$3(number) ? 'sekundy' : 'sekund');
+ case 'm':
+ return withoutSuffix ? 'minuta' : 'minutę';
+ case 'mm':
+ return result + (plural$3(number) ? 'minuty' : 'minut');
+ case 'h':
+ return withoutSuffix ? 'godzina' : 'godzinę';
+ case 'hh':
+ return result + (plural$3(number) ? 'godziny' : 'godzin');
+ case 'ww':
+ return result + (plural$3(number) ? 'tygodnie' : 'tygodni');
+ case 'MM':
+ return result + (plural$3(number) ? 'miesiące' : 'miesięcy');
+ case 'yy':
+ return result + (plural$3(number) ? 'lata' : 'lat');
+ }
+ }
+
+ moment.defineLocale('pl', {
+ months: function (momentToFormat, format) {
+ if (!momentToFormat) {
+ return monthsNominative;
+ } else if (/D MMMM/.test(format)) {
+ return monthsSubjective[momentToFormat.month()];
+ } else {
+ return monthsNominative[momentToFormat.month()];
+ }
+ },
+ monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
+ monthsParse: monthsParse$a,
+ longMonthsParse: monthsParse$a,
+ shortMonthsParse: monthsParse$a,
+ weekdays:
+ 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
+ weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
+ weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Dziś o] LT',
+ nextDay: '[Jutro o] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[W niedzielę o] LT';
+
+ case 2:
+ return '[We wtorek o] LT';
+
+ case 3:
+ return '[W środę o] LT';
+
+ case 6:
+ return '[W sobotę o] LT';
+
+ default:
+ return '[W] dddd [o] LT';
+ }
+ },
+ lastDay: '[Wczoraj o] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[W zeszłą niedzielę o] LT';
+ case 3:
+ return '[W zeszłą środę o] LT';
+ case 6:
+ return '[W zeszłą sobotę o] LT';
+ default:
+ return '[W zeszły] dddd [o] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: '%s temu',
+ s: 'kilka sekund',
+ ss: translate$8,
+ m: translate$8,
+ mm: translate$8,
+ h: translate$8,
+ hh: translate$8,
+ d: '1 dzień',
+ dd: '%d dni',
+ w: 'tydzień',
+ ww: translate$8,
+ M: 'miesiąc',
+ MM: translate$8,
+ y: 'rok',
+ yy: translate$8,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('pt-br', {
+ months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
+ weekdays:
+ 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
+ weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hoje às] LT',
+ nextDay: '[Amanhã às] LT',
+ nextWeek: 'dddd [às] LT',
+ lastDay: '[Ontem às] LT',
+ lastWeek: function () {
+ return this.day() === 0 || this.day() === 6
+ ? '[Último] dddd [às] LT' // Saturday + Sunday
+ : '[Última] dddd [às] LT'; // Monday - Friday
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'em %s',
+ past: 'há %s',
+ s: 'poucos segundos',
+ ss: '%d segundos',
+ m: 'um minuto',
+ mm: '%d minutos',
+ h: 'uma hora',
+ hh: '%d horas',
+ d: 'um dia',
+ dd: '%d dias',
+ M: 'um mês',
+ MM: '%d meses',
+ y: 'um ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ invalidDate: 'Data inválida',
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('pt', {
+ months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
+ weekdays:
+ 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
+ weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY HH:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hoje às] LT',
+ nextDay: '[Amanhã às] LT',
+ nextWeek: 'dddd [às] LT',
+ lastDay: '[Ontem às] LT',
+ lastWeek: function () {
+ return this.day() === 0 || this.day() === 6
+ ? '[Último] dddd [às] LT' // Saturday + Sunday
+ : '[Última] dddd [às] LT'; // Monday - Friday
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'em %s',
+ past: 'há %s',
+ s: 'segundos',
+ ss: '%d segundos',
+ m: 'um minuto',
+ mm: '%d minutos',
+ h: 'uma hora',
+ hh: '%d horas',
+ d: 'um dia',
+ dd: '%d dias',
+ w: 'uma semana',
+ ww: '%d semanas',
+ M: 'um mês',
+ MM: '%d meses',
+ y: 'um ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function relativeTimeWithPlural$2(number, withoutSuffix, key) {
+ var format = {
+ ss: 'secunde',
+ mm: 'minute',
+ hh: 'ore',
+ dd: 'zile',
+ ww: 'săptămâni',
+ MM: 'luni',
+ yy: 'ani',
+ },
+ separator = ' ';
+ if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
+ separator = ' de ';
+ }
+ return number + separator + format[key];
+ }
+
+ moment.defineLocale('ro', {
+ months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
+ weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
+ weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[azi la] LT',
+ nextDay: '[mâine la] LT',
+ nextWeek: 'dddd [la] LT',
+ lastDay: '[ieri la] LT',
+ lastWeek: '[fosta] dddd [la] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'peste %s',
+ past: '%s în urmă',
+ s: 'câteva secunde',
+ ss: relativeTimeWithPlural$2,
+ m: 'un minut',
+ mm: relativeTimeWithPlural$2,
+ h: 'o oră',
+ hh: relativeTimeWithPlural$2,
+ d: 'o zi',
+ dd: relativeTimeWithPlural$2,
+ w: 'o săptămână',
+ ww: relativeTimeWithPlural$2,
+ M: 'o lună',
+ MM: relativeTimeWithPlural$2,
+ y: 'un an',
+ yy: relativeTimeWithPlural$2,
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function plural$4(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+ }
+ function relativeTimeWithPlural$3(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
+ mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
+ hh: 'час_часа_часов',
+ dd: 'день_дня_дней',
+ ww: 'неделя_недели_недель',
+ MM: 'месяц_месяца_месяцев',
+ yy: 'год_года_лет',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'минута' : 'минуту';
+ } else {
+ return number + ' ' + plural$4(format[key], +number);
+ }
+ }
+ var monthsParse$b = [
+ /^янв/i,
+ /^фев/i,
+ /^мар/i,
+ /^апр/i,
+ /^ма[йя]/i,
+ /^июн/i,
+ /^июл/i,
+ /^авг/i,
+ /^сен/i,
+ /^окт/i,
+ /^ноя/i,
+ /^дек/i,
+ ];
+
+ // http://new.gramota.ru/spravka/rules/139-prop : § 103
+ // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
+ // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
+ moment.defineLocale('ru', {
+ months: {
+ format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
+ '_'
+ ),
+ standalone:
+ 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
+ '_'
+ ),
+ },
+ monthsShort: {
+ // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
+ format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
+ '_'
+ ),
+ standalone:
+ 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
+ '_'
+ ),
+ },
+ weekdays: {
+ standalone:
+ 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
+ '_'
+ ),
+ format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
+ '_'
+ ),
+ isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
+ },
+ weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ monthsParse: monthsParse$b,
+ longMonthsParse: monthsParse$b,
+ shortMonthsParse: monthsParse$b,
+
+ // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
+ monthsRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+ // копия предыдущего
+ monthsShortRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+ // полные названия с падежами
+ monthsStrictRegex:
+ /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
+
+ // Выражение, которое соответствует только сокращённым формам
+ monthsShortStrictRegex:
+ /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY г.',
+ LLL: 'D MMMM YYYY г., H:mm',
+ LLLL: 'dddd, D MMMM YYYY г., H:mm',
+ },
+ calendar: {
+ sameDay: '[Сегодня, в] LT',
+ nextDay: '[Завтра, в] LT',
+ lastDay: '[Вчера, в] LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В следующее] dddd, [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В следующий] dddd, [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В следующую] dddd, [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd, [в] LT';
+ } else {
+ return '[В] dddd, [в] LT';
+ }
+ }
+ },
+ lastWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В прошлое] dddd, [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В прошлый] dddd, [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В прошлую] dddd, [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd, [в] LT';
+ } else {
+ return '[В] dddd, [в] LT';
+ }
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'через %s',
+ past: '%s назад',
+ s: 'несколько секунд',
+ ss: relativeTimeWithPlural$3,
+ m: relativeTimeWithPlural$3,
+ mm: relativeTimeWithPlural$3,
+ h: 'час',
+ hh: relativeTimeWithPlural$3,
+ d: 'день',
+ dd: relativeTimeWithPlural$3,
+ w: 'неделя',
+ ww: relativeTimeWithPlural$3,
+ M: 'месяц',
+ MM: relativeTimeWithPlural$3,
+ y: 'год',
+ yy: relativeTimeWithPlural$3,
+ },
+ meridiemParse: /ночи|утра|дня|вечера/i,
+ isPM: function (input) {
+ return /^(дня|вечера)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночи';
+ } else if (hour < 12) {
+ return 'утра';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечера';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ case 'w':
+ case 'W':
+ return number + '-я';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$8 = [
+ 'جنوري',
+ 'فيبروري',
+ 'مارچ',
+ 'اپريل',
+ 'مئي',
+ 'جون',
+ 'جولاءِ',
+ 'آگسٽ',
+ 'سيپٽمبر',
+ 'آڪٽوبر',
+ 'نومبر',
+ 'ڊسمبر',
+ ],
+ days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
+
+ moment.defineLocale('sd', {
+ months: months$8,
+ monthsShort: months$8,
+ weekdays: days,
+ weekdaysShort: days,
+ weekdaysMin: days,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd، D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /صبح|شام/,
+ isPM: function (input) {
+ return 'شام' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'صبح';
+ }
+ return 'شام';
+ },
+ calendar: {
+ sameDay: '[اڄ] LT',
+ nextDay: '[سڀاڻي] LT',
+ nextWeek: 'dddd [اڳين هفتي تي] LT',
+ lastDay: '[ڪالهه] LT',
+ lastWeek: '[گزريل هفتي] dddd [تي] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s پوء',
+ past: '%s اڳ',
+ s: 'چند سيڪنڊ',
+ ss: '%d سيڪنڊ',
+ m: 'هڪ منٽ',
+ mm: '%d منٽ',
+ h: 'هڪ ڪلاڪ',
+ hh: '%d ڪلاڪ',
+ d: 'هڪ ڏينهن',
+ dd: '%d ڏينهن',
+ M: 'هڪ مهينو',
+ MM: '%d مهينا',
+ y: 'هڪ سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('se', {
+ months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
+ weekdays:
+ 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
+ '_'
+ ),
+ weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
+ weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'MMMM D. [b.] YYYY',
+ LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
+ LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[otne ti] LT',
+ nextDay: '[ihttin ti] LT',
+ nextWeek: 'dddd [ti] LT',
+ lastDay: '[ikte ti] LT',
+ lastWeek: '[ovddit] dddd [ti] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s geažes',
+ past: 'maŋit %s',
+ s: 'moadde sekunddat',
+ ss: '%d sekunddat',
+ m: 'okta minuhta',
+ mm: '%d minuhtat',
+ h: 'okta diimmu',
+ hh: '%d diimmut',
+ d: 'okta beaivi',
+ dd: '%d beaivvit',
+ M: 'okta mánnu',
+ MM: '%d mánut',
+ y: 'okta jahki',
+ yy: '%d jagit',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ /*jshint -W100*/
+ moment.defineLocale('si', {
+ months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
+ '_'
+ ),
+ monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
+ '_'
+ ),
+ weekdays:
+ 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
+ '_'
+ ),
+ weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),
+ weekdaysMin: 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'a h:mm',
+ LTS: 'a h:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY MMMM D',
+ LLL: 'YYYY MMMM D, a h:mm',
+ LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',
+ },
+ calendar: {
+ sameDay: '[අද] LT[ට]',
+ nextDay: '[හෙට] LT[ට]',
+ nextWeek: 'dddd LT[ට]',
+ lastDay: '[ඊයේ] LT[ට]',
+ lastWeek: '[පසුගිය] dddd LT[ට]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sකින්',
+ past: '%sකට පෙර',
+ s: 'තත්පර කිහිපය',
+ ss: 'තත්පර %d',
+ m: 'මිනිත්තුව',
+ mm: 'මිනිත්තු %d',
+ h: 'පැය',
+ hh: 'පැය %d',
+ d: 'දිනය',
+ dd: 'දින %d',
+ M: 'මාසය',
+ MM: 'මාස %d',
+ y: 'වසර',
+ yy: 'වසර %d',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
+ ordinal: function (number) {
+ return number + ' වැනි';
+ },
+ meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
+ isPM: function (input) {
+ return input === 'ප.ව.' || input === 'පස් වරු';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'ප.ව.' : 'පස් වරු';
+ } else {
+ return isLower ? 'පෙ.ව.' : 'පෙර වරු';
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$9 =
+ 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
+ '_'
+ ),
+ monthsShort$7 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
+ function plural$5(n) {
+ return n > 1 && n < 5;
+ }
+ function translate$9(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
+ case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'sekundy' : 'sekúnd');
+ } else {
+ return result + 'sekundami';
+ }
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'minúty' : 'minút');
+ } else {
+ return result + 'minútami';
+ }
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'hodiny' : 'hodín');
+ } else {
+ return result + 'hodinami';
+ }
+ case 'd': // a day / in a day / a day ago
+ return withoutSuffix || isFuture ? 'deň' : 'dňom';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'dni' : 'dní');
+ } else {
+ return result + 'dňami';
+ }
+ case 'M': // a month / in a month / a month ago
+ return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'mesiace' : 'mesiacov');
+ } else {
+ return result + 'mesiacmi';
+ }
+ case 'y': // a year / in a year / a year ago
+ return withoutSuffix || isFuture ? 'rok' : 'rokom';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'roky' : 'rokov');
+ } else {
+ return result + 'rokmi';
+ }
+ }
+ }
+
+ moment.defineLocale('sk', {
+ months: months$9,
+ monthsShort: monthsShort$7,
+ weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
+ weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
+ weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[dnes o] LT',
+ nextDay: '[zajtra o] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [o] LT';
+ case 3:
+ return '[v stredu o] LT';
+ case 4:
+ return '[vo štvrtok o] LT';
+ case 5:
+ return '[v piatok o] LT';
+ case 6:
+ return '[v sobotu o] LT';
+ }
+ },
+ lastDay: '[včera o] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[minulú nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[minulý] dddd [o] LT';
+ case 3:
+ return '[minulú stredu o] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [o] LT';
+ case 6:
+ return '[minulú sobotu o] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'pred %s',
+ s: translate$9,
+ ss: translate$9,
+ m: translate$9,
+ mm: translate$9,
+ h: translate$9,
+ hh: translate$9,
+ d: translate$9,
+ dd: translate$9,
+ M: translate$9,
+ MM: translate$9,
+ y: translate$9,
+ yy: translate$9,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$7(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's':
+ return withoutSuffix || isFuture
+ ? 'nekaj sekund'
+ : 'nekaj sekundami';
+ case 'ss':
+ if (number === 1) {
+ result += withoutSuffix ? 'sekundo' : 'sekundi';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
+ } else {
+ result += 'sekund';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'ena minuta' : 'eno minuto';
+ case 'mm':
+ if (number === 1) {
+ result += withoutSuffix ? 'minuta' : 'minuto';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'minute' : 'minutami';
+ } else {
+ result += withoutSuffix || isFuture ? 'minut' : 'minutami';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'ena ura' : 'eno uro';
+ case 'hh':
+ if (number === 1) {
+ result += withoutSuffix ? 'ura' : 'uro';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'uri' : 'urama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'ure' : 'urami';
+ } else {
+ result += withoutSuffix || isFuture ? 'ur' : 'urami';
+ }
+ return result;
+ case 'd':
+ return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
+ case 'dd':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'dan' : 'dnem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
+ } else {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
+ }
+ return result;
+ case 'M':
+ return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
+ case 'MM':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
+ } else {
+ result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
+ }
+ return result;
+ case 'y':
+ return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
+ case 'yy':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'leto' : 'letom';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'leti' : 'letoma';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'leta' : 'leti';
+ } else {
+ result += withoutSuffix || isFuture ? 'let' : 'leti';
+ }
+ return result;
+ }
+ }
+
+ moment.defineLocale('sl', {
+ months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
+ weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
+ weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD. MM. YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danes ob] LT',
+ nextDay: '[jutri ob] LT',
+
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v] [nedeljo] [ob] LT';
+ case 3:
+ return '[v] [sredo] [ob] LT';
+ case 6:
+ return '[v] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[v] dddd [ob] LT';
+ }
+ },
+ lastDay: '[včeraj ob] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[prejšnjo] [nedeljo] [ob] LT';
+ case 3:
+ return '[prejšnjo] [sredo] [ob] LT';
+ case 6:
+ return '[prejšnjo] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prejšnji] dddd [ob] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'čez %s',
+ past: 'pred %s',
+ s: processRelativeTime$7,
+ ss: processRelativeTime$7,
+ m: processRelativeTime$7,
+ mm: processRelativeTime$7,
+ h: processRelativeTime$7,
+ hh: processRelativeTime$7,
+ d: processRelativeTime$7,
+ dd: processRelativeTime$7,
+ M: processRelativeTime$7,
+ MM: processRelativeTime$7,
+ y: processRelativeTime$7,
+ yy: processRelativeTime$7,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('sq', {
+ months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
+ weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
+ '_'
+ ),
+ weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
+ weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
+ weekdaysParseExact: true,
+ meridiemParse: /PD|MD/,
+ isPM: function (input) {
+ return input.charAt(0) === 'M';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ return hours < 12 ? 'PD' : 'MD';
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Sot në] LT',
+ nextDay: '[Nesër në] LT',
+ nextWeek: 'dddd [në] LT',
+ lastDay: '[Dje në] LT',
+ lastWeek: 'dddd [e kaluar në] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'në %s',
+ past: '%s më parë',
+ s: 'disa sekonda',
+ ss: '%d sekonda',
+ m: 'një minutë',
+ mm: '%d minuta',
+ h: 'një orë',
+ hh: '%d orë',
+ d: 'një ditë',
+ dd: '%d ditë',
+ M: 'një muaj',
+ MM: '%d muaj',
+ y: 'një vit',
+ yy: '%d vite',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var translator$1 = {
+ words: {
+ //Different grammatical cases
+ ss: ['секунда', 'секунде', 'секунди'],
+ m: ['један минут', 'једног минута'],
+ mm: ['минут', 'минута', 'минута'],
+ h: ['један сат', 'једног сата'],
+ hh: ['сат', 'сата', 'сати'],
+ d: ['један дан', 'једног дана'],
+ dd: ['дан', 'дана', 'дана'],
+ M: ['један месец', 'једног месеца'],
+ MM: ['месец', 'месеца', 'месеци'],
+ y: ['једну годину', 'једне године'],
+ yy: ['годину', 'године', 'година'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator$1.words[key],
+ word;
+
+ if (key.length === 1) {
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'једна година';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator$1.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'годину') {
+ return number + ' година';
+ }
+
+ return number + ' ' + word;
+ },
+ };
+
+ moment.defineLocale('sr-cyrl', {
+ months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
+ '_'
+ ),
+ monthsShort:
+ 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
+ weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
+ weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
+ },
+ calendar: {
+ sameDay: '[данас у] LT',
+ nextDay: '[сутра у] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[у] [недељу] [у] LT';
+ case 3:
+ return '[у] [среду] [у] LT';
+ case 6:
+ return '[у] [суботу] [у] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[у] dddd [у] LT';
+ }
+ },
+ lastDay: '[јуче у] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[прошле] [недеље] [у] LT',
+ '[прошлог] [понедељка] [у] LT',
+ '[прошлог] [уторка] [у] LT',
+ '[прошле] [среде] [у] LT',
+ '[прошлог] [четвртка] [у] LT',
+ '[прошлог] [петка] [у] LT',
+ '[прошле] [суботе] [у] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: 'пре %s',
+ s: 'неколико секунди',
+ ss: translator$1.translate,
+ m: translator$1.translate,
+ mm: translator$1.translate,
+ h: translator$1.translate,
+ hh: translator$1.translate,
+ d: translator$1.translate,
+ dd: translator$1.translate,
+ M: translator$1.translate,
+ MM: translator$1.translate,
+ y: translator$1.translate,
+ yy: translator$1.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var translator$2 = {
+ words: {
+ //Different grammatical cases
+ ss: ['sekunda', 'sekunde', 'sekundi'],
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ d: ['jedan dan', 'jednog dana'],
+ dd: ['dan', 'dana', 'dana'],
+ M: ['jedan mesec', 'jednog meseca'],
+ MM: ['mesec', 'meseca', 'meseci'],
+ y: ['jednu godinu', 'jedne godine'],
+ yy: ['godinu', 'godine', 'godina'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator$2.words[key],
+ word;
+
+ if (key.length === 1) {
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'jedna godina';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator$2.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'godinu') {
+ return number + ' godina';
+ }
+
+ return number + ' ' + word;
+ },
+ };
+
+ moment.defineLocale('sr', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedelju] [u] LT';
+ case 3:
+ return '[u] [sredu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[juče u] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[prošle] [nedelje] [u] LT',
+ '[prošlog] [ponedeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'pre %s',
+ s: 'nekoliko sekundi',
+ ss: translator$2.translate,
+ m: translator$2.translate,
+ mm: translator$2.translate,
+ h: translator$2.translate,
+ hh: translator$2.translate,
+ d: translator$2.translate,
+ dd: translator$2.translate,
+ M: translator$2.translate,
+ MM: translator$2.translate,
+ y: translator$2.translate,
+ yy: translator$2.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ss', {
+ months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
+ '_'
+ ),
+ monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
+ weekdays:
+ 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
+ weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Namuhla nga] LT',
+ nextDay: '[Kusasa nga] LT',
+ nextWeek: 'dddd [nga] LT',
+ lastDay: '[Itolo nga] LT',
+ lastWeek: 'dddd [leliphelile] [nga] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'nga %s',
+ past: 'wenteka nga %s',
+ s: 'emizuzwana lomcane',
+ ss: '%d mzuzwana',
+ m: 'umzuzu',
+ mm: '%d emizuzu',
+ h: 'lihora',
+ hh: '%d emahora',
+ d: 'lilanga',
+ dd: '%d emalanga',
+ M: 'inyanga',
+ MM: '%d tinyanga',
+ y: 'umnyaka',
+ yy: '%d iminyaka',
+ },
+ meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'ekuseni';
+ } else if (hours < 15) {
+ return 'emini';
+ } else if (hours < 19) {
+ return 'entsambama';
+ } else {
+ return 'ebusuku';
+ }
+ },
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ekuseni') {
+ return hour;
+ } else if (meridiem === 'emini') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
+ if (hour === 0) {
+ return 0;
+ }
+ return hour + 12;
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: '%d',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('sv', {
+ months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
+ weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
+ weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [kl.] HH:mm',
+ LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Idag] LT',
+ nextDay: '[Imorgon] LT',
+ lastDay: '[Igår] LT',
+ nextWeek: '[På] dddd LT',
+ lastWeek: '[I] dddd[s] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: 'för %s sedan',
+ s: 'några sekunder',
+ ss: '%d sekunder',
+ m: 'en minut',
+ mm: '%d minuter',
+ h: 'en timme',
+ hh: '%d timmar',
+ d: 'en dag',
+ dd: '%d dagar',
+ M: 'en månad',
+ MM: '%d månader',
+ y: 'ett år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? ':e'
+ : b === 1
+ ? ':a'
+ : b === 2
+ ? ':a'
+ : b === 3
+ ? ':e'
+ : ':e';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('sw', {
+ months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
+ weekdays:
+ 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
+ '_'
+ ),
+ weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
+ weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'hh:mm A',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[leo saa] LT',
+ nextDay: '[kesho saa] LT',
+ nextWeek: '[wiki ijayo] dddd [saat] LT',
+ lastDay: '[jana] LT',
+ lastWeek: '[wiki iliyopita] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s baadaye',
+ past: 'tokea %s',
+ s: 'hivi punde',
+ ss: 'sekunde %d',
+ m: 'dakika moja',
+ mm: 'dakika %d',
+ h: 'saa limoja',
+ hh: 'masaa %d',
+ d: 'siku moja',
+ dd: 'siku %d',
+ M: 'mwezi mmoja',
+ MM: 'miezi %d',
+ y: 'mwaka mmoja',
+ yy: 'miaka %d',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$g = {
+ 1: '௧',
+ 2: '௨',
+ 3: '௩',
+ 4: '௪',
+ 5: '௫',
+ 6: '௬',
+ 7: '௭',
+ 8: '௮',
+ 9: '௯',
+ 0: '௦',
+ },
+ numberMap$f = {
+ '௧': '1',
+ '௨': '2',
+ '௩': '3',
+ '௪': '4',
+ '௫': '5',
+ '௬': '6',
+ '௭': '7',
+ '௮': '8',
+ '௯': '9',
+ '௦': '0',
+ };
+
+ moment.defineLocale('ta', {
+ months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
+ '_'
+ ),
+ weekdays:
+ 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
+ '_'
+ ),
+ weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
+ '_'
+ ),
+ weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, HH:mm',
+ LLLL: 'dddd, D MMMM YYYY, HH:mm',
+ },
+ calendar: {
+ sameDay: '[இன்று] LT',
+ nextDay: '[நாளை] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[நேற்று] LT',
+ lastWeek: '[கடந்த வாரம்] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s இல்',
+ past: '%s முன்',
+ s: 'ஒரு சில விநாடிகள்',
+ ss: '%d விநாடிகள்',
+ m: 'ஒரு நிமிடம்',
+ mm: '%d நிமிடங்கள்',
+ h: 'ஒரு மணி நேரம்',
+ hh: '%d மணி நேரம்',
+ d: 'ஒரு நாள்',
+ dd: '%d நாட்கள்',
+ M: 'ஒரு மாதம்',
+ MM: '%d மாதங்கள்',
+ y: 'ஒரு வருடம்',
+ yy: '%d ஆண்டுகள்',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}வது/,
+ ordinal: function (number) {
+ return number + 'வது';
+ },
+ preparse: function (string) {
+ return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
+ return numberMap$f[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$g[match];
+ });
+ },
+ // refer http://ta.wikipedia.org/s/1er1
+ meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 2) {
+ return ' யாமம்';
+ } else if (hour < 6) {
+ return ' வைகறை'; // வைகறை
+ } else if (hour < 10) {
+ return ' காலை'; // காலை
+ } else if (hour < 14) {
+ return ' நண்பகல்'; // நண்பகல்
+ } else if (hour < 18) {
+ return ' எற்பாடு'; // எற்பாடு
+ } else if (hour < 22) {
+ return ' மாலை'; // மாலை
+ } else {
+ return ' யாமம்';
+ }
+ },
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'யாமம்') {
+ return hour < 2 ? hour : hour + 12;
+ } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
+ return hour;
+ } else if (meridiem === 'நண்பகல்') {
+ return hour >= 10 ? hour : hour + 12;
+ } else {
+ return hour + 12;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('te', {
+ months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
+ '_'
+ ),
+ monthsShort:
+ 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
+ '_'
+ ),
+ weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
+ weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[నేడు] LT',
+ nextDay: '[రేపు] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[నిన్న] LT',
+ lastWeek: '[గత] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s లో',
+ past: '%s క్రితం',
+ s: 'కొన్ని క్షణాలు',
+ ss: '%d సెకన్లు',
+ m: 'ఒక నిమిషం',
+ mm: '%d నిమిషాలు',
+ h: 'ఒక గంట',
+ hh: '%d గంటలు',
+ d: 'ఒక రోజు',
+ dd: '%d రోజులు',
+ M: 'ఒక నెల',
+ MM: '%d నెలలు',
+ y: 'ఒక సంవత్సరం',
+ yy: '%d సంవత్సరాలు',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}వ/,
+ ordinal: '%dవ',
+ meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'రాత్రి') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ఉదయం') {
+ return hour;
+ } else if (meridiem === 'మధ్యాహ్నం') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'సాయంత్రం') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'రాత్రి';
+ } else if (hour < 10) {
+ return 'ఉదయం';
+ } else if (hour < 17) {
+ return 'మధ్యాహ్నం';
+ } else if (hour < 20) {
+ return 'సాయంత్రం';
+ } else {
+ return 'రాత్రి';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('tet', {
+ months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
+ weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
+ weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
+ weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Ohin iha] LT',
+ nextDay: '[Aban iha] LT',
+ nextWeek: 'dddd [iha] LT',
+ lastDay: '[Horiseik iha] LT',
+ lastWeek: 'dddd [semana kotuk] [iha] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'iha %s',
+ past: '%s liuba',
+ s: 'segundu balun',
+ ss: 'segundu %d',
+ m: 'minutu ida',
+ mm: 'minutu %d',
+ h: 'oras ida',
+ hh: 'oras %d',
+ d: 'loron ida',
+ dd: 'loron %d',
+ M: 'fulan ida',
+ MM: 'fulan %d',
+ y: 'tinan ida',
+ yy: 'tinan %d',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes$3 = {
+ 0: '-ум',
+ 1: '-ум',
+ 2: '-юм',
+ 3: '-юм',
+ 4: '-ум',
+ 5: '-ум',
+ 6: '-ум',
+ 7: '-ум',
+ 8: '-ум',
+ 9: '-ум',
+ 10: '-ум',
+ 12: '-ум',
+ 13: '-ум',
+ 20: '-ум',
+ 30: '-юм',
+ 40: '-ум',
+ 50: '-ум',
+ 60: '-ум',
+ 70: '-ум',
+ 80: '-ум',
+ 90: '-ум',
+ 100: '-ум',
+ };
+
+ moment.defineLocale('tg', {
+ months: {
+ format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
+ '_'
+ ),
+ standalone:
+ 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+ weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
+ '_'
+ ),
+ weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
+ weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Имрӯз соати] LT',
+ nextDay: '[Фардо соати] LT',
+ lastDay: '[Дирӯз соати] LT',
+ nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
+ lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'баъди %s',
+ past: '%s пеш',
+ s: 'якчанд сония',
+ m: 'як дақиқа',
+ mm: '%d дақиқа',
+ h: 'як соат',
+ hh: '%d соат',
+ d: 'як рӯз',
+ dd: '%d рӯз',
+ M: 'як моҳ',
+ MM: '%d моҳ',
+ y: 'як сол',
+ yy: '%d сол',
+ },
+ meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'шаб') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'субҳ') {
+ return hour;
+ } else if (meridiem === 'рӯз') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'бегоҳ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'шаб';
+ } else if (hour < 11) {
+ return 'субҳ';
+ } else if (hour < 16) {
+ return 'рӯз';
+ } else if (hour < 19) {
+ return 'бегоҳ';
+ } else {
+ return 'шаб';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes$3[number] || suffixes$3[a] || suffixes$3[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('th', {
+ months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
+ weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
+ weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY เวลา H:mm',
+ LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',
+ },
+ meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
+ isPM: function (input) {
+ return input === 'หลังเที่ยง';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ก่อนเที่ยง';
+ } else {
+ return 'หลังเที่ยง';
+ }
+ },
+ calendar: {
+ sameDay: '[วันนี้ เวลา] LT',
+ nextDay: '[พรุ่งนี้ เวลา] LT',
+ nextWeek: 'dddd[หน้า เวลา] LT',
+ lastDay: '[เมื่อวานนี้ เวลา] LT',
+ lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'อีก %s',
+ past: '%sที่แล้ว',
+ s: 'ไม่กี่วินาที',
+ ss: '%d วินาที',
+ m: '1 นาที',
+ mm: '%d นาที',
+ h: '1 ชั่วโมง',
+ hh: '%d ชั่วโมง',
+ d: '1 วัน',
+ dd: '%d วัน',
+ w: '1 สัปดาห์',
+ ww: '%d สัปดาห์',
+ M: '1 เดือน',
+ MM: '%d เดือน',
+ y: '1 ปี',
+ yy: '%d ปี',
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes$4 = {
+ 1: "'inji",
+ 5: "'inji",
+ 8: "'inji",
+ 70: "'inji",
+ 80: "'inji",
+ 2: "'nji",
+ 7: "'nji",
+ 20: "'nji",
+ 50: "'nji",
+ 3: "'ünji",
+ 4: "'ünji",
+ 100: "'ünji",
+ 6: "'njy",
+ 9: "'unjy",
+ 10: "'unjy",
+ 30: "'unjy",
+ 60: "'ynjy",
+ 90: "'ynjy",
+ };
+
+ moment.defineLocale('tk', {
+ months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
+ weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
+ '_'
+ ),
+ weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
+ weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün sagat] LT',
+ nextDay: '[ertir sagat] LT',
+ nextWeek: '[indiki] dddd [sagat] LT',
+ lastDay: '[düýn] LT',
+ lastWeek: '[geçen] dddd [sagat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s soň',
+ past: '%s öň',
+ s: 'birnäçe sekunt',
+ m: 'bir minut',
+ mm: '%d minut',
+ h: 'bir sagat',
+ hh: '%d sagat',
+ d: 'bir gün',
+ dd: '%d gün',
+ M: 'bir aý',
+ MM: '%d aý',
+ y: 'bir ýyl',
+ yy: '%d ýyl',
+ },
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'Do':
+ case 'DD':
+ return number;
+ default:
+ if (number === 0) {
+ // special case for zero
+ return number + "'unjy";
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes$4[a] || suffixes$4[b] || suffixes$4[c]);
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('tl-ph', {
+ months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
+ '_'
+ ),
+ monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+ weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+ weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'MM/D/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY HH:mm',
+ LLLL: 'dddd, MMMM DD, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: 'LT [ngayong araw]',
+ nextDay: '[Bukas ng] LT',
+ nextWeek: 'LT [sa susunod na] dddd',
+ lastDay: 'LT [kahapon]',
+ lastWeek: 'LT [noong nakaraang] dddd',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'sa loob ng %s',
+ past: '%s ang nakalipas',
+ s: 'ilang segundo',
+ ss: '%d segundo',
+ m: 'isang minuto',
+ mm: '%d minuto',
+ h: 'isang oras',
+ hh: '%d oras',
+ d: 'isang araw',
+ dd: '%d araw',
+ M: 'isang buwan',
+ MM: '%d buwan',
+ y: 'isang taon',
+ yy: '%d taon',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
+
+ function translateFuture(output) {
+ var time = output;
+ time =
+ output.indexOf('jaj') !== -1
+ ? time.slice(0, -3) + 'leS'
+ : output.indexOf('jar') !== -1
+ ? time.slice(0, -3) + 'waQ'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'nem'
+ : time + ' pIq';
+ return time;
+ }
+
+ function translatePast(output) {
+ var time = output;
+ time =
+ output.indexOf('jaj') !== -1
+ ? time.slice(0, -3) + 'Hu’'
+ : output.indexOf('jar') !== -1
+ ? time.slice(0, -3) + 'wen'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'ben'
+ : time + ' ret';
+ return time;
+ }
+
+ function translate$a(number, withoutSuffix, string, isFuture) {
+ var numberNoun = numberAsNoun(number);
+ switch (string) {
+ case 'ss':
+ return numberNoun + ' lup';
+ case 'mm':
+ return numberNoun + ' tup';
+ case 'hh':
+ return numberNoun + ' rep';
+ case 'dd':
+ return numberNoun + ' jaj';
+ case 'MM':
+ return numberNoun + ' jar';
+ case 'yy':
+ return numberNoun + ' DIS';
+ }
+ }
+
+ function numberAsNoun(number) {
+ var hundred = Math.floor((number % 1000) / 100),
+ ten = Math.floor((number % 100) / 10),
+ one = number % 10,
+ word = '';
+ if (hundred > 0) {
+ word += numbersNouns[hundred] + 'vatlh';
+ }
+ if (ten > 0) {
+ word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
+ }
+ if (one > 0) {
+ word += (word !== '' ? ' ' : '') + numbersNouns[one];
+ }
+ return word === '' ? 'pagh' : word;
+ }
+
+ moment.defineLocale('tlh', {
+ months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+ weekdaysMin:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[DaHjaj] LT',
+ nextDay: '[wa’leS] LT',
+ nextWeek: 'LLL',
+ lastDay: '[wa’Hu’] LT',
+ lastWeek: 'LLL',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: translateFuture,
+ past: translatePast,
+ s: 'puS lup',
+ ss: translate$a,
+ m: 'wa’ tup',
+ mm: translate$a,
+ h: 'wa’ rep',
+ hh: translate$a,
+ d: 'wa’ jaj',
+ dd: translate$a,
+ M: 'wa’ jar',
+ MM: translate$a,
+ y: 'wa’ DIS',
+ yy: translate$a,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes$5 = {
+ 1: "'inci",
+ 5: "'inci",
+ 8: "'inci",
+ 70: "'inci",
+ 80: "'inci",
+ 2: "'nci",
+ 7: "'nci",
+ 20: "'nci",
+ 50: "'nci",
+ 3: "'üncü",
+ 4: "'üncü",
+ 100: "'üncü",
+ 6: "'ncı",
+ 9: "'uncu",
+ 10: "'uncu",
+ 30: "'uncu",
+ 60: "'ıncı",
+ 90: "'ıncı",
+ };
+
+ moment.defineLocale('tr', {
+ months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
+ '_'
+ ),
+ monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
+ weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
+ '_'
+ ),
+ weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),
+ weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'öö' : 'ÖÖ';
+ } else {
+ return isLower ? 'ös' : 'ÖS';
+ }
+ },
+ meridiemParse: /öö|ÖÖ|ös|ÖS/,
+ isPM: function (input) {
+ return input === 'ös' || input === 'ÖS';
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün saat] LT',
+ nextDay: '[yarın saat] LT',
+ nextWeek: '[gelecek] dddd [saat] LT',
+ lastDay: '[dün] LT',
+ lastWeek: '[geçen] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s sonra',
+ past: '%s önce',
+ s: 'birkaç saniye',
+ ss: '%d saniye',
+ m: 'bir dakika',
+ mm: '%d dakika',
+ h: 'bir saat',
+ hh: '%d saat',
+ d: 'bir gün',
+ dd: '%d gün',
+ w: 'bir hafta',
+ ww: '%d hafta',
+ M: 'bir ay',
+ MM: '%d ay',
+ y: 'bir yıl',
+ yy: '%d yıl',
+ },
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'Do':
+ case 'DD':
+ return number;
+ default:
+ if (number === 0) {
+ // special case for zero
+ return number + "'ıncı";
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes$5[a] || suffixes$5[b] || suffixes$5[c]);
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
+ // This is currently too difficult (maybe even impossible) to add.
+ moment.defineLocale('tzl', {
+ months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
+ weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
+ weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
+ weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM [dallas] YYYY',
+ LLL: 'D. MMMM [dallas] YYYY HH.mm',
+ LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',
+ },
+ meridiemParse: /d\'o|d\'a/i,
+ isPM: function (input) {
+ return "d'o" === input.toLowerCase();
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? "d'o" : "D'O";
+ } else {
+ return isLower ? "d'a" : "D'A";
+ }
+ },
+ calendar: {
+ sameDay: '[oxhi à] LT',
+ nextDay: '[demà à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[ieiri à] LT',
+ lastWeek: '[sür el] dddd [lasteu à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'osprei %s',
+ past: 'ja%s',
+ s: processRelativeTime$8,
+ ss: processRelativeTime$8,
+ m: processRelativeTime$8,
+ mm: processRelativeTime$8,
+ h: processRelativeTime$8,
+ hh: processRelativeTime$8,
+ d: processRelativeTime$8,
+ dd: processRelativeTime$8,
+ M: processRelativeTime$8,
+ MM: processRelativeTime$8,
+ y: processRelativeTime$8,
+ yy: processRelativeTime$8,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ function processRelativeTime$8(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['viensas secunds', "'iensas secunds"],
+ ss: [number + ' secunds', '' + number + ' secunds'],
+ m: ["'n míut", "'iens míut"],
+ mm: [number + ' míuts', '' + number + ' míuts'],
+ h: ["'n þora", "'iensa þora"],
+ hh: [number + ' þoras', '' + number + ' þoras'],
+ d: ["'n ziua", "'iensa ziua"],
+ dd: [number + ' ziuas', '' + number + ' ziuas'],
+ M: ["'n mes", "'iens mes"],
+ MM: [number + ' mesen', '' + number + ' mesen'],
+ y: ["'n ar", "'iens ar"],
+ yy: [number + ' ars', '' + number + ' ars'],
+ };
+ return isFuture
+ ? format[key][0]
+ : withoutSuffix
+ ? format[key][0]
+ : format[key][1];
+ }
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('tzm-latn', {
+ months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
+ '_'
+ ),
+ monthsShort:
+ 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
+ '_'
+ ),
+ weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[asdkh g] LT',
+ nextDay: '[aska g] LT',
+ nextWeek: 'dddd [g] LT',
+ lastDay: '[assant g] LT',
+ lastWeek: 'dddd [g] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dadkh s yan %s',
+ past: 'yan %s',
+ s: 'imik',
+ ss: '%d imik',
+ m: 'minuḍ',
+ mm: '%d minuḍ',
+ h: 'saɛa',
+ hh: '%d tassaɛin',
+ d: 'ass',
+ dd: '%d ossan',
+ M: 'ayowr',
+ MM: '%d iyyirn',
+ y: 'asgas',
+ yy: '%d isgasn',
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('tzm', {
+ months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
+ '_'
+ ),
+ weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
+ nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
+ nextWeek: 'dddd [ⴴ] LT',
+ lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
+ lastWeek: 'dddd [ⴴ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
+ past: 'ⵢⴰⵏ %s',
+ s: 'ⵉⵎⵉⴽ',
+ ss: '%d ⵉⵎⵉⴽ',
+ m: 'ⵎⵉⵏⵓⴺ',
+ mm: '%d ⵎⵉⵏⵓⴺ',
+ h: 'ⵙⴰⵄⴰ',
+ hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
+ d: 'ⴰⵙⵙ',
+ dd: '%d oⵙⵙⴰⵏ',
+ M: 'ⴰⵢoⵓⵔ',
+ MM: '%d ⵉⵢⵢⵉⵔⵏ',
+ y: 'ⴰⵙⴳⴰⵙ',
+ yy: '%d ⵉⵙⴳⴰⵙⵏ',
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('ug-cn', {
+ months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
+ '_'
+ ),
+ weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
+ '_'
+ ),
+ weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
+ weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
+ LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
+ LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
+ },
+ meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ meridiem === 'يېرىم كېچە' ||
+ meridiem === 'سەھەر' ||
+ meridiem === 'چۈشتىن بۇرۇن'
+ ) {
+ return hour;
+ } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
+ return hour + 12;
+ } else {
+ return hour >= 11 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return 'يېرىم كېچە';
+ } else if (hm < 900) {
+ return 'سەھەر';
+ } else if (hm < 1130) {
+ return 'چۈشتىن بۇرۇن';
+ } else if (hm < 1230) {
+ return 'چۈش';
+ } else if (hm < 1800) {
+ return 'چۈشتىن كېيىن';
+ } else {
+ return 'كەچ';
+ }
+ },
+ calendar: {
+ sameDay: '[بۈگۈن سائەت] LT',
+ nextDay: '[ئەتە سائەت] LT',
+ nextWeek: '[كېلەركى] dddd [سائەت] LT',
+ lastDay: '[تۆنۈگۈن] LT',
+ lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s كېيىن',
+ past: '%s بۇرۇن',
+ s: 'نەچچە سېكونت',
+ ss: '%d سېكونت',
+ m: 'بىر مىنۇت',
+ mm: '%d مىنۇت',
+ h: 'بىر سائەت',
+ hh: '%d سائەت',
+ d: 'بىر كۈن',
+ dd: '%d كۈن',
+ M: 'بىر ئاي',
+ MM: '%d ئاي',
+ y: 'بىر يىل',
+ yy: '%d يىل',
+ },
+
+ dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '-كۈنى';
+ case 'w':
+ case 'W':
+ return number + '-ھەپتە';
+ default:
+ return number;
+ }
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function plural$6(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+ }
+ function relativeTimeWithPlural$4(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
+ mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
+ hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
+ dd: 'день_дні_днів',
+ MM: 'місяць_місяці_місяців',
+ yy: 'рік_роки_років',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'хвилина' : 'хвилину';
+ } else if (key === 'h') {
+ return withoutSuffix ? 'година' : 'годину';
+ } else {
+ return number + ' ' + plural$6(format[key], +number);
+ }
+ }
+ function weekdaysCaseReplace(m, format) {
+ var weekdays = {
+ nominative:
+ 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
+ '_'
+ ),
+ accusative:
+ 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
+ '_'
+ ),
+ genitive:
+ 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
+ '_'
+ ),
+ },
+ nounCase;
+
+ if (m === true) {
+ return weekdays['nominative']
+ .slice(1, 7)
+ .concat(weekdays['nominative'].slice(0, 1));
+ }
+ if (!m) {
+ return weekdays['nominative'];
+ }
+
+ nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
+ ? 'accusative'
+ : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
+ ? 'genitive'
+ : 'nominative';
+ return weekdays[nounCase][m.day()];
+ }
+ function processHoursFunction(str) {
+ return function () {
+ return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
+ };
+ }
+
+ moment.defineLocale('uk', {
+ months: {
+ format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
+ '_'
+ ),
+ standalone:
+ 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
+ '_'
+ ),
+ weekdays: weekdaysCaseReplace,
+ weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY р.',
+ LLL: 'D MMMM YYYY р., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY р., HH:mm',
+ },
+ calendar: {
+ sameDay: processHoursFunction('[Сьогодні '),
+ nextDay: processHoursFunction('[Завтра '),
+ lastDay: processHoursFunction('[Вчора '),
+ nextWeek: processHoursFunction('[У] dddd ['),
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 5:
+ case 6:
+ return processHoursFunction('[Минулої] dddd [').call(this);
+ case 1:
+ case 2:
+ case 4:
+ return processHoursFunction('[Минулого] dddd [').call(this);
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: '%s тому',
+ s: 'декілька секунд',
+ ss: relativeTimeWithPlural$4,
+ m: relativeTimeWithPlural$4,
+ mm: relativeTimeWithPlural$4,
+ h: 'годину',
+ hh: relativeTimeWithPlural$4,
+ d: 'день',
+ dd: relativeTimeWithPlural$4,
+ M: 'місяць',
+ MM: relativeTimeWithPlural$4,
+ y: 'рік',
+ yy: relativeTimeWithPlural$4,
+ },
+ // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
+ meridiemParse: /ночі|ранку|дня|вечора/,
+ isPM: function (input) {
+ return /^(дня|вечора)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночі';
+ } else if (hour < 12) {
+ return 'ранку';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечора';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ case 'w':
+ case 'W':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$a = [
+ 'جنوری',
+ 'فروری',
+ 'مارچ',
+ 'اپریل',
+ 'مئی',
+ 'جون',
+ 'جولائی',
+ 'اگست',
+ 'ستمبر',
+ 'اکتوبر',
+ 'نومبر',
+ 'دسمبر',
+ ],
+ days$1 = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
+
+ moment.defineLocale('ur', {
+ months: months$a,
+ monthsShort: months$a,
+ weekdays: days$1,
+ weekdaysShort: days$1,
+ weekdaysMin: days$1,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd، D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /صبح|شام/,
+ isPM: function (input) {
+ return 'شام' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'صبح';
+ }
+ return 'شام';
+ },
+ calendar: {
+ sameDay: '[آج بوقت] LT',
+ nextDay: '[کل بوقت] LT',
+ nextWeek: 'dddd [بوقت] LT',
+ lastDay: '[گذشتہ روز بوقت] LT',
+ lastWeek: '[گذشتہ] dddd [بوقت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s بعد',
+ past: '%s قبل',
+ s: 'چند سیکنڈ',
+ ss: '%d سیکنڈ',
+ m: 'ایک منٹ',
+ mm: '%d منٹ',
+ h: 'ایک گھنٹہ',
+ hh: '%d گھنٹے',
+ d: 'ایک دن',
+ dd: '%d دن',
+ M: 'ایک ماہ',
+ MM: '%d ماہ',
+ y: 'ایک سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('uz-latn', {
+ months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
+ weekdays:
+ 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
+ '_'
+ ),
+ weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
+ weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'D MMMM YYYY, dddd HH:mm',
+ },
+ calendar: {
+ sameDay: '[Bugun soat] LT [da]',
+ nextDay: '[Ertaga] LT [da]',
+ nextWeek: 'dddd [kuni soat] LT [da]',
+ lastDay: '[Kecha soat] LT [da]',
+ lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'Yaqin %s ichida',
+ past: 'Bir necha %s oldin',
+ s: 'soniya',
+ ss: '%d soniya',
+ m: 'bir daqiqa',
+ mm: '%d daqiqa',
+ h: 'bir soat',
+ hh: '%d soat',
+ d: 'bir kun',
+ dd: '%d kun',
+ M: 'bir oy',
+ MM: '%d oy',
+ y: 'bir yil',
+ yy: '%d yil',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('uz', {
+ months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
+ '_'
+ ),
+ monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+ weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
+ weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
+ weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'D MMMM YYYY, dddd HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бугун соат] LT [да]',
+ nextDay: '[Эртага] LT [да]',
+ nextWeek: 'dddd [куни соат] LT [да]',
+ lastDay: '[Кеча соат] LT [да]',
+ lastWeek: '[Утган] dddd [куни соат] LT [да]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'Якин %s ичида',
+ past: 'Бир неча %s олдин',
+ s: 'фурсат',
+ ss: '%d фурсат',
+ m: 'бир дакика',
+ mm: '%d дакика',
+ h: 'бир соат',
+ hh: '%d соат',
+ d: 'бир кун',
+ dd: '%d кун',
+ M: 'бир ой',
+ MM: '%d ой',
+ y: 'бир йил',
+ yy: '%d йил',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('vi', {
+ months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
+ '_'
+ ),
+ weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysParseExact: true,
+ meridiemParse: /sa|ch/i,
+ isPM: function (input) {
+ return /^ch$/i.test(input);
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'sa' : 'SA';
+ } else {
+ return isLower ? 'ch' : 'CH';
+ }
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [năm] YYYY',
+ LLL: 'D MMMM [năm] YYYY HH:mm',
+ LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
+ l: 'DD/M/YYYY',
+ ll: 'D MMM YYYY',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd, D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hôm nay lúc] LT',
+ nextDay: '[Ngày mai lúc] LT',
+ nextWeek: 'dddd [tuần tới lúc] LT',
+ lastDay: '[Hôm qua lúc] LT',
+ lastWeek: 'dddd [tuần trước lúc] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s tới',
+ past: '%s trước',
+ s: 'vài giây',
+ ss: '%d giây',
+ m: 'một phút',
+ mm: '%d phút',
+ h: 'một giờ',
+ hh: '%d giờ',
+ d: 'một ngày',
+ dd: '%d ngày',
+ w: 'một tuần',
+ ww: '%d tuần',
+ M: 'một tháng',
+ MM: '%d tháng',
+ y: 'một năm',
+ yy: '%d năm',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('x-pseudo', {
+ months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
+ '_'
+ ),
+ monthsShort:
+ 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
+ '_'
+ ),
+ weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
+ weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[T~ódá~ý át] LT',
+ nextDay: '[T~ómó~rró~w át] LT',
+ nextWeek: 'dddd [át] LT',
+ lastDay: '[Ý~ést~érdá~ý át] LT',
+ lastWeek: '[L~ást] dddd [át] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'í~ñ %s',
+ past: '%s á~gó',
+ s: 'á ~féw ~sécó~ñds',
+ ss: '%d s~écóñ~ds',
+ m: 'á ~míñ~úté',
+ mm: '%d m~íñú~tés',
+ h: 'á~ñ hó~úr',
+ hh: '%d h~óúrs',
+ d: 'á ~dáý',
+ dd: '%d d~áýs',
+ M: 'á ~móñ~th',
+ MM: '%d m~óñt~hs',
+ y: 'á ~ýéár',
+ yy: '%d ý~éárs',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('yo', {
+ months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
+ '_'
+ ),
+ monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
+ weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
+ weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
+ weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Ònì ni] LT',
+ nextDay: '[Ọ̀la ni] LT',
+ nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
+ lastDay: '[Àna ni] LT',
+ lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ní %s',
+ past: '%s kọjá',
+ s: 'ìsẹjú aayá die',
+ ss: 'aayá %d',
+ m: 'ìsẹjú kan',
+ mm: 'ìsẹjú %d',
+ h: 'wákati kan',
+ hh: 'wákati %d',
+ d: 'ọjọ́ kan',
+ dd: 'ọjọ́ %d',
+ M: 'osù kan',
+ MM: 'osù %d',
+ y: 'ọdún kan',
+ yy: 'ọdún %d',
+ },
+ dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
+ ordinal: 'ọjọ́ %d',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('zh-cn', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日Ah点mm分',
+ LLLL: 'YYYY年M月D日ddddAh点mm分',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ } else {
+ // '中午'
+ return hour >= 11 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天]LT',
+ nextDay: '[明天]LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ return '[下]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
+ lastDay: '[昨天]LT',
+ lastWeek: function (now) {
+ if (this.week() !== now.week()) {
+ return '[上]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '周';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s后',
+ past: '%s前',
+ s: '几秒',
+ ss: '%d 秒',
+ m: '1 分钟',
+ mm: '%d 分钟',
+ h: '1 小时',
+ hh: '%d 小时',
+ d: '1 天',
+ dd: '%d 天',
+ w: '1 周',
+ ww: '%d 周',
+ M: '1 个月',
+ MM: '%d 个月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ week: {
+ // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('zh-hk', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1200) {
+ return '上午';
+ } else if (hm === 1200) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天]LT',
+ nextDay: '[明天]LT',
+ nextWeek: '[下]ddddLT',
+ lastDay: '[昨天]LT',
+ lastWeek: '[上]ddddLT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('zh-mo', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'D/M/YYYY',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天] LT',
+ nextDay: '[明天] LT',
+ nextWeek: '[下]dddd LT',
+ lastDay: '[昨天] LT',
+ lastWeek: '[上]dddd LT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s內',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ });
+
+ //! moment.js locale configuration
+
+ moment.defineLocale('zh-tw', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天] LT',
+ nextDay: '[明天] LT',
+ nextWeek: '[下]dddd LT',
+ lastDay: '[昨天] LT',
+ lastWeek: '[上]dddd LT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ });
+
+ moment.locale('en');
+
+ return moment;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/min/moment-with-locales.js b/vendor/assets/javascripts/momentjs/min/moment-with-locales.js
new file mode 100644
index 000000000..0ecd1f840
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/min/moment-with-locales.js
@@ -0,0 +1,18239 @@
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ global.moment = factory()
+}(this, (function () { 'use strict';
+
+ var hookCallback;
+
+ function hooks() {
+ return hookCallback.apply(null, arguments);
+ }
+
+ // This is done to register the method called with moment()
+ // without creating circular dependencies.
+ function setHookCallback(callback) {
+ hookCallback = callback;
+ }
+
+ function isArray(input) {
+ return (
+ input instanceof Array ||
+ Object.prototype.toString.call(input) === '[object Array]'
+ );
+ }
+
+ function isObject(input) {
+ // IE8 will treat undefined and null as object if it wasn't for
+ // input != null
+ return (
+ input != null &&
+ Object.prototype.toString.call(input) === '[object Object]'
+ );
+ }
+
+ function hasOwnProp(a, b) {
+ return Object.prototype.hasOwnProperty.call(a, b);
+ }
+
+ function isObjectEmpty(obj) {
+ if (Object.getOwnPropertyNames) {
+ return Object.getOwnPropertyNames(obj).length === 0;
+ } else {
+ var k;
+ for (k in obj) {
+ if (hasOwnProp(obj, k)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+
+ function isUndefined(input) {
+ return input === void 0;
+ }
+
+ function isNumber(input) {
+ return (
+ typeof input === 'number' ||
+ Object.prototype.toString.call(input) === '[object Number]'
+ );
+ }
+
+ function isDate(input) {
+ return (
+ input instanceof Date ||
+ Object.prototype.toString.call(input) === '[object Date]'
+ );
+ }
+
+ function map(arr, fn) {
+ var res = [],
+ i,
+ arrLen = arr.length;
+ for (i = 0; i < arrLen; ++i) {
+ res.push(fn(arr[i], i));
+ }
+ return res;
+ }
+
+ function extend(a, b) {
+ for (var i in b) {
+ if (hasOwnProp(b, i)) {
+ a[i] = b[i];
+ }
+ }
+
+ if (hasOwnProp(b, 'toString')) {
+ a.toString = b.toString;
+ }
+
+ if (hasOwnProp(b, 'valueOf')) {
+ a.valueOf = b.valueOf;
+ }
+
+ return a;
+ }
+
+ function createUTC(input, format, locale, strict) {
+ return createLocalOrUTC(input, format, locale, strict, true).utc();
+ }
+
+ function defaultParsingFlags() {
+ // We need to deep clone this object.
+ return {
+ empty: false,
+ unusedTokens: [],
+ unusedInput: [],
+ overflow: -2,
+ charsLeftOver: 0,
+ nullInput: false,
+ invalidEra: null,
+ invalidMonth: null,
+ invalidFormat: false,
+ userInvalidated: false,
+ iso: false,
+ parsedDateParts: [],
+ era: null,
+ meridiem: null,
+ rfc2822: false,
+ weekdayMismatch: false,
+ };
+ }
+
+ function getParsingFlags(m) {
+ if (m._pf == null) {
+ m._pf = defaultParsingFlags();
+ }
+ return m._pf;
+ }
+
+ var some;
+ if (Array.prototype.some) {
+ some = Array.prototype.some;
+ } else {
+ some = function (fun) {
+ var t = Object(this),
+ len = t.length >>> 0,
+ i;
+
+ for (i = 0; i < len; i++) {
+ if (i in t && fun.call(this, t[i], i, t)) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+ }
+
+ function isValid(m) {
+ if (m._isValid == null) {
+ var flags = getParsingFlags(m),
+ parsedParts = some.call(flags.parsedDateParts, function (i) {
+ return i != null;
+ }),
+ isNowValid =
+ !isNaN(m._d.getTime()) &&
+ flags.overflow < 0 &&
+ !flags.empty &&
+ !flags.invalidEra &&
+ !flags.invalidMonth &&
+ !flags.invalidWeekday &&
+ !flags.weekdayMismatch &&
+ !flags.nullInput &&
+ !flags.invalidFormat &&
+ !flags.userInvalidated &&
+ (!flags.meridiem || (flags.meridiem && parsedParts));
+
+ if (m._strict) {
+ isNowValid =
+ isNowValid &&
+ flags.charsLeftOver === 0 &&
+ flags.unusedTokens.length === 0 &&
+ flags.bigHour === undefined;
+ }
+
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
+ m._isValid = isNowValid;
+ } else {
+ return isNowValid;
+ }
+ }
+ return m._isValid;
+ }
+
+ function createInvalid(flags) {
+ var m = createUTC(NaN);
+ if (flags != null) {
+ extend(getParsingFlags(m), flags);
+ } else {
+ getParsingFlags(m).userInvalidated = true;
+ }
+
+ return m;
+ }
+
+ // Plugins that add properties should also add the key here (null value),
+ // so we can properly clone ourselves.
+ var momentProperties = (hooks.momentProperties = []),
+ updateInProgress = false;
+
+ function copyConfig(to, from) {
+ var i,
+ prop,
+ val,
+ momentPropertiesLen = momentProperties.length;
+
+ if (!isUndefined(from._isAMomentObject)) {
+ to._isAMomentObject = from._isAMomentObject;
+ }
+ if (!isUndefined(from._i)) {
+ to._i = from._i;
+ }
+ if (!isUndefined(from._f)) {
+ to._f = from._f;
+ }
+ if (!isUndefined(from._l)) {
+ to._l = from._l;
+ }
+ if (!isUndefined(from._strict)) {
+ to._strict = from._strict;
+ }
+ if (!isUndefined(from._tzm)) {
+ to._tzm = from._tzm;
+ }
+ if (!isUndefined(from._isUTC)) {
+ to._isUTC = from._isUTC;
+ }
+ if (!isUndefined(from._offset)) {
+ to._offset = from._offset;
+ }
+ if (!isUndefined(from._pf)) {
+ to._pf = getParsingFlags(from);
+ }
+ if (!isUndefined(from._locale)) {
+ to._locale = from._locale;
+ }
+
+ if (momentPropertiesLen > 0) {
+ for (i = 0; i < momentPropertiesLen; i++) {
+ prop = momentProperties[i];
+ val = from[prop];
+ if (!isUndefined(val)) {
+ to[prop] = val;
+ }
+ }
+ }
+
+ return to;
+ }
+
+ // Moment prototype object
+ function Moment(config) {
+ copyConfig(this, config);
+ this._d = new Date(config._d != null ? config._d.getTime() : NaN);
+ if (!this.isValid()) {
+ this._d = new Date(NaN);
+ }
+ // Prevent infinite loop in case updateOffset creates new moment
+ // objects.
+ if (updateInProgress === false) {
+ updateInProgress = true;
+ hooks.updateOffset(this);
+ updateInProgress = false;
+ }
+ }
+
+ function isMoment(obj) {
+ return (
+ obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
+ );
+ }
+
+ function warn(msg) {
+ if (
+ hooks.suppressDeprecationWarnings === false &&
+ typeof console !== 'undefined' &&
+ console.warn
+ ) {
+ console.warn('Deprecation warning: ' + msg);
+ }
+ }
+
+ function deprecate(msg, fn) {
+ var firstTime = true;
+
+ return extend(function () {
+ if (hooks.deprecationHandler != null) {
+ hooks.deprecationHandler(null, msg);
+ }
+ if (firstTime) {
+ var args = [],
+ arg,
+ i,
+ key,
+ argLen = arguments.length;
+ for (i = 0; i < argLen; i++) {
+ arg = '';
+ if (typeof arguments[i] === 'object') {
+ arg += '\n[' + i + '] ';
+ for (key in arguments[0]) {
+ if (hasOwnProp(arguments[0], key)) {
+ arg += key + ': ' + arguments[0][key] + ', ';
+ }
+ }
+ arg = arg.slice(0, -2); // Remove trailing comma and space
+ } else {
+ arg = arguments[i];
+ }
+ args.push(arg);
+ }
+ warn(
+ msg +
+ '\nArguments: ' +
+ Array.prototype.slice.call(args).join('') +
+ '\n' +
+ new Error().stack
+ );
+ firstTime = false;
+ }
+ return fn.apply(this, arguments);
+ }, fn);
+ }
+
+ var deprecations = {};
+
+ function deprecateSimple(name, msg) {
+ if (hooks.deprecationHandler != null) {
+ hooks.deprecationHandler(name, msg);
+ }
+ if (!deprecations[name]) {
+ warn(msg);
+ deprecations[name] = true;
+ }
+ }
+
+ hooks.suppressDeprecationWarnings = false;
+ hooks.deprecationHandler = null;
+
+ function isFunction(input) {
+ return (
+ (typeof Function !== 'undefined' && input instanceof Function) ||
+ Object.prototype.toString.call(input) === '[object Function]'
+ );
+ }
+
+ function set(config) {
+ var prop, i;
+ for (i in config) {
+ if (hasOwnProp(config, i)) {
+ prop = config[i];
+ if (isFunction(prop)) {
+ this[i] = prop;
+ } else {
+ this['_' + i] = prop;
+ }
+ }
+ }
+ this._config = config;
+ // Lenient ordinal parsing accepts just a number in addition to
+ // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
+ // TODO: Remove "ordinalParse" fallback in next major release.
+ this._dayOfMonthOrdinalParseLenient = new RegExp(
+ (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
+ '|' +
+ /\d{1,2}/.source
+ );
+ }
+
+ function mergeConfigs(parentConfig, childConfig) {
+ var res = extend({}, parentConfig),
+ prop;
+ for (prop in childConfig) {
+ if (hasOwnProp(childConfig, prop)) {
+ if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
+ res[prop] = {};
+ extend(res[prop], parentConfig[prop]);
+ extend(res[prop], childConfig[prop]);
+ } else if (childConfig[prop] != null) {
+ res[prop] = childConfig[prop];
+ } else {
+ delete res[prop];
+ }
+ }
+ }
+ for (prop in parentConfig) {
+ if (
+ hasOwnProp(parentConfig, prop) &&
+ !hasOwnProp(childConfig, prop) &&
+ isObject(parentConfig[prop])
+ ) {
+ // make sure changes to properties don't modify parent config
+ res[prop] = extend({}, res[prop]);
+ }
+ }
+ return res;
+ }
+
+ function Locale(config) {
+ if (config != null) {
+ this.set(config);
+ }
+ }
+
+ var keys;
+
+ if (Object.keys) {
+ keys = Object.keys;
+ } else {
+ keys = function (obj) {
+ var i,
+ res = [];
+ for (i in obj) {
+ if (hasOwnProp(obj, i)) {
+ res.push(i);
+ }
+ }
+ return res;
+ };
+ }
+
+ var defaultCalendar = {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ };
+
+ function calendar(key, mom, now) {
+ var output = this._calendar[key] || this._calendar['sameElse'];
+ return isFunction(output) ? output.call(mom, now) : output;
+ }
+
+ function zeroFill(number, targetLength, forceSign) {
+ var absNumber = '' + Math.abs(number),
+ zerosToFill = targetLength - absNumber.length,
+ sign = number >= 0;
+ return (
+ (sign ? (forceSign ? '+' : '') : '-') +
+ Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
+ absNumber
+ );
+ }
+
+ var formattingTokens =
+ /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
+ localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
+ formatFunctions = {},
+ formatTokenFunctions = {};
+
+ // token: 'M'
+ // padded: ['MM', 2]
+ // ordinal: 'Mo'
+ // callback: function () { this.month() + 1 }
+ function addFormatToken(token, padded, ordinal, callback) {
+ var func = callback;
+ if (typeof callback === 'string') {
+ func = function () {
+ return this[callback]();
+ };
+ }
+ if (token) {
+ formatTokenFunctions[token] = func;
+ }
+ if (padded) {
+ formatTokenFunctions[padded[0]] = function () {
+ return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
+ };
+ }
+ if (ordinal) {
+ formatTokenFunctions[ordinal] = function () {
+ return this.localeData().ordinal(
+ func.apply(this, arguments),
+ token
+ );
+ };
+ }
+ }
+
+ function removeFormattingTokens(input) {
+ if (input.match(/\[[\s\S]/)) {
+ return input.replace(/^\[|\]$/g, '');
+ }
+ return input.replace(/\\/g, '');
+ }
+
+ function makeFormatFunction(format) {
+ var array = format.match(formattingTokens),
+ i,
+ length;
+
+ for (i = 0, length = array.length; i < length; i++) {
+ if (formatTokenFunctions[array[i]]) {
+ array[i] = formatTokenFunctions[array[i]];
+ } else {
+ array[i] = removeFormattingTokens(array[i]);
+ }
+ }
+
+ return function (mom) {
+ var output = '',
+ i;
+ for (i = 0; i < length; i++) {
+ output += isFunction(array[i])
+ ? array[i].call(mom, format)
+ : array[i];
+ }
+ return output;
+ };
+ }
+
+ // format date using native date object
+ function formatMoment(m, format) {
+ if (!m.isValid()) {
+ return m.localeData().invalidDate();
+ }
+
+ format = expandFormat(format, m.localeData());
+ formatFunctions[format] =
+ formatFunctions[format] || makeFormatFunction(format);
+
+ return formatFunctions[format](m);
+ }
+
+ function expandFormat(format, locale) {
+ var i = 5;
+
+ function replaceLongDateFormatTokens(input) {
+ return locale.longDateFormat(input) || input;
+ }
+
+ localFormattingTokens.lastIndex = 0;
+ while (i >= 0 && localFormattingTokens.test(format)) {
+ format = format.replace(
+ localFormattingTokens,
+ replaceLongDateFormatTokens
+ );
+ localFormattingTokens.lastIndex = 0;
+ i -= 1;
+ }
+
+ return format;
+ }
+
+ var defaultLongDateFormat = {
+ LTS: 'h:mm:ss A',
+ LT: 'h:mm A',
+ L: 'MM/DD/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY h:mm A',
+ LLLL: 'dddd, MMMM D, YYYY h:mm A',
+ };
+
+ function longDateFormat(key) {
+ var format = this._longDateFormat[key],
+ formatUpper = this._longDateFormat[key.toUpperCase()];
+
+ if (format || !formatUpper) {
+ return format;
+ }
+
+ this._longDateFormat[key] = formatUpper
+ .match(formattingTokens)
+ .map(function (tok) {
+ if (
+ tok === 'MMMM' ||
+ tok === 'MM' ||
+ tok === 'DD' ||
+ tok === 'dddd'
+ ) {
+ return tok.slice(1);
+ }
+ return tok;
+ })
+ .join('');
+
+ return this._longDateFormat[key];
+ }
+
+ var defaultInvalidDate = 'Invalid date';
+
+ function invalidDate() {
+ return this._invalidDate;
+ }
+
+ var defaultOrdinal = '%d',
+ defaultDayOfMonthOrdinalParse = /\d{1,2}/;
+
+ function ordinal(number) {
+ return this._ordinal.replace('%d', number);
+ }
+
+ var defaultRelativeTime = {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ w: 'a week',
+ ww: '%d weeks',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ };
+
+ function relativeTime(number, withoutSuffix, string, isFuture) {
+ var output = this._relativeTime[string];
+ return isFunction(output)
+ ? output(number, withoutSuffix, string, isFuture)
+ : output.replace(/%d/i, number);
+ }
+
+ function pastFuture(diff, output) {
+ var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
+ return isFunction(format) ? format(output) : format.replace(/%s/i, output);
+ }
+
+ var aliases = {};
+
+ function addUnitAlias(unit, shorthand) {
+ var lowerCase = unit.toLowerCase();
+ aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
+ }
+
+ function normalizeUnits(units) {
+ return typeof units === 'string'
+ ? aliases[units] || aliases[units.toLowerCase()]
+ : undefined;
+ }
+
+ function normalizeObjectUnits(inputObject) {
+ var normalizedInput = {},
+ normalizedProp,
+ prop;
+
+ for (prop in inputObject) {
+ if (hasOwnProp(inputObject, prop)) {
+ normalizedProp = normalizeUnits(prop);
+ if (normalizedProp) {
+ normalizedInput[normalizedProp] = inputObject[prop];
+ }
+ }
+ }
+
+ return normalizedInput;
+ }
+
+ var priorities = {};
+
+ function addUnitPriority(unit, priority) {
+ priorities[unit] = priority;
+ }
+
+ function getPrioritizedUnits(unitsObj) {
+ var units = [],
+ u;
+ for (u in unitsObj) {
+ if (hasOwnProp(unitsObj, u)) {
+ units.push({ unit: u, priority: priorities[u] });
+ }
+ }
+ units.sort(function (a, b) {
+ return a.priority - b.priority;
+ });
+ return units;
+ }
+
+ function isLeapYear(year) {
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
+ }
+
+ function absFloor(number) {
+ if (number < 0) {
+ // -0 -> 0
+ return Math.ceil(number) || 0;
+ } else {
+ return Math.floor(number);
+ }
+ }
+
+ function toInt(argumentForCoercion) {
+ var coercedNumber = +argumentForCoercion,
+ value = 0;
+
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
+ value = absFloor(coercedNumber);
+ }
+
+ return value;
+ }
+
+ function makeGetSet(unit, keepTime) {
+ return function (value) {
+ if (value != null) {
+ set$1(this, unit, value);
+ hooks.updateOffset(this, keepTime);
+ return this;
+ } else {
+ return get(this, unit);
+ }
+ };
+ }
+
+ function get(mom, unit) {
+ return mom.isValid()
+ ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
+ : NaN;
+ }
+
+ function set$1(mom, unit, value) {
+ if (mom.isValid() && !isNaN(value)) {
+ if (
+ unit === 'FullYear' &&
+ isLeapYear(mom.year()) &&
+ mom.month() === 1 &&
+ mom.date() === 29
+ ) {
+ value = toInt(value);
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
+ value,
+ mom.month(),
+ daysInMonth(value, mom.month())
+ );
+ } else {
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
+ }
+ }
+ }
+
+ // MOMENTS
+
+ function stringGet(units) {
+ units = normalizeUnits(units);
+ if (isFunction(this[units])) {
+ return this[units]();
+ }
+ return this;
+ }
+
+ function stringSet(units, value) {
+ if (typeof units === 'object') {
+ units = normalizeObjectUnits(units);
+ var prioritized = getPrioritizedUnits(units),
+ i,
+ prioritizedLen = prioritized.length;
+ for (i = 0; i < prioritizedLen; i++) {
+ this[prioritized[i].unit](units[prioritized[i].unit]);
+ }
+ } else {
+ units = normalizeUnits(units);
+ if (isFunction(this[units])) {
+ return this[units](value);
+ }
+ }
+ return this;
+ }
+
+ var match1 = /\d/, // 0 - 9
+ match2 = /\d\d/, // 00 - 99
+ match3 = /\d{3}/, // 000 - 999
+ match4 = /\d{4}/, // 0000 - 9999
+ match6 = /[+-]?\d{6}/, // -999999 - 999999
+ match1to2 = /\d\d?/, // 0 - 99
+ match3to4 = /\d\d\d\d?/, // 999 - 9999
+ match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
+ match1to3 = /\d{1,3}/, // 0 - 999
+ match1to4 = /\d{1,4}/, // 0 - 9999
+ match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
+ matchUnsigned = /\d+/, // 0 - inf
+ matchSigned = /[+-]?\d+/, // -inf - inf
+ matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
+ matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
+ matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
+ // any word (or two) characters or numbers including two/three word month in arabic.
+ // includes scottish gaelic two word and hyphenated months
+ matchWord =
+ /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
+ regexes;
+
+ regexes = {};
+
+ function addRegexToken(token, regex, strictRegex) {
+ regexes[token] = isFunction(regex)
+ ? regex
+ : function (isStrict, localeData) {
+ return isStrict && strictRegex ? strictRegex : regex;
+ };
+ }
+
+ function getParseRegexForToken(token, config) {
+ if (!hasOwnProp(regexes, token)) {
+ return new RegExp(unescapeFormat(token));
+ }
+
+ return regexes[token](config._strict, config._locale);
+ }
+
+ // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
+ function unescapeFormat(s) {
+ return regexEscape(
+ s
+ .replace('\\', '')
+ .replace(
+ /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
+ function (matched, p1, p2, p3, p4) {
+ return p1 || p2 || p3 || p4;
+ }
+ )
+ );
+ }
+
+ function regexEscape(s) {
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+ }
+
+ var tokens = {};
+
+ function addParseToken(token, callback) {
+ var i,
+ func = callback,
+ tokenLen;
+ if (typeof token === 'string') {
+ token = [token];
+ }
+ if (isNumber(callback)) {
+ func = function (input, array) {
+ array[callback] = toInt(input);
+ };
+ }
+ tokenLen = token.length;
+ for (i = 0; i < tokenLen; i++) {
+ tokens[token[i]] = func;
+ }
+ }
+
+ function addWeekParseToken(token, callback) {
+ addParseToken(token, function (input, array, config, token) {
+ config._w = config._w || {};
+ callback(input, config._w, config, token);
+ });
+ }
+
+ function addTimeToArrayFromToken(token, input, config) {
+ if (input != null && hasOwnProp(tokens, token)) {
+ tokens[token](input, config._a, config, token);
+ }
+ }
+
+ var YEAR = 0,
+ MONTH = 1,
+ DATE = 2,
+ HOUR = 3,
+ MINUTE = 4,
+ SECOND = 5,
+ MILLISECOND = 6,
+ WEEK = 7,
+ WEEKDAY = 8;
+
+ function mod(n, x) {
+ return ((n % x) + x) % x;
+ }
+
+ var indexOf;
+
+ if (Array.prototype.indexOf) {
+ indexOf = Array.prototype.indexOf;
+ } else {
+ indexOf = function (o) {
+ // I know
+ var i;
+ for (i = 0; i < this.length; ++i) {
+ if (this[i] === o) {
+ return i;
+ }
+ }
+ return -1;
+ };
+ }
+
+ function daysInMonth(year, month) {
+ if (isNaN(year) || isNaN(month)) {
+ return NaN;
+ }
+ var modMonth = mod(month, 12);
+ year += (month - modMonth) / 12;
+ return modMonth === 1
+ ? isLeapYear(year)
+ ? 29
+ : 28
+ : 31 - ((modMonth % 7) % 2);
+ }
+
+ // FORMATTING
+
+ addFormatToken('M', ['MM', 2], 'Mo', function () {
+ return this.month() + 1;
+ });
+
+ addFormatToken('MMM', 0, 0, function (format) {
+ return this.localeData().monthsShort(this, format);
+ });
+
+ addFormatToken('MMMM', 0, 0, function (format) {
+ return this.localeData().months(this, format);
+ });
+
+ // ALIASES
+
+ addUnitAlias('month', 'M');
+
+ // PRIORITY
+
+ addUnitPriority('month', 8);
+
+ // PARSING
+
+ addRegexToken('M', match1to2);
+ addRegexToken('MM', match1to2, match2);
+ addRegexToken('MMM', function (isStrict, locale) {
+ return locale.monthsShortRegex(isStrict);
+ });
+ addRegexToken('MMMM', function (isStrict, locale) {
+ return locale.monthsRegex(isStrict);
+ });
+
+ addParseToken(['M', 'MM'], function (input, array) {
+ array[MONTH] = toInt(input) - 1;
+ });
+
+ addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
+ var month = config._locale.monthsParse(input, token, config._strict);
+ // if we didn't find a month name, mark the date as invalid.
+ if (month != null) {
+ array[MONTH] = month;
+ } else {
+ getParsingFlags(config).invalidMonth = input;
+ }
+ });
+
+ // LOCALES
+
+ var defaultLocaleMonths =
+ 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ defaultLocaleMonthsShort =
+ 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
+ defaultMonthsShortRegex = matchWord,
+ defaultMonthsRegex = matchWord;
+
+ function localeMonths(m, format) {
+ if (!m) {
+ return isArray(this._months)
+ ? this._months
+ : this._months['standalone'];
+ }
+ return isArray(this._months)
+ ? this._months[m.month()]
+ : this._months[
+ (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
+ ? 'format'
+ : 'standalone'
+ ][m.month()];
+ }
+
+ function localeMonthsShort(m, format) {
+ if (!m) {
+ return isArray(this._monthsShort)
+ ? this._monthsShort
+ : this._monthsShort['standalone'];
+ }
+ return isArray(this._monthsShort)
+ ? this._monthsShort[m.month()]
+ : this._monthsShort[
+ MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
+ ][m.month()];
+ }
+
+ function handleStrictParse(monthName, format, strict) {
+ var i,
+ ii,
+ mom,
+ llc = monthName.toLocaleLowerCase();
+ if (!this._monthsParse) {
+ // this is not used
+ this._monthsParse = [];
+ this._longMonthsParse = [];
+ this._shortMonthsParse = [];
+ for (i = 0; i < 12; ++i) {
+ mom = createUTC([2000, i]);
+ this._shortMonthsParse[i] = this.monthsShort(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
+ }
+ }
+
+ if (strict) {
+ if (format === 'MMM') {
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._longMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ } else {
+ if (format === 'MMM') {
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._longMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._longMonthsParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ }
+ }
+
+ function localeMonthsParse(monthName, format, strict) {
+ var i, mom, regex;
+
+ if (this._monthsParseExact) {
+ return handleStrictParse.call(this, monthName, format, strict);
+ }
+
+ if (!this._monthsParse) {
+ this._monthsParse = [];
+ this._longMonthsParse = [];
+ this._shortMonthsParse = [];
+ }
+
+ // TODO: add sorting
+ // Sorting makes sure if one month (or abbr) is a prefix of another
+ // see sorting in computeMonthsParse
+ for (i = 0; i < 12; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, i]);
+ if (strict && !this._longMonthsParse[i]) {
+ this._longMonthsParse[i] = new RegExp(
+ '^' + this.months(mom, '').replace('.', '') + '$',
+ 'i'
+ );
+ this._shortMonthsParse[i] = new RegExp(
+ '^' + this.monthsShort(mom, '').replace('.', '') + '$',
+ 'i'
+ );
+ }
+ if (!strict && !this._monthsParse[i]) {
+ regex =
+ '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
+ this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (
+ strict &&
+ format === 'MMMM' &&
+ this._longMonthsParse[i].test(monthName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'MMM' &&
+ this._shortMonthsParse[i].test(monthName)
+ ) {
+ return i;
+ } else if (!strict && this._monthsParse[i].test(monthName)) {
+ return i;
+ }
+ }
+ }
+
+ // MOMENTS
+
+ function setMonth(mom, value) {
+ var dayOfMonth;
+
+ if (!mom.isValid()) {
+ // No op
+ return mom;
+ }
+
+ if (typeof value === 'string') {
+ if (/^\d+$/.test(value)) {
+ value = toInt(value);
+ } else {
+ value = mom.localeData().monthsParse(value);
+ // TODO: Another silent failure?
+ if (!isNumber(value)) {
+ return mom;
+ }
+ }
+ }
+
+ dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
+ return mom;
+ }
+
+ function getSetMonth(value) {
+ if (value != null) {
+ setMonth(this, value);
+ hooks.updateOffset(this, true);
+ return this;
+ } else {
+ return get(this, 'Month');
+ }
+ }
+
+ function getDaysInMonth() {
+ return daysInMonth(this.year(), this.month());
+ }
+
+ function monthsShortRegex(isStrict) {
+ if (this._monthsParseExact) {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ computeMonthsParse.call(this);
+ }
+ if (isStrict) {
+ return this._monthsShortStrictRegex;
+ } else {
+ return this._monthsShortRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_monthsShortRegex')) {
+ this._monthsShortRegex = defaultMonthsShortRegex;
+ }
+ return this._monthsShortStrictRegex && isStrict
+ ? this._monthsShortStrictRegex
+ : this._monthsShortRegex;
+ }
+ }
+
+ function monthsRegex(isStrict) {
+ if (this._monthsParseExact) {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ computeMonthsParse.call(this);
+ }
+ if (isStrict) {
+ return this._monthsStrictRegex;
+ } else {
+ return this._monthsRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ this._monthsRegex = defaultMonthsRegex;
+ }
+ return this._monthsStrictRegex && isStrict
+ ? this._monthsStrictRegex
+ : this._monthsRegex;
+ }
+ }
+
+ function computeMonthsParse() {
+ function cmpLenRev(a, b) {
+ return b.length - a.length;
+ }
+
+ var shortPieces = [],
+ longPieces = [],
+ mixedPieces = [],
+ i,
+ mom;
+ for (i = 0; i < 12; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, i]);
+ shortPieces.push(this.monthsShort(mom, ''));
+ longPieces.push(this.months(mom, ''));
+ mixedPieces.push(this.months(mom, ''));
+ mixedPieces.push(this.monthsShort(mom, ''));
+ }
+ // Sorting makes sure if one month (or abbr) is a prefix of another it
+ // will match the longer piece.
+ shortPieces.sort(cmpLenRev);
+ longPieces.sort(cmpLenRev);
+ mixedPieces.sort(cmpLenRev);
+ for (i = 0; i < 12; i++) {
+ shortPieces[i] = regexEscape(shortPieces[i]);
+ longPieces[i] = regexEscape(longPieces[i]);
+ }
+ for (i = 0; i < 24; i++) {
+ mixedPieces[i] = regexEscape(mixedPieces[i]);
+ }
+
+ this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._monthsShortRegex = this._monthsRegex;
+ this._monthsStrictRegex = new RegExp(
+ '^(' + longPieces.join('|') + ')',
+ 'i'
+ );
+ this._monthsShortStrictRegex = new RegExp(
+ '^(' + shortPieces.join('|') + ')',
+ 'i'
+ );
+ }
+
+ // FORMATTING
+
+ addFormatToken('Y', 0, 0, function () {
+ var y = this.year();
+ return y <= 9999 ? zeroFill(y, 4) : '+' + y;
+ });
+
+ addFormatToken(0, ['YY', 2], 0, function () {
+ return this.year() % 100;
+ });
+
+ addFormatToken(0, ['YYYY', 4], 0, 'year');
+ addFormatToken(0, ['YYYYY', 5], 0, 'year');
+ addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
+
+ // ALIASES
+
+ addUnitAlias('year', 'y');
+
+ // PRIORITIES
+
+ addUnitPriority('year', 1);
+
+ // PARSING
+
+ addRegexToken('Y', matchSigned);
+ addRegexToken('YY', match1to2, match2);
+ addRegexToken('YYYY', match1to4, match4);
+ addRegexToken('YYYYY', match1to6, match6);
+ addRegexToken('YYYYYY', match1to6, match6);
+
+ addParseToken(['YYYYY', 'YYYYYY'], YEAR);
+ addParseToken('YYYY', function (input, array) {
+ array[YEAR] =
+ input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
+ });
+ addParseToken('YY', function (input, array) {
+ array[YEAR] = hooks.parseTwoDigitYear(input);
+ });
+ addParseToken('Y', function (input, array) {
+ array[YEAR] = parseInt(input, 10);
+ });
+
+ // HELPERS
+
+ function daysInYear(year) {
+ return isLeapYear(year) ? 366 : 365;
+ }
+
+ // HOOKS
+
+ hooks.parseTwoDigitYear = function (input) {
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
+ };
+
+ // MOMENTS
+
+ var getSetYear = makeGetSet('FullYear', true);
+
+ function getIsLeapYear() {
+ return isLeapYear(this.year());
+ }
+
+ function createDate(y, m, d, h, M, s, ms) {
+ // can't just apply() to create a date:
+ // https://stackoverflow.com/q/181348
+ var date;
+ // the date constructor remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ date = new Date(y + 400, m, d, h, M, s, ms);
+ if (isFinite(date.getFullYear())) {
+ date.setFullYear(y);
+ }
+ } else {
+ date = new Date(y, m, d, h, M, s, ms);
+ }
+
+ return date;
+ }
+
+ function createUTCDate(y) {
+ var date, args;
+ // the Date.UTC function remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ args = Array.prototype.slice.call(arguments);
+ // preserve leap years using a full 400 year cycle, then reset
+ args[0] = y + 400;
+ date = new Date(Date.UTC.apply(null, args));
+ if (isFinite(date.getUTCFullYear())) {
+ date.setUTCFullYear(y);
+ }
+ } else {
+ date = new Date(Date.UTC.apply(null, arguments));
+ }
+
+ return date;
+ }
+
+ // start-of-first-week - start-of-year
+ function firstWeekOffset(year, dow, doy) {
+ var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
+ fwd = 7 + dow - doy,
+ // first-week day local weekday -- which local weekday is fwd
+ fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
+
+ return -fwdlw + fwd - 1;
+ }
+
+ // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
+ function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
+ var localWeekday = (7 + weekday - dow) % 7,
+ weekOffset = firstWeekOffset(year, dow, doy),
+ dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
+ resYear,
+ resDayOfYear;
+
+ if (dayOfYear <= 0) {
+ resYear = year - 1;
+ resDayOfYear = daysInYear(resYear) + dayOfYear;
+ } else if (dayOfYear > daysInYear(year)) {
+ resYear = year + 1;
+ resDayOfYear = dayOfYear - daysInYear(year);
+ } else {
+ resYear = year;
+ resDayOfYear = dayOfYear;
+ }
+
+ return {
+ year: resYear,
+ dayOfYear: resDayOfYear,
+ };
+ }
+
+ function weekOfYear(mom, dow, doy) {
+ var weekOffset = firstWeekOffset(mom.year(), dow, doy),
+ week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
+ resWeek,
+ resYear;
+
+ if (week < 1) {
+ resYear = mom.year() - 1;
+ resWeek = week + weeksInYear(resYear, dow, doy);
+ } else if (week > weeksInYear(mom.year(), dow, doy)) {
+ resWeek = week - weeksInYear(mom.year(), dow, doy);
+ resYear = mom.year() + 1;
+ } else {
+ resYear = mom.year();
+ resWeek = week;
+ }
+
+ return {
+ week: resWeek,
+ year: resYear,
+ };
+ }
+
+ function weeksInYear(year, dow, doy) {
+ var weekOffset = firstWeekOffset(year, dow, doy),
+ weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
+ return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
+ }
+
+ // FORMATTING
+
+ addFormatToken('w', ['ww', 2], 'wo', 'week');
+ addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
+
+ // ALIASES
+
+ addUnitAlias('week', 'w');
+ addUnitAlias('isoWeek', 'W');
+
+ // PRIORITIES
+
+ addUnitPriority('week', 5);
+ addUnitPriority('isoWeek', 5);
+
+ // PARSING
+
+ addRegexToken('w', match1to2);
+ addRegexToken('ww', match1to2, match2);
+ addRegexToken('W', match1to2);
+ addRegexToken('WW', match1to2, match2);
+
+ addWeekParseToken(
+ ['w', 'ww', 'W', 'WW'],
+ function (input, week, config, token) {
+ week[token.substr(0, 1)] = toInt(input);
+ }
+ );
+
+ // HELPERS
+
+ // LOCALES
+
+ function localeWeek(mom) {
+ return weekOfYear(mom, this._week.dow, this._week.doy).week;
+ }
+
+ var defaultLocaleWeek = {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ };
+
+ function localeFirstDayOfWeek() {
+ return this._week.dow;
+ }
+
+ function localeFirstDayOfYear() {
+ return this._week.doy;
+ }
+
+ // MOMENTS
+
+ function getSetWeek(input) {
+ var week = this.localeData().week(this);
+ return input == null ? week : this.add((input - week) * 7, 'd');
+ }
+
+ function getSetISOWeek(input) {
+ var week = weekOfYear(this, 1, 4).week;
+ return input == null ? week : this.add((input - week) * 7, 'd');
+ }
+
+ // FORMATTING
+
+ addFormatToken('d', 0, 'do', 'day');
+
+ addFormatToken('dd', 0, 0, function (format) {
+ return this.localeData().weekdaysMin(this, format);
+ });
+
+ addFormatToken('ddd', 0, 0, function (format) {
+ return this.localeData().weekdaysShort(this, format);
+ });
+
+ addFormatToken('dddd', 0, 0, function (format) {
+ return this.localeData().weekdays(this, format);
+ });
+
+ addFormatToken('e', 0, 0, 'weekday');
+ addFormatToken('E', 0, 0, 'isoWeekday');
+
+ // ALIASES
+
+ addUnitAlias('day', 'd');
+ addUnitAlias('weekday', 'e');
+ addUnitAlias('isoWeekday', 'E');
+
+ // PRIORITY
+ addUnitPriority('day', 11);
+ addUnitPriority('weekday', 11);
+ addUnitPriority('isoWeekday', 11);
+
+ // PARSING
+
+ addRegexToken('d', match1to2);
+ addRegexToken('e', match1to2);
+ addRegexToken('E', match1to2);
+ addRegexToken('dd', function (isStrict, locale) {
+ return locale.weekdaysMinRegex(isStrict);
+ });
+ addRegexToken('ddd', function (isStrict, locale) {
+ return locale.weekdaysShortRegex(isStrict);
+ });
+ addRegexToken('dddd', function (isStrict, locale) {
+ return locale.weekdaysRegex(isStrict);
+ });
+
+ addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
+ var weekday = config._locale.weekdaysParse(input, token, config._strict);
+ // if we didn't get a weekday name, mark the date as invalid
+ if (weekday != null) {
+ week.d = weekday;
+ } else {
+ getParsingFlags(config).invalidWeekday = input;
+ }
+ });
+
+ addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
+ week[token] = toInt(input);
+ });
+
+ // HELPERS
+
+ function parseWeekday(input, locale) {
+ if (typeof input !== 'string') {
+ return input;
+ }
+
+ if (!isNaN(input)) {
+ return parseInt(input, 10);
+ }
+
+ input = locale.weekdaysParse(input);
+ if (typeof input === 'number') {
+ return input;
+ }
+
+ return null;
+ }
+
+ function parseIsoWeekday(input, locale) {
+ if (typeof input === 'string') {
+ return locale.weekdaysParse(input) % 7 || 7;
+ }
+ return isNaN(input) ? null : input;
+ }
+
+ // LOCALES
+ function shiftWeekdays(ws, n) {
+ return ws.slice(n, 7).concat(ws.slice(0, n));
+ }
+
+ var defaultLocaleWeekdays =
+ 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ defaultWeekdaysRegex = matchWord,
+ defaultWeekdaysShortRegex = matchWord,
+ defaultWeekdaysMinRegex = matchWord;
+
+ function localeWeekdays(m, format) {
+ var weekdays = isArray(this._weekdays)
+ ? this._weekdays
+ : this._weekdays[
+ m && m !== true && this._weekdays.isFormat.test(format)
+ ? 'format'
+ : 'standalone'
+ ];
+ return m === true
+ ? shiftWeekdays(weekdays, this._week.dow)
+ : m
+ ? weekdays[m.day()]
+ : weekdays;
+ }
+
+ function localeWeekdaysShort(m) {
+ return m === true
+ ? shiftWeekdays(this._weekdaysShort, this._week.dow)
+ : m
+ ? this._weekdaysShort[m.day()]
+ : this._weekdaysShort;
+ }
+
+ function localeWeekdaysMin(m) {
+ return m === true
+ ? shiftWeekdays(this._weekdaysMin, this._week.dow)
+ : m
+ ? this._weekdaysMin[m.day()]
+ : this._weekdaysMin;
+ }
+
+ function handleStrictParse$1(weekdayName, format, strict) {
+ var i,
+ ii,
+ mom,
+ llc = weekdayName.toLocaleLowerCase();
+ if (!this._weekdaysParse) {
+ this._weekdaysParse = [];
+ this._shortWeekdaysParse = [];
+ this._minWeekdaysParse = [];
+
+ for (i = 0; i < 7; ++i) {
+ mom = createUTC([2000, 1]).day(i);
+ this._minWeekdaysParse[i] = this.weekdaysMin(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._shortWeekdaysParse[i] = this.weekdaysShort(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
+ }
+ }
+
+ if (strict) {
+ if (format === 'dddd') {
+ ii = indexOf.call(this._weekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else if (format === 'ddd') {
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ } else {
+ if (format === 'dddd') {
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else if (format === 'ddd') {
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ }
+ }
+
+ function localeWeekdaysParse(weekdayName, format, strict) {
+ var i, mom, regex;
+
+ if (this._weekdaysParseExact) {
+ return handleStrictParse$1.call(this, weekdayName, format, strict);
+ }
+
+ if (!this._weekdaysParse) {
+ this._weekdaysParse = [];
+ this._minWeekdaysParse = [];
+ this._shortWeekdaysParse = [];
+ this._fullWeekdaysParse = [];
+ }
+
+ for (i = 0; i < 7; i++) {
+ // make the regex if we don't have it already
+
+ mom = createUTC([2000, 1]).day(i);
+ if (strict && !this._fullWeekdaysParse[i]) {
+ this._fullWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ this._shortWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ this._minWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ }
+ if (!this._weekdaysParse[i]) {
+ regex =
+ '^' +
+ this.weekdays(mom, '') +
+ '|^' +
+ this.weekdaysShort(mom, '') +
+ '|^' +
+ this.weekdaysMin(mom, '');
+ this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (
+ strict &&
+ format === 'dddd' &&
+ this._fullWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'ddd' &&
+ this._shortWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'dd' &&
+ this._minWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
+ return i;
+ }
+ }
+ }
+
+ // MOMENTS
+
+ function getSetDayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
+ if (input != null) {
+ input = parseWeekday(input, this.localeData());
+ return this.add(input - day, 'd');
+ } else {
+ return day;
+ }
+ }
+
+ function getSetLocaleDayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
+ return input == null ? weekday : this.add(input - weekday, 'd');
+ }
+
+ function getSetISODayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+
+ // behaves the same as moment#day except
+ // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
+ // as a setter, sunday should belong to the previous week.
+
+ if (input != null) {
+ var weekday = parseIsoWeekday(input, this.localeData());
+ return this.day(this.day() % 7 ? weekday : weekday - 7);
+ } else {
+ return this.day() || 7;
+ }
+ }
+
+ function weekdaysRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysStrictRegex;
+ } else {
+ return this._weekdaysRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ this._weekdaysRegex = defaultWeekdaysRegex;
+ }
+ return this._weekdaysStrictRegex && isStrict
+ ? this._weekdaysStrictRegex
+ : this._weekdaysRegex;
+ }
+ }
+
+ function weekdaysShortRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysShortStrictRegex;
+ } else {
+ return this._weekdaysShortRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysShortRegex')) {
+ this._weekdaysShortRegex = defaultWeekdaysShortRegex;
+ }
+ return this._weekdaysShortStrictRegex && isStrict
+ ? this._weekdaysShortStrictRegex
+ : this._weekdaysShortRegex;
+ }
+ }
+
+ function weekdaysMinRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysMinStrictRegex;
+ } else {
+ return this._weekdaysMinRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysMinRegex')) {
+ this._weekdaysMinRegex = defaultWeekdaysMinRegex;
+ }
+ return this._weekdaysMinStrictRegex && isStrict
+ ? this._weekdaysMinStrictRegex
+ : this._weekdaysMinRegex;
+ }
+ }
+
+ function computeWeekdaysParse() {
+ function cmpLenRev(a, b) {
+ return b.length - a.length;
+ }
+
+ var minPieces = [],
+ shortPieces = [],
+ longPieces = [],
+ mixedPieces = [],
+ i,
+ mom,
+ minp,
+ shortp,
+ longp;
+ for (i = 0; i < 7; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, 1]).day(i);
+ minp = regexEscape(this.weekdaysMin(mom, ''));
+ shortp = regexEscape(this.weekdaysShort(mom, ''));
+ longp = regexEscape(this.weekdays(mom, ''));
+ minPieces.push(minp);
+ shortPieces.push(shortp);
+ longPieces.push(longp);
+ mixedPieces.push(minp);
+ mixedPieces.push(shortp);
+ mixedPieces.push(longp);
+ }
+ // Sorting makes sure if one weekday (or abbr) is a prefix of another it
+ // will match the longer piece.
+ minPieces.sort(cmpLenRev);
+ shortPieces.sort(cmpLenRev);
+ longPieces.sort(cmpLenRev);
+ mixedPieces.sort(cmpLenRev);
+
+ this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._weekdaysShortRegex = this._weekdaysRegex;
+ this._weekdaysMinRegex = this._weekdaysRegex;
+
+ this._weekdaysStrictRegex = new RegExp(
+ '^(' + longPieces.join('|') + ')',
+ 'i'
+ );
+ this._weekdaysShortStrictRegex = new RegExp(
+ '^(' + shortPieces.join('|') + ')',
+ 'i'
+ );
+ this._weekdaysMinStrictRegex = new RegExp(
+ '^(' + minPieces.join('|') + ')',
+ 'i'
+ );
+ }
+
+ // FORMATTING
+
+ function hFormat() {
+ return this.hours() % 12 || 12;
+ }
+
+ function kFormat() {
+ return this.hours() || 24;
+ }
+
+ addFormatToken('H', ['HH', 2], 0, 'hour');
+ addFormatToken('h', ['hh', 2], 0, hFormat);
+ addFormatToken('k', ['kk', 2], 0, kFormat);
+
+ addFormatToken('hmm', 0, 0, function () {
+ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
+ });
+
+ addFormatToken('hmmss', 0, 0, function () {
+ return (
+ '' +
+ hFormat.apply(this) +
+ zeroFill(this.minutes(), 2) +
+ zeroFill(this.seconds(), 2)
+ );
+ });
+
+ addFormatToken('Hmm', 0, 0, function () {
+ return '' + this.hours() + zeroFill(this.minutes(), 2);
+ });
+
+ addFormatToken('Hmmss', 0, 0, function () {
+ return (
+ '' +
+ this.hours() +
+ zeroFill(this.minutes(), 2) +
+ zeroFill(this.seconds(), 2)
+ );
+ });
+
+ function meridiem(token, lowercase) {
+ addFormatToken(token, 0, 0, function () {
+ return this.localeData().meridiem(
+ this.hours(),
+ this.minutes(),
+ lowercase
+ );
+ });
+ }
+
+ meridiem('a', true);
+ meridiem('A', false);
+
+ // ALIASES
+
+ addUnitAlias('hour', 'h');
+
+ // PRIORITY
+ addUnitPriority('hour', 13);
+
+ // PARSING
+
+ function matchMeridiem(isStrict, locale) {
+ return locale._meridiemParse;
+ }
+
+ addRegexToken('a', matchMeridiem);
+ addRegexToken('A', matchMeridiem);
+ addRegexToken('H', match1to2);
+ addRegexToken('h', match1to2);
+ addRegexToken('k', match1to2);
+ addRegexToken('HH', match1to2, match2);
+ addRegexToken('hh', match1to2, match2);
+ addRegexToken('kk', match1to2, match2);
+
+ addRegexToken('hmm', match3to4);
+ addRegexToken('hmmss', match5to6);
+ addRegexToken('Hmm', match3to4);
+ addRegexToken('Hmmss', match5to6);
+
+ addParseToken(['H', 'HH'], HOUR);
+ addParseToken(['k', 'kk'], function (input, array, config) {
+ var kInput = toInt(input);
+ array[HOUR] = kInput === 24 ? 0 : kInput;
+ });
+ addParseToken(['a', 'A'], function (input, array, config) {
+ config._isPm = config._locale.isPM(input);
+ config._meridiem = input;
+ });
+ addParseToken(['h', 'hh'], function (input, array, config) {
+ array[HOUR] = toInt(input);
+ getParsingFlags(config).bigHour = true;
+ });
+ addParseToken('hmm', function (input, array, config) {
+ var pos = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos));
+ array[MINUTE] = toInt(input.substr(pos));
+ getParsingFlags(config).bigHour = true;
+ });
+ addParseToken('hmmss', function (input, array, config) {
+ var pos1 = input.length - 4,
+ pos2 = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos1));
+ array[MINUTE] = toInt(input.substr(pos1, 2));
+ array[SECOND] = toInt(input.substr(pos2));
+ getParsingFlags(config).bigHour = true;
+ });
+ addParseToken('Hmm', function (input, array, config) {
+ var pos = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos));
+ array[MINUTE] = toInt(input.substr(pos));
+ });
+ addParseToken('Hmmss', function (input, array, config) {
+ var pos1 = input.length - 4,
+ pos2 = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos1));
+ array[MINUTE] = toInt(input.substr(pos1, 2));
+ array[SECOND] = toInt(input.substr(pos2));
+ });
+
+ // LOCALES
+
+ function localeIsPM(input) {
+ // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
+ // Using charAt should be more compatible.
+ return (input + '').toLowerCase().charAt(0) === 'p';
+ }
+
+ var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
+ // Setting the hour should keep the time, because the user explicitly
+ // specified which hour they want. So trying to maintain the same hour (in
+ // a new timezone) makes sense. Adding/subtracting hours does not follow
+ // this rule.
+ getSetHour = makeGetSet('Hours', true);
+
+ function localeMeridiem(hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'pm' : 'PM';
+ } else {
+ return isLower ? 'am' : 'AM';
+ }
+ }
+
+ var baseConfig = {
+ calendar: defaultCalendar,
+ longDateFormat: defaultLongDateFormat,
+ invalidDate: defaultInvalidDate,
+ ordinal: defaultOrdinal,
+ dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
+ relativeTime: defaultRelativeTime,
+
+ months: defaultLocaleMonths,
+ monthsShort: defaultLocaleMonthsShort,
+
+ week: defaultLocaleWeek,
+
+ weekdays: defaultLocaleWeekdays,
+ weekdaysMin: defaultLocaleWeekdaysMin,
+ weekdaysShort: defaultLocaleWeekdaysShort,
+
+ meridiemParse: defaultLocaleMeridiemParse,
+ };
+
+ // internal storage for locale config files
+ var locales = {},
+ localeFamilies = {},
+ globalLocale;
+
+ function commonPrefix(arr1, arr2) {
+ var i,
+ minl = Math.min(arr1.length, arr2.length);
+ for (i = 0; i < minl; i += 1) {
+ if (arr1[i] !== arr2[i]) {
+ return i;
+ }
+ }
+ return minl;
+ }
+
+ function normalizeLocale(key) {
+ return key ? key.toLowerCase().replace('_', '-') : key;
+ }
+
+ // pick the locale from the array
+ // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
+ // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
+ function chooseLocale(names) {
+ var i = 0,
+ j,
+ next,
+ locale,
+ split;
+
+ while (i < names.length) {
+ split = normalizeLocale(names[i]).split('-');
+ j = split.length;
+ next = normalizeLocale(names[i + 1]);
+ next = next ? next.split('-') : null;
+ while (j > 0) {
+ locale = loadLocale(split.slice(0, j).join('-'));
+ if (locale) {
+ return locale;
+ }
+ if (
+ next &&
+ next.length >= j &&
+ commonPrefix(split, next) >= j - 1
+ ) {
+ //the next array item is better than a shallower substring of this one
+ break;
+ }
+ j--;
+ }
+ i++;
+ }
+ return globalLocale;
+ }
+
+ function isLocaleNameSane(name) {
+ // Prevent names that look like filesystem paths, i.e contain '/' or '\'
+ return name.match('^[^/\\\\]*$') != null;
+ }
+
+ function loadLocale(name) {
+ var oldLocale = null,
+ aliasedRequire;
+ // TODO: Find a better way to register and load all the locales in Node
+ if (
+ locales[name] === undefined &&
+ typeof module !== 'undefined' &&
+ module &&
+ module.exports &&
+ isLocaleNameSane(name)
+ ) {
+ try {
+ oldLocale = globalLocale._abbr;
+ aliasedRequire = require;
+ aliasedRequire('./locale/' + name);
+ getSetGlobalLocale(oldLocale);
+ } catch (e) {
+ // mark as not found to avoid repeating expensive file require call causing high CPU
+ // when trying to find en-US, en_US, en-us for every format call
+ locales[name] = null; // null means not found
+ }
+ }
+ return locales[name];
+ }
+
+ // This function will load locale and then set the global locale. If
+ // no arguments are passed in, it will simply return the current global
+ // locale key.
+ function getSetGlobalLocale(key, values) {
+ var data;
+ if (key) {
+ if (isUndefined(values)) {
+ data = getLocale(key);
+ } else {
+ data = defineLocale(key, values);
+ }
+
+ if (data) {
+ // moment.duration._locale = moment._locale = data;
+ globalLocale = data;
+ } else {
+ if (typeof console !== 'undefined' && console.warn) {
+ //warn user if arguments are passed but the locale could not be set
+ console.warn(
+ 'Locale ' + key + ' not found. Did you forget to load it?'
+ );
+ }
+ }
+ }
+
+ return globalLocale._abbr;
+ }
+
+ function defineLocale(name, config) {
+ if (config !== null) {
+ var locale,
+ parentConfig = baseConfig;
+ config.abbr = name;
+ if (locales[name] != null) {
+ deprecateSimple(
+ 'defineLocaleOverride',
+ 'use moment.updateLocale(localeName, config) to change ' +
+ 'an existing locale. moment.defineLocale(localeName, ' +
+ 'config) should only be used for creating a new locale ' +
+ 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
+ );
+ parentConfig = locales[name]._config;
+ } else if (config.parentLocale != null) {
+ if (locales[config.parentLocale] != null) {
+ parentConfig = locales[config.parentLocale]._config;
+ } else {
+ locale = loadLocale(config.parentLocale);
+ if (locale != null) {
+ parentConfig = locale._config;
+ } else {
+ if (!localeFamilies[config.parentLocale]) {
+ localeFamilies[config.parentLocale] = [];
+ }
+ localeFamilies[config.parentLocale].push({
+ name: name,
+ config: config,
+ });
+ return null;
+ }
+ }
+ }
+ locales[name] = new Locale(mergeConfigs(parentConfig, config));
+
+ if (localeFamilies[name]) {
+ localeFamilies[name].forEach(function (x) {
+ defineLocale(x.name, x.config);
+ });
+ }
+
+ // backwards compat for now: also set the locale
+ // make sure we set the locale AFTER all child locales have been
+ // created, so we won't end up with the child locale set.
+ getSetGlobalLocale(name);
+
+ return locales[name];
+ } else {
+ // useful for testing
+ delete locales[name];
+ return null;
+ }
+ }
+
+ function updateLocale(name, config) {
+ if (config != null) {
+ var locale,
+ tmpLocale,
+ parentConfig = baseConfig;
+
+ if (locales[name] != null && locales[name].parentLocale != null) {
+ // Update existing child locale in-place to avoid memory-leaks
+ locales[name].set(mergeConfigs(locales[name]._config, config));
+ } else {
+ // MERGE
+ tmpLocale = loadLocale(name);
+ if (tmpLocale != null) {
+ parentConfig = tmpLocale._config;
+ }
+ config = mergeConfigs(parentConfig, config);
+ if (tmpLocale == null) {
+ // updateLocale is called for creating a new locale
+ // Set abbr so it will have a name (getters return
+ // undefined otherwise).
+ config.abbr = name;
+ }
+ locale = new Locale(config);
+ locale.parentLocale = locales[name];
+ locales[name] = locale;
+ }
+
+ // backwards compat for now: also set the locale
+ getSetGlobalLocale(name);
+ } else {
+ // pass null for config to unupdate, useful for tests
+ if (locales[name] != null) {
+ if (locales[name].parentLocale != null) {
+ locales[name] = locales[name].parentLocale;
+ if (name === getSetGlobalLocale()) {
+ getSetGlobalLocale(name);
+ }
+ } else if (locales[name] != null) {
+ delete locales[name];
+ }
+ }
+ }
+ return locales[name];
+ }
+
+ // returns locale data
+ function getLocale(key) {
+ var locale;
+
+ if (key && key._locale && key._locale._abbr) {
+ key = key._locale._abbr;
+ }
+
+ if (!key) {
+ return globalLocale;
+ }
+
+ if (!isArray(key)) {
+ //short-circuit everything else
+ locale = loadLocale(key);
+ if (locale) {
+ return locale;
+ }
+ key = [key];
+ }
+
+ return chooseLocale(key);
+ }
+
+ function listLocales() {
+ return keys(locales);
+ }
+
+ function checkOverflow(m) {
+ var overflow,
+ a = m._a;
+
+ if (a && getParsingFlags(m).overflow === -2) {
+ overflow =
+ a[MONTH] < 0 || a[MONTH] > 11
+ ? MONTH
+ : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
+ ? DATE
+ : a[HOUR] < 0 ||
+ a[HOUR] > 24 ||
+ (a[HOUR] === 24 &&
+ (a[MINUTE] !== 0 ||
+ a[SECOND] !== 0 ||
+ a[MILLISECOND] !== 0))
+ ? HOUR
+ : a[MINUTE] < 0 || a[MINUTE] > 59
+ ? MINUTE
+ : a[SECOND] < 0 || a[SECOND] > 59
+ ? SECOND
+ : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
+ ? MILLISECOND
+ : -1;
+
+ if (
+ getParsingFlags(m)._overflowDayOfYear &&
+ (overflow < YEAR || overflow > DATE)
+ ) {
+ overflow = DATE;
+ }
+ if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
+ overflow = WEEK;
+ }
+ if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
+ overflow = WEEKDAY;
+ }
+
+ getParsingFlags(m).overflow = overflow;
+ }
+
+ return m;
+ }
+
+ // iso 8601 regex
+ // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
+ var extendedIsoRegex =
+ /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+ basicIsoRegex =
+ /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+ tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
+ isoDates = [
+ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
+ ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
+ ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
+ ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
+ ['YYYY-DDD', /\d{4}-\d{3}/],
+ ['YYYY-MM', /\d{4}-\d\d/, false],
+ ['YYYYYYMMDD', /[+-]\d{10}/],
+ ['YYYYMMDD', /\d{8}/],
+ ['GGGG[W]WWE', /\d{4}W\d{3}/],
+ ['GGGG[W]WW', /\d{4}W\d{2}/, false],
+ ['YYYYDDD', /\d{7}/],
+ ['YYYYMM', /\d{6}/, false],
+ ['YYYY', /\d{4}/, false],
+ ],
+ // iso time formats and regexes
+ isoTimes = [
+ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
+ ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
+ ['HH:mm:ss', /\d\d:\d\d:\d\d/],
+ ['HH:mm', /\d\d:\d\d/],
+ ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
+ ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
+ ['HHmmss', /\d\d\d\d\d\d/],
+ ['HHmm', /\d\d\d\d/],
+ ['HH', /\d\d/],
+ ],
+ aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
+ // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
+ rfc2822 =
+ /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
+ obsOffsets = {
+ UT: 0,
+ GMT: 0,
+ EDT: -4 * 60,
+ EST: -5 * 60,
+ CDT: -5 * 60,
+ CST: -6 * 60,
+ MDT: -6 * 60,
+ MST: -7 * 60,
+ PDT: -7 * 60,
+ PST: -8 * 60,
+ };
+
+ // date from iso format
+ function configFromISO(config) {
+ var i,
+ l,
+ string = config._i,
+ match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
+ allowTime,
+ dateFormat,
+ timeFormat,
+ tzFormat,
+ isoDatesLen = isoDates.length,
+ isoTimesLen = isoTimes.length;
+
+ if (match) {
+ getParsingFlags(config).iso = true;
+ for (i = 0, l = isoDatesLen; i < l; i++) {
+ if (isoDates[i][1].exec(match[1])) {
+ dateFormat = isoDates[i][0];
+ allowTime = isoDates[i][2] !== false;
+ break;
+ }
+ }
+ if (dateFormat == null) {
+ config._isValid = false;
+ return;
+ }
+ if (match[3]) {
+ for (i = 0, l = isoTimesLen; i < l; i++) {
+ if (isoTimes[i][1].exec(match[3])) {
+ // match[2] should be 'T' or space
+ timeFormat = (match[2] || ' ') + isoTimes[i][0];
+ break;
+ }
+ }
+ if (timeFormat == null) {
+ config._isValid = false;
+ return;
+ }
+ }
+ if (!allowTime && timeFormat != null) {
+ config._isValid = false;
+ return;
+ }
+ if (match[4]) {
+ if (tzRegex.exec(match[4])) {
+ tzFormat = 'Z';
+ } else {
+ config._isValid = false;
+ return;
+ }
+ }
+ config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
+ configFromStringAndFormat(config);
+ } else {
+ config._isValid = false;
+ }
+ }
+
+ function extractFromRFC2822Strings(
+ yearStr,
+ monthStr,
+ dayStr,
+ hourStr,
+ minuteStr,
+ secondStr
+ ) {
+ var result = [
+ untruncateYear(yearStr),
+ defaultLocaleMonthsShort.indexOf(monthStr),
+ parseInt(dayStr, 10),
+ parseInt(hourStr, 10),
+ parseInt(minuteStr, 10),
+ ];
+
+ if (secondStr) {
+ result.push(parseInt(secondStr, 10));
+ }
+
+ return result;
+ }
+
+ function untruncateYear(yearStr) {
+ var year = parseInt(yearStr, 10);
+ if (year <= 49) {
+ return 2000 + year;
+ } else if (year <= 999) {
+ return 1900 + year;
+ }
+ return year;
+ }
+
+ function preprocessRFC2822(s) {
+ // Remove comments and folding whitespace and replace multiple-spaces with a single space
+ return s
+ .replace(/\([^()]*\)|[\n\t]/g, ' ')
+ .replace(/(\s\s+)/g, ' ')
+ .replace(/^\s\s*/, '')
+ .replace(/\s\s*$/, '');
+ }
+
+ function checkWeekday(weekdayStr, parsedInput, config) {
+ if (weekdayStr) {
+ // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
+ var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
+ weekdayActual = new Date(
+ parsedInput[0],
+ parsedInput[1],
+ parsedInput[2]
+ ).getDay();
+ if (weekdayProvided !== weekdayActual) {
+ getParsingFlags(config).weekdayMismatch = true;
+ config._isValid = false;
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function calculateOffset(obsOffset, militaryOffset, numOffset) {
+ if (obsOffset) {
+ return obsOffsets[obsOffset];
+ } else if (militaryOffset) {
+ // the only allowed military tz is Z
+ return 0;
+ } else {
+ var hm = parseInt(numOffset, 10),
+ m = hm % 100,
+ h = (hm - m) / 100;
+ return h * 60 + m;
+ }
+ }
+
+ // date and time from ref 2822 format
+ function configFromRFC2822(config) {
+ var match = rfc2822.exec(preprocessRFC2822(config._i)),
+ parsedArray;
+ if (match) {
+ parsedArray = extractFromRFC2822Strings(
+ match[4],
+ match[3],
+ match[2],
+ match[5],
+ match[6],
+ match[7]
+ );
+ if (!checkWeekday(match[1], parsedArray, config)) {
+ return;
+ }
+
+ config._a = parsedArray;
+ config._tzm = calculateOffset(match[8], match[9], match[10]);
+
+ config._d = createUTCDate.apply(null, config._a);
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
+
+ getParsingFlags(config).rfc2822 = true;
+ } else {
+ config._isValid = false;
+ }
+ }
+
+ // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
+ function configFromString(config) {
+ var matched = aspNetJsonRegex.exec(config._i);
+ if (matched !== null) {
+ config._d = new Date(+matched[1]);
+ return;
+ }
+
+ configFromISO(config);
+ if (config._isValid === false) {
+ delete config._isValid;
+ } else {
+ return;
+ }
+
+ configFromRFC2822(config);
+ if (config._isValid === false) {
+ delete config._isValid;
+ } else {
+ return;
+ }
+
+ if (config._strict) {
+ config._isValid = false;
+ } else {
+ // Final attempt, use Input Fallback
+ hooks.createFromInputFallback(config);
+ }
+ }
+
+ hooks.createFromInputFallback = deprecate(
+ 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
+ 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
+ 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
+ function (config) {
+ config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
+ }
+ );
+
+ // Pick the first defined of two or three arguments.
+ function defaults(a, b, c) {
+ if (a != null) {
+ return a;
+ }
+ if (b != null) {
+ return b;
+ }
+ return c;
+ }
+
+ function currentDateArray(config) {
+ // hooks is actually the exported moment object
+ var nowValue = new Date(hooks.now());
+ if (config._useUTC) {
+ return [
+ nowValue.getUTCFullYear(),
+ nowValue.getUTCMonth(),
+ nowValue.getUTCDate(),
+ ];
+ }
+ return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
+ }
+
+ // convert an array to a date.
+ // the array should mirror the parameters below
+ // note: all values past the year are optional and will default to the lowest possible value.
+ // [year, month, day , hour, minute, second, millisecond]
+ function configFromArray(config) {
+ var i,
+ date,
+ input = [],
+ currentDate,
+ expectedWeekday,
+ yearToUse;
+
+ if (config._d) {
+ return;
+ }
+
+ currentDate = currentDateArray(config);
+
+ //compute day of the year from weeks and weekdays
+ if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
+ dayOfYearFromWeekInfo(config);
+ }
+
+ //if the day of the year is set, figure out what it is
+ if (config._dayOfYear != null) {
+ yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
+
+ if (
+ config._dayOfYear > daysInYear(yearToUse) ||
+ config._dayOfYear === 0
+ ) {
+ getParsingFlags(config)._overflowDayOfYear = true;
+ }
+
+ date = createUTCDate(yearToUse, 0, config._dayOfYear);
+ config._a[MONTH] = date.getUTCMonth();
+ config._a[DATE] = date.getUTCDate();
+ }
+
+ // Default to current date.
+ // * if no year, month, day of month are given, default to today
+ // * if day of month is given, default month and year
+ // * if month is given, default only year
+ // * if year is given, don't default anything
+ for (i = 0; i < 3 && config._a[i] == null; ++i) {
+ config._a[i] = input[i] = currentDate[i];
+ }
+
+ // Zero out whatever was not defaulted, including time
+ for (; i < 7; i++) {
+ config._a[i] = input[i] =
+ config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
+ }
+
+ // Check for 24:00:00.000
+ if (
+ config._a[HOUR] === 24 &&
+ config._a[MINUTE] === 0 &&
+ config._a[SECOND] === 0 &&
+ config._a[MILLISECOND] === 0
+ ) {
+ config._nextDay = true;
+ config._a[HOUR] = 0;
+ }
+
+ config._d = (config._useUTC ? createUTCDate : createDate).apply(
+ null,
+ input
+ );
+ expectedWeekday = config._useUTC
+ ? config._d.getUTCDay()
+ : config._d.getDay();
+
+ // Apply timezone offset from input. The actual utcOffset can be changed
+ // with parseZone.
+ if (config._tzm != null) {
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
+ }
+
+ if (config._nextDay) {
+ config._a[HOUR] = 24;
+ }
+
+ // check for mismatching day of week
+ if (
+ config._w &&
+ typeof config._w.d !== 'undefined' &&
+ config._w.d !== expectedWeekday
+ ) {
+ getParsingFlags(config).weekdayMismatch = true;
+ }
+ }
+
+ function dayOfYearFromWeekInfo(config) {
+ var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
+
+ w = config._w;
+ if (w.GG != null || w.W != null || w.E != null) {
+ dow = 1;
+ doy = 4;
+
+ // TODO: We need to take the current isoWeekYear, but that depends on
+ // how we interpret now (local, utc, fixed offset). So create
+ // a now version of current config (take local/utc/offset flags, and
+ // create now).
+ weekYear = defaults(
+ w.GG,
+ config._a[YEAR],
+ weekOfYear(createLocal(), 1, 4).year
+ );
+ week = defaults(w.W, 1);
+ weekday = defaults(w.E, 1);
+ if (weekday < 1 || weekday > 7) {
+ weekdayOverflow = true;
+ }
+ } else {
+ dow = config._locale._week.dow;
+ doy = config._locale._week.doy;
+
+ curWeek = weekOfYear(createLocal(), dow, doy);
+
+ weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
+
+ // Default to current week.
+ week = defaults(w.w, curWeek.week);
+
+ if (w.d != null) {
+ // weekday -- low day numbers are considered next week
+ weekday = w.d;
+ if (weekday < 0 || weekday > 6) {
+ weekdayOverflow = true;
+ }
+ } else if (w.e != null) {
+ // local weekday -- counting starts from beginning of week
+ weekday = w.e + dow;
+ if (w.e < 0 || w.e > 6) {
+ weekdayOverflow = true;
+ }
+ } else {
+ // default to beginning of week
+ weekday = dow;
+ }
+ }
+ if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
+ getParsingFlags(config)._overflowWeeks = true;
+ } else if (weekdayOverflow != null) {
+ getParsingFlags(config)._overflowWeekday = true;
+ } else {
+ temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
+ config._a[YEAR] = temp.year;
+ config._dayOfYear = temp.dayOfYear;
+ }
+ }
+
+ // constant that refers to the ISO standard
+ hooks.ISO_8601 = function () {};
+
+ // constant that refers to the RFC 2822 form
+ hooks.RFC_2822 = function () {};
+
+ // date from string and format string
+ function configFromStringAndFormat(config) {
+ // TODO: Move this to another part of the creation flow to prevent circular deps
+ if (config._f === hooks.ISO_8601) {
+ configFromISO(config);
+ return;
+ }
+ if (config._f === hooks.RFC_2822) {
+ configFromRFC2822(config);
+ return;
+ }
+ config._a = [];
+ getParsingFlags(config).empty = true;
+
+ // This array is used to make a Date, either with `new Date` or `Date.UTC`
+ var string = '' + config._i,
+ i,
+ parsedInput,
+ tokens,
+ token,
+ skipped,
+ stringLength = string.length,
+ totalParsedInputLength = 0,
+ era,
+ tokenLen;
+
+ tokens =
+ expandFormat(config._f, config._locale).match(formattingTokens) || [];
+ tokenLen = tokens.length;
+ for (i = 0; i < tokenLen; i++) {
+ token = tokens[i];
+ parsedInput = (string.match(getParseRegexForToken(token, config)) ||
+ [])[0];
+ if (parsedInput) {
+ skipped = string.substr(0, string.indexOf(parsedInput));
+ if (skipped.length > 0) {
+ getParsingFlags(config).unusedInput.push(skipped);
+ }
+ string = string.slice(
+ string.indexOf(parsedInput) + parsedInput.length
+ );
+ totalParsedInputLength += parsedInput.length;
+ }
+ // don't parse if it's not a known token
+ if (formatTokenFunctions[token]) {
+ if (parsedInput) {
+ getParsingFlags(config).empty = false;
+ } else {
+ getParsingFlags(config).unusedTokens.push(token);
+ }
+ addTimeToArrayFromToken(token, parsedInput, config);
+ } else if (config._strict && !parsedInput) {
+ getParsingFlags(config).unusedTokens.push(token);
+ }
+ }
+
+ // add remaining unparsed input length to the string
+ getParsingFlags(config).charsLeftOver =
+ stringLength - totalParsedInputLength;
+ if (string.length > 0) {
+ getParsingFlags(config).unusedInput.push(string);
+ }
+
+ // clear _12h flag if hour is <= 12
+ if (
+ config._a[HOUR] <= 12 &&
+ getParsingFlags(config).bigHour === true &&
+ config._a[HOUR] > 0
+ ) {
+ getParsingFlags(config).bigHour = undefined;
+ }
+
+ getParsingFlags(config).parsedDateParts = config._a.slice(0);
+ getParsingFlags(config).meridiem = config._meridiem;
+ // handle meridiem
+ config._a[HOUR] = meridiemFixWrap(
+ config._locale,
+ config._a[HOUR],
+ config._meridiem
+ );
+
+ // handle era
+ era = getParsingFlags(config).era;
+ if (era !== null) {
+ config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
+ }
+
+ configFromArray(config);
+ checkOverflow(config);
+ }
+
+ function meridiemFixWrap(locale, hour, meridiem) {
+ var isPm;
+
+ if (meridiem == null) {
+ // nothing to do
+ return hour;
+ }
+ if (locale.meridiemHour != null) {
+ return locale.meridiemHour(hour, meridiem);
+ } else if (locale.isPM != null) {
+ // Fallback
+ isPm = locale.isPM(meridiem);
+ if (isPm && hour < 12) {
+ hour += 12;
+ }
+ if (!isPm && hour === 12) {
+ hour = 0;
+ }
+ return hour;
+ } else {
+ // this is not supposed to happen
+ return hour;
+ }
+ }
+
+ // date from string and array of format strings
+ function configFromStringAndArray(config) {
+ var tempConfig,
+ bestMoment,
+ scoreToBeat,
+ i,
+ currentScore,
+ validFormatFound,
+ bestFormatIsValid = false,
+ configfLen = config._f.length;
+
+ if (configfLen === 0) {
+ getParsingFlags(config).invalidFormat = true;
+ config._d = new Date(NaN);
+ return;
+ }
+
+ for (i = 0; i < configfLen; i++) {
+ currentScore = 0;
+ validFormatFound = false;
+ tempConfig = copyConfig({}, config);
+ if (config._useUTC != null) {
+ tempConfig._useUTC = config._useUTC;
+ }
+ tempConfig._f = config._f[i];
+ configFromStringAndFormat(tempConfig);
+
+ if (isValid(tempConfig)) {
+ validFormatFound = true;
+ }
+
+ // if there is any input that was not parsed add a penalty for that format
+ currentScore += getParsingFlags(tempConfig).charsLeftOver;
+
+ //or tokens
+ currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
+
+ getParsingFlags(tempConfig).score = currentScore;
+
+ if (!bestFormatIsValid) {
+ if (
+ scoreToBeat == null ||
+ currentScore < scoreToBeat ||
+ validFormatFound
+ ) {
+ scoreToBeat = currentScore;
+ bestMoment = tempConfig;
+ if (validFormatFound) {
+ bestFormatIsValid = true;
+ }
+ }
+ } else {
+ if (currentScore < scoreToBeat) {
+ scoreToBeat = currentScore;
+ bestMoment = tempConfig;
+ }
+ }
+ }
+
+ extend(config, bestMoment || tempConfig);
+ }
+
+ function configFromObject(config) {
+ if (config._d) {
+ return;
+ }
+
+ var i = normalizeObjectUnits(config._i),
+ dayOrDate = i.day === undefined ? i.date : i.day;
+ config._a = map(
+ [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
+ function (obj) {
+ return obj && parseInt(obj, 10);
+ }
+ );
+
+ configFromArray(config);
+ }
+
+ function createFromConfig(config) {
+ var res = new Moment(checkOverflow(prepareConfig(config)));
+ if (res._nextDay) {
+ // Adding is smart enough around DST
+ res.add(1, 'd');
+ res._nextDay = undefined;
+ }
+
+ return res;
+ }
+
+ function prepareConfig(config) {
+ var input = config._i,
+ format = config._f;
+
+ config._locale = config._locale || getLocale(config._l);
+
+ if (input === null || (format === undefined && input === '')) {
+ return createInvalid({ nullInput: true });
+ }
+
+ if (typeof input === 'string') {
+ config._i = input = config._locale.preparse(input);
+ }
+
+ if (isMoment(input)) {
+ return new Moment(checkOverflow(input));
+ } else if (isDate(input)) {
+ config._d = input;
+ } else if (isArray(format)) {
+ configFromStringAndArray(config);
+ } else if (format) {
+ configFromStringAndFormat(config);
+ } else {
+ configFromInput(config);
+ }
+
+ if (!isValid(config)) {
+ config._d = null;
+ }
+
+ return config;
+ }
+
+ function configFromInput(config) {
+ var input = config._i;
+ if (isUndefined(input)) {
+ config._d = new Date(hooks.now());
+ } else if (isDate(input)) {
+ config._d = new Date(input.valueOf());
+ } else if (typeof input === 'string') {
+ configFromString(config);
+ } else if (isArray(input)) {
+ config._a = map(input.slice(0), function (obj) {
+ return parseInt(obj, 10);
+ });
+ configFromArray(config);
+ } else if (isObject(input)) {
+ configFromObject(config);
+ } else if (isNumber(input)) {
+ // from milliseconds
+ config._d = new Date(input);
+ } else {
+ hooks.createFromInputFallback(config);
+ }
+ }
+
+ function createLocalOrUTC(input, format, locale, strict, isUTC) {
+ var c = {};
+
+ if (format === true || format === false) {
+ strict = format;
+ format = undefined;
+ }
+
+ if (locale === true || locale === false) {
+ strict = locale;
+ locale = undefined;
+ }
+
+ if (
+ (isObject(input) && isObjectEmpty(input)) ||
+ (isArray(input) && input.length === 0)
+ ) {
+ input = undefined;
+ }
+ // object construction must be done this way.
+ // https://github.com/moment/moment/issues/1423
+ c._isAMomentObject = true;
+ c._useUTC = c._isUTC = isUTC;
+ c._l = locale;
+ c._i = input;
+ c._f = format;
+ c._strict = strict;
+
+ return createFromConfig(c);
+ }
+
+ function createLocal(input, format, locale, strict) {
+ return createLocalOrUTC(input, format, locale, strict, false);
+ }
+
+ var prototypeMin = deprecate(
+ 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
+ function () {
+ var other = createLocal.apply(null, arguments);
+ if (this.isValid() && other.isValid()) {
+ return other < this ? this : other;
+ } else {
+ return createInvalid();
+ }
+ }
+ ),
+ prototypeMax = deprecate(
+ 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
+ function () {
+ var other = createLocal.apply(null, arguments);
+ if (this.isValid() && other.isValid()) {
+ return other > this ? this : other;
+ } else {
+ return createInvalid();
+ }
+ }
+ );
+
+ // Pick a moment m from moments so that m[fn](other) is true for all
+ // other. This relies on the function fn to be transitive.
+ //
+ // moments should either be an array of moment objects or an array, whose
+ // first element is an array of moment objects.
+ function pickBy(fn, moments) {
+ var res, i;
+ if (moments.length === 1 && isArray(moments[0])) {
+ moments = moments[0];
+ }
+ if (!moments.length) {
+ return createLocal();
+ }
+ res = moments[0];
+ for (i = 1; i < moments.length; ++i) {
+ if (!moments[i].isValid() || moments[i][fn](res)) {
+ res = moments[i];
+ }
+ }
+ return res;
+ }
+
+ // TODO: Use [].sort instead?
+ function min() {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isBefore', args);
+ }
+
+ function max() {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isAfter', args);
+ }
+
+ var now = function () {
+ return Date.now ? Date.now() : +new Date();
+ };
+
+ var ordering = [
+ 'year',
+ 'quarter',
+ 'month',
+ 'week',
+ 'day',
+ 'hour',
+ 'minute',
+ 'second',
+ 'millisecond',
+ ];
+
+ function isDurationValid(m) {
+ var key,
+ unitHasDecimal = false,
+ i,
+ orderLen = ordering.length;
+ for (key in m) {
+ if (
+ hasOwnProp(m, key) &&
+ !(
+ indexOf.call(ordering, key) !== -1 &&
+ (m[key] == null || !isNaN(m[key]))
+ )
+ ) {
+ return false;
+ }
+ }
+
+ for (i = 0; i < orderLen; ++i) {
+ if (m[ordering[i]]) {
+ if (unitHasDecimal) {
+ return false; // only allow non-integers for smallest unit
+ }
+ if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
+ unitHasDecimal = true;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ function isValid$1() {
+ return this._isValid;
+ }
+
+ function createInvalid$1() {
+ return createDuration(NaN);
+ }
+
+ function Duration(duration) {
+ var normalizedInput = normalizeObjectUnits(duration),
+ years = normalizedInput.year || 0,
+ quarters = normalizedInput.quarter || 0,
+ months = normalizedInput.month || 0,
+ weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
+ days = normalizedInput.day || 0,
+ hours = normalizedInput.hour || 0,
+ minutes = normalizedInput.minute || 0,
+ seconds = normalizedInput.second || 0,
+ milliseconds = normalizedInput.millisecond || 0;
+
+ this._isValid = isDurationValid(normalizedInput);
+
+ // representation for dateAddRemove
+ this._milliseconds =
+ +milliseconds +
+ seconds * 1e3 + // 1000
+ minutes * 6e4 + // 1000 * 60
+ hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
+ // Because of dateAddRemove treats 24 hours as different from a
+ // day when working around DST, we need to store them separately
+ this._days = +days + weeks * 7;
+ // It is impossible to translate months into days without knowing
+ // which months you are are talking about, so we have to store
+ // it separately.
+ this._months = +months + quarters * 3 + years * 12;
+
+ this._data = {};
+
+ this._locale = getLocale();
+
+ this._bubble();
+ }
+
+ function isDuration(obj) {
+ return obj instanceof Duration;
+ }
+
+ function absRound(number) {
+ if (number < 0) {
+ return Math.round(-1 * number) * -1;
+ } else {
+ return Math.round(number);
+ }
+ }
+
+ // compare two arrays, return the number of differences
+ function compareArrays(array1, array2, dontConvert) {
+ var len = Math.min(array1.length, array2.length),
+ lengthDiff = Math.abs(array1.length - array2.length),
+ diffs = 0,
+ i;
+ for (i = 0; i < len; i++) {
+ if (
+ (dontConvert && array1[i] !== array2[i]) ||
+ (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
+ ) {
+ diffs++;
+ }
+ }
+ return diffs + lengthDiff;
+ }
+
+ // FORMATTING
+
+ function offset(token, separator) {
+ addFormatToken(token, 0, 0, function () {
+ var offset = this.utcOffset(),
+ sign = '+';
+ if (offset < 0) {
+ offset = -offset;
+ sign = '-';
+ }
+ return (
+ sign +
+ zeroFill(~~(offset / 60), 2) +
+ separator +
+ zeroFill(~~offset % 60, 2)
+ );
+ });
+ }
+
+ offset('Z', ':');
+ offset('ZZ', '');
+
+ // PARSING
+
+ addRegexToken('Z', matchShortOffset);
+ addRegexToken('ZZ', matchShortOffset);
+ addParseToken(['Z', 'ZZ'], function (input, array, config) {
+ config._useUTC = true;
+ config._tzm = offsetFromString(matchShortOffset, input);
+ });
+
+ // HELPERS
+
+ // timezone chunker
+ // '+10:00' > ['10', '00']
+ // '-1530' > ['-15', '30']
+ var chunkOffset = /([\+\-]|\d\d)/gi;
+
+ function offsetFromString(matcher, string) {
+ var matches = (string || '').match(matcher),
+ chunk,
+ parts,
+ minutes;
+
+ if (matches === null) {
+ return null;
+ }
+
+ chunk = matches[matches.length - 1] || [];
+ parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
+ minutes = +(parts[1] * 60) + toInt(parts[2]);
+
+ return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
+ }
+
+ // Return a moment from input, that is local/utc/zone equivalent to model.
+ function cloneWithOffset(input, model) {
+ var res, diff;
+ if (model._isUTC) {
+ res = model.clone();
+ diff =
+ (isMoment(input) || isDate(input)
+ ? input.valueOf()
+ : createLocal(input).valueOf()) - res.valueOf();
+ // Use low-level api, because this fn is low-level api.
+ res._d.setTime(res._d.valueOf() + diff);
+ hooks.updateOffset(res, false);
+ return res;
+ } else {
+ return createLocal(input).local();
+ }
+ }
+
+ function getDateOffset(m) {
+ // On Firefox.24 Date#getTimezoneOffset returns a floating point.
+ // https://github.com/moment/moment/pull/1871
+ return -Math.round(m._d.getTimezoneOffset());
+ }
+
+ // HOOKS
+
+ // This function will be called whenever a moment is mutated.
+ // It is intended to keep the offset in sync with the timezone.
+ hooks.updateOffset = function () {};
+
+ // MOMENTS
+
+ // keepLocalTime = true means only change the timezone, without
+ // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
+ // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
+ // +0200, so we adjust the time as needed, to be valid.
+ //
+ // Keeping the time actually adds/subtracts (one hour)
+ // from the actual represented time. That is why we call updateOffset
+ // a second time. In case it wants us to change the offset again
+ // _changeInProgress == true case, then we have to adjust, because
+ // there is no such time in the given timezone.
+ function getSetOffset(input, keepLocalTime, keepMinutes) {
+ var offset = this._offset || 0,
+ localAdjust;
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ if (input != null) {
+ if (typeof input === 'string') {
+ input = offsetFromString(matchShortOffset, input);
+ if (input === null) {
+ return this;
+ }
+ } else if (Math.abs(input) < 16 && !keepMinutes) {
+ input = input * 60;
+ }
+ if (!this._isUTC && keepLocalTime) {
+ localAdjust = getDateOffset(this);
+ }
+ this._offset = input;
+ this._isUTC = true;
+ if (localAdjust != null) {
+ this.add(localAdjust, 'm');
+ }
+ if (offset !== input) {
+ if (!keepLocalTime || this._changeInProgress) {
+ addSubtract(
+ this,
+ createDuration(input - offset, 'm'),
+ 1,
+ false
+ );
+ } else if (!this._changeInProgress) {
+ this._changeInProgress = true;
+ hooks.updateOffset(this, true);
+ this._changeInProgress = null;
+ }
+ }
+ return this;
+ } else {
+ return this._isUTC ? offset : getDateOffset(this);
+ }
+ }
+
+ function getSetZone(input, keepLocalTime) {
+ if (input != null) {
+ if (typeof input !== 'string') {
+ input = -input;
+ }
+
+ this.utcOffset(input, keepLocalTime);
+
+ return this;
+ } else {
+ return -this.utcOffset();
+ }
+ }
+
+ function setOffsetToUTC(keepLocalTime) {
+ return this.utcOffset(0, keepLocalTime);
+ }
+
+ function setOffsetToLocal(keepLocalTime) {
+ if (this._isUTC) {
+ this.utcOffset(0, keepLocalTime);
+ this._isUTC = false;
+
+ if (keepLocalTime) {
+ this.subtract(getDateOffset(this), 'm');
+ }
+ }
+ return this;
+ }
+
+ function setOffsetToParsedOffset() {
+ if (this._tzm != null) {
+ this.utcOffset(this._tzm, false, true);
+ } else if (typeof this._i === 'string') {
+ var tZone = offsetFromString(matchOffset, this._i);
+ if (tZone != null) {
+ this.utcOffset(tZone);
+ } else {
+ this.utcOffset(0, true);
+ }
+ }
+ return this;
+ }
+
+ function hasAlignedHourOffset(input) {
+ if (!this.isValid()) {
+ return false;
+ }
+ input = input ? createLocal(input).utcOffset() : 0;
+
+ return (this.utcOffset() - input) % 60 === 0;
+ }
+
+ function isDaylightSavingTime() {
+ return (
+ this.utcOffset() > this.clone().month(0).utcOffset() ||
+ this.utcOffset() > this.clone().month(5).utcOffset()
+ );
+ }
+
+ function isDaylightSavingTimeShifted() {
+ if (!isUndefined(this._isDSTShifted)) {
+ return this._isDSTShifted;
+ }
+
+ var c = {},
+ other;
+
+ copyConfig(c, this);
+ c = prepareConfig(c);
+
+ if (c._a) {
+ other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
+ this._isDSTShifted =
+ this.isValid() && compareArrays(c._a, other.toArray()) > 0;
+ } else {
+ this._isDSTShifted = false;
+ }
+
+ return this._isDSTShifted;
+ }
+
+ function isLocal() {
+ return this.isValid() ? !this._isUTC : false;
+ }
+
+ function isUtcOffset() {
+ return this.isValid() ? this._isUTC : false;
+ }
+
+ function isUtc() {
+ return this.isValid() ? this._isUTC && this._offset === 0 : false;
+ }
+
+ // ASP.NET json date format regex
+ var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
+ // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
+ // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
+ // and further modified to allow for strings containing both week and day
+ isoRegex =
+ /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
+
+ function createDuration(input, key) {
+ var duration = input,
+ // matching against regexp is expensive, do it on demand
+ match = null,
+ sign,
+ ret,
+ diffRes;
+
+ if (isDuration(input)) {
+ duration = {
+ ms: input._milliseconds,
+ d: input._days,
+ M: input._months,
+ };
+ } else if (isNumber(input) || !isNaN(+input)) {
+ duration = {};
+ if (key) {
+ duration[key] = +input;
+ } else {
+ duration.milliseconds = +input;
+ }
+ } else if ((match = aspNetRegex.exec(input))) {
+ sign = match[1] === '-' ? -1 : 1;
+ duration = {
+ y: 0,
+ d: toInt(match[DATE]) * sign,
+ h: toInt(match[HOUR]) * sign,
+ m: toInt(match[MINUTE]) * sign,
+ s: toInt(match[SECOND]) * sign,
+ ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
+ };
+ } else if ((match = isoRegex.exec(input))) {
+ sign = match[1] === '-' ? -1 : 1;
+ duration = {
+ y: parseIso(match[2], sign),
+ M: parseIso(match[3], sign),
+ w: parseIso(match[4], sign),
+ d: parseIso(match[5], sign),
+ h: parseIso(match[6], sign),
+ m: parseIso(match[7], sign),
+ s: parseIso(match[8], sign),
+ };
+ } else if (duration == null) {
+ // checks for null or undefined
+ duration = {};
+ } else if (
+ typeof duration === 'object' &&
+ ('from' in duration || 'to' in duration)
+ ) {
+ diffRes = momentsDifference(
+ createLocal(duration.from),
+ createLocal(duration.to)
+ );
+
+ duration = {};
+ duration.ms = diffRes.milliseconds;
+ duration.M = diffRes.months;
+ }
+
+ ret = new Duration(duration);
+
+ if (isDuration(input) && hasOwnProp(input, '_locale')) {
+ ret._locale = input._locale;
+ }
+
+ if (isDuration(input) && hasOwnProp(input, '_isValid')) {
+ ret._isValid = input._isValid;
+ }
+
+ return ret;
+ }
+
+ createDuration.fn = Duration.prototype;
+ createDuration.invalid = createInvalid$1;
+
+ function parseIso(inp, sign) {
+ // We'd normally use ~~inp for this, but unfortunately it also
+ // converts floats to ints.
+ // inp may be undefined, so careful calling replace on it.
+ var res = inp && parseFloat(inp.replace(',', '.'));
+ // apply sign while we're at it
+ return (isNaN(res) ? 0 : res) * sign;
+ }
+
+ function positiveMomentsDifference(base, other) {
+ var res = {};
+
+ res.months =
+ other.month() - base.month() + (other.year() - base.year()) * 12;
+ if (base.clone().add(res.months, 'M').isAfter(other)) {
+ --res.months;
+ }
+
+ res.milliseconds = +other - +base.clone().add(res.months, 'M');
+
+ return res;
+ }
+
+ function momentsDifference(base, other) {
+ var res;
+ if (!(base.isValid() && other.isValid())) {
+ return { milliseconds: 0, months: 0 };
+ }
+
+ other = cloneWithOffset(other, base);
+ if (base.isBefore(other)) {
+ res = positiveMomentsDifference(base, other);
+ } else {
+ res = positiveMomentsDifference(other, base);
+ res.milliseconds = -res.milliseconds;
+ res.months = -res.months;
+ }
+
+ return res;
+ }
+
+ // TODO: remove 'name' arg after deprecation is removed
+ function createAdder(direction, name) {
+ return function (val, period) {
+ var dur, tmp;
+ //invert the arguments, but complain about it
+ if (period !== null && !isNaN(+period)) {
+ deprecateSimple(
+ name,
+ 'moment().' +
+ name +
+ '(period, number) is deprecated. Please use moment().' +
+ name +
+ '(number, period). ' +
+ 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
+ );
+ tmp = val;
+ val = period;
+ period = tmp;
+ }
+
+ dur = createDuration(val, period);
+ addSubtract(this, dur, direction);
+ return this;
+ };
+ }
+
+ function addSubtract(mom, duration, isAdding, updateOffset) {
+ var milliseconds = duration._milliseconds,
+ days = absRound(duration._days),
+ months = absRound(duration._months);
+
+ if (!mom.isValid()) {
+ // No op
+ return;
+ }
+
+ updateOffset = updateOffset == null ? true : updateOffset;
+
+ if (months) {
+ setMonth(mom, get(mom, 'Month') + months * isAdding);
+ }
+ if (days) {
+ set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
+ }
+ if (milliseconds) {
+ mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
+ }
+ if (updateOffset) {
+ hooks.updateOffset(mom, days || months);
+ }
+ }
+
+ var add = createAdder(1, 'add'),
+ subtract = createAdder(-1, 'subtract');
+
+ function isString(input) {
+ return typeof input === 'string' || input instanceof String;
+ }
+
+ // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
+ function isMomentInput(input) {
+ return (
+ isMoment(input) ||
+ isDate(input) ||
+ isString(input) ||
+ isNumber(input) ||
+ isNumberOrStringArray(input) ||
+ isMomentInputObject(input) ||
+ input === null ||
+ input === undefined
+ );
+ }
+
+ function isMomentInputObject(input) {
+ var objectTest = isObject(input) && !isObjectEmpty(input),
+ propertyTest = false,
+ properties = [
+ 'years',
+ 'year',
+ 'y',
+ 'months',
+ 'month',
+ 'M',
+ 'days',
+ 'day',
+ 'd',
+ 'dates',
+ 'date',
+ 'D',
+ 'hours',
+ 'hour',
+ 'h',
+ 'minutes',
+ 'minute',
+ 'm',
+ 'seconds',
+ 'second',
+ 's',
+ 'milliseconds',
+ 'millisecond',
+ 'ms',
+ ],
+ i,
+ property,
+ propertyLen = properties.length;
+
+ for (i = 0; i < propertyLen; i += 1) {
+ property = properties[i];
+ propertyTest = propertyTest || hasOwnProp(input, property);
+ }
+
+ return objectTest && propertyTest;
+ }
+
+ function isNumberOrStringArray(input) {
+ var arrayTest = isArray(input),
+ dataTypeTest = false;
+ if (arrayTest) {
+ dataTypeTest =
+ input.filter(function (item) {
+ return !isNumber(item) && isString(input);
+ }).length === 0;
+ }
+ return arrayTest && dataTypeTest;
+ }
+
+ function isCalendarSpec(input) {
+ var objectTest = isObject(input) && !isObjectEmpty(input),
+ propertyTest = false,
+ properties = [
+ 'sameDay',
+ 'nextDay',
+ 'lastDay',
+ 'nextWeek',
+ 'lastWeek',
+ 'sameElse',
+ ],
+ i,
+ property;
+
+ for (i = 0; i < properties.length; i += 1) {
+ property = properties[i];
+ propertyTest = propertyTest || hasOwnProp(input, property);
+ }
+
+ return objectTest && propertyTest;
+ }
+
+ function getCalendarFormat(myMoment, now) {
+ var diff = myMoment.diff(now, 'days', true);
+ return diff < -6
+ ? 'sameElse'
+ : diff < -1
+ ? 'lastWeek'
+ : diff < 0
+ ? 'lastDay'
+ : diff < 1
+ ? 'sameDay'
+ : diff < 2
+ ? 'nextDay'
+ : diff < 7
+ ? 'nextWeek'
+ : 'sameElse';
+ }
+
+ function calendar$1(time, formats) {
+ // Support for single parameter, formats only overload to the calendar function
+ if (arguments.length === 1) {
+ if (!arguments[0]) {
+ time = undefined;
+ formats = undefined;
+ } else if (isMomentInput(arguments[0])) {
+ time = arguments[0];
+ formats = undefined;
+ } else if (isCalendarSpec(arguments[0])) {
+ formats = arguments[0];
+ time = undefined;
+ }
+ }
+ // We want to compare the start of today, vs this.
+ // Getting start-of-today depends on whether we're local/utc/offset or not.
+ var now = time || createLocal(),
+ sod = cloneWithOffset(now, this).startOf('day'),
+ format = hooks.calendarFormat(this, sod) || 'sameElse',
+ output =
+ formats &&
+ (isFunction(formats[format])
+ ? formats[format].call(this, now)
+ : formats[format]);
+
+ return this.format(
+ output || this.localeData().calendar(format, this, createLocal(now))
+ );
+ }
+
+ function clone() {
+ return new Moment(this);
+ }
+
+ function isAfter(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input);
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() > localInput.valueOf();
+ } else {
+ return localInput.valueOf() < this.clone().startOf(units).valueOf();
+ }
+ }
+
+ function isBefore(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input);
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() < localInput.valueOf();
+ } else {
+ return this.clone().endOf(units).valueOf() < localInput.valueOf();
+ }
+ }
+
+ function isBetween(from, to, units, inclusivity) {
+ var localFrom = isMoment(from) ? from : createLocal(from),
+ localTo = isMoment(to) ? to : createLocal(to);
+ if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
+ return false;
+ }
+ inclusivity = inclusivity || '()';
+ return (
+ (inclusivity[0] === '('
+ ? this.isAfter(localFrom, units)
+ : !this.isBefore(localFrom, units)) &&
+ (inclusivity[1] === ')'
+ ? this.isBefore(localTo, units)
+ : !this.isAfter(localTo, units))
+ );
+ }
+
+ function isSame(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input),
+ inputMs;
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() === localInput.valueOf();
+ } else {
+ inputMs = localInput.valueOf();
+ return (
+ this.clone().startOf(units).valueOf() <= inputMs &&
+ inputMs <= this.clone().endOf(units).valueOf()
+ );
+ }
+ }
+
+ function isSameOrAfter(input, units) {
+ return this.isSame(input, units) || this.isAfter(input, units);
+ }
+
+ function isSameOrBefore(input, units) {
+ return this.isSame(input, units) || this.isBefore(input, units);
+ }
+
+ function diff(input, units, asFloat) {
+ var that, zoneDelta, output;
+
+ if (!this.isValid()) {
+ return NaN;
+ }
+
+ that = cloneWithOffset(input, this);
+
+ if (!that.isValid()) {
+ return NaN;
+ }
+
+ zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
+
+ units = normalizeUnits(units);
+
+ switch (units) {
+ case 'year':
+ output = monthDiff(this, that) / 12;
+ break;
+ case 'month':
+ output = monthDiff(this, that);
+ break;
+ case 'quarter':
+ output = monthDiff(this, that) / 3;
+ break;
+ case 'second':
+ output = (this - that) / 1e3;
+ break; // 1000
+ case 'minute':
+ output = (this - that) / 6e4;
+ break; // 1000 * 60
+ case 'hour':
+ output = (this - that) / 36e5;
+ break; // 1000 * 60 * 60
+ case 'day':
+ output = (this - that - zoneDelta) / 864e5;
+ break; // 1000 * 60 * 60 * 24, negate dst
+ case 'week':
+ output = (this - that - zoneDelta) / 6048e5;
+ break; // 1000 * 60 * 60 * 24 * 7, negate dst
+ default:
+ output = this - that;
+ }
+
+ return asFloat ? output : absFloor(output);
+ }
+
+ function monthDiff(a, b) {
+ if (a.date() < b.date()) {
+ // end-of-month calculations work correct when the start month has more
+ // days than the end month.
+ return -monthDiff(b, a);
+ }
+ // difference in months
+ var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
+ // b is in (anchor - 1 month, anchor + 1 month)
+ anchor = a.clone().add(wholeMonthDiff, 'months'),
+ anchor2,
+ adjust;
+
+ if (b - anchor < 0) {
+ anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
+ // linear across the month
+ adjust = (b - anchor) / (anchor - anchor2);
+ } else {
+ anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
+ // linear across the month
+ adjust = (b - anchor) / (anchor2 - anchor);
+ }
+
+ //check for negative zero, return zero if negative zero
+ return -(wholeMonthDiff + adjust) || 0;
+ }
+
+ hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
+ hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
+
+ function toString() {
+ return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
+ }
+
+ function toISOString(keepOffset) {
+ if (!this.isValid()) {
+ return null;
+ }
+ var utc = keepOffset !== true,
+ m = utc ? this.clone().utc() : this;
+ if (m.year() < 0 || m.year() > 9999) {
+ return formatMoment(
+ m,
+ utc
+ ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
+ : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
+ );
+ }
+ if (isFunction(Date.prototype.toISOString)) {
+ // native implementation is ~50x faster, use it when we can
+ if (utc) {
+ return this.toDate().toISOString();
+ } else {
+ return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
+ .toISOString()
+ .replace('Z', formatMoment(m, 'Z'));
+ }
+ }
+ return formatMoment(
+ m,
+ utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
+ );
+ }
+
+ /**
+ * Return a human readable representation of a moment that can
+ * also be evaluated to get a new moment which is the same
+ *
+ * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
+ */
+ function inspect() {
+ if (!this.isValid()) {
+ return 'moment.invalid(/* ' + this._i + ' */)';
+ }
+ var func = 'moment',
+ zone = '',
+ prefix,
+ year,
+ datetime,
+ suffix;
+ if (!this.isLocal()) {
+ func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
+ zone = 'Z';
+ }
+ prefix = '[' + func + '("]';
+ year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
+ datetime = '-MM-DD[T]HH:mm:ss.SSS';
+ suffix = zone + '[")]';
+
+ return this.format(prefix + year + datetime + suffix);
+ }
+
+ function format(inputString) {
+ if (!inputString) {
+ inputString = this.isUtc()
+ ? hooks.defaultFormatUtc
+ : hooks.defaultFormat;
+ }
+ var output = formatMoment(this, inputString);
+ return this.localeData().postformat(output);
+ }
+
+ function from(time, withoutSuffix) {
+ if (
+ this.isValid() &&
+ ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
+ ) {
+ return createDuration({ to: this, from: time })
+ .locale(this.locale())
+ .humanize(!withoutSuffix);
+ } else {
+ return this.localeData().invalidDate();
+ }
+ }
+
+ function fromNow(withoutSuffix) {
+ return this.from(createLocal(), withoutSuffix);
+ }
+
+ function to(time, withoutSuffix) {
+ if (
+ this.isValid() &&
+ ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
+ ) {
+ return createDuration({ from: this, to: time })
+ .locale(this.locale())
+ .humanize(!withoutSuffix);
+ } else {
+ return this.localeData().invalidDate();
+ }
+ }
+
+ function toNow(withoutSuffix) {
+ return this.to(createLocal(), withoutSuffix);
+ }
+
+ // If passed a locale key, it will set the locale for this
+ // instance. Otherwise, it will return the locale configuration
+ // variables for this instance.
+ function locale(key) {
+ var newLocaleData;
+
+ if (key === undefined) {
+ return this._locale._abbr;
+ } else {
+ newLocaleData = getLocale(key);
+ if (newLocaleData != null) {
+ this._locale = newLocaleData;
+ }
+ return this;
+ }
+ }
+
+ var lang = deprecate(
+ 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
+ function (key) {
+ if (key === undefined) {
+ return this.localeData();
+ } else {
+ return this.locale(key);
+ }
+ }
+ );
+
+ function localeData() {
+ return this._locale;
+ }
+
+ var MS_PER_SECOND = 1000,
+ MS_PER_MINUTE = 60 * MS_PER_SECOND,
+ MS_PER_HOUR = 60 * MS_PER_MINUTE,
+ MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
+
+ // actual modulo - handles negative numbers (for dates before 1970):
+ function mod$1(dividend, divisor) {
+ return ((dividend % divisor) + divisor) % divisor;
+ }
+
+ function localStartOfDate(y, m, d) {
+ // the date constructor remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ return new Date(y + 400, m, d) - MS_PER_400_YEARS;
+ } else {
+ return new Date(y, m, d).valueOf();
+ }
+ }
+
+ function utcStartOfDate(y, m, d) {
+ // Date.UTC remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
+ } else {
+ return Date.UTC(y, m, d);
+ }
+ }
+
+ function startOf(units) {
+ var time, startOfDate;
+ units = normalizeUnits(units);
+ if (units === undefined || units === 'millisecond' || !this.isValid()) {
+ return this;
+ }
+
+ startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
+
+ switch (units) {
+ case 'year':
+ time = startOfDate(this.year(), 0, 1);
+ break;
+ case 'quarter':
+ time = startOfDate(
+ this.year(),
+ this.month() - (this.month() % 3),
+ 1
+ );
+ break;
+ case 'month':
+ time = startOfDate(this.year(), this.month(), 1);
+ break;
+ case 'week':
+ time = startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - this.weekday()
+ );
+ break;
+ case 'isoWeek':
+ time = startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - (this.isoWeekday() - 1)
+ );
+ break;
+ case 'day':
+ case 'date':
+ time = startOfDate(this.year(), this.month(), this.date());
+ break;
+ case 'hour':
+ time = this._d.valueOf();
+ time -= mod$1(
+ time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
+ MS_PER_HOUR
+ );
+ break;
+ case 'minute':
+ time = this._d.valueOf();
+ time -= mod$1(time, MS_PER_MINUTE);
+ break;
+ case 'second':
+ time = this._d.valueOf();
+ time -= mod$1(time, MS_PER_SECOND);
+ break;
+ }
+
+ this._d.setTime(time);
+ hooks.updateOffset(this, true);
+ return this;
+ }
+
+ function endOf(units) {
+ var time, startOfDate;
+ units = normalizeUnits(units);
+ if (units === undefined || units === 'millisecond' || !this.isValid()) {
+ return this;
+ }
+
+ startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
+
+ switch (units) {
+ case 'year':
+ time = startOfDate(this.year() + 1, 0, 1) - 1;
+ break;
+ case 'quarter':
+ time =
+ startOfDate(
+ this.year(),
+ this.month() - (this.month() % 3) + 3,
+ 1
+ ) - 1;
+ break;
+ case 'month':
+ time = startOfDate(this.year(), this.month() + 1, 1) - 1;
+ break;
+ case 'week':
+ time =
+ startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - this.weekday() + 7
+ ) - 1;
+ break;
+ case 'isoWeek':
+ time =
+ startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - (this.isoWeekday() - 1) + 7
+ ) - 1;
+ break;
+ case 'day':
+ case 'date':
+ time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
+ break;
+ case 'hour':
+ time = this._d.valueOf();
+ time +=
+ MS_PER_HOUR -
+ mod$1(
+ time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
+ MS_PER_HOUR
+ ) -
+ 1;
+ break;
+ case 'minute':
+ time = this._d.valueOf();
+ time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
+ break;
+ case 'second':
+ time = this._d.valueOf();
+ time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
+ break;
+ }
+
+ this._d.setTime(time);
+ hooks.updateOffset(this, true);
+ return this;
+ }
+
+ function valueOf() {
+ return this._d.valueOf() - (this._offset || 0) * 60000;
+ }
+
+ function unix() {
+ return Math.floor(this.valueOf() / 1000);
+ }
+
+ function toDate() {
+ return new Date(this.valueOf());
+ }
+
+ function toArray() {
+ var m = this;
+ return [
+ m.year(),
+ m.month(),
+ m.date(),
+ m.hour(),
+ m.minute(),
+ m.second(),
+ m.millisecond(),
+ ];
+ }
+
+ function toObject() {
+ var m = this;
+ return {
+ years: m.year(),
+ months: m.month(),
+ date: m.date(),
+ hours: m.hours(),
+ minutes: m.minutes(),
+ seconds: m.seconds(),
+ milliseconds: m.milliseconds(),
+ };
+ }
+
+ function toJSON() {
+ // new Date(NaN).toJSON() === null
+ return this.isValid() ? this.toISOString() : null;
+ }
+
+ function isValid$2() {
+ return isValid(this);
+ }
+
+ function parsingFlags() {
+ return extend({}, getParsingFlags(this));
+ }
+
+ function invalidAt() {
+ return getParsingFlags(this).overflow;
+ }
+
+ function creationData() {
+ return {
+ input: this._i,
+ format: this._f,
+ locale: this._locale,
+ isUTC: this._isUTC,
+ strict: this._strict,
+ };
+ }
+
+ addFormatToken('N', 0, 0, 'eraAbbr');
+ addFormatToken('NN', 0, 0, 'eraAbbr');
+ addFormatToken('NNN', 0, 0, 'eraAbbr');
+ addFormatToken('NNNN', 0, 0, 'eraName');
+ addFormatToken('NNNNN', 0, 0, 'eraNarrow');
+
+ addFormatToken('y', ['y', 1], 'yo', 'eraYear');
+ addFormatToken('y', ['yy', 2], 0, 'eraYear');
+ addFormatToken('y', ['yyy', 3], 0, 'eraYear');
+ addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
+
+ addRegexToken('N', matchEraAbbr);
+ addRegexToken('NN', matchEraAbbr);
+ addRegexToken('NNN', matchEraAbbr);
+ addRegexToken('NNNN', matchEraName);
+ addRegexToken('NNNNN', matchEraNarrow);
+
+ addParseToken(
+ ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
+ function (input, array, config, token) {
+ var era = config._locale.erasParse(input, token, config._strict);
+ if (era) {
+ getParsingFlags(config).era = era;
+ } else {
+ getParsingFlags(config).invalidEra = input;
+ }
+ }
+ );
+
+ addRegexToken('y', matchUnsigned);
+ addRegexToken('yy', matchUnsigned);
+ addRegexToken('yyy', matchUnsigned);
+ addRegexToken('yyyy', matchUnsigned);
+ addRegexToken('yo', matchEraYearOrdinal);
+
+ addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
+ addParseToken(['yo'], function (input, array, config, token) {
+ var match;
+ if (config._locale._eraYearOrdinalRegex) {
+ match = input.match(config._locale._eraYearOrdinalRegex);
+ }
+
+ if (config._locale.eraYearOrdinalParse) {
+ array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
+ } else {
+ array[YEAR] = parseInt(input, 10);
+ }
+ });
+
+ function localeEras(m, format) {
+ var i,
+ l,
+ date,
+ eras = this._eras || getLocale('en')._eras;
+ for (i = 0, l = eras.length; i < l; ++i) {
+ switch (typeof eras[i].since) {
+ case 'string':
+ // truncate time
+ date = hooks(eras[i].since).startOf('day');
+ eras[i].since = date.valueOf();
+ break;
+ }
+
+ switch (typeof eras[i].until) {
+ case 'undefined':
+ eras[i].until = +Infinity;
+ break;
+ case 'string':
+ // truncate time
+ date = hooks(eras[i].until).startOf('day').valueOf();
+ eras[i].until = date.valueOf();
+ break;
+ }
+ }
+ return eras;
+ }
+
+ function localeErasParse(eraName, format, strict) {
+ var i,
+ l,
+ eras = this.eras(),
+ name,
+ abbr,
+ narrow;
+ eraName = eraName.toUpperCase();
+
+ for (i = 0, l = eras.length; i < l; ++i) {
+ name = eras[i].name.toUpperCase();
+ abbr = eras[i].abbr.toUpperCase();
+ narrow = eras[i].narrow.toUpperCase();
+
+ if (strict) {
+ switch (format) {
+ case 'N':
+ case 'NN':
+ case 'NNN':
+ if (abbr === eraName) {
+ return eras[i];
+ }
+ break;
+
+ case 'NNNN':
+ if (name === eraName) {
+ return eras[i];
+ }
+ break;
+
+ case 'NNNNN':
+ if (narrow === eraName) {
+ return eras[i];
+ }
+ break;
+ }
+ } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
+ return eras[i];
+ }
+ }
+ }
+
+ function localeErasConvertYear(era, year) {
+ var dir = era.since <= era.until ? +1 : -1;
+ if (year === undefined) {
+ return hooks(era.since).year();
+ } else {
+ return hooks(era.since).year() + (year - era.offset) * dir;
+ }
+ }
+
+ function getEraName() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].name;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].name;
+ }
+ }
+
+ return '';
+ }
+
+ function getEraNarrow() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].narrow;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].narrow;
+ }
+ }
+
+ return '';
+ }
+
+ function getEraAbbr() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].abbr;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].abbr;
+ }
+ }
+
+ return '';
+ }
+
+ function getEraYear() {
+ var i,
+ l,
+ dir,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ dir = eras[i].since <= eras[i].until ? +1 : -1;
+
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (
+ (eras[i].since <= val && val <= eras[i].until) ||
+ (eras[i].until <= val && val <= eras[i].since)
+ ) {
+ return (
+ (this.year() - hooks(eras[i].since).year()) * dir +
+ eras[i].offset
+ );
+ }
+ }
+
+ return this.year();
+ }
+
+ function erasNameRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasNameRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasNameRegex : this._erasRegex;
+ }
+
+ function erasAbbrRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasAbbrRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasAbbrRegex : this._erasRegex;
+ }
+
+ function erasNarrowRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasNarrowRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasNarrowRegex : this._erasRegex;
+ }
+
+ function matchEraAbbr(isStrict, locale) {
+ return locale.erasAbbrRegex(isStrict);
+ }
+
+ function matchEraName(isStrict, locale) {
+ return locale.erasNameRegex(isStrict);
+ }
+
+ function matchEraNarrow(isStrict, locale) {
+ return locale.erasNarrowRegex(isStrict);
+ }
+
+ function matchEraYearOrdinal(isStrict, locale) {
+ return locale._eraYearOrdinalRegex || matchUnsigned;
+ }
+
+ function computeErasParse() {
+ var abbrPieces = [],
+ namePieces = [],
+ narrowPieces = [],
+ mixedPieces = [],
+ i,
+ l,
+ eras = this.eras();
+
+ for (i = 0, l = eras.length; i < l; ++i) {
+ namePieces.push(regexEscape(eras[i].name));
+ abbrPieces.push(regexEscape(eras[i].abbr));
+ narrowPieces.push(regexEscape(eras[i].narrow));
+
+ mixedPieces.push(regexEscape(eras[i].name));
+ mixedPieces.push(regexEscape(eras[i].abbr));
+ mixedPieces.push(regexEscape(eras[i].narrow));
+ }
+
+ this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
+ this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
+ this._erasNarrowRegex = new RegExp(
+ '^(' + narrowPieces.join('|') + ')',
+ 'i'
+ );
+ }
+
+ // FORMATTING
+
+ addFormatToken(0, ['gg', 2], 0, function () {
+ return this.weekYear() % 100;
+ });
+
+ addFormatToken(0, ['GG', 2], 0, function () {
+ return this.isoWeekYear() % 100;
+ });
+
+ function addWeekYearFormatToken(token, getter) {
+ addFormatToken(0, [token, token.length], 0, getter);
+ }
+
+ addWeekYearFormatToken('gggg', 'weekYear');
+ addWeekYearFormatToken('ggggg', 'weekYear');
+ addWeekYearFormatToken('GGGG', 'isoWeekYear');
+ addWeekYearFormatToken('GGGGG', 'isoWeekYear');
+
+ // ALIASES
+
+ addUnitAlias('weekYear', 'gg');
+ addUnitAlias('isoWeekYear', 'GG');
+
+ // PRIORITY
+
+ addUnitPriority('weekYear', 1);
+ addUnitPriority('isoWeekYear', 1);
+
+ // PARSING
+
+ addRegexToken('G', matchSigned);
+ addRegexToken('g', matchSigned);
+ addRegexToken('GG', match1to2, match2);
+ addRegexToken('gg', match1to2, match2);
+ addRegexToken('GGGG', match1to4, match4);
+ addRegexToken('gggg', match1to4, match4);
+ addRegexToken('GGGGG', match1to6, match6);
+ addRegexToken('ggggg', match1to6, match6);
+
+ addWeekParseToken(
+ ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
+ function (input, week, config, token) {
+ week[token.substr(0, 2)] = toInt(input);
+ }
+ );
+
+ addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
+ week[token] = hooks.parseTwoDigitYear(input);
+ });
+
+ // MOMENTS
+
+ function getSetWeekYear(input) {
+ return getSetWeekYearHelper.call(
+ this,
+ input,
+ this.week(),
+ this.weekday(),
+ this.localeData()._week.dow,
+ this.localeData()._week.doy
+ );
+ }
+
+ function getSetISOWeekYear(input) {
+ return getSetWeekYearHelper.call(
+ this,
+ input,
+ this.isoWeek(),
+ this.isoWeekday(),
+ 1,
+ 4
+ );
+ }
+
+ function getISOWeeksInYear() {
+ return weeksInYear(this.year(), 1, 4);
+ }
+
+ function getISOWeeksInISOWeekYear() {
+ return weeksInYear(this.isoWeekYear(), 1, 4);
+ }
+
+ function getWeeksInYear() {
+ var weekInfo = this.localeData()._week;
+ return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
+ }
+
+ function getWeeksInWeekYear() {
+ var weekInfo = this.localeData()._week;
+ return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
+ }
+
+ function getSetWeekYearHelper(input, week, weekday, dow, doy) {
+ var weeksTarget;
+ if (input == null) {
+ return weekOfYear(this, dow, doy).year;
+ } else {
+ weeksTarget = weeksInYear(input, dow, doy);
+ if (week > weeksTarget) {
+ week = weeksTarget;
+ }
+ return setWeekAll.call(this, input, week, weekday, dow, doy);
+ }
+ }
+
+ function setWeekAll(weekYear, week, weekday, dow, doy) {
+ var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
+ date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
+
+ this.year(date.getUTCFullYear());
+ this.month(date.getUTCMonth());
+ this.date(date.getUTCDate());
+ return this;
+ }
+
+ // FORMATTING
+
+ addFormatToken('Q', 0, 'Qo', 'quarter');
+
+ // ALIASES
+
+ addUnitAlias('quarter', 'Q');
+
+ // PRIORITY
+
+ addUnitPriority('quarter', 7);
+
+ // PARSING
+
+ addRegexToken('Q', match1);
+ addParseToken('Q', function (input, array) {
+ array[MONTH] = (toInt(input) - 1) * 3;
+ });
+
+ // MOMENTS
+
+ function getSetQuarter(input) {
+ return input == null
+ ? Math.ceil((this.month() + 1) / 3)
+ : this.month((input - 1) * 3 + (this.month() % 3));
+ }
+
+ // FORMATTING
+
+ addFormatToken('D', ['DD', 2], 'Do', 'date');
+
+ // ALIASES
+
+ addUnitAlias('date', 'D');
+
+ // PRIORITY
+ addUnitPriority('date', 9);
+
+ // PARSING
+
+ addRegexToken('D', match1to2);
+ addRegexToken('DD', match1to2, match2);
+ addRegexToken('Do', function (isStrict, locale) {
+ // TODO: Remove "ordinalParse" fallback in next major release.
+ return isStrict
+ ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
+ : locale._dayOfMonthOrdinalParseLenient;
+ });
+
+ addParseToken(['D', 'DD'], DATE);
+ addParseToken('Do', function (input, array) {
+ array[DATE] = toInt(input.match(match1to2)[0]);
+ });
+
+ // MOMENTS
+
+ var getSetDayOfMonth = makeGetSet('Date', true);
+
+ // FORMATTING
+
+ addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
+
+ // ALIASES
+
+ addUnitAlias('dayOfYear', 'DDD');
+
+ // PRIORITY
+ addUnitPriority('dayOfYear', 4);
+
+ // PARSING
+
+ addRegexToken('DDD', match1to3);
+ addRegexToken('DDDD', match3);
+ addParseToken(['DDD', 'DDDD'], function (input, array, config) {
+ config._dayOfYear = toInt(input);
+ });
+
+ // HELPERS
+
+ // MOMENTS
+
+ function getSetDayOfYear(input) {
+ var dayOfYear =
+ Math.round(
+ (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
+ ) + 1;
+ return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
+ }
+
+ // FORMATTING
+
+ addFormatToken('m', ['mm', 2], 0, 'minute');
+
+ // ALIASES
+
+ addUnitAlias('minute', 'm');
+
+ // PRIORITY
+
+ addUnitPriority('minute', 14);
+
+ // PARSING
+
+ addRegexToken('m', match1to2);
+ addRegexToken('mm', match1to2, match2);
+ addParseToken(['m', 'mm'], MINUTE);
+
+ // MOMENTS
+
+ var getSetMinute = makeGetSet('Minutes', false);
+
+ // FORMATTING
+
+ addFormatToken('s', ['ss', 2], 0, 'second');
+
+ // ALIASES
+
+ addUnitAlias('second', 's');
+
+ // PRIORITY
+
+ addUnitPriority('second', 15);
+
+ // PARSING
+
+ addRegexToken('s', match1to2);
+ addRegexToken('ss', match1to2, match2);
+ addParseToken(['s', 'ss'], SECOND);
+
+ // MOMENTS
+
+ var getSetSecond = makeGetSet('Seconds', false);
+
+ // FORMATTING
+
+ addFormatToken('S', 0, 0, function () {
+ return ~~(this.millisecond() / 100);
+ });
+
+ addFormatToken(0, ['SS', 2], 0, function () {
+ return ~~(this.millisecond() / 10);
+ });
+
+ addFormatToken(0, ['SSS', 3], 0, 'millisecond');
+ addFormatToken(0, ['SSSS', 4], 0, function () {
+ return this.millisecond() * 10;
+ });
+ addFormatToken(0, ['SSSSS', 5], 0, function () {
+ return this.millisecond() * 100;
+ });
+ addFormatToken(0, ['SSSSSS', 6], 0, function () {
+ return this.millisecond() * 1000;
+ });
+ addFormatToken(0, ['SSSSSSS', 7], 0, function () {
+ return this.millisecond() * 10000;
+ });
+ addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
+ return this.millisecond() * 100000;
+ });
+ addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
+ return this.millisecond() * 1000000;
+ });
+
+ // ALIASES
+
+ addUnitAlias('millisecond', 'ms');
+
+ // PRIORITY
+
+ addUnitPriority('millisecond', 16);
+
+ // PARSING
+
+ addRegexToken('S', match1to3, match1);
+ addRegexToken('SS', match1to3, match2);
+ addRegexToken('SSS', match1to3, match3);
+
+ var token, getSetMillisecond;
+ for (token = 'SSSS'; token.length <= 9; token += 'S') {
+ addRegexToken(token, matchUnsigned);
+ }
+
+ function parseMs(input, array) {
+ array[MILLISECOND] = toInt(('0.' + input) * 1000);
+ }
+
+ for (token = 'S'; token.length <= 9; token += 'S') {
+ addParseToken(token, parseMs);
+ }
+
+ getSetMillisecond = makeGetSet('Milliseconds', false);
+
+ // FORMATTING
+
+ addFormatToken('z', 0, 0, 'zoneAbbr');
+ addFormatToken('zz', 0, 0, 'zoneName');
+
+ // MOMENTS
+
+ function getZoneAbbr() {
+ return this._isUTC ? 'UTC' : '';
+ }
+
+ function getZoneName() {
+ return this._isUTC ? 'Coordinated Universal Time' : '';
+ }
+
+ var proto = Moment.prototype;
+
+ proto.add = add;
+ proto.calendar = calendar$1;
+ proto.clone = clone;
+ proto.diff = diff;
+ proto.endOf = endOf;
+ proto.format = format;
+ proto.from = from;
+ proto.fromNow = fromNow;
+ proto.to = to;
+ proto.toNow = toNow;
+ proto.get = stringGet;
+ proto.invalidAt = invalidAt;
+ proto.isAfter = isAfter;
+ proto.isBefore = isBefore;
+ proto.isBetween = isBetween;
+ proto.isSame = isSame;
+ proto.isSameOrAfter = isSameOrAfter;
+ proto.isSameOrBefore = isSameOrBefore;
+ proto.isValid = isValid$2;
+ proto.lang = lang;
+ proto.locale = locale;
+ proto.localeData = localeData;
+ proto.max = prototypeMax;
+ proto.min = prototypeMin;
+ proto.parsingFlags = parsingFlags;
+ proto.set = stringSet;
+ proto.startOf = startOf;
+ proto.subtract = subtract;
+ proto.toArray = toArray;
+ proto.toObject = toObject;
+ proto.toDate = toDate;
+ proto.toISOString = toISOString;
+ proto.inspect = inspect;
+ if (typeof Symbol !== 'undefined' && Symbol.for != null) {
+ proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
+ return 'Moment<' + this.format() + '>';
+ };
+ }
+ proto.toJSON = toJSON;
+ proto.toString = toString;
+ proto.unix = unix;
+ proto.valueOf = valueOf;
+ proto.creationData = creationData;
+ proto.eraName = getEraName;
+ proto.eraNarrow = getEraNarrow;
+ proto.eraAbbr = getEraAbbr;
+ proto.eraYear = getEraYear;
+ proto.year = getSetYear;
+ proto.isLeapYear = getIsLeapYear;
+ proto.weekYear = getSetWeekYear;
+ proto.isoWeekYear = getSetISOWeekYear;
+ proto.quarter = proto.quarters = getSetQuarter;
+ proto.month = getSetMonth;
+ proto.daysInMonth = getDaysInMonth;
+ proto.week = proto.weeks = getSetWeek;
+ proto.isoWeek = proto.isoWeeks = getSetISOWeek;
+ proto.weeksInYear = getWeeksInYear;
+ proto.weeksInWeekYear = getWeeksInWeekYear;
+ proto.isoWeeksInYear = getISOWeeksInYear;
+ proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
+ proto.date = getSetDayOfMonth;
+ proto.day = proto.days = getSetDayOfWeek;
+ proto.weekday = getSetLocaleDayOfWeek;
+ proto.isoWeekday = getSetISODayOfWeek;
+ proto.dayOfYear = getSetDayOfYear;
+ proto.hour = proto.hours = getSetHour;
+ proto.minute = proto.minutes = getSetMinute;
+ proto.second = proto.seconds = getSetSecond;
+ proto.millisecond = proto.milliseconds = getSetMillisecond;
+ proto.utcOffset = getSetOffset;
+ proto.utc = setOffsetToUTC;
+ proto.local = setOffsetToLocal;
+ proto.parseZone = setOffsetToParsedOffset;
+ proto.hasAlignedHourOffset = hasAlignedHourOffset;
+ proto.isDST = isDaylightSavingTime;
+ proto.isLocal = isLocal;
+ proto.isUtcOffset = isUtcOffset;
+ proto.isUtc = isUtc;
+ proto.isUTC = isUtc;
+ proto.zoneAbbr = getZoneAbbr;
+ proto.zoneName = getZoneName;
+ proto.dates = deprecate(
+ 'dates accessor is deprecated. Use date instead.',
+ getSetDayOfMonth
+ );
+ proto.months = deprecate(
+ 'months accessor is deprecated. Use month instead',
+ getSetMonth
+ );
+ proto.years = deprecate(
+ 'years accessor is deprecated. Use year instead',
+ getSetYear
+ );
+ proto.zone = deprecate(
+ 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
+ getSetZone
+ );
+ proto.isDSTShifted = deprecate(
+ 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
+ isDaylightSavingTimeShifted
+ );
+
+ function createUnix(input) {
+ return createLocal(input * 1000);
+ }
+
+ function createInZone() {
+ return createLocal.apply(null, arguments).parseZone();
+ }
+
+ function preParsePostFormat(string) {
+ return string;
+ }
+
+ var proto$1 = Locale.prototype;
+
+ proto$1.calendar = calendar;
+ proto$1.longDateFormat = longDateFormat;
+ proto$1.invalidDate = invalidDate;
+ proto$1.ordinal = ordinal;
+ proto$1.preparse = preParsePostFormat;
+ proto$1.postformat = preParsePostFormat;
+ proto$1.relativeTime = relativeTime;
+ proto$1.pastFuture = pastFuture;
+ proto$1.set = set;
+ proto$1.eras = localeEras;
+ proto$1.erasParse = localeErasParse;
+ proto$1.erasConvertYear = localeErasConvertYear;
+ proto$1.erasAbbrRegex = erasAbbrRegex;
+ proto$1.erasNameRegex = erasNameRegex;
+ proto$1.erasNarrowRegex = erasNarrowRegex;
+
+ proto$1.months = localeMonths;
+ proto$1.monthsShort = localeMonthsShort;
+ proto$1.monthsParse = localeMonthsParse;
+ proto$1.monthsRegex = monthsRegex;
+ proto$1.monthsShortRegex = monthsShortRegex;
+ proto$1.week = localeWeek;
+ proto$1.firstDayOfYear = localeFirstDayOfYear;
+ proto$1.firstDayOfWeek = localeFirstDayOfWeek;
+
+ proto$1.weekdays = localeWeekdays;
+ proto$1.weekdaysMin = localeWeekdaysMin;
+ proto$1.weekdaysShort = localeWeekdaysShort;
+ proto$1.weekdaysParse = localeWeekdaysParse;
+
+ proto$1.weekdaysRegex = weekdaysRegex;
+ proto$1.weekdaysShortRegex = weekdaysShortRegex;
+ proto$1.weekdaysMinRegex = weekdaysMinRegex;
+
+ proto$1.isPM = localeIsPM;
+ proto$1.meridiem = localeMeridiem;
+
+ function get$1(format, index, field, setter) {
+ var locale = getLocale(),
+ utc = createUTC().set(setter, index);
+ return locale[field](utc, format);
+ }
+
+ function listMonthsImpl(format, index, field) {
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+
+ if (index != null) {
+ return get$1(format, index, field, 'month');
+ }
+
+ var i,
+ out = [];
+ for (i = 0; i < 12; i++) {
+ out[i] = get$1(format, i, field, 'month');
+ }
+ return out;
+ }
+
+ // ()
+ // (5)
+ // (fmt, 5)
+ // (fmt)
+ // (true)
+ // (true, 5)
+ // (true, fmt, 5)
+ // (true, fmt)
+ function listWeekdaysImpl(localeSorted, format, index, field) {
+ if (typeof localeSorted === 'boolean') {
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+ } else {
+ format = localeSorted;
+ index = format;
+ localeSorted = false;
+
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+ }
+
+ var locale = getLocale(),
+ shift = localeSorted ? locale._week.dow : 0,
+ i,
+ out = [];
+
+ if (index != null) {
+ return get$1(format, (index + shift) % 7, field, 'day');
+ }
+
+ for (i = 0; i < 7; i++) {
+ out[i] = get$1(format, (i + shift) % 7, field, 'day');
+ }
+ return out;
+ }
+
+ function listMonths(format, index) {
+ return listMonthsImpl(format, index, 'months');
+ }
+
+ function listMonthsShort(format, index) {
+ return listMonthsImpl(format, index, 'monthsShort');
+ }
+
+ function listWeekdays(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
+ }
+
+ function listWeekdaysShort(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
+ }
+
+ function listWeekdaysMin(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
+ }
+
+ getSetGlobalLocale('en', {
+ eras: [
+ {
+ since: '0001-01-01',
+ until: +Infinity,
+ offset: 1,
+ name: 'Anno Domini',
+ narrow: 'AD',
+ abbr: 'AD',
+ },
+ {
+ since: '0000-12-31',
+ until: -Infinity,
+ offset: 1,
+ name: 'Before Christ',
+ narrow: 'BC',
+ abbr: 'BC',
+ },
+ ],
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ toInt((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ });
+
+ // Side effect imports
+
+ hooks.lang = deprecate(
+ 'moment.lang is deprecated. Use moment.locale instead.',
+ getSetGlobalLocale
+ );
+ hooks.langData = deprecate(
+ 'moment.langData is deprecated. Use moment.localeData instead.',
+ getLocale
+ );
+
+ var mathAbs = Math.abs;
+
+ function abs() {
+ var data = this._data;
+
+ this._milliseconds = mathAbs(this._milliseconds);
+ this._days = mathAbs(this._days);
+ this._months = mathAbs(this._months);
+
+ data.milliseconds = mathAbs(data.milliseconds);
+ data.seconds = mathAbs(data.seconds);
+ data.minutes = mathAbs(data.minutes);
+ data.hours = mathAbs(data.hours);
+ data.months = mathAbs(data.months);
+ data.years = mathAbs(data.years);
+
+ return this;
+ }
+
+ function addSubtract$1(duration, input, value, direction) {
+ var other = createDuration(input, value);
+
+ duration._milliseconds += direction * other._milliseconds;
+ duration._days += direction * other._days;
+ duration._months += direction * other._months;
+
+ return duration._bubble();
+ }
+
+ // supports only 2.0-style add(1, 's') or add(duration)
+ function add$1(input, value) {
+ return addSubtract$1(this, input, value, 1);
+ }
+
+ // supports only 2.0-style subtract(1, 's') or subtract(duration)
+ function subtract$1(input, value) {
+ return addSubtract$1(this, input, value, -1);
+ }
+
+ function absCeil(number) {
+ if (number < 0) {
+ return Math.floor(number);
+ } else {
+ return Math.ceil(number);
+ }
+ }
+
+ function bubble() {
+ var milliseconds = this._milliseconds,
+ days = this._days,
+ months = this._months,
+ data = this._data,
+ seconds,
+ minutes,
+ hours,
+ years,
+ monthsFromDays;
+
+ // if we have a mix of positive and negative values, bubble down first
+ // check: https://github.com/moment/moment/issues/2166
+ if (
+ !(
+ (milliseconds >= 0 && days >= 0 && months >= 0) ||
+ (milliseconds <= 0 && days <= 0 && months <= 0)
+ )
+ ) {
+ milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
+ days = 0;
+ months = 0;
+ }
+
+ // The following code bubbles up values, see the tests for
+ // examples of what that means.
+ data.milliseconds = milliseconds % 1000;
+
+ seconds = absFloor(milliseconds / 1000);
+ data.seconds = seconds % 60;
+
+ minutes = absFloor(seconds / 60);
+ data.minutes = minutes % 60;
+
+ hours = absFloor(minutes / 60);
+ data.hours = hours % 24;
+
+ days += absFloor(hours / 24);
+
+ // convert days to months
+ monthsFromDays = absFloor(daysToMonths(days));
+ months += monthsFromDays;
+ days -= absCeil(monthsToDays(monthsFromDays));
+
+ // 12 months -> 1 year
+ years = absFloor(months / 12);
+ months %= 12;
+
+ data.days = days;
+ data.months = months;
+ data.years = years;
+
+ return this;
+ }
+
+ function daysToMonths(days) {
+ // 400 years have 146097 days (taking into account leap year rules)
+ // 400 years have 12 months === 4800
+ return (days * 4800) / 146097;
+ }
+
+ function monthsToDays(months) {
+ // the reverse of daysToMonths
+ return (months * 146097) / 4800;
+ }
+
+ function as(units) {
+ if (!this.isValid()) {
+ return NaN;
+ }
+ var days,
+ months,
+ milliseconds = this._milliseconds;
+
+ units = normalizeUnits(units);
+
+ if (units === 'month' || units === 'quarter' || units === 'year') {
+ days = this._days + milliseconds / 864e5;
+ months = this._months + daysToMonths(days);
+ switch (units) {
+ case 'month':
+ return months;
+ case 'quarter':
+ return months / 3;
+ case 'year':
+ return months / 12;
+ }
+ } else {
+ // handle milliseconds separately because of floating point math errors (issue #1867)
+ days = this._days + Math.round(monthsToDays(this._months));
+ switch (units) {
+ case 'week':
+ return days / 7 + milliseconds / 6048e5;
+ case 'day':
+ return days + milliseconds / 864e5;
+ case 'hour':
+ return days * 24 + milliseconds / 36e5;
+ case 'minute':
+ return days * 1440 + milliseconds / 6e4;
+ case 'second':
+ return days * 86400 + milliseconds / 1000;
+ // Math.floor prevents floating point math errors here
+ case 'millisecond':
+ return Math.floor(days * 864e5) + milliseconds;
+ default:
+ throw new Error('Unknown unit ' + units);
+ }
+ }
+ }
+
+ // TODO: Use this.as('ms')?
+ function valueOf$1() {
+ if (!this.isValid()) {
+ return NaN;
+ }
+ return (
+ this._milliseconds +
+ this._days * 864e5 +
+ (this._months % 12) * 2592e6 +
+ toInt(this._months / 12) * 31536e6
+ );
+ }
+
+ function makeAs(alias) {
+ return function () {
+ return this.as(alias);
+ };
+ }
+
+ var asMilliseconds = makeAs('ms'),
+ asSeconds = makeAs('s'),
+ asMinutes = makeAs('m'),
+ asHours = makeAs('h'),
+ asDays = makeAs('d'),
+ asWeeks = makeAs('w'),
+ asMonths = makeAs('M'),
+ asQuarters = makeAs('Q'),
+ asYears = makeAs('y');
+
+ function clone$1() {
+ return createDuration(this);
+ }
+
+ function get$2(units) {
+ units = normalizeUnits(units);
+ return this.isValid() ? this[units + 's']() : NaN;
+ }
+
+ function makeGetter(name) {
+ return function () {
+ return this.isValid() ? this._data[name] : NaN;
+ };
+ }
+
+ var milliseconds = makeGetter('milliseconds'),
+ seconds = makeGetter('seconds'),
+ minutes = makeGetter('minutes'),
+ hours = makeGetter('hours'),
+ days = makeGetter('days'),
+ months = makeGetter('months'),
+ years = makeGetter('years');
+
+ function weeks() {
+ return absFloor(this.days() / 7);
+ }
+
+ var round = Math.round,
+ thresholds = {
+ ss: 44, // a few seconds to seconds
+ s: 45, // seconds to minute
+ m: 45, // minutes to hour
+ h: 22, // hours to day
+ d: 26, // days to month/week
+ w: null, // weeks to month
+ M: 11, // months to year
+ };
+
+ // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
+ function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
+ return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
+ }
+
+ function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
+ var duration = createDuration(posNegDuration).abs(),
+ seconds = round(duration.as('s')),
+ minutes = round(duration.as('m')),
+ hours = round(duration.as('h')),
+ days = round(duration.as('d')),
+ months = round(duration.as('M')),
+ weeks = round(duration.as('w')),
+ years = round(duration.as('y')),
+ a =
+ (seconds <= thresholds.ss && ['s', seconds]) ||
+ (seconds < thresholds.s && ['ss', seconds]) ||
+ (minutes <= 1 && ['m']) ||
+ (minutes < thresholds.m && ['mm', minutes]) ||
+ (hours <= 1 && ['h']) ||
+ (hours < thresholds.h && ['hh', hours]) ||
+ (days <= 1 && ['d']) ||
+ (days < thresholds.d && ['dd', days]);
+
+ if (thresholds.w != null) {
+ a =
+ a ||
+ (weeks <= 1 && ['w']) ||
+ (weeks < thresholds.w && ['ww', weeks]);
+ }
+ a = a ||
+ (months <= 1 && ['M']) ||
+ (months < thresholds.M && ['MM', months]) ||
+ (years <= 1 && ['y']) || ['yy', years];
+
+ a[2] = withoutSuffix;
+ a[3] = +posNegDuration > 0;
+ a[4] = locale;
+ return substituteTimeAgo.apply(null, a);
+ }
+
+ // This function allows you to set the rounding function for relative time strings
+ function getSetRelativeTimeRounding(roundingFunction) {
+ if (roundingFunction === undefined) {
+ return round;
+ }
+ if (typeof roundingFunction === 'function') {
+ round = roundingFunction;
+ return true;
+ }
+ return false;
+ }
+
+ // This function allows you to set a threshold for relative time strings
+ function getSetRelativeTimeThreshold(threshold, limit) {
+ if (thresholds[threshold] === undefined) {
+ return false;
+ }
+ if (limit === undefined) {
+ return thresholds[threshold];
+ }
+ thresholds[threshold] = limit;
+ if (threshold === 's') {
+ thresholds.ss = limit - 1;
+ }
+ return true;
+ }
+
+ function humanize(argWithSuffix, argThresholds) {
+ if (!this.isValid()) {
+ return this.localeData().invalidDate();
+ }
+
+ var withSuffix = false,
+ th = thresholds,
+ locale,
+ output;
+
+ if (typeof argWithSuffix === 'object') {
+ argThresholds = argWithSuffix;
+ argWithSuffix = false;
+ }
+ if (typeof argWithSuffix === 'boolean') {
+ withSuffix = argWithSuffix;
+ }
+ if (typeof argThresholds === 'object') {
+ th = Object.assign({}, thresholds, argThresholds);
+ if (argThresholds.s != null && argThresholds.ss == null) {
+ th.ss = argThresholds.s - 1;
+ }
+ }
+
+ locale = this.localeData();
+ output = relativeTime$1(this, !withSuffix, th, locale);
+
+ if (withSuffix) {
+ output = locale.pastFuture(+this, output);
+ }
+
+ return locale.postformat(output);
+ }
+
+ var abs$1 = Math.abs;
+
+ function sign(x) {
+ return (x > 0) - (x < 0) || +x;
+ }
+
+ function toISOString$1() {
+ // for ISO strings we do not use the normal bubbling rules:
+ // * milliseconds bubble up until they become hours
+ // * days do not bubble at all
+ // * months bubble up until they become years
+ // This is because there is no context-free conversion between hours and days
+ // (think of clock changes)
+ // and also not between days and months (28-31 days per month)
+ if (!this.isValid()) {
+ return this.localeData().invalidDate();
+ }
+
+ var seconds = abs$1(this._milliseconds) / 1000,
+ days = abs$1(this._days),
+ months = abs$1(this._months),
+ minutes,
+ hours,
+ years,
+ s,
+ total = this.asSeconds(),
+ totalSign,
+ ymSign,
+ daysSign,
+ hmsSign;
+
+ if (!total) {
+ // this is the same as C#'s (Noda) and python (isodate)...
+ // but not other JS (goog.date)
+ return 'P0D';
+ }
+
+ // 3600 seconds -> 60 minutes -> 1 hour
+ minutes = absFloor(seconds / 60);
+ hours = absFloor(minutes / 60);
+ seconds %= 60;
+ minutes %= 60;
+
+ // 12 months -> 1 year
+ years = absFloor(months / 12);
+ months %= 12;
+
+ // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
+ s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
+
+ totalSign = total < 0 ? '-' : '';
+ ymSign = sign(this._months) !== sign(total) ? '-' : '';
+ daysSign = sign(this._days) !== sign(total) ? '-' : '';
+ hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
+
+ return (
+ totalSign +
+ 'P' +
+ (years ? ymSign + years + 'Y' : '') +
+ (months ? ymSign + months + 'M' : '') +
+ (days ? daysSign + days + 'D' : '') +
+ (hours || minutes || seconds ? 'T' : '') +
+ (hours ? hmsSign + hours + 'H' : '') +
+ (minutes ? hmsSign + minutes + 'M' : '') +
+ (seconds ? hmsSign + s + 'S' : '')
+ );
+ }
+
+ var proto$2 = Duration.prototype;
+
+ proto$2.isValid = isValid$1;
+ proto$2.abs = abs;
+ proto$2.add = add$1;
+ proto$2.subtract = subtract$1;
+ proto$2.as = as;
+ proto$2.asMilliseconds = asMilliseconds;
+ proto$2.asSeconds = asSeconds;
+ proto$2.asMinutes = asMinutes;
+ proto$2.asHours = asHours;
+ proto$2.asDays = asDays;
+ proto$2.asWeeks = asWeeks;
+ proto$2.asMonths = asMonths;
+ proto$2.asQuarters = asQuarters;
+ proto$2.asYears = asYears;
+ proto$2.valueOf = valueOf$1;
+ proto$2._bubble = bubble;
+ proto$2.clone = clone$1;
+ proto$2.get = get$2;
+ proto$2.milliseconds = milliseconds;
+ proto$2.seconds = seconds;
+ proto$2.minutes = minutes;
+ proto$2.hours = hours;
+ proto$2.days = days;
+ proto$2.weeks = weeks;
+ proto$2.months = months;
+ proto$2.years = years;
+ proto$2.humanize = humanize;
+ proto$2.toISOString = toISOString$1;
+ proto$2.toString = toISOString$1;
+ proto$2.toJSON = toISOString$1;
+ proto$2.locale = locale;
+ proto$2.localeData = localeData;
+
+ proto$2.toIsoString = deprecate(
+ 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
+ toISOString$1
+ );
+ proto$2.lang = lang;
+
+ // FORMATTING
+
+ addFormatToken('X', 0, 0, 'unix');
+ addFormatToken('x', 0, 0, 'valueOf');
+
+ // PARSING
+
+ addRegexToken('x', matchSigned);
+ addRegexToken('X', matchTimestamp);
+ addParseToken('X', function (input, array, config) {
+ config._d = new Date(parseFloat(input) * 1000);
+ });
+ addParseToken('x', function (input, array, config) {
+ config._d = new Date(toInt(input));
+ });
+
+ //! moment.js
+
+ hooks.version = '2.29.4';
+
+ setHookCallback(createLocal);
+
+ hooks.fn = proto;
+ hooks.min = min;
+ hooks.max = max;
+ hooks.now = now;
+ hooks.utc = createUTC;
+ hooks.unix = createUnix;
+ hooks.months = listMonths;
+ hooks.isDate = isDate;
+ hooks.locale = getSetGlobalLocale;
+ hooks.invalid = createInvalid;
+ hooks.duration = createDuration;
+ hooks.isMoment = isMoment;
+ hooks.weekdays = listWeekdays;
+ hooks.parseZone = createInZone;
+ hooks.localeData = getLocale;
+ hooks.isDuration = isDuration;
+ hooks.monthsShort = listMonthsShort;
+ hooks.weekdaysMin = listWeekdaysMin;
+ hooks.defineLocale = defineLocale;
+ hooks.updateLocale = updateLocale;
+ hooks.locales = listLocales;
+ hooks.weekdaysShort = listWeekdaysShort;
+ hooks.normalizeUnits = normalizeUnits;
+ hooks.relativeTimeRounding = getSetRelativeTimeRounding;
+ hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
+ hooks.calendarFormat = getCalendarFormat;
+ hooks.prototype = proto;
+
+ // currently HTML5 input type only supports 24-hour formats
+ hooks.HTML5_FMT = {
+ DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', //
+ DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', //
+ DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', //
+ DATE: 'YYYY-MM-DD', //
+ TIME: 'HH:mm', //
+ TIME_SECONDS: 'HH:mm:ss', //
+ TIME_MS: 'HH:mm:ss.SSS', //
+ WEEK: 'GGGG-[W]WW', //
+ MONTH: 'YYYY-MM', //
+ };
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('af', {
+ months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
+ weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
+ '_'
+ ),
+ weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
+ weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
+ meridiemParse: /vm|nm/i,
+ isPM: function (input) {
+ return /^nm$/i.test(input);
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'vm' : 'VM';
+ } else {
+ return isLower ? 'nm' : 'NM';
+ }
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Vandag om] LT',
+ nextDay: '[Môre om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[Gister om] LT',
+ lastWeek: '[Laas] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'oor %s',
+ past: '%s gelede',
+ s: "'n paar sekondes",
+ ss: '%d sekondes',
+ m: "'n minuut",
+ mm: '%d minute',
+ h: "'n uur",
+ hh: '%d ure',
+ d: "'n dag",
+ dd: '%d dae',
+ M: "'n maand",
+ MM: '%d maande',
+ y: "'n jaar",
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ ); // Thanks to Joris Röling : https://github.com/jjupiter
+ },
+ week: {
+ dow: 1, // Maandag is die eerste dag van die week.
+ doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months$1 = [
+ 'جانفي',
+ 'فيفري',
+ 'مارس',
+ 'أفريل',
+ 'ماي',
+ 'جوان',
+ 'جويلية',
+ 'أوت',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+ hooks.defineLocale('ar-dz', {
+ months: months$1,
+ monthsShort: months$1,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ar-kw', {
+ months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap = {
+ 1: '1',
+ 2: '2',
+ 3: '3',
+ 4: '4',
+ 5: '5',
+ 6: '6',
+ 7: '7',
+ 8: '8',
+ 9: '9',
+ 0: '0',
+ },
+ pluralForm$1 = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals$1 = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize$1 = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm$1(number),
+ str = plurals$1[u][pluralForm$1(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months$2 = [
+ 'يناير',
+ 'فبراير',
+ 'مارس',
+ 'أبريل',
+ 'مايو',
+ 'يونيو',
+ 'يوليو',
+ 'أغسطس',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+ hooks.defineLocale('ar-ly', {
+ months: months$2,
+ monthsShort: months$2,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize$1('s'),
+ ss: pluralize$1('s'),
+ m: pluralize$1('m'),
+ mm: pluralize$1('m'),
+ h: pluralize$1('h'),
+ hh: pluralize$1('h'),
+ d: pluralize$1('d'),
+ dd: pluralize$1('d'),
+ M: pluralize$1('M'),
+ MM: pluralize$1('M'),
+ y: pluralize$1('y'),
+ yy: pluralize$1('y'),
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ar-ma', {
+ months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$1 = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ };
+
+ hooks.defineLocale('ar-sa', {
+ months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap$1[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ar-tn', {
+ months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$2 = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap$1 = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ },
+ pluralForm$2 = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals$2 = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize$2 = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm$2(number),
+ str = plurals$2[u][pluralForm$2(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months$3 = [
+ 'يناير',
+ 'فبراير',
+ 'مارس',
+ 'أبريل',
+ 'مايو',
+ 'يونيو',
+ 'يوليو',
+ 'أغسطس',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+ hooks.defineLocale('ar', {
+ months: months$3,
+ monthsShort: months$3,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize$2('s'),
+ ss: pluralize$2('s'),
+ m: pluralize$2('m'),
+ mm: pluralize$2('m'),
+ h: pluralize$2('h'),
+ hh: pluralize$2('h'),
+ d: pluralize$2('d'),
+ dd: pluralize$2('d'),
+ M: pluralize$2('M'),
+ MM: pluralize$2('M'),
+ y: pluralize$2('y'),
+ yy: pluralize$2('y'),
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap$1[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap$2[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes = {
+ 1: '-inci',
+ 5: '-inci',
+ 8: '-inci',
+ 70: '-inci',
+ 80: '-inci',
+ 2: '-nci',
+ 7: '-nci',
+ 20: '-nci',
+ 50: '-nci',
+ 3: '-üncü',
+ 4: '-üncü',
+ 100: '-üncü',
+ 6: '-ncı',
+ 9: '-uncu',
+ 10: '-uncu',
+ 30: '-uncu',
+ 60: '-ıncı',
+ 90: '-ıncı',
+ };
+
+ hooks.defineLocale('az', {
+ months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
+ weekdays:
+ 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
+ '_'
+ ),
+ weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
+ weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün saat] LT',
+ nextDay: '[sabah saat] LT',
+ nextWeek: '[gələn həftə] dddd [saat] LT',
+ lastDay: '[dünən] LT',
+ lastWeek: '[keçən həftə] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s sonra',
+ past: '%s əvvəl',
+ s: 'bir neçə saniyə',
+ ss: '%d saniyə',
+ m: 'bir dəqiqə',
+ mm: '%d dəqiqə',
+ h: 'bir saat',
+ hh: '%d saat',
+ d: 'bir gün',
+ dd: '%d gün',
+ M: 'bir ay',
+ MM: '%d ay',
+ y: 'bir il',
+ yy: '%d il',
+ },
+ meridiemParse: /gecə|səhər|gündüz|axşam/,
+ isPM: function (input) {
+ return /^(gündüz|axşam)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'gecə';
+ } else if (hour < 12) {
+ return 'səhər';
+ } else if (hour < 17) {
+ return 'gündüz';
+ } else {
+ return 'axşam';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
+ ordinal: function (number) {
+ if (number === 0) {
+ // special case for zero
+ return number + '-ıncı';
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+ }
+ function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
+ mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
+ hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
+ dd: 'дзень_дні_дзён',
+ MM: 'месяц_месяцы_месяцаў',
+ yy: 'год_гады_гадоў',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'хвіліна' : 'хвіліну';
+ } else if (key === 'h') {
+ return withoutSuffix ? 'гадзіна' : 'гадзіну';
+ } else {
+ return number + ' ' + plural(format[key], +number);
+ }
+ }
+
+ hooks.defineLocale('be', {
+ months: {
+ format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
+ '_'
+ ),
+ standalone:
+ 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
+ weekdays: {
+ format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
+ '_'
+ ),
+ standalone:
+ 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
+ '_'
+ ),
+ isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
+ },
+ weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+ weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY г.',
+ LLL: 'D MMMM YYYY г., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY г., HH:mm',
+ },
+ calendar: {
+ sameDay: '[Сёння ў] LT',
+ nextDay: '[Заўтра ў] LT',
+ lastDay: '[Учора ў] LT',
+ nextWeek: function () {
+ return '[У] dddd [ў] LT';
+ },
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 5:
+ case 6:
+ return '[У мінулую] dddd [ў] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[У мінулы] dddd [ў] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'праз %s',
+ past: '%s таму',
+ s: 'некалькі секунд',
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: relativeTimeWithPlural,
+ hh: relativeTimeWithPlural,
+ d: 'дзень',
+ dd: relativeTimeWithPlural,
+ M: 'месяц',
+ MM: relativeTimeWithPlural,
+ y: 'год',
+ yy: relativeTimeWithPlural,
+ },
+ meridiemParse: /ночы|раніцы|дня|вечара/,
+ isPM: function (input) {
+ return /^(дня|вечара)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночы';
+ } else if (hour < 12) {
+ return 'раніцы';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечара';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ case 'w':
+ case 'W':
+ return (number % 10 === 2 || number % 10 === 3) &&
+ number % 100 !== 12 &&
+ number % 100 !== 13
+ ? number + '-і'
+ : number + '-ы';
+ case 'D':
+ return number + '-га';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('bg', {
+ months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
+ '_'
+ ),
+ monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
+ '_'
+ ),
+ weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
+ weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Днес в] LT',
+ nextDay: '[Утре в] LT',
+ nextWeek: 'dddd [в] LT',
+ lastDay: '[Вчера в] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 6:
+ return '[Миналата] dddd [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[Миналия] dddd [в] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'след %s',
+ past: 'преди %s',
+ s: 'няколко секунди',
+ ss: '%d секунди',
+ m: 'минута',
+ mm: '%d минути',
+ h: 'час',
+ hh: '%d часа',
+ d: 'ден',
+ dd: '%d дена',
+ w: 'седмица',
+ ww: '%d седмици',
+ M: 'месец',
+ MM: '%d месеца',
+ y: 'година',
+ yy: '%d години',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+ ordinal: function (number) {
+ var lastDigit = number % 10,
+ last2Digits = number % 100;
+ if (number === 0) {
+ return number + '-ев';
+ } else if (last2Digits === 0) {
+ return number + '-ен';
+ } else if (last2Digits > 10 && last2Digits < 20) {
+ return number + '-ти';
+ } else if (lastDigit === 1) {
+ return number + '-ви';
+ } else if (lastDigit === 2) {
+ return number + '-ри';
+ } else if (lastDigit === 7 || lastDigit === 8) {
+ return number + '-ми';
+ } else {
+ return number + '-ти';
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('bm', {
+ months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
+ '_'
+ ),
+ monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
+ weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
+ weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
+ weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'MMMM [tile] D [san] YYYY',
+ LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
+ LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
+ },
+ calendar: {
+ sameDay: '[Bi lɛrɛ] LT',
+ nextDay: '[Sini lɛrɛ] LT',
+ nextWeek: 'dddd [don lɛrɛ] LT',
+ lastDay: '[Kunu lɛrɛ] LT',
+ lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s kɔnɔ',
+ past: 'a bɛ %s bɔ',
+ s: 'sanga dama dama',
+ ss: 'sekondi %d',
+ m: 'miniti kelen',
+ mm: 'miniti %d',
+ h: 'lɛrɛ kelen',
+ hh: 'lɛrɛ %d',
+ d: 'tile kelen',
+ dd: 'tile %d',
+ M: 'kalo kelen',
+ MM: 'kalo %d',
+ y: 'san kelen',
+ yy: 'san %d',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$3 = {
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
+ },
+ numberMap$2 = {
+ '১': '1',
+ '২': '2',
+ '৩': '3',
+ '৪': '4',
+ '৫': '5',
+ '৬': '6',
+ '৭': '7',
+ '৮': '8',
+ '৯': '9',
+ '০': '0',
+ };
+
+ hooks.defineLocale('bn-bd', {
+ months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
+ '_'
+ ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
+ weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
+ '_'
+ ),
+ weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+ weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm সময়',
+ LTS: 'A h:mm:ss সময়',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm সময়',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
+ },
+ calendar: {
+ sameDay: '[আজ] LT',
+ nextDay: '[আগামীকাল] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[গতকাল] LT',
+ lastWeek: '[গত] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s পরে',
+ past: '%s আগে',
+ s: 'কয়েক সেকেন্ড',
+ ss: '%d সেকেন্ড',
+ m: 'এক মিনিট',
+ mm: '%d মিনিট',
+ h: 'এক ঘন্টা',
+ hh: '%d ঘন্টা',
+ d: 'এক দিন',
+ dd: '%d দিন',
+ M: 'এক মাস',
+ MM: '%d মাস',
+ y: 'এক বছর',
+ yy: '%d বছর',
+ },
+ preparse: function (string) {
+ return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+ return numberMap$2[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$3[match];
+ });
+ },
+
+ meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'রাত') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ভোর') {
+ return hour;
+ } else if (meridiem === 'সকাল') {
+ return hour;
+ } else if (meridiem === 'দুপুর') {
+ return hour >= 3 ? hour : hour + 12;
+ } else if (meridiem === 'বিকাল') {
+ return hour + 12;
+ } else if (meridiem === 'সন্ধ্যা') {
+ return hour + 12;
+ }
+ },
+
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'রাত';
+ } else if (hour < 6) {
+ return 'ভোর';
+ } else if (hour < 12) {
+ return 'সকাল';
+ } else if (hour < 15) {
+ return 'দুপুর';
+ } else if (hour < 18) {
+ return 'বিকাল';
+ } else if (hour < 20) {
+ return 'সন্ধ্যা';
+ } else {
+ return 'রাত';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$4 = {
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
+ },
+ numberMap$3 = {
+ '১': '1',
+ '২': '2',
+ '৩': '3',
+ '৪': '4',
+ '৫': '5',
+ '৬': '6',
+ '৭': '7',
+ '৮': '8',
+ '৯': '9',
+ '০': '0',
+ };
+
+ hooks.defineLocale('bn', {
+ months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
+ '_'
+ ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
+ weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
+ '_'
+ ),
+ weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+ weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm সময়',
+ LTS: 'A h:mm:ss সময়',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm সময়',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
+ },
+ calendar: {
+ sameDay: '[আজ] LT',
+ nextDay: '[আগামীকাল] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[গতকাল] LT',
+ lastWeek: '[গত] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s পরে',
+ past: '%s আগে',
+ s: 'কয়েক সেকেন্ড',
+ ss: '%d সেকেন্ড',
+ m: 'এক মিনিট',
+ mm: '%d মিনিট',
+ h: 'এক ঘন্টা',
+ hh: '%d ঘন্টা',
+ d: 'এক দিন',
+ dd: '%d দিন',
+ M: 'এক মাস',
+ MM: '%d মাস',
+ y: 'এক বছর',
+ yy: '%d বছর',
+ },
+ preparse: function (string) {
+ return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+ return numberMap$3[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$4[match];
+ });
+ },
+ meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'রাত' && hour >= 4) ||
+ (meridiem === 'দুপুর' && hour < 5) ||
+ meridiem === 'বিকাল'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'রাত';
+ } else if (hour < 10) {
+ return 'সকাল';
+ } else if (hour < 17) {
+ return 'দুপুর';
+ } else if (hour < 20) {
+ return 'বিকাল';
+ } else {
+ return 'রাত';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$5 = {
+ 1: '༡',
+ 2: '༢',
+ 3: '༣',
+ 4: '༤',
+ 5: '༥',
+ 6: '༦',
+ 7: '༧',
+ 8: '༨',
+ 9: '༩',
+ 0: '༠',
+ },
+ numberMap$4 = {
+ '༡': '1',
+ '༢': '2',
+ '༣': '3',
+ '༤': '4',
+ '༥': '5',
+ '༦': '6',
+ '༧': '7',
+ '༨': '8',
+ '༩': '9',
+ '༠': '0',
+ };
+
+ hooks.defineLocale('bo', {
+ months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
+ '_'
+ ),
+ monthsShortRegex: /^(ཟླ་\d{1,2})/,
+ monthsParseExact: true,
+ weekdays:
+ 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
+ '_'
+ ),
+ weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
+ '_'
+ ),
+ weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[དི་རིང] LT',
+ nextDay: '[སང་ཉིན] LT',
+ nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
+ lastDay: '[ཁ་སང] LT',
+ lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ལ་',
+ past: '%s སྔན་ལ',
+ s: 'ལམ་སང',
+ ss: '%d སྐར་ཆ།',
+ m: 'སྐར་མ་གཅིག',
+ mm: '%d སྐར་མ',
+ h: 'ཆུ་ཚོད་གཅིག',
+ hh: '%d ཆུ་ཚོད',
+ d: 'ཉིན་གཅིག',
+ dd: '%d ཉིན་',
+ M: 'ཟླ་བ་གཅིག',
+ MM: '%d ཟླ་བ',
+ y: 'ལོ་གཅིག',
+ yy: '%d ལོ',
+ },
+ preparse: function (string) {
+ return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
+ return numberMap$4[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$5[match];
+ });
+ },
+ meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'མཚན་མོ' && hour >= 4) ||
+ (meridiem === 'ཉིན་གུང' && hour < 5) ||
+ meridiem === 'དགོང་དག'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'མཚན་མོ';
+ } else if (hour < 10) {
+ return 'ཞོགས་ཀས';
+ } else if (hour < 17) {
+ return 'ཉིན་གུང';
+ } else if (hour < 20) {
+ return 'དགོང་དག';
+ } else {
+ return 'མཚན་མོ';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function relativeTimeWithMutation(number, withoutSuffix, key) {
+ var format = {
+ mm: 'munutenn',
+ MM: 'miz',
+ dd: 'devezh',
+ };
+ return number + ' ' + mutation(format[key], number);
+ }
+ function specialMutationForYears(number) {
+ switch (lastNumber(number)) {
+ case 1:
+ case 3:
+ case 4:
+ case 5:
+ case 9:
+ return number + ' bloaz';
+ default:
+ return number + ' vloaz';
+ }
+ }
+ function lastNumber(number) {
+ if (number > 9) {
+ return lastNumber(number % 10);
+ }
+ return number;
+ }
+ function mutation(text, number) {
+ if (number === 2) {
+ return softMutation(text);
+ }
+ return text;
+ }
+ function softMutation(text) {
+ var mutationTable = {
+ m: 'v',
+ b: 'v',
+ d: 'z',
+ };
+ if (mutationTable[text.charAt(0)] === undefined) {
+ return text;
+ }
+ return mutationTable[text.charAt(0)] + text.substring(1);
+ }
+
+ var monthsParse = [
+ /^gen/i,
+ /^c[ʼ\']hwe/i,
+ /^meu/i,
+ /^ebr/i,
+ /^mae/i,
+ /^(mez|eve)/i,
+ /^gou/i,
+ /^eos/i,
+ /^gwe/i,
+ /^her/i,
+ /^du/i,
+ /^ker/i,
+ ],
+ monthsRegex$1 =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ monthsStrictRegex =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
+ monthsShortStrictRegex =
+ /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ fullWeekdaysParse = [
+ /^sul/i,
+ /^lun/i,
+ /^meurzh/i,
+ /^merc[ʼ\']her/i,
+ /^yaou/i,
+ /^gwener/i,
+ /^sadorn/i,
+ ],
+ shortWeekdaysParse = [
+ /^Sul/i,
+ /^Lun/i,
+ /^Meu/i,
+ /^Mer/i,
+ /^Yao/i,
+ /^Gwe/i,
+ /^Sad/i,
+ ],
+ minWeekdaysParse = [
+ /^Su/i,
+ /^Lu/i,
+ /^Me([^r]|$)/i,
+ /^Mer/i,
+ /^Ya/i,
+ /^Gw/i,
+ /^Sa/i,
+ ];
+
+ hooks.defineLocale('br', {
+ months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
+ '_'
+ ),
+ monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
+ weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
+ weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
+ weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
+ weekdaysParse: minWeekdaysParse,
+ fullWeekdaysParse: fullWeekdaysParse,
+ shortWeekdaysParse: shortWeekdaysParse,
+ minWeekdaysParse: minWeekdaysParse,
+
+ monthsRegex: monthsRegex$1,
+ monthsShortRegex: monthsRegex$1,
+ monthsStrictRegex: monthsStrictRegex,
+ monthsShortStrictRegex: monthsShortStrictRegex,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [a viz] MMMM YYYY',
+ LLL: 'D [a viz] MMMM YYYY HH:mm',
+ LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hiziv da] LT',
+ nextDay: '[Warcʼhoazh da] LT',
+ nextWeek: 'dddd [da] LT',
+ lastDay: '[Decʼh da] LT',
+ lastWeek: 'dddd [paset da] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'a-benn %s',
+ past: '%s ʼzo',
+ s: 'un nebeud segondennoù',
+ ss: '%d eilenn',
+ m: 'ur vunutenn',
+ mm: relativeTimeWithMutation,
+ h: 'un eur',
+ hh: '%d eur',
+ d: 'un devezh',
+ dd: relativeTimeWithMutation,
+ M: 'ur miz',
+ MM: relativeTimeWithMutation,
+ y: 'ur bloaz',
+ yy: specialMutationForYears,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'añ' : 'vet';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
+ isPM: function (token) {
+ return token === 'g.m.';
+ },
+ meridiem: function (hour, minute, isLower) {
+ return hour < 12 ? 'a.m.' : 'g.m.';
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function translate(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ if (number === 1) {
+ result += 'sekunda';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sekunde';
+ } else {
+ result += 'sekundi';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
+ }
+ }
+
+ hooks.defineLocale('bs', {
+ months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[jučer u] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ return '[prošlu] dddd [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'par sekundi',
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: 'dan',
+ dd: translate,
+ M: 'mjesec',
+ MM: translate,
+ y: 'godinu',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ca', {
+ months: {
+ standalone:
+ 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
+ '_'
+ ),
+ format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\s)+MMMM/,
+ },
+ monthsShort:
+ 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
+ '_'
+ ),
+ weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
+ weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [de] YYYY',
+ ll: 'D MMM YYYY',
+ LLL: 'D MMMM [de] YYYY [a les] H:mm',
+ lll: 'D MMM YYYY, H:mm',
+ LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
+ llll: 'ddd D MMM YYYY, H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ nextDay: function () {
+ return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ lastDay: function () {
+ return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [passat a ' +
+ (this.hours() !== 1 ? 'les' : 'la') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: "d'aquí %s",
+ past: 'fa %s',
+ s: 'uns segons',
+ ss: '%d segons',
+ m: 'un minut',
+ mm: '%d minuts',
+ h: 'una hora',
+ hh: '%d hores',
+ d: 'un dia',
+ dd: '%d dies',
+ M: 'un mes',
+ MM: '%d mesos',
+ y: 'un any',
+ yy: '%d anys',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
+ ordinal: function (number, period) {
+ var output =
+ number === 1
+ ? 'r'
+ : number === 2
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
+ if (period === 'w' || period === 'W') {
+ output = 'a';
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$4 = {
+ format: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
+ '_'
+ ),
+ standalone:
+ 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(
+ '_'
+ ),
+ },
+ monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
+ monthsParse$1 = [
+ /^led/i,
+ /^úno/i,
+ /^bře/i,
+ /^dub/i,
+ /^kvě/i,
+ /^(čvn|červen$|června)/i,
+ /^(čvc|červenec|července)/i,
+ /^srp/i,
+ /^zář/i,
+ /^říj/i,
+ /^lis/i,
+ /^pro/i,
+ ],
+ // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
+ // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
+ monthsRegex$2 =
+ /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
+
+ function plural$1(n) {
+ return n > 1 && n < 5 && ~~(n / 10) !== 1;
+ }
+ function translate$1(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
+ case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'sekundy' : 'sekund');
+ } else {
+ return result + 'sekundami';
+ }
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'minuty' : 'minut');
+ } else {
+ return result + 'minutami';
+ }
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'hodiny' : 'hodin');
+ } else {
+ return result + 'hodinami';
+ }
+ case 'd': // a day / in a day / a day ago
+ return withoutSuffix || isFuture ? 'den' : 'dnem';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'dny' : 'dní');
+ } else {
+ return result + 'dny';
+ }
+ case 'M': // a month / in a month / a month ago
+ return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'měsíce' : 'měsíců');
+ } else {
+ return result + 'měsíci';
+ }
+ case 'y': // a year / in a year / a year ago
+ return withoutSuffix || isFuture ? 'rok' : 'rokem';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$1(number) ? 'roky' : 'let');
+ } else {
+ return result + 'lety';
+ }
+ }
+ }
+
+ hooks.defineLocale('cs', {
+ months: months$4,
+ monthsShort: monthsShort,
+ monthsRegex: monthsRegex$2,
+ monthsShortRegex: monthsRegex$2,
+ // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
+ // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
+ monthsStrictRegex:
+ /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
+ monthsShortStrictRegex:
+ /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
+ monthsParse: monthsParse$1,
+ longMonthsParse: monthsParse$1,
+ shortMonthsParse: monthsParse$1,
+ weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
+ weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
+ weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd D. MMMM YYYY H:mm',
+ l: 'D. M. YYYY',
+ },
+ calendar: {
+ sameDay: '[dnes v] LT',
+ nextDay: '[zítra v] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v neděli v] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [v] LT';
+ case 3:
+ return '[ve středu v] LT';
+ case 4:
+ return '[ve čtvrtek v] LT';
+ case 5:
+ return '[v pátek v] LT';
+ case 6:
+ return '[v sobotu v] LT';
+ }
+ },
+ lastDay: '[včera v] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[minulou neděli v] LT';
+ case 1:
+ case 2:
+ return '[minulé] dddd [v] LT';
+ case 3:
+ return '[minulou středu v] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [v] LT';
+ case 6:
+ return '[minulou sobotu v] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'před %s',
+ s: translate$1,
+ ss: translate$1,
+ m: translate$1,
+ mm: translate$1,
+ h: translate$1,
+ hh: translate$1,
+ d: translate$1,
+ dd: translate$1,
+ M: translate$1,
+ MM: translate$1,
+ y: translate$1,
+ yy: translate$1,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('cv', {
+ months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
+ '_'
+ ),
+ monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
+ weekdays:
+ 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
+ '_'
+ ),
+ weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
+ weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
+ LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+ LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+ },
+ calendar: {
+ sameDay: '[Паян] LT [сехетре]',
+ nextDay: '[Ыран] LT [сехетре]',
+ lastDay: '[Ӗнер] LT [сехетре]',
+ nextWeek: '[Ҫитес] dddd LT [сехетре]',
+ lastWeek: '[Иртнӗ] dddd LT [сехетре]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (output) {
+ var affix = /сехет$/i.exec(output)
+ ? 'рен'
+ : /ҫул$/i.exec(output)
+ ? 'тан'
+ : 'ран';
+ return output + affix;
+ },
+ past: '%s каялла',
+ s: 'пӗр-ик ҫеккунт',
+ ss: '%d ҫеккунт',
+ m: 'пӗр минут',
+ mm: '%d минут',
+ h: 'пӗр сехет',
+ hh: '%d сехет',
+ d: 'пӗр кун',
+ dd: '%d кун',
+ M: 'пӗр уйӑх',
+ MM: '%d уйӑх',
+ y: 'пӗр ҫул',
+ yy: '%d ҫул',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
+ ordinal: '%d-мӗш',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('cy', {
+ months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
+ '_'
+ ),
+ monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
+ '_'
+ ),
+ weekdays:
+ 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
+ weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
+ weekdaysParseExact: true,
+ // time formats are the same as en-gb
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Heddiw am] LT',
+ nextDay: '[Yfory am] LT',
+ nextWeek: 'dddd [am] LT',
+ lastDay: '[Ddoe am] LT',
+ lastWeek: 'dddd [diwethaf am] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'mewn %s',
+ past: '%s yn ôl',
+ s: 'ychydig eiliadau',
+ ss: '%d eiliad',
+ m: 'munud',
+ mm: '%d munud',
+ h: 'awr',
+ hh: '%d awr',
+ d: 'diwrnod',
+ dd: '%d diwrnod',
+ M: 'mis',
+ MM: '%d mis',
+ y: 'blwyddyn',
+ yy: '%d flynedd',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
+ // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
+ ordinal: function (number) {
+ var b = number,
+ output = '',
+ lookup = [
+ '',
+ 'af',
+ 'il',
+ 'ydd',
+ 'ydd',
+ 'ed',
+ 'ed',
+ 'ed',
+ 'fed',
+ 'fed',
+ 'fed', // 1af to 10fed
+ 'eg',
+ 'fed',
+ 'eg',
+ 'eg',
+ 'fed',
+ 'eg',
+ 'eg',
+ 'fed',
+ 'eg',
+ 'fed', // 11eg to 20fed
+ ];
+ if (b > 20) {
+ if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
+ output = 'fed'; // not 30ain, 70ain or 90ain
+ } else {
+ output = 'ain';
+ }
+ } else if (b > 0) {
+ output = lookup[b];
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('da', {
+ months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
+ weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i dag kl.] LT',
+ nextDay: '[i morgen kl.] LT',
+ nextWeek: 'på dddd [kl.] LT',
+ lastDay: '[i går kl.] LT',
+ lastWeek: '[i] dddd[s kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s siden',
+ s: 'få sekunder',
+ ss: '%d sekunder',
+ m: 'et minut',
+ mm: '%d minutter',
+ h: 'en time',
+ hh: '%d timer',
+ d: 'en dag',
+ dd: '%d dage',
+ M: 'en måned',
+ MM: '%d måneder',
+ y: 'et år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+
+ hooks.defineLocale('de-at', {
+ months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime,
+ mm: '%d Minuten',
+ h: processRelativeTime,
+ hh: '%d Stunden',
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$1(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+
+ hooks.defineLocale('de-ch', {
+ months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime$1,
+ mm: '%d Minuten',
+ h: processRelativeTime$1,
+ hh: '%d Stunden',
+ d: processRelativeTime$1,
+ dd: processRelativeTime$1,
+ w: processRelativeTime$1,
+ ww: '%d Wochen',
+ M: processRelativeTime$1,
+ MM: processRelativeTime$1,
+ y: processRelativeTime$1,
+ yy: processRelativeTime$1,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$2(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+
+ hooks.defineLocale('de', {
+ months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime$2,
+ mm: '%d Minuten',
+ h: processRelativeTime$2,
+ hh: '%d Stunden',
+ d: processRelativeTime$2,
+ dd: processRelativeTime$2,
+ w: processRelativeTime$2,
+ ww: '%d Wochen',
+ M: processRelativeTime$2,
+ MM: processRelativeTime$2,
+ y: processRelativeTime$2,
+ yy: processRelativeTime$2,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$5 = [
+ 'ޖެނުއަރީ',
+ 'ފެބްރުއަރީ',
+ 'މާރިޗު',
+ 'އޭޕްރީލު',
+ 'މޭ',
+ 'ޖޫން',
+ 'ޖުލައި',
+ 'އޯގަސްޓު',
+ 'ސެޕްޓެމްބަރު',
+ 'އޮކްޓޯބަރު',
+ 'ނޮވެމްބަރު',
+ 'ޑިސެމްބަރު',
+ ],
+ weekdays = [
+ 'އާދިއްތަ',
+ 'ހޯމަ',
+ 'އަންގާރަ',
+ 'ބުދަ',
+ 'ބުރާސްފަތި',
+ 'ހުކުރު',
+ 'ހޮނިހިރު',
+ ];
+
+ hooks.defineLocale('dv', {
+ months: months$5,
+ monthsShort: months$5,
+ weekdays: weekdays,
+ weekdaysShort: weekdays,
+ weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/M/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /މކ|މފ/,
+ isPM: function (input) {
+ return 'މފ' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'މކ';
+ } else {
+ return 'މފ';
+ }
+ },
+ calendar: {
+ sameDay: '[މިއަދު] LT',
+ nextDay: '[މާދަމާ] LT',
+ nextWeek: 'dddd LT',
+ lastDay: '[އިއްޔެ] LT',
+ lastWeek: '[ފާއިތުވި] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ތެރޭގައި %s',
+ past: 'ކުރިން %s',
+ s: 'ސިކުންތުކޮޅެއް',
+ ss: 'd% ސިކުންތު',
+ m: 'މިނިޓެއް',
+ mm: 'މިނިޓު %d',
+ h: 'ގަޑިއިރެއް',
+ hh: 'ގަޑިއިރު %d',
+ d: 'ދުވަހެއް',
+ dd: 'ދުވަސް %d',
+ M: 'މަހެއް',
+ MM: 'މަސް %d',
+ y: 'އަހަރެއް',
+ yy: 'އަހަރު %d',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 7, // Sunday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function isFunction$1(input) {
+ return (
+ (typeof Function !== 'undefined' && input instanceof Function) ||
+ Object.prototype.toString.call(input) === '[object Function]'
+ );
+ }
+
+ hooks.defineLocale('el', {
+ monthsNominativeEl:
+ 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
+ '_'
+ ),
+ monthsGenitiveEl:
+ 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
+ '_'
+ ),
+ months: function (momentToFormat, format) {
+ if (!momentToFormat) {
+ return this._monthsNominativeEl;
+ } else if (
+ typeof format === 'string' &&
+ /D/.test(format.substring(0, format.indexOf('MMMM')))
+ ) {
+ // if there is a day number before 'MMMM'
+ return this._monthsGenitiveEl[momentToFormat.month()];
+ } else {
+ return this._monthsNominativeEl[momentToFormat.month()];
+ }
+ },
+ monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
+ weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
+ '_'
+ ),
+ weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
+ weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'μμ' : 'ΜΜ';
+ } else {
+ return isLower ? 'πμ' : 'ΠΜ';
+ }
+ },
+ isPM: function (input) {
+ return (input + '').toLowerCase()[0] === 'μ';
+ },
+ meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendarEl: {
+ sameDay: '[Σήμερα {}] LT',
+ nextDay: '[Αύριο {}] LT',
+ nextWeek: 'dddd [{}] LT',
+ lastDay: '[Χθες {}] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 6:
+ return '[το προηγούμενο] dddd [{}] LT';
+ default:
+ return '[την προηγούμενη] dddd [{}] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ calendar: function (key, mom) {
+ var output = this._calendarEl[key],
+ hours = mom && mom.hours();
+ if (isFunction$1(output)) {
+ output = output.apply(mom);
+ }
+ return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
+ },
+ relativeTime: {
+ future: 'σε %s',
+ past: '%s πριν',
+ s: 'λίγα δευτερόλεπτα',
+ ss: '%d δευτερόλεπτα',
+ m: 'ένα λεπτό',
+ mm: '%d λεπτά',
+ h: 'μία ώρα',
+ hh: '%d ώρες',
+ d: 'μία μέρα',
+ dd: '%d μέρες',
+ M: 'ένας μήνας',
+ MM: '%d μήνες',
+ y: 'ένας χρόνος',
+ yy: '%d χρόνια',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}η/,
+ ordinal: '%dη',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4st is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('en-au', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('en-ca', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'YYYY-MM-DD',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY h:mm A',
+ LLLL: 'dddd, MMMM D, YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('en-gb', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('en-ie', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('en-il', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('en-in', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 1st is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('en-nz', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('en-sg', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('eo', {
+ months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
+ weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
+ weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: '[la] D[-an de] MMMM, YYYY',
+ LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
+ LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
+ llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',
+ },
+ meridiemParse: /[ap]\.t\.m/i,
+ isPM: function (input) {
+ return input.charAt(0).toLowerCase() === 'p';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'p.t.m.' : 'P.T.M.';
+ } else {
+ return isLower ? 'a.t.m.' : 'A.T.M.';
+ }
+ },
+ calendar: {
+ sameDay: '[Hodiaŭ je] LT',
+ nextDay: '[Morgaŭ je] LT',
+ nextWeek: 'dddd[n je] LT',
+ lastDay: '[Hieraŭ je] LT',
+ lastWeek: '[pasintan] dddd[n je] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'post %s',
+ past: 'antaŭ %s',
+ s: 'kelkaj sekundoj',
+ ss: '%d sekundoj',
+ m: 'unu minuto',
+ mm: '%d minutoj',
+ h: 'unu horo',
+ hh: '%d horoj',
+ d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
+ dd: '%d tagoj',
+ M: 'unu monato',
+ MM: '%d monatoj',
+ y: 'unu jaro',
+ yy: '%d jaroj',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}a/,
+ ordinal: '%da',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse$2 = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex$3 =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ hooks.defineLocale('es-do', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort$1[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex$3,
+ monthsShortRegex: monthsRegex$3,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse$2,
+ longMonthsParse: monthsParse$2,
+ shortMonthsParse: monthsParse$2,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY h:mm A',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortDot$1 =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse$3 = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex$4 =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ hooks.defineLocale('es-mx', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot$1;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort$2[m.month()];
+ } else {
+ return monthsShortDot$1[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex$4,
+ monthsShortRegex: monthsRegex$4,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse$3,
+ longMonthsParse: monthsParse$3,
+ shortMonthsParse: monthsParse$3,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ invalidDate: 'Fecha inválida',
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortDot$2 =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse$4 = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex$5 =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ hooks.defineLocale('es-us', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot$2;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort$3[m.month()];
+ } else {
+ return monthsShortDot$2[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex$5,
+ monthsShortRegex: monthsRegex$5,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse$4,
+ longMonthsParse: monthsParse$4,
+ shortMonthsParse: monthsParse$4,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'MM/DD/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY h:mm A',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortDot$3 =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort$4 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse$5 = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex$6 =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+ hooks.defineLocale('es', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot$3;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort$4[m.month()];
+ } else {
+ return monthsShortDot$3[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex$6,
+ monthsShortRegex: monthsRegex$6,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse$5,
+ longMonthsParse: monthsParse$5,
+ shortMonthsParse: monthsParse$5,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ invalidDate: 'Fecha inválida',
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$3(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
+ ss: [number + 'sekundi', number + 'sekundit'],
+ m: ['ühe minuti', 'üks minut'],
+ mm: [number + ' minuti', number + ' minutit'],
+ h: ['ühe tunni', 'tund aega', 'üks tund'],
+ hh: [number + ' tunni', number + ' tundi'],
+ d: ['ühe päeva', 'üks päev'],
+ M: ['kuu aja', 'kuu aega', 'üks kuu'],
+ MM: [number + ' kuu', number + ' kuud'],
+ y: ['ühe aasta', 'aasta', 'üks aasta'],
+ yy: [number + ' aasta', number + ' aastat'],
+ };
+ if (withoutSuffix) {
+ return format[key][2] ? format[key][2] : format[key][1];
+ }
+ return isFuture ? format[key][0] : format[key][1];
+ }
+
+ hooks.defineLocale('et', {
+ months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
+ weekdays:
+ 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
+ '_'
+ ),
+ weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
+ weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Täna,] LT',
+ nextDay: '[Homme,] LT',
+ nextWeek: '[Järgmine] dddd LT',
+ lastDay: '[Eile,] LT',
+ lastWeek: '[Eelmine] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s pärast',
+ past: '%s tagasi',
+ s: processRelativeTime$3,
+ ss: processRelativeTime$3,
+ m: processRelativeTime$3,
+ mm: processRelativeTime$3,
+ h: processRelativeTime$3,
+ hh: processRelativeTime$3,
+ d: processRelativeTime$3,
+ dd: '%d päeva',
+ M: processRelativeTime$3,
+ MM: processRelativeTime$3,
+ y: processRelativeTime$3,
+ yy: processRelativeTime$3,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('eu', {
+ months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
+ '_'
+ ),
+ monthsShort:
+ 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
+ '_'
+ ),
+ weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
+ weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY[ko] MMMM[ren] D[a]',
+ LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
+ LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
+ l: 'YYYY-M-D',
+ ll: 'YYYY[ko] MMM D[a]',
+ lll: 'YYYY[ko] MMM D[a] HH:mm',
+ llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',
+ },
+ calendar: {
+ sameDay: '[gaur] LT[etan]',
+ nextDay: '[bihar] LT[etan]',
+ nextWeek: 'dddd LT[etan]',
+ lastDay: '[atzo] LT[etan]',
+ lastWeek: '[aurreko] dddd LT[etan]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s barru',
+ past: 'duela %s',
+ s: 'segundo batzuk',
+ ss: '%d segundo',
+ m: 'minutu bat',
+ mm: '%d minutu',
+ h: 'ordu bat',
+ hh: '%d ordu',
+ d: 'egun bat',
+ dd: '%d egun',
+ M: 'hilabete bat',
+ MM: '%d hilabete',
+ y: 'urte bat',
+ yy: '%d urte',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$6 = {
+ 1: '۱',
+ 2: '۲',
+ 3: '۳',
+ 4: '۴',
+ 5: '۵',
+ 6: '۶',
+ 7: '۷',
+ 8: '۸',
+ 9: '۹',
+ 0: '۰',
+ },
+ numberMap$5 = {
+ '۱': '1',
+ '۲': '2',
+ '۳': '3',
+ '۴': '4',
+ '۵': '5',
+ '۶': '6',
+ '۷': '7',
+ '۸': '8',
+ '۹': '9',
+ '۰': '0',
+ };
+
+ hooks.defineLocale('fa', {
+ months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
+ '_'
+ ),
+ weekdays:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
+ weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /قبل از ظهر|بعد از ظهر/,
+ isPM: function (input) {
+ return /بعد از ظهر/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'قبل از ظهر';
+ } else {
+ return 'بعد از ظهر';
+ }
+ },
+ calendar: {
+ sameDay: '[امروز ساعت] LT',
+ nextDay: '[فردا ساعت] LT',
+ nextWeek: 'dddd [ساعت] LT',
+ lastDay: '[دیروز ساعت] LT',
+ lastWeek: 'dddd [پیش] [ساعت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'در %s',
+ past: '%s پیش',
+ s: 'چند ثانیه',
+ ss: '%d ثانیه',
+ m: 'یک دقیقه',
+ mm: '%d دقیقه',
+ h: 'یک ساعت',
+ hh: '%d ساعت',
+ d: 'یک روز',
+ dd: '%d روز',
+ M: 'یک ماه',
+ MM: '%d ماه',
+ y: 'یک سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[۰-۹]/g, function (match) {
+ return numberMap$5[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap$6[match];
+ })
+ .replace(/,/g, '،');
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}م/,
+ ordinal: '%dم',
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var numbersPast =
+ 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
+ ' '
+ ),
+ numbersFuture = [
+ 'nolla',
+ 'yhden',
+ 'kahden',
+ 'kolmen',
+ 'neljän',
+ 'viiden',
+ 'kuuden',
+ numbersPast[7],
+ numbersPast[8],
+ numbersPast[9],
+ ];
+ function translate$2(number, withoutSuffix, key, isFuture) {
+ var result = '';
+ switch (key) {
+ case 's':
+ return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
+ case 'ss':
+ result = isFuture ? 'sekunnin' : 'sekuntia';
+ break;
+ case 'm':
+ return isFuture ? 'minuutin' : 'minuutti';
+ case 'mm':
+ result = isFuture ? 'minuutin' : 'minuuttia';
+ break;
+ case 'h':
+ return isFuture ? 'tunnin' : 'tunti';
+ case 'hh':
+ result = isFuture ? 'tunnin' : 'tuntia';
+ break;
+ case 'd':
+ return isFuture ? 'päivän' : 'päivä';
+ case 'dd':
+ result = isFuture ? 'päivän' : 'päivää';
+ break;
+ case 'M':
+ return isFuture ? 'kuukauden' : 'kuukausi';
+ case 'MM':
+ result = isFuture ? 'kuukauden' : 'kuukautta';
+ break;
+ case 'y':
+ return isFuture ? 'vuoden' : 'vuosi';
+ case 'yy':
+ result = isFuture ? 'vuoden' : 'vuotta';
+ break;
+ }
+ result = verbalNumber(number, isFuture) + ' ' + result;
+ return result;
+ }
+ function verbalNumber(number, isFuture) {
+ return number < 10
+ ? isFuture
+ ? numbersFuture[number]
+ : numbersPast[number]
+ : number;
+ }
+
+ hooks.defineLocale('fi', {
+ months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
+ '_'
+ ),
+ monthsShort:
+ 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
+ '_'
+ ),
+ weekdays:
+ 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
+ '_'
+ ),
+ weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
+ weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD.MM.YYYY',
+ LL: 'Do MMMM[ta] YYYY',
+ LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
+ LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
+ l: 'D.M.YYYY',
+ ll: 'Do MMM YYYY',
+ lll: 'Do MMM YYYY, [klo] HH.mm',
+ llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
+ },
+ calendar: {
+ sameDay: '[tänään] [klo] LT',
+ nextDay: '[huomenna] [klo] LT',
+ nextWeek: 'dddd [klo] LT',
+ lastDay: '[eilen] [klo] LT',
+ lastWeek: '[viime] dddd[na] [klo] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s päästä',
+ past: '%s sitten',
+ s: translate$2,
+ ss: translate$2,
+ m: translate$2,
+ mm: translate$2,
+ h: translate$2,
+ hh: translate$2,
+ d: translate$2,
+ dd: translate$2,
+ M: translate$2,
+ MM: translate$2,
+ y: translate$2,
+ yy: translate$2,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('fil', {
+ months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
+ '_'
+ ),
+ monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+ weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+ weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'MM/D/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY HH:mm',
+ LLLL: 'dddd, MMMM DD, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: 'LT [ngayong araw]',
+ nextDay: '[Bukas ng] LT',
+ nextWeek: 'LT [sa susunod na] dddd',
+ lastDay: 'LT [kahapon]',
+ lastWeek: 'LT [noong nakaraang] dddd',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'sa loob ng %s',
+ past: '%s ang nakalipas',
+ s: 'ilang segundo',
+ ss: '%d segundo',
+ m: 'isang minuto',
+ mm: '%d minuto',
+ h: 'isang oras',
+ hh: '%d oras',
+ d: 'isang araw',
+ dd: '%d araw',
+ M: 'isang buwan',
+ MM: '%d buwan',
+ y: 'isang taon',
+ yy: '%d taon',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('fo', {
+ months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
+ weekdays:
+ 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
+ '_'
+ ),
+ weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
+ weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D. MMMM, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Í dag kl.] LT',
+ nextDay: '[Í morgin kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[Í gjár kl.] LT',
+ lastWeek: '[síðstu] dddd [kl] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'um %s',
+ past: '%s síðani',
+ s: 'fá sekund',
+ ss: '%d sekundir',
+ m: 'ein minuttur',
+ mm: '%d minuttir',
+ h: 'ein tími',
+ hh: '%d tímar',
+ d: 'ein dagur',
+ dd: '%d dagar',
+ M: 'ein mánaður',
+ MM: '%d mánaðir',
+ y: 'eitt ár',
+ yy: '%d ár',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('fr-ca', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'D':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('fr-ch', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'D':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsStrictRegex$1 =
+ /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsShortStrictRegex$1 =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
+ monthsRegex$7 =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsParse$6 = [
+ /^janv/i,
+ /^févr/i,
+ /^mars/i,
+ /^avr/i,
+ /^mai/i,
+ /^juin/i,
+ /^juil/i,
+ /^août/i,
+ /^sept/i,
+ /^oct/i,
+ /^nov/i,
+ /^déc/i,
+ ];
+
+ hooks.defineLocale('fr', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsRegex: monthsRegex$7,
+ monthsShortRegex: monthsRegex$7,
+ monthsStrictRegex: monthsStrictRegex$1,
+ monthsShortStrictRegex: monthsShortStrictRegex$1,
+ monthsParse: monthsParse$6,
+ longMonthsParse: monthsParse$6,
+ shortMonthsParse: monthsParse$6,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ w: 'une semaine',
+ ww: '%d semaines',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // TODO: Return 'e' when day of month > 1. Move this case inside
+ // block for masculine words below.
+ // See https://github.com/moment/moment/issues/3375
+ case 'D':
+ return number + (number === 1 ? 'er' : '');
+
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
+
+ hooks.defineLocale('fy', {
+ months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots[m.month()];
+ } else {
+ return monthsShortWithDots[m.month()];
+ }
+ },
+ monthsParseExact: true,
+ weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
+ '_'
+ ),
+ weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
+ weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[hjoed om] LT',
+ nextDay: '[moarn om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[juster om] LT',
+ lastWeek: '[ôfrûne] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'oer %s',
+ past: '%s lyn',
+ s: 'in pear sekonden',
+ ss: '%d sekonden',
+ m: 'ien minút',
+ mm: '%d minuten',
+ h: 'ien oere',
+ hh: '%d oeren',
+ d: 'ien dei',
+ dd: '%d dagen',
+ M: 'ien moanne',
+ MM: '%d moannen',
+ y: 'ien jier',
+ yy: '%d jierren',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$6 = [
+ 'Eanáir',
+ 'Feabhra',
+ 'Márta',
+ 'Aibreán',
+ 'Bealtaine',
+ 'Meitheamh',
+ 'Iúil',
+ 'Lúnasa',
+ 'Meán Fómhair',
+ 'Deireadh Fómhair',
+ 'Samhain',
+ 'Nollaig',
+ ],
+ monthsShort$5 = [
+ 'Ean',
+ 'Feabh',
+ 'Márt',
+ 'Aib',
+ 'Beal',
+ 'Meith',
+ 'Iúil',
+ 'Lún',
+ 'M.F.',
+ 'D.F.',
+ 'Samh',
+ 'Noll',
+ ],
+ weekdays$1 = [
+ 'Dé Domhnaigh',
+ 'Dé Luain',
+ 'Dé Máirt',
+ 'Dé Céadaoin',
+ 'Déardaoin',
+ 'Dé hAoine',
+ 'Dé Sathairn',
+ ],
+ weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
+ weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
+
+ hooks.defineLocale('ga', {
+ months: months$6,
+ monthsShort: monthsShort$5,
+ monthsParseExact: true,
+ weekdays: weekdays$1,
+ weekdaysShort: weekdaysShort,
+ weekdaysMin: weekdaysMin,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Inniu ag] LT',
+ nextDay: '[Amárach ag] LT',
+ nextWeek: 'dddd [ag] LT',
+ lastDay: '[Inné ag] LT',
+ lastWeek: 'dddd [seo caite] [ag] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'i %s',
+ past: '%s ó shin',
+ s: 'cúpla soicind',
+ ss: '%d soicind',
+ m: 'nóiméad',
+ mm: '%d nóiméad',
+ h: 'uair an chloig',
+ hh: '%d uair an chloig',
+ d: 'lá',
+ dd: '%d lá',
+ M: 'mí',
+ MM: '%d míonna',
+ y: 'bliain',
+ yy: '%d bliain',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$7 = [
+ 'Am Faoilleach',
+ 'An Gearran',
+ 'Am Màrt',
+ 'An Giblean',
+ 'An Cèitean',
+ 'An t-Ògmhios',
+ 'An t-Iuchar',
+ 'An Lùnastal',
+ 'An t-Sultain',
+ 'An Dàmhair',
+ 'An t-Samhain',
+ 'An Dùbhlachd',
+ ],
+ monthsShort$6 = [
+ 'Faoi',
+ 'Gear',
+ 'Màrt',
+ 'Gibl',
+ 'Cèit',
+ 'Ògmh',
+ 'Iuch',
+ 'Lùn',
+ 'Sult',
+ 'Dàmh',
+ 'Samh',
+ 'Dùbh',
+ ],
+ weekdays$2 = [
+ 'Didòmhnaich',
+ 'Diluain',
+ 'Dimàirt',
+ 'Diciadain',
+ 'Diardaoin',
+ 'Dihaoine',
+ 'Disathairne',
+ ],
+ weekdaysShort$1 = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
+ weekdaysMin$1 = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
+
+ hooks.defineLocale('gd', {
+ months: months$7,
+ monthsShort: monthsShort$6,
+ monthsParseExact: true,
+ weekdays: weekdays$2,
+ weekdaysShort: weekdaysShort$1,
+ weekdaysMin: weekdaysMin$1,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[An-diugh aig] LT',
+ nextDay: '[A-màireach aig] LT',
+ nextWeek: 'dddd [aig] LT',
+ lastDay: '[An-dè aig] LT',
+ lastWeek: 'dddd [seo chaidh] [aig] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ann an %s',
+ past: 'bho chionn %s',
+ s: 'beagan diogan',
+ ss: '%d diogan',
+ m: 'mionaid',
+ mm: '%d mionaidean',
+ h: 'uair',
+ hh: '%d uairean',
+ d: 'latha',
+ dd: '%d latha',
+ M: 'mìos',
+ MM: '%d mìosan',
+ y: 'bliadhna',
+ yy: '%d bliadhna',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('gl', {
+ months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
+ '_'
+ ),
+ monthsShort:
+ 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
+ },
+ lastDay: function () {
+ return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (str) {
+ if (str.indexOf('un') === 0) {
+ return 'n' + str;
+ }
+ return 'en ' + str;
+ },
+ past: 'hai %s',
+ s: 'uns segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'unha hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$4(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
+ ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
+ m: ['एका मिणटान', 'एक मिनूट'],
+ mm: [number + ' मिणटांनी', number + ' मिणटां'],
+ h: ['एका वरान', 'एक वर'],
+ hh: [number + ' वरांनी', number + ' वरां'],
+ d: ['एका दिसान', 'एक दीस'],
+ dd: [number + ' दिसांनी', number + ' दीस'],
+ M: ['एका म्हयन्यान', 'एक म्हयनो'],
+ MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
+ y: ['एका वर्सान', 'एक वर्स'],
+ yy: [number + ' वर्सांनी', number + ' वर्सां'],
+ };
+ return isFuture ? format[key][0] : format[key][1];
+ }
+
+ hooks.defineLocale('gom-deva', {
+ months: {
+ standalone:
+ 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
+ '_'
+ ),
+ format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
+ '_'
+ ),
+ isFormat: /MMMM(\s)+D[oD]?/,
+ },
+ monthsShort:
+ 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
+ weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
+ weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'A h:mm [वाजतां]',
+ LTS: 'A h:mm:ss [वाजतां]',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY A h:mm [वाजतां]',
+ LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
+ llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
+ },
+ calendar: {
+ sameDay: '[आयज] LT',
+ nextDay: '[फाल्यां] LT',
+ nextWeek: '[फुडलो] dddd[,] LT',
+ lastDay: '[काल] LT',
+ lastWeek: '[फाटलो] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s',
+ past: '%s आदीं',
+ s: processRelativeTime$4,
+ ss: processRelativeTime$4,
+ m: processRelativeTime$4,
+ mm: processRelativeTime$4,
+ h: processRelativeTime$4,
+ hh: processRelativeTime$4,
+ d: processRelativeTime$4,
+ dd: processRelativeTime$4,
+ M: processRelativeTime$4,
+ MM: processRelativeTime$4,
+ y: processRelativeTime$4,
+ yy: processRelativeTime$4,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // the ordinal 'वेर' only applies to day of the month
+ case 'D':
+ return number + 'वेर';
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ case 'w':
+ case 'W':
+ return number;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
+ },
+ meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'राती') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सकाळीं') {
+ return hour;
+ } else if (meridiem === 'दनपारां') {
+ return hour > 12 ? hour : hour + 12;
+ } else if (meridiem === 'सांजे') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'राती';
+ } else if (hour < 12) {
+ return 'सकाळीं';
+ } else if (hour < 16) {
+ return 'दनपारां';
+ } else if (hour < 20) {
+ return 'सांजे';
+ } else {
+ return 'राती';
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$5(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['thoddea sekondamni', 'thodde sekond'],
+ ss: [number + ' sekondamni', number + ' sekond'],
+ m: ['eka mintan', 'ek minut'],
+ mm: [number + ' mintamni', number + ' mintam'],
+ h: ['eka voran', 'ek vor'],
+ hh: [number + ' voramni', number + ' voram'],
+ d: ['eka disan', 'ek dis'],
+ dd: [number + ' disamni', number + ' dis'],
+ M: ['eka mhoinean', 'ek mhoino'],
+ MM: [number + ' mhoineamni', number + ' mhoine'],
+ y: ['eka vorsan', 'ek voros'],
+ yy: [number + ' vorsamni', number + ' vorsam'],
+ };
+ return isFuture ? format[key][0] : format[key][1];
+ }
+
+ hooks.defineLocale('gom-latn', {
+ months: {
+ standalone:
+ 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
+ '_'
+ ),
+ format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
+ '_'
+ ),
+ isFormat: /MMMM(\s)+D[oD]?/,
+ },
+ monthsShort:
+ 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
+ weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
+ weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'A h:mm [vazta]',
+ LTS: 'A h:mm:ss [vazta]',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY A h:mm [vazta]',
+ LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
+ llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
+ },
+ calendar: {
+ sameDay: '[Aiz] LT',
+ nextDay: '[Faleam] LT',
+ nextWeek: '[Fuddlo] dddd[,] LT',
+ lastDay: '[Kal] LT',
+ lastWeek: '[Fattlo] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s',
+ past: '%s adim',
+ s: processRelativeTime$5,
+ ss: processRelativeTime$5,
+ m: processRelativeTime$5,
+ mm: processRelativeTime$5,
+ h: processRelativeTime$5,
+ hh: processRelativeTime$5,
+ d: processRelativeTime$5,
+ dd: processRelativeTime$5,
+ M: processRelativeTime$5,
+ MM: processRelativeTime$5,
+ y: processRelativeTime$5,
+ yy: processRelativeTime$5,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // the ordinal 'er' only applies to day of the month
+ case 'D':
+ return number + 'er';
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ case 'w':
+ case 'W':
+ return number;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
+ },
+ meridiemParse: /rati|sokallim|donparam|sanje/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'rati') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'sokallim') {
+ return hour;
+ } else if (meridiem === 'donparam') {
+ return hour > 12 ? hour : hour + 12;
+ } else if (meridiem === 'sanje') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'rati';
+ } else if (hour < 12) {
+ return 'sokallim';
+ } else if (hour < 16) {
+ return 'donparam';
+ } else if (hour < 20) {
+ return 'sanje';
+ } else {
+ return 'rati';
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$7 = {
+ 1: '૧',
+ 2: '૨',
+ 3: '૩',
+ 4: '૪',
+ 5: '૫',
+ 6: '૬',
+ 7: '૭',
+ 8: '૮',
+ 9: '૯',
+ 0: '૦',
+ },
+ numberMap$6 = {
+ '૧': '1',
+ '૨': '2',
+ '૩': '3',
+ '૪': '4',
+ '૫': '5',
+ '૬': '6',
+ '૭': '7',
+ '૮': '8',
+ '૯': '9',
+ '૦': '0',
+ };
+
+ hooks.defineLocale('gu', {
+ months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
+ '_'
+ ),
+ monthsShort:
+ 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
+ '_'
+ ),
+ weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
+ weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm વાગ્યે',
+ LTS: 'A h:mm:ss વાગ્યે',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
+ },
+ calendar: {
+ sameDay: '[આજ] LT',
+ nextDay: '[કાલે] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ગઇકાલે] LT',
+ lastWeek: '[પાછલા] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s મા',
+ past: '%s પહેલા',
+ s: 'અમુક પળો',
+ ss: '%d સેકંડ',
+ m: 'એક મિનિટ',
+ mm: '%d મિનિટ',
+ h: 'એક કલાક',
+ hh: '%d કલાક',
+ d: 'એક દિવસ',
+ dd: '%d દિવસ',
+ M: 'એક મહિનો',
+ MM: '%d મહિનો',
+ y: 'એક વર્ષ',
+ yy: '%d વર્ષ',
+ },
+ preparse: function (string) {
+ return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
+ return numberMap$6[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$7[match];
+ });
+ },
+ // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
+ meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'રાત') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'સવાર') {
+ return hour;
+ } else if (meridiem === 'બપોર') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'સાંજ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'રાત';
+ } else if (hour < 10) {
+ return 'સવાર';
+ } else if (hour < 17) {
+ return 'બપોર';
+ } else if (hour < 20) {
+ return 'સાંજ';
+ } else {
+ return 'રાત';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('he', {
+ months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
+ weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
+ weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
+ weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [ב]MMMM YYYY',
+ LLL: 'D [ב]MMMM YYYY HH:mm',
+ LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
+ l: 'D/M/YYYY',
+ ll: 'D MMM YYYY',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd, D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[היום ב־]LT',
+ nextDay: '[מחר ב־]LT',
+ nextWeek: 'dddd [בשעה] LT',
+ lastDay: '[אתמול ב־]LT',
+ lastWeek: '[ביום] dddd [האחרון בשעה] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'בעוד %s',
+ past: 'לפני %s',
+ s: 'מספר שניות',
+ ss: '%d שניות',
+ m: 'דקה',
+ mm: '%d דקות',
+ h: 'שעה',
+ hh: function (number) {
+ if (number === 2) {
+ return 'שעתיים';
+ }
+ return number + ' שעות';
+ },
+ d: 'יום',
+ dd: function (number) {
+ if (number === 2) {
+ return 'יומיים';
+ }
+ return number + ' ימים';
+ },
+ M: 'חודש',
+ MM: function (number) {
+ if (number === 2) {
+ return 'חודשיים';
+ }
+ return number + ' חודשים';
+ },
+ y: 'שנה',
+ yy: function (number) {
+ if (number === 2) {
+ return 'שנתיים';
+ } else if (number % 10 === 0 && number !== 10) {
+ return number + ' שנה';
+ }
+ return number + ' שנים';
+ },
+ },
+ meridiemParse:
+ /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
+ isPM: function (input) {
+ return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 5) {
+ return 'לפנות בוקר';
+ } else if (hour < 10) {
+ return 'בבוקר';
+ } else if (hour < 12) {
+ return isLower ? 'לפנה"צ' : 'לפני הצהריים';
+ } else if (hour < 18) {
+ return isLower ? 'אחה"צ' : 'אחרי הצהריים';
+ } else {
+ return 'בערב';
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$8 = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap$7 = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ },
+ monthsParse$7 = [
+ /^जन/i,
+ /^फ़र|फर/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सितं|सित/i,
+ /^अक्टू/i,
+ /^नव|नवं/i,
+ /^दिसं|दिस/i,
+ ],
+ shortMonthsParse = [
+ /^जन/i,
+ /^फ़र/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सित/i,
+ /^अक्टू/i,
+ /^नव/i,
+ /^दिस/i,
+ ];
+
+ hooks.defineLocale('hi', {
+ months: {
+ format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
+ '_'
+ ),
+ standalone:
+ 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
+ weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm बजे',
+ LTS: 'A h:mm:ss बजे',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm बजे',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
+ },
+
+ monthsParse: monthsParse$7,
+ longMonthsParse: monthsParse$7,
+ shortMonthsParse: shortMonthsParse,
+
+ monthsRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsShortRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsStrictRegex:
+ /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
+
+ monthsShortStrictRegex:
+ /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
+
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[कल] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[कल] LT',
+ lastWeek: '[पिछले] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s में',
+ past: '%s पहले',
+ s: 'कुछ ही क्षण',
+ ss: '%d सेकंड',
+ m: 'एक मिनट',
+ mm: '%d मिनट',
+ h: 'एक घंटा',
+ hh: '%d घंटे',
+ d: 'एक दिन',
+ dd: '%d दिन',
+ M: 'एक महीने',
+ MM: '%d महीने',
+ y: 'एक वर्ष',
+ yy: '%d वर्ष',
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap$7[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$8[match];
+ });
+ },
+ // Hindi notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
+ meridiemParse: /रात|सुबह|दोपहर|शाम/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'रात') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सुबह') {
+ return hour;
+ } else if (meridiem === 'दोपहर') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'शाम') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'रात';
+ } else if (hour < 10) {
+ return 'सुबह';
+ } else if (hour < 17) {
+ return 'दोपहर';
+ } else if (hour < 20) {
+ return 'शाम';
+ } else {
+ return 'रात';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function translate$3(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ if (number === 1) {
+ result += 'sekunda';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sekunde';
+ } else {
+ result += 'sekundi';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
+ }
+ }
+
+ hooks.defineLocale('hr', {
+ months: {
+ format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
+ '_'
+ ),
+ standalone:
+ 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'Do MMMM YYYY',
+ LLL: 'Do MMMM YYYY H:mm',
+ LLLL: 'dddd, Do MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[jučer u] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[prošlu] [nedjelju] [u] LT';
+ case 3:
+ return '[prošlu] [srijedu] [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'par sekundi',
+ ss: translate$3,
+ m: translate$3,
+ mm: translate$3,
+ h: translate$3,
+ hh: translate$3,
+ d: 'dan',
+ dd: translate$3,
+ M: 'mjesec',
+ MM: translate$3,
+ y: 'godinu',
+ yy: translate$3,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var weekEndings =
+ 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
+ function translate$4(number, withoutSuffix, key, isFuture) {
+ var num = number;
+ switch (key) {
+ case 's':
+ return isFuture || withoutSuffix
+ ? 'néhány másodperc'
+ : 'néhány másodperce';
+ case 'ss':
+ return num + (isFuture || withoutSuffix)
+ ? ' másodperc'
+ : ' másodperce';
+ case 'm':
+ return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'mm':
+ return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'h':
+ return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'hh':
+ return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'd':
+ return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'dd':
+ return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'M':
+ return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'MM':
+ return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'y':
+ return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
+ case 'yy':
+ return num + (isFuture || withoutSuffix ? ' év' : ' éve');
+ }
+ return '';
+ }
+ function week(isFuture) {
+ return (
+ (isFuture ? '' : '[múlt] ') +
+ '[' +
+ weekEndings[this.day()] +
+ '] LT[-kor]'
+ );
+ }
+
+ hooks.defineLocale('hu', {
+ months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
+ weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
+ weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'YYYY.MM.DD.',
+ LL: 'YYYY. MMMM D.',
+ LLL: 'YYYY. MMMM D. H:mm',
+ LLLL: 'YYYY. MMMM D., dddd H:mm',
+ },
+ meridiemParse: /de|du/i,
+ isPM: function (input) {
+ return input.charAt(1).toLowerCase() === 'u';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower === true ? 'de' : 'DE';
+ } else {
+ return isLower === true ? 'du' : 'DU';
+ }
+ },
+ calendar: {
+ sameDay: '[ma] LT[-kor]',
+ nextDay: '[holnap] LT[-kor]',
+ nextWeek: function () {
+ return week.call(this, true);
+ },
+ lastDay: '[tegnap] LT[-kor]',
+ lastWeek: function () {
+ return week.call(this, false);
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s múlva',
+ past: '%s',
+ s: translate$4,
+ ss: translate$4,
+ m: translate$4,
+ mm: translate$4,
+ h: translate$4,
+ hh: translate$4,
+ d: translate$4,
+ dd: translate$4,
+ M: translate$4,
+ MM: translate$4,
+ y: translate$4,
+ yy: translate$4,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('hy-am', {
+ months: {
+ format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
+ '_'
+ ),
+ standalone:
+ 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
+ weekdays:
+ 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
+ '_'
+ ),
+ weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+ weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY թ.',
+ LLL: 'D MMMM YYYY թ., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY թ., HH:mm',
+ },
+ calendar: {
+ sameDay: '[այսօր] LT',
+ nextDay: '[վաղը] LT',
+ lastDay: '[երեկ] LT',
+ nextWeek: function () {
+ return 'dddd [օրը ժամը] LT';
+ },
+ lastWeek: function () {
+ return '[անցած] dddd [օրը ժամը] LT';
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s հետո',
+ past: '%s առաջ',
+ s: 'մի քանի վայրկյան',
+ ss: '%d վայրկյան',
+ m: 'րոպե',
+ mm: '%d րոպե',
+ h: 'ժամ',
+ hh: '%d ժամ',
+ d: 'օր',
+ dd: '%d օր',
+ M: 'ամիս',
+ MM: '%d ամիս',
+ y: 'տարի',
+ yy: '%d տարի',
+ },
+ meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
+ isPM: function (input) {
+ return /^(ցերեկվա|երեկոյան)$/.test(input);
+ },
+ meridiem: function (hour) {
+ if (hour < 4) {
+ return 'գիշերվա';
+ } else if (hour < 12) {
+ return 'առավոտվա';
+ } else if (hour < 17) {
+ return 'ցերեկվա';
+ } else {
+ return 'երեկոյան';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'DDD':
+ case 'w':
+ case 'W':
+ case 'DDDo':
+ if (number === 1) {
+ return number + '-ին';
+ }
+ return number + '-րդ';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('id', {
+ months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
+ weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
+ weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
+ weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|siang|sore|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'siang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sore' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'siang';
+ } else if (hours < 19) {
+ return 'sore';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Besok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kemarin pukul] LT',
+ lastWeek: 'dddd [lalu pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lalu',
+ s: 'beberapa detik',
+ ss: '%d detik',
+ m: 'semenit',
+ mm: '%d menit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function plural$2(n) {
+ if (n % 100 === 11) {
+ return true;
+ } else if (n % 10 === 1) {
+ return false;
+ }
+ return true;
+ }
+ function translate$5(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's':
+ return withoutSuffix || isFuture
+ ? 'nokkrar sekúndur'
+ : 'nokkrum sekúndum';
+ case 'ss':
+ if (plural$2(number)) {
+ return (
+ result +
+ (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
+ );
+ }
+ return result + 'sekúnda';
+ case 'm':
+ return withoutSuffix ? 'mínúta' : 'mínútu';
+ case 'mm':
+ if (plural$2(number)) {
+ return (
+ result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
+ );
+ } else if (withoutSuffix) {
+ return result + 'mínúta';
+ }
+ return result + 'mínútu';
+ case 'hh':
+ if (plural$2(number)) {
+ return (
+ result +
+ (withoutSuffix || isFuture
+ ? 'klukkustundir'
+ : 'klukkustundum')
+ );
+ }
+ return result + 'klukkustund';
+ case 'd':
+ if (withoutSuffix) {
+ return 'dagur';
+ }
+ return isFuture ? 'dag' : 'degi';
+ case 'dd':
+ if (plural$2(number)) {
+ if (withoutSuffix) {
+ return result + 'dagar';
+ }
+ return result + (isFuture ? 'daga' : 'dögum');
+ } else if (withoutSuffix) {
+ return result + 'dagur';
+ }
+ return result + (isFuture ? 'dag' : 'degi');
+ case 'M':
+ if (withoutSuffix) {
+ return 'mánuður';
+ }
+ return isFuture ? 'mánuð' : 'mánuði';
+ case 'MM':
+ if (plural$2(number)) {
+ if (withoutSuffix) {
+ return result + 'mánuðir';
+ }
+ return result + (isFuture ? 'mánuði' : 'mánuðum');
+ } else if (withoutSuffix) {
+ return result + 'mánuður';
+ }
+ return result + (isFuture ? 'mánuð' : 'mánuði');
+ case 'y':
+ return withoutSuffix || isFuture ? 'ár' : 'ári';
+ case 'yy':
+ if (plural$2(number)) {
+ return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
+ }
+ return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
+ }
+ }
+
+ hooks.defineLocale('is', {
+ months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
+ weekdays:
+ 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
+ '_'
+ ),
+ weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
+ weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] H:mm',
+ LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
+ },
+ calendar: {
+ sameDay: '[í dag kl.] LT',
+ nextDay: '[á morgun kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[í gær kl.] LT',
+ lastWeek: '[síðasta] dddd [kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'eftir %s',
+ past: 'fyrir %s síðan',
+ s: translate$5,
+ ss: translate$5,
+ m: translate$5,
+ mm: translate$5,
+ h: 'klukkustund',
+ hh: translate$5,
+ d: translate$5,
+ dd: translate$5,
+ M: translate$5,
+ MM: translate$5,
+ y: translate$5,
+ yy: translate$5,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('it-ch', {
+ months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
+ '_'
+ ),
+ monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+ weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
+ weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Oggi alle] LT',
+ nextDay: '[Domani alle] LT',
+ nextWeek: 'dddd [alle] LT',
+ lastDay: '[Ieri alle] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[la scorsa] dddd [alle] LT';
+ default:
+ return '[lo scorso] dddd [alle] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (s) {
+ return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
+ },
+ past: '%s fa',
+ s: 'alcuni secondi',
+ ss: '%d secondi',
+ m: 'un minuto',
+ mm: '%d minuti',
+ h: "un'ora",
+ hh: '%d ore',
+ d: 'un giorno',
+ dd: '%d giorni',
+ M: 'un mese',
+ MM: '%d mesi',
+ y: 'un anno',
+ yy: '%d anni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('it', {
+ months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
+ '_'
+ ),
+ monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+ weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
+ weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return (
+ '[Oggi a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ nextDay: function () {
+ return (
+ '[Domani a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ nextWeek: function () {
+ return (
+ 'dddd [a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ lastDay: function () {
+ return (
+ '[Ieri a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return (
+ '[La scorsa] dddd [a' +
+ (this.hours() > 1
+ ? 'lle '
+ : this.hours() === 0
+ ? ' '
+ : "ll'") +
+ ']LT'
+ );
+ default:
+ return (
+ '[Lo scorso] dddd [a' +
+ (this.hours() > 1
+ ? 'lle '
+ : this.hours() === 0
+ ? ' '
+ : "ll'") +
+ ']LT'
+ );
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'tra %s',
+ past: '%s fa',
+ s: 'alcuni secondi',
+ ss: '%d secondi',
+ m: 'un minuto',
+ mm: '%d minuti',
+ h: "un'ora",
+ hh: '%d ore',
+ d: 'un giorno',
+ dd: '%d giorni',
+ w: 'una settimana',
+ ww: '%d settimane',
+ M: 'un mese',
+ MM: '%d mesi',
+ y: 'un anno',
+ yy: '%d anni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ja', {
+ eras: [
+ {
+ since: '2019-05-01',
+ offset: 1,
+ name: '令和',
+ narrow: '㋿',
+ abbr: 'R',
+ },
+ {
+ since: '1989-01-08',
+ until: '2019-04-30',
+ offset: 1,
+ name: '平成',
+ narrow: '㍻',
+ abbr: 'H',
+ },
+ {
+ since: '1926-12-25',
+ until: '1989-01-07',
+ offset: 1,
+ name: '昭和',
+ narrow: '㍼',
+ abbr: 'S',
+ },
+ {
+ since: '1912-07-30',
+ until: '1926-12-24',
+ offset: 1,
+ name: '大正',
+ narrow: '㍽',
+ abbr: 'T',
+ },
+ {
+ since: '1873-01-01',
+ until: '1912-07-29',
+ offset: 6,
+ name: '明治',
+ narrow: '㍾',
+ abbr: 'M',
+ },
+ {
+ since: '0001-01-01',
+ until: '1873-12-31',
+ offset: 1,
+ name: '西暦',
+ narrow: 'AD',
+ abbr: 'AD',
+ },
+ {
+ since: '0000-12-31',
+ until: -Infinity,
+ offset: 1,
+ name: '紀元前',
+ narrow: 'BC',
+ abbr: 'BC',
+ },
+ ],
+ eraYearOrdinalRegex: /(元|\d+)年/,
+ eraYearOrdinalParse: function (input, match) {
+ return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
+ },
+ months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
+ weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
+ weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日 dddd HH:mm',
+ l: 'YYYY/MM/DD',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日(ddd) HH:mm',
+ },
+ meridiemParse: /午前|午後/i,
+ isPM: function (input) {
+ return input === '午後';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return '午前';
+ } else {
+ return '午後';
+ }
+ },
+ calendar: {
+ sameDay: '[今日] LT',
+ nextDay: '[明日] LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ return '[来週]dddd LT';
+ } else {
+ return 'dddd LT';
+ }
+ },
+ lastDay: '[昨日] LT',
+ lastWeek: function (now) {
+ if (this.week() !== now.week()) {
+ return '[先週]dddd LT';
+ } else {
+ return 'dddd LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}日/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'y':
+ return number === 1 ? '元年' : number + '年';
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '数秒',
+ ss: '%d秒',
+ m: '1分',
+ mm: '%d分',
+ h: '1時間',
+ hh: '%d時間',
+ d: '1日',
+ dd: '%d日',
+ M: '1ヶ月',
+ MM: '%dヶ月',
+ y: '1年',
+ yy: '%d年',
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('jv', {
+ months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
+ weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
+ weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
+ weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /enjing|siyang|sonten|ndalu/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'enjing') {
+ return hour;
+ } else if (meridiem === 'siyang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'enjing';
+ } else if (hours < 15) {
+ return 'siyang';
+ } else if (hours < 19) {
+ return 'sonten';
+ } else {
+ return 'ndalu';
+ }
+ },
+ calendar: {
+ sameDay: '[Dinten puniko pukul] LT',
+ nextDay: '[Mbenjang pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kala wingi pukul] LT',
+ lastWeek: 'dddd [kepengker pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'wonten ing %s',
+ past: '%s ingkang kepengker',
+ s: 'sawetawis detik',
+ ss: '%d detik',
+ m: 'setunggal menit',
+ mm: '%d menit',
+ h: 'setunggal jam',
+ hh: '%d jam',
+ d: 'sedinten',
+ dd: '%d dinten',
+ M: 'sewulan',
+ MM: '%d wulan',
+ y: 'setaun',
+ yy: '%d taun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ka', {
+ months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
+ '_'
+ ),
+ monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
+ weekdays: {
+ standalone:
+ 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
+ '_'
+ ),
+ format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
+ '_'
+ ),
+ isFormat: /(წინა|შემდეგ)/,
+ },
+ weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
+ weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[დღეს] LT[-ზე]',
+ nextDay: '[ხვალ] LT[-ზე]',
+ lastDay: '[გუშინ] LT[-ზე]',
+ nextWeek: '[შემდეგ] dddd LT[-ზე]',
+ lastWeek: '[წინა] dddd LT-ზე',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (s) {
+ return s.replace(
+ /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,
+ function ($0, $1, $2) {
+ return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
+ }
+ );
+ },
+ past: function (s) {
+ if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
+ return s.replace(/(ი|ე)$/, 'ის წინ');
+ }
+ if (/წელი/.test(s)) {
+ return s.replace(/წელი$/, 'წლის წინ');
+ }
+ return s;
+ },
+ s: 'რამდენიმე წამი',
+ ss: '%d წამი',
+ m: 'წუთი',
+ mm: '%d წუთი',
+ h: 'საათი',
+ hh: '%d საათი',
+ d: 'დღე',
+ dd: '%d დღე',
+ M: 'თვე',
+ MM: '%d თვე',
+ y: 'წელი',
+ yy: '%d წელი',
+ },
+ dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
+ ordinal: function (number) {
+ if (number === 0) {
+ return number;
+ }
+ if (number === 1) {
+ return number + '-ლი';
+ }
+ if (
+ number < 20 ||
+ (number <= 100 && number % 20 === 0) ||
+ number % 100 === 0
+ ) {
+ return 'მე-' + number;
+ }
+ return number + '-ე';
+ },
+ week: {
+ dow: 1,
+ doy: 7,
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes$1 = {
+ 0: '-ші',
+ 1: '-ші',
+ 2: '-ші',
+ 3: '-ші',
+ 4: '-ші',
+ 5: '-ші',
+ 6: '-шы',
+ 7: '-ші',
+ 8: '-ші',
+ 9: '-шы',
+ 10: '-шы',
+ 20: '-шы',
+ 30: '-шы',
+ 40: '-шы',
+ 50: '-ші',
+ 60: '-шы',
+ 70: '-ші',
+ 80: '-ші',
+ 90: '-шы',
+ 100: '-ші',
+ };
+
+ hooks.defineLocale('kk', {
+ months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
+ '_'
+ ),
+ monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
+ weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
+ '_'
+ ),
+ weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
+ weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бүгін сағат] LT',
+ nextDay: '[Ертең сағат] LT',
+ nextWeek: 'dddd [сағат] LT',
+ lastDay: '[Кеше сағат] LT',
+ lastWeek: '[Өткен аптаның] dddd [сағат] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ішінде',
+ past: '%s бұрын',
+ s: 'бірнеше секунд',
+ ss: '%d секунд',
+ m: 'бір минут',
+ mm: '%d минут',
+ h: 'бір сағат',
+ hh: '%d сағат',
+ d: 'бір күн',
+ dd: '%d күн',
+ M: 'бір ай',
+ MM: '%d ай',
+ y: 'бір жыл',
+ yy: '%d жыл',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$9 = {
+ 1: '១',
+ 2: '២',
+ 3: '៣',
+ 4: '៤',
+ 5: '៥',
+ 6: '៦',
+ 7: '៧',
+ 8: '៨',
+ 9: '៩',
+ 0: '០',
+ },
+ numberMap$8 = {
+ '១': '1',
+ '២': '2',
+ '៣': '3',
+ '៤': '4',
+ '៥': '5',
+ '៦': '6',
+ '៧': '7',
+ '៨': '8',
+ '៩': '9',
+ '០': '0',
+ };
+
+ hooks.defineLocale('km', {
+ months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
+ '_'
+ ),
+ weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
+ weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
+ weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ព្រឹក|ល្ងាច/,
+ isPM: function (input) {
+ return input === 'ល្ងាច';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ព្រឹក';
+ } else {
+ return 'ល្ងាច';
+ }
+ },
+ calendar: {
+ sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
+ nextDay: '[ស្អែក ម៉ោង] LT',
+ nextWeek: 'dddd [ម៉ោង] LT',
+ lastDay: '[ម្សិលមិញ ម៉ោង] LT',
+ lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sទៀត',
+ past: '%sមុន',
+ s: 'ប៉ុន្មានវិនាទី',
+ ss: '%d វិនាទី',
+ m: 'មួយនាទី',
+ mm: '%d នាទី',
+ h: 'មួយម៉ោង',
+ hh: '%d ម៉ោង',
+ d: 'មួយថ្ងៃ',
+ dd: '%d ថ្ងៃ',
+ M: 'មួយខែ',
+ MM: '%d ខែ',
+ y: 'មួយឆ្នាំ',
+ yy: '%d ឆ្នាំ',
+ },
+ dayOfMonthOrdinalParse: /ទី\d{1,2}/,
+ ordinal: 'ទី%d',
+ preparse: function (string) {
+ return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
+ return numberMap$8[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$9[match];
+ });
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$a = {
+ 1: '೧',
+ 2: '೨',
+ 3: '೩',
+ 4: '೪',
+ 5: '೫',
+ 6: '೬',
+ 7: '೭',
+ 8: '೮',
+ 9: '೯',
+ 0: '೦',
+ },
+ numberMap$9 = {
+ '೧': '1',
+ '೨': '2',
+ '೩': '3',
+ '೪': '4',
+ '೫': '5',
+ '೬': '6',
+ '೭': '7',
+ '೮': '8',
+ '೯': '9',
+ '೦': '0',
+ };
+
+ hooks.defineLocale('kn', {
+ months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
+ '_'
+ ),
+ weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
+ weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[ಇಂದು] LT',
+ nextDay: '[ನಾಳೆ] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ನಿನ್ನೆ] LT',
+ lastWeek: '[ಕೊನೆಯ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ನಂತರ',
+ past: '%s ಹಿಂದೆ',
+ s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
+ ss: '%d ಸೆಕೆಂಡುಗಳು',
+ m: 'ಒಂದು ನಿಮಿಷ',
+ mm: '%d ನಿಮಿಷ',
+ h: 'ಒಂದು ಗಂಟೆ',
+ hh: '%d ಗಂಟೆ',
+ d: 'ಒಂದು ದಿನ',
+ dd: '%d ದಿನ',
+ M: 'ಒಂದು ತಿಂಗಳು',
+ MM: '%d ತಿಂಗಳು',
+ y: 'ಒಂದು ವರ್ಷ',
+ yy: '%d ವರ್ಷ',
+ },
+ preparse: function (string) {
+ return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
+ return numberMap$9[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$a[match];
+ });
+ },
+ meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ರಾತ್ರಿ') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
+ return hour;
+ } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'ಸಂಜೆ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ರಾತ್ರಿ';
+ } else if (hour < 10) {
+ return 'ಬೆಳಿಗ್ಗೆ';
+ } else if (hour < 17) {
+ return 'ಮಧ್ಯಾಹ್ನ';
+ } else if (hour < 20) {
+ return 'ಸಂಜೆ';
+ } else {
+ return 'ರಾತ್ರಿ';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
+ ordinal: function (number) {
+ return number + 'ನೇ';
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ko', {
+ months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
+ monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
+ '_'
+ ),
+ weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
+ weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
+ weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'YYYY.MM.DD.',
+ LL: 'YYYY년 MMMM D일',
+ LLL: 'YYYY년 MMMM D일 A h:mm',
+ LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
+ l: 'YYYY.MM.DD.',
+ ll: 'YYYY년 MMMM D일',
+ lll: 'YYYY년 MMMM D일 A h:mm',
+ llll: 'YYYY년 MMMM D일 dddd A h:mm',
+ },
+ calendar: {
+ sameDay: '오늘 LT',
+ nextDay: '내일 LT',
+ nextWeek: 'dddd LT',
+ lastDay: '어제 LT',
+ lastWeek: '지난주 dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s 후',
+ past: '%s 전',
+ s: '몇 초',
+ ss: '%d초',
+ m: '1분',
+ mm: '%d분',
+ h: '한 시간',
+ hh: '%d시간',
+ d: '하루',
+ dd: '%d일',
+ M: '한 달',
+ MM: '%d달',
+ y: '일 년',
+ yy: '%d년',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '일';
+ case 'M':
+ return number + '월';
+ case 'w':
+ case 'W':
+ return number + '주';
+ default:
+ return number;
+ }
+ },
+ meridiemParse: /오전|오후/,
+ isPM: function (token) {
+ return token === '오후';
+ },
+ meridiem: function (hour, minute, isUpper) {
+ return hour < 12 ? '오전' : '오후';
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$b = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap$a = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ },
+ months$8 = [
+ 'کانونی دووەم',
+ 'شوبات',
+ 'ئازار',
+ 'نیسان',
+ 'ئایار',
+ 'حوزەیران',
+ 'تەمموز',
+ 'ئاب',
+ 'ئەیلوول',
+ 'تشرینی یەكەم',
+ 'تشرینی دووەم',
+ 'كانونی یەکەم',
+ ];
+
+ hooks.defineLocale('ku', {
+ months: months$8,
+ monthsShort: months$8,
+ weekdays:
+ 'یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه'.split('_'),
+ weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ئێواره|بهیانی/,
+ isPM: function (input) {
+ return /ئێواره/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'بهیانی';
+ } else {
+ return 'ئێواره';
+ }
+ },
+ calendar: {
+ sameDay: '[ئهمرۆ كاتژمێر] LT',
+ nextDay: '[بهیانی كاتژمێر] LT',
+ nextWeek: 'dddd [كاتژمێر] LT',
+ lastDay: '[دوێنێ كاتژمێر] LT',
+ lastWeek: 'dddd [كاتژمێر] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'له %s',
+ past: '%s',
+ s: 'چهند چركهیهك',
+ ss: 'چركه %d',
+ m: 'یهك خولهك',
+ mm: '%d خولهك',
+ h: 'یهك كاتژمێر',
+ hh: '%d كاتژمێر',
+ d: 'یهك ڕۆژ',
+ dd: '%d ڕۆژ',
+ M: 'یهك مانگ',
+ MM: '%d مانگ',
+ y: 'یهك ساڵ',
+ yy: '%d ساڵ',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap$a[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap$b[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes$2 = {
+ 0: '-чү',
+ 1: '-чи',
+ 2: '-чи',
+ 3: '-чү',
+ 4: '-чү',
+ 5: '-чи',
+ 6: '-чы',
+ 7: '-чи',
+ 8: '-чи',
+ 9: '-чу',
+ 10: '-чу',
+ 20: '-чы',
+ 30: '-чу',
+ 40: '-чы',
+ 50: '-чү',
+ 60: '-чы',
+ 70: '-чи',
+ 80: '-чи',
+ 90: '-чу',
+ 100: '-чү',
+ };
+
+ hooks.defineLocale('ky', {
+ months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
+ '_'
+ ),
+ monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
+ '_'
+ ),
+ weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
+ '_'
+ ),
+ weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
+ weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бүгүн саат] LT',
+ nextDay: '[Эртең саат] LT',
+ nextWeek: 'dddd [саат] LT',
+ lastDay: '[Кечээ саат] LT',
+ lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ичинде',
+ past: '%s мурун',
+ s: 'бирнече секунд',
+ ss: '%d секунд',
+ m: 'бир мүнөт',
+ mm: '%d мүнөт',
+ h: 'бир саат',
+ hh: '%d саат',
+ d: 'бир күн',
+ dd: '%d күн',
+ M: 'бир ай',
+ MM: '%d ай',
+ y: 'бир жыл',
+ yy: '%d жыл',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$6(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eng Minutt', 'enger Minutt'],
+ h: ['eng Stonn', 'enger Stonn'],
+ d: ['een Dag', 'engem Dag'],
+ M: ['ee Mount', 'engem Mount'],
+ y: ['ee Joer', 'engem Joer'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+ }
+ function processFutureTime(string) {
+ var number = string.substr(0, string.indexOf(' '));
+ if (eifelerRegelAppliesToNumber(number)) {
+ return 'a ' + string;
+ }
+ return 'an ' + string;
+ }
+ function processPastTime(string) {
+ var number = string.substr(0, string.indexOf(' '));
+ if (eifelerRegelAppliesToNumber(number)) {
+ return 'viru ' + string;
+ }
+ return 'virun ' + string;
+ }
+ /**
+ * Returns true if the word before the given number loses the '-n' ending.
+ * e.g. 'an 10 Deeg' but 'a 5 Deeg'
+ *
+ * @param number {integer}
+ * @returns {boolean}
+ */
+ function eifelerRegelAppliesToNumber(number) {
+ number = parseInt(number, 10);
+ if (isNaN(number)) {
+ return false;
+ }
+ if (number < 0) {
+ // Negative Number --> always true
+ return true;
+ } else if (number < 10) {
+ // Only 1 digit
+ if (4 <= number && number <= 7) {
+ return true;
+ }
+ return false;
+ } else if (number < 100) {
+ // 2 digits
+ var lastDigit = number % 10,
+ firstDigit = number / 10;
+ if (lastDigit === 0) {
+ return eifelerRegelAppliesToNumber(firstDigit);
+ }
+ return eifelerRegelAppliesToNumber(lastDigit);
+ } else if (number < 10000) {
+ // 3 or 4 digits --> recursively check first digit
+ while (number >= 10) {
+ number = number / 10;
+ }
+ return eifelerRegelAppliesToNumber(number);
+ } else {
+ // Anything larger than 4 digits: recursively check first n-3 digits
+ number = number / 1000;
+ return eifelerRegelAppliesToNumber(number);
+ }
+ }
+
+ hooks.defineLocale('lb', {
+ months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm [Auer]',
+ LTS: 'H:mm:ss [Auer]',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm [Auer]',
+ LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
+ },
+ calendar: {
+ sameDay: '[Haut um] LT',
+ sameElse: 'L',
+ nextDay: '[Muer um] LT',
+ nextWeek: 'dddd [um] LT',
+ lastDay: '[Gëschter um] LT',
+ lastWeek: function () {
+ // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
+ switch (this.day()) {
+ case 2:
+ case 4:
+ return '[Leschten] dddd [um] LT';
+ default:
+ return '[Leschte] dddd [um] LT';
+ }
+ },
+ },
+ relativeTime: {
+ future: processFutureTime,
+ past: processPastTime,
+ s: 'e puer Sekonnen',
+ ss: '%d Sekonnen',
+ m: processRelativeTime$6,
+ mm: '%d Minutten',
+ h: processRelativeTime$6,
+ hh: '%d Stonnen',
+ d: processRelativeTime$6,
+ dd: '%d Deeg',
+ M: processRelativeTime$6,
+ MM: '%d Méint',
+ y: processRelativeTime$6,
+ yy: '%d Joer',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('lo', {
+ months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
+ '_'
+ ),
+ weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+ weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+ weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'ວັນdddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
+ isPM: function (input) {
+ return input === 'ຕອນແລງ';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ຕອນເຊົ້າ';
+ } else {
+ return 'ຕອນແລງ';
+ }
+ },
+ calendar: {
+ sameDay: '[ມື້ນີ້ເວລາ] LT',
+ nextDay: '[ມື້ອື່ນເວລາ] LT',
+ nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
+ lastDay: '[ມື້ວານນີ້ເວລາ] LT',
+ lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ອີກ %s',
+ past: '%sຜ່ານມາ',
+ s: 'ບໍ່ເທົ່າໃດວິນາທີ',
+ ss: '%d ວິນາທີ',
+ m: '1 ນາທີ',
+ mm: '%d ນາທີ',
+ h: '1 ຊົ່ວໂມງ',
+ hh: '%d ຊົ່ວໂມງ',
+ d: '1 ມື້',
+ dd: '%d ມື້',
+ M: '1 ເດືອນ',
+ MM: '%d ເດືອນ',
+ y: '1 ປີ',
+ yy: '%d ປີ',
+ },
+ dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
+ ordinal: function (number) {
+ return 'ທີ່' + number;
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var units = {
+ ss: 'sekundė_sekundžių_sekundes',
+ m: 'minutė_minutės_minutę',
+ mm: 'minutės_minučių_minutes',
+ h: 'valanda_valandos_valandą',
+ hh: 'valandos_valandų_valandas',
+ d: 'diena_dienos_dieną',
+ dd: 'dienos_dienų_dienas',
+ M: 'mėnuo_mėnesio_mėnesį',
+ MM: 'mėnesiai_mėnesių_mėnesius',
+ y: 'metai_metų_metus',
+ yy: 'metai_metų_metus',
+ };
+ function translateSeconds(number, withoutSuffix, key, isFuture) {
+ if (withoutSuffix) {
+ return 'kelios sekundės';
+ } else {
+ return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
+ }
+ }
+ function translateSingular(number, withoutSuffix, key, isFuture) {
+ return withoutSuffix
+ ? forms(key)[0]
+ : isFuture
+ ? forms(key)[1]
+ : forms(key)[2];
+ }
+ function special(number) {
+ return number % 10 === 0 || (number > 10 && number < 20);
+ }
+ function forms(key) {
+ return units[key].split('_');
+ }
+ function translate$6(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ if (number === 1) {
+ return (
+ result + translateSingular(number, withoutSuffix, key[0], isFuture)
+ );
+ } else if (withoutSuffix) {
+ return result + (special(number) ? forms(key)[1] : forms(key)[0]);
+ } else {
+ if (isFuture) {
+ return result + forms(key)[1];
+ } else {
+ return result + (special(number) ? forms(key)[1] : forms(key)[2]);
+ }
+ }
+ }
+ hooks.defineLocale('lt', {
+ months: {
+ format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
+ '_'
+ ),
+ standalone:
+ 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
+ },
+ monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
+ weekdays: {
+ format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
+ '_'
+ ),
+ standalone:
+ 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
+ '_'
+ ),
+ isFormat: /dddd HH:mm/,
+ },
+ weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
+ weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY [m.] MMMM D [d.]',
+ LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
+ l: 'YYYY-MM-DD',
+ ll: 'YYYY [m.] MMMM D [d.]',
+ lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
+ },
+ calendar: {
+ sameDay: '[Šiandien] LT',
+ nextDay: '[Rytoj] LT',
+ nextWeek: 'dddd LT',
+ lastDay: '[Vakar] LT',
+ lastWeek: '[Praėjusį] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'po %s',
+ past: 'prieš %s',
+ s: translateSeconds,
+ ss: translate$6,
+ m: translateSingular,
+ mm: translate$6,
+ h: translateSingular,
+ hh: translate$6,
+ d: translateSingular,
+ dd: translate$6,
+ M: translateSingular,
+ MM: translate$6,
+ y: translateSingular,
+ yy: translate$6,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-oji/,
+ ordinal: function (number) {
+ return number + '-oji';
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var units$1 = {
+ ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
+ m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ h: 'stundas_stundām_stunda_stundas'.split('_'),
+ hh: 'stundas_stundām_stunda_stundas'.split('_'),
+ d: 'dienas_dienām_diena_dienas'.split('_'),
+ dd: 'dienas_dienām_diena_dienas'.split('_'),
+ M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ y: 'gada_gadiem_gads_gadi'.split('_'),
+ yy: 'gada_gadiem_gads_gadi'.split('_'),
+ };
+ /**
+ * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
+ */
+ function format$1(forms, number, withoutSuffix) {
+ if (withoutSuffix) {
+ // E.g. "21 minūte", "3 minūtes".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
+ } else {
+ // E.g. "21 minūtes" as in "pēc 21 minūtes".
+ // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
+ }
+ }
+ function relativeTimeWithPlural$1(number, withoutSuffix, key) {
+ return number + ' ' + format$1(units$1[key], number, withoutSuffix);
+ }
+ function relativeTimeWithSingular(number, withoutSuffix, key) {
+ return format$1(units$1[key], number, withoutSuffix);
+ }
+ function relativeSeconds(number, withoutSuffix) {
+ return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
+ }
+
+ hooks.defineLocale('lv', {
+ months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
+ weekdays:
+ 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY.',
+ LL: 'YYYY. [gada] D. MMMM',
+ LLL: 'YYYY. [gada] D. MMMM, HH:mm',
+ LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
+ },
+ calendar: {
+ sameDay: '[Šodien pulksten] LT',
+ nextDay: '[Rīt pulksten] LT',
+ nextWeek: 'dddd [pulksten] LT',
+ lastDay: '[Vakar pulksten] LT',
+ lastWeek: '[Pagājušā] dddd [pulksten] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'pēc %s',
+ past: 'pirms %s',
+ s: relativeSeconds,
+ ss: relativeTimeWithPlural$1,
+ m: relativeTimeWithSingular,
+ mm: relativeTimeWithPlural$1,
+ h: relativeTimeWithSingular,
+ hh: relativeTimeWithPlural$1,
+ d: relativeTimeWithSingular,
+ dd: relativeTimeWithPlural$1,
+ M: relativeTimeWithSingular,
+ MM: relativeTimeWithPlural$1,
+ y: relativeTimeWithSingular,
+ yy: relativeTimeWithPlural$1,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var translator = {
+ words: {
+ //Different grammatical cases
+ ss: ['sekund', 'sekunda', 'sekundi'],
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ dd: ['dan', 'dana', 'dana'],
+ MM: ['mjesec', 'mjeseca', 'mjeseci'],
+ yy: ['godina', 'godine', 'godina'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ return number === 1
+ ? wordKey[0]
+ : number >= 2 && number <= 4
+ ? wordKey[1]
+ : wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key) {
+ var wordKey = translator.words[key];
+ if (key.length === 1) {
+ return withoutSuffix ? wordKey[0] : wordKey[1];
+ } else {
+ return (
+ number +
+ ' ' +
+ translator.correctGrammaticalCase(number, wordKey)
+ );
+ }
+ },
+ };
+
+ hooks.defineLocale('me', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sjutra u] LT',
+
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[juče u] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[prošle] [nedjelje] [u] LT',
+ '[prošlog] [ponedjeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srijede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'nekoliko sekundi',
+ ss: translator.translate,
+ m: translator.translate,
+ mm: translator.translate,
+ h: translator.translate,
+ hh: translator.translate,
+ d: 'dan',
+ dd: translator.translate,
+ M: 'mjesec',
+ MM: translator.translate,
+ y: 'godinu',
+ yy: translator.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('mi', {
+ months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
+ '_'
+ ),
+ monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
+ weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
+ weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+ weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [i] HH:mm',
+ LLLL: 'dddd, D MMMM YYYY [i] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i teie mahana, i] LT',
+ nextDay: '[apopo i] LT',
+ nextWeek: 'dddd [i] LT',
+ lastDay: '[inanahi i] LT',
+ lastWeek: 'dddd [whakamutunga i] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'i roto i %s',
+ past: '%s i mua',
+ s: 'te hēkona ruarua',
+ ss: '%d hēkona',
+ m: 'he meneti',
+ mm: '%d meneti',
+ h: 'te haora',
+ hh: '%d haora',
+ d: 'he ra',
+ dd: '%d ra',
+ M: 'he marama',
+ MM: '%d marama',
+ y: 'he tau',
+ yy: '%d tau',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('mk', {
+ months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
+ '_'
+ ),
+ monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
+ '_'
+ ),
+ weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
+ weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Денес во] LT',
+ nextDay: '[Утре во] LT',
+ nextWeek: '[Во] dddd [во] LT',
+ lastDay: '[Вчера во] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 6:
+ return '[Изминатата] dddd [во] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[Изминатиот] dddd [во] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: 'пред %s',
+ s: 'неколку секунди',
+ ss: '%d секунди',
+ m: 'една минута',
+ mm: '%d минути',
+ h: 'еден час',
+ hh: '%d часа',
+ d: 'еден ден',
+ dd: '%d дена',
+ M: 'еден месец',
+ MM: '%d месеци',
+ y: 'една година',
+ yy: '%d години',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+ ordinal: function (number) {
+ var lastDigit = number % 10,
+ last2Digits = number % 100;
+ if (number === 0) {
+ return number + '-ев';
+ } else if (last2Digits === 0) {
+ return number + '-ен';
+ } else if (last2Digits > 10 && last2Digits < 20) {
+ return number + '-ти';
+ } else if (lastDigit === 1) {
+ return number + '-ви';
+ } else if (lastDigit === 2) {
+ return number + '-ри';
+ } else if (lastDigit === 7 || lastDigit === 8) {
+ return number + '-ми';
+ } else {
+ return number + '-ти';
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ml', {
+ months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
+ '_'
+ ),
+ weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
+ weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm -നു',
+ LTS: 'A h:mm:ss -നു',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm -നു',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',
+ },
+ calendar: {
+ sameDay: '[ഇന്ന്] LT',
+ nextDay: '[നാളെ] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ഇന്നലെ] LT',
+ lastWeek: '[കഴിഞ്ഞ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s കഴിഞ്ഞ്',
+ past: '%s മുൻപ്',
+ s: 'അൽപ നിമിഷങ്ങൾ',
+ ss: '%d സെക്കൻഡ്',
+ m: 'ഒരു മിനിറ്റ്',
+ mm: '%d മിനിറ്റ്',
+ h: 'ഒരു മണിക്കൂർ',
+ hh: '%d മണിക്കൂർ',
+ d: 'ഒരു ദിവസം',
+ dd: '%d ദിവസം',
+ M: 'ഒരു മാസം',
+ MM: '%d മാസം',
+ y: 'ഒരു വർഷം',
+ yy: '%d വർഷം',
+ },
+ meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'രാത്രി' && hour >= 4) ||
+ meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
+ meridiem === 'വൈകുന്നേരം'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'രാത്രി';
+ } else if (hour < 12) {
+ return 'രാവിലെ';
+ } else if (hour < 17) {
+ return 'ഉച്ച കഴിഞ്ഞ്';
+ } else if (hour < 20) {
+ return 'വൈകുന്നേരം';
+ } else {
+ return 'രാത്രി';
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function translate$7(number, withoutSuffix, key, isFuture) {
+ switch (key) {
+ case 's':
+ return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
+ case 'ss':
+ return number + (withoutSuffix ? ' секунд' : ' секундын');
+ case 'm':
+ case 'mm':
+ return number + (withoutSuffix ? ' минут' : ' минутын');
+ case 'h':
+ case 'hh':
+ return number + (withoutSuffix ? ' цаг' : ' цагийн');
+ case 'd':
+ case 'dd':
+ return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
+ case 'M':
+ case 'MM':
+ return number + (withoutSuffix ? ' сар' : ' сарын');
+ case 'y':
+ case 'yy':
+ return number + (withoutSuffix ? ' жил' : ' жилийн');
+ default:
+ return number;
+ }
+ }
+
+ hooks.defineLocale('mn', {
+ months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
+ '_'
+ ),
+ monthsShort:
+ '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
+ weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
+ weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY оны MMMMын D',
+ LLL: 'YYYY оны MMMMын D HH:mm',
+ LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
+ },
+ meridiemParse: /ҮӨ|ҮХ/i,
+ isPM: function (input) {
+ return input === 'ҮХ';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ҮӨ';
+ } else {
+ return 'ҮХ';
+ }
+ },
+ calendar: {
+ sameDay: '[Өнөөдөр] LT',
+ nextDay: '[Маргааш] LT',
+ nextWeek: '[Ирэх] dddd LT',
+ lastDay: '[Өчигдөр] LT',
+ lastWeek: '[Өнгөрсөн] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s дараа',
+ past: '%s өмнө',
+ s: translate$7,
+ ss: translate$7,
+ m: translate$7,
+ mm: translate$7,
+ h: translate$7,
+ hh: translate$7,
+ d: translate$7,
+ dd: translate$7,
+ M: translate$7,
+ MM: translate$7,
+ y: translate$7,
+ yy: translate$7,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + ' өдөр';
+ default:
+ return number;
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$c = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap$b = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ };
+
+ function relativeTimeMr(number, withoutSuffix, string, isFuture) {
+ var output = '';
+ if (withoutSuffix) {
+ switch (string) {
+ case 's':
+ output = 'काही सेकंद';
+ break;
+ case 'ss':
+ output = '%d सेकंद';
+ break;
+ case 'm':
+ output = 'एक मिनिट';
+ break;
+ case 'mm':
+ output = '%d मिनिटे';
+ break;
+ case 'h':
+ output = 'एक तास';
+ break;
+ case 'hh':
+ output = '%d तास';
+ break;
+ case 'd':
+ output = 'एक दिवस';
+ break;
+ case 'dd':
+ output = '%d दिवस';
+ break;
+ case 'M':
+ output = 'एक महिना';
+ break;
+ case 'MM':
+ output = '%d महिने';
+ break;
+ case 'y':
+ output = 'एक वर्ष';
+ break;
+ case 'yy':
+ output = '%d वर्षे';
+ break;
+ }
+ } else {
+ switch (string) {
+ case 's':
+ output = 'काही सेकंदां';
+ break;
+ case 'ss':
+ output = '%d सेकंदां';
+ break;
+ case 'm':
+ output = 'एका मिनिटा';
+ break;
+ case 'mm':
+ output = '%d मिनिटां';
+ break;
+ case 'h':
+ output = 'एका तासा';
+ break;
+ case 'hh':
+ output = '%d तासां';
+ break;
+ case 'd':
+ output = 'एका दिवसा';
+ break;
+ case 'dd':
+ output = '%d दिवसां';
+ break;
+ case 'M':
+ output = 'एका महिन्या';
+ break;
+ case 'MM':
+ output = '%d महिन्यां';
+ break;
+ case 'y':
+ output = 'एका वर्षा';
+ break;
+ case 'yy':
+ output = '%d वर्षां';
+ break;
+ }
+ }
+ return output.replace(/%d/i, number);
+ }
+
+ hooks.defineLocale('mr', {
+ months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
+ '_'
+ ),
+ monthsShort:
+ 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm वाजता',
+ LTS: 'A h:mm:ss वाजता',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm वाजता',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',
+ },
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[उद्या] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[काल] LT',
+ lastWeek: '[मागील] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sमध्ये',
+ past: '%sपूर्वी',
+ s: relativeTimeMr,
+ ss: relativeTimeMr,
+ m: relativeTimeMr,
+ mm: relativeTimeMr,
+ h: relativeTimeMr,
+ hh: relativeTimeMr,
+ d: relativeTimeMr,
+ dd: relativeTimeMr,
+ M: relativeTimeMr,
+ MM: relativeTimeMr,
+ y: relativeTimeMr,
+ yy: relativeTimeMr,
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap$b[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$c[match];
+ });
+ },
+ meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
+ return hour;
+ } else if (
+ meridiem === 'दुपारी' ||
+ meridiem === 'सायंकाळी' ||
+ meridiem === 'रात्री'
+ ) {
+ return hour >= 12 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour >= 0 && hour < 6) {
+ return 'पहाटे';
+ } else if (hour < 12) {
+ return 'सकाळी';
+ } else if (hour < 17) {
+ return 'दुपारी';
+ } else if (hour < 20) {
+ return 'सायंकाळी';
+ } else {
+ return 'रात्री';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ms-my', {
+ months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+ weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+ weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+ weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'tengahari';
+ } else if (hours < 19) {
+ return 'petang';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Esok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kelmarin pukul] LT',
+ lastWeek: 'dddd [lepas pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lepas',
+ s: 'beberapa saat',
+ ss: '%d saat',
+ m: 'seminit',
+ mm: '%d minit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ms', {
+ months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+ weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+ weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+ weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'tengahari';
+ } else if (hours < 19) {
+ return 'petang';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Esok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kelmarin pukul] LT',
+ lastWeek: 'dddd [lepas pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lepas',
+ s: 'beberapa saat',
+ ss: '%d saat',
+ m: 'seminit',
+ mm: '%d minit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('mt', {
+ months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
+ weekdays:
+ 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
+ '_'
+ ),
+ weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
+ weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Illum fil-]LT',
+ nextDay: '[Għada fil-]LT',
+ nextWeek: 'dddd [fil-]LT',
+ lastDay: '[Il-bieraħ fil-]LT',
+ lastWeek: 'dddd [li għadda] [fil-]LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'f’ %s',
+ past: '%s ilu',
+ s: 'ftit sekondi',
+ ss: '%d sekondi',
+ m: 'minuta',
+ mm: '%d minuti',
+ h: 'siegħa',
+ hh: '%d siegħat',
+ d: 'ġurnata',
+ dd: '%d ġranet',
+ M: 'xahar',
+ MM: '%d xhur',
+ y: 'sena',
+ yy: '%d sni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$d = {
+ 1: '၁',
+ 2: '၂',
+ 3: '၃',
+ 4: '၄',
+ 5: '၅',
+ 6: '၆',
+ 7: '၇',
+ 8: '၈',
+ 9: '၉',
+ 0: '၀',
+ },
+ numberMap$c = {
+ '၁': '1',
+ '၂': '2',
+ '၃': '3',
+ '၄': '4',
+ '၅': '5',
+ '၆': '6',
+ '၇': '7',
+ '၈': '8',
+ '၉': '9',
+ '၀': '0',
+ };
+
+ hooks.defineLocale('my', {
+ months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
+ '_'
+ ),
+ monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
+ weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
+ '_'
+ ),
+ weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+ weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[ယနေ.] LT [မှာ]',
+ nextDay: '[မနက်ဖြန်] LT [မှာ]',
+ nextWeek: 'dddd LT [မှာ]',
+ lastDay: '[မနေ.က] LT [မှာ]',
+ lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'လာမည့် %s မှာ',
+ past: 'လွန်ခဲ့သော %s က',
+ s: 'စက္ကန်.အနည်းငယ်',
+ ss: '%d စက္ကန့်',
+ m: 'တစ်မိနစ်',
+ mm: '%d မိနစ်',
+ h: 'တစ်နာရီ',
+ hh: '%d နာရီ',
+ d: 'တစ်ရက်',
+ dd: '%d ရက်',
+ M: 'တစ်လ',
+ MM: '%d လ',
+ y: 'တစ်နှစ်',
+ yy: '%d နှစ်',
+ },
+ preparse: function (string) {
+ return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
+ return numberMap$c[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$d[match];
+ });
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('nb', {
+ months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
+ weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] HH:mm',
+ LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i dag kl.] LT',
+ nextDay: '[i morgen kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[i går kl.] LT',
+ lastWeek: '[forrige] dddd [kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s siden',
+ s: 'noen sekunder',
+ ss: '%d sekunder',
+ m: 'ett minutt',
+ mm: '%d minutter',
+ h: 'en time',
+ hh: '%d timer',
+ d: 'en dag',
+ dd: '%d dager',
+ w: 'en uke',
+ ww: '%d uker',
+ M: 'en måned',
+ MM: '%d måneder',
+ y: 'ett år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$e = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap$d = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ };
+
+ hooks.defineLocale('ne', {
+ months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
+ '_'
+ ),
+ monthsShort:
+ 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
+ '_'
+ ),
+ weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
+ weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'Aको h:mm बजे',
+ LTS: 'Aको h:mm:ss बजे',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, Aको h:mm बजे',
+ LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap$d[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$e[match];
+ });
+ },
+ meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'राति') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'बिहान') {
+ return hour;
+ } else if (meridiem === 'दिउँसो') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'साँझ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 3) {
+ return 'राति';
+ } else if (hour < 12) {
+ return 'बिहान';
+ } else if (hour < 16) {
+ return 'दिउँसो';
+ } else if (hour < 20) {
+ return 'साँझ';
+ } else {
+ return 'राति';
+ }
+ },
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[भोलि] LT',
+ nextWeek: '[आउँदो] dddd[,] LT',
+ lastDay: '[हिजो] LT',
+ lastWeek: '[गएको] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sमा',
+ past: '%s अगाडि',
+ s: 'केही क्षण',
+ ss: '%d सेकेण्ड',
+ m: 'एक मिनेट',
+ mm: '%d मिनेट',
+ h: 'एक घण्टा',
+ hh: '%d घण्टा',
+ d: 'एक दिन',
+ dd: '%d दिन',
+ M: 'एक महिना',
+ MM: '%d महिना',
+ y: 'एक बर्ष',
+ yy: '%d बर्ष',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortWithDots$1 =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots$1 =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ monthsParse$8 = [
+ /^jan/i,
+ /^feb/i,
+ /^maart|mrt.?$/i,
+ /^apr/i,
+ /^mei$/i,
+ /^jun[i.]?$/i,
+ /^jul[i.]?$/i,
+ /^aug/i,
+ /^sep/i,
+ /^okt/i,
+ /^nov/i,
+ /^dec/i,
+ ],
+ monthsRegex$8 =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+ hooks.defineLocale('nl-be', {
+ months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots$1;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots$1[m.month()];
+ } else {
+ return monthsShortWithDots$1[m.month()];
+ }
+ },
+
+ monthsRegex: monthsRegex$8,
+ monthsShortRegex: monthsRegex$8,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+ monthsParse: monthsParse$8,
+ longMonthsParse: monthsParse$8,
+ shortMonthsParse: monthsParse$8,
+
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+ weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+ weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[vandaag om] LT',
+ nextDay: '[morgen om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[gisteren om] LT',
+ lastWeek: '[afgelopen] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'over %s',
+ past: '%s geleden',
+ s: 'een paar seconden',
+ ss: '%d seconden',
+ m: 'één minuut',
+ mm: '%d minuten',
+ h: 'één uur',
+ hh: '%d uur',
+ d: 'één dag',
+ dd: '%d dagen',
+ M: 'één maand',
+ MM: '%d maanden',
+ y: 'één jaar',
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsShortWithDots$2 =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots$2 =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ monthsParse$9 = [
+ /^jan/i,
+ /^feb/i,
+ /^maart|mrt.?$/i,
+ /^apr/i,
+ /^mei$/i,
+ /^jun[i.]?$/i,
+ /^jul[i.]?$/i,
+ /^aug/i,
+ /^sep/i,
+ /^okt/i,
+ /^nov/i,
+ /^dec/i,
+ ],
+ monthsRegex$9 =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+ hooks.defineLocale('nl', {
+ months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots$2;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots$2[m.month()];
+ } else {
+ return monthsShortWithDots$2[m.month()];
+ }
+ },
+
+ monthsRegex: monthsRegex$9,
+ monthsShortRegex: monthsRegex$9,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+ monthsParse: monthsParse$9,
+ longMonthsParse: monthsParse$9,
+ shortMonthsParse: monthsParse$9,
+
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+ weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+ weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[vandaag om] LT',
+ nextDay: '[morgen om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[gisteren om] LT',
+ lastWeek: '[afgelopen] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'over %s',
+ past: '%s geleden',
+ s: 'een paar seconden',
+ ss: '%d seconden',
+ m: 'één minuut',
+ mm: '%d minuten',
+ h: 'één uur',
+ hh: '%d uur',
+ d: 'één dag',
+ dd: '%d dagen',
+ w: 'één week',
+ ww: '%d weken',
+ M: 'één maand',
+ MM: '%d maanden',
+ y: 'één jaar',
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('nn', {
+ months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
+ weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
+ weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] H:mm',
+ LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[I dag klokka] LT',
+ nextDay: '[I morgon klokka] LT',
+ nextWeek: 'dddd [klokka] LT',
+ lastDay: '[I går klokka] LT',
+ lastWeek: '[Føregåande] dddd [klokka] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s sidan',
+ s: 'nokre sekund',
+ ss: '%d sekund',
+ m: 'eit minutt',
+ mm: '%d minutt',
+ h: 'ein time',
+ hh: '%d timar',
+ d: 'ein dag',
+ dd: '%d dagar',
+ w: 'ei veke',
+ ww: '%d veker',
+ M: 'ein månad',
+ MM: '%d månader',
+ y: 'eit år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('oc-lnc', {
+ months: {
+ standalone:
+ 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
+ '_'
+ ),
+ format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\s)+MMMM/,
+ },
+ monthsShort:
+ 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
+ '_'
+ ),
+ weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
+ weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [de] YYYY',
+ ll: 'D MMM YYYY',
+ LLL: 'D MMMM [de] YYYY [a] H:mm',
+ lll: 'D MMM YYYY, H:mm',
+ LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
+ llll: 'ddd D MMM YYYY, H:mm',
+ },
+ calendar: {
+ sameDay: '[uèi a] LT',
+ nextDay: '[deman a] LT',
+ nextWeek: 'dddd [a] LT',
+ lastDay: '[ièr a] LT',
+ lastWeek: 'dddd [passat a] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: "d'aquí %s",
+ past: 'fa %s',
+ s: 'unas segondas',
+ ss: '%d segondas',
+ m: 'una minuta',
+ mm: '%d minutas',
+ h: 'una ora',
+ hh: '%d oras',
+ d: 'un jorn',
+ dd: '%d jorns',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
+ ordinal: function (number, period) {
+ var output =
+ number === 1
+ ? 'r'
+ : number === 2
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
+ if (period === 'w' || period === 'W') {
+ output = 'a';
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4,
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$f = {
+ 1: '੧',
+ 2: '੨',
+ 3: '੩',
+ 4: '੪',
+ 5: '੫',
+ 6: '੬',
+ 7: '੭',
+ 8: '੮',
+ 9: '੯',
+ 0: '੦',
+ },
+ numberMap$e = {
+ '੧': '1',
+ '੨': '2',
+ '੩': '3',
+ '੪': '4',
+ '੫': '5',
+ '੬': '6',
+ '੭': '7',
+ '੮': '8',
+ '੯': '9',
+ '੦': '0',
+ };
+
+ hooks.defineLocale('pa-in', {
+ // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
+ months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
+ '_'
+ ),
+ weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
+ '_'
+ ),
+ weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+ weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm ਵਜੇ',
+ LTS: 'A h:mm:ss ਵਜੇ',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
+ },
+ calendar: {
+ sameDay: '[ਅਜ] LT',
+ nextDay: '[ਕਲ] LT',
+ nextWeek: '[ਅਗਲਾ] dddd, LT',
+ lastDay: '[ਕਲ] LT',
+ lastWeek: '[ਪਿਛਲੇ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ਵਿੱਚ',
+ past: '%s ਪਿਛਲੇ',
+ s: 'ਕੁਝ ਸਕਿੰਟ',
+ ss: '%d ਸਕਿੰਟ',
+ m: 'ਇਕ ਮਿੰਟ',
+ mm: '%d ਮਿੰਟ',
+ h: 'ਇੱਕ ਘੰਟਾ',
+ hh: '%d ਘੰਟੇ',
+ d: 'ਇੱਕ ਦਿਨ',
+ dd: '%d ਦਿਨ',
+ M: 'ਇੱਕ ਮਹੀਨਾ',
+ MM: '%d ਮਹੀਨੇ',
+ y: 'ਇੱਕ ਸਾਲ',
+ yy: '%d ਸਾਲ',
+ },
+ preparse: function (string) {
+ return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
+ return numberMap$e[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$f[match];
+ });
+ },
+ // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
+ meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ਰਾਤ') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ਸਵੇਰ') {
+ return hour;
+ } else if (meridiem === 'ਦੁਪਹਿਰ') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'ਸ਼ਾਮ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ਰਾਤ';
+ } else if (hour < 10) {
+ return 'ਸਵੇਰ';
+ } else if (hour < 17) {
+ return 'ਦੁਪਹਿਰ';
+ } else if (hour < 20) {
+ return 'ਸ਼ਾਮ';
+ } else {
+ return 'ਰਾਤ';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var monthsNominative =
+ 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
+ '_'
+ ),
+ monthsSubjective =
+ 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
+ '_'
+ ),
+ monthsParse$a = [
+ /^sty/i,
+ /^lut/i,
+ /^mar/i,
+ /^kwi/i,
+ /^maj/i,
+ /^cze/i,
+ /^lip/i,
+ /^sie/i,
+ /^wrz/i,
+ /^paź/i,
+ /^lis/i,
+ /^gru/i,
+ ];
+ function plural$3(n) {
+ return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
+ }
+ function translate$8(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ return result + (plural$3(number) ? 'sekundy' : 'sekund');
+ case 'm':
+ return withoutSuffix ? 'minuta' : 'minutę';
+ case 'mm':
+ return result + (plural$3(number) ? 'minuty' : 'minut');
+ case 'h':
+ return withoutSuffix ? 'godzina' : 'godzinę';
+ case 'hh':
+ return result + (plural$3(number) ? 'godziny' : 'godzin');
+ case 'ww':
+ return result + (plural$3(number) ? 'tygodnie' : 'tygodni');
+ case 'MM':
+ return result + (plural$3(number) ? 'miesiące' : 'miesięcy');
+ case 'yy':
+ return result + (plural$3(number) ? 'lata' : 'lat');
+ }
+ }
+
+ hooks.defineLocale('pl', {
+ months: function (momentToFormat, format) {
+ if (!momentToFormat) {
+ return monthsNominative;
+ } else if (/D MMMM/.test(format)) {
+ return monthsSubjective[momentToFormat.month()];
+ } else {
+ return monthsNominative[momentToFormat.month()];
+ }
+ },
+ monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
+ monthsParse: monthsParse$a,
+ longMonthsParse: monthsParse$a,
+ shortMonthsParse: monthsParse$a,
+ weekdays:
+ 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
+ weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
+ weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Dziś o] LT',
+ nextDay: '[Jutro o] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[W niedzielę o] LT';
+
+ case 2:
+ return '[We wtorek o] LT';
+
+ case 3:
+ return '[W środę o] LT';
+
+ case 6:
+ return '[W sobotę o] LT';
+
+ default:
+ return '[W] dddd [o] LT';
+ }
+ },
+ lastDay: '[Wczoraj o] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[W zeszłą niedzielę o] LT';
+ case 3:
+ return '[W zeszłą środę o] LT';
+ case 6:
+ return '[W zeszłą sobotę o] LT';
+ default:
+ return '[W zeszły] dddd [o] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: '%s temu',
+ s: 'kilka sekund',
+ ss: translate$8,
+ m: translate$8,
+ mm: translate$8,
+ h: translate$8,
+ hh: translate$8,
+ d: '1 dzień',
+ dd: '%d dni',
+ w: 'tydzień',
+ ww: translate$8,
+ M: 'miesiąc',
+ MM: translate$8,
+ y: 'rok',
+ yy: translate$8,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('pt-br', {
+ months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
+ weekdays:
+ 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
+ weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hoje às] LT',
+ nextDay: '[Amanhã às] LT',
+ nextWeek: 'dddd [às] LT',
+ lastDay: '[Ontem às] LT',
+ lastWeek: function () {
+ return this.day() === 0 || this.day() === 6
+ ? '[Último] dddd [às] LT' // Saturday + Sunday
+ : '[Última] dddd [às] LT'; // Monday - Friday
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'em %s',
+ past: 'há %s',
+ s: 'poucos segundos',
+ ss: '%d segundos',
+ m: 'um minuto',
+ mm: '%d minutos',
+ h: 'uma hora',
+ hh: '%d horas',
+ d: 'um dia',
+ dd: '%d dias',
+ M: 'um mês',
+ MM: '%d meses',
+ y: 'um ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ invalidDate: 'Data inválida',
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('pt', {
+ months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
+ weekdays:
+ 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
+ weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY HH:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hoje às] LT',
+ nextDay: '[Amanhã às] LT',
+ nextWeek: 'dddd [às] LT',
+ lastDay: '[Ontem às] LT',
+ lastWeek: function () {
+ return this.day() === 0 || this.day() === 6
+ ? '[Último] dddd [às] LT' // Saturday + Sunday
+ : '[Última] dddd [às] LT'; // Monday - Friday
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'em %s',
+ past: 'há %s',
+ s: 'segundos',
+ ss: '%d segundos',
+ m: 'um minuto',
+ mm: '%d minutos',
+ h: 'uma hora',
+ hh: '%d horas',
+ d: 'um dia',
+ dd: '%d dias',
+ w: 'uma semana',
+ ww: '%d semanas',
+ M: 'um mês',
+ MM: '%d meses',
+ y: 'um ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function relativeTimeWithPlural$2(number, withoutSuffix, key) {
+ var format = {
+ ss: 'secunde',
+ mm: 'minute',
+ hh: 'ore',
+ dd: 'zile',
+ ww: 'săptămâni',
+ MM: 'luni',
+ yy: 'ani',
+ },
+ separator = ' ';
+ if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
+ separator = ' de ';
+ }
+ return number + separator + format[key];
+ }
+
+ hooks.defineLocale('ro', {
+ months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
+ weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
+ weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[azi la] LT',
+ nextDay: '[mâine la] LT',
+ nextWeek: 'dddd [la] LT',
+ lastDay: '[ieri la] LT',
+ lastWeek: '[fosta] dddd [la] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'peste %s',
+ past: '%s în urmă',
+ s: 'câteva secunde',
+ ss: relativeTimeWithPlural$2,
+ m: 'un minut',
+ mm: relativeTimeWithPlural$2,
+ h: 'o oră',
+ hh: relativeTimeWithPlural$2,
+ d: 'o zi',
+ dd: relativeTimeWithPlural$2,
+ w: 'o săptămână',
+ ww: relativeTimeWithPlural$2,
+ M: 'o lună',
+ MM: relativeTimeWithPlural$2,
+ y: 'un an',
+ yy: relativeTimeWithPlural$2,
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function plural$4(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+ }
+ function relativeTimeWithPlural$3(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
+ mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
+ hh: 'час_часа_часов',
+ dd: 'день_дня_дней',
+ ww: 'неделя_недели_недель',
+ MM: 'месяц_месяца_месяцев',
+ yy: 'год_года_лет',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'минута' : 'минуту';
+ } else {
+ return number + ' ' + plural$4(format[key], +number);
+ }
+ }
+ var monthsParse$b = [
+ /^янв/i,
+ /^фев/i,
+ /^мар/i,
+ /^апр/i,
+ /^ма[йя]/i,
+ /^июн/i,
+ /^июл/i,
+ /^авг/i,
+ /^сен/i,
+ /^окт/i,
+ /^ноя/i,
+ /^дек/i,
+ ];
+
+ // http://new.gramota.ru/spravka/rules/139-prop : § 103
+ // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
+ // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
+ hooks.defineLocale('ru', {
+ months: {
+ format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
+ '_'
+ ),
+ standalone:
+ 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
+ '_'
+ ),
+ },
+ monthsShort: {
+ // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
+ format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
+ '_'
+ ),
+ standalone:
+ 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
+ '_'
+ ),
+ },
+ weekdays: {
+ standalone:
+ 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
+ '_'
+ ),
+ format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
+ '_'
+ ),
+ isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
+ },
+ weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ monthsParse: monthsParse$b,
+ longMonthsParse: monthsParse$b,
+ shortMonthsParse: monthsParse$b,
+
+ // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
+ monthsRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+ // копия предыдущего
+ monthsShortRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+ // полные названия с падежами
+ monthsStrictRegex:
+ /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
+
+ // Выражение, которое соответствует только сокращённым формам
+ monthsShortStrictRegex:
+ /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY г.',
+ LLL: 'D MMMM YYYY г., H:mm',
+ LLLL: 'dddd, D MMMM YYYY г., H:mm',
+ },
+ calendar: {
+ sameDay: '[Сегодня, в] LT',
+ nextDay: '[Завтра, в] LT',
+ lastDay: '[Вчера, в] LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В следующее] dddd, [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В следующий] dddd, [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В следующую] dddd, [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd, [в] LT';
+ } else {
+ return '[В] dddd, [в] LT';
+ }
+ }
+ },
+ lastWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В прошлое] dddd, [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В прошлый] dddd, [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В прошлую] dddd, [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd, [в] LT';
+ } else {
+ return '[В] dddd, [в] LT';
+ }
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'через %s',
+ past: '%s назад',
+ s: 'несколько секунд',
+ ss: relativeTimeWithPlural$3,
+ m: relativeTimeWithPlural$3,
+ mm: relativeTimeWithPlural$3,
+ h: 'час',
+ hh: relativeTimeWithPlural$3,
+ d: 'день',
+ dd: relativeTimeWithPlural$3,
+ w: 'неделя',
+ ww: relativeTimeWithPlural$3,
+ M: 'месяц',
+ MM: relativeTimeWithPlural$3,
+ y: 'год',
+ yy: relativeTimeWithPlural$3,
+ },
+ meridiemParse: /ночи|утра|дня|вечера/i,
+ isPM: function (input) {
+ return /^(дня|вечера)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночи';
+ } else if (hour < 12) {
+ return 'утра';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечера';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ case 'w':
+ case 'W':
+ return number + '-я';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$9 = [
+ 'جنوري',
+ 'فيبروري',
+ 'مارچ',
+ 'اپريل',
+ 'مئي',
+ 'جون',
+ 'جولاءِ',
+ 'آگسٽ',
+ 'سيپٽمبر',
+ 'آڪٽوبر',
+ 'نومبر',
+ 'ڊسمبر',
+ ],
+ days$1 = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
+
+ hooks.defineLocale('sd', {
+ months: months$9,
+ monthsShort: months$9,
+ weekdays: days$1,
+ weekdaysShort: days$1,
+ weekdaysMin: days$1,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd، D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /صبح|شام/,
+ isPM: function (input) {
+ return 'شام' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'صبح';
+ }
+ return 'شام';
+ },
+ calendar: {
+ sameDay: '[اڄ] LT',
+ nextDay: '[سڀاڻي] LT',
+ nextWeek: 'dddd [اڳين هفتي تي] LT',
+ lastDay: '[ڪالهه] LT',
+ lastWeek: '[گزريل هفتي] dddd [تي] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s پوء',
+ past: '%s اڳ',
+ s: 'چند سيڪنڊ',
+ ss: '%d سيڪنڊ',
+ m: 'هڪ منٽ',
+ mm: '%d منٽ',
+ h: 'هڪ ڪلاڪ',
+ hh: '%d ڪلاڪ',
+ d: 'هڪ ڏينهن',
+ dd: '%d ڏينهن',
+ M: 'هڪ مهينو',
+ MM: '%d مهينا',
+ y: 'هڪ سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('se', {
+ months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
+ weekdays:
+ 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
+ '_'
+ ),
+ weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
+ weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'MMMM D. [b.] YYYY',
+ LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
+ LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[otne ti] LT',
+ nextDay: '[ihttin ti] LT',
+ nextWeek: 'dddd [ti] LT',
+ lastDay: '[ikte ti] LT',
+ lastWeek: '[ovddit] dddd [ti] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s geažes',
+ past: 'maŋit %s',
+ s: 'moadde sekunddat',
+ ss: '%d sekunddat',
+ m: 'okta minuhta',
+ mm: '%d minuhtat',
+ h: 'okta diimmu',
+ hh: '%d diimmut',
+ d: 'okta beaivi',
+ dd: '%d beaivvit',
+ M: 'okta mánnu',
+ MM: '%d mánut',
+ y: 'okta jahki',
+ yy: '%d jagit',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ /*jshint -W100*/
+ hooks.defineLocale('si', {
+ months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
+ '_'
+ ),
+ monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
+ '_'
+ ),
+ weekdays:
+ 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
+ '_'
+ ),
+ weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),
+ weekdaysMin: 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'a h:mm',
+ LTS: 'a h:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY MMMM D',
+ LLL: 'YYYY MMMM D, a h:mm',
+ LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',
+ },
+ calendar: {
+ sameDay: '[අද] LT[ට]',
+ nextDay: '[හෙට] LT[ට]',
+ nextWeek: 'dddd LT[ට]',
+ lastDay: '[ඊයේ] LT[ට]',
+ lastWeek: '[පසුගිය] dddd LT[ට]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sකින්',
+ past: '%sකට පෙර',
+ s: 'තත්පර කිහිපය',
+ ss: 'තත්පර %d',
+ m: 'මිනිත්තුව',
+ mm: 'මිනිත්තු %d',
+ h: 'පැය',
+ hh: 'පැය %d',
+ d: 'දිනය',
+ dd: 'දින %d',
+ M: 'මාසය',
+ MM: 'මාස %d',
+ y: 'වසර',
+ yy: 'වසර %d',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
+ ordinal: function (number) {
+ return number + ' වැනි';
+ },
+ meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
+ isPM: function (input) {
+ return input === 'ප.ව.' || input === 'පස් වරු';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'ප.ව.' : 'පස් වරු';
+ } else {
+ return isLower ? 'පෙ.ව.' : 'පෙර වරු';
+ }
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$a =
+ 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
+ '_'
+ ),
+ monthsShort$7 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
+ function plural$5(n) {
+ return n > 1 && n < 5;
+ }
+ function translate$9(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
+ case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'sekundy' : 'sekúnd');
+ } else {
+ return result + 'sekundami';
+ }
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'minúty' : 'minút');
+ } else {
+ return result + 'minútami';
+ }
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'hodiny' : 'hodín');
+ } else {
+ return result + 'hodinami';
+ }
+ case 'd': // a day / in a day / a day ago
+ return withoutSuffix || isFuture ? 'deň' : 'dňom';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'dni' : 'dní');
+ } else {
+ return result + 'dňami';
+ }
+ case 'M': // a month / in a month / a month ago
+ return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'mesiace' : 'mesiacov');
+ } else {
+ return result + 'mesiacmi';
+ }
+ case 'y': // a year / in a year / a year ago
+ return withoutSuffix || isFuture ? 'rok' : 'rokom';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural$5(number) ? 'roky' : 'rokov');
+ } else {
+ return result + 'rokmi';
+ }
+ }
+ }
+
+ hooks.defineLocale('sk', {
+ months: months$a,
+ monthsShort: monthsShort$7,
+ weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
+ weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
+ weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[dnes o] LT',
+ nextDay: '[zajtra o] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [o] LT';
+ case 3:
+ return '[v stredu o] LT';
+ case 4:
+ return '[vo štvrtok o] LT';
+ case 5:
+ return '[v piatok o] LT';
+ case 6:
+ return '[v sobotu o] LT';
+ }
+ },
+ lastDay: '[včera o] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[minulú nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[minulý] dddd [o] LT';
+ case 3:
+ return '[minulú stredu o] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [o] LT';
+ case 6:
+ return '[minulú sobotu o] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'pred %s',
+ s: translate$9,
+ ss: translate$9,
+ m: translate$9,
+ mm: translate$9,
+ h: translate$9,
+ hh: translate$9,
+ d: translate$9,
+ dd: translate$9,
+ M: translate$9,
+ MM: translate$9,
+ y: translate$9,
+ yy: translate$9,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function processRelativeTime$7(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's':
+ return withoutSuffix || isFuture
+ ? 'nekaj sekund'
+ : 'nekaj sekundami';
+ case 'ss':
+ if (number === 1) {
+ result += withoutSuffix ? 'sekundo' : 'sekundi';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
+ } else {
+ result += 'sekund';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'ena minuta' : 'eno minuto';
+ case 'mm':
+ if (number === 1) {
+ result += withoutSuffix ? 'minuta' : 'minuto';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'minute' : 'minutami';
+ } else {
+ result += withoutSuffix || isFuture ? 'minut' : 'minutami';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'ena ura' : 'eno uro';
+ case 'hh':
+ if (number === 1) {
+ result += withoutSuffix ? 'ura' : 'uro';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'uri' : 'urama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'ure' : 'urami';
+ } else {
+ result += withoutSuffix || isFuture ? 'ur' : 'urami';
+ }
+ return result;
+ case 'd':
+ return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
+ case 'dd':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'dan' : 'dnem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
+ } else {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
+ }
+ return result;
+ case 'M':
+ return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
+ case 'MM':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
+ } else {
+ result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
+ }
+ return result;
+ case 'y':
+ return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
+ case 'yy':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'leto' : 'letom';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'leti' : 'letoma';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'leta' : 'leti';
+ } else {
+ result += withoutSuffix || isFuture ? 'let' : 'leti';
+ }
+ return result;
+ }
+ }
+
+ hooks.defineLocale('sl', {
+ months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
+ weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
+ weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD. MM. YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danes ob] LT',
+ nextDay: '[jutri ob] LT',
+
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v] [nedeljo] [ob] LT';
+ case 3:
+ return '[v] [sredo] [ob] LT';
+ case 6:
+ return '[v] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[v] dddd [ob] LT';
+ }
+ },
+ lastDay: '[včeraj ob] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[prejšnjo] [nedeljo] [ob] LT';
+ case 3:
+ return '[prejšnjo] [sredo] [ob] LT';
+ case 6:
+ return '[prejšnjo] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prejšnji] dddd [ob] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'čez %s',
+ past: 'pred %s',
+ s: processRelativeTime$7,
+ ss: processRelativeTime$7,
+ m: processRelativeTime$7,
+ mm: processRelativeTime$7,
+ h: processRelativeTime$7,
+ hh: processRelativeTime$7,
+ d: processRelativeTime$7,
+ dd: processRelativeTime$7,
+ M: processRelativeTime$7,
+ MM: processRelativeTime$7,
+ y: processRelativeTime$7,
+ yy: processRelativeTime$7,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('sq', {
+ months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
+ weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
+ '_'
+ ),
+ weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
+ weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
+ weekdaysParseExact: true,
+ meridiemParse: /PD|MD/,
+ isPM: function (input) {
+ return input.charAt(0) === 'M';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ return hours < 12 ? 'PD' : 'MD';
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Sot në] LT',
+ nextDay: '[Nesër në] LT',
+ nextWeek: 'dddd [në] LT',
+ lastDay: '[Dje në] LT',
+ lastWeek: 'dddd [e kaluar në] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'në %s',
+ past: '%s më parë',
+ s: 'disa sekonda',
+ ss: '%d sekonda',
+ m: 'një minutë',
+ mm: '%d minuta',
+ h: 'një orë',
+ hh: '%d orë',
+ d: 'një ditë',
+ dd: '%d ditë',
+ M: 'një muaj',
+ MM: '%d muaj',
+ y: 'një vit',
+ yy: '%d vite',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var translator$1 = {
+ words: {
+ //Different grammatical cases
+ ss: ['секунда', 'секунде', 'секунди'],
+ m: ['један минут', 'једног минута'],
+ mm: ['минут', 'минута', 'минута'],
+ h: ['један сат', 'једног сата'],
+ hh: ['сат', 'сата', 'сати'],
+ d: ['један дан', 'једног дана'],
+ dd: ['дан', 'дана', 'дана'],
+ M: ['један месец', 'једног месеца'],
+ MM: ['месец', 'месеца', 'месеци'],
+ y: ['једну годину', 'једне године'],
+ yy: ['годину', 'године', 'година'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator$1.words[key],
+ word;
+
+ if (key.length === 1) {
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'једна година';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator$1.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'годину') {
+ return number + ' година';
+ }
+
+ return number + ' ' + word;
+ },
+ };
+
+ hooks.defineLocale('sr-cyrl', {
+ months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
+ '_'
+ ),
+ monthsShort:
+ 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
+ weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
+ weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
+ },
+ calendar: {
+ sameDay: '[данас у] LT',
+ nextDay: '[сутра у] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[у] [недељу] [у] LT';
+ case 3:
+ return '[у] [среду] [у] LT';
+ case 6:
+ return '[у] [суботу] [у] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[у] dddd [у] LT';
+ }
+ },
+ lastDay: '[јуче у] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[прошле] [недеље] [у] LT',
+ '[прошлог] [понедељка] [у] LT',
+ '[прошлог] [уторка] [у] LT',
+ '[прошле] [среде] [у] LT',
+ '[прошлог] [четвртка] [у] LT',
+ '[прошлог] [петка] [у] LT',
+ '[прошле] [суботе] [у] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: 'пре %s',
+ s: 'неколико секунди',
+ ss: translator$1.translate,
+ m: translator$1.translate,
+ mm: translator$1.translate,
+ h: translator$1.translate,
+ hh: translator$1.translate,
+ d: translator$1.translate,
+ dd: translator$1.translate,
+ M: translator$1.translate,
+ MM: translator$1.translate,
+ y: translator$1.translate,
+ yy: translator$1.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var translator$2 = {
+ words: {
+ //Different grammatical cases
+ ss: ['sekunda', 'sekunde', 'sekundi'],
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ d: ['jedan dan', 'jednog dana'],
+ dd: ['dan', 'dana', 'dana'],
+ M: ['jedan mesec', 'jednog meseca'],
+ MM: ['mesec', 'meseca', 'meseci'],
+ y: ['jednu godinu', 'jedne godine'],
+ yy: ['godinu', 'godine', 'godina'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator$2.words[key],
+ word;
+
+ if (key.length === 1) {
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'jedna godina';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator$2.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'godinu') {
+ return number + ' godina';
+ }
+
+ return number + ' ' + word;
+ },
+ };
+
+ hooks.defineLocale('sr', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedelju] [u] LT';
+ case 3:
+ return '[u] [sredu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[juče u] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[prošle] [nedelje] [u] LT',
+ '[prošlog] [ponedeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'pre %s',
+ s: 'nekoliko sekundi',
+ ss: translator$2.translate,
+ m: translator$2.translate,
+ mm: translator$2.translate,
+ h: translator$2.translate,
+ hh: translator$2.translate,
+ d: translator$2.translate,
+ dd: translator$2.translate,
+ M: translator$2.translate,
+ MM: translator$2.translate,
+ y: translator$2.translate,
+ yy: translator$2.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ss', {
+ months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
+ '_'
+ ),
+ monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
+ weekdays:
+ 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
+ weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Namuhla nga] LT',
+ nextDay: '[Kusasa nga] LT',
+ nextWeek: 'dddd [nga] LT',
+ lastDay: '[Itolo nga] LT',
+ lastWeek: 'dddd [leliphelile] [nga] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'nga %s',
+ past: 'wenteka nga %s',
+ s: 'emizuzwana lomcane',
+ ss: '%d mzuzwana',
+ m: 'umzuzu',
+ mm: '%d emizuzu',
+ h: 'lihora',
+ hh: '%d emahora',
+ d: 'lilanga',
+ dd: '%d emalanga',
+ M: 'inyanga',
+ MM: '%d tinyanga',
+ y: 'umnyaka',
+ yy: '%d iminyaka',
+ },
+ meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'ekuseni';
+ } else if (hours < 15) {
+ return 'emini';
+ } else if (hours < 19) {
+ return 'entsambama';
+ } else {
+ return 'ebusuku';
+ }
+ },
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ekuseni') {
+ return hour;
+ } else if (meridiem === 'emini') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
+ if (hour === 0) {
+ return 0;
+ }
+ return hour + 12;
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: '%d',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('sv', {
+ months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
+ weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
+ weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [kl.] HH:mm',
+ LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Idag] LT',
+ nextDay: '[Imorgon] LT',
+ lastDay: '[Igår] LT',
+ nextWeek: '[På] dddd LT',
+ lastWeek: '[I] dddd[s] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: 'för %s sedan',
+ s: 'några sekunder',
+ ss: '%d sekunder',
+ m: 'en minut',
+ mm: '%d minuter',
+ h: 'en timme',
+ hh: '%d timmar',
+ d: 'en dag',
+ dd: '%d dagar',
+ M: 'en månad',
+ MM: '%d månader',
+ y: 'ett år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? ':e'
+ : b === 1
+ ? ':a'
+ : b === 2
+ ? ':a'
+ : b === 3
+ ? ':e'
+ : ':e';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('sw', {
+ months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
+ weekdays:
+ 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
+ '_'
+ ),
+ weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
+ weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'hh:mm A',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[leo saa] LT',
+ nextDay: '[kesho saa] LT',
+ nextWeek: '[wiki ijayo] dddd [saat] LT',
+ lastDay: '[jana] LT',
+ lastWeek: '[wiki iliyopita] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s baadaye',
+ past: 'tokea %s',
+ s: 'hivi punde',
+ ss: 'sekunde %d',
+ m: 'dakika moja',
+ mm: 'dakika %d',
+ h: 'saa limoja',
+ hh: 'masaa %d',
+ d: 'siku moja',
+ dd: 'siku %d',
+ M: 'mwezi mmoja',
+ MM: 'miezi %d',
+ y: 'mwaka mmoja',
+ yy: 'miaka %d',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var symbolMap$g = {
+ 1: '௧',
+ 2: '௨',
+ 3: '௩',
+ 4: '௪',
+ 5: '௫',
+ 6: '௬',
+ 7: '௭',
+ 8: '௮',
+ 9: '௯',
+ 0: '௦',
+ },
+ numberMap$f = {
+ '௧': '1',
+ '௨': '2',
+ '௩': '3',
+ '௪': '4',
+ '௫': '5',
+ '௬': '6',
+ '௭': '7',
+ '௮': '8',
+ '௯': '9',
+ '௦': '0',
+ };
+
+ hooks.defineLocale('ta', {
+ months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
+ '_'
+ ),
+ weekdays:
+ 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
+ '_'
+ ),
+ weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
+ '_'
+ ),
+ weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, HH:mm',
+ LLLL: 'dddd, D MMMM YYYY, HH:mm',
+ },
+ calendar: {
+ sameDay: '[இன்று] LT',
+ nextDay: '[நாளை] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[நேற்று] LT',
+ lastWeek: '[கடந்த வாரம்] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s இல்',
+ past: '%s முன்',
+ s: 'ஒரு சில விநாடிகள்',
+ ss: '%d விநாடிகள்',
+ m: 'ஒரு நிமிடம்',
+ mm: '%d நிமிடங்கள்',
+ h: 'ஒரு மணி நேரம்',
+ hh: '%d மணி நேரம்',
+ d: 'ஒரு நாள்',
+ dd: '%d நாட்கள்',
+ M: 'ஒரு மாதம்',
+ MM: '%d மாதங்கள்',
+ y: 'ஒரு வருடம்',
+ yy: '%d ஆண்டுகள்',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}வது/,
+ ordinal: function (number) {
+ return number + 'வது';
+ },
+ preparse: function (string) {
+ return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
+ return numberMap$f[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap$g[match];
+ });
+ },
+ // refer http://ta.wikipedia.org/s/1er1
+ meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 2) {
+ return ' யாமம்';
+ } else if (hour < 6) {
+ return ' வைகறை'; // வைகறை
+ } else if (hour < 10) {
+ return ' காலை'; // காலை
+ } else if (hour < 14) {
+ return ' நண்பகல்'; // நண்பகல்
+ } else if (hour < 18) {
+ return ' எற்பாடு'; // எற்பாடு
+ } else if (hour < 22) {
+ return ' மாலை'; // மாலை
+ } else {
+ return ' யாமம்';
+ }
+ },
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'யாமம்') {
+ return hour < 2 ? hour : hour + 12;
+ } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
+ return hour;
+ } else if (meridiem === 'நண்பகல்') {
+ return hour >= 10 ? hour : hour + 12;
+ } else {
+ return hour + 12;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('te', {
+ months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
+ '_'
+ ),
+ monthsShort:
+ 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
+ '_'
+ ),
+ weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
+ weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[నేడు] LT',
+ nextDay: '[రేపు] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[నిన్న] LT',
+ lastWeek: '[గత] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s లో',
+ past: '%s క్రితం',
+ s: 'కొన్ని క్షణాలు',
+ ss: '%d సెకన్లు',
+ m: 'ఒక నిమిషం',
+ mm: '%d నిమిషాలు',
+ h: 'ఒక గంట',
+ hh: '%d గంటలు',
+ d: 'ఒక రోజు',
+ dd: '%d రోజులు',
+ M: 'ఒక నెల',
+ MM: '%d నెలలు',
+ y: 'ఒక సంవత్సరం',
+ yy: '%d సంవత్సరాలు',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}వ/,
+ ordinal: '%dవ',
+ meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'రాత్రి') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ఉదయం') {
+ return hour;
+ } else if (meridiem === 'మధ్యాహ్నం') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'సాయంత్రం') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'రాత్రి';
+ } else if (hour < 10) {
+ return 'ఉదయం';
+ } else if (hour < 17) {
+ return 'మధ్యాహ్నం';
+ } else if (hour < 20) {
+ return 'సాయంత్రం';
+ } else {
+ return 'రాత్రి';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('tet', {
+ months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
+ weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
+ weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
+ weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Ohin iha] LT',
+ nextDay: '[Aban iha] LT',
+ nextWeek: 'dddd [iha] LT',
+ lastDay: '[Horiseik iha] LT',
+ lastWeek: 'dddd [semana kotuk] [iha] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'iha %s',
+ past: '%s liuba',
+ s: 'segundu balun',
+ ss: 'segundu %d',
+ m: 'minutu ida',
+ mm: 'minutu %d',
+ h: 'oras ida',
+ hh: 'oras %d',
+ d: 'loron ida',
+ dd: 'loron %d',
+ M: 'fulan ida',
+ MM: 'fulan %d',
+ y: 'tinan ida',
+ yy: 'tinan %d',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes$3 = {
+ 0: '-ум',
+ 1: '-ум',
+ 2: '-юм',
+ 3: '-юм',
+ 4: '-ум',
+ 5: '-ум',
+ 6: '-ум',
+ 7: '-ум',
+ 8: '-ум',
+ 9: '-ум',
+ 10: '-ум',
+ 12: '-ум',
+ 13: '-ум',
+ 20: '-ум',
+ 30: '-юм',
+ 40: '-ум',
+ 50: '-ум',
+ 60: '-ум',
+ 70: '-ум',
+ 80: '-ум',
+ 90: '-ум',
+ 100: '-ум',
+ };
+
+ hooks.defineLocale('tg', {
+ months: {
+ format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
+ '_'
+ ),
+ standalone:
+ 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+ weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
+ '_'
+ ),
+ weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
+ weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Имрӯз соати] LT',
+ nextDay: '[Фардо соати] LT',
+ lastDay: '[Дирӯз соати] LT',
+ nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
+ lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'баъди %s',
+ past: '%s пеш',
+ s: 'якчанд сония',
+ m: 'як дақиқа',
+ mm: '%d дақиқа',
+ h: 'як соат',
+ hh: '%d соат',
+ d: 'як рӯз',
+ dd: '%d рӯз',
+ M: 'як моҳ',
+ MM: '%d моҳ',
+ y: 'як сол',
+ yy: '%d сол',
+ },
+ meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'шаб') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'субҳ') {
+ return hour;
+ } else if (meridiem === 'рӯз') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'бегоҳ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'шаб';
+ } else if (hour < 11) {
+ return 'субҳ';
+ } else if (hour < 16) {
+ return 'рӯз';
+ } else if (hour < 19) {
+ return 'бегоҳ';
+ } else {
+ return 'шаб';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes$3[number] || suffixes$3[a] || suffixes$3[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('th', {
+ months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
+ weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
+ weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY เวลา H:mm',
+ LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',
+ },
+ meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
+ isPM: function (input) {
+ return input === 'หลังเที่ยง';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ก่อนเที่ยง';
+ } else {
+ return 'หลังเที่ยง';
+ }
+ },
+ calendar: {
+ sameDay: '[วันนี้ เวลา] LT',
+ nextDay: '[พรุ่งนี้ เวลา] LT',
+ nextWeek: 'dddd[หน้า เวลา] LT',
+ lastDay: '[เมื่อวานนี้ เวลา] LT',
+ lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'อีก %s',
+ past: '%sที่แล้ว',
+ s: 'ไม่กี่วินาที',
+ ss: '%d วินาที',
+ m: '1 นาที',
+ mm: '%d นาที',
+ h: '1 ชั่วโมง',
+ hh: '%d ชั่วโมง',
+ d: '1 วัน',
+ dd: '%d วัน',
+ w: '1 สัปดาห์',
+ ww: '%d สัปดาห์',
+ M: '1 เดือน',
+ MM: '%d เดือน',
+ y: '1 ปี',
+ yy: '%d ปี',
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes$4 = {
+ 1: "'inji",
+ 5: "'inji",
+ 8: "'inji",
+ 70: "'inji",
+ 80: "'inji",
+ 2: "'nji",
+ 7: "'nji",
+ 20: "'nji",
+ 50: "'nji",
+ 3: "'ünji",
+ 4: "'ünji",
+ 100: "'ünji",
+ 6: "'njy",
+ 9: "'unjy",
+ 10: "'unjy",
+ 30: "'unjy",
+ 60: "'ynjy",
+ 90: "'ynjy",
+ };
+
+ hooks.defineLocale('tk', {
+ months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
+ weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
+ '_'
+ ),
+ weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
+ weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün sagat] LT',
+ nextDay: '[ertir sagat] LT',
+ nextWeek: '[indiki] dddd [sagat] LT',
+ lastDay: '[düýn] LT',
+ lastWeek: '[geçen] dddd [sagat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s soň',
+ past: '%s öň',
+ s: 'birnäçe sekunt',
+ m: 'bir minut',
+ mm: '%d minut',
+ h: 'bir sagat',
+ hh: '%d sagat',
+ d: 'bir gün',
+ dd: '%d gün',
+ M: 'bir aý',
+ MM: '%d aý',
+ y: 'bir ýyl',
+ yy: '%d ýyl',
+ },
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'Do':
+ case 'DD':
+ return number;
+ default:
+ if (number === 0) {
+ // special case for zero
+ return number + "'unjy";
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes$4[a] || suffixes$4[b] || suffixes$4[c]);
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('tl-ph', {
+ months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
+ '_'
+ ),
+ monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+ weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+ weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'MM/D/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY HH:mm',
+ LLLL: 'dddd, MMMM DD, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: 'LT [ngayong araw]',
+ nextDay: '[Bukas ng] LT',
+ nextWeek: 'LT [sa susunod na] dddd',
+ lastDay: 'LT [kahapon]',
+ lastWeek: 'LT [noong nakaraang] dddd',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'sa loob ng %s',
+ past: '%s ang nakalipas',
+ s: 'ilang segundo',
+ ss: '%d segundo',
+ m: 'isang minuto',
+ mm: '%d minuto',
+ h: 'isang oras',
+ hh: '%d oras',
+ d: 'isang araw',
+ dd: '%d araw',
+ M: 'isang buwan',
+ MM: '%d buwan',
+ y: 'isang taon',
+ yy: '%d taon',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
+
+ function translateFuture(output) {
+ var time = output;
+ time =
+ output.indexOf('jaj') !== -1
+ ? time.slice(0, -3) + 'leS'
+ : output.indexOf('jar') !== -1
+ ? time.slice(0, -3) + 'waQ'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'nem'
+ : time + ' pIq';
+ return time;
+ }
+
+ function translatePast(output) {
+ var time = output;
+ time =
+ output.indexOf('jaj') !== -1
+ ? time.slice(0, -3) + 'Hu’'
+ : output.indexOf('jar') !== -1
+ ? time.slice(0, -3) + 'wen'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'ben'
+ : time + ' ret';
+ return time;
+ }
+
+ function translate$a(number, withoutSuffix, string, isFuture) {
+ var numberNoun = numberAsNoun(number);
+ switch (string) {
+ case 'ss':
+ return numberNoun + ' lup';
+ case 'mm':
+ return numberNoun + ' tup';
+ case 'hh':
+ return numberNoun + ' rep';
+ case 'dd':
+ return numberNoun + ' jaj';
+ case 'MM':
+ return numberNoun + ' jar';
+ case 'yy':
+ return numberNoun + ' DIS';
+ }
+ }
+
+ function numberAsNoun(number) {
+ var hundred = Math.floor((number % 1000) / 100),
+ ten = Math.floor((number % 100) / 10),
+ one = number % 10,
+ word = '';
+ if (hundred > 0) {
+ word += numbersNouns[hundred] + 'vatlh';
+ }
+ if (ten > 0) {
+ word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
+ }
+ if (one > 0) {
+ word += (word !== '' ? ' ' : '') + numbersNouns[one];
+ }
+ return word === '' ? 'pagh' : word;
+ }
+
+ hooks.defineLocale('tlh', {
+ months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+ weekdaysMin:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[DaHjaj] LT',
+ nextDay: '[wa’leS] LT',
+ nextWeek: 'LLL',
+ lastDay: '[wa’Hu’] LT',
+ lastWeek: 'LLL',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: translateFuture,
+ past: translatePast,
+ s: 'puS lup',
+ ss: translate$a,
+ m: 'wa’ tup',
+ mm: translate$a,
+ h: 'wa’ rep',
+ hh: translate$a,
+ d: 'wa’ jaj',
+ dd: translate$a,
+ M: 'wa’ jar',
+ MM: translate$a,
+ y: 'wa’ DIS',
+ yy: translate$a,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var suffixes$5 = {
+ 1: "'inci",
+ 5: "'inci",
+ 8: "'inci",
+ 70: "'inci",
+ 80: "'inci",
+ 2: "'nci",
+ 7: "'nci",
+ 20: "'nci",
+ 50: "'nci",
+ 3: "'üncü",
+ 4: "'üncü",
+ 100: "'üncü",
+ 6: "'ncı",
+ 9: "'uncu",
+ 10: "'uncu",
+ 30: "'uncu",
+ 60: "'ıncı",
+ 90: "'ıncı",
+ };
+
+ hooks.defineLocale('tr', {
+ months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
+ '_'
+ ),
+ monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
+ weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
+ '_'
+ ),
+ weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),
+ weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'öö' : 'ÖÖ';
+ } else {
+ return isLower ? 'ös' : 'ÖS';
+ }
+ },
+ meridiemParse: /öö|ÖÖ|ös|ÖS/,
+ isPM: function (input) {
+ return input === 'ös' || input === 'ÖS';
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün saat] LT',
+ nextDay: '[yarın saat] LT',
+ nextWeek: '[gelecek] dddd [saat] LT',
+ lastDay: '[dün] LT',
+ lastWeek: '[geçen] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s sonra',
+ past: '%s önce',
+ s: 'birkaç saniye',
+ ss: '%d saniye',
+ m: 'bir dakika',
+ mm: '%d dakika',
+ h: 'bir saat',
+ hh: '%d saat',
+ d: 'bir gün',
+ dd: '%d gün',
+ w: 'bir hafta',
+ ww: '%d hafta',
+ M: 'bir ay',
+ MM: '%d ay',
+ y: 'bir yıl',
+ yy: '%d yıl',
+ },
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'Do':
+ case 'DD':
+ return number;
+ default:
+ if (number === 0) {
+ // special case for zero
+ return number + "'ıncı";
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes$5[a] || suffixes$5[b] || suffixes$5[c]);
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
+ // This is currently too difficult (maybe even impossible) to add.
+ hooks.defineLocale('tzl', {
+ months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
+ weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
+ weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
+ weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM [dallas] YYYY',
+ LLL: 'D. MMMM [dallas] YYYY HH.mm',
+ LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',
+ },
+ meridiemParse: /d\'o|d\'a/i,
+ isPM: function (input) {
+ return "d'o" === input.toLowerCase();
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? "d'o" : "D'O";
+ } else {
+ return isLower ? "d'a" : "D'A";
+ }
+ },
+ calendar: {
+ sameDay: '[oxhi à] LT',
+ nextDay: '[demà à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[ieiri à] LT',
+ lastWeek: '[sür el] dddd [lasteu à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'osprei %s',
+ past: 'ja%s',
+ s: processRelativeTime$8,
+ ss: processRelativeTime$8,
+ m: processRelativeTime$8,
+ mm: processRelativeTime$8,
+ h: processRelativeTime$8,
+ hh: processRelativeTime$8,
+ d: processRelativeTime$8,
+ dd: processRelativeTime$8,
+ M: processRelativeTime$8,
+ MM: processRelativeTime$8,
+ y: processRelativeTime$8,
+ yy: processRelativeTime$8,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ function processRelativeTime$8(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['viensas secunds', "'iensas secunds"],
+ ss: [number + ' secunds', '' + number + ' secunds'],
+ m: ["'n míut", "'iens míut"],
+ mm: [number + ' míuts', '' + number + ' míuts'],
+ h: ["'n þora", "'iensa þora"],
+ hh: [number + ' þoras', '' + number + ' þoras'],
+ d: ["'n ziua", "'iensa ziua"],
+ dd: [number + ' ziuas', '' + number + ' ziuas'],
+ M: ["'n mes", "'iens mes"],
+ MM: [number + ' mesen', '' + number + ' mesen'],
+ y: ["'n ar", "'iens ar"],
+ yy: [number + ' ars', '' + number + ' ars'],
+ };
+ return isFuture
+ ? format[key][0]
+ : withoutSuffix
+ ? format[key][0]
+ : format[key][1];
+ }
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('tzm-latn', {
+ months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
+ '_'
+ ),
+ monthsShort:
+ 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
+ '_'
+ ),
+ weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[asdkh g] LT',
+ nextDay: '[aska g] LT',
+ nextWeek: 'dddd [g] LT',
+ lastDay: '[assant g] LT',
+ lastWeek: 'dddd [g] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dadkh s yan %s',
+ past: 'yan %s',
+ s: 'imik',
+ ss: '%d imik',
+ m: 'minuḍ',
+ mm: '%d minuḍ',
+ h: 'saɛa',
+ hh: '%d tassaɛin',
+ d: 'ass',
+ dd: '%d ossan',
+ M: 'ayowr',
+ MM: '%d iyyirn',
+ y: 'asgas',
+ yy: '%d isgasn',
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('tzm', {
+ months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
+ '_'
+ ),
+ weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
+ nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
+ nextWeek: 'dddd [ⴴ] LT',
+ lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
+ lastWeek: 'dddd [ⴴ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
+ past: 'ⵢⴰⵏ %s',
+ s: 'ⵉⵎⵉⴽ',
+ ss: '%d ⵉⵎⵉⴽ',
+ m: 'ⵎⵉⵏⵓⴺ',
+ mm: '%d ⵎⵉⵏⵓⴺ',
+ h: 'ⵙⴰⵄⴰ',
+ hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
+ d: 'ⴰⵙⵙ',
+ dd: '%d oⵙⵙⴰⵏ',
+ M: 'ⴰⵢoⵓⵔ',
+ MM: '%d ⵉⵢⵢⵉⵔⵏ',
+ y: 'ⴰⵙⴳⴰⵙ',
+ yy: '%d ⵉⵙⴳⴰⵙⵏ',
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('ug-cn', {
+ months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
+ '_'
+ ),
+ weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
+ '_'
+ ),
+ weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
+ weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
+ LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
+ LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
+ },
+ meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ meridiem === 'يېرىم كېچە' ||
+ meridiem === 'سەھەر' ||
+ meridiem === 'چۈشتىن بۇرۇن'
+ ) {
+ return hour;
+ } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
+ return hour + 12;
+ } else {
+ return hour >= 11 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return 'يېرىم كېچە';
+ } else if (hm < 900) {
+ return 'سەھەر';
+ } else if (hm < 1130) {
+ return 'چۈشتىن بۇرۇن';
+ } else if (hm < 1230) {
+ return 'چۈش';
+ } else if (hm < 1800) {
+ return 'چۈشتىن كېيىن';
+ } else {
+ return 'كەچ';
+ }
+ },
+ calendar: {
+ sameDay: '[بۈگۈن سائەت] LT',
+ nextDay: '[ئەتە سائەت] LT',
+ nextWeek: '[كېلەركى] dddd [سائەت] LT',
+ lastDay: '[تۆنۈگۈن] LT',
+ lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s كېيىن',
+ past: '%s بۇرۇن',
+ s: 'نەچچە سېكونت',
+ ss: '%d سېكونت',
+ m: 'بىر مىنۇت',
+ mm: '%d مىنۇت',
+ h: 'بىر سائەت',
+ hh: '%d سائەت',
+ d: 'بىر كۈن',
+ dd: '%d كۈن',
+ M: 'بىر ئاي',
+ MM: '%d ئاي',
+ y: 'بىر يىل',
+ yy: '%d يىل',
+ },
+
+ dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '-كۈنى';
+ case 'w':
+ case 'W':
+ return number + '-ھەپتە';
+ default:
+ return number;
+ }
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ function plural$6(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+ }
+ function relativeTimeWithPlural$4(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
+ mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
+ hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
+ dd: 'день_дні_днів',
+ MM: 'місяць_місяці_місяців',
+ yy: 'рік_роки_років',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'хвилина' : 'хвилину';
+ } else if (key === 'h') {
+ return withoutSuffix ? 'година' : 'годину';
+ } else {
+ return number + ' ' + plural$6(format[key], +number);
+ }
+ }
+ function weekdaysCaseReplace(m, format) {
+ var weekdays = {
+ nominative:
+ 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
+ '_'
+ ),
+ accusative:
+ 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
+ '_'
+ ),
+ genitive:
+ 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
+ '_'
+ ),
+ },
+ nounCase;
+
+ if (m === true) {
+ return weekdays['nominative']
+ .slice(1, 7)
+ .concat(weekdays['nominative'].slice(0, 1));
+ }
+ if (!m) {
+ return weekdays['nominative'];
+ }
+
+ nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
+ ? 'accusative'
+ : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
+ ? 'genitive'
+ : 'nominative';
+ return weekdays[nounCase][m.day()];
+ }
+ function processHoursFunction(str) {
+ return function () {
+ return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
+ };
+ }
+
+ hooks.defineLocale('uk', {
+ months: {
+ format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
+ '_'
+ ),
+ standalone:
+ 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
+ '_'
+ ),
+ weekdays: weekdaysCaseReplace,
+ weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY р.',
+ LLL: 'D MMMM YYYY р., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY р., HH:mm',
+ },
+ calendar: {
+ sameDay: processHoursFunction('[Сьогодні '),
+ nextDay: processHoursFunction('[Завтра '),
+ lastDay: processHoursFunction('[Вчора '),
+ nextWeek: processHoursFunction('[У] dddd ['),
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 5:
+ case 6:
+ return processHoursFunction('[Минулої] dddd [').call(this);
+ case 1:
+ case 2:
+ case 4:
+ return processHoursFunction('[Минулого] dddd [').call(this);
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: '%s тому',
+ s: 'декілька секунд',
+ ss: relativeTimeWithPlural$4,
+ m: relativeTimeWithPlural$4,
+ mm: relativeTimeWithPlural$4,
+ h: 'годину',
+ hh: relativeTimeWithPlural$4,
+ d: 'день',
+ dd: relativeTimeWithPlural$4,
+ M: 'місяць',
+ MM: relativeTimeWithPlural$4,
+ y: 'рік',
+ yy: relativeTimeWithPlural$4,
+ },
+ // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
+ meridiemParse: /ночі|ранку|дня|вечора/,
+ isPM: function (input) {
+ return /^(дня|вечора)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночі';
+ } else if (hour < 12) {
+ return 'ранку';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечора';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ case 'w':
+ case 'W':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ var months$b = [
+ 'جنوری',
+ 'فروری',
+ 'مارچ',
+ 'اپریل',
+ 'مئی',
+ 'جون',
+ 'جولائی',
+ 'اگست',
+ 'ستمبر',
+ 'اکتوبر',
+ 'نومبر',
+ 'دسمبر',
+ ],
+ days$2 = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
+
+ hooks.defineLocale('ur', {
+ months: months$b,
+ monthsShort: months$b,
+ weekdays: days$2,
+ weekdaysShort: days$2,
+ weekdaysMin: days$2,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd، D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /صبح|شام/,
+ isPM: function (input) {
+ return 'شام' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'صبح';
+ }
+ return 'شام';
+ },
+ calendar: {
+ sameDay: '[آج بوقت] LT',
+ nextDay: '[کل بوقت] LT',
+ nextWeek: 'dddd [بوقت] LT',
+ lastDay: '[گذشتہ روز بوقت] LT',
+ lastWeek: '[گذشتہ] dddd [بوقت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s بعد',
+ past: '%s قبل',
+ s: 'چند سیکنڈ',
+ ss: '%d سیکنڈ',
+ m: 'ایک منٹ',
+ mm: '%d منٹ',
+ h: 'ایک گھنٹہ',
+ hh: '%d گھنٹے',
+ d: 'ایک دن',
+ dd: '%d دن',
+ M: 'ایک ماہ',
+ MM: '%d ماہ',
+ y: 'ایک سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('uz-latn', {
+ months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
+ weekdays:
+ 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
+ '_'
+ ),
+ weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
+ weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'D MMMM YYYY, dddd HH:mm',
+ },
+ calendar: {
+ sameDay: '[Bugun soat] LT [da]',
+ nextDay: '[Ertaga] LT [da]',
+ nextWeek: 'dddd [kuni soat] LT [da]',
+ lastDay: '[Kecha soat] LT [da]',
+ lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'Yaqin %s ichida',
+ past: 'Bir necha %s oldin',
+ s: 'soniya',
+ ss: '%d soniya',
+ m: 'bir daqiqa',
+ mm: '%d daqiqa',
+ h: 'bir soat',
+ hh: '%d soat',
+ d: 'bir kun',
+ dd: '%d kun',
+ M: 'bir oy',
+ MM: '%d oy',
+ y: 'bir yil',
+ yy: '%d yil',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('uz', {
+ months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
+ '_'
+ ),
+ monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+ weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
+ weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
+ weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'D MMMM YYYY, dddd HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бугун соат] LT [да]',
+ nextDay: '[Эртага] LT [да]',
+ nextWeek: 'dddd [куни соат] LT [да]',
+ lastDay: '[Кеча соат] LT [да]',
+ lastWeek: '[Утган] dddd [куни соат] LT [да]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'Якин %s ичида',
+ past: 'Бир неча %s олдин',
+ s: 'фурсат',
+ ss: '%d фурсат',
+ m: 'бир дакика',
+ mm: '%d дакика',
+ h: 'бир соат',
+ hh: '%d соат',
+ d: 'бир кун',
+ dd: '%d кун',
+ M: 'бир ой',
+ MM: '%d ой',
+ y: 'бир йил',
+ yy: '%d йил',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('vi', {
+ months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
+ '_'
+ ),
+ weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysParseExact: true,
+ meridiemParse: /sa|ch/i,
+ isPM: function (input) {
+ return /^ch$/i.test(input);
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'sa' : 'SA';
+ } else {
+ return isLower ? 'ch' : 'CH';
+ }
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [năm] YYYY',
+ LLL: 'D MMMM [năm] YYYY HH:mm',
+ LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
+ l: 'DD/M/YYYY',
+ ll: 'D MMM YYYY',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd, D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hôm nay lúc] LT',
+ nextDay: '[Ngày mai lúc] LT',
+ nextWeek: 'dddd [tuần tới lúc] LT',
+ lastDay: '[Hôm qua lúc] LT',
+ lastWeek: 'dddd [tuần trước lúc] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s tới',
+ past: '%s trước',
+ s: 'vài giây',
+ ss: '%d giây',
+ m: 'một phút',
+ mm: '%d phút',
+ h: 'một giờ',
+ hh: '%d giờ',
+ d: 'một ngày',
+ dd: '%d ngày',
+ w: 'một tuần',
+ ww: '%d tuần',
+ M: 'một tháng',
+ MM: '%d tháng',
+ y: 'một năm',
+ yy: '%d năm',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('x-pseudo', {
+ months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
+ '_'
+ ),
+ monthsShort:
+ 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
+ '_'
+ ),
+ weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
+ weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[T~ódá~ý át] LT',
+ nextDay: '[T~ómó~rró~w át] LT',
+ nextWeek: 'dddd [át] LT',
+ lastDay: '[Ý~ést~érdá~ý át] LT',
+ lastWeek: '[L~ást] dddd [át] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'í~ñ %s',
+ past: '%s á~gó',
+ s: 'á ~féw ~sécó~ñds',
+ ss: '%d s~écóñ~ds',
+ m: 'á ~míñ~úté',
+ mm: '%d m~íñú~tés',
+ h: 'á~ñ hó~úr',
+ hh: '%d h~óúrs',
+ d: 'á ~dáý',
+ dd: '%d d~áýs',
+ M: 'á ~móñ~th',
+ MM: '%d m~óñt~hs',
+ y: 'á ~ýéár',
+ yy: '%d ý~éárs',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('yo', {
+ months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
+ '_'
+ ),
+ monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
+ weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
+ weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
+ weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Ònì ni] LT',
+ nextDay: '[Ọ̀la ni] LT',
+ nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
+ lastDay: '[Àna ni] LT',
+ lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ní %s',
+ past: '%s kọjá',
+ s: 'ìsẹjú aayá die',
+ ss: 'aayá %d',
+ m: 'ìsẹjú kan',
+ mm: 'ìsẹjú %d',
+ h: 'wákati kan',
+ hh: 'wákati %d',
+ d: 'ọjọ́ kan',
+ dd: 'ọjọ́ %d',
+ M: 'osù kan',
+ MM: 'osù %d',
+ y: 'ọdún kan',
+ yy: 'ọdún %d',
+ },
+ dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
+ ordinal: 'ọjọ́ %d',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('zh-cn', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日Ah点mm分',
+ LLLL: 'YYYY年M月D日ddddAh点mm分',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ } else {
+ // '中午'
+ return hour >= 11 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天]LT',
+ nextDay: '[明天]LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ return '[下]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
+ lastDay: '[昨天]LT',
+ lastWeek: function (now) {
+ if (this.week() !== now.week()) {
+ return '[上]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '周';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s后',
+ past: '%s前',
+ s: '几秒',
+ ss: '%d 秒',
+ m: '1 分钟',
+ mm: '%d 分钟',
+ h: '1 小时',
+ hh: '%d 小时',
+ d: '1 天',
+ dd: '%d 天',
+ w: '1 周',
+ ww: '%d 周',
+ M: '1 个月',
+ MM: '%d 个月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ week: {
+ // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('zh-hk', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1200) {
+ return '上午';
+ } else if (hm === 1200) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天]LT',
+ nextDay: '[明天]LT',
+ nextWeek: '[下]ddddLT',
+ lastDay: '[昨天]LT',
+ lastWeek: '[上]ddddLT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('zh-mo', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'D/M/YYYY',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天] LT',
+ nextDay: '[明天] LT',
+ nextWeek: '[下]dddd LT',
+ lastDay: '[昨天] LT',
+ lastWeek: '[上]dddd LT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s內',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ });
+
+ //! moment.js locale configuration
+
+ hooks.defineLocale('zh-tw', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天] LT',
+ nextDay: '[明天] LT',
+ nextWeek: '[下]dddd LT',
+ lastDay: '[昨天] LT',
+ lastWeek: '[上]dddd LT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ });
+
+ hooks.locale('en');
+
+ return hooks;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/min/moment.min.js b/vendor/assets/javascripts/momentjs/min/moment.min.js
new file mode 100644
index 000000000..2f0867ed1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/min/moment.min.js
@@ -0,0 +1 @@
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var H;function f(){return H.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function F(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function o(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i>>0,s=0;sAe(e)?(r=e+1,t-Ae(e)):(r=e,t);return{year:r,dayOfYear:n}}function qe(e,t,n){var s,i,r=ze(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+P(i=e.year()-1,t,n):r>P(e.year(),t,n)?(s=r-P(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function P(e,t,n){var s=ze(e,t,n),t=ze(e+1,t,n);return(Ae(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),t("week","w"),t("isoWeek","W"),n("week",5),n("isoWeek",5),v("w",p),v("ww",p,w),v("W",p),v("WW",p,w),Te(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=g(e)});function Be(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),t("day","d"),t("weekday","e"),t("isoWeekday","E"),n("day",11),n("weekday",11),n("isoWeekday",11),v("d",p),v("e",p),v("E",p),v("dd",function(e,t){return t.weekdaysMinRegex(e)}),v("ddd",function(e,t){return t.weekdaysShortRegex(e)}),v("dddd",function(e,t){return t.weekdaysRegex(e)}),Te(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:m(n).invalidWeekday=e}),Te(["d","e","E"],function(e,t,n,s){t[s]=g(e)});var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=k,et=k,tt=k;function nt(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=M(this.weekdaysMin(s,"")),n=M(this.weekdaysShort(s,"")),s=M(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function st(){return this.hours()%12||12}function it(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,st),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),it("a",!0),it("A",!1),t("hour","h"),n("hour",13),v("a",rt),v("A",rt),v("H",p),v("h",p),v("k",p),v("HH",p,w),v("hh",p,w),v("kk",p,w),v("hmm",ge),v("hmmss",we),v("Hmm",ge),v("Hmmss",we),D(["H","HH"],x),D(["k","kk"],function(e,t,n){e=g(e);t[x]=24===e?0:e}),D(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),D(["h","hh"],function(e,t,n){t[x]=g(e),m(n).bigHour=!0}),D("hmm",function(e,t,n){var s=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s)),m(n).bigHour=!0}),D("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s,2)),t[N]=g(e.substr(i)),m(n).bigHour=!0}),D("Hmm",function(e,t,n){var s=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s))}),D("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s,2)),t[N]=g(e.substr(i))});k=de("Hours",!0);var at,ot={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:Ue,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Xe,weekdaysShort:Qe,meridiemParse:/[ap]\.?m?\.?/i},R={},ut={};function lt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s=t-1)break;t--}r++}return at}function dt(t){var e;if(void 0===R[t]&&"undefined"!=typeof module&&module&&module.exports&&null!=t.match("^[^/\\\\]*$"))try{e=at._abbr,require("./locale/"+t),ct(e)}catch(e){R[t]=null}return R[t]}function ct(e,t){return e&&((t=o(t)?mt(e):ft(e,t))?at=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),at._abbr}function ft(e,t){if(null===t)return delete R[e],null;var n,s=ot;if(t.abbr=e,null!=R[e])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=R[e]._config;else if(null!=t.parentLocale)if(null!=R[t.parentLocale])s=R[t.parentLocale]._config;else{if(null==(n=dt(t.parentLocale)))return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;s=n._config}return R[e]=new K(X(s,t)),ut[e]&&ut[e].forEach(function(e){ft(e.name,e.config)}),ct(e),R[e]}function mt(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return at;if(!a(e)){if(t=dt(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===m(e).overflow&&(t=t[O]<0||11We(t[Y],t[O])?b:t[x]<0||24P(r,u,l)?m(s)._overflowWeeks=!0:null!=h?m(s)._overflowWeekday=!0:(d=$e(r,a,o,u,l),s._a[Y]=d.year,s._dayOfYear=d.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[Y],n[Y]),(e._dayOfYear>Ae(i)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),h=Ze(i,0,e._dayOfYear),e._a[O]=h.getUTCMonth(),e._a[b]=h.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[x]&&0===e._a[T]&&0===e._a[N]&&0===e._a[Ne]&&(e._nextDay=!0,e._a[x]=0),e._d=(e._useUTC?Ze:je).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[x]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(m(e).weekdayMismatch=!0)}}function Tt(e){if(e._f===f.ISO_8601)St(e);else if(e._f===f.RFC_2822)Ot(e);else{e._a=[],m(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],h=l.length,d=0;de.valueOf():e.valueOf()"}),i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},i.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},i.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},i.isLocal=function(){return!!this.isValid()&&!this._isUTC},i.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},i.isUtc=At,i.isUTC=At,i.zoneAbbr=function(){return this._isUTC?"UTC":""},i.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},i.dates=e("dates accessor is deprecated. Use date instead.",ke),i.months=e("months accessor is deprecated. Use month instead",Ge),i.years=e("years accessor is deprecated. Use year instead",Ie),i.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),i.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e,t={};return $(t,this),(t=Nt(t))._a?(e=(t._isUTC?l:W)(t._a),this._isDSTShifted=this.isValid()&&0>> 0,
+ i;
+
+ for (i = 0; i < len; i++) {
+ if (i in t && fun.call(this, t[i], i, t)) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+ }
+
+ function isValid(m) {
+ if (m._isValid == null) {
+ var flags = getParsingFlags(m),
+ parsedParts = some.call(flags.parsedDateParts, function (i) {
+ return i != null;
+ }),
+ isNowValid =
+ !isNaN(m._d.getTime()) &&
+ flags.overflow < 0 &&
+ !flags.empty &&
+ !flags.invalidEra &&
+ !flags.invalidMonth &&
+ !flags.invalidWeekday &&
+ !flags.weekdayMismatch &&
+ !flags.nullInput &&
+ !flags.invalidFormat &&
+ !flags.userInvalidated &&
+ (!flags.meridiem || (flags.meridiem && parsedParts));
+
+ if (m._strict) {
+ isNowValid =
+ isNowValid &&
+ flags.charsLeftOver === 0 &&
+ flags.unusedTokens.length === 0 &&
+ flags.bigHour === undefined;
+ }
+
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
+ m._isValid = isNowValid;
+ } else {
+ return isNowValid;
+ }
+ }
+ return m._isValid;
+ }
+
+ function createInvalid(flags) {
+ var m = createUTC(NaN);
+ if (flags != null) {
+ extend(getParsingFlags(m), flags);
+ } else {
+ getParsingFlags(m).userInvalidated = true;
+ }
+
+ return m;
+ }
+
+ // Plugins that add properties should also add the key here (null value),
+ // so we can properly clone ourselves.
+ var momentProperties = (hooks.momentProperties = []),
+ updateInProgress = false;
+
+ function copyConfig(to, from) {
+ var i,
+ prop,
+ val,
+ momentPropertiesLen = momentProperties.length;
+
+ if (!isUndefined(from._isAMomentObject)) {
+ to._isAMomentObject = from._isAMomentObject;
+ }
+ if (!isUndefined(from._i)) {
+ to._i = from._i;
+ }
+ if (!isUndefined(from._f)) {
+ to._f = from._f;
+ }
+ if (!isUndefined(from._l)) {
+ to._l = from._l;
+ }
+ if (!isUndefined(from._strict)) {
+ to._strict = from._strict;
+ }
+ if (!isUndefined(from._tzm)) {
+ to._tzm = from._tzm;
+ }
+ if (!isUndefined(from._isUTC)) {
+ to._isUTC = from._isUTC;
+ }
+ if (!isUndefined(from._offset)) {
+ to._offset = from._offset;
+ }
+ if (!isUndefined(from._pf)) {
+ to._pf = getParsingFlags(from);
+ }
+ if (!isUndefined(from._locale)) {
+ to._locale = from._locale;
+ }
+
+ if (momentPropertiesLen > 0) {
+ for (i = 0; i < momentPropertiesLen; i++) {
+ prop = momentProperties[i];
+ val = from[prop];
+ if (!isUndefined(val)) {
+ to[prop] = val;
+ }
+ }
+ }
+
+ return to;
+ }
+
+ // Moment prototype object
+ function Moment(config) {
+ copyConfig(this, config);
+ this._d = new Date(config._d != null ? config._d.getTime() : NaN);
+ if (!this.isValid()) {
+ this._d = new Date(NaN);
+ }
+ // Prevent infinite loop in case updateOffset creates new moment
+ // objects.
+ if (updateInProgress === false) {
+ updateInProgress = true;
+ hooks.updateOffset(this);
+ updateInProgress = false;
+ }
+ }
+
+ function isMoment(obj) {
+ return (
+ obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
+ );
+ }
+
+ function warn(msg) {
+ if (
+ hooks.suppressDeprecationWarnings === false &&
+ typeof console !== 'undefined' &&
+ console.warn
+ ) {
+ console.warn('Deprecation warning: ' + msg);
+ }
+ }
+
+ function deprecate(msg, fn) {
+ var firstTime = true;
+
+ return extend(function () {
+ if (hooks.deprecationHandler != null) {
+ hooks.deprecationHandler(null, msg);
+ }
+ if (firstTime) {
+ var args = [],
+ arg,
+ i,
+ key,
+ argLen = arguments.length;
+ for (i = 0; i < argLen; i++) {
+ arg = '';
+ if (typeof arguments[i] === 'object') {
+ arg += '\n[' + i + '] ';
+ for (key in arguments[0]) {
+ if (hasOwnProp(arguments[0], key)) {
+ arg += key + ': ' + arguments[0][key] + ', ';
+ }
+ }
+ arg = arg.slice(0, -2); // Remove trailing comma and space
+ } else {
+ arg = arguments[i];
+ }
+ args.push(arg);
+ }
+ warn(
+ msg +
+ '\nArguments: ' +
+ Array.prototype.slice.call(args).join('') +
+ '\n' +
+ new Error().stack
+ );
+ firstTime = false;
+ }
+ return fn.apply(this, arguments);
+ }, fn);
+ }
+
+ var deprecations = {};
+
+ function deprecateSimple(name, msg) {
+ if (hooks.deprecationHandler != null) {
+ hooks.deprecationHandler(name, msg);
+ }
+ if (!deprecations[name]) {
+ warn(msg);
+ deprecations[name] = true;
+ }
+ }
+
+ hooks.suppressDeprecationWarnings = false;
+ hooks.deprecationHandler = null;
+
+ function isFunction(input) {
+ return (
+ (typeof Function !== 'undefined' && input instanceof Function) ||
+ Object.prototype.toString.call(input) === '[object Function]'
+ );
+ }
+
+ function set(config) {
+ var prop, i;
+ for (i in config) {
+ if (hasOwnProp(config, i)) {
+ prop = config[i];
+ if (isFunction(prop)) {
+ this[i] = prop;
+ } else {
+ this['_' + i] = prop;
+ }
+ }
+ }
+ this._config = config;
+ // Lenient ordinal parsing accepts just a number in addition to
+ // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
+ // TODO: Remove "ordinalParse" fallback in next major release.
+ this._dayOfMonthOrdinalParseLenient = new RegExp(
+ (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
+ '|' +
+ /\d{1,2}/.source
+ );
+ }
+
+ function mergeConfigs(parentConfig, childConfig) {
+ var res = extend({}, parentConfig),
+ prop;
+ for (prop in childConfig) {
+ if (hasOwnProp(childConfig, prop)) {
+ if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
+ res[prop] = {};
+ extend(res[prop], parentConfig[prop]);
+ extend(res[prop], childConfig[prop]);
+ } else if (childConfig[prop] != null) {
+ res[prop] = childConfig[prop];
+ } else {
+ delete res[prop];
+ }
+ }
+ }
+ for (prop in parentConfig) {
+ if (
+ hasOwnProp(parentConfig, prop) &&
+ !hasOwnProp(childConfig, prop) &&
+ isObject(parentConfig[prop])
+ ) {
+ // make sure changes to properties don't modify parent config
+ res[prop] = extend({}, res[prop]);
+ }
+ }
+ return res;
+ }
+
+ function Locale(config) {
+ if (config != null) {
+ this.set(config);
+ }
+ }
+
+ var keys;
+
+ if (Object.keys) {
+ keys = Object.keys;
+ } else {
+ keys = function (obj) {
+ var i,
+ res = [];
+ for (i in obj) {
+ if (hasOwnProp(obj, i)) {
+ res.push(i);
+ }
+ }
+ return res;
+ };
+ }
+
+ var defaultCalendar = {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ };
+
+ function calendar(key, mom, now) {
+ var output = this._calendar[key] || this._calendar['sameElse'];
+ return isFunction(output) ? output.call(mom, now) : output;
+ }
+
+ function zeroFill(number, targetLength, forceSign) {
+ var absNumber = '' + Math.abs(number),
+ zerosToFill = targetLength - absNumber.length,
+ sign = number >= 0;
+ return (
+ (sign ? (forceSign ? '+' : '') : '-') +
+ Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
+ absNumber
+ );
+ }
+
+ var formattingTokens =
+ /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
+ localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
+ formatFunctions = {},
+ formatTokenFunctions = {};
+
+ // token: 'M'
+ // padded: ['MM', 2]
+ // ordinal: 'Mo'
+ // callback: function () { this.month() + 1 }
+ function addFormatToken(token, padded, ordinal, callback) {
+ var func = callback;
+ if (typeof callback === 'string') {
+ func = function () {
+ return this[callback]();
+ };
+ }
+ if (token) {
+ formatTokenFunctions[token] = func;
+ }
+ if (padded) {
+ formatTokenFunctions[padded[0]] = function () {
+ return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
+ };
+ }
+ if (ordinal) {
+ formatTokenFunctions[ordinal] = function () {
+ return this.localeData().ordinal(
+ func.apply(this, arguments),
+ token
+ );
+ };
+ }
+ }
+
+ function removeFormattingTokens(input) {
+ if (input.match(/\[[\s\S]/)) {
+ return input.replace(/^\[|\]$/g, '');
+ }
+ return input.replace(/\\/g, '');
+ }
+
+ function makeFormatFunction(format) {
+ var array = format.match(formattingTokens),
+ i,
+ length;
+
+ for (i = 0, length = array.length; i < length; i++) {
+ if (formatTokenFunctions[array[i]]) {
+ array[i] = formatTokenFunctions[array[i]];
+ } else {
+ array[i] = removeFormattingTokens(array[i]);
+ }
+ }
+
+ return function (mom) {
+ var output = '',
+ i;
+ for (i = 0; i < length; i++) {
+ output += isFunction(array[i])
+ ? array[i].call(mom, format)
+ : array[i];
+ }
+ return output;
+ };
+ }
+
+ // format date using native date object
+ function formatMoment(m, format) {
+ if (!m.isValid()) {
+ return m.localeData().invalidDate();
+ }
+
+ format = expandFormat(format, m.localeData());
+ formatFunctions[format] =
+ formatFunctions[format] || makeFormatFunction(format);
+
+ return formatFunctions[format](m);
+ }
+
+ function expandFormat(format, locale) {
+ var i = 5;
+
+ function replaceLongDateFormatTokens(input) {
+ return locale.longDateFormat(input) || input;
+ }
+
+ localFormattingTokens.lastIndex = 0;
+ while (i >= 0 && localFormattingTokens.test(format)) {
+ format = format.replace(
+ localFormattingTokens,
+ replaceLongDateFormatTokens
+ );
+ localFormattingTokens.lastIndex = 0;
+ i -= 1;
+ }
+
+ return format;
+ }
+
+ var defaultLongDateFormat = {
+ LTS: 'h:mm:ss A',
+ LT: 'h:mm A',
+ L: 'MM/DD/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY h:mm A',
+ LLLL: 'dddd, MMMM D, YYYY h:mm A',
+ };
+
+ function longDateFormat(key) {
+ var format = this._longDateFormat[key],
+ formatUpper = this._longDateFormat[key.toUpperCase()];
+
+ if (format || !formatUpper) {
+ return format;
+ }
+
+ this._longDateFormat[key] = formatUpper
+ .match(formattingTokens)
+ .map(function (tok) {
+ if (
+ tok === 'MMMM' ||
+ tok === 'MM' ||
+ tok === 'DD' ||
+ tok === 'dddd'
+ ) {
+ return tok.slice(1);
+ }
+ return tok;
+ })
+ .join('');
+
+ return this._longDateFormat[key];
+ }
+
+ var defaultInvalidDate = 'Invalid date';
+
+ function invalidDate() {
+ return this._invalidDate;
+ }
+
+ var defaultOrdinal = '%d',
+ defaultDayOfMonthOrdinalParse = /\d{1,2}/;
+
+ function ordinal(number) {
+ return this._ordinal.replace('%d', number);
+ }
+
+ var defaultRelativeTime = {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ w: 'a week',
+ ww: '%d weeks',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ };
+
+ function relativeTime(number, withoutSuffix, string, isFuture) {
+ var output = this._relativeTime[string];
+ return isFunction(output)
+ ? output(number, withoutSuffix, string, isFuture)
+ : output.replace(/%d/i, number);
+ }
+
+ function pastFuture(diff, output) {
+ var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
+ return isFunction(format) ? format(output) : format.replace(/%s/i, output);
+ }
+
+ var aliases = {};
+
+ function addUnitAlias(unit, shorthand) {
+ var lowerCase = unit.toLowerCase();
+ aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
+ }
+
+ function normalizeUnits(units) {
+ return typeof units === 'string'
+ ? aliases[units] || aliases[units.toLowerCase()]
+ : undefined;
+ }
+
+ function normalizeObjectUnits(inputObject) {
+ var normalizedInput = {},
+ normalizedProp,
+ prop;
+
+ for (prop in inputObject) {
+ if (hasOwnProp(inputObject, prop)) {
+ normalizedProp = normalizeUnits(prop);
+ if (normalizedProp) {
+ normalizedInput[normalizedProp] = inputObject[prop];
+ }
+ }
+ }
+
+ return normalizedInput;
+ }
+
+ var priorities = {};
+
+ function addUnitPriority(unit, priority) {
+ priorities[unit] = priority;
+ }
+
+ function getPrioritizedUnits(unitsObj) {
+ var units = [],
+ u;
+ for (u in unitsObj) {
+ if (hasOwnProp(unitsObj, u)) {
+ units.push({ unit: u, priority: priorities[u] });
+ }
+ }
+ units.sort(function (a, b) {
+ return a.priority - b.priority;
+ });
+ return units;
+ }
+
+ function isLeapYear(year) {
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
+ }
+
+ function absFloor(number) {
+ if (number < 0) {
+ // -0 -> 0
+ return Math.ceil(number) || 0;
+ } else {
+ return Math.floor(number);
+ }
+ }
+
+ function toInt(argumentForCoercion) {
+ var coercedNumber = +argumentForCoercion,
+ value = 0;
+
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
+ value = absFloor(coercedNumber);
+ }
+
+ return value;
+ }
+
+ function makeGetSet(unit, keepTime) {
+ return function (value) {
+ if (value != null) {
+ set$1(this, unit, value);
+ hooks.updateOffset(this, keepTime);
+ return this;
+ } else {
+ return get(this, unit);
+ }
+ };
+ }
+
+ function get(mom, unit) {
+ return mom.isValid()
+ ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
+ : NaN;
+ }
+
+ function set$1(mom, unit, value) {
+ if (mom.isValid() && !isNaN(value)) {
+ if (
+ unit === 'FullYear' &&
+ isLeapYear(mom.year()) &&
+ mom.month() === 1 &&
+ mom.date() === 29
+ ) {
+ value = toInt(value);
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
+ value,
+ mom.month(),
+ daysInMonth(value, mom.month())
+ );
+ } else {
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
+ }
+ }
+ }
+
+ // MOMENTS
+
+ function stringGet(units) {
+ units = normalizeUnits(units);
+ if (isFunction(this[units])) {
+ return this[units]();
+ }
+ return this;
+ }
+
+ function stringSet(units, value) {
+ if (typeof units === 'object') {
+ units = normalizeObjectUnits(units);
+ var prioritized = getPrioritizedUnits(units),
+ i,
+ prioritizedLen = prioritized.length;
+ for (i = 0; i < prioritizedLen; i++) {
+ this[prioritized[i].unit](units[prioritized[i].unit]);
+ }
+ } else {
+ units = normalizeUnits(units);
+ if (isFunction(this[units])) {
+ return this[units](value);
+ }
+ }
+ return this;
+ }
+
+ var match1 = /\d/, // 0 - 9
+ match2 = /\d\d/, // 00 - 99
+ match3 = /\d{3}/, // 000 - 999
+ match4 = /\d{4}/, // 0000 - 9999
+ match6 = /[+-]?\d{6}/, // -999999 - 999999
+ match1to2 = /\d\d?/, // 0 - 99
+ match3to4 = /\d\d\d\d?/, // 999 - 9999
+ match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
+ match1to3 = /\d{1,3}/, // 0 - 999
+ match1to4 = /\d{1,4}/, // 0 - 9999
+ match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
+ matchUnsigned = /\d+/, // 0 - inf
+ matchSigned = /[+-]?\d+/, // -inf - inf
+ matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
+ matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
+ matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
+ // any word (or two) characters or numbers including two/three word month in arabic.
+ // includes scottish gaelic two word and hyphenated months
+ matchWord =
+ /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
+ regexes;
+
+ regexes = {};
+
+ function addRegexToken(token, regex, strictRegex) {
+ regexes[token] = isFunction(regex)
+ ? regex
+ : function (isStrict, localeData) {
+ return isStrict && strictRegex ? strictRegex : regex;
+ };
+ }
+
+ function getParseRegexForToken(token, config) {
+ if (!hasOwnProp(regexes, token)) {
+ return new RegExp(unescapeFormat(token));
+ }
+
+ return regexes[token](config._strict, config._locale);
+ }
+
+ // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
+ function unescapeFormat(s) {
+ return regexEscape(
+ s
+ .replace('\\', '')
+ .replace(
+ /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
+ function (matched, p1, p2, p3, p4) {
+ return p1 || p2 || p3 || p4;
+ }
+ )
+ );
+ }
+
+ function regexEscape(s) {
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+ }
+
+ var tokens = {};
+
+ function addParseToken(token, callback) {
+ var i,
+ func = callback,
+ tokenLen;
+ if (typeof token === 'string') {
+ token = [token];
+ }
+ if (isNumber(callback)) {
+ func = function (input, array) {
+ array[callback] = toInt(input);
+ };
+ }
+ tokenLen = token.length;
+ for (i = 0; i < tokenLen; i++) {
+ tokens[token[i]] = func;
+ }
+ }
+
+ function addWeekParseToken(token, callback) {
+ addParseToken(token, function (input, array, config, token) {
+ config._w = config._w || {};
+ callback(input, config._w, config, token);
+ });
+ }
+
+ function addTimeToArrayFromToken(token, input, config) {
+ if (input != null && hasOwnProp(tokens, token)) {
+ tokens[token](input, config._a, config, token);
+ }
+ }
+
+ var YEAR = 0,
+ MONTH = 1,
+ DATE = 2,
+ HOUR = 3,
+ MINUTE = 4,
+ SECOND = 5,
+ MILLISECOND = 6,
+ WEEK = 7,
+ WEEKDAY = 8;
+
+ function mod(n, x) {
+ return ((n % x) + x) % x;
+ }
+
+ var indexOf;
+
+ if (Array.prototype.indexOf) {
+ indexOf = Array.prototype.indexOf;
+ } else {
+ indexOf = function (o) {
+ // I know
+ var i;
+ for (i = 0; i < this.length; ++i) {
+ if (this[i] === o) {
+ return i;
+ }
+ }
+ return -1;
+ };
+ }
+
+ function daysInMonth(year, month) {
+ if (isNaN(year) || isNaN(month)) {
+ return NaN;
+ }
+ var modMonth = mod(month, 12);
+ year += (month - modMonth) / 12;
+ return modMonth === 1
+ ? isLeapYear(year)
+ ? 29
+ : 28
+ : 31 - ((modMonth % 7) % 2);
+ }
+
+ // FORMATTING
+
+ addFormatToken('M', ['MM', 2], 'Mo', function () {
+ return this.month() + 1;
+ });
+
+ addFormatToken('MMM', 0, 0, function (format) {
+ return this.localeData().monthsShort(this, format);
+ });
+
+ addFormatToken('MMMM', 0, 0, function (format) {
+ return this.localeData().months(this, format);
+ });
+
+ // ALIASES
+
+ addUnitAlias('month', 'M');
+
+ // PRIORITY
+
+ addUnitPriority('month', 8);
+
+ // PARSING
+
+ addRegexToken('M', match1to2);
+ addRegexToken('MM', match1to2, match2);
+ addRegexToken('MMM', function (isStrict, locale) {
+ return locale.monthsShortRegex(isStrict);
+ });
+ addRegexToken('MMMM', function (isStrict, locale) {
+ return locale.monthsRegex(isStrict);
+ });
+
+ addParseToken(['M', 'MM'], function (input, array) {
+ array[MONTH] = toInt(input) - 1;
+ });
+
+ addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
+ var month = config._locale.monthsParse(input, token, config._strict);
+ // if we didn't find a month name, mark the date as invalid.
+ if (month != null) {
+ array[MONTH] = month;
+ } else {
+ getParsingFlags(config).invalidMonth = input;
+ }
+ });
+
+ // LOCALES
+
+ var defaultLocaleMonths =
+ 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ defaultLocaleMonthsShort =
+ 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
+ defaultMonthsShortRegex = matchWord,
+ defaultMonthsRegex = matchWord;
+
+ function localeMonths(m, format) {
+ if (!m) {
+ return isArray(this._months)
+ ? this._months
+ : this._months['standalone'];
+ }
+ return isArray(this._months)
+ ? this._months[m.month()]
+ : this._months[
+ (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
+ ? 'format'
+ : 'standalone'
+ ][m.month()];
+ }
+
+ function localeMonthsShort(m, format) {
+ if (!m) {
+ return isArray(this._monthsShort)
+ ? this._monthsShort
+ : this._monthsShort['standalone'];
+ }
+ return isArray(this._monthsShort)
+ ? this._monthsShort[m.month()]
+ : this._monthsShort[
+ MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
+ ][m.month()];
+ }
+
+ function handleStrictParse(monthName, format, strict) {
+ var i,
+ ii,
+ mom,
+ llc = monthName.toLocaleLowerCase();
+ if (!this._monthsParse) {
+ // this is not used
+ this._monthsParse = [];
+ this._longMonthsParse = [];
+ this._shortMonthsParse = [];
+ for (i = 0; i < 12; ++i) {
+ mom = createUTC([2000, i]);
+ this._shortMonthsParse[i] = this.monthsShort(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
+ }
+ }
+
+ if (strict) {
+ if (format === 'MMM') {
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._longMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ } else {
+ if (format === 'MMM') {
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._longMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._longMonthsParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ }
+ }
+
+ function localeMonthsParse(monthName, format, strict) {
+ var i, mom, regex;
+
+ if (this._monthsParseExact) {
+ return handleStrictParse.call(this, monthName, format, strict);
+ }
+
+ if (!this._monthsParse) {
+ this._monthsParse = [];
+ this._longMonthsParse = [];
+ this._shortMonthsParse = [];
+ }
+
+ // TODO: add sorting
+ // Sorting makes sure if one month (or abbr) is a prefix of another
+ // see sorting in computeMonthsParse
+ for (i = 0; i < 12; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, i]);
+ if (strict && !this._longMonthsParse[i]) {
+ this._longMonthsParse[i] = new RegExp(
+ '^' + this.months(mom, '').replace('.', '') + '$',
+ 'i'
+ );
+ this._shortMonthsParse[i] = new RegExp(
+ '^' + this.monthsShort(mom, '').replace('.', '') + '$',
+ 'i'
+ );
+ }
+ if (!strict && !this._monthsParse[i]) {
+ regex =
+ '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
+ this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (
+ strict &&
+ format === 'MMMM' &&
+ this._longMonthsParse[i].test(monthName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'MMM' &&
+ this._shortMonthsParse[i].test(monthName)
+ ) {
+ return i;
+ } else if (!strict && this._monthsParse[i].test(monthName)) {
+ return i;
+ }
+ }
+ }
+
+ // MOMENTS
+
+ function setMonth(mom, value) {
+ var dayOfMonth;
+
+ if (!mom.isValid()) {
+ // No op
+ return mom;
+ }
+
+ if (typeof value === 'string') {
+ if (/^\d+$/.test(value)) {
+ value = toInt(value);
+ } else {
+ value = mom.localeData().monthsParse(value);
+ // TODO: Another silent failure?
+ if (!isNumber(value)) {
+ return mom;
+ }
+ }
+ }
+
+ dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
+ return mom;
+ }
+
+ function getSetMonth(value) {
+ if (value != null) {
+ setMonth(this, value);
+ hooks.updateOffset(this, true);
+ return this;
+ } else {
+ return get(this, 'Month');
+ }
+ }
+
+ function getDaysInMonth() {
+ return daysInMonth(this.year(), this.month());
+ }
+
+ function monthsShortRegex(isStrict) {
+ if (this._monthsParseExact) {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ computeMonthsParse.call(this);
+ }
+ if (isStrict) {
+ return this._monthsShortStrictRegex;
+ } else {
+ return this._monthsShortRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_monthsShortRegex')) {
+ this._monthsShortRegex = defaultMonthsShortRegex;
+ }
+ return this._monthsShortStrictRegex && isStrict
+ ? this._monthsShortStrictRegex
+ : this._monthsShortRegex;
+ }
+ }
+
+ function monthsRegex(isStrict) {
+ if (this._monthsParseExact) {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ computeMonthsParse.call(this);
+ }
+ if (isStrict) {
+ return this._monthsStrictRegex;
+ } else {
+ return this._monthsRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ this._monthsRegex = defaultMonthsRegex;
+ }
+ return this._monthsStrictRegex && isStrict
+ ? this._monthsStrictRegex
+ : this._monthsRegex;
+ }
+ }
+
+ function computeMonthsParse() {
+ function cmpLenRev(a, b) {
+ return b.length - a.length;
+ }
+
+ var shortPieces = [],
+ longPieces = [],
+ mixedPieces = [],
+ i,
+ mom;
+ for (i = 0; i < 12; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, i]);
+ shortPieces.push(this.monthsShort(mom, ''));
+ longPieces.push(this.months(mom, ''));
+ mixedPieces.push(this.months(mom, ''));
+ mixedPieces.push(this.monthsShort(mom, ''));
+ }
+ // Sorting makes sure if one month (or abbr) is a prefix of another it
+ // will match the longer piece.
+ shortPieces.sort(cmpLenRev);
+ longPieces.sort(cmpLenRev);
+ mixedPieces.sort(cmpLenRev);
+ for (i = 0; i < 12; i++) {
+ shortPieces[i] = regexEscape(shortPieces[i]);
+ longPieces[i] = regexEscape(longPieces[i]);
+ }
+ for (i = 0; i < 24; i++) {
+ mixedPieces[i] = regexEscape(mixedPieces[i]);
+ }
+
+ this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._monthsShortRegex = this._monthsRegex;
+ this._monthsStrictRegex = new RegExp(
+ '^(' + longPieces.join('|') + ')',
+ 'i'
+ );
+ this._monthsShortStrictRegex = new RegExp(
+ '^(' + shortPieces.join('|') + ')',
+ 'i'
+ );
+ }
+
+ // FORMATTING
+
+ addFormatToken('Y', 0, 0, function () {
+ var y = this.year();
+ return y <= 9999 ? zeroFill(y, 4) : '+' + y;
+ });
+
+ addFormatToken(0, ['YY', 2], 0, function () {
+ return this.year() % 100;
+ });
+
+ addFormatToken(0, ['YYYY', 4], 0, 'year');
+ addFormatToken(0, ['YYYYY', 5], 0, 'year');
+ addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
+
+ // ALIASES
+
+ addUnitAlias('year', 'y');
+
+ // PRIORITIES
+
+ addUnitPriority('year', 1);
+
+ // PARSING
+
+ addRegexToken('Y', matchSigned);
+ addRegexToken('YY', match1to2, match2);
+ addRegexToken('YYYY', match1to4, match4);
+ addRegexToken('YYYYY', match1to6, match6);
+ addRegexToken('YYYYYY', match1to6, match6);
+
+ addParseToken(['YYYYY', 'YYYYYY'], YEAR);
+ addParseToken('YYYY', function (input, array) {
+ array[YEAR] =
+ input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
+ });
+ addParseToken('YY', function (input, array) {
+ array[YEAR] = hooks.parseTwoDigitYear(input);
+ });
+ addParseToken('Y', function (input, array) {
+ array[YEAR] = parseInt(input, 10);
+ });
+
+ // HELPERS
+
+ function daysInYear(year) {
+ return isLeapYear(year) ? 366 : 365;
+ }
+
+ // HOOKS
+
+ hooks.parseTwoDigitYear = function (input) {
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
+ };
+
+ // MOMENTS
+
+ var getSetYear = makeGetSet('FullYear', true);
+
+ function getIsLeapYear() {
+ return isLeapYear(this.year());
+ }
+
+ function createDate(y, m, d, h, M, s, ms) {
+ // can't just apply() to create a date:
+ // https://stackoverflow.com/q/181348
+ var date;
+ // the date constructor remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ date = new Date(y + 400, m, d, h, M, s, ms);
+ if (isFinite(date.getFullYear())) {
+ date.setFullYear(y);
+ }
+ } else {
+ date = new Date(y, m, d, h, M, s, ms);
+ }
+
+ return date;
+ }
+
+ function createUTCDate(y) {
+ var date, args;
+ // the Date.UTC function remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ args = Array.prototype.slice.call(arguments);
+ // preserve leap years using a full 400 year cycle, then reset
+ args[0] = y + 400;
+ date = new Date(Date.UTC.apply(null, args));
+ if (isFinite(date.getUTCFullYear())) {
+ date.setUTCFullYear(y);
+ }
+ } else {
+ date = new Date(Date.UTC.apply(null, arguments));
+ }
+
+ return date;
+ }
+
+ // start-of-first-week - start-of-year
+ function firstWeekOffset(year, dow, doy) {
+ var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
+ fwd = 7 + dow - doy,
+ // first-week day local weekday -- which local weekday is fwd
+ fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
+
+ return -fwdlw + fwd - 1;
+ }
+
+ // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
+ function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
+ var localWeekday = (7 + weekday - dow) % 7,
+ weekOffset = firstWeekOffset(year, dow, doy),
+ dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
+ resYear,
+ resDayOfYear;
+
+ if (dayOfYear <= 0) {
+ resYear = year - 1;
+ resDayOfYear = daysInYear(resYear) + dayOfYear;
+ } else if (dayOfYear > daysInYear(year)) {
+ resYear = year + 1;
+ resDayOfYear = dayOfYear - daysInYear(year);
+ } else {
+ resYear = year;
+ resDayOfYear = dayOfYear;
+ }
+
+ return {
+ year: resYear,
+ dayOfYear: resDayOfYear,
+ };
+ }
+
+ function weekOfYear(mom, dow, doy) {
+ var weekOffset = firstWeekOffset(mom.year(), dow, doy),
+ week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
+ resWeek,
+ resYear;
+
+ if (week < 1) {
+ resYear = mom.year() - 1;
+ resWeek = week + weeksInYear(resYear, dow, doy);
+ } else if (week > weeksInYear(mom.year(), dow, doy)) {
+ resWeek = week - weeksInYear(mom.year(), dow, doy);
+ resYear = mom.year() + 1;
+ } else {
+ resYear = mom.year();
+ resWeek = week;
+ }
+
+ return {
+ week: resWeek,
+ year: resYear,
+ };
+ }
+
+ function weeksInYear(year, dow, doy) {
+ var weekOffset = firstWeekOffset(year, dow, doy),
+ weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
+ return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
+ }
+
+ // FORMATTING
+
+ addFormatToken('w', ['ww', 2], 'wo', 'week');
+ addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
+
+ // ALIASES
+
+ addUnitAlias('week', 'w');
+ addUnitAlias('isoWeek', 'W');
+
+ // PRIORITIES
+
+ addUnitPriority('week', 5);
+ addUnitPriority('isoWeek', 5);
+
+ // PARSING
+
+ addRegexToken('w', match1to2);
+ addRegexToken('ww', match1to2, match2);
+ addRegexToken('W', match1to2);
+ addRegexToken('WW', match1to2, match2);
+
+ addWeekParseToken(
+ ['w', 'ww', 'W', 'WW'],
+ function (input, week, config, token) {
+ week[token.substr(0, 1)] = toInt(input);
+ }
+ );
+
+ // HELPERS
+
+ // LOCALES
+
+ function localeWeek(mom) {
+ return weekOfYear(mom, this._week.dow, this._week.doy).week;
+ }
+
+ var defaultLocaleWeek = {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ };
+
+ function localeFirstDayOfWeek() {
+ return this._week.dow;
+ }
+
+ function localeFirstDayOfYear() {
+ return this._week.doy;
+ }
+
+ // MOMENTS
+
+ function getSetWeek(input) {
+ var week = this.localeData().week(this);
+ return input == null ? week : this.add((input - week) * 7, 'd');
+ }
+
+ function getSetISOWeek(input) {
+ var week = weekOfYear(this, 1, 4).week;
+ return input == null ? week : this.add((input - week) * 7, 'd');
+ }
+
+ // FORMATTING
+
+ addFormatToken('d', 0, 'do', 'day');
+
+ addFormatToken('dd', 0, 0, function (format) {
+ return this.localeData().weekdaysMin(this, format);
+ });
+
+ addFormatToken('ddd', 0, 0, function (format) {
+ return this.localeData().weekdaysShort(this, format);
+ });
+
+ addFormatToken('dddd', 0, 0, function (format) {
+ return this.localeData().weekdays(this, format);
+ });
+
+ addFormatToken('e', 0, 0, 'weekday');
+ addFormatToken('E', 0, 0, 'isoWeekday');
+
+ // ALIASES
+
+ addUnitAlias('day', 'd');
+ addUnitAlias('weekday', 'e');
+ addUnitAlias('isoWeekday', 'E');
+
+ // PRIORITY
+ addUnitPriority('day', 11);
+ addUnitPriority('weekday', 11);
+ addUnitPriority('isoWeekday', 11);
+
+ // PARSING
+
+ addRegexToken('d', match1to2);
+ addRegexToken('e', match1to2);
+ addRegexToken('E', match1to2);
+ addRegexToken('dd', function (isStrict, locale) {
+ return locale.weekdaysMinRegex(isStrict);
+ });
+ addRegexToken('ddd', function (isStrict, locale) {
+ return locale.weekdaysShortRegex(isStrict);
+ });
+ addRegexToken('dddd', function (isStrict, locale) {
+ return locale.weekdaysRegex(isStrict);
+ });
+
+ addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
+ var weekday = config._locale.weekdaysParse(input, token, config._strict);
+ // if we didn't get a weekday name, mark the date as invalid
+ if (weekday != null) {
+ week.d = weekday;
+ } else {
+ getParsingFlags(config).invalidWeekday = input;
+ }
+ });
+
+ addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
+ week[token] = toInt(input);
+ });
+
+ // HELPERS
+
+ function parseWeekday(input, locale) {
+ if (typeof input !== 'string') {
+ return input;
+ }
+
+ if (!isNaN(input)) {
+ return parseInt(input, 10);
+ }
+
+ input = locale.weekdaysParse(input);
+ if (typeof input === 'number') {
+ return input;
+ }
+
+ return null;
+ }
+
+ function parseIsoWeekday(input, locale) {
+ if (typeof input === 'string') {
+ return locale.weekdaysParse(input) % 7 || 7;
+ }
+ return isNaN(input) ? null : input;
+ }
+
+ // LOCALES
+ function shiftWeekdays(ws, n) {
+ return ws.slice(n, 7).concat(ws.slice(0, n));
+ }
+
+ var defaultLocaleWeekdays =
+ 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ defaultWeekdaysRegex = matchWord,
+ defaultWeekdaysShortRegex = matchWord,
+ defaultWeekdaysMinRegex = matchWord;
+
+ function localeWeekdays(m, format) {
+ var weekdays = isArray(this._weekdays)
+ ? this._weekdays
+ : this._weekdays[
+ m && m !== true && this._weekdays.isFormat.test(format)
+ ? 'format'
+ : 'standalone'
+ ];
+ return m === true
+ ? shiftWeekdays(weekdays, this._week.dow)
+ : m
+ ? weekdays[m.day()]
+ : weekdays;
+ }
+
+ function localeWeekdaysShort(m) {
+ return m === true
+ ? shiftWeekdays(this._weekdaysShort, this._week.dow)
+ : m
+ ? this._weekdaysShort[m.day()]
+ : this._weekdaysShort;
+ }
+
+ function localeWeekdaysMin(m) {
+ return m === true
+ ? shiftWeekdays(this._weekdaysMin, this._week.dow)
+ : m
+ ? this._weekdaysMin[m.day()]
+ : this._weekdaysMin;
+ }
+
+ function handleStrictParse$1(weekdayName, format, strict) {
+ var i,
+ ii,
+ mom,
+ llc = weekdayName.toLocaleLowerCase();
+ if (!this._weekdaysParse) {
+ this._weekdaysParse = [];
+ this._shortWeekdaysParse = [];
+ this._minWeekdaysParse = [];
+
+ for (i = 0; i < 7; ++i) {
+ mom = createUTC([2000, 1]).day(i);
+ this._minWeekdaysParse[i] = this.weekdaysMin(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._shortWeekdaysParse[i] = this.weekdaysShort(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
+ }
+ }
+
+ if (strict) {
+ if (format === 'dddd') {
+ ii = indexOf.call(this._weekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else if (format === 'ddd') {
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ } else {
+ if (format === 'dddd') {
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else if (format === 'ddd') {
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ }
+ }
+
+ function localeWeekdaysParse(weekdayName, format, strict) {
+ var i, mom, regex;
+
+ if (this._weekdaysParseExact) {
+ return handleStrictParse$1.call(this, weekdayName, format, strict);
+ }
+
+ if (!this._weekdaysParse) {
+ this._weekdaysParse = [];
+ this._minWeekdaysParse = [];
+ this._shortWeekdaysParse = [];
+ this._fullWeekdaysParse = [];
+ }
+
+ for (i = 0; i < 7; i++) {
+ // make the regex if we don't have it already
+
+ mom = createUTC([2000, 1]).day(i);
+ if (strict && !this._fullWeekdaysParse[i]) {
+ this._fullWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ this._shortWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ this._minWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ }
+ if (!this._weekdaysParse[i]) {
+ regex =
+ '^' +
+ this.weekdays(mom, '') +
+ '|^' +
+ this.weekdaysShort(mom, '') +
+ '|^' +
+ this.weekdaysMin(mom, '');
+ this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (
+ strict &&
+ format === 'dddd' &&
+ this._fullWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'ddd' &&
+ this._shortWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'dd' &&
+ this._minWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
+ return i;
+ }
+ }
+ }
+
+ // MOMENTS
+
+ function getSetDayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
+ if (input != null) {
+ input = parseWeekday(input, this.localeData());
+ return this.add(input - day, 'd');
+ } else {
+ return day;
+ }
+ }
+
+ function getSetLocaleDayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
+ return input == null ? weekday : this.add(input - weekday, 'd');
+ }
+
+ function getSetISODayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+
+ // behaves the same as moment#day except
+ // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
+ // as a setter, sunday should belong to the previous week.
+
+ if (input != null) {
+ var weekday = parseIsoWeekday(input, this.localeData());
+ return this.day(this.day() % 7 ? weekday : weekday - 7);
+ } else {
+ return this.day() || 7;
+ }
+ }
+
+ function weekdaysRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysStrictRegex;
+ } else {
+ return this._weekdaysRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ this._weekdaysRegex = defaultWeekdaysRegex;
+ }
+ return this._weekdaysStrictRegex && isStrict
+ ? this._weekdaysStrictRegex
+ : this._weekdaysRegex;
+ }
+ }
+
+ function weekdaysShortRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysShortStrictRegex;
+ } else {
+ return this._weekdaysShortRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysShortRegex')) {
+ this._weekdaysShortRegex = defaultWeekdaysShortRegex;
+ }
+ return this._weekdaysShortStrictRegex && isStrict
+ ? this._weekdaysShortStrictRegex
+ : this._weekdaysShortRegex;
+ }
+ }
+
+ function weekdaysMinRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysMinStrictRegex;
+ } else {
+ return this._weekdaysMinRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysMinRegex')) {
+ this._weekdaysMinRegex = defaultWeekdaysMinRegex;
+ }
+ return this._weekdaysMinStrictRegex && isStrict
+ ? this._weekdaysMinStrictRegex
+ : this._weekdaysMinRegex;
+ }
+ }
+
+ function computeWeekdaysParse() {
+ function cmpLenRev(a, b) {
+ return b.length - a.length;
+ }
+
+ var minPieces = [],
+ shortPieces = [],
+ longPieces = [],
+ mixedPieces = [],
+ i,
+ mom,
+ minp,
+ shortp,
+ longp;
+ for (i = 0; i < 7; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, 1]).day(i);
+ minp = regexEscape(this.weekdaysMin(mom, ''));
+ shortp = regexEscape(this.weekdaysShort(mom, ''));
+ longp = regexEscape(this.weekdays(mom, ''));
+ minPieces.push(minp);
+ shortPieces.push(shortp);
+ longPieces.push(longp);
+ mixedPieces.push(minp);
+ mixedPieces.push(shortp);
+ mixedPieces.push(longp);
+ }
+ // Sorting makes sure if one weekday (or abbr) is a prefix of another it
+ // will match the longer piece.
+ minPieces.sort(cmpLenRev);
+ shortPieces.sort(cmpLenRev);
+ longPieces.sort(cmpLenRev);
+ mixedPieces.sort(cmpLenRev);
+
+ this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._weekdaysShortRegex = this._weekdaysRegex;
+ this._weekdaysMinRegex = this._weekdaysRegex;
+
+ this._weekdaysStrictRegex = new RegExp(
+ '^(' + longPieces.join('|') + ')',
+ 'i'
+ );
+ this._weekdaysShortStrictRegex = new RegExp(
+ '^(' + shortPieces.join('|') + ')',
+ 'i'
+ );
+ this._weekdaysMinStrictRegex = new RegExp(
+ '^(' + minPieces.join('|') + ')',
+ 'i'
+ );
+ }
+
+ // FORMATTING
+
+ function hFormat() {
+ return this.hours() % 12 || 12;
+ }
+
+ function kFormat() {
+ return this.hours() || 24;
+ }
+
+ addFormatToken('H', ['HH', 2], 0, 'hour');
+ addFormatToken('h', ['hh', 2], 0, hFormat);
+ addFormatToken('k', ['kk', 2], 0, kFormat);
+
+ addFormatToken('hmm', 0, 0, function () {
+ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
+ });
+
+ addFormatToken('hmmss', 0, 0, function () {
+ return (
+ '' +
+ hFormat.apply(this) +
+ zeroFill(this.minutes(), 2) +
+ zeroFill(this.seconds(), 2)
+ );
+ });
+
+ addFormatToken('Hmm', 0, 0, function () {
+ return '' + this.hours() + zeroFill(this.minutes(), 2);
+ });
+
+ addFormatToken('Hmmss', 0, 0, function () {
+ return (
+ '' +
+ this.hours() +
+ zeroFill(this.minutes(), 2) +
+ zeroFill(this.seconds(), 2)
+ );
+ });
+
+ function meridiem(token, lowercase) {
+ addFormatToken(token, 0, 0, function () {
+ return this.localeData().meridiem(
+ this.hours(),
+ this.minutes(),
+ lowercase
+ );
+ });
+ }
+
+ meridiem('a', true);
+ meridiem('A', false);
+
+ // ALIASES
+
+ addUnitAlias('hour', 'h');
+
+ // PRIORITY
+ addUnitPriority('hour', 13);
+
+ // PARSING
+
+ function matchMeridiem(isStrict, locale) {
+ return locale._meridiemParse;
+ }
+
+ addRegexToken('a', matchMeridiem);
+ addRegexToken('A', matchMeridiem);
+ addRegexToken('H', match1to2);
+ addRegexToken('h', match1to2);
+ addRegexToken('k', match1to2);
+ addRegexToken('HH', match1to2, match2);
+ addRegexToken('hh', match1to2, match2);
+ addRegexToken('kk', match1to2, match2);
+
+ addRegexToken('hmm', match3to4);
+ addRegexToken('hmmss', match5to6);
+ addRegexToken('Hmm', match3to4);
+ addRegexToken('Hmmss', match5to6);
+
+ addParseToken(['H', 'HH'], HOUR);
+ addParseToken(['k', 'kk'], function (input, array, config) {
+ var kInput = toInt(input);
+ array[HOUR] = kInput === 24 ? 0 : kInput;
+ });
+ addParseToken(['a', 'A'], function (input, array, config) {
+ config._isPm = config._locale.isPM(input);
+ config._meridiem = input;
+ });
+ addParseToken(['h', 'hh'], function (input, array, config) {
+ array[HOUR] = toInt(input);
+ getParsingFlags(config).bigHour = true;
+ });
+ addParseToken('hmm', function (input, array, config) {
+ var pos = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos));
+ array[MINUTE] = toInt(input.substr(pos));
+ getParsingFlags(config).bigHour = true;
+ });
+ addParseToken('hmmss', function (input, array, config) {
+ var pos1 = input.length - 4,
+ pos2 = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos1));
+ array[MINUTE] = toInt(input.substr(pos1, 2));
+ array[SECOND] = toInt(input.substr(pos2));
+ getParsingFlags(config).bigHour = true;
+ });
+ addParseToken('Hmm', function (input, array, config) {
+ var pos = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos));
+ array[MINUTE] = toInt(input.substr(pos));
+ });
+ addParseToken('Hmmss', function (input, array, config) {
+ var pos1 = input.length - 4,
+ pos2 = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos1));
+ array[MINUTE] = toInt(input.substr(pos1, 2));
+ array[SECOND] = toInt(input.substr(pos2));
+ });
+
+ // LOCALES
+
+ function localeIsPM(input) {
+ // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
+ // Using charAt should be more compatible.
+ return (input + '').toLowerCase().charAt(0) === 'p';
+ }
+
+ var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
+ // Setting the hour should keep the time, because the user explicitly
+ // specified which hour they want. So trying to maintain the same hour (in
+ // a new timezone) makes sense. Adding/subtracting hours does not follow
+ // this rule.
+ getSetHour = makeGetSet('Hours', true);
+
+ function localeMeridiem(hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'pm' : 'PM';
+ } else {
+ return isLower ? 'am' : 'AM';
+ }
+ }
+
+ var baseConfig = {
+ calendar: defaultCalendar,
+ longDateFormat: defaultLongDateFormat,
+ invalidDate: defaultInvalidDate,
+ ordinal: defaultOrdinal,
+ dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
+ relativeTime: defaultRelativeTime,
+
+ months: defaultLocaleMonths,
+ monthsShort: defaultLocaleMonthsShort,
+
+ week: defaultLocaleWeek,
+
+ weekdays: defaultLocaleWeekdays,
+ weekdaysMin: defaultLocaleWeekdaysMin,
+ weekdaysShort: defaultLocaleWeekdaysShort,
+
+ meridiemParse: defaultLocaleMeridiemParse,
+ };
+
+ // internal storage for locale config files
+ var locales = {},
+ localeFamilies = {},
+ globalLocale;
+
+ function commonPrefix(arr1, arr2) {
+ var i,
+ minl = Math.min(arr1.length, arr2.length);
+ for (i = 0; i < minl; i += 1) {
+ if (arr1[i] !== arr2[i]) {
+ return i;
+ }
+ }
+ return minl;
+ }
+
+ function normalizeLocale(key) {
+ return key ? key.toLowerCase().replace('_', '-') : key;
+ }
+
+ // pick the locale from the array
+ // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
+ // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
+ function chooseLocale(names) {
+ var i = 0,
+ j,
+ next,
+ locale,
+ split;
+
+ while (i < names.length) {
+ split = normalizeLocale(names[i]).split('-');
+ j = split.length;
+ next = normalizeLocale(names[i + 1]);
+ next = next ? next.split('-') : null;
+ while (j > 0) {
+ locale = loadLocale(split.slice(0, j).join('-'));
+ if (locale) {
+ return locale;
+ }
+ if (
+ next &&
+ next.length >= j &&
+ commonPrefix(split, next) >= j - 1
+ ) {
+ //the next array item is better than a shallower substring of this one
+ break;
+ }
+ j--;
+ }
+ i++;
+ }
+ return globalLocale;
+ }
+
+ function isLocaleNameSane(name) {
+ // Prevent names that look like filesystem paths, i.e contain '/' or '\'
+ return name.match('^[^/\\\\]*$') != null;
+ }
+
+ function loadLocale(name) {
+ var oldLocale = null,
+ aliasedRequire;
+ // TODO: Find a better way to register and load all the locales in Node
+ if (
+ locales[name] === undefined &&
+ typeof module !== 'undefined' &&
+ module &&
+ module.exports &&
+ isLocaleNameSane(name)
+ ) {
+ try {
+ oldLocale = globalLocale._abbr;
+ aliasedRequire = require;
+ aliasedRequire('./locale/' + name);
+ getSetGlobalLocale(oldLocale);
+ } catch (e) {
+ // mark as not found to avoid repeating expensive file require call causing high CPU
+ // when trying to find en-US, en_US, en-us for every format call
+ locales[name] = null; // null means not found
+ }
+ }
+ return locales[name];
+ }
+
+ // This function will load locale and then set the global locale. If
+ // no arguments are passed in, it will simply return the current global
+ // locale key.
+ function getSetGlobalLocale(key, values) {
+ var data;
+ if (key) {
+ if (isUndefined(values)) {
+ data = getLocale(key);
+ } else {
+ data = defineLocale(key, values);
+ }
+
+ if (data) {
+ // moment.duration._locale = moment._locale = data;
+ globalLocale = data;
+ } else {
+ if (typeof console !== 'undefined' && console.warn) {
+ //warn user if arguments are passed but the locale could not be set
+ console.warn(
+ 'Locale ' + key + ' not found. Did you forget to load it?'
+ );
+ }
+ }
+ }
+
+ return globalLocale._abbr;
+ }
+
+ function defineLocale(name, config) {
+ if (config !== null) {
+ var locale,
+ parentConfig = baseConfig;
+ config.abbr = name;
+ if (locales[name] != null) {
+ deprecateSimple(
+ 'defineLocaleOverride',
+ 'use moment.updateLocale(localeName, config) to change ' +
+ 'an existing locale. moment.defineLocale(localeName, ' +
+ 'config) should only be used for creating a new locale ' +
+ 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
+ );
+ parentConfig = locales[name]._config;
+ } else if (config.parentLocale != null) {
+ if (locales[config.parentLocale] != null) {
+ parentConfig = locales[config.parentLocale]._config;
+ } else {
+ locale = loadLocale(config.parentLocale);
+ if (locale != null) {
+ parentConfig = locale._config;
+ } else {
+ if (!localeFamilies[config.parentLocale]) {
+ localeFamilies[config.parentLocale] = [];
+ }
+ localeFamilies[config.parentLocale].push({
+ name: name,
+ config: config,
+ });
+ return null;
+ }
+ }
+ }
+ locales[name] = new Locale(mergeConfigs(parentConfig, config));
+
+ if (localeFamilies[name]) {
+ localeFamilies[name].forEach(function (x) {
+ defineLocale(x.name, x.config);
+ });
+ }
+
+ // backwards compat for now: also set the locale
+ // make sure we set the locale AFTER all child locales have been
+ // created, so we won't end up with the child locale set.
+ getSetGlobalLocale(name);
+
+ return locales[name];
+ } else {
+ // useful for testing
+ delete locales[name];
+ return null;
+ }
+ }
+
+ function updateLocale(name, config) {
+ if (config != null) {
+ var locale,
+ tmpLocale,
+ parentConfig = baseConfig;
+
+ if (locales[name] != null && locales[name].parentLocale != null) {
+ // Update existing child locale in-place to avoid memory-leaks
+ locales[name].set(mergeConfigs(locales[name]._config, config));
+ } else {
+ // MERGE
+ tmpLocale = loadLocale(name);
+ if (tmpLocale != null) {
+ parentConfig = tmpLocale._config;
+ }
+ config = mergeConfigs(parentConfig, config);
+ if (tmpLocale == null) {
+ // updateLocale is called for creating a new locale
+ // Set abbr so it will have a name (getters return
+ // undefined otherwise).
+ config.abbr = name;
+ }
+ locale = new Locale(config);
+ locale.parentLocale = locales[name];
+ locales[name] = locale;
+ }
+
+ // backwards compat for now: also set the locale
+ getSetGlobalLocale(name);
+ } else {
+ // pass null for config to unupdate, useful for tests
+ if (locales[name] != null) {
+ if (locales[name].parentLocale != null) {
+ locales[name] = locales[name].parentLocale;
+ if (name === getSetGlobalLocale()) {
+ getSetGlobalLocale(name);
+ }
+ } else if (locales[name] != null) {
+ delete locales[name];
+ }
+ }
+ }
+ return locales[name];
+ }
+
+ // returns locale data
+ function getLocale(key) {
+ var locale;
+
+ if (key && key._locale && key._locale._abbr) {
+ key = key._locale._abbr;
+ }
+
+ if (!key) {
+ return globalLocale;
+ }
+
+ if (!isArray(key)) {
+ //short-circuit everything else
+ locale = loadLocale(key);
+ if (locale) {
+ return locale;
+ }
+ key = [key];
+ }
+
+ return chooseLocale(key);
+ }
+
+ function listLocales() {
+ return keys(locales);
+ }
+
+ function checkOverflow(m) {
+ var overflow,
+ a = m._a;
+
+ if (a && getParsingFlags(m).overflow === -2) {
+ overflow =
+ a[MONTH] < 0 || a[MONTH] > 11
+ ? MONTH
+ : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
+ ? DATE
+ : a[HOUR] < 0 ||
+ a[HOUR] > 24 ||
+ (a[HOUR] === 24 &&
+ (a[MINUTE] !== 0 ||
+ a[SECOND] !== 0 ||
+ a[MILLISECOND] !== 0))
+ ? HOUR
+ : a[MINUTE] < 0 || a[MINUTE] > 59
+ ? MINUTE
+ : a[SECOND] < 0 || a[SECOND] > 59
+ ? SECOND
+ : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
+ ? MILLISECOND
+ : -1;
+
+ if (
+ getParsingFlags(m)._overflowDayOfYear &&
+ (overflow < YEAR || overflow > DATE)
+ ) {
+ overflow = DATE;
+ }
+ if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
+ overflow = WEEK;
+ }
+ if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
+ overflow = WEEKDAY;
+ }
+
+ getParsingFlags(m).overflow = overflow;
+ }
+
+ return m;
+ }
+
+ // iso 8601 regex
+ // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
+ var extendedIsoRegex =
+ /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+ basicIsoRegex =
+ /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+ tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
+ isoDates = [
+ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
+ ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
+ ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
+ ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
+ ['YYYY-DDD', /\d{4}-\d{3}/],
+ ['YYYY-MM', /\d{4}-\d\d/, false],
+ ['YYYYYYMMDD', /[+-]\d{10}/],
+ ['YYYYMMDD', /\d{8}/],
+ ['GGGG[W]WWE', /\d{4}W\d{3}/],
+ ['GGGG[W]WW', /\d{4}W\d{2}/, false],
+ ['YYYYDDD', /\d{7}/],
+ ['YYYYMM', /\d{6}/, false],
+ ['YYYY', /\d{4}/, false],
+ ],
+ // iso time formats and regexes
+ isoTimes = [
+ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
+ ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
+ ['HH:mm:ss', /\d\d:\d\d:\d\d/],
+ ['HH:mm', /\d\d:\d\d/],
+ ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
+ ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
+ ['HHmmss', /\d\d\d\d\d\d/],
+ ['HHmm', /\d\d\d\d/],
+ ['HH', /\d\d/],
+ ],
+ aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
+ // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
+ rfc2822 =
+ /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
+ obsOffsets = {
+ UT: 0,
+ GMT: 0,
+ EDT: -4 * 60,
+ EST: -5 * 60,
+ CDT: -5 * 60,
+ CST: -6 * 60,
+ MDT: -6 * 60,
+ MST: -7 * 60,
+ PDT: -7 * 60,
+ PST: -8 * 60,
+ };
+
+ // date from iso format
+ function configFromISO(config) {
+ var i,
+ l,
+ string = config._i,
+ match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
+ allowTime,
+ dateFormat,
+ timeFormat,
+ tzFormat,
+ isoDatesLen = isoDates.length,
+ isoTimesLen = isoTimes.length;
+
+ if (match) {
+ getParsingFlags(config).iso = true;
+ for (i = 0, l = isoDatesLen; i < l; i++) {
+ if (isoDates[i][1].exec(match[1])) {
+ dateFormat = isoDates[i][0];
+ allowTime = isoDates[i][2] !== false;
+ break;
+ }
+ }
+ if (dateFormat == null) {
+ config._isValid = false;
+ return;
+ }
+ if (match[3]) {
+ for (i = 0, l = isoTimesLen; i < l; i++) {
+ if (isoTimes[i][1].exec(match[3])) {
+ // match[2] should be 'T' or space
+ timeFormat = (match[2] || ' ') + isoTimes[i][0];
+ break;
+ }
+ }
+ if (timeFormat == null) {
+ config._isValid = false;
+ return;
+ }
+ }
+ if (!allowTime && timeFormat != null) {
+ config._isValid = false;
+ return;
+ }
+ if (match[4]) {
+ if (tzRegex.exec(match[4])) {
+ tzFormat = 'Z';
+ } else {
+ config._isValid = false;
+ return;
+ }
+ }
+ config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
+ configFromStringAndFormat(config);
+ } else {
+ config._isValid = false;
+ }
+ }
+
+ function extractFromRFC2822Strings(
+ yearStr,
+ monthStr,
+ dayStr,
+ hourStr,
+ minuteStr,
+ secondStr
+ ) {
+ var result = [
+ untruncateYear(yearStr),
+ defaultLocaleMonthsShort.indexOf(monthStr),
+ parseInt(dayStr, 10),
+ parseInt(hourStr, 10),
+ parseInt(minuteStr, 10),
+ ];
+
+ if (secondStr) {
+ result.push(parseInt(secondStr, 10));
+ }
+
+ return result;
+ }
+
+ function untruncateYear(yearStr) {
+ var year = parseInt(yearStr, 10);
+ if (year <= 49) {
+ return 2000 + year;
+ } else if (year <= 999) {
+ return 1900 + year;
+ }
+ return year;
+ }
+
+ function preprocessRFC2822(s) {
+ // Remove comments and folding whitespace and replace multiple-spaces with a single space
+ return s
+ .replace(/\([^()]*\)|[\n\t]/g, ' ')
+ .replace(/(\s\s+)/g, ' ')
+ .replace(/^\s\s*/, '')
+ .replace(/\s\s*$/, '');
+ }
+
+ function checkWeekday(weekdayStr, parsedInput, config) {
+ if (weekdayStr) {
+ // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
+ var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
+ weekdayActual = new Date(
+ parsedInput[0],
+ parsedInput[1],
+ parsedInput[2]
+ ).getDay();
+ if (weekdayProvided !== weekdayActual) {
+ getParsingFlags(config).weekdayMismatch = true;
+ config._isValid = false;
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function calculateOffset(obsOffset, militaryOffset, numOffset) {
+ if (obsOffset) {
+ return obsOffsets[obsOffset];
+ } else if (militaryOffset) {
+ // the only allowed military tz is Z
+ return 0;
+ } else {
+ var hm = parseInt(numOffset, 10),
+ m = hm % 100,
+ h = (hm - m) / 100;
+ return h * 60 + m;
+ }
+ }
+
+ // date and time from ref 2822 format
+ function configFromRFC2822(config) {
+ var match = rfc2822.exec(preprocessRFC2822(config._i)),
+ parsedArray;
+ if (match) {
+ parsedArray = extractFromRFC2822Strings(
+ match[4],
+ match[3],
+ match[2],
+ match[5],
+ match[6],
+ match[7]
+ );
+ if (!checkWeekday(match[1], parsedArray, config)) {
+ return;
+ }
+
+ config._a = parsedArray;
+ config._tzm = calculateOffset(match[8], match[9], match[10]);
+
+ config._d = createUTCDate.apply(null, config._a);
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
+
+ getParsingFlags(config).rfc2822 = true;
+ } else {
+ config._isValid = false;
+ }
+ }
+
+ // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
+ function configFromString(config) {
+ var matched = aspNetJsonRegex.exec(config._i);
+ if (matched !== null) {
+ config._d = new Date(+matched[1]);
+ return;
+ }
+
+ configFromISO(config);
+ if (config._isValid === false) {
+ delete config._isValid;
+ } else {
+ return;
+ }
+
+ configFromRFC2822(config);
+ if (config._isValid === false) {
+ delete config._isValid;
+ } else {
+ return;
+ }
+
+ if (config._strict) {
+ config._isValid = false;
+ } else {
+ // Final attempt, use Input Fallback
+ hooks.createFromInputFallback(config);
+ }
+ }
+
+ hooks.createFromInputFallback = deprecate(
+ 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
+ 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
+ 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
+ function (config) {
+ config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
+ }
+ );
+
+ // Pick the first defined of two or three arguments.
+ function defaults(a, b, c) {
+ if (a != null) {
+ return a;
+ }
+ if (b != null) {
+ return b;
+ }
+ return c;
+ }
+
+ function currentDateArray(config) {
+ // hooks is actually the exported moment object
+ var nowValue = new Date(hooks.now());
+ if (config._useUTC) {
+ return [
+ nowValue.getUTCFullYear(),
+ nowValue.getUTCMonth(),
+ nowValue.getUTCDate(),
+ ];
+ }
+ return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
+ }
+
+ // convert an array to a date.
+ // the array should mirror the parameters below
+ // note: all values past the year are optional and will default to the lowest possible value.
+ // [year, month, day , hour, minute, second, millisecond]
+ function configFromArray(config) {
+ var i,
+ date,
+ input = [],
+ currentDate,
+ expectedWeekday,
+ yearToUse;
+
+ if (config._d) {
+ return;
+ }
+
+ currentDate = currentDateArray(config);
+
+ //compute day of the year from weeks and weekdays
+ if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
+ dayOfYearFromWeekInfo(config);
+ }
+
+ //if the day of the year is set, figure out what it is
+ if (config._dayOfYear != null) {
+ yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
+
+ if (
+ config._dayOfYear > daysInYear(yearToUse) ||
+ config._dayOfYear === 0
+ ) {
+ getParsingFlags(config)._overflowDayOfYear = true;
+ }
+
+ date = createUTCDate(yearToUse, 0, config._dayOfYear);
+ config._a[MONTH] = date.getUTCMonth();
+ config._a[DATE] = date.getUTCDate();
+ }
+
+ // Default to current date.
+ // * if no year, month, day of month are given, default to today
+ // * if day of month is given, default month and year
+ // * if month is given, default only year
+ // * if year is given, don't default anything
+ for (i = 0; i < 3 && config._a[i] == null; ++i) {
+ config._a[i] = input[i] = currentDate[i];
+ }
+
+ // Zero out whatever was not defaulted, including time
+ for (; i < 7; i++) {
+ config._a[i] = input[i] =
+ config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
+ }
+
+ // Check for 24:00:00.000
+ if (
+ config._a[HOUR] === 24 &&
+ config._a[MINUTE] === 0 &&
+ config._a[SECOND] === 0 &&
+ config._a[MILLISECOND] === 0
+ ) {
+ config._nextDay = true;
+ config._a[HOUR] = 0;
+ }
+
+ config._d = (config._useUTC ? createUTCDate : createDate).apply(
+ null,
+ input
+ );
+ expectedWeekday = config._useUTC
+ ? config._d.getUTCDay()
+ : config._d.getDay();
+
+ // Apply timezone offset from input. The actual utcOffset can be changed
+ // with parseZone.
+ if (config._tzm != null) {
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
+ }
+
+ if (config._nextDay) {
+ config._a[HOUR] = 24;
+ }
+
+ // check for mismatching day of week
+ if (
+ config._w &&
+ typeof config._w.d !== 'undefined' &&
+ config._w.d !== expectedWeekday
+ ) {
+ getParsingFlags(config).weekdayMismatch = true;
+ }
+ }
+
+ function dayOfYearFromWeekInfo(config) {
+ var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
+
+ w = config._w;
+ if (w.GG != null || w.W != null || w.E != null) {
+ dow = 1;
+ doy = 4;
+
+ // TODO: We need to take the current isoWeekYear, but that depends on
+ // how we interpret now (local, utc, fixed offset). So create
+ // a now version of current config (take local/utc/offset flags, and
+ // create now).
+ weekYear = defaults(
+ w.GG,
+ config._a[YEAR],
+ weekOfYear(createLocal(), 1, 4).year
+ );
+ week = defaults(w.W, 1);
+ weekday = defaults(w.E, 1);
+ if (weekday < 1 || weekday > 7) {
+ weekdayOverflow = true;
+ }
+ } else {
+ dow = config._locale._week.dow;
+ doy = config._locale._week.doy;
+
+ curWeek = weekOfYear(createLocal(), dow, doy);
+
+ weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
+
+ // Default to current week.
+ week = defaults(w.w, curWeek.week);
+
+ if (w.d != null) {
+ // weekday -- low day numbers are considered next week
+ weekday = w.d;
+ if (weekday < 0 || weekday > 6) {
+ weekdayOverflow = true;
+ }
+ } else if (w.e != null) {
+ // local weekday -- counting starts from beginning of week
+ weekday = w.e + dow;
+ if (w.e < 0 || w.e > 6) {
+ weekdayOverflow = true;
+ }
+ } else {
+ // default to beginning of week
+ weekday = dow;
+ }
+ }
+ if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
+ getParsingFlags(config)._overflowWeeks = true;
+ } else if (weekdayOverflow != null) {
+ getParsingFlags(config)._overflowWeekday = true;
+ } else {
+ temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
+ config._a[YEAR] = temp.year;
+ config._dayOfYear = temp.dayOfYear;
+ }
+ }
+
+ // constant that refers to the ISO standard
+ hooks.ISO_8601 = function () {};
+
+ // constant that refers to the RFC 2822 form
+ hooks.RFC_2822 = function () {};
+
+ // date from string and format string
+ function configFromStringAndFormat(config) {
+ // TODO: Move this to another part of the creation flow to prevent circular deps
+ if (config._f === hooks.ISO_8601) {
+ configFromISO(config);
+ return;
+ }
+ if (config._f === hooks.RFC_2822) {
+ configFromRFC2822(config);
+ return;
+ }
+ config._a = [];
+ getParsingFlags(config).empty = true;
+
+ // This array is used to make a Date, either with `new Date` or `Date.UTC`
+ var string = '' + config._i,
+ i,
+ parsedInput,
+ tokens,
+ token,
+ skipped,
+ stringLength = string.length,
+ totalParsedInputLength = 0,
+ era,
+ tokenLen;
+
+ tokens =
+ expandFormat(config._f, config._locale).match(formattingTokens) || [];
+ tokenLen = tokens.length;
+ for (i = 0; i < tokenLen; i++) {
+ token = tokens[i];
+ parsedInput = (string.match(getParseRegexForToken(token, config)) ||
+ [])[0];
+ if (parsedInput) {
+ skipped = string.substr(0, string.indexOf(parsedInput));
+ if (skipped.length > 0) {
+ getParsingFlags(config).unusedInput.push(skipped);
+ }
+ string = string.slice(
+ string.indexOf(parsedInput) + parsedInput.length
+ );
+ totalParsedInputLength += parsedInput.length;
+ }
+ // don't parse if it's not a known token
+ if (formatTokenFunctions[token]) {
+ if (parsedInput) {
+ getParsingFlags(config).empty = false;
+ } else {
+ getParsingFlags(config).unusedTokens.push(token);
+ }
+ addTimeToArrayFromToken(token, parsedInput, config);
+ } else if (config._strict && !parsedInput) {
+ getParsingFlags(config).unusedTokens.push(token);
+ }
+ }
+
+ // add remaining unparsed input length to the string
+ getParsingFlags(config).charsLeftOver =
+ stringLength - totalParsedInputLength;
+ if (string.length > 0) {
+ getParsingFlags(config).unusedInput.push(string);
+ }
+
+ // clear _12h flag if hour is <= 12
+ if (
+ config._a[HOUR] <= 12 &&
+ getParsingFlags(config).bigHour === true &&
+ config._a[HOUR] > 0
+ ) {
+ getParsingFlags(config).bigHour = undefined;
+ }
+
+ getParsingFlags(config).parsedDateParts = config._a.slice(0);
+ getParsingFlags(config).meridiem = config._meridiem;
+ // handle meridiem
+ config._a[HOUR] = meridiemFixWrap(
+ config._locale,
+ config._a[HOUR],
+ config._meridiem
+ );
+
+ // handle era
+ era = getParsingFlags(config).era;
+ if (era !== null) {
+ config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
+ }
+
+ configFromArray(config);
+ checkOverflow(config);
+ }
+
+ function meridiemFixWrap(locale, hour, meridiem) {
+ var isPm;
+
+ if (meridiem == null) {
+ // nothing to do
+ return hour;
+ }
+ if (locale.meridiemHour != null) {
+ return locale.meridiemHour(hour, meridiem);
+ } else if (locale.isPM != null) {
+ // Fallback
+ isPm = locale.isPM(meridiem);
+ if (isPm && hour < 12) {
+ hour += 12;
+ }
+ if (!isPm && hour === 12) {
+ hour = 0;
+ }
+ return hour;
+ } else {
+ // this is not supposed to happen
+ return hour;
+ }
+ }
+
+ // date from string and array of format strings
+ function configFromStringAndArray(config) {
+ var tempConfig,
+ bestMoment,
+ scoreToBeat,
+ i,
+ currentScore,
+ validFormatFound,
+ bestFormatIsValid = false,
+ configfLen = config._f.length;
+
+ if (configfLen === 0) {
+ getParsingFlags(config).invalidFormat = true;
+ config._d = new Date(NaN);
+ return;
+ }
+
+ for (i = 0; i < configfLen; i++) {
+ currentScore = 0;
+ validFormatFound = false;
+ tempConfig = copyConfig({}, config);
+ if (config._useUTC != null) {
+ tempConfig._useUTC = config._useUTC;
+ }
+ tempConfig._f = config._f[i];
+ configFromStringAndFormat(tempConfig);
+
+ if (isValid(tempConfig)) {
+ validFormatFound = true;
+ }
+
+ // if there is any input that was not parsed add a penalty for that format
+ currentScore += getParsingFlags(tempConfig).charsLeftOver;
+
+ //or tokens
+ currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
+
+ getParsingFlags(tempConfig).score = currentScore;
+
+ if (!bestFormatIsValid) {
+ if (
+ scoreToBeat == null ||
+ currentScore < scoreToBeat ||
+ validFormatFound
+ ) {
+ scoreToBeat = currentScore;
+ bestMoment = tempConfig;
+ if (validFormatFound) {
+ bestFormatIsValid = true;
+ }
+ }
+ } else {
+ if (currentScore < scoreToBeat) {
+ scoreToBeat = currentScore;
+ bestMoment = tempConfig;
+ }
+ }
+ }
+
+ extend(config, bestMoment || tempConfig);
+ }
+
+ function configFromObject(config) {
+ if (config._d) {
+ return;
+ }
+
+ var i = normalizeObjectUnits(config._i),
+ dayOrDate = i.day === undefined ? i.date : i.day;
+ config._a = map(
+ [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
+ function (obj) {
+ return obj && parseInt(obj, 10);
+ }
+ );
+
+ configFromArray(config);
+ }
+
+ function createFromConfig(config) {
+ var res = new Moment(checkOverflow(prepareConfig(config)));
+ if (res._nextDay) {
+ // Adding is smart enough around DST
+ res.add(1, 'd');
+ res._nextDay = undefined;
+ }
+
+ return res;
+ }
+
+ function prepareConfig(config) {
+ var input = config._i,
+ format = config._f;
+
+ config._locale = config._locale || getLocale(config._l);
+
+ if (input === null || (format === undefined && input === '')) {
+ return createInvalid({ nullInput: true });
+ }
+
+ if (typeof input === 'string') {
+ config._i = input = config._locale.preparse(input);
+ }
+
+ if (isMoment(input)) {
+ return new Moment(checkOverflow(input));
+ } else if (isDate(input)) {
+ config._d = input;
+ } else if (isArray(format)) {
+ configFromStringAndArray(config);
+ } else if (format) {
+ configFromStringAndFormat(config);
+ } else {
+ configFromInput(config);
+ }
+
+ if (!isValid(config)) {
+ config._d = null;
+ }
+
+ return config;
+ }
+
+ function configFromInput(config) {
+ var input = config._i;
+ if (isUndefined(input)) {
+ config._d = new Date(hooks.now());
+ } else if (isDate(input)) {
+ config._d = new Date(input.valueOf());
+ } else if (typeof input === 'string') {
+ configFromString(config);
+ } else if (isArray(input)) {
+ config._a = map(input.slice(0), function (obj) {
+ return parseInt(obj, 10);
+ });
+ configFromArray(config);
+ } else if (isObject(input)) {
+ configFromObject(config);
+ } else if (isNumber(input)) {
+ // from milliseconds
+ config._d = new Date(input);
+ } else {
+ hooks.createFromInputFallback(config);
+ }
+ }
+
+ function createLocalOrUTC(input, format, locale, strict, isUTC) {
+ var c = {};
+
+ if (format === true || format === false) {
+ strict = format;
+ format = undefined;
+ }
+
+ if (locale === true || locale === false) {
+ strict = locale;
+ locale = undefined;
+ }
+
+ if (
+ (isObject(input) && isObjectEmpty(input)) ||
+ (isArray(input) && input.length === 0)
+ ) {
+ input = undefined;
+ }
+ // object construction must be done this way.
+ // https://github.com/moment/moment/issues/1423
+ c._isAMomentObject = true;
+ c._useUTC = c._isUTC = isUTC;
+ c._l = locale;
+ c._i = input;
+ c._f = format;
+ c._strict = strict;
+
+ return createFromConfig(c);
+ }
+
+ function createLocal(input, format, locale, strict) {
+ return createLocalOrUTC(input, format, locale, strict, false);
+ }
+
+ var prototypeMin = deprecate(
+ 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
+ function () {
+ var other = createLocal.apply(null, arguments);
+ if (this.isValid() && other.isValid()) {
+ return other < this ? this : other;
+ } else {
+ return createInvalid();
+ }
+ }
+ ),
+ prototypeMax = deprecate(
+ 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
+ function () {
+ var other = createLocal.apply(null, arguments);
+ if (this.isValid() && other.isValid()) {
+ return other > this ? this : other;
+ } else {
+ return createInvalid();
+ }
+ }
+ );
+
+ // Pick a moment m from moments so that m[fn](other) is true for all
+ // other. This relies on the function fn to be transitive.
+ //
+ // moments should either be an array of moment objects or an array, whose
+ // first element is an array of moment objects.
+ function pickBy(fn, moments) {
+ var res, i;
+ if (moments.length === 1 && isArray(moments[0])) {
+ moments = moments[0];
+ }
+ if (!moments.length) {
+ return createLocal();
+ }
+ res = moments[0];
+ for (i = 1; i < moments.length; ++i) {
+ if (!moments[i].isValid() || moments[i][fn](res)) {
+ res = moments[i];
+ }
+ }
+ return res;
+ }
+
+ // TODO: Use [].sort instead?
+ function min() {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isBefore', args);
+ }
+
+ function max() {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isAfter', args);
+ }
+
+ var now = function () {
+ return Date.now ? Date.now() : +new Date();
+ };
+
+ var ordering = [
+ 'year',
+ 'quarter',
+ 'month',
+ 'week',
+ 'day',
+ 'hour',
+ 'minute',
+ 'second',
+ 'millisecond',
+ ];
+
+ function isDurationValid(m) {
+ var key,
+ unitHasDecimal = false,
+ i,
+ orderLen = ordering.length;
+ for (key in m) {
+ if (
+ hasOwnProp(m, key) &&
+ !(
+ indexOf.call(ordering, key) !== -1 &&
+ (m[key] == null || !isNaN(m[key]))
+ )
+ ) {
+ return false;
+ }
+ }
+
+ for (i = 0; i < orderLen; ++i) {
+ if (m[ordering[i]]) {
+ if (unitHasDecimal) {
+ return false; // only allow non-integers for smallest unit
+ }
+ if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
+ unitHasDecimal = true;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ function isValid$1() {
+ return this._isValid;
+ }
+
+ function createInvalid$1() {
+ return createDuration(NaN);
+ }
+
+ function Duration(duration) {
+ var normalizedInput = normalizeObjectUnits(duration),
+ years = normalizedInput.year || 0,
+ quarters = normalizedInput.quarter || 0,
+ months = normalizedInput.month || 0,
+ weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
+ days = normalizedInput.day || 0,
+ hours = normalizedInput.hour || 0,
+ minutes = normalizedInput.minute || 0,
+ seconds = normalizedInput.second || 0,
+ milliseconds = normalizedInput.millisecond || 0;
+
+ this._isValid = isDurationValid(normalizedInput);
+
+ // representation for dateAddRemove
+ this._milliseconds =
+ +milliseconds +
+ seconds * 1e3 + // 1000
+ minutes * 6e4 + // 1000 * 60
+ hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
+ // Because of dateAddRemove treats 24 hours as different from a
+ // day when working around DST, we need to store them separately
+ this._days = +days + weeks * 7;
+ // It is impossible to translate months into days without knowing
+ // which months you are are talking about, so we have to store
+ // it separately.
+ this._months = +months + quarters * 3 + years * 12;
+
+ this._data = {};
+
+ this._locale = getLocale();
+
+ this._bubble();
+ }
+
+ function isDuration(obj) {
+ return obj instanceof Duration;
+ }
+
+ function absRound(number) {
+ if (number < 0) {
+ return Math.round(-1 * number) * -1;
+ } else {
+ return Math.round(number);
+ }
+ }
+
+ // compare two arrays, return the number of differences
+ function compareArrays(array1, array2, dontConvert) {
+ var len = Math.min(array1.length, array2.length),
+ lengthDiff = Math.abs(array1.length - array2.length),
+ diffs = 0,
+ i;
+ for (i = 0; i < len; i++) {
+ if (
+ (dontConvert && array1[i] !== array2[i]) ||
+ (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
+ ) {
+ diffs++;
+ }
+ }
+ return diffs + lengthDiff;
+ }
+
+ // FORMATTING
+
+ function offset(token, separator) {
+ addFormatToken(token, 0, 0, function () {
+ var offset = this.utcOffset(),
+ sign = '+';
+ if (offset < 0) {
+ offset = -offset;
+ sign = '-';
+ }
+ return (
+ sign +
+ zeroFill(~~(offset / 60), 2) +
+ separator +
+ zeroFill(~~offset % 60, 2)
+ );
+ });
+ }
+
+ offset('Z', ':');
+ offset('ZZ', '');
+
+ // PARSING
+
+ addRegexToken('Z', matchShortOffset);
+ addRegexToken('ZZ', matchShortOffset);
+ addParseToken(['Z', 'ZZ'], function (input, array, config) {
+ config._useUTC = true;
+ config._tzm = offsetFromString(matchShortOffset, input);
+ });
+
+ // HELPERS
+
+ // timezone chunker
+ // '+10:00' > ['10', '00']
+ // '-1530' > ['-15', '30']
+ var chunkOffset = /([\+\-]|\d\d)/gi;
+
+ function offsetFromString(matcher, string) {
+ var matches = (string || '').match(matcher),
+ chunk,
+ parts,
+ minutes;
+
+ if (matches === null) {
+ return null;
+ }
+
+ chunk = matches[matches.length - 1] || [];
+ parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
+ minutes = +(parts[1] * 60) + toInt(parts[2]);
+
+ return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
+ }
+
+ // Return a moment from input, that is local/utc/zone equivalent to model.
+ function cloneWithOffset(input, model) {
+ var res, diff;
+ if (model._isUTC) {
+ res = model.clone();
+ diff =
+ (isMoment(input) || isDate(input)
+ ? input.valueOf()
+ : createLocal(input).valueOf()) - res.valueOf();
+ // Use low-level api, because this fn is low-level api.
+ res._d.setTime(res._d.valueOf() + diff);
+ hooks.updateOffset(res, false);
+ return res;
+ } else {
+ return createLocal(input).local();
+ }
+ }
+
+ function getDateOffset(m) {
+ // On Firefox.24 Date#getTimezoneOffset returns a floating point.
+ // https://github.com/moment/moment/pull/1871
+ return -Math.round(m._d.getTimezoneOffset());
+ }
+
+ // HOOKS
+
+ // This function will be called whenever a moment is mutated.
+ // It is intended to keep the offset in sync with the timezone.
+ hooks.updateOffset = function () {};
+
+ // MOMENTS
+
+ // keepLocalTime = true means only change the timezone, without
+ // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
+ // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
+ // +0200, so we adjust the time as needed, to be valid.
+ //
+ // Keeping the time actually adds/subtracts (one hour)
+ // from the actual represented time. That is why we call updateOffset
+ // a second time. In case it wants us to change the offset again
+ // _changeInProgress == true case, then we have to adjust, because
+ // there is no such time in the given timezone.
+ function getSetOffset(input, keepLocalTime, keepMinutes) {
+ var offset = this._offset || 0,
+ localAdjust;
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ if (input != null) {
+ if (typeof input === 'string') {
+ input = offsetFromString(matchShortOffset, input);
+ if (input === null) {
+ return this;
+ }
+ } else if (Math.abs(input) < 16 && !keepMinutes) {
+ input = input * 60;
+ }
+ if (!this._isUTC && keepLocalTime) {
+ localAdjust = getDateOffset(this);
+ }
+ this._offset = input;
+ this._isUTC = true;
+ if (localAdjust != null) {
+ this.add(localAdjust, 'm');
+ }
+ if (offset !== input) {
+ if (!keepLocalTime || this._changeInProgress) {
+ addSubtract(
+ this,
+ createDuration(input - offset, 'm'),
+ 1,
+ false
+ );
+ } else if (!this._changeInProgress) {
+ this._changeInProgress = true;
+ hooks.updateOffset(this, true);
+ this._changeInProgress = null;
+ }
+ }
+ return this;
+ } else {
+ return this._isUTC ? offset : getDateOffset(this);
+ }
+ }
+
+ function getSetZone(input, keepLocalTime) {
+ if (input != null) {
+ if (typeof input !== 'string') {
+ input = -input;
+ }
+
+ this.utcOffset(input, keepLocalTime);
+
+ return this;
+ } else {
+ return -this.utcOffset();
+ }
+ }
+
+ function setOffsetToUTC(keepLocalTime) {
+ return this.utcOffset(0, keepLocalTime);
+ }
+
+ function setOffsetToLocal(keepLocalTime) {
+ if (this._isUTC) {
+ this.utcOffset(0, keepLocalTime);
+ this._isUTC = false;
+
+ if (keepLocalTime) {
+ this.subtract(getDateOffset(this), 'm');
+ }
+ }
+ return this;
+ }
+
+ function setOffsetToParsedOffset() {
+ if (this._tzm != null) {
+ this.utcOffset(this._tzm, false, true);
+ } else if (typeof this._i === 'string') {
+ var tZone = offsetFromString(matchOffset, this._i);
+ if (tZone != null) {
+ this.utcOffset(tZone);
+ } else {
+ this.utcOffset(0, true);
+ }
+ }
+ return this;
+ }
+
+ function hasAlignedHourOffset(input) {
+ if (!this.isValid()) {
+ return false;
+ }
+ input = input ? createLocal(input).utcOffset() : 0;
+
+ return (this.utcOffset() - input) % 60 === 0;
+ }
+
+ function isDaylightSavingTime() {
+ return (
+ this.utcOffset() > this.clone().month(0).utcOffset() ||
+ this.utcOffset() > this.clone().month(5).utcOffset()
+ );
+ }
+
+ function isDaylightSavingTimeShifted() {
+ if (!isUndefined(this._isDSTShifted)) {
+ return this._isDSTShifted;
+ }
+
+ var c = {},
+ other;
+
+ copyConfig(c, this);
+ c = prepareConfig(c);
+
+ if (c._a) {
+ other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
+ this._isDSTShifted =
+ this.isValid() && compareArrays(c._a, other.toArray()) > 0;
+ } else {
+ this._isDSTShifted = false;
+ }
+
+ return this._isDSTShifted;
+ }
+
+ function isLocal() {
+ return this.isValid() ? !this._isUTC : false;
+ }
+
+ function isUtcOffset() {
+ return this.isValid() ? this._isUTC : false;
+ }
+
+ function isUtc() {
+ return this.isValid() ? this._isUTC && this._offset === 0 : false;
+ }
+
+ // ASP.NET json date format regex
+ var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
+ // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
+ // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
+ // and further modified to allow for strings containing both week and day
+ isoRegex =
+ /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
+
+ function createDuration(input, key) {
+ var duration = input,
+ // matching against regexp is expensive, do it on demand
+ match = null,
+ sign,
+ ret,
+ diffRes;
+
+ if (isDuration(input)) {
+ duration = {
+ ms: input._milliseconds,
+ d: input._days,
+ M: input._months,
+ };
+ } else if (isNumber(input) || !isNaN(+input)) {
+ duration = {};
+ if (key) {
+ duration[key] = +input;
+ } else {
+ duration.milliseconds = +input;
+ }
+ } else if ((match = aspNetRegex.exec(input))) {
+ sign = match[1] === '-' ? -1 : 1;
+ duration = {
+ y: 0,
+ d: toInt(match[DATE]) * sign,
+ h: toInt(match[HOUR]) * sign,
+ m: toInt(match[MINUTE]) * sign,
+ s: toInt(match[SECOND]) * sign,
+ ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
+ };
+ } else if ((match = isoRegex.exec(input))) {
+ sign = match[1] === '-' ? -1 : 1;
+ duration = {
+ y: parseIso(match[2], sign),
+ M: parseIso(match[3], sign),
+ w: parseIso(match[4], sign),
+ d: parseIso(match[5], sign),
+ h: parseIso(match[6], sign),
+ m: parseIso(match[7], sign),
+ s: parseIso(match[8], sign),
+ };
+ } else if (duration == null) {
+ // checks for null or undefined
+ duration = {};
+ } else if (
+ typeof duration === 'object' &&
+ ('from' in duration || 'to' in duration)
+ ) {
+ diffRes = momentsDifference(
+ createLocal(duration.from),
+ createLocal(duration.to)
+ );
+
+ duration = {};
+ duration.ms = diffRes.milliseconds;
+ duration.M = diffRes.months;
+ }
+
+ ret = new Duration(duration);
+
+ if (isDuration(input) && hasOwnProp(input, '_locale')) {
+ ret._locale = input._locale;
+ }
+
+ if (isDuration(input) && hasOwnProp(input, '_isValid')) {
+ ret._isValid = input._isValid;
+ }
+
+ return ret;
+ }
+
+ createDuration.fn = Duration.prototype;
+ createDuration.invalid = createInvalid$1;
+
+ function parseIso(inp, sign) {
+ // We'd normally use ~~inp for this, but unfortunately it also
+ // converts floats to ints.
+ // inp may be undefined, so careful calling replace on it.
+ var res = inp && parseFloat(inp.replace(',', '.'));
+ // apply sign while we're at it
+ return (isNaN(res) ? 0 : res) * sign;
+ }
+
+ function positiveMomentsDifference(base, other) {
+ var res = {};
+
+ res.months =
+ other.month() - base.month() + (other.year() - base.year()) * 12;
+ if (base.clone().add(res.months, 'M').isAfter(other)) {
+ --res.months;
+ }
+
+ res.milliseconds = +other - +base.clone().add(res.months, 'M');
+
+ return res;
+ }
+
+ function momentsDifference(base, other) {
+ var res;
+ if (!(base.isValid() && other.isValid())) {
+ return { milliseconds: 0, months: 0 };
+ }
+
+ other = cloneWithOffset(other, base);
+ if (base.isBefore(other)) {
+ res = positiveMomentsDifference(base, other);
+ } else {
+ res = positiveMomentsDifference(other, base);
+ res.milliseconds = -res.milliseconds;
+ res.months = -res.months;
+ }
+
+ return res;
+ }
+
+ // TODO: remove 'name' arg after deprecation is removed
+ function createAdder(direction, name) {
+ return function (val, period) {
+ var dur, tmp;
+ //invert the arguments, but complain about it
+ if (period !== null && !isNaN(+period)) {
+ deprecateSimple(
+ name,
+ 'moment().' +
+ name +
+ '(period, number) is deprecated. Please use moment().' +
+ name +
+ '(number, period). ' +
+ 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
+ );
+ tmp = val;
+ val = period;
+ period = tmp;
+ }
+
+ dur = createDuration(val, period);
+ addSubtract(this, dur, direction);
+ return this;
+ };
+ }
+
+ function addSubtract(mom, duration, isAdding, updateOffset) {
+ var milliseconds = duration._milliseconds,
+ days = absRound(duration._days),
+ months = absRound(duration._months);
+
+ if (!mom.isValid()) {
+ // No op
+ return;
+ }
+
+ updateOffset = updateOffset == null ? true : updateOffset;
+
+ if (months) {
+ setMonth(mom, get(mom, 'Month') + months * isAdding);
+ }
+ if (days) {
+ set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
+ }
+ if (milliseconds) {
+ mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
+ }
+ if (updateOffset) {
+ hooks.updateOffset(mom, days || months);
+ }
+ }
+
+ var add = createAdder(1, 'add'),
+ subtract = createAdder(-1, 'subtract');
+
+ function isString(input) {
+ return typeof input === 'string' || input instanceof String;
+ }
+
+ // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
+ function isMomentInput(input) {
+ return (
+ isMoment(input) ||
+ isDate(input) ||
+ isString(input) ||
+ isNumber(input) ||
+ isNumberOrStringArray(input) ||
+ isMomentInputObject(input) ||
+ input === null ||
+ input === undefined
+ );
+ }
+
+ function isMomentInputObject(input) {
+ var objectTest = isObject(input) && !isObjectEmpty(input),
+ propertyTest = false,
+ properties = [
+ 'years',
+ 'year',
+ 'y',
+ 'months',
+ 'month',
+ 'M',
+ 'days',
+ 'day',
+ 'd',
+ 'dates',
+ 'date',
+ 'D',
+ 'hours',
+ 'hour',
+ 'h',
+ 'minutes',
+ 'minute',
+ 'm',
+ 'seconds',
+ 'second',
+ 's',
+ 'milliseconds',
+ 'millisecond',
+ 'ms',
+ ],
+ i,
+ property,
+ propertyLen = properties.length;
+
+ for (i = 0; i < propertyLen; i += 1) {
+ property = properties[i];
+ propertyTest = propertyTest || hasOwnProp(input, property);
+ }
+
+ return objectTest && propertyTest;
+ }
+
+ function isNumberOrStringArray(input) {
+ var arrayTest = isArray(input),
+ dataTypeTest = false;
+ if (arrayTest) {
+ dataTypeTest =
+ input.filter(function (item) {
+ return !isNumber(item) && isString(input);
+ }).length === 0;
+ }
+ return arrayTest && dataTypeTest;
+ }
+
+ function isCalendarSpec(input) {
+ var objectTest = isObject(input) && !isObjectEmpty(input),
+ propertyTest = false,
+ properties = [
+ 'sameDay',
+ 'nextDay',
+ 'lastDay',
+ 'nextWeek',
+ 'lastWeek',
+ 'sameElse',
+ ],
+ i,
+ property;
+
+ for (i = 0; i < properties.length; i += 1) {
+ property = properties[i];
+ propertyTest = propertyTest || hasOwnProp(input, property);
+ }
+
+ return objectTest && propertyTest;
+ }
+
+ function getCalendarFormat(myMoment, now) {
+ var diff = myMoment.diff(now, 'days', true);
+ return diff < -6
+ ? 'sameElse'
+ : diff < -1
+ ? 'lastWeek'
+ : diff < 0
+ ? 'lastDay'
+ : diff < 1
+ ? 'sameDay'
+ : diff < 2
+ ? 'nextDay'
+ : diff < 7
+ ? 'nextWeek'
+ : 'sameElse';
+ }
+
+ function calendar$1(time, formats) {
+ // Support for single parameter, formats only overload to the calendar function
+ if (arguments.length === 1) {
+ if (!arguments[0]) {
+ time = undefined;
+ formats = undefined;
+ } else if (isMomentInput(arguments[0])) {
+ time = arguments[0];
+ formats = undefined;
+ } else if (isCalendarSpec(arguments[0])) {
+ formats = arguments[0];
+ time = undefined;
+ }
+ }
+ // We want to compare the start of today, vs this.
+ // Getting start-of-today depends on whether we're local/utc/offset or not.
+ var now = time || createLocal(),
+ sod = cloneWithOffset(now, this).startOf('day'),
+ format = hooks.calendarFormat(this, sod) || 'sameElse',
+ output =
+ formats &&
+ (isFunction(formats[format])
+ ? formats[format].call(this, now)
+ : formats[format]);
+
+ return this.format(
+ output || this.localeData().calendar(format, this, createLocal(now))
+ );
+ }
+
+ function clone() {
+ return new Moment(this);
+ }
+
+ function isAfter(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input);
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() > localInput.valueOf();
+ } else {
+ return localInput.valueOf() < this.clone().startOf(units).valueOf();
+ }
+ }
+
+ function isBefore(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input);
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() < localInput.valueOf();
+ } else {
+ return this.clone().endOf(units).valueOf() < localInput.valueOf();
+ }
+ }
+
+ function isBetween(from, to, units, inclusivity) {
+ var localFrom = isMoment(from) ? from : createLocal(from),
+ localTo = isMoment(to) ? to : createLocal(to);
+ if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
+ return false;
+ }
+ inclusivity = inclusivity || '()';
+ return (
+ (inclusivity[0] === '('
+ ? this.isAfter(localFrom, units)
+ : !this.isBefore(localFrom, units)) &&
+ (inclusivity[1] === ')'
+ ? this.isBefore(localTo, units)
+ : !this.isAfter(localTo, units))
+ );
+ }
+
+ function isSame(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input),
+ inputMs;
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() === localInput.valueOf();
+ } else {
+ inputMs = localInput.valueOf();
+ return (
+ this.clone().startOf(units).valueOf() <= inputMs &&
+ inputMs <= this.clone().endOf(units).valueOf()
+ );
+ }
+ }
+
+ function isSameOrAfter(input, units) {
+ return this.isSame(input, units) || this.isAfter(input, units);
+ }
+
+ function isSameOrBefore(input, units) {
+ return this.isSame(input, units) || this.isBefore(input, units);
+ }
+
+ function diff(input, units, asFloat) {
+ var that, zoneDelta, output;
+
+ if (!this.isValid()) {
+ return NaN;
+ }
+
+ that = cloneWithOffset(input, this);
+
+ if (!that.isValid()) {
+ return NaN;
+ }
+
+ zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
+
+ units = normalizeUnits(units);
+
+ switch (units) {
+ case 'year':
+ output = monthDiff(this, that) / 12;
+ break;
+ case 'month':
+ output = monthDiff(this, that);
+ break;
+ case 'quarter':
+ output = monthDiff(this, that) / 3;
+ break;
+ case 'second':
+ output = (this - that) / 1e3;
+ break; // 1000
+ case 'minute':
+ output = (this - that) / 6e4;
+ break; // 1000 * 60
+ case 'hour':
+ output = (this - that) / 36e5;
+ break; // 1000 * 60 * 60
+ case 'day':
+ output = (this - that - zoneDelta) / 864e5;
+ break; // 1000 * 60 * 60 * 24, negate dst
+ case 'week':
+ output = (this - that - zoneDelta) / 6048e5;
+ break; // 1000 * 60 * 60 * 24 * 7, negate dst
+ default:
+ output = this - that;
+ }
+
+ return asFloat ? output : absFloor(output);
+ }
+
+ function monthDiff(a, b) {
+ if (a.date() < b.date()) {
+ // end-of-month calculations work correct when the start month has more
+ // days than the end month.
+ return -monthDiff(b, a);
+ }
+ // difference in months
+ var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
+ // b is in (anchor - 1 month, anchor + 1 month)
+ anchor = a.clone().add(wholeMonthDiff, 'months'),
+ anchor2,
+ adjust;
+
+ if (b - anchor < 0) {
+ anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
+ // linear across the month
+ adjust = (b - anchor) / (anchor - anchor2);
+ } else {
+ anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
+ // linear across the month
+ adjust = (b - anchor) / (anchor2 - anchor);
+ }
+
+ //check for negative zero, return zero if negative zero
+ return -(wholeMonthDiff + adjust) || 0;
+ }
+
+ hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
+ hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
+
+ function toString() {
+ return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
+ }
+
+ function toISOString(keepOffset) {
+ if (!this.isValid()) {
+ return null;
+ }
+ var utc = keepOffset !== true,
+ m = utc ? this.clone().utc() : this;
+ if (m.year() < 0 || m.year() > 9999) {
+ return formatMoment(
+ m,
+ utc
+ ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
+ : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
+ );
+ }
+ if (isFunction(Date.prototype.toISOString)) {
+ // native implementation is ~50x faster, use it when we can
+ if (utc) {
+ return this.toDate().toISOString();
+ } else {
+ return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
+ .toISOString()
+ .replace('Z', formatMoment(m, 'Z'));
+ }
+ }
+ return formatMoment(
+ m,
+ utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
+ );
+ }
+
+ /**
+ * Return a human readable representation of a moment that can
+ * also be evaluated to get a new moment which is the same
+ *
+ * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
+ */
+ function inspect() {
+ if (!this.isValid()) {
+ return 'moment.invalid(/* ' + this._i + ' */)';
+ }
+ var func = 'moment',
+ zone = '',
+ prefix,
+ year,
+ datetime,
+ suffix;
+ if (!this.isLocal()) {
+ func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
+ zone = 'Z';
+ }
+ prefix = '[' + func + '("]';
+ year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
+ datetime = '-MM-DD[T]HH:mm:ss.SSS';
+ suffix = zone + '[")]';
+
+ return this.format(prefix + year + datetime + suffix);
+ }
+
+ function format(inputString) {
+ if (!inputString) {
+ inputString = this.isUtc()
+ ? hooks.defaultFormatUtc
+ : hooks.defaultFormat;
+ }
+ var output = formatMoment(this, inputString);
+ return this.localeData().postformat(output);
+ }
+
+ function from(time, withoutSuffix) {
+ if (
+ this.isValid() &&
+ ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
+ ) {
+ return createDuration({ to: this, from: time })
+ .locale(this.locale())
+ .humanize(!withoutSuffix);
+ } else {
+ return this.localeData().invalidDate();
+ }
+ }
+
+ function fromNow(withoutSuffix) {
+ return this.from(createLocal(), withoutSuffix);
+ }
+
+ function to(time, withoutSuffix) {
+ if (
+ this.isValid() &&
+ ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
+ ) {
+ return createDuration({ from: this, to: time })
+ .locale(this.locale())
+ .humanize(!withoutSuffix);
+ } else {
+ return this.localeData().invalidDate();
+ }
+ }
+
+ function toNow(withoutSuffix) {
+ return this.to(createLocal(), withoutSuffix);
+ }
+
+ // If passed a locale key, it will set the locale for this
+ // instance. Otherwise, it will return the locale configuration
+ // variables for this instance.
+ function locale(key) {
+ var newLocaleData;
+
+ if (key === undefined) {
+ return this._locale._abbr;
+ } else {
+ newLocaleData = getLocale(key);
+ if (newLocaleData != null) {
+ this._locale = newLocaleData;
+ }
+ return this;
+ }
+ }
+
+ var lang = deprecate(
+ 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
+ function (key) {
+ if (key === undefined) {
+ return this.localeData();
+ } else {
+ return this.locale(key);
+ }
+ }
+ );
+
+ function localeData() {
+ return this._locale;
+ }
+
+ var MS_PER_SECOND = 1000,
+ MS_PER_MINUTE = 60 * MS_PER_SECOND,
+ MS_PER_HOUR = 60 * MS_PER_MINUTE,
+ MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
+
+ // actual modulo - handles negative numbers (for dates before 1970):
+ function mod$1(dividend, divisor) {
+ return ((dividend % divisor) + divisor) % divisor;
+ }
+
+ function localStartOfDate(y, m, d) {
+ // the date constructor remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ return new Date(y + 400, m, d) - MS_PER_400_YEARS;
+ } else {
+ return new Date(y, m, d).valueOf();
+ }
+ }
+
+ function utcStartOfDate(y, m, d) {
+ // Date.UTC remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
+ } else {
+ return Date.UTC(y, m, d);
+ }
+ }
+
+ function startOf(units) {
+ var time, startOfDate;
+ units = normalizeUnits(units);
+ if (units === undefined || units === 'millisecond' || !this.isValid()) {
+ return this;
+ }
+
+ startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
+
+ switch (units) {
+ case 'year':
+ time = startOfDate(this.year(), 0, 1);
+ break;
+ case 'quarter':
+ time = startOfDate(
+ this.year(),
+ this.month() - (this.month() % 3),
+ 1
+ );
+ break;
+ case 'month':
+ time = startOfDate(this.year(), this.month(), 1);
+ break;
+ case 'week':
+ time = startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - this.weekday()
+ );
+ break;
+ case 'isoWeek':
+ time = startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - (this.isoWeekday() - 1)
+ );
+ break;
+ case 'day':
+ case 'date':
+ time = startOfDate(this.year(), this.month(), this.date());
+ break;
+ case 'hour':
+ time = this._d.valueOf();
+ time -= mod$1(
+ time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
+ MS_PER_HOUR
+ );
+ break;
+ case 'minute':
+ time = this._d.valueOf();
+ time -= mod$1(time, MS_PER_MINUTE);
+ break;
+ case 'second':
+ time = this._d.valueOf();
+ time -= mod$1(time, MS_PER_SECOND);
+ break;
+ }
+
+ this._d.setTime(time);
+ hooks.updateOffset(this, true);
+ return this;
+ }
+
+ function endOf(units) {
+ var time, startOfDate;
+ units = normalizeUnits(units);
+ if (units === undefined || units === 'millisecond' || !this.isValid()) {
+ return this;
+ }
+
+ startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
+
+ switch (units) {
+ case 'year':
+ time = startOfDate(this.year() + 1, 0, 1) - 1;
+ break;
+ case 'quarter':
+ time =
+ startOfDate(
+ this.year(),
+ this.month() - (this.month() % 3) + 3,
+ 1
+ ) - 1;
+ break;
+ case 'month':
+ time = startOfDate(this.year(), this.month() + 1, 1) - 1;
+ break;
+ case 'week':
+ time =
+ startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - this.weekday() + 7
+ ) - 1;
+ break;
+ case 'isoWeek':
+ time =
+ startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - (this.isoWeekday() - 1) + 7
+ ) - 1;
+ break;
+ case 'day':
+ case 'date':
+ time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
+ break;
+ case 'hour':
+ time = this._d.valueOf();
+ time +=
+ MS_PER_HOUR -
+ mod$1(
+ time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
+ MS_PER_HOUR
+ ) -
+ 1;
+ break;
+ case 'minute':
+ time = this._d.valueOf();
+ time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
+ break;
+ case 'second':
+ time = this._d.valueOf();
+ time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
+ break;
+ }
+
+ this._d.setTime(time);
+ hooks.updateOffset(this, true);
+ return this;
+ }
+
+ function valueOf() {
+ return this._d.valueOf() - (this._offset || 0) * 60000;
+ }
+
+ function unix() {
+ return Math.floor(this.valueOf() / 1000);
+ }
+
+ function toDate() {
+ return new Date(this.valueOf());
+ }
+
+ function toArray() {
+ var m = this;
+ return [
+ m.year(),
+ m.month(),
+ m.date(),
+ m.hour(),
+ m.minute(),
+ m.second(),
+ m.millisecond(),
+ ];
+ }
+
+ function toObject() {
+ var m = this;
+ return {
+ years: m.year(),
+ months: m.month(),
+ date: m.date(),
+ hours: m.hours(),
+ minutes: m.minutes(),
+ seconds: m.seconds(),
+ milliseconds: m.milliseconds(),
+ };
+ }
+
+ function toJSON() {
+ // new Date(NaN).toJSON() === null
+ return this.isValid() ? this.toISOString() : null;
+ }
+
+ function isValid$2() {
+ return isValid(this);
+ }
+
+ function parsingFlags() {
+ return extend({}, getParsingFlags(this));
+ }
+
+ function invalidAt() {
+ return getParsingFlags(this).overflow;
+ }
+
+ function creationData() {
+ return {
+ input: this._i,
+ format: this._f,
+ locale: this._locale,
+ isUTC: this._isUTC,
+ strict: this._strict,
+ };
+ }
+
+ addFormatToken('N', 0, 0, 'eraAbbr');
+ addFormatToken('NN', 0, 0, 'eraAbbr');
+ addFormatToken('NNN', 0, 0, 'eraAbbr');
+ addFormatToken('NNNN', 0, 0, 'eraName');
+ addFormatToken('NNNNN', 0, 0, 'eraNarrow');
+
+ addFormatToken('y', ['y', 1], 'yo', 'eraYear');
+ addFormatToken('y', ['yy', 2], 0, 'eraYear');
+ addFormatToken('y', ['yyy', 3], 0, 'eraYear');
+ addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
+
+ addRegexToken('N', matchEraAbbr);
+ addRegexToken('NN', matchEraAbbr);
+ addRegexToken('NNN', matchEraAbbr);
+ addRegexToken('NNNN', matchEraName);
+ addRegexToken('NNNNN', matchEraNarrow);
+
+ addParseToken(
+ ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
+ function (input, array, config, token) {
+ var era = config._locale.erasParse(input, token, config._strict);
+ if (era) {
+ getParsingFlags(config).era = era;
+ } else {
+ getParsingFlags(config).invalidEra = input;
+ }
+ }
+ );
+
+ addRegexToken('y', matchUnsigned);
+ addRegexToken('yy', matchUnsigned);
+ addRegexToken('yyy', matchUnsigned);
+ addRegexToken('yyyy', matchUnsigned);
+ addRegexToken('yo', matchEraYearOrdinal);
+
+ addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
+ addParseToken(['yo'], function (input, array, config, token) {
+ var match;
+ if (config._locale._eraYearOrdinalRegex) {
+ match = input.match(config._locale._eraYearOrdinalRegex);
+ }
+
+ if (config._locale.eraYearOrdinalParse) {
+ array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
+ } else {
+ array[YEAR] = parseInt(input, 10);
+ }
+ });
+
+ function localeEras(m, format) {
+ var i,
+ l,
+ date,
+ eras = this._eras || getLocale('en')._eras;
+ for (i = 0, l = eras.length; i < l; ++i) {
+ switch (typeof eras[i].since) {
+ case 'string':
+ // truncate time
+ date = hooks(eras[i].since).startOf('day');
+ eras[i].since = date.valueOf();
+ break;
+ }
+
+ switch (typeof eras[i].until) {
+ case 'undefined':
+ eras[i].until = +Infinity;
+ break;
+ case 'string':
+ // truncate time
+ date = hooks(eras[i].until).startOf('day').valueOf();
+ eras[i].until = date.valueOf();
+ break;
+ }
+ }
+ return eras;
+ }
+
+ function localeErasParse(eraName, format, strict) {
+ var i,
+ l,
+ eras = this.eras(),
+ name,
+ abbr,
+ narrow;
+ eraName = eraName.toUpperCase();
+
+ for (i = 0, l = eras.length; i < l; ++i) {
+ name = eras[i].name.toUpperCase();
+ abbr = eras[i].abbr.toUpperCase();
+ narrow = eras[i].narrow.toUpperCase();
+
+ if (strict) {
+ switch (format) {
+ case 'N':
+ case 'NN':
+ case 'NNN':
+ if (abbr === eraName) {
+ return eras[i];
+ }
+ break;
+
+ case 'NNNN':
+ if (name === eraName) {
+ return eras[i];
+ }
+ break;
+
+ case 'NNNNN':
+ if (narrow === eraName) {
+ return eras[i];
+ }
+ break;
+ }
+ } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
+ return eras[i];
+ }
+ }
+ }
+
+ function localeErasConvertYear(era, year) {
+ var dir = era.since <= era.until ? +1 : -1;
+ if (year === undefined) {
+ return hooks(era.since).year();
+ } else {
+ return hooks(era.since).year() + (year - era.offset) * dir;
+ }
+ }
+
+ function getEraName() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].name;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].name;
+ }
+ }
+
+ return '';
+ }
+
+ function getEraNarrow() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].narrow;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].narrow;
+ }
+ }
+
+ return '';
+ }
+
+ function getEraAbbr() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].abbr;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].abbr;
+ }
+ }
+
+ return '';
+ }
+
+ function getEraYear() {
+ var i,
+ l,
+ dir,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ dir = eras[i].since <= eras[i].until ? +1 : -1;
+
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (
+ (eras[i].since <= val && val <= eras[i].until) ||
+ (eras[i].until <= val && val <= eras[i].since)
+ ) {
+ return (
+ (this.year() - hooks(eras[i].since).year()) * dir +
+ eras[i].offset
+ );
+ }
+ }
+
+ return this.year();
+ }
+
+ function erasNameRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasNameRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasNameRegex : this._erasRegex;
+ }
+
+ function erasAbbrRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasAbbrRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasAbbrRegex : this._erasRegex;
+ }
+
+ function erasNarrowRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasNarrowRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasNarrowRegex : this._erasRegex;
+ }
+
+ function matchEraAbbr(isStrict, locale) {
+ return locale.erasAbbrRegex(isStrict);
+ }
+
+ function matchEraName(isStrict, locale) {
+ return locale.erasNameRegex(isStrict);
+ }
+
+ function matchEraNarrow(isStrict, locale) {
+ return locale.erasNarrowRegex(isStrict);
+ }
+
+ function matchEraYearOrdinal(isStrict, locale) {
+ return locale._eraYearOrdinalRegex || matchUnsigned;
+ }
+
+ function computeErasParse() {
+ var abbrPieces = [],
+ namePieces = [],
+ narrowPieces = [],
+ mixedPieces = [],
+ i,
+ l,
+ eras = this.eras();
+
+ for (i = 0, l = eras.length; i < l; ++i) {
+ namePieces.push(regexEscape(eras[i].name));
+ abbrPieces.push(regexEscape(eras[i].abbr));
+ narrowPieces.push(regexEscape(eras[i].narrow));
+
+ mixedPieces.push(regexEscape(eras[i].name));
+ mixedPieces.push(regexEscape(eras[i].abbr));
+ mixedPieces.push(regexEscape(eras[i].narrow));
+ }
+
+ this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
+ this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
+ this._erasNarrowRegex = new RegExp(
+ '^(' + narrowPieces.join('|') + ')',
+ 'i'
+ );
+ }
+
+ // FORMATTING
+
+ addFormatToken(0, ['gg', 2], 0, function () {
+ return this.weekYear() % 100;
+ });
+
+ addFormatToken(0, ['GG', 2], 0, function () {
+ return this.isoWeekYear() % 100;
+ });
+
+ function addWeekYearFormatToken(token, getter) {
+ addFormatToken(0, [token, token.length], 0, getter);
+ }
+
+ addWeekYearFormatToken('gggg', 'weekYear');
+ addWeekYearFormatToken('ggggg', 'weekYear');
+ addWeekYearFormatToken('GGGG', 'isoWeekYear');
+ addWeekYearFormatToken('GGGGG', 'isoWeekYear');
+
+ // ALIASES
+
+ addUnitAlias('weekYear', 'gg');
+ addUnitAlias('isoWeekYear', 'GG');
+
+ // PRIORITY
+
+ addUnitPriority('weekYear', 1);
+ addUnitPriority('isoWeekYear', 1);
+
+ // PARSING
+
+ addRegexToken('G', matchSigned);
+ addRegexToken('g', matchSigned);
+ addRegexToken('GG', match1to2, match2);
+ addRegexToken('gg', match1to2, match2);
+ addRegexToken('GGGG', match1to4, match4);
+ addRegexToken('gggg', match1to4, match4);
+ addRegexToken('GGGGG', match1to6, match6);
+ addRegexToken('ggggg', match1to6, match6);
+
+ addWeekParseToken(
+ ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
+ function (input, week, config, token) {
+ week[token.substr(0, 2)] = toInt(input);
+ }
+ );
+
+ addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
+ week[token] = hooks.parseTwoDigitYear(input);
+ });
+
+ // MOMENTS
+
+ function getSetWeekYear(input) {
+ return getSetWeekYearHelper.call(
+ this,
+ input,
+ this.week(),
+ this.weekday(),
+ this.localeData()._week.dow,
+ this.localeData()._week.doy
+ );
+ }
+
+ function getSetISOWeekYear(input) {
+ return getSetWeekYearHelper.call(
+ this,
+ input,
+ this.isoWeek(),
+ this.isoWeekday(),
+ 1,
+ 4
+ );
+ }
+
+ function getISOWeeksInYear() {
+ return weeksInYear(this.year(), 1, 4);
+ }
+
+ function getISOWeeksInISOWeekYear() {
+ return weeksInYear(this.isoWeekYear(), 1, 4);
+ }
+
+ function getWeeksInYear() {
+ var weekInfo = this.localeData()._week;
+ return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
+ }
+
+ function getWeeksInWeekYear() {
+ var weekInfo = this.localeData()._week;
+ return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
+ }
+
+ function getSetWeekYearHelper(input, week, weekday, dow, doy) {
+ var weeksTarget;
+ if (input == null) {
+ return weekOfYear(this, dow, doy).year;
+ } else {
+ weeksTarget = weeksInYear(input, dow, doy);
+ if (week > weeksTarget) {
+ week = weeksTarget;
+ }
+ return setWeekAll.call(this, input, week, weekday, dow, doy);
+ }
+ }
+
+ function setWeekAll(weekYear, week, weekday, dow, doy) {
+ var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
+ date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
+
+ this.year(date.getUTCFullYear());
+ this.month(date.getUTCMonth());
+ this.date(date.getUTCDate());
+ return this;
+ }
+
+ // FORMATTING
+
+ addFormatToken('Q', 0, 'Qo', 'quarter');
+
+ // ALIASES
+
+ addUnitAlias('quarter', 'Q');
+
+ // PRIORITY
+
+ addUnitPriority('quarter', 7);
+
+ // PARSING
+
+ addRegexToken('Q', match1);
+ addParseToken('Q', function (input, array) {
+ array[MONTH] = (toInt(input) - 1) * 3;
+ });
+
+ // MOMENTS
+
+ function getSetQuarter(input) {
+ return input == null
+ ? Math.ceil((this.month() + 1) / 3)
+ : this.month((input - 1) * 3 + (this.month() % 3));
+ }
+
+ // FORMATTING
+
+ addFormatToken('D', ['DD', 2], 'Do', 'date');
+
+ // ALIASES
+
+ addUnitAlias('date', 'D');
+
+ // PRIORITY
+ addUnitPriority('date', 9);
+
+ // PARSING
+
+ addRegexToken('D', match1to2);
+ addRegexToken('DD', match1to2, match2);
+ addRegexToken('Do', function (isStrict, locale) {
+ // TODO: Remove "ordinalParse" fallback in next major release.
+ return isStrict
+ ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
+ : locale._dayOfMonthOrdinalParseLenient;
+ });
+
+ addParseToken(['D', 'DD'], DATE);
+ addParseToken('Do', function (input, array) {
+ array[DATE] = toInt(input.match(match1to2)[0]);
+ });
+
+ // MOMENTS
+
+ var getSetDayOfMonth = makeGetSet('Date', true);
+
+ // FORMATTING
+
+ addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
+
+ // ALIASES
+
+ addUnitAlias('dayOfYear', 'DDD');
+
+ // PRIORITY
+ addUnitPriority('dayOfYear', 4);
+
+ // PARSING
+
+ addRegexToken('DDD', match1to3);
+ addRegexToken('DDDD', match3);
+ addParseToken(['DDD', 'DDDD'], function (input, array, config) {
+ config._dayOfYear = toInt(input);
+ });
+
+ // HELPERS
+
+ // MOMENTS
+
+ function getSetDayOfYear(input) {
+ var dayOfYear =
+ Math.round(
+ (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
+ ) + 1;
+ return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
+ }
+
+ // FORMATTING
+
+ addFormatToken('m', ['mm', 2], 0, 'minute');
+
+ // ALIASES
+
+ addUnitAlias('minute', 'm');
+
+ // PRIORITY
+
+ addUnitPriority('minute', 14);
+
+ // PARSING
+
+ addRegexToken('m', match1to2);
+ addRegexToken('mm', match1to2, match2);
+ addParseToken(['m', 'mm'], MINUTE);
+
+ // MOMENTS
+
+ var getSetMinute = makeGetSet('Minutes', false);
+
+ // FORMATTING
+
+ addFormatToken('s', ['ss', 2], 0, 'second');
+
+ // ALIASES
+
+ addUnitAlias('second', 's');
+
+ // PRIORITY
+
+ addUnitPriority('second', 15);
+
+ // PARSING
+
+ addRegexToken('s', match1to2);
+ addRegexToken('ss', match1to2, match2);
+ addParseToken(['s', 'ss'], SECOND);
+
+ // MOMENTS
+
+ var getSetSecond = makeGetSet('Seconds', false);
+
+ // FORMATTING
+
+ addFormatToken('S', 0, 0, function () {
+ return ~~(this.millisecond() / 100);
+ });
+
+ addFormatToken(0, ['SS', 2], 0, function () {
+ return ~~(this.millisecond() / 10);
+ });
+
+ addFormatToken(0, ['SSS', 3], 0, 'millisecond');
+ addFormatToken(0, ['SSSS', 4], 0, function () {
+ return this.millisecond() * 10;
+ });
+ addFormatToken(0, ['SSSSS', 5], 0, function () {
+ return this.millisecond() * 100;
+ });
+ addFormatToken(0, ['SSSSSS', 6], 0, function () {
+ return this.millisecond() * 1000;
+ });
+ addFormatToken(0, ['SSSSSSS', 7], 0, function () {
+ return this.millisecond() * 10000;
+ });
+ addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
+ return this.millisecond() * 100000;
+ });
+ addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
+ return this.millisecond() * 1000000;
+ });
+
+ // ALIASES
+
+ addUnitAlias('millisecond', 'ms');
+
+ // PRIORITY
+
+ addUnitPriority('millisecond', 16);
+
+ // PARSING
+
+ addRegexToken('S', match1to3, match1);
+ addRegexToken('SS', match1to3, match2);
+ addRegexToken('SSS', match1to3, match3);
+
+ var token, getSetMillisecond;
+ for (token = 'SSSS'; token.length <= 9; token += 'S') {
+ addRegexToken(token, matchUnsigned);
+ }
+
+ function parseMs(input, array) {
+ array[MILLISECOND] = toInt(('0.' + input) * 1000);
+ }
+
+ for (token = 'S'; token.length <= 9; token += 'S') {
+ addParseToken(token, parseMs);
+ }
+
+ getSetMillisecond = makeGetSet('Milliseconds', false);
+
+ // FORMATTING
+
+ addFormatToken('z', 0, 0, 'zoneAbbr');
+ addFormatToken('zz', 0, 0, 'zoneName');
+
+ // MOMENTS
+
+ function getZoneAbbr() {
+ return this._isUTC ? 'UTC' : '';
+ }
+
+ function getZoneName() {
+ return this._isUTC ? 'Coordinated Universal Time' : '';
+ }
+
+ var proto = Moment.prototype;
+
+ proto.add = add;
+ proto.calendar = calendar$1;
+ proto.clone = clone;
+ proto.diff = diff;
+ proto.endOf = endOf;
+ proto.format = format;
+ proto.from = from;
+ proto.fromNow = fromNow;
+ proto.to = to;
+ proto.toNow = toNow;
+ proto.get = stringGet;
+ proto.invalidAt = invalidAt;
+ proto.isAfter = isAfter;
+ proto.isBefore = isBefore;
+ proto.isBetween = isBetween;
+ proto.isSame = isSame;
+ proto.isSameOrAfter = isSameOrAfter;
+ proto.isSameOrBefore = isSameOrBefore;
+ proto.isValid = isValid$2;
+ proto.lang = lang;
+ proto.locale = locale;
+ proto.localeData = localeData;
+ proto.max = prototypeMax;
+ proto.min = prototypeMin;
+ proto.parsingFlags = parsingFlags;
+ proto.set = stringSet;
+ proto.startOf = startOf;
+ proto.subtract = subtract;
+ proto.toArray = toArray;
+ proto.toObject = toObject;
+ proto.toDate = toDate;
+ proto.toISOString = toISOString;
+ proto.inspect = inspect;
+ if (typeof Symbol !== 'undefined' && Symbol.for != null) {
+ proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
+ return 'Moment<' + this.format() + '>';
+ };
+ }
+ proto.toJSON = toJSON;
+ proto.toString = toString;
+ proto.unix = unix;
+ proto.valueOf = valueOf;
+ proto.creationData = creationData;
+ proto.eraName = getEraName;
+ proto.eraNarrow = getEraNarrow;
+ proto.eraAbbr = getEraAbbr;
+ proto.eraYear = getEraYear;
+ proto.year = getSetYear;
+ proto.isLeapYear = getIsLeapYear;
+ proto.weekYear = getSetWeekYear;
+ proto.isoWeekYear = getSetISOWeekYear;
+ proto.quarter = proto.quarters = getSetQuarter;
+ proto.month = getSetMonth;
+ proto.daysInMonth = getDaysInMonth;
+ proto.week = proto.weeks = getSetWeek;
+ proto.isoWeek = proto.isoWeeks = getSetISOWeek;
+ proto.weeksInYear = getWeeksInYear;
+ proto.weeksInWeekYear = getWeeksInWeekYear;
+ proto.isoWeeksInYear = getISOWeeksInYear;
+ proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
+ proto.date = getSetDayOfMonth;
+ proto.day = proto.days = getSetDayOfWeek;
+ proto.weekday = getSetLocaleDayOfWeek;
+ proto.isoWeekday = getSetISODayOfWeek;
+ proto.dayOfYear = getSetDayOfYear;
+ proto.hour = proto.hours = getSetHour;
+ proto.minute = proto.minutes = getSetMinute;
+ proto.second = proto.seconds = getSetSecond;
+ proto.millisecond = proto.milliseconds = getSetMillisecond;
+ proto.utcOffset = getSetOffset;
+ proto.utc = setOffsetToUTC;
+ proto.local = setOffsetToLocal;
+ proto.parseZone = setOffsetToParsedOffset;
+ proto.hasAlignedHourOffset = hasAlignedHourOffset;
+ proto.isDST = isDaylightSavingTime;
+ proto.isLocal = isLocal;
+ proto.isUtcOffset = isUtcOffset;
+ proto.isUtc = isUtc;
+ proto.isUTC = isUtc;
+ proto.zoneAbbr = getZoneAbbr;
+ proto.zoneName = getZoneName;
+ proto.dates = deprecate(
+ 'dates accessor is deprecated. Use date instead.',
+ getSetDayOfMonth
+ );
+ proto.months = deprecate(
+ 'months accessor is deprecated. Use month instead',
+ getSetMonth
+ );
+ proto.years = deprecate(
+ 'years accessor is deprecated. Use year instead',
+ getSetYear
+ );
+ proto.zone = deprecate(
+ 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
+ getSetZone
+ );
+ proto.isDSTShifted = deprecate(
+ 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
+ isDaylightSavingTimeShifted
+ );
+
+ function createUnix(input) {
+ return createLocal(input * 1000);
+ }
+
+ function createInZone() {
+ return createLocal.apply(null, arguments).parseZone();
+ }
+
+ function preParsePostFormat(string) {
+ return string;
+ }
+
+ var proto$1 = Locale.prototype;
+
+ proto$1.calendar = calendar;
+ proto$1.longDateFormat = longDateFormat;
+ proto$1.invalidDate = invalidDate;
+ proto$1.ordinal = ordinal;
+ proto$1.preparse = preParsePostFormat;
+ proto$1.postformat = preParsePostFormat;
+ proto$1.relativeTime = relativeTime;
+ proto$1.pastFuture = pastFuture;
+ proto$1.set = set;
+ proto$1.eras = localeEras;
+ proto$1.erasParse = localeErasParse;
+ proto$1.erasConvertYear = localeErasConvertYear;
+ proto$1.erasAbbrRegex = erasAbbrRegex;
+ proto$1.erasNameRegex = erasNameRegex;
+ proto$1.erasNarrowRegex = erasNarrowRegex;
+
+ proto$1.months = localeMonths;
+ proto$1.monthsShort = localeMonthsShort;
+ proto$1.monthsParse = localeMonthsParse;
+ proto$1.monthsRegex = monthsRegex;
+ proto$1.monthsShortRegex = monthsShortRegex;
+ proto$1.week = localeWeek;
+ proto$1.firstDayOfYear = localeFirstDayOfYear;
+ proto$1.firstDayOfWeek = localeFirstDayOfWeek;
+
+ proto$1.weekdays = localeWeekdays;
+ proto$1.weekdaysMin = localeWeekdaysMin;
+ proto$1.weekdaysShort = localeWeekdaysShort;
+ proto$1.weekdaysParse = localeWeekdaysParse;
+
+ proto$1.weekdaysRegex = weekdaysRegex;
+ proto$1.weekdaysShortRegex = weekdaysShortRegex;
+ proto$1.weekdaysMinRegex = weekdaysMinRegex;
+
+ proto$1.isPM = localeIsPM;
+ proto$1.meridiem = localeMeridiem;
+
+ function get$1(format, index, field, setter) {
+ var locale = getLocale(),
+ utc = createUTC().set(setter, index);
+ return locale[field](utc, format);
+ }
+
+ function listMonthsImpl(format, index, field) {
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+
+ if (index != null) {
+ return get$1(format, index, field, 'month');
+ }
+
+ var i,
+ out = [];
+ for (i = 0; i < 12; i++) {
+ out[i] = get$1(format, i, field, 'month');
+ }
+ return out;
+ }
+
+ // ()
+ // (5)
+ // (fmt, 5)
+ // (fmt)
+ // (true)
+ // (true, 5)
+ // (true, fmt, 5)
+ // (true, fmt)
+ function listWeekdaysImpl(localeSorted, format, index, field) {
+ if (typeof localeSorted === 'boolean') {
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+ } else {
+ format = localeSorted;
+ index = format;
+ localeSorted = false;
+
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+ }
+
+ var locale = getLocale(),
+ shift = localeSorted ? locale._week.dow : 0,
+ i,
+ out = [];
+
+ if (index != null) {
+ return get$1(format, (index + shift) % 7, field, 'day');
+ }
+
+ for (i = 0; i < 7; i++) {
+ out[i] = get$1(format, (i + shift) % 7, field, 'day');
+ }
+ return out;
+ }
+
+ function listMonths(format, index) {
+ return listMonthsImpl(format, index, 'months');
+ }
+
+ function listMonthsShort(format, index) {
+ return listMonthsImpl(format, index, 'monthsShort');
+ }
+
+ function listWeekdays(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
+ }
+
+ function listWeekdaysShort(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
+ }
+
+ function listWeekdaysMin(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
+ }
+
+ getSetGlobalLocale('en', {
+ eras: [
+ {
+ since: '0001-01-01',
+ until: +Infinity,
+ offset: 1,
+ name: 'Anno Domini',
+ narrow: 'AD',
+ abbr: 'AD',
+ },
+ {
+ since: '0000-12-31',
+ until: -Infinity,
+ offset: 1,
+ name: 'Before Christ',
+ narrow: 'BC',
+ abbr: 'BC',
+ },
+ ],
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ toInt((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ });
+
+ // Side effect imports
+
+ hooks.lang = deprecate(
+ 'moment.lang is deprecated. Use moment.locale instead.',
+ getSetGlobalLocale
+ );
+ hooks.langData = deprecate(
+ 'moment.langData is deprecated. Use moment.localeData instead.',
+ getLocale
+ );
+
+ var mathAbs = Math.abs;
+
+ function abs() {
+ var data = this._data;
+
+ this._milliseconds = mathAbs(this._milliseconds);
+ this._days = mathAbs(this._days);
+ this._months = mathAbs(this._months);
+
+ data.milliseconds = mathAbs(data.milliseconds);
+ data.seconds = mathAbs(data.seconds);
+ data.minutes = mathAbs(data.minutes);
+ data.hours = mathAbs(data.hours);
+ data.months = mathAbs(data.months);
+ data.years = mathAbs(data.years);
+
+ return this;
+ }
+
+ function addSubtract$1(duration, input, value, direction) {
+ var other = createDuration(input, value);
+
+ duration._milliseconds += direction * other._milliseconds;
+ duration._days += direction * other._days;
+ duration._months += direction * other._months;
+
+ return duration._bubble();
+ }
+
+ // supports only 2.0-style add(1, 's') or add(duration)
+ function add$1(input, value) {
+ return addSubtract$1(this, input, value, 1);
+ }
+
+ // supports only 2.0-style subtract(1, 's') or subtract(duration)
+ function subtract$1(input, value) {
+ return addSubtract$1(this, input, value, -1);
+ }
+
+ function absCeil(number) {
+ if (number < 0) {
+ return Math.floor(number);
+ } else {
+ return Math.ceil(number);
+ }
+ }
+
+ function bubble() {
+ var milliseconds = this._milliseconds,
+ days = this._days,
+ months = this._months,
+ data = this._data,
+ seconds,
+ minutes,
+ hours,
+ years,
+ monthsFromDays;
+
+ // if we have a mix of positive and negative values, bubble down first
+ // check: https://github.com/moment/moment/issues/2166
+ if (
+ !(
+ (milliseconds >= 0 && days >= 0 && months >= 0) ||
+ (milliseconds <= 0 && days <= 0 && months <= 0)
+ )
+ ) {
+ milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
+ days = 0;
+ months = 0;
+ }
+
+ // The following code bubbles up values, see the tests for
+ // examples of what that means.
+ data.milliseconds = milliseconds % 1000;
+
+ seconds = absFloor(milliseconds / 1000);
+ data.seconds = seconds % 60;
+
+ minutes = absFloor(seconds / 60);
+ data.minutes = minutes % 60;
+
+ hours = absFloor(minutes / 60);
+ data.hours = hours % 24;
+
+ days += absFloor(hours / 24);
+
+ // convert days to months
+ monthsFromDays = absFloor(daysToMonths(days));
+ months += monthsFromDays;
+ days -= absCeil(monthsToDays(monthsFromDays));
+
+ // 12 months -> 1 year
+ years = absFloor(months / 12);
+ months %= 12;
+
+ data.days = days;
+ data.months = months;
+ data.years = years;
+
+ return this;
+ }
+
+ function daysToMonths(days) {
+ // 400 years have 146097 days (taking into account leap year rules)
+ // 400 years have 12 months === 4800
+ return (days * 4800) / 146097;
+ }
+
+ function monthsToDays(months) {
+ // the reverse of daysToMonths
+ return (months * 146097) / 4800;
+ }
+
+ function as(units) {
+ if (!this.isValid()) {
+ return NaN;
+ }
+ var days,
+ months,
+ milliseconds = this._milliseconds;
+
+ units = normalizeUnits(units);
+
+ if (units === 'month' || units === 'quarter' || units === 'year') {
+ days = this._days + milliseconds / 864e5;
+ months = this._months + daysToMonths(days);
+ switch (units) {
+ case 'month':
+ return months;
+ case 'quarter':
+ return months / 3;
+ case 'year':
+ return months / 12;
+ }
+ } else {
+ // handle milliseconds separately because of floating point math errors (issue #1867)
+ days = this._days + Math.round(monthsToDays(this._months));
+ switch (units) {
+ case 'week':
+ return days / 7 + milliseconds / 6048e5;
+ case 'day':
+ return days + milliseconds / 864e5;
+ case 'hour':
+ return days * 24 + milliseconds / 36e5;
+ case 'minute':
+ return days * 1440 + milliseconds / 6e4;
+ case 'second':
+ return days * 86400 + milliseconds / 1000;
+ // Math.floor prevents floating point math errors here
+ case 'millisecond':
+ return Math.floor(days * 864e5) + milliseconds;
+ default:
+ throw new Error('Unknown unit ' + units);
+ }
+ }
+ }
+
+ // TODO: Use this.as('ms')?
+ function valueOf$1() {
+ if (!this.isValid()) {
+ return NaN;
+ }
+ return (
+ this._milliseconds +
+ this._days * 864e5 +
+ (this._months % 12) * 2592e6 +
+ toInt(this._months / 12) * 31536e6
+ );
+ }
+
+ function makeAs(alias) {
+ return function () {
+ return this.as(alias);
+ };
+ }
+
+ var asMilliseconds = makeAs('ms'),
+ asSeconds = makeAs('s'),
+ asMinutes = makeAs('m'),
+ asHours = makeAs('h'),
+ asDays = makeAs('d'),
+ asWeeks = makeAs('w'),
+ asMonths = makeAs('M'),
+ asQuarters = makeAs('Q'),
+ asYears = makeAs('y');
+
+ function clone$1() {
+ return createDuration(this);
+ }
+
+ function get$2(units) {
+ units = normalizeUnits(units);
+ return this.isValid() ? this[units + 's']() : NaN;
+ }
+
+ function makeGetter(name) {
+ return function () {
+ return this.isValid() ? this._data[name] : NaN;
+ };
+ }
+
+ var milliseconds = makeGetter('milliseconds'),
+ seconds = makeGetter('seconds'),
+ minutes = makeGetter('minutes'),
+ hours = makeGetter('hours'),
+ days = makeGetter('days'),
+ months = makeGetter('months'),
+ years = makeGetter('years');
+
+ function weeks() {
+ return absFloor(this.days() / 7);
+ }
+
+ var round = Math.round,
+ thresholds = {
+ ss: 44, // a few seconds to seconds
+ s: 45, // seconds to minute
+ m: 45, // minutes to hour
+ h: 22, // hours to day
+ d: 26, // days to month/week
+ w: null, // weeks to month
+ M: 11, // months to year
+ };
+
+ // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
+ function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
+ return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
+ }
+
+ function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
+ var duration = createDuration(posNegDuration).abs(),
+ seconds = round(duration.as('s')),
+ minutes = round(duration.as('m')),
+ hours = round(duration.as('h')),
+ days = round(duration.as('d')),
+ months = round(duration.as('M')),
+ weeks = round(duration.as('w')),
+ years = round(duration.as('y')),
+ a =
+ (seconds <= thresholds.ss && ['s', seconds]) ||
+ (seconds < thresholds.s && ['ss', seconds]) ||
+ (minutes <= 1 && ['m']) ||
+ (minutes < thresholds.m && ['mm', minutes]) ||
+ (hours <= 1 && ['h']) ||
+ (hours < thresholds.h && ['hh', hours]) ||
+ (days <= 1 && ['d']) ||
+ (days < thresholds.d && ['dd', days]);
+
+ if (thresholds.w != null) {
+ a =
+ a ||
+ (weeks <= 1 && ['w']) ||
+ (weeks < thresholds.w && ['ww', weeks]);
+ }
+ a = a ||
+ (months <= 1 && ['M']) ||
+ (months < thresholds.M && ['MM', months]) ||
+ (years <= 1 && ['y']) || ['yy', years];
+
+ a[2] = withoutSuffix;
+ a[3] = +posNegDuration > 0;
+ a[4] = locale;
+ return substituteTimeAgo.apply(null, a);
+ }
+
+ // This function allows you to set the rounding function for relative time strings
+ function getSetRelativeTimeRounding(roundingFunction) {
+ if (roundingFunction === undefined) {
+ return round;
+ }
+ if (typeof roundingFunction === 'function') {
+ round = roundingFunction;
+ return true;
+ }
+ return false;
+ }
+
+ // This function allows you to set a threshold for relative time strings
+ function getSetRelativeTimeThreshold(threshold, limit) {
+ if (thresholds[threshold] === undefined) {
+ return false;
+ }
+ if (limit === undefined) {
+ return thresholds[threshold];
+ }
+ thresholds[threshold] = limit;
+ if (threshold === 's') {
+ thresholds.ss = limit - 1;
+ }
+ return true;
+ }
+
+ function humanize(argWithSuffix, argThresholds) {
+ if (!this.isValid()) {
+ return this.localeData().invalidDate();
+ }
+
+ var withSuffix = false,
+ th = thresholds,
+ locale,
+ output;
+
+ if (typeof argWithSuffix === 'object') {
+ argThresholds = argWithSuffix;
+ argWithSuffix = false;
+ }
+ if (typeof argWithSuffix === 'boolean') {
+ withSuffix = argWithSuffix;
+ }
+ if (typeof argThresholds === 'object') {
+ th = Object.assign({}, thresholds, argThresholds);
+ if (argThresholds.s != null && argThresholds.ss == null) {
+ th.ss = argThresholds.s - 1;
+ }
+ }
+
+ locale = this.localeData();
+ output = relativeTime$1(this, !withSuffix, th, locale);
+
+ if (withSuffix) {
+ output = locale.pastFuture(+this, output);
+ }
+
+ return locale.postformat(output);
+ }
+
+ var abs$1 = Math.abs;
+
+ function sign(x) {
+ return (x > 0) - (x < 0) || +x;
+ }
+
+ function toISOString$1() {
+ // for ISO strings we do not use the normal bubbling rules:
+ // * milliseconds bubble up until they become hours
+ // * days do not bubble at all
+ // * months bubble up until they become years
+ // This is because there is no context-free conversion between hours and days
+ // (think of clock changes)
+ // and also not between days and months (28-31 days per month)
+ if (!this.isValid()) {
+ return this.localeData().invalidDate();
+ }
+
+ var seconds = abs$1(this._milliseconds) / 1000,
+ days = abs$1(this._days),
+ months = abs$1(this._months),
+ minutes,
+ hours,
+ years,
+ s,
+ total = this.asSeconds(),
+ totalSign,
+ ymSign,
+ daysSign,
+ hmsSign;
+
+ if (!total) {
+ // this is the same as C#'s (Noda) and python (isodate)...
+ // but not other JS (goog.date)
+ return 'P0D';
+ }
+
+ // 3600 seconds -> 60 minutes -> 1 hour
+ minutes = absFloor(seconds / 60);
+ hours = absFloor(minutes / 60);
+ seconds %= 60;
+ minutes %= 60;
+
+ // 12 months -> 1 year
+ years = absFloor(months / 12);
+ months %= 12;
+
+ // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
+ s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
+
+ totalSign = total < 0 ? '-' : '';
+ ymSign = sign(this._months) !== sign(total) ? '-' : '';
+ daysSign = sign(this._days) !== sign(total) ? '-' : '';
+ hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
+
+ return (
+ totalSign +
+ 'P' +
+ (years ? ymSign + years + 'Y' : '') +
+ (months ? ymSign + months + 'M' : '') +
+ (days ? daysSign + days + 'D' : '') +
+ (hours || minutes || seconds ? 'T' : '') +
+ (hours ? hmsSign + hours + 'H' : '') +
+ (minutes ? hmsSign + minutes + 'M' : '') +
+ (seconds ? hmsSign + s + 'S' : '')
+ );
+ }
+
+ var proto$2 = Duration.prototype;
+
+ proto$2.isValid = isValid$1;
+ proto$2.abs = abs;
+ proto$2.add = add$1;
+ proto$2.subtract = subtract$1;
+ proto$2.as = as;
+ proto$2.asMilliseconds = asMilliseconds;
+ proto$2.asSeconds = asSeconds;
+ proto$2.asMinutes = asMinutes;
+ proto$2.asHours = asHours;
+ proto$2.asDays = asDays;
+ proto$2.asWeeks = asWeeks;
+ proto$2.asMonths = asMonths;
+ proto$2.asQuarters = asQuarters;
+ proto$2.asYears = asYears;
+ proto$2.valueOf = valueOf$1;
+ proto$2._bubble = bubble;
+ proto$2.clone = clone$1;
+ proto$2.get = get$2;
+ proto$2.milliseconds = milliseconds;
+ proto$2.seconds = seconds;
+ proto$2.minutes = minutes;
+ proto$2.hours = hours;
+ proto$2.days = days;
+ proto$2.weeks = weeks;
+ proto$2.months = months;
+ proto$2.years = years;
+ proto$2.humanize = humanize;
+ proto$2.toISOString = toISOString$1;
+ proto$2.toString = toISOString$1;
+ proto$2.toJSON = toISOString$1;
+ proto$2.locale = locale;
+ proto$2.localeData = localeData;
+
+ proto$2.toIsoString = deprecate(
+ 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
+ toISOString$1
+ );
+ proto$2.lang = lang;
+
+ // FORMATTING
+
+ addFormatToken('X', 0, 0, 'unix');
+ addFormatToken('x', 0, 0, 'valueOf');
+
+ // PARSING
+
+ addRegexToken('x', matchSigned);
+ addRegexToken('X', matchTimestamp);
+ addParseToken('X', function (input, array, config) {
+ config._d = new Date(parseFloat(input) * 1000);
+ });
+ addParseToken('x', function (input, array, config) {
+ config._d = new Date(toInt(input));
+ });
+
+ //! moment.js
+
+ hooks.version = '2.29.4';
+
+ setHookCallback(createLocal);
+
+ hooks.fn = proto;
+ hooks.min = min;
+ hooks.max = max;
+ hooks.now = now;
+ hooks.utc = createUTC;
+ hooks.unix = createUnix;
+ hooks.months = listMonths;
+ hooks.isDate = isDate;
+ hooks.locale = getSetGlobalLocale;
+ hooks.invalid = createInvalid;
+ hooks.duration = createDuration;
+ hooks.isMoment = isMoment;
+ hooks.weekdays = listWeekdays;
+ hooks.parseZone = createInZone;
+ hooks.localeData = getLocale;
+ hooks.isDuration = isDuration;
+ hooks.monthsShort = listMonthsShort;
+ hooks.weekdaysMin = listWeekdaysMin;
+ hooks.defineLocale = defineLocale;
+ hooks.updateLocale = updateLocale;
+ hooks.locales = listLocales;
+ hooks.weekdaysShort = listWeekdaysShort;
+ hooks.normalizeUnits = normalizeUnits;
+ hooks.relativeTimeRounding = getSetRelativeTimeRounding;
+ hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
+ hooks.calendarFormat = getCalendarFormat;
+ hooks.prototype = proto;
+
+ // currently HTML5 input type only supports 24-hour formats
+ hooks.HTML5_FMT = {
+ DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', //
+ DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', //
+ DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', //
+ DATE: 'YYYY-MM-DD', //
+ TIME: 'HH:mm', //
+ TIME_SECONDS: 'HH:mm:ss', //
+ TIME_MS: 'HH:mm:ss.SSS', //
+ WEEK: 'GGGG-[W]WW', //
+ MONTH: 'YYYY-MM', //
+ };
+
+ return hooks;
+
+})));
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/check-overflow.js b/vendor/assets/javascripts/momentjs/src/lib/create/check-overflow.js
new file mode 100644
index 000000000..9cb0fba75
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/check-overflow.js
@@ -0,0 +1,57 @@
+import { daysInMonth } from '../units/month';
+import {
+ YEAR,
+ MONTH,
+ DATE,
+ HOUR,
+ MINUTE,
+ SECOND,
+ MILLISECOND,
+ WEEK,
+ WEEKDAY,
+} from '../units/constants';
+import getParsingFlags from '../create/parsing-flags';
+
+export default function checkOverflow(m) {
+ var overflow,
+ a = m._a;
+
+ if (a && getParsingFlags(m).overflow === -2) {
+ overflow =
+ a[MONTH] < 0 || a[MONTH] > 11
+ ? MONTH
+ : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
+ ? DATE
+ : a[HOUR] < 0 ||
+ a[HOUR] > 24 ||
+ (a[HOUR] === 24 &&
+ (a[MINUTE] !== 0 ||
+ a[SECOND] !== 0 ||
+ a[MILLISECOND] !== 0))
+ ? HOUR
+ : a[MINUTE] < 0 || a[MINUTE] > 59
+ ? MINUTE
+ : a[SECOND] < 0 || a[SECOND] > 59
+ ? SECOND
+ : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
+ ? MILLISECOND
+ : -1;
+
+ if (
+ getParsingFlags(m)._overflowDayOfYear &&
+ (overflow < YEAR || overflow > DATE)
+ ) {
+ overflow = DATE;
+ }
+ if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
+ overflow = WEEK;
+ }
+ if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
+ overflow = WEEKDAY;
+ }
+
+ getParsingFlags(m).overflow = overflow;
+ }
+
+ return m;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/date-from-array.js b/vendor/assets/javascripts/momentjs/src/lib/create/date-from-array.js
new file mode 100644
index 000000000..3d3498d71
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/date-from-array.js
@@ -0,0 +1,35 @@
+export function createDate(y, m, d, h, M, s, ms) {
+ // can't just apply() to create a date:
+ // https://stackoverflow.com/q/181348
+ var date;
+ // the date constructor remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ date = new Date(y + 400, m, d, h, M, s, ms);
+ if (isFinite(date.getFullYear())) {
+ date.setFullYear(y);
+ }
+ } else {
+ date = new Date(y, m, d, h, M, s, ms);
+ }
+
+ return date;
+}
+
+export function createUTCDate(y) {
+ var date, args;
+ // the Date.UTC function remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ args = Array.prototype.slice.call(arguments);
+ // preserve leap years using a full 400 year cycle, then reset
+ args[0] = y + 400;
+ date = new Date(Date.UTC.apply(null, args));
+ if (isFinite(date.getUTCFullYear())) {
+ date.setUTCFullYear(y);
+ }
+ } else {
+ date = new Date(Date.UTC.apply(null, arguments));
+ }
+
+ return date;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/from-anything.js b/vendor/assets/javascripts/momentjs/src/lib/create/from-anything.js
new file mode 100644
index 000000000..0c5d77236
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/from-anything.js
@@ -0,0 +1,117 @@
+import isArray from '../utils/is-array';
+import isObject from '../utils/is-object';
+import isObjectEmpty from '../utils/is-object-empty';
+import isUndefined from '../utils/is-undefined';
+import isNumber from '../utils/is-number';
+import isDate from '../utils/is-date';
+import map from '../utils/map';
+import { createInvalid } from './valid';
+import { Moment, isMoment } from '../moment/constructor';
+import { getLocale } from '../locale/locales';
+import { hooks } from '../utils/hooks';
+import checkOverflow from './check-overflow';
+import { isValid } from './valid';
+
+import { configFromStringAndArray } from './from-string-and-array';
+import { configFromStringAndFormat } from './from-string-and-format';
+import { configFromString } from './from-string';
+import { configFromArray } from './from-array';
+import { configFromObject } from './from-object';
+
+function createFromConfig(config) {
+ var res = new Moment(checkOverflow(prepareConfig(config)));
+ if (res._nextDay) {
+ // Adding is smart enough around DST
+ res.add(1, 'd');
+ res._nextDay = undefined;
+ }
+
+ return res;
+}
+
+export function prepareConfig(config) {
+ var input = config._i,
+ format = config._f;
+
+ config._locale = config._locale || getLocale(config._l);
+
+ if (input === null || (format === undefined && input === '')) {
+ return createInvalid({ nullInput: true });
+ }
+
+ if (typeof input === 'string') {
+ config._i = input = config._locale.preparse(input);
+ }
+
+ if (isMoment(input)) {
+ return new Moment(checkOverflow(input));
+ } else if (isDate(input)) {
+ config._d = input;
+ } else if (isArray(format)) {
+ configFromStringAndArray(config);
+ } else if (format) {
+ configFromStringAndFormat(config);
+ } else {
+ configFromInput(config);
+ }
+
+ if (!isValid(config)) {
+ config._d = null;
+ }
+
+ return config;
+}
+
+function configFromInput(config) {
+ var input = config._i;
+ if (isUndefined(input)) {
+ config._d = new Date(hooks.now());
+ } else if (isDate(input)) {
+ config._d = new Date(input.valueOf());
+ } else if (typeof input === 'string') {
+ configFromString(config);
+ } else if (isArray(input)) {
+ config._a = map(input.slice(0), function (obj) {
+ return parseInt(obj, 10);
+ });
+ configFromArray(config);
+ } else if (isObject(input)) {
+ configFromObject(config);
+ } else if (isNumber(input)) {
+ // from milliseconds
+ config._d = new Date(input);
+ } else {
+ hooks.createFromInputFallback(config);
+ }
+}
+
+export function createLocalOrUTC(input, format, locale, strict, isUTC) {
+ var c = {};
+
+ if (format === true || format === false) {
+ strict = format;
+ format = undefined;
+ }
+
+ if (locale === true || locale === false) {
+ strict = locale;
+ locale = undefined;
+ }
+
+ if (
+ (isObject(input) && isObjectEmpty(input)) ||
+ (isArray(input) && input.length === 0)
+ ) {
+ input = undefined;
+ }
+ // object construction must be done this way.
+ // https://github.com/moment/moment/issues/1423
+ c._isAMomentObject = true;
+ c._useUTC = c._isUTC = isUTC;
+ c._l = locale;
+ c._i = input;
+ c._f = format;
+ c._strict = strict;
+
+ return createFromConfig(c);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/from-array.js b/vendor/assets/javascripts/momentjs/src/lib/create/from-array.js
new file mode 100644
index 000000000..610d802da
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/from-array.js
@@ -0,0 +1,187 @@
+import { hooks } from '../utils/hooks';
+import { createDate, createUTCDate } from './date-from-array';
+import { daysInYear } from '../units/year';
+import {
+ weekOfYear,
+ weeksInYear,
+ dayOfYearFromWeeks,
+} from '../units/week-calendar-utils';
+import {
+ YEAR,
+ MONTH,
+ DATE,
+ HOUR,
+ MINUTE,
+ SECOND,
+ MILLISECOND,
+} from '../units/constants';
+import { createLocal } from './local';
+import defaults from '../utils/defaults';
+import getParsingFlags from './parsing-flags';
+
+function currentDateArray(config) {
+ // hooks is actually the exported moment object
+ var nowValue = new Date(hooks.now());
+ if (config._useUTC) {
+ return [
+ nowValue.getUTCFullYear(),
+ nowValue.getUTCMonth(),
+ nowValue.getUTCDate(),
+ ];
+ }
+ return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
+}
+
+// convert an array to a date.
+// the array should mirror the parameters below
+// note: all values past the year are optional and will default to the lowest possible value.
+// [year, month, day , hour, minute, second, millisecond]
+export function configFromArray(config) {
+ var i,
+ date,
+ input = [],
+ currentDate,
+ expectedWeekday,
+ yearToUse;
+
+ if (config._d) {
+ return;
+ }
+
+ currentDate = currentDateArray(config);
+
+ //compute day of the year from weeks and weekdays
+ if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
+ dayOfYearFromWeekInfo(config);
+ }
+
+ //if the day of the year is set, figure out what it is
+ if (config._dayOfYear != null) {
+ yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
+
+ if (
+ config._dayOfYear > daysInYear(yearToUse) ||
+ config._dayOfYear === 0
+ ) {
+ getParsingFlags(config)._overflowDayOfYear = true;
+ }
+
+ date = createUTCDate(yearToUse, 0, config._dayOfYear);
+ config._a[MONTH] = date.getUTCMonth();
+ config._a[DATE] = date.getUTCDate();
+ }
+
+ // Default to current date.
+ // * if no year, month, day of month are given, default to today
+ // * if day of month is given, default month and year
+ // * if month is given, default only year
+ // * if year is given, don't default anything
+ for (i = 0; i < 3 && config._a[i] == null; ++i) {
+ config._a[i] = input[i] = currentDate[i];
+ }
+
+ // Zero out whatever was not defaulted, including time
+ for (; i < 7; i++) {
+ config._a[i] = input[i] =
+ config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
+ }
+
+ // Check for 24:00:00.000
+ if (
+ config._a[HOUR] === 24 &&
+ config._a[MINUTE] === 0 &&
+ config._a[SECOND] === 0 &&
+ config._a[MILLISECOND] === 0
+ ) {
+ config._nextDay = true;
+ config._a[HOUR] = 0;
+ }
+
+ config._d = (config._useUTC ? createUTCDate : createDate).apply(
+ null,
+ input
+ );
+ expectedWeekday = config._useUTC
+ ? config._d.getUTCDay()
+ : config._d.getDay();
+
+ // Apply timezone offset from input. The actual utcOffset can be changed
+ // with parseZone.
+ if (config._tzm != null) {
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
+ }
+
+ if (config._nextDay) {
+ config._a[HOUR] = 24;
+ }
+
+ // check for mismatching day of week
+ if (
+ config._w &&
+ typeof config._w.d !== 'undefined' &&
+ config._w.d !== expectedWeekday
+ ) {
+ getParsingFlags(config).weekdayMismatch = true;
+ }
+}
+
+function dayOfYearFromWeekInfo(config) {
+ var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
+
+ w = config._w;
+ if (w.GG != null || w.W != null || w.E != null) {
+ dow = 1;
+ doy = 4;
+
+ // TODO: We need to take the current isoWeekYear, but that depends on
+ // how we interpret now (local, utc, fixed offset). So create
+ // a now version of current config (take local/utc/offset flags, and
+ // create now).
+ weekYear = defaults(
+ w.GG,
+ config._a[YEAR],
+ weekOfYear(createLocal(), 1, 4).year
+ );
+ week = defaults(w.W, 1);
+ weekday = defaults(w.E, 1);
+ if (weekday < 1 || weekday > 7) {
+ weekdayOverflow = true;
+ }
+ } else {
+ dow = config._locale._week.dow;
+ doy = config._locale._week.doy;
+
+ curWeek = weekOfYear(createLocal(), dow, doy);
+
+ weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
+
+ // Default to current week.
+ week = defaults(w.w, curWeek.week);
+
+ if (w.d != null) {
+ // weekday -- low day numbers are considered next week
+ weekday = w.d;
+ if (weekday < 0 || weekday > 6) {
+ weekdayOverflow = true;
+ }
+ } else if (w.e != null) {
+ // local weekday -- counting starts from beginning of week
+ weekday = w.e + dow;
+ if (w.e < 0 || w.e > 6) {
+ weekdayOverflow = true;
+ }
+ } else {
+ // default to beginning of week
+ weekday = dow;
+ }
+ }
+ if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
+ getParsingFlags(config)._overflowWeeks = true;
+ } else if (weekdayOverflow != null) {
+ getParsingFlags(config)._overflowWeekday = true;
+ } else {
+ temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
+ config._a[YEAR] = temp.year;
+ config._dayOfYear = temp.dayOfYear;
+ }
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/from-object.js b/vendor/assets/javascripts/momentjs/src/lib/create/from-object.js
new file mode 100644
index 000000000..55d15c7fa
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/from-object.js
@@ -0,0 +1,20 @@
+import { normalizeObjectUnits } from '../units/aliases';
+import { configFromArray } from './from-array';
+import map from '../utils/map';
+
+export function configFromObject(config) {
+ if (config._d) {
+ return;
+ }
+
+ var i = normalizeObjectUnits(config._i),
+ dayOrDate = i.day === undefined ? i.date : i.day;
+ config._a = map(
+ [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
+ function (obj) {
+ return obj && parseInt(obj, 10);
+ }
+ );
+
+ configFromArray(config);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/from-string-and-array.js b/vendor/assets/javascripts/momentjs/src/lib/create/from-string-and-array.js
new file mode 100644
index 000000000..4e6416742
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/from-string-and-array.js
@@ -0,0 +1,67 @@
+import { copyConfig } from '../moment/constructor';
+import { configFromStringAndFormat } from './from-string-and-format';
+import getParsingFlags from './parsing-flags';
+import { isValid } from './valid';
+import extend from '../utils/extend';
+
+// date from string and array of format strings
+export function configFromStringAndArray(config) {
+ var tempConfig,
+ bestMoment,
+ scoreToBeat,
+ i,
+ currentScore,
+ validFormatFound,
+ bestFormatIsValid = false,
+ configfLen = config._f.length;
+
+ if (configfLen === 0) {
+ getParsingFlags(config).invalidFormat = true;
+ config._d = new Date(NaN);
+ return;
+ }
+
+ for (i = 0; i < configfLen; i++) {
+ currentScore = 0;
+ validFormatFound = false;
+ tempConfig = copyConfig({}, config);
+ if (config._useUTC != null) {
+ tempConfig._useUTC = config._useUTC;
+ }
+ tempConfig._f = config._f[i];
+ configFromStringAndFormat(tempConfig);
+
+ if (isValid(tempConfig)) {
+ validFormatFound = true;
+ }
+
+ // if there is any input that was not parsed add a penalty for that format
+ currentScore += getParsingFlags(tempConfig).charsLeftOver;
+
+ //or tokens
+ currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
+
+ getParsingFlags(tempConfig).score = currentScore;
+
+ if (!bestFormatIsValid) {
+ if (
+ scoreToBeat == null ||
+ currentScore < scoreToBeat ||
+ validFormatFound
+ ) {
+ scoreToBeat = currentScore;
+ bestMoment = tempConfig;
+ if (validFormatFound) {
+ bestFormatIsValid = true;
+ }
+ }
+ } else {
+ if (currentScore < scoreToBeat) {
+ scoreToBeat = currentScore;
+ bestMoment = tempConfig;
+ }
+ }
+ }
+
+ extend(config, bestMoment || tempConfig);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/from-string-and-format.js b/vendor/assets/javascripts/momentjs/src/lib/create/from-string-and-format.js
new file mode 100644
index 000000000..82d60d520
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/from-string-and-format.js
@@ -0,0 +1,135 @@
+import { configFromISO, configFromRFC2822 } from './from-string';
+import { configFromArray } from './from-array';
+import { getParseRegexForToken } from '../parse/regex';
+import { addTimeToArrayFromToken } from '../parse/token';
+import {
+ expandFormat,
+ formatTokenFunctions,
+ formattingTokens,
+} from '../format/format';
+import checkOverflow from './check-overflow';
+import { YEAR, HOUR } from '../units/constants';
+import { hooks } from '../utils/hooks';
+import getParsingFlags from './parsing-flags';
+
+// constant that refers to the ISO standard
+hooks.ISO_8601 = function () {};
+
+// constant that refers to the RFC 2822 form
+hooks.RFC_2822 = function () {};
+
+// date from string and format string
+export function configFromStringAndFormat(config) {
+ // TODO: Move this to another part of the creation flow to prevent circular deps
+ if (config._f === hooks.ISO_8601) {
+ configFromISO(config);
+ return;
+ }
+ if (config._f === hooks.RFC_2822) {
+ configFromRFC2822(config);
+ return;
+ }
+ config._a = [];
+ getParsingFlags(config).empty = true;
+
+ // This array is used to make a Date, either with `new Date` or `Date.UTC`
+ var string = '' + config._i,
+ i,
+ parsedInput,
+ tokens,
+ token,
+ skipped,
+ stringLength = string.length,
+ totalParsedInputLength = 0,
+ era,
+ tokenLen;
+
+ tokens =
+ expandFormat(config._f, config._locale).match(formattingTokens) || [];
+ tokenLen = tokens.length;
+ for (i = 0; i < tokenLen; i++) {
+ token = tokens[i];
+ parsedInput = (string.match(getParseRegexForToken(token, config)) ||
+ [])[0];
+ if (parsedInput) {
+ skipped = string.substr(0, string.indexOf(parsedInput));
+ if (skipped.length > 0) {
+ getParsingFlags(config).unusedInput.push(skipped);
+ }
+ string = string.slice(
+ string.indexOf(parsedInput) + parsedInput.length
+ );
+ totalParsedInputLength += parsedInput.length;
+ }
+ // don't parse if it's not a known token
+ if (formatTokenFunctions[token]) {
+ if (parsedInput) {
+ getParsingFlags(config).empty = false;
+ } else {
+ getParsingFlags(config).unusedTokens.push(token);
+ }
+ addTimeToArrayFromToken(token, parsedInput, config);
+ } else if (config._strict && !parsedInput) {
+ getParsingFlags(config).unusedTokens.push(token);
+ }
+ }
+
+ // add remaining unparsed input length to the string
+ getParsingFlags(config).charsLeftOver =
+ stringLength - totalParsedInputLength;
+ if (string.length > 0) {
+ getParsingFlags(config).unusedInput.push(string);
+ }
+
+ // clear _12h flag if hour is <= 12
+ if (
+ config._a[HOUR] <= 12 &&
+ getParsingFlags(config).bigHour === true &&
+ config._a[HOUR] > 0
+ ) {
+ getParsingFlags(config).bigHour = undefined;
+ }
+
+ getParsingFlags(config).parsedDateParts = config._a.slice(0);
+ getParsingFlags(config).meridiem = config._meridiem;
+ // handle meridiem
+ config._a[HOUR] = meridiemFixWrap(
+ config._locale,
+ config._a[HOUR],
+ config._meridiem
+ );
+
+ // handle era
+ era = getParsingFlags(config).era;
+ if (era !== null) {
+ config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
+ }
+
+ configFromArray(config);
+ checkOverflow(config);
+}
+
+function meridiemFixWrap(locale, hour, meridiem) {
+ var isPm;
+
+ if (meridiem == null) {
+ // nothing to do
+ return hour;
+ }
+ if (locale.meridiemHour != null) {
+ return locale.meridiemHour(hour, meridiem);
+ } else if (locale.isPM != null) {
+ // Fallback
+ isPm = locale.isPM(meridiem);
+ if (isPm && hour < 12) {
+ hour += 12;
+ }
+ if (!isPm && hour === 12) {
+ hour = 0;
+ }
+ return hour;
+ } else {
+ // this is not supposed to happen
+ return hour;
+ }
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/from-string.js b/vendor/assets/javascripts/momentjs/src/lib/create/from-string.js
new file mode 100644
index 000000000..58739b9d7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/from-string.js
@@ -0,0 +1,258 @@
+import { configFromStringAndFormat } from './from-string-and-format';
+import { createUTCDate } from './date-from-array';
+import { hooks } from '../utils/hooks';
+import { deprecate } from '../utils/deprecate';
+import getParsingFlags from './parsing-flags';
+import { defaultLocaleMonthsShort } from '../units/month';
+import { defaultLocaleWeekdaysShort } from '../units/day-of-week';
+
+// iso 8601 regex
+// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
+var extendedIsoRegex =
+ /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+ basicIsoRegex =
+ /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+ tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
+ isoDates = [
+ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
+ ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
+ ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
+ ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
+ ['YYYY-DDD', /\d{4}-\d{3}/],
+ ['YYYY-MM', /\d{4}-\d\d/, false],
+ ['YYYYYYMMDD', /[+-]\d{10}/],
+ ['YYYYMMDD', /\d{8}/],
+ ['GGGG[W]WWE', /\d{4}W\d{3}/],
+ ['GGGG[W]WW', /\d{4}W\d{2}/, false],
+ ['YYYYDDD', /\d{7}/],
+ ['YYYYMM', /\d{6}/, false],
+ ['YYYY', /\d{4}/, false],
+ ],
+ // iso time formats and regexes
+ isoTimes = [
+ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
+ ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
+ ['HH:mm:ss', /\d\d:\d\d:\d\d/],
+ ['HH:mm', /\d\d:\d\d/],
+ ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
+ ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
+ ['HHmmss', /\d\d\d\d\d\d/],
+ ['HHmm', /\d\d\d\d/],
+ ['HH', /\d\d/],
+ ],
+ aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
+ // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
+ rfc2822 =
+ /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
+ obsOffsets = {
+ UT: 0,
+ GMT: 0,
+ EDT: -4 * 60,
+ EST: -5 * 60,
+ CDT: -5 * 60,
+ CST: -6 * 60,
+ MDT: -6 * 60,
+ MST: -7 * 60,
+ PDT: -7 * 60,
+ PST: -8 * 60,
+ };
+
+// date from iso format
+export function configFromISO(config) {
+ var i,
+ l,
+ string = config._i,
+ match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
+ allowTime,
+ dateFormat,
+ timeFormat,
+ tzFormat,
+ isoDatesLen = isoDates.length,
+ isoTimesLen = isoTimes.length;
+
+ if (match) {
+ getParsingFlags(config).iso = true;
+ for (i = 0, l = isoDatesLen; i < l; i++) {
+ if (isoDates[i][1].exec(match[1])) {
+ dateFormat = isoDates[i][0];
+ allowTime = isoDates[i][2] !== false;
+ break;
+ }
+ }
+ if (dateFormat == null) {
+ config._isValid = false;
+ return;
+ }
+ if (match[3]) {
+ for (i = 0, l = isoTimesLen; i < l; i++) {
+ if (isoTimes[i][1].exec(match[3])) {
+ // match[2] should be 'T' or space
+ timeFormat = (match[2] || ' ') + isoTimes[i][0];
+ break;
+ }
+ }
+ if (timeFormat == null) {
+ config._isValid = false;
+ return;
+ }
+ }
+ if (!allowTime && timeFormat != null) {
+ config._isValid = false;
+ return;
+ }
+ if (match[4]) {
+ if (tzRegex.exec(match[4])) {
+ tzFormat = 'Z';
+ } else {
+ config._isValid = false;
+ return;
+ }
+ }
+ config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
+ configFromStringAndFormat(config);
+ } else {
+ config._isValid = false;
+ }
+}
+
+function extractFromRFC2822Strings(
+ yearStr,
+ monthStr,
+ dayStr,
+ hourStr,
+ minuteStr,
+ secondStr
+) {
+ var result = [
+ untruncateYear(yearStr),
+ defaultLocaleMonthsShort.indexOf(monthStr),
+ parseInt(dayStr, 10),
+ parseInt(hourStr, 10),
+ parseInt(minuteStr, 10),
+ ];
+
+ if (secondStr) {
+ result.push(parseInt(secondStr, 10));
+ }
+
+ return result;
+}
+
+function untruncateYear(yearStr) {
+ var year = parseInt(yearStr, 10);
+ if (year <= 49) {
+ return 2000 + year;
+ } else if (year <= 999) {
+ return 1900 + year;
+ }
+ return year;
+}
+
+function preprocessRFC2822(s) {
+ // Remove comments and folding whitespace and replace multiple-spaces with a single space
+ return s
+ .replace(/\([^()]*\)|[\n\t]/g, ' ')
+ .replace(/(\s\s+)/g, ' ')
+ .replace(/^\s\s*/, '')
+ .replace(/\s\s*$/, '');
+}
+
+function checkWeekday(weekdayStr, parsedInput, config) {
+ if (weekdayStr) {
+ // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
+ var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
+ weekdayActual = new Date(
+ parsedInput[0],
+ parsedInput[1],
+ parsedInput[2]
+ ).getDay();
+ if (weekdayProvided !== weekdayActual) {
+ getParsingFlags(config).weekdayMismatch = true;
+ config._isValid = false;
+ return false;
+ }
+ }
+ return true;
+}
+
+function calculateOffset(obsOffset, militaryOffset, numOffset) {
+ if (obsOffset) {
+ return obsOffsets[obsOffset];
+ } else if (militaryOffset) {
+ // the only allowed military tz is Z
+ return 0;
+ } else {
+ var hm = parseInt(numOffset, 10),
+ m = hm % 100,
+ h = (hm - m) / 100;
+ return h * 60 + m;
+ }
+}
+
+// date and time from ref 2822 format
+export function configFromRFC2822(config) {
+ var match = rfc2822.exec(preprocessRFC2822(config._i)),
+ parsedArray;
+ if (match) {
+ parsedArray = extractFromRFC2822Strings(
+ match[4],
+ match[3],
+ match[2],
+ match[5],
+ match[6],
+ match[7]
+ );
+ if (!checkWeekday(match[1], parsedArray, config)) {
+ return;
+ }
+
+ config._a = parsedArray;
+ config._tzm = calculateOffset(match[8], match[9], match[10]);
+
+ config._d = createUTCDate.apply(null, config._a);
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
+
+ getParsingFlags(config).rfc2822 = true;
+ } else {
+ config._isValid = false;
+ }
+}
+
+// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
+export function configFromString(config) {
+ var matched = aspNetJsonRegex.exec(config._i);
+ if (matched !== null) {
+ config._d = new Date(+matched[1]);
+ return;
+ }
+
+ configFromISO(config);
+ if (config._isValid === false) {
+ delete config._isValid;
+ } else {
+ return;
+ }
+
+ configFromRFC2822(config);
+ if (config._isValid === false) {
+ delete config._isValid;
+ } else {
+ return;
+ }
+
+ if (config._strict) {
+ config._isValid = false;
+ } else {
+ // Final attempt, use Input Fallback
+ hooks.createFromInputFallback(config);
+ }
+}
+
+hooks.createFromInputFallback = deprecate(
+ 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
+ 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
+ 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
+ function (config) {
+ config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
+ }
+);
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/local.js b/vendor/assets/javascripts/momentjs/src/lib/create/local.js
new file mode 100644
index 000000000..732ea3984
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/local.js
@@ -0,0 +1,5 @@
+import { createLocalOrUTC } from './from-anything';
+
+export function createLocal(input, format, locale, strict) {
+ return createLocalOrUTC(input, format, locale, strict, false);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/parsing-flags.js b/vendor/assets/javascripts/momentjs/src/lib/create/parsing-flags.js
new file mode 100644
index 000000000..65a377db1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/parsing-flags.js
@@ -0,0 +1,28 @@
+function defaultParsingFlags() {
+ // We need to deep clone this object.
+ return {
+ empty: false,
+ unusedTokens: [],
+ unusedInput: [],
+ overflow: -2,
+ charsLeftOver: 0,
+ nullInput: false,
+ invalidEra: null,
+ invalidMonth: null,
+ invalidFormat: false,
+ userInvalidated: false,
+ iso: false,
+ parsedDateParts: [],
+ era: null,
+ meridiem: null,
+ rfc2822: false,
+ weekdayMismatch: false,
+ };
+}
+
+export default function getParsingFlags(m) {
+ if (m._pf == null) {
+ m._pf = defaultParsingFlags();
+ }
+ return m._pf;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/utc.js b/vendor/assets/javascripts/momentjs/src/lib/create/utc.js
new file mode 100644
index 000000000..6081f077c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/utc.js
@@ -0,0 +1,5 @@
+import { createLocalOrUTC } from './from-anything';
+
+export function createUTC(input, format, locale, strict) {
+ return createLocalOrUTC(input, format, locale, strict, true).utc();
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/create/valid.js b/vendor/assets/javascripts/momentjs/src/lib/create/valid.js
new file mode 100644
index 000000000..b25c7d116
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/create/valid.js
@@ -0,0 +1,51 @@
+import extend from '../utils/extend';
+import { createUTC } from './utc';
+import getParsingFlags from '../create/parsing-flags';
+import some from '../utils/some';
+
+export function isValid(m) {
+ if (m._isValid == null) {
+ var flags = getParsingFlags(m),
+ parsedParts = some.call(flags.parsedDateParts, function (i) {
+ return i != null;
+ }),
+ isNowValid =
+ !isNaN(m._d.getTime()) &&
+ flags.overflow < 0 &&
+ !flags.empty &&
+ !flags.invalidEra &&
+ !flags.invalidMonth &&
+ !flags.invalidWeekday &&
+ !flags.weekdayMismatch &&
+ !flags.nullInput &&
+ !flags.invalidFormat &&
+ !flags.userInvalidated &&
+ (!flags.meridiem || (flags.meridiem && parsedParts));
+
+ if (m._strict) {
+ isNowValid =
+ isNowValid &&
+ flags.charsLeftOver === 0 &&
+ flags.unusedTokens.length === 0 &&
+ flags.bigHour === undefined;
+ }
+
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
+ m._isValid = isNowValid;
+ } else {
+ return isNowValid;
+ }
+ }
+ return m._isValid;
+}
+
+export function createInvalid(flags) {
+ var m = createUTC(NaN);
+ if (flags != null) {
+ extend(getParsingFlags(m), flags);
+ } else {
+ getParsingFlags(m).userInvalidated = true;
+ }
+
+ return m;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/abs.js b/vendor/assets/javascripts/momentjs/src/lib/duration/abs.js
new file mode 100644
index 000000000..d61ebe6c2
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/abs.js
@@ -0,0 +1,18 @@
+var mathAbs = Math.abs;
+
+export function abs() {
+ var data = this._data;
+
+ this._milliseconds = mathAbs(this._milliseconds);
+ this._days = mathAbs(this._days);
+ this._months = mathAbs(this._months);
+
+ data.milliseconds = mathAbs(data.milliseconds);
+ data.seconds = mathAbs(data.seconds);
+ data.minutes = mathAbs(data.minutes);
+ data.hours = mathAbs(data.hours);
+ data.months = mathAbs(data.months);
+ data.years = mathAbs(data.years);
+
+ return this;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/add-subtract.js b/vendor/assets/javascripts/momentjs/src/lib/duration/add-subtract.js
new file mode 100644
index 000000000..3755a7d16
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/add-subtract.js
@@ -0,0 +1,21 @@
+import { createDuration } from './create';
+
+function addSubtract(duration, input, value, direction) {
+ var other = createDuration(input, value);
+
+ duration._milliseconds += direction * other._milliseconds;
+ duration._days += direction * other._days;
+ duration._months += direction * other._months;
+
+ return duration._bubble();
+}
+
+// supports only 2.0-style add(1, 's') or add(duration)
+export function add(input, value) {
+ return addSubtract(this, input, value, 1);
+}
+
+// supports only 2.0-style subtract(1, 's') or subtract(duration)
+export function subtract(input, value) {
+ return addSubtract(this, input, value, -1);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/as.js b/vendor/assets/javascripts/momentjs/src/lib/duration/as.js
new file mode 100644
index 000000000..ff9e67b00
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/as.js
@@ -0,0 +1,88 @@
+import { daysToMonths, monthsToDays } from './bubble';
+import { normalizeUnits } from '../units/aliases';
+import toInt from '../utils/to-int';
+
+export function as(units) {
+ if (!this.isValid()) {
+ return NaN;
+ }
+ var days,
+ months,
+ milliseconds = this._milliseconds;
+
+ units = normalizeUnits(units);
+
+ if (units === 'month' || units === 'quarter' || units === 'year') {
+ days = this._days + milliseconds / 864e5;
+ months = this._months + daysToMonths(days);
+ switch (units) {
+ case 'month':
+ return months;
+ case 'quarter':
+ return months / 3;
+ case 'year':
+ return months / 12;
+ }
+ } else {
+ // handle milliseconds separately because of floating point math errors (issue #1867)
+ days = this._days + Math.round(monthsToDays(this._months));
+ switch (units) {
+ case 'week':
+ return days / 7 + milliseconds / 6048e5;
+ case 'day':
+ return days + milliseconds / 864e5;
+ case 'hour':
+ return days * 24 + milliseconds / 36e5;
+ case 'minute':
+ return days * 1440 + milliseconds / 6e4;
+ case 'second':
+ return days * 86400 + milliseconds / 1000;
+ // Math.floor prevents floating point math errors here
+ case 'millisecond':
+ return Math.floor(days * 864e5) + milliseconds;
+ default:
+ throw new Error('Unknown unit ' + units);
+ }
+ }
+}
+
+// TODO: Use this.as('ms')?
+export function valueOf() {
+ if (!this.isValid()) {
+ return NaN;
+ }
+ return (
+ this._milliseconds +
+ this._days * 864e5 +
+ (this._months % 12) * 2592e6 +
+ toInt(this._months / 12) * 31536e6
+ );
+}
+
+function makeAs(alias) {
+ return function () {
+ return this.as(alias);
+ };
+}
+
+var asMilliseconds = makeAs('ms'),
+ asSeconds = makeAs('s'),
+ asMinutes = makeAs('m'),
+ asHours = makeAs('h'),
+ asDays = makeAs('d'),
+ asWeeks = makeAs('w'),
+ asMonths = makeAs('M'),
+ asQuarters = makeAs('Q'),
+ asYears = makeAs('y');
+
+export {
+ asMilliseconds,
+ asSeconds,
+ asMinutes,
+ asHours,
+ asDays,
+ asWeeks,
+ asMonths,
+ asQuarters,
+ asYears,
+};
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/bubble.js b/vendor/assets/javascripts/momentjs/src/lib/duration/bubble.js
new file mode 100644
index 000000000..c7822e389
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/bubble.js
@@ -0,0 +1,68 @@
+import absFloor from '../utils/abs-floor';
+import absCeil from '../utils/abs-ceil';
+
+export function bubble() {
+ var milliseconds = this._milliseconds,
+ days = this._days,
+ months = this._months,
+ data = this._data,
+ seconds,
+ minutes,
+ hours,
+ years,
+ monthsFromDays;
+
+ // if we have a mix of positive and negative values, bubble down first
+ // check: https://github.com/moment/moment/issues/2166
+ if (
+ !(
+ (milliseconds >= 0 && days >= 0 && months >= 0) ||
+ (milliseconds <= 0 && days <= 0 && months <= 0)
+ )
+ ) {
+ milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
+ days = 0;
+ months = 0;
+ }
+
+ // The following code bubbles up values, see the tests for
+ // examples of what that means.
+ data.milliseconds = milliseconds % 1000;
+
+ seconds = absFloor(milliseconds / 1000);
+ data.seconds = seconds % 60;
+
+ minutes = absFloor(seconds / 60);
+ data.minutes = minutes % 60;
+
+ hours = absFloor(minutes / 60);
+ data.hours = hours % 24;
+
+ days += absFloor(hours / 24);
+
+ // convert days to months
+ monthsFromDays = absFloor(daysToMonths(days));
+ months += monthsFromDays;
+ days -= absCeil(monthsToDays(monthsFromDays));
+
+ // 12 months -> 1 year
+ years = absFloor(months / 12);
+ months %= 12;
+
+ data.days = days;
+ data.months = months;
+ data.years = years;
+
+ return this;
+}
+
+export function daysToMonths(days) {
+ // 400 years have 146097 days (taking into account leap year rules)
+ // 400 years have 12 months === 4800
+ return (days * 4800) / 146097;
+}
+
+export function monthsToDays(months) {
+ // the reverse of daysToMonths
+ return (months * 146097) / 4800;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/clone.js b/vendor/assets/javascripts/momentjs/src/lib/duration/clone.js
new file mode 100644
index 000000000..8978dfe04
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/clone.js
@@ -0,0 +1,5 @@
+import { createDuration } from './create';
+
+export function clone() {
+ return createDuration(this);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/constructor.js b/vendor/assets/javascripts/momentjs/src/lib/duration/constructor.js
new file mode 100644
index 000000000..6033769b7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/constructor.js
@@ -0,0 +1,42 @@
+import { normalizeObjectUnits } from '../units/aliases';
+import { getLocale } from '../locale/locales';
+import isDurationValid from './valid.js';
+
+export function Duration(duration) {
+ var normalizedInput = normalizeObjectUnits(duration),
+ years = normalizedInput.year || 0,
+ quarters = normalizedInput.quarter || 0,
+ months = normalizedInput.month || 0,
+ weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
+ days = normalizedInput.day || 0,
+ hours = normalizedInput.hour || 0,
+ minutes = normalizedInput.minute || 0,
+ seconds = normalizedInput.second || 0,
+ milliseconds = normalizedInput.millisecond || 0;
+
+ this._isValid = isDurationValid(normalizedInput);
+
+ // representation for dateAddRemove
+ this._milliseconds =
+ +milliseconds +
+ seconds * 1e3 + // 1000
+ minutes * 6e4 + // 1000 * 60
+ hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
+ // Because of dateAddRemove treats 24 hours as different from a
+ // day when working around DST, we need to store them separately
+ this._days = +days + weeks * 7;
+ // It is impossible to translate months into days without knowing
+ // which months you are are talking about, so we have to store
+ // it separately.
+ this._months = +months + quarters * 3 + years * 12;
+
+ this._data = {};
+
+ this._locale = getLocale();
+
+ this._bubble();
+}
+
+export function isDuration(obj) {
+ return obj instanceof Duration;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/create.js b/vendor/assets/javascripts/momentjs/src/lib/duration/create.js
new file mode 100644
index 000000000..a82c376a0
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/create.js
@@ -0,0 +1,133 @@
+import { Duration, isDuration } from './constructor';
+import isNumber from '../utils/is-number';
+import toInt from '../utils/to-int';
+import absRound from '../utils/abs-round';
+import hasOwnProp from '../utils/has-own-prop';
+import { DATE, HOUR, MINUTE, SECOND, MILLISECOND } from '../units/constants';
+import { cloneWithOffset } from '../units/offset';
+import { createLocal } from '../create/local';
+import { createInvalid as invalid } from './valid';
+
+// ASP.NET json date format regex
+var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
+ // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
+ // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
+ // and further modified to allow for strings containing both week and day
+ isoRegex =
+ /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
+
+export function createDuration(input, key) {
+ var duration = input,
+ // matching against regexp is expensive, do it on demand
+ match = null,
+ sign,
+ ret,
+ diffRes;
+
+ if (isDuration(input)) {
+ duration = {
+ ms: input._milliseconds,
+ d: input._days,
+ M: input._months,
+ };
+ } else if (isNumber(input) || !isNaN(+input)) {
+ duration = {};
+ if (key) {
+ duration[key] = +input;
+ } else {
+ duration.milliseconds = +input;
+ }
+ } else if ((match = aspNetRegex.exec(input))) {
+ sign = match[1] === '-' ? -1 : 1;
+ duration = {
+ y: 0,
+ d: toInt(match[DATE]) * sign,
+ h: toInt(match[HOUR]) * sign,
+ m: toInt(match[MINUTE]) * sign,
+ s: toInt(match[SECOND]) * sign,
+ ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
+ };
+ } else if ((match = isoRegex.exec(input))) {
+ sign = match[1] === '-' ? -1 : 1;
+ duration = {
+ y: parseIso(match[2], sign),
+ M: parseIso(match[3], sign),
+ w: parseIso(match[4], sign),
+ d: parseIso(match[5], sign),
+ h: parseIso(match[6], sign),
+ m: parseIso(match[7], sign),
+ s: parseIso(match[8], sign),
+ };
+ } else if (duration == null) {
+ // checks for null or undefined
+ duration = {};
+ } else if (
+ typeof duration === 'object' &&
+ ('from' in duration || 'to' in duration)
+ ) {
+ diffRes = momentsDifference(
+ createLocal(duration.from),
+ createLocal(duration.to)
+ );
+
+ duration = {};
+ duration.ms = diffRes.milliseconds;
+ duration.M = diffRes.months;
+ }
+
+ ret = new Duration(duration);
+
+ if (isDuration(input) && hasOwnProp(input, '_locale')) {
+ ret._locale = input._locale;
+ }
+
+ if (isDuration(input) && hasOwnProp(input, '_isValid')) {
+ ret._isValid = input._isValid;
+ }
+
+ return ret;
+}
+
+createDuration.fn = Duration.prototype;
+createDuration.invalid = invalid;
+
+function parseIso(inp, sign) {
+ // We'd normally use ~~inp for this, but unfortunately it also
+ // converts floats to ints.
+ // inp may be undefined, so careful calling replace on it.
+ var res = inp && parseFloat(inp.replace(',', '.'));
+ // apply sign while we're at it
+ return (isNaN(res) ? 0 : res) * sign;
+}
+
+function positiveMomentsDifference(base, other) {
+ var res = {};
+
+ res.months =
+ other.month() - base.month() + (other.year() - base.year()) * 12;
+ if (base.clone().add(res.months, 'M').isAfter(other)) {
+ --res.months;
+ }
+
+ res.milliseconds = +other - +base.clone().add(res.months, 'M');
+
+ return res;
+}
+
+function momentsDifference(base, other) {
+ var res;
+ if (!(base.isValid() && other.isValid())) {
+ return { milliseconds: 0, months: 0 };
+ }
+
+ other = cloneWithOffset(other, base);
+ if (base.isBefore(other)) {
+ res = positiveMomentsDifference(base, other);
+ } else {
+ res = positiveMomentsDifference(other, base);
+ res.milliseconds = -res.milliseconds;
+ res.months = -res.months;
+ }
+
+ return res;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/duration.js b/vendor/assets/javascripts/momentjs/src/lib/duration/duration.js
new file mode 100644
index 000000000..10f03a7d4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/duration.js
@@ -0,0 +1,16 @@
+// Side effect imports
+import './prototype';
+
+import { createDuration } from './create';
+import { isDuration } from './constructor';
+import {
+ getSetRelativeTimeRounding,
+ getSetRelativeTimeThreshold,
+} from './humanize';
+
+export {
+ createDuration,
+ isDuration,
+ getSetRelativeTimeRounding,
+ getSetRelativeTimeThreshold,
+};
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/get.js b/vendor/assets/javascripts/momentjs/src/lib/duration/get.js
new file mode 100644
index 000000000..99533d72f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/get.js
@@ -0,0 +1,27 @@
+import { normalizeUnits } from '../units/aliases';
+import absFloor from '../utils/abs-floor';
+
+export function get(units) {
+ units = normalizeUnits(units);
+ return this.isValid() ? this[units + 's']() : NaN;
+}
+
+function makeGetter(name) {
+ return function () {
+ return this.isValid() ? this._data[name] : NaN;
+ };
+}
+
+var milliseconds = makeGetter('milliseconds'),
+ seconds = makeGetter('seconds'),
+ minutes = makeGetter('minutes'),
+ hours = makeGetter('hours'),
+ days = makeGetter('days'),
+ months = makeGetter('months'),
+ years = makeGetter('years');
+
+export { milliseconds, seconds, minutes, hours, days, months, years };
+
+export function weeks() {
+ return absFloor(this.days() / 7);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/humanize.js b/vendor/assets/javascripts/momentjs/src/lib/duration/humanize.js
new file mode 100644
index 000000000..74079cde5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/humanize.js
@@ -0,0 +1,114 @@
+import { createDuration } from './create';
+
+var round = Math.round,
+ thresholds = {
+ ss: 44, // a few seconds to seconds
+ s: 45, // seconds to minute
+ m: 45, // minutes to hour
+ h: 22, // hours to day
+ d: 26, // days to month/week
+ w: null, // weeks to month
+ M: 11, // months to year
+ };
+
+// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
+function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
+ return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
+}
+
+function relativeTime(posNegDuration, withoutSuffix, thresholds, locale) {
+ var duration = createDuration(posNegDuration).abs(),
+ seconds = round(duration.as('s')),
+ minutes = round(duration.as('m')),
+ hours = round(duration.as('h')),
+ days = round(duration.as('d')),
+ months = round(duration.as('M')),
+ weeks = round(duration.as('w')),
+ years = round(duration.as('y')),
+ a =
+ (seconds <= thresholds.ss && ['s', seconds]) ||
+ (seconds < thresholds.s && ['ss', seconds]) ||
+ (minutes <= 1 && ['m']) ||
+ (minutes < thresholds.m && ['mm', minutes]) ||
+ (hours <= 1 && ['h']) ||
+ (hours < thresholds.h && ['hh', hours]) ||
+ (days <= 1 && ['d']) ||
+ (days < thresholds.d && ['dd', days]);
+
+ if (thresholds.w != null) {
+ a =
+ a ||
+ (weeks <= 1 && ['w']) ||
+ (weeks < thresholds.w && ['ww', weeks]);
+ }
+ a = a ||
+ (months <= 1 && ['M']) ||
+ (months < thresholds.M && ['MM', months]) ||
+ (years <= 1 && ['y']) || ['yy', years];
+
+ a[2] = withoutSuffix;
+ a[3] = +posNegDuration > 0;
+ a[4] = locale;
+ return substituteTimeAgo.apply(null, a);
+}
+
+// This function allows you to set the rounding function for relative time strings
+export function getSetRelativeTimeRounding(roundingFunction) {
+ if (roundingFunction === undefined) {
+ return round;
+ }
+ if (typeof roundingFunction === 'function') {
+ round = roundingFunction;
+ return true;
+ }
+ return false;
+}
+
+// This function allows you to set a threshold for relative time strings
+export function getSetRelativeTimeThreshold(threshold, limit) {
+ if (thresholds[threshold] === undefined) {
+ return false;
+ }
+ if (limit === undefined) {
+ return thresholds[threshold];
+ }
+ thresholds[threshold] = limit;
+ if (threshold === 's') {
+ thresholds.ss = limit - 1;
+ }
+ return true;
+}
+
+export function humanize(argWithSuffix, argThresholds) {
+ if (!this.isValid()) {
+ return this.localeData().invalidDate();
+ }
+
+ var withSuffix = false,
+ th = thresholds,
+ locale,
+ output;
+
+ if (typeof argWithSuffix === 'object') {
+ argThresholds = argWithSuffix;
+ argWithSuffix = false;
+ }
+ if (typeof argWithSuffix === 'boolean') {
+ withSuffix = argWithSuffix;
+ }
+ if (typeof argThresholds === 'object') {
+ th = Object.assign({}, thresholds, argThresholds);
+ if (argThresholds.s != null && argThresholds.ss == null) {
+ th.ss = argThresholds.s - 1;
+ }
+ }
+
+ locale = this.localeData();
+ output = relativeTime(this, !withSuffix, th, locale);
+
+ if (withSuffix) {
+ output = locale.pastFuture(+this, output);
+ }
+
+ return locale.postformat(output);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/iso-string.js b/vendor/assets/javascripts/momentjs/src/lib/duration/iso-string.js
new file mode 100644
index 000000000..5fd2166c9
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/iso-string.js
@@ -0,0 +1,68 @@
+import absFloor from '../utils/abs-floor';
+var abs = Math.abs;
+
+function sign(x) {
+ return (x > 0) - (x < 0) || +x;
+}
+
+export function toISOString() {
+ // for ISO strings we do not use the normal bubbling rules:
+ // * milliseconds bubble up until they become hours
+ // * days do not bubble at all
+ // * months bubble up until they become years
+ // This is because there is no context-free conversion between hours and days
+ // (think of clock changes)
+ // and also not between days and months (28-31 days per month)
+ if (!this.isValid()) {
+ return this.localeData().invalidDate();
+ }
+
+ var seconds = abs(this._milliseconds) / 1000,
+ days = abs(this._days),
+ months = abs(this._months),
+ minutes,
+ hours,
+ years,
+ s,
+ total = this.asSeconds(),
+ totalSign,
+ ymSign,
+ daysSign,
+ hmsSign;
+
+ if (!total) {
+ // this is the same as C#'s (Noda) and python (isodate)...
+ // but not other JS (goog.date)
+ return 'P0D';
+ }
+
+ // 3600 seconds -> 60 minutes -> 1 hour
+ minutes = absFloor(seconds / 60);
+ hours = absFloor(minutes / 60);
+ seconds %= 60;
+ minutes %= 60;
+
+ // 12 months -> 1 year
+ years = absFloor(months / 12);
+ months %= 12;
+
+ // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
+ s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
+
+ totalSign = total < 0 ? '-' : '';
+ ymSign = sign(this._months) !== sign(total) ? '-' : '';
+ daysSign = sign(this._days) !== sign(total) ? '-' : '';
+ hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
+
+ return (
+ totalSign +
+ 'P' +
+ (years ? ymSign + years + 'Y' : '') +
+ (months ? ymSign + months + 'M' : '') +
+ (days ? daysSign + days + 'D' : '') +
+ (hours || minutes || seconds ? 'T' : '') +
+ (hours ? hmsSign + hours + 'H' : '') +
+ (minutes ? hmsSign + minutes + 'M' : '') +
+ (seconds ? hmsSign + s + 'S' : '')
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/prototype.js b/vendor/assets/javascripts/momentjs/src/lib/duration/prototype.js
new file mode 100644
index 000000000..3f24b4ab7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/prototype.js
@@ -0,0 +1,78 @@
+import { Duration } from './constructor';
+
+var proto = Duration.prototype;
+
+import { abs } from './abs';
+import { add, subtract } from './add-subtract';
+import {
+ as,
+ asMilliseconds,
+ asSeconds,
+ asMinutes,
+ asHours,
+ asDays,
+ asWeeks,
+ asMonths,
+ asQuarters,
+ asYears,
+ valueOf,
+} from './as';
+import { bubble } from './bubble';
+import { clone } from './clone';
+import {
+ get,
+ milliseconds,
+ seconds,
+ minutes,
+ hours,
+ days,
+ months,
+ years,
+ weeks,
+} from './get';
+import { humanize } from './humanize';
+import { toISOString } from './iso-string';
+import { lang, locale, localeData } from '../moment/locale';
+import { isValid } from './valid';
+
+proto.isValid = isValid;
+proto.abs = abs;
+proto.add = add;
+proto.subtract = subtract;
+proto.as = as;
+proto.asMilliseconds = asMilliseconds;
+proto.asSeconds = asSeconds;
+proto.asMinutes = asMinutes;
+proto.asHours = asHours;
+proto.asDays = asDays;
+proto.asWeeks = asWeeks;
+proto.asMonths = asMonths;
+proto.asQuarters = asQuarters;
+proto.asYears = asYears;
+proto.valueOf = valueOf;
+proto._bubble = bubble;
+proto.clone = clone;
+proto.get = get;
+proto.milliseconds = milliseconds;
+proto.seconds = seconds;
+proto.minutes = minutes;
+proto.hours = hours;
+proto.days = days;
+proto.weeks = weeks;
+proto.months = months;
+proto.years = years;
+proto.humanize = humanize;
+proto.toISOString = toISOString;
+proto.toString = toISOString;
+proto.toJSON = toISOString;
+proto.locale = locale;
+proto.localeData = localeData;
+
+// Deprecations
+import { deprecate } from '../utils/deprecate';
+
+proto.toIsoString = deprecate(
+ 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
+ toISOString
+);
+proto.lang = lang;
diff --git a/vendor/assets/javascripts/momentjs/src/lib/duration/valid.js b/vendor/assets/javascripts/momentjs/src/lib/duration/valid.js
new file mode 100644
index 000000000..88ef7a99a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/duration/valid.js
@@ -0,0 +1,55 @@
+import hasOwnProp from '../utils/has-own-prop';
+import toInt from '../utils/to-int';
+import indexOf from '../utils/index-of';
+import { createDuration } from './create';
+
+var ordering = [
+ 'year',
+ 'quarter',
+ 'month',
+ 'week',
+ 'day',
+ 'hour',
+ 'minute',
+ 'second',
+ 'millisecond',
+];
+
+export default function isDurationValid(m) {
+ var key,
+ unitHasDecimal = false,
+ i,
+ orderLen = ordering.length;
+ for (key in m) {
+ if (
+ hasOwnProp(m, key) &&
+ !(
+ indexOf.call(ordering, key) !== -1 &&
+ (m[key] == null || !isNaN(m[key]))
+ )
+ ) {
+ return false;
+ }
+ }
+
+ for (i = 0; i < orderLen; ++i) {
+ if (m[ordering[i]]) {
+ if (unitHasDecimal) {
+ return false; // only allow non-integers for smallest unit
+ }
+ if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
+ unitHasDecimal = true;
+ }
+ }
+ }
+
+ return true;
+}
+
+export function isValid() {
+ return this._isValid;
+}
+
+export function createInvalid() {
+ return createDuration(NaN);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/format/format.js b/vendor/assets/javascripts/momentjs/src/lib/format/format.js
new file mode 100644
index 000000000..7abe2609d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/format/format.js
@@ -0,0 +1,104 @@
+import zeroFill from '../utils/zero-fill';
+import isFunction from '../utils/is-function';
+
+var formattingTokens =
+ /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
+ localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
+ formatFunctions = {},
+ formatTokenFunctions = {};
+
+export { formattingTokens, formatTokenFunctions };
+
+// token: 'M'
+// padded: ['MM', 2]
+// ordinal: 'Mo'
+// callback: function () { this.month() + 1 }
+export function addFormatToken(token, padded, ordinal, callback) {
+ var func = callback;
+ if (typeof callback === 'string') {
+ func = function () {
+ return this[callback]();
+ };
+ }
+ if (token) {
+ formatTokenFunctions[token] = func;
+ }
+ if (padded) {
+ formatTokenFunctions[padded[0]] = function () {
+ return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
+ };
+ }
+ if (ordinal) {
+ formatTokenFunctions[ordinal] = function () {
+ return this.localeData().ordinal(
+ func.apply(this, arguments),
+ token
+ );
+ };
+ }
+}
+
+function removeFormattingTokens(input) {
+ if (input.match(/\[[\s\S]/)) {
+ return input.replace(/^\[|\]$/g, '');
+ }
+ return input.replace(/\\/g, '');
+}
+
+function makeFormatFunction(format) {
+ var array = format.match(formattingTokens),
+ i,
+ length;
+
+ for (i = 0, length = array.length; i < length; i++) {
+ if (formatTokenFunctions[array[i]]) {
+ array[i] = formatTokenFunctions[array[i]];
+ } else {
+ array[i] = removeFormattingTokens(array[i]);
+ }
+ }
+
+ return function (mom) {
+ var output = '',
+ i;
+ for (i = 0; i < length; i++) {
+ output += isFunction(array[i])
+ ? array[i].call(mom, format)
+ : array[i];
+ }
+ return output;
+ };
+}
+
+// format date using native date object
+export function formatMoment(m, format) {
+ if (!m.isValid()) {
+ return m.localeData().invalidDate();
+ }
+
+ format = expandFormat(format, m.localeData());
+ formatFunctions[format] =
+ formatFunctions[format] || makeFormatFunction(format);
+
+ return formatFunctions[format](m);
+}
+
+export function expandFormat(format, locale) {
+ var i = 5;
+
+ function replaceLongDateFormatTokens(input) {
+ return locale.longDateFormat(input) || input;
+ }
+
+ localFormattingTokens.lastIndex = 0;
+ while (i >= 0 && localFormattingTokens.test(format)) {
+ format = format.replace(
+ localFormattingTokens,
+ replaceLongDateFormatTokens
+ );
+ localFormattingTokens.lastIndex = 0;
+ i -= 1;
+ }
+
+ return format;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/base-config.js b/vendor/assets/javascripts/momentjs/src/lib/locale/base-config.js
new file mode 100644
index 000000000..5f8c40353
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/base-config.js
@@ -0,0 +1,41 @@
+import { defaultCalendar } from './calendar';
+import { defaultLongDateFormat } from './formats';
+import { defaultInvalidDate } from './invalid';
+import { defaultOrdinal, defaultDayOfMonthOrdinalParse } from './ordinal';
+import { defaultRelativeTime } from './relative';
+
+// months
+import { defaultLocaleMonths, defaultLocaleMonthsShort } from '../units/month';
+
+// week
+import { defaultLocaleWeek } from '../units/week';
+
+// weekdays
+import {
+ defaultLocaleWeekdays,
+ defaultLocaleWeekdaysMin,
+ defaultLocaleWeekdaysShort,
+} from '../units/day-of-week';
+
+// meridiem
+import { defaultLocaleMeridiemParse } from '../units/hour';
+
+export var baseConfig = {
+ calendar: defaultCalendar,
+ longDateFormat: defaultLongDateFormat,
+ invalidDate: defaultInvalidDate,
+ ordinal: defaultOrdinal,
+ dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
+ relativeTime: defaultRelativeTime,
+
+ months: defaultLocaleMonths,
+ monthsShort: defaultLocaleMonthsShort,
+
+ week: defaultLocaleWeek,
+
+ weekdays: defaultLocaleWeekdays,
+ weekdaysMin: defaultLocaleWeekdaysMin,
+ weekdaysShort: defaultLocaleWeekdaysShort,
+
+ meridiemParse: defaultLocaleMeridiemParse,
+};
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/calendar.js b/vendor/assets/javascripts/momentjs/src/lib/locale/calendar.js
new file mode 100644
index 000000000..52c6ba5ec
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/calendar.js
@@ -0,0 +1,15 @@
+export var defaultCalendar = {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+};
+
+import isFunction from '../utils/is-function';
+
+export function calendar(key, mom, now) {
+ var output = this._calendar[key] || this._calendar['sameElse'];
+ return isFunction(output) ? output.call(mom, now) : output;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/constructor.js b/vendor/assets/javascripts/momentjs/src/lib/locale/constructor.js
new file mode 100644
index 000000000..c32b73ee1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/constructor.js
@@ -0,0 +1,5 @@
+export function Locale(config) {
+ if (config != null) {
+ this.set(config);
+ }
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/en.js b/vendor/assets/javascripts/momentjs/src/lib/locale/en.js
new file mode 100644
index 000000000..470bd27a7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/en.js
@@ -0,0 +1,39 @@
+import './prototype';
+import { getSetGlobalLocale } from './locales';
+import toInt from '../utils/to-int';
+
+getSetGlobalLocale('en', {
+ eras: [
+ {
+ since: '0001-01-01',
+ until: +Infinity,
+ offset: 1,
+ name: 'Anno Domini',
+ narrow: 'AD',
+ abbr: 'AD',
+ },
+ {
+ since: '0000-12-31',
+ until: -Infinity,
+ offset: 1,
+ name: 'Before Christ',
+ narrow: 'BC',
+ abbr: 'BC',
+ },
+ ],
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ toInt((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/formats.js b/vendor/assets/javascripts/momentjs/src/lib/locale/formats.js
new file mode 100644
index 000000000..ea7483737
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/formats.js
@@ -0,0 +1,36 @@
+import { formattingTokens } from '../format/format';
+
+export var defaultLongDateFormat = {
+ LTS: 'h:mm:ss A',
+ LT: 'h:mm A',
+ L: 'MM/DD/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY h:mm A',
+ LLLL: 'dddd, MMMM D, YYYY h:mm A',
+};
+
+export function longDateFormat(key) {
+ var format = this._longDateFormat[key],
+ formatUpper = this._longDateFormat[key.toUpperCase()];
+
+ if (format || !formatUpper) {
+ return format;
+ }
+
+ this._longDateFormat[key] = formatUpper
+ .match(formattingTokens)
+ .map(function (tok) {
+ if (
+ tok === 'MMMM' ||
+ tok === 'MM' ||
+ tok === 'DD' ||
+ tok === 'dddd'
+ ) {
+ return tok.slice(1);
+ }
+ return tok;
+ })
+ .join('');
+
+ return this._longDateFormat[key];
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/invalid.js b/vendor/assets/javascripts/momentjs/src/lib/locale/invalid.js
new file mode 100644
index 000000000..baf1a86e5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/invalid.js
@@ -0,0 +1,5 @@
+export var defaultInvalidDate = 'Invalid date';
+
+export function invalidDate() {
+ return this._invalidDate;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/lists.js b/vendor/assets/javascripts/momentjs/src/lib/locale/lists.js
new file mode 100644
index 000000000..9470d0771
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/lists.js
@@ -0,0 +1,93 @@
+import isNumber from '../utils/is-number';
+import { getLocale } from './locales';
+import { createUTC } from '../create/utc';
+
+function get(format, index, field, setter) {
+ var locale = getLocale(),
+ utc = createUTC().set(setter, index);
+ return locale[field](utc, format);
+}
+
+function listMonthsImpl(format, index, field) {
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+
+ if (index != null) {
+ return get(format, index, field, 'month');
+ }
+
+ var i,
+ out = [];
+ for (i = 0; i < 12; i++) {
+ out[i] = get(format, i, field, 'month');
+ }
+ return out;
+}
+
+// ()
+// (5)
+// (fmt, 5)
+// (fmt)
+// (true)
+// (true, 5)
+// (true, fmt, 5)
+// (true, fmt)
+function listWeekdaysImpl(localeSorted, format, index, field) {
+ if (typeof localeSorted === 'boolean') {
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+ } else {
+ format = localeSorted;
+ index = format;
+ localeSorted = false;
+
+ if (isNumber(format)) {
+ index = format;
+ format = undefined;
+ }
+
+ format = format || '';
+ }
+
+ var locale = getLocale(),
+ shift = localeSorted ? locale._week.dow : 0,
+ i,
+ out = [];
+
+ if (index != null) {
+ return get(format, (index + shift) % 7, field, 'day');
+ }
+
+ for (i = 0; i < 7; i++) {
+ out[i] = get(format, (i + shift) % 7, field, 'day');
+ }
+ return out;
+}
+
+export function listMonths(format, index) {
+ return listMonthsImpl(format, index, 'months');
+}
+
+export function listMonthsShort(format, index) {
+ return listMonthsImpl(format, index, 'monthsShort');
+}
+
+export function listWeekdays(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
+}
+
+export function listWeekdaysShort(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
+}
+
+export function listWeekdaysMin(localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/locale.js b/vendor/assets/javascripts/momentjs/src/lib/locale/locale.js
new file mode 100644
index 000000000..522e36dd2
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/locale.js
@@ -0,0 +1,45 @@
+// Side effect imports
+import './prototype';
+
+import {
+ getSetGlobalLocale,
+ defineLocale,
+ updateLocale,
+ getLocale,
+ listLocales,
+} from './locales';
+
+import {
+ listMonths,
+ listMonthsShort,
+ listWeekdays,
+ listWeekdaysShort,
+ listWeekdaysMin,
+} from './lists';
+
+export {
+ getSetGlobalLocale,
+ defineLocale,
+ updateLocale,
+ getLocale,
+ listLocales,
+ listMonths,
+ listMonthsShort,
+ listWeekdays,
+ listWeekdaysShort,
+ listWeekdaysMin,
+};
+
+import { deprecate } from '../utils/deprecate';
+import { hooks } from '../utils/hooks';
+
+hooks.lang = deprecate(
+ 'moment.lang is deprecated. Use moment.locale instead.',
+ getSetGlobalLocale
+);
+hooks.langData = deprecate(
+ 'moment.langData is deprecated. Use moment.localeData instead.',
+ getLocale
+);
+
+import './en';
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/locales.js b/vendor/assets/javascripts/momentjs/src/lib/locale/locales.js
new file mode 100644
index 000000000..b329b83b3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/locales.js
@@ -0,0 +1,248 @@
+import isArray from '../utils/is-array';
+import isUndefined from '../utils/is-undefined';
+import { deprecateSimple } from '../utils/deprecate';
+import { mergeConfigs } from './set';
+import { Locale } from './constructor';
+import keys from '../utils/keys';
+
+import { baseConfig } from './base-config';
+
+// internal storage for locale config files
+var locales = {},
+ localeFamilies = {},
+ globalLocale;
+
+function commonPrefix(arr1, arr2) {
+ var i,
+ minl = Math.min(arr1.length, arr2.length);
+ for (i = 0; i < minl; i += 1) {
+ if (arr1[i] !== arr2[i]) {
+ return i;
+ }
+ }
+ return minl;
+}
+
+function normalizeLocale(key) {
+ return key ? key.toLowerCase().replace('_', '-') : key;
+}
+
+// pick the locale from the array
+// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
+// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
+function chooseLocale(names) {
+ var i = 0,
+ j,
+ next,
+ locale,
+ split;
+
+ while (i < names.length) {
+ split = normalizeLocale(names[i]).split('-');
+ j = split.length;
+ next = normalizeLocale(names[i + 1]);
+ next = next ? next.split('-') : null;
+ while (j > 0) {
+ locale = loadLocale(split.slice(0, j).join('-'));
+ if (locale) {
+ return locale;
+ }
+ if (
+ next &&
+ next.length >= j &&
+ commonPrefix(split, next) >= j - 1
+ ) {
+ //the next array item is better than a shallower substring of this one
+ break;
+ }
+ j--;
+ }
+ i++;
+ }
+ return globalLocale;
+}
+
+function isLocaleNameSane(name) {
+ // Prevent names that look like filesystem paths, i.e contain '/' or '\'
+ return name.match('^[^/\\\\]*$') != null;
+}
+
+function loadLocale(name) {
+ var oldLocale = null,
+ aliasedRequire;
+ // TODO: Find a better way to register and load all the locales in Node
+ if (
+ locales[name] === undefined &&
+ typeof module !== 'undefined' &&
+ module &&
+ module.exports &&
+ isLocaleNameSane(name)
+ ) {
+ try {
+ oldLocale = globalLocale._abbr;
+ aliasedRequire = require;
+ aliasedRequire('./locale/' + name);
+ getSetGlobalLocale(oldLocale);
+ } catch (e) {
+ // mark as not found to avoid repeating expensive file require call causing high CPU
+ // when trying to find en-US, en_US, en-us for every format call
+ locales[name] = null; // null means not found
+ }
+ }
+ return locales[name];
+}
+
+// This function will load locale and then set the global locale. If
+// no arguments are passed in, it will simply return the current global
+// locale key.
+export function getSetGlobalLocale(key, values) {
+ var data;
+ if (key) {
+ if (isUndefined(values)) {
+ data = getLocale(key);
+ } else {
+ data = defineLocale(key, values);
+ }
+
+ if (data) {
+ // moment.duration._locale = moment._locale = data;
+ globalLocale = data;
+ } else {
+ if (typeof console !== 'undefined' && console.warn) {
+ //warn user if arguments are passed but the locale could not be set
+ console.warn(
+ 'Locale ' + key + ' not found. Did you forget to load it?'
+ );
+ }
+ }
+ }
+
+ return globalLocale._abbr;
+}
+
+export function defineLocale(name, config) {
+ if (config !== null) {
+ var locale,
+ parentConfig = baseConfig;
+ config.abbr = name;
+ if (locales[name] != null) {
+ deprecateSimple(
+ 'defineLocaleOverride',
+ 'use moment.updateLocale(localeName, config) to change ' +
+ 'an existing locale. moment.defineLocale(localeName, ' +
+ 'config) should only be used for creating a new locale ' +
+ 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
+ );
+ parentConfig = locales[name]._config;
+ } else if (config.parentLocale != null) {
+ if (locales[config.parentLocale] != null) {
+ parentConfig = locales[config.parentLocale]._config;
+ } else {
+ locale = loadLocale(config.parentLocale);
+ if (locale != null) {
+ parentConfig = locale._config;
+ } else {
+ if (!localeFamilies[config.parentLocale]) {
+ localeFamilies[config.parentLocale] = [];
+ }
+ localeFamilies[config.parentLocale].push({
+ name: name,
+ config: config,
+ });
+ return null;
+ }
+ }
+ }
+ locales[name] = new Locale(mergeConfigs(parentConfig, config));
+
+ if (localeFamilies[name]) {
+ localeFamilies[name].forEach(function (x) {
+ defineLocale(x.name, x.config);
+ });
+ }
+
+ // backwards compat for now: also set the locale
+ // make sure we set the locale AFTER all child locales have been
+ // created, so we won't end up with the child locale set.
+ getSetGlobalLocale(name);
+
+ return locales[name];
+ } else {
+ // useful for testing
+ delete locales[name];
+ return null;
+ }
+}
+
+export function updateLocale(name, config) {
+ if (config != null) {
+ var locale,
+ tmpLocale,
+ parentConfig = baseConfig;
+
+ if (locales[name] != null && locales[name].parentLocale != null) {
+ // Update existing child locale in-place to avoid memory-leaks
+ locales[name].set(mergeConfigs(locales[name]._config, config));
+ } else {
+ // MERGE
+ tmpLocale = loadLocale(name);
+ if (tmpLocale != null) {
+ parentConfig = tmpLocale._config;
+ }
+ config = mergeConfigs(parentConfig, config);
+ if (tmpLocale == null) {
+ // updateLocale is called for creating a new locale
+ // Set abbr so it will have a name (getters return
+ // undefined otherwise).
+ config.abbr = name;
+ }
+ locale = new Locale(config);
+ locale.parentLocale = locales[name];
+ locales[name] = locale;
+ }
+
+ // backwards compat for now: also set the locale
+ getSetGlobalLocale(name);
+ } else {
+ // pass null for config to unupdate, useful for tests
+ if (locales[name] != null) {
+ if (locales[name].parentLocale != null) {
+ locales[name] = locales[name].parentLocale;
+ if (name === getSetGlobalLocale()) {
+ getSetGlobalLocale(name);
+ }
+ } else if (locales[name] != null) {
+ delete locales[name];
+ }
+ }
+ }
+ return locales[name];
+}
+
+// returns locale data
+export function getLocale(key) {
+ var locale;
+
+ if (key && key._locale && key._locale._abbr) {
+ key = key._locale._abbr;
+ }
+
+ if (!key) {
+ return globalLocale;
+ }
+
+ if (!isArray(key)) {
+ //short-circuit everything else
+ locale = loadLocale(key);
+ if (locale) {
+ return locale;
+ }
+ key = [key];
+ }
+
+ return chooseLocale(key);
+}
+
+export function listLocales() {
+ return keys(locales);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/ordinal.js b/vendor/assets/javascripts/momentjs/src/lib/locale/ordinal.js
new file mode 100644
index 000000000..db44f33ac
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/ordinal.js
@@ -0,0 +1,8 @@
+var defaultOrdinal = '%d',
+ defaultDayOfMonthOrdinalParse = /\d{1,2}/;
+
+export { defaultOrdinal, defaultDayOfMonthOrdinalParse };
+
+export function ordinal(number) {
+ return this._ordinal.replace('%d', number);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/pre-post-format.js b/vendor/assets/javascripts/momentjs/src/lib/locale/pre-post-format.js
new file mode 100644
index 000000000..3551dba7a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/pre-post-format.js
@@ -0,0 +1,3 @@
+export function preParsePostFormat(string) {
+ return string;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/prototype.js b/vendor/assets/javascripts/momentjs/src/lib/locale/prototype.js
new file mode 100644
index 000000000..2057f6952
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/prototype.js
@@ -0,0 +1,88 @@
+import { Locale } from './constructor';
+
+var proto = Locale.prototype;
+
+import { calendar } from './calendar';
+import { longDateFormat } from './formats';
+import { invalidDate } from './invalid';
+import { ordinal } from './ordinal';
+import { preParsePostFormat } from './pre-post-format';
+import { relativeTime, pastFuture } from './relative';
+import { set } from './set';
+
+proto.calendar = calendar;
+proto.longDateFormat = longDateFormat;
+proto.invalidDate = invalidDate;
+proto.ordinal = ordinal;
+proto.preparse = preParsePostFormat;
+proto.postformat = preParsePostFormat;
+proto.relativeTime = relativeTime;
+proto.pastFuture = pastFuture;
+proto.set = set;
+
+// Eras
+import {
+ localeEras,
+ localeErasParse,
+ localeErasConvertYear,
+ erasAbbrRegex,
+ erasNameRegex,
+ erasNarrowRegex,
+} from '../units/era';
+proto.eras = localeEras;
+proto.erasParse = localeErasParse;
+proto.erasConvertYear = localeErasConvertYear;
+proto.erasAbbrRegex = erasAbbrRegex;
+proto.erasNameRegex = erasNameRegex;
+proto.erasNarrowRegex = erasNarrowRegex;
+
+// Month
+import {
+ localeMonthsParse,
+ localeMonths,
+ localeMonthsShort,
+ monthsRegex,
+ monthsShortRegex,
+} from '../units/month';
+
+proto.months = localeMonths;
+proto.monthsShort = localeMonthsShort;
+proto.monthsParse = localeMonthsParse;
+proto.monthsRegex = monthsRegex;
+proto.monthsShortRegex = monthsShortRegex;
+
+// Week
+import {
+ localeWeek,
+ localeFirstDayOfYear,
+ localeFirstDayOfWeek,
+} from '../units/week';
+proto.week = localeWeek;
+proto.firstDayOfYear = localeFirstDayOfYear;
+proto.firstDayOfWeek = localeFirstDayOfWeek;
+
+// Day of Week
+import {
+ localeWeekdaysParse,
+ localeWeekdays,
+ localeWeekdaysMin,
+ localeWeekdaysShort,
+ weekdaysRegex,
+ weekdaysShortRegex,
+ weekdaysMinRegex,
+} from '../units/day-of-week';
+
+proto.weekdays = localeWeekdays;
+proto.weekdaysMin = localeWeekdaysMin;
+proto.weekdaysShort = localeWeekdaysShort;
+proto.weekdaysParse = localeWeekdaysParse;
+
+proto.weekdaysRegex = weekdaysRegex;
+proto.weekdaysShortRegex = weekdaysShortRegex;
+proto.weekdaysMinRegex = weekdaysMinRegex;
+
+// Hours
+import { localeIsPM, localeMeridiem } from '../units/hour';
+
+proto.isPM = localeIsPM;
+proto.meridiem = localeMeridiem;
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/relative.js b/vendor/assets/javascripts/momentjs/src/lib/locale/relative.js
new file mode 100644
index 000000000..819404532
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/relative.js
@@ -0,0 +1,32 @@
+export var defaultRelativeTime = {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ w: 'a week',
+ ww: '%d weeks',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+};
+
+import isFunction from '../utils/is-function';
+
+export function relativeTime(number, withoutSuffix, string, isFuture) {
+ var output = this._relativeTime[string];
+ return isFunction(output)
+ ? output(number, withoutSuffix, string, isFuture)
+ : output.replace(/%d/i, number);
+}
+
+export function pastFuture(diff, output) {
+ var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
+ return isFunction(format) ? format(output) : format.replace(/%s/i, output);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/locale/set.js b/vendor/assets/javascripts/momentjs/src/lib/locale/set.js
new file mode 100644
index 000000000..3b069decb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/locale/set.js
@@ -0,0 +1,56 @@
+import isFunction from '../utils/is-function';
+import extend from '../utils/extend';
+import isObject from '../utils/is-object';
+import hasOwnProp from '../utils/has-own-prop';
+
+export function set(config) {
+ var prop, i;
+ for (i in config) {
+ if (hasOwnProp(config, i)) {
+ prop = config[i];
+ if (isFunction(prop)) {
+ this[i] = prop;
+ } else {
+ this['_' + i] = prop;
+ }
+ }
+ }
+ this._config = config;
+ // Lenient ordinal parsing accepts just a number in addition to
+ // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
+ // TODO: Remove "ordinalParse" fallback in next major release.
+ this._dayOfMonthOrdinalParseLenient = new RegExp(
+ (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
+ '|' +
+ /\d{1,2}/.source
+ );
+}
+
+export function mergeConfigs(parentConfig, childConfig) {
+ var res = extend({}, parentConfig),
+ prop;
+ for (prop in childConfig) {
+ if (hasOwnProp(childConfig, prop)) {
+ if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
+ res[prop] = {};
+ extend(res[prop], parentConfig[prop]);
+ extend(res[prop], childConfig[prop]);
+ } else if (childConfig[prop] != null) {
+ res[prop] = childConfig[prop];
+ } else {
+ delete res[prop];
+ }
+ }
+ }
+ for (prop in parentConfig) {
+ if (
+ hasOwnProp(parentConfig, prop) &&
+ !hasOwnProp(childConfig, prop) &&
+ isObject(parentConfig[prop])
+ ) {
+ // make sure changes to properties don't modify parent config
+ res[prop] = extend({}, res[prop]);
+ }
+ }
+ return res;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/add-subtract.js b/vendor/assets/javascripts/momentjs/src/lib/moment/add-subtract.js
new file mode 100644
index 000000000..6e7cf22e1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/add-subtract.js
@@ -0,0 +1,61 @@
+import { get, set } from './get-set';
+import { setMonth } from '../units/month';
+import { createDuration } from '../duration/create';
+import { deprecateSimple } from '../utils/deprecate';
+import { hooks } from '../utils/hooks';
+import absRound from '../utils/abs-round';
+
+// TODO: remove 'name' arg after deprecation is removed
+function createAdder(direction, name) {
+ return function (val, period) {
+ var dur, tmp;
+ //invert the arguments, but complain about it
+ if (period !== null && !isNaN(+period)) {
+ deprecateSimple(
+ name,
+ 'moment().' +
+ name +
+ '(period, number) is deprecated. Please use moment().' +
+ name +
+ '(number, period). ' +
+ 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
+ );
+ tmp = val;
+ val = period;
+ period = tmp;
+ }
+
+ dur = createDuration(val, period);
+ addSubtract(this, dur, direction);
+ return this;
+ };
+}
+
+export function addSubtract(mom, duration, isAdding, updateOffset) {
+ var milliseconds = duration._milliseconds,
+ days = absRound(duration._days),
+ months = absRound(duration._months);
+
+ if (!mom.isValid()) {
+ // No op
+ return;
+ }
+
+ updateOffset = updateOffset == null ? true : updateOffset;
+
+ if (months) {
+ setMonth(mom, get(mom, 'Month') + months * isAdding);
+ }
+ if (days) {
+ set(mom, 'Date', get(mom, 'Date') + days * isAdding);
+ }
+ if (milliseconds) {
+ mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
+ }
+ if (updateOffset) {
+ hooks.updateOffset(mom, days || months);
+ }
+}
+
+export var add = createAdder(1, 'add'),
+ subtract = createAdder(-1, 'subtract');
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/calendar.js b/vendor/assets/javascripts/momentjs/src/lib/moment/calendar.js
new file mode 100644
index 000000000..fdd53dcb3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/calendar.js
@@ -0,0 +1,53 @@
+import { createLocal } from '../create/local';
+import { cloneWithOffset } from '../units/offset';
+import isFunction from '../utils/is-function';
+import { hooks } from '../utils/hooks';
+import { isMomentInput } from '../utils/is-moment-input';
+import isCalendarSpec from '../utils/is-calendar-spec';
+
+export function getCalendarFormat(myMoment, now) {
+ var diff = myMoment.diff(now, 'days', true);
+ return diff < -6
+ ? 'sameElse'
+ : diff < -1
+ ? 'lastWeek'
+ : diff < 0
+ ? 'lastDay'
+ : diff < 1
+ ? 'sameDay'
+ : diff < 2
+ ? 'nextDay'
+ : diff < 7
+ ? 'nextWeek'
+ : 'sameElse';
+}
+
+export function calendar(time, formats) {
+ // Support for single parameter, formats only overload to the calendar function
+ if (arguments.length === 1) {
+ if (!arguments[0]) {
+ time = undefined;
+ formats = undefined;
+ } else if (isMomentInput(arguments[0])) {
+ time = arguments[0];
+ formats = undefined;
+ } else if (isCalendarSpec(arguments[0])) {
+ formats = arguments[0];
+ time = undefined;
+ }
+ }
+ // We want to compare the start of today, vs this.
+ // Getting start-of-today depends on whether we're local/utc/offset or not.
+ var now = time || createLocal(),
+ sod = cloneWithOffset(now, this).startOf('day'),
+ format = hooks.calendarFormat(this, sod) || 'sameElse',
+ output =
+ formats &&
+ (isFunction(formats[format])
+ ? formats[format].call(this, now)
+ : formats[format]);
+
+ return this.format(
+ output || this.localeData().calendar(format, this, createLocal(now))
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/clone.js b/vendor/assets/javascripts/momentjs/src/lib/moment/clone.js
new file mode 100644
index 000000000..de77c12d6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/clone.js
@@ -0,0 +1,5 @@
+import { Moment } from './constructor';
+
+export function clone() {
+ return new Moment(this);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/compare.js b/vendor/assets/javascripts/momentjs/src/lib/moment/compare.js
new file mode 100644
index 000000000..3f66d7735
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/compare.js
@@ -0,0 +1,72 @@
+import { isMoment } from './constructor';
+import { normalizeUnits } from '../units/aliases';
+import { createLocal } from '../create/local';
+
+export function isAfter(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input);
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() > localInput.valueOf();
+ } else {
+ return localInput.valueOf() < this.clone().startOf(units).valueOf();
+ }
+}
+
+export function isBefore(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input);
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() < localInput.valueOf();
+ } else {
+ return this.clone().endOf(units).valueOf() < localInput.valueOf();
+ }
+}
+
+export function isBetween(from, to, units, inclusivity) {
+ var localFrom = isMoment(from) ? from : createLocal(from),
+ localTo = isMoment(to) ? to : createLocal(to);
+ if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
+ return false;
+ }
+ inclusivity = inclusivity || '()';
+ return (
+ (inclusivity[0] === '('
+ ? this.isAfter(localFrom, units)
+ : !this.isBefore(localFrom, units)) &&
+ (inclusivity[1] === ')'
+ ? this.isBefore(localTo, units)
+ : !this.isAfter(localTo, units))
+ );
+}
+
+export function isSame(input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input),
+ inputMs;
+ if (!(this.isValid() && localInput.isValid())) {
+ return false;
+ }
+ units = normalizeUnits(units) || 'millisecond';
+ if (units === 'millisecond') {
+ return this.valueOf() === localInput.valueOf();
+ } else {
+ inputMs = localInput.valueOf();
+ return (
+ this.clone().startOf(units).valueOf() <= inputMs &&
+ inputMs <= this.clone().endOf(units).valueOf()
+ );
+ }
+}
+
+export function isSameOrAfter(input, units) {
+ return this.isSame(input, units) || this.isAfter(input, units);
+}
+
+export function isSameOrBefore(input, units) {
+ return this.isSame(input, units) || this.isBefore(input, units);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/constructor.js b/vendor/assets/javascripts/momentjs/src/lib/moment/constructor.js
new file mode 100644
index 000000000..b86de8b92
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/constructor.js
@@ -0,0 +1,80 @@
+import { hooks } from '../utils/hooks';
+import isUndefined from '../utils/is-undefined';
+import getParsingFlags from '../create/parsing-flags';
+
+// Plugins that add properties should also add the key here (null value),
+// so we can properly clone ourselves.
+var momentProperties = (hooks.momentProperties = []),
+ updateInProgress = false;
+
+export function copyConfig(to, from) {
+ var i,
+ prop,
+ val,
+ momentPropertiesLen = momentProperties.length;
+
+ if (!isUndefined(from._isAMomentObject)) {
+ to._isAMomentObject = from._isAMomentObject;
+ }
+ if (!isUndefined(from._i)) {
+ to._i = from._i;
+ }
+ if (!isUndefined(from._f)) {
+ to._f = from._f;
+ }
+ if (!isUndefined(from._l)) {
+ to._l = from._l;
+ }
+ if (!isUndefined(from._strict)) {
+ to._strict = from._strict;
+ }
+ if (!isUndefined(from._tzm)) {
+ to._tzm = from._tzm;
+ }
+ if (!isUndefined(from._isUTC)) {
+ to._isUTC = from._isUTC;
+ }
+ if (!isUndefined(from._offset)) {
+ to._offset = from._offset;
+ }
+ if (!isUndefined(from._pf)) {
+ to._pf = getParsingFlags(from);
+ }
+ if (!isUndefined(from._locale)) {
+ to._locale = from._locale;
+ }
+
+ if (momentPropertiesLen > 0) {
+ for (i = 0; i < momentPropertiesLen; i++) {
+ prop = momentProperties[i];
+ val = from[prop];
+ if (!isUndefined(val)) {
+ to[prop] = val;
+ }
+ }
+ }
+
+ return to;
+}
+
+// Moment prototype object
+export function Moment(config) {
+ copyConfig(this, config);
+ this._d = new Date(config._d != null ? config._d.getTime() : NaN);
+ if (!this.isValid()) {
+ this._d = new Date(NaN);
+ }
+ // Prevent infinite loop in case updateOffset creates new moment
+ // objects.
+ if (updateInProgress === false) {
+ updateInProgress = true;
+ hooks.updateOffset(this);
+ updateInProgress = false;
+ }
+}
+
+export function isMoment(obj) {
+ return (
+ obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/creation-data.js b/vendor/assets/javascripts/momentjs/src/lib/moment/creation-data.js
new file mode 100644
index 000000000..6643c4491
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/creation-data.js
@@ -0,0 +1,9 @@
+export function creationData() {
+ return {
+ input: this._i,
+ format: this._f,
+ locale: this._locale,
+ isUTC: this._isUTC,
+ strict: this._strict,
+ };
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/diff.js b/vendor/assets/javascripts/momentjs/src/lib/moment/diff.js
new file mode 100644
index 000000000..5157318c4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/diff.js
@@ -0,0 +1,79 @@
+import absFloor from '../utils/abs-floor';
+import { cloneWithOffset } from '../units/offset';
+import { normalizeUnits } from '../units/aliases';
+
+export function diff(input, units, asFloat) {
+ var that, zoneDelta, output;
+
+ if (!this.isValid()) {
+ return NaN;
+ }
+
+ that = cloneWithOffset(input, this);
+
+ if (!that.isValid()) {
+ return NaN;
+ }
+
+ zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
+
+ units = normalizeUnits(units);
+
+ switch (units) {
+ case 'year':
+ output = monthDiff(this, that) / 12;
+ break;
+ case 'month':
+ output = monthDiff(this, that);
+ break;
+ case 'quarter':
+ output = monthDiff(this, that) / 3;
+ break;
+ case 'second':
+ output = (this - that) / 1e3;
+ break; // 1000
+ case 'minute':
+ output = (this - that) / 6e4;
+ break; // 1000 * 60
+ case 'hour':
+ output = (this - that) / 36e5;
+ break; // 1000 * 60 * 60
+ case 'day':
+ output = (this - that - zoneDelta) / 864e5;
+ break; // 1000 * 60 * 60 * 24, negate dst
+ case 'week':
+ output = (this - that - zoneDelta) / 6048e5;
+ break; // 1000 * 60 * 60 * 24 * 7, negate dst
+ default:
+ output = this - that;
+ }
+
+ return asFloat ? output : absFloor(output);
+}
+
+function monthDiff(a, b) {
+ if (a.date() < b.date()) {
+ // end-of-month calculations work correct when the start month has more
+ // days than the end month.
+ return -monthDiff(b, a);
+ }
+ // difference in months
+ var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
+ // b is in (anchor - 1 month, anchor + 1 month)
+ anchor = a.clone().add(wholeMonthDiff, 'months'),
+ anchor2,
+ adjust;
+
+ if (b - anchor < 0) {
+ anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
+ // linear across the month
+ adjust = (b - anchor) / (anchor - anchor2);
+ } else {
+ anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
+ // linear across the month
+ adjust = (b - anchor) / (anchor2 - anchor);
+ }
+
+ //check for negative zero, return zero if negative zero
+ return -(wholeMonthDiff + adjust) || 0;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/format.js b/vendor/assets/javascripts/momentjs/src/lib/moment/format.js
new file mode 100644
index 000000000..9a3592a62
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/format.js
@@ -0,0 +1,78 @@
+import { formatMoment } from '../format/format';
+import { hooks } from '../utils/hooks';
+import isFunction from '../utils/is-function';
+
+hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
+hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
+
+export function toString() {
+ return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
+}
+
+export function toISOString(keepOffset) {
+ if (!this.isValid()) {
+ return null;
+ }
+ var utc = keepOffset !== true,
+ m = utc ? this.clone().utc() : this;
+ if (m.year() < 0 || m.year() > 9999) {
+ return formatMoment(
+ m,
+ utc
+ ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
+ : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
+ );
+ }
+ if (isFunction(Date.prototype.toISOString)) {
+ // native implementation is ~50x faster, use it when we can
+ if (utc) {
+ return this.toDate().toISOString();
+ } else {
+ return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
+ .toISOString()
+ .replace('Z', formatMoment(m, 'Z'));
+ }
+ }
+ return formatMoment(
+ m,
+ utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
+ );
+}
+
+/**
+ * Return a human readable representation of a moment that can
+ * also be evaluated to get a new moment which is the same
+ *
+ * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
+ */
+export function inspect() {
+ if (!this.isValid()) {
+ return 'moment.invalid(/* ' + this._i + ' */)';
+ }
+ var func = 'moment',
+ zone = '',
+ prefix,
+ year,
+ datetime,
+ suffix;
+ if (!this.isLocal()) {
+ func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
+ zone = 'Z';
+ }
+ prefix = '[' + func + '("]';
+ year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
+ datetime = '-MM-DD[T]HH:mm:ss.SSS';
+ suffix = zone + '[")]';
+
+ return this.format(prefix + year + datetime + suffix);
+}
+
+export function format(inputString) {
+ if (!inputString) {
+ inputString = this.isUtc()
+ ? hooks.defaultFormatUtc
+ : hooks.defaultFormat;
+ }
+ var output = formatMoment(this, inputString);
+ return this.localeData().postformat(output);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/from.js b/vendor/assets/javascripts/momentjs/src/lib/moment/from.js
new file mode 100644
index 000000000..5db72aa97
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/from.js
@@ -0,0 +1,20 @@
+import { createDuration } from '../duration/create';
+import { createLocal } from '../create/local';
+import { isMoment } from '../moment/constructor';
+
+export function from(time, withoutSuffix) {
+ if (
+ this.isValid() &&
+ ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
+ ) {
+ return createDuration({ to: this, from: time })
+ .locale(this.locale())
+ .humanize(!withoutSuffix);
+ } else {
+ return this.localeData().invalidDate();
+ }
+}
+
+export function fromNow(withoutSuffix) {
+ return this.from(createLocal(), withoutSuffix);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/get-set.js b/vendor/assets/javascripts/momentjs/src/lib/moment/get-set.js
new file mode 100644
index 000000000..cbdd45520
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/get-set.js
@@ -0,0 +1,73 @@
+import { normalizeUnits, normalizeObjectUnits } from '../units/aliases';
+import { getPrioritizedUnits } from '../units/priorities';
+import { hooks } from '../utils/hooks';
+import isFunction from '../utils/is-function';
+import { daysInMonth } from '../units/month';
+import { isLeapYear } from '../utils/is-leap-year';
+import toInt from '../utils/to-int';
+
+export function makeGetSet(unit, keepTime) {
+ return function (value) {
+ if (value != null) {
+ set(this, unit, value);
+ hooks.updateOffset(this, keepTime);
+ return this;
+ } else {
+ return get(this, unit);
+ }
+ };
+}
+
+export function get(mom, unit) {
+ return mom.isValid()
+ ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
+ : NaN;
+}
+
+export function set(mom, unit, value) {
+ if (mom.isValid() && !isNaN(value)) {
+ if (
+ unit === 'FullYear' &&
+ isLeapYear(mom.year()) &&
+ mom.month() === 1 &&
+ mom.date() === 29
+ ) {
+ value = toInt(value);
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
+ value,
+ mom.month(),
+ daysInMonth(value, mom.month())
+ );
+ } else {
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
+ }
+ }
+}
+
+// MOMENTS
+
+export function stringGet(units) {
+ units = normalizeUnits(units);
+ if (isFunction(this[units])) {
+ return this[units]();
+ }
+ return this;
+}
+
+export function stringSet(units, value) {
+ if (typeof units === 'object') {
+ units = normalizeObjectUnits(units);
+ var prioritized = getPrioritizedUnits(units),
+ i,
+ prioritizedLen = prioritized.length;
+ for (i = 0; i < prioritizedLen; i++) {
+ this[prioritized[i].unit](units[prioritized[i].unit]);
+ }
+ } else {
+ units = normalizeUnits(units);
+ if (isFunction(this[units])) {
+ return this[units](value);
+ }
+ }
+ return this;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/locale.js b/vendor/assets/javascripts/momentjs/src/lib/moment/locale.js
new file mode 100644
index 000000000..3c6211317
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/locale.js
@@ -0,0 +1,34 @@
+import { getLocale } from '../locale/locales';
+import { deprecate } from '../utils/deprecate';
+
+// If passed a locale key, it will set the locale for this
+// instance. Otherwise, it will return the locale configuration
+// variables for this instance.
+export function locale(key) {
+ var newLocaleData;
+
+ if (key === undefined) {
+ return this._locale._abbr;
+ } else {
+ newLocaleData = getLocale(key);
+ if (newLocaleData != null) {
+ this._locale = newLocaleData;
+ }
+ return this;
+ }
+}
+
+export var lang = deprecate(
+ 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
+ function (key) {
+ if (key === undefined) {
+ return this.localeData();
+ } else {
+ return this.locale(key);
+ }
+ }
+);
+
+export function localeData() {
+ return this._locale;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/min-max.js b/vendor/assets/javascripts/momentjs/src/lib/moment/min-max.js
new file mode 100644
index 000000000..2ea8955d1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/min-max.js
@@ -0,0 +1,62 @@
+import { deprecate } from '../utils/deprecate';
+import isArray from '../utils/is-array';
+import { createLocal } from '../create/local';
+import { createInvalid } from '../create/valid';
+
+export var prototypeMin = deprecate(
+ 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
+ function () {
+ var other = createLocal.apply(null, arguments);
+ if (this.isValid() && other.isValid()) {
+ return other < this ? this : other;
+ } else {
+ return createInvalid();
+ }
+ }
+ ),
+ prototypeMax = deprecate(
+ 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
+ function () {
+ var other = createLocal.apply(null, arguments);
+ if (this.isValid() && other.isValid()) {
+ return other > this ? this : other;
+ } else {
+ return createInvalid();
+ }
+ }
+ );
+
+// Pick a moment m from moments so that m[fn](other) is true for all
+// other. This relies on the function fn to be transitive.
+//
+// moments should either be an array of moment objects or an array, whose
+// first element is an array of moment objects.
+function pickBy(fn, moments) {
+ var res, i;
+ if (moments.length === 1 && isArray(moments[0])) {
+ moments = moments[0];
+ }
+ if (!moments.length) {
+ return createLocal();
+ }
+ res = moments[0];
+ for (i = 1; i < moments.length; ++i) {
+ if (!moments[i].isValid() || moments[i][fn](res)) {
+ res = moments[i];
+ }
+ }
+ return res;
+}
+
+// TODO: Use [].sort instead?
+export function min() {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isBefore', args);
+}
+
+export function max() {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isAfter', args);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/moment.js b/vendor/assets/javascripts/momentjs/src/lib/moment/moment.js
new file mode 100644
index 000000000..f369d08c6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/moment.js
@@ -0,0 +1,28 @@
+import { createLocal } from '../create/local';
+import { createUTC } from '../create/utc';
+import { createInvalid } from '../create/valid';
+import { isMoment } from './constructor';
+import { min, max } from './min-max';
+import { now } from './now';
+import momentPrototype from './prototype';
+
+function createUnix(input) {
+ return createLocal(input * 1000);
+}
+
+function createInZone() {
+ return createLocal.apply(null, arguments).parseZone();
+}
+
+export {
+ now,
+ min,
+ max,
+ isMoment,
+ createUTC,
+ createUnix,
+ createLocal,
+ createInZone,
+ createInvalid,
+ momentPrototype,
+};
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/now.js b/vendor/assets/javascripts/momentjs/src/lib/moment/now.js
new file mode 100644
index 000000000..9bef27611
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/now.js
@@ -0,0 +1,3 @@
+export var now = function () {
+ return Date.now ? Date.now() : +new Date();
+};
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/prototype.js b/vendor/assets/javascripts/momentjs/src/lib/moment/prototype.js
new file mode 100644
index 000000000..b4565ab6e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/prototype.js
@@ -0,0 +1,197 @@
+import { Moment } from './constructor';
+
+var proto = Moment.prototype;
+
+import { add, subtract } from './add-subtract';
+import { calendar } from './calendar';
+import { clone } from './clone';
+import {
+ isBefore,
+ isBetween,
+ isSame,
+ isAfter,
+ isSameOrAfter,
+ isSameOrBefore,
+} from './compare';
+import { diff } from './diff';
+import { format, toString, toISOString, inspect } from './format';
+import { from, fromNow } from './from';
+import { to, toNow } from './to';
+import { stringGet, stringSet } from './get-set';
+import { locale, localeData, lang } from './locale';
+import { prototypeMin, prototypeMax } from './min-max';
+import { startOf, endOf } from './start-end-of';
+import { valueOf, toDate, toArray, toObject, toJSON, unix } from './to-type';
+import { isValid, parsingFlags, invalidAt } from './valid';
+import { creationData } from './creation-data';
+
+proto.add = add;
+proto.calendar = calendar;
+proto.clone = clone;
+proto.diff = diff;
+proto.endOf = endOf;
+proto.format = format;
+proto.from = from;
+proto.fromNow = fromNow;
+proto.to = to;
+proto.toNow = toNow;
+proto.get = stringGet;
+proto.invalidAt = invalidAt;
+proto.isAfter = isAfter;
+proto.isBefore = isBefore;
+proto.isBetween = isBetween;
+proto.isSame = isSame;
+proto.isSameOrAfter = isSameOrAfter;
+proto.isSameOrBefore = isSameOrBefore;
+proto.isValid = isValid;
+proto.lang = lang;
+proto.locale = locale;
+proto.localeData = localeData;
+proto.max = prototypeMax;
+proto.min = prototypeMin;
+proto.parsingFlags = parsingFlags;
+proto.set = stringSet;
+proto.startOf = startOf;
+proto.subtract = subtract;
+proto.toArray = toArray;
+proto.toObject = toObject;
+proto.toDate = toDate;
+proto.toISOString = toISOString;
+proto.inspect = inspect;
+if (typeof Symbol !== 'undefined' && Symbol.for != null) {
+ proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
+ return 'Moment<' + this.format() + '>';
+ };
+}
+proto.toJSON = toJSON;
+proto.toString = toString;
+proto.unix = unix;
+proto.valueOf = valueOf;
+proto.creationData = creationData;
+
+// Era
+import { getEraName, getEraNarrow, getEraAbbr, getEraYear } from '../units/era';
+proto.eraName = getEraName;
+proto.eraNarrow = getEraNarrow;
+proto.eraAbbr = getEraAbbr;
+proto.eraYear = getEraYear;
+
+// Year
+import { getSetYear, getIsLeapYear } from '../units/year';
+proto.year = getSetYear;
+proto.isLeapYear = getIsLeapYear;
+
+// Week Year
+import {
+ getSetWeekYear,
+ getSetISOWeekYear,
+ getWeeksInYear,
+ getWeeksInWeekYear,
+ getISOWeeksInYear,
+ getISOWeeksInISOWeekYear,
+} from '../units/week-year';
+proto.weekYear = getSetWeekYear;
+proto.isoWeekYear = getSetISOWeekYear;
+
+// Quarter
+import { getSetQuarter } from '../units/quarter';
+proto.quarter = proto.quarters = getSetQuarter;
+
+// Month
+import { getSetMonth, getDaysInMonth } from '../units/month';
+proto.month = getSetMonth;
+proto.daysInMonth = getDaysInMonth;
+
+// Week
+import { getSetWeek, getSetISOWeek } from '../units/week';
+proto.week = proto.weeks = getSetWeek;
+proto.isoWeek = proto.isoWeeks = getSetISOWeek;
+proto.weeksInYear = getWeeksInYear;
+proto.weeksInWeekYear = getWeeksInWeekYear;
+proto.isoWeeksInYear = getISOWeeksInYear;
+proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
+
+// Day
+import { getSetDayOfMonth } from '../units/day-of-month';
+import {
+ getSetDayOfWeek,
+ getSetISODayOfWeek,
+ getSetLocaleDayOfWeek,
+} from '../units/day-of-week';
+import { getSetDayOfYear } from '../units/day-of-year';
+proto.date = getSetDayOfMonth;
+proto.day = proto.days = getSetDayOfWeek;
+proto.weekday = getSetLocaleDayOfWeek;
+proto.isoWeekday = getSetISODayOfWeek;
+proto.dayOfYear = getSetDayOfYear;
+
+// Hour
+import { getSetHour } from '../units/hour';
+proto.hour = proto.hours = getSetHour;
+
+// Minute
+import { getSetMinute } from '../units/minute';
+proto.minute = proto.minutes = getSetMinute;
+
+// Second
+import { getSetSecond } from '../units/second';
+proto.second = proto.seconds = getSetSecond;
+
+// Millisecond
+import { getSetMillisecond } from '../units/millisecond';
+proto.millisecond = proto.milliseconds = getSetMillisecond;
+
+// Offset
+import {
+ getSetOffset,
+ setOffsetToUTC,
+ setOffsetToLocal,
+ setOffsetToParsedOffset,
+ hasAlignedHourOffset,
+ isDaylightSavingTime,
+ isDaylightSavingTimeShifted,
+ getSetZone,
+ isLocal,
+ isUtcOffset,
+ isUtc,
+} from '../units/offset';
+proto.utcOffset = getSetOffset;
+proto.utc = setOffsetToUTC;
+proto.local = setOffsetToLocal;
+proto.parseZone = setOffsetToParsedOffset;
+proto.hasAlignedHourOffset = hasAlignedHourOffset;
+proto.isDST = isDaylightSavingTime;
+proto.isLocal = isLocal;
+proto.isUtcOffset = isUtcOffset;
+proto.isUtc = isUtc;
+proto.isUTC = isUtc;
+
+// Timezone
+import { getZoneAbbr, getZoneName } from '../units/timezone';
+proto.zoneAbbr = getZoneAbbr;
+proto.zoneName = getZoneName;
+
+// Deprecations
+import { deprecate } from '../utils/deprecate';
+proto.dates = deprecate(
+ 'dates accessor is deprecated. Use date instead.',
+ getSetDayOfMonth
+);
+proto.months = deprecate(
+ 'months accessor is deprecated. Use month instead',
+ getSetMonth
+);
+proto.years = deprecate(
+ 'years accessor is deprecated. Use year instead',
+ getSetYear
+);
+proto.zone = deprecate(
+ 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
+ getSetZone
+);
+proto.isDSTShifted = deprecate(
+ 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
+ isDaylightSavingTimeShifted
+);
+
+export default proto;
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/start-end-of.js b/vendor/assets/javascripts/momentjs/src/lib/moment/start-end-of.js
new file mode 100644
index 000000000..cbb301f94
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/start-end-of.js
@@ -0,0 +1,164 @@
+import { normalizeUnits } from '../units/aliases';
+import { hooks } from '../utils/hooks';
+
+var MS_PER_SECOND = 1000,
+ MS_PER_MINUTE = 60 * MS_PER_SECOND,
+ MS_PER_HOUR = 60 * MS_PER_MINUTE,
+ MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
+
+// actual modulo - handles negative numbers (for dates before 1970):
+function mod(dividend, divisor) {
+ return ((dividend % divisor) + divisor) % divisor;
+}
+
+function localStartOfDate(y, m, d) {
+ // the date constructor remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ return new Date(y + 400, m, d) - MS_PER_400_YEARS;
+ } else {
+ return new Date(y, m, d).valueOf();
+ }
+}
+
+function utcStartOfDate(y, m, d) {
+ // Date.UTC remaps years 0-99 to 1900-1999
+ if (y < 100 && y >= 0) {
+ // preserve leap years using a full 400 year cycle, then reset
+ return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
+ } else {
+ return Date.UTC(y, m, d);
+ }
+}
+
+export function startOf(units) {
+ var time, startOfDate;
+ units = normalizeUnits(units);
+ if (units === undefined || units === 'millisecond' || !this.isValid()) {
+ return this;
+ }
+
+ startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
+
+ switch (units) {
+ case 'year':
+ time = startOfDate(this.year(), 0, 1);
+ break;
+ case 'quarter':
+ time = startOfDate(
+ this.year(),
+ this.month() - (this.month() % 3),
+ 1
+ );
+ break;
+ case 'month':
+ time = startOfDate(this.year(), this.month(), 1);
+ break;
+ case 'week':
+ time = startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - this.weekday()
+ );
+ break;
+ case 'isoWeek':
+ time = startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - (this.isoWeekday() - 1)
+ );
+ break;
+ case 'day':
+ case 'date':
+ time = startOfDate(this.year(), this.month(), this.date());
+ break;
+ case 'hour':
+ time = this._d.valueOf();
+ time -= mod(
+ time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
+ MS_PER_HOUR
+ );
+ break;
+ case 'minute':
+ time = this._d.valueOf();
+ time -= mod(time, MS_PER_MINUTE);
+ break;
+ case 'second':
+ time = this._d.valueOf();
+ time -= mod(time, MS_PER_SECOND);
+ break;
+ }
+
+ this._d.setTime(time);
+ hooks.updateOffset(this, true);
+ return this;
+}
+
+export function endOf(units) {
+ var time, startOfDate;
+ units = normalizeUnits(units);
+ if (units === undefined || units === 'millisecond' || !this.isValid()) {
+ return this;
+ }
+
+ startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
+
+ switch (units) {
+ case 'year':
+ time = startOfDate(this.year() + 1, 0, 1) - 1;
+ break;
+ case 'quarter':
+ time =
+ startOfDate(
+ this.year(),
+ this.month() - (this.month() % 3) + 3,
+ 1
+ ) - 1;
+ break;
+ case 'month':
+ time = startOfDate(this.year(), this.month() + 1, 1) - 1;
+ break;
+ case 'week':
+ time =
+ startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - this.weekday() + 7
+ ) - 1;
+ break;
+ case 'isoWeek':
+ time =
+ startOfDate(
+ this.year(),
+ this.month(),
+ this.date() - (this.isoWeekday() - 1) + 7
+ ) - 1;
+ break;
+ case 'day':
+ case 'date':
+ time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
+ break;
+ case 'hour':
+ time = this._d.valueOf();
+ time +=
+ MS_PER_HOUR -
+ mod(
+ time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
+ MS_PER_HOUR
+ ) -
+ 1;
+ break;
+ case 'minute':
+ time = this._d.valueOf();
+ time += MS_PER_MINUTE - mod(time, MS_PER_MINUTE) - 1;
+ break;
+ case 'second':
+ time = this._d.valueOf();
+ time += MS_PER_SECOND - mod(time, MS_PER_SECOND) - 1;
+ break;
+ }
+
+ this._d.setTime(time);
+ hooks.updateOffset(this, true);
+ return this;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/to-type.js b/vendor/assets/javascripts/momentjs/src/lib/moment/to-type.js
new file mode 100644
index 000000000..1eef5c8c0
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/to-type.js
@@ -0,0 +1,42 @@
+export function valueOf() {
+ return this._d.valueOf() - (this._offset || 0) * 60000;
+}
+
+export function unix() {
+ return Math.floor(this.valueOf() / 1000);
+}
+
+export function toDate() {
+ return new Date(this.valueOf());
+}
+
+export function toArray() {
+ var m = this;
+ return [
+ m.year(),
+ m.month(),
+ m.date(),
+ m.hour(),
+ m.minute(),
+ m.second(),
+ m.millisecond(),
+ ];
+}
+
+export function toObject() {
+ var m = this;
+ return {
+ years: m.year(),
+ months: m.month(),
+ date: m.date(),
+ hours: m.hours(),
+ minutes: m.minutes(),
+ seconds: m.seconds(),
+ milliseconds: m.milliseconds(),
+ };
+}
+
+export function toJSON() {
+ // new Date(NaN).toJSON() === null
+ return this.isValid() ? this.toISOString() : null;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/to.js b/vendor/assets/javascripts/momentjs/src/lib/moment/to.js
new file mode 100644
index 000000000..073a3d11b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/to.js
@@ -0,0 +1,20 @@
+import { createDuration } from '../duration/create';
+import { createLocal } from '../create/local';
+import { isMoment } from '../moment/constructor';
+
+export function to(time, withoutSuffix) {
+ if (
+ this.isValid() &&
+ ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
+ ) {
+ return createDuration({ from: this, to: time })
+ .locale(this.locale())
+ .humanize(!withoutSuffix);
+ } else {
+ return this.localeData().invalidDate();
+ }
+}
+
+export function toNow(withoutSuffix) {
+ return this.to(createLocal(), withoutSuffix);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/moment/valid.js b/vendor/assets/javascripts/momentjs/src/lib/moment/valid.js
new file mode 100644
index 000000000..7a7e1b96c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/moment/valid.js
@@ -0,0 +1,15 @@
+import { isValid as _isValid } from '../create/valid';
+import extend from '../utils/extend';
+import getParsingFlags from '../create/parsing-flags';
+
+export function isValid() {
+ return _isValid(this);
+}
+
+export function parsingFlags() {
+ return extend({}, getParsingFlags(this));
+}
+
+export function invalidAt() {
+ return getParsingFlags(this).overflow;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/parse/regex.js b/vendor/assets/javascripts/momentjs/src/lib/parse/regex.js
new file mode 100644
index 000000000..9576d01b9
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/parse/regex.js
@@ -0,0 +1,80 @@
+var match1 = /\d/, // 0 - 9
+ match2 = /\d\d/, // 00 - 99
+ match3 = /\d{3}/, // 000 - 999
+ match4 = /\d{4}/, // 0000 - 9999
+ match6 = /[+-]?\d{6}/, // -999999 - 999999
+ match1to2 = /\d\d?/, // 0 - 99
+ match3to4 = /\d\d\d\d?/, // 999 - 9999
+ match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
+ match1to3 = /\d{1,3}/, // 0 - 999
+ match1to4 = /\d{1,4}/, // 0 - 9999
+ match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
+ matchUnsigned = /\d+/, // 0 - inf
+ matchSigned = /[+-]?\d+/, // -inf - inf
+ matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
+ matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
+ matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
+ // any word (or two) characters or numbers including two/three word month in arabic.
+ // includes scottish gaelic two word and hyphenated months
+ matchWord =
+ /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
+ regexes;
+
+export {
+ match1,
+ match2,
+ match3,
+ match4,
+ match6,
+ match1to2,
+ match3to4,
+ match5to6,
+ match1to3,
+ match1to4,
+ match1to6,
+ matchUnsigned,
+ matchSigned,
+ matchOffset,
+ matchShortOffset,
+ matchTimestamp,
+ matchWord,
+};
+
+import hasOwnProp from '../utils/has-own-prop';
+import isFunction from '../utils/is-function';
+
+regexes = {};
+
+export function addRegexToken(token, regex, strictRegex) {
+ regexes[token] = isFunction(regex)
+ ? regex
+ : function (isStrict, localeData) {
+ return isStrict && strictRegex ? strictRegex : regex;
+ };
+}
+
+export function getParseRegexForToken(token, config) {
+ if (!hasOwnProp(regexes, token)) {
+ return new RegExp(unescapeFormat(token));
+ }
+
+ return regexes[token](config._strict, config._locale);
+}
+
+// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
+function unescapeFormat(s) {
+ return regexEscape(
+ s
+ .replace('\\', '')
+ .replace(
+ /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
+ function (matched, p1, p2, p3, p4) {
+ return p1 || p2 || p3 || p4;
+ }
+ )
+ );
+}
+
+export function regexEscape(s) {
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/parse/token.js b/vendor/assets/javascripts/momentjs/src/lib/parse/token.js
new file mode 100644
index 000000000..ede35782e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/parse/token.js
@@ -0,0 +1,36 @@
+import hasOwnProp from '../utils/has-own-prop';
+import isNumber from '../utils/is-number';
+import toInt from '../utils/to-int';
+
+var tokens = {};
+
+export function addParseToken(token, callback) {
+ var i,
+ func = callback,
+ tokenLen;
+ if (typeof token === 'string') {
+ token = [token];
+ }
+ if (isNumber(callback)) {
+ func = function (input, array) {
+ array[callback] = toInt(input);
+ };
+ }
+ tokenLen = token.length;
+ for (i = 0; i < tokenLen; i++) {
+ tokens[token[i]] = func;
+ }
+}
+
+export function addWeekParseToken(token, callback) {
+ addParseToken(token, function (input, array, config, token) {
+ config._w = config._w || {};
+ callback(input, config._w, config, token);
+ });
+}
+
+export function addTimeToArrayFromToken(token, input, config) {
+ if (input != null && hasOwnProp(tokens, token)) {
+ tokens[token](input, config._a, config, token);
+ }
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/aliases.js b/vendor/assets/javascripts/momentjs/src/lib/units/aliases.js
new file mode 100644
index 000000000..8127b6851
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/aliases.js
@@ -0,0 +1,31 @@
+import hasOwnProp from '../utils/has-own-prop';
+
+var aliases = {};
+
+export function addUnitAlias(unit, shorthand) {
+ var lowerCase = unit.toLowerCase();
+ aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
+}
+
+export function normalizeUnits(units) {
+ return typeof units === 'string'
+ ? aliases[units] || aliases[units.toLowerCase()]
+ : undefined;
+}
+
+export function normalizeObjectUnits(inputObject) {
+ var normalizedInput = {},
+ normalizedProp,
+ prop;
+
+ for (prop in inputObject) {
+ if (hasOwnProp(inputObject, prop)) {
+ normalizedProp = normalizeUnits(prop);
+ if (normalizedProp) {
+ normalizedInput[normalizedProp] = inputObject[prop];
+ }
+ }
+ }
+
+ return normalizedInput;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/constants.js b/vendor/assets/javascripts/momentjs/src/lib/units/constants.js
new file mode 100644
index 000000000..da36dbdc4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/constants.js
@@ -0,0 +1,9 @@
+export var YEAR = 0,
+ MONTH = 1,
+ DATE = 2,
+ HOUR = 3,
+ MINUTE = 4,
+ SECOND = 5,
+ MILLISECOND = 6,
+ WEEK = 7,
+ WEEKDAY = 8;
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/day-of-month.js b/vendor/assets/javascripts/momentjs/src/lib/units/day-of-month.js
new file mode 100644
index 000000000..42a8b3f84
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/day-of-month.js
@@ -0,0 +1,39 @@
+import { makeGetSet } from '../moment/get-set';
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import { addRegexToken, match1to2, match2 } from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import { DATE } from './constants';
+import toInt from '../utils/to-int';
+
+// FORMATTING
+
+addFormatToken('D', ['DD', 2], 'Do', 'date');
+
+// ALIASES
+
+addUnitAlias('date', 'D');
+
+// PRIORITY
+addUnitPriority('date', 9);
+
+// PARSING
+
+addRegexToken('D', match1to2);
+addRegexToken('DD', match1to2, match2);
+addRegexToken('Do', function (isStrict, locale) {
+ // TODO: Remove "ordinalParse" fallback in next major release.
+ return isStrict
+ ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
+ : locale._dayOfMonthOrdinalParseLenient;
+});
+
+addParseToken(['D', 'DD'], DATE);
+addParseToken('Do', function (input, array) {
+ array[DATE] = toInt(input.match(match1to2)[0]);
+});
+
+// MOMENTS
+
+export var getSetDayOfMonth = makeGetSet('Date', true);
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/day-of-week.js b/vendor/assets/javascripts/momentjs/src/lib/units/day-of-week.js
new file mode 100644
index 000000000..b2d5ce23e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/day-of-week.js
@@ -0,0 +1,443 @@
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import {
+ addRegexToken,
+ match1to2,
+ matchWord,
+ regexEscape,
+} from '../parse/regex';
+import { addWeekParseToken } from '../parse/token';
+import toInt from '../utils/to-int';
+import isArray from '../utils/is-array';
+import indexOf from '../utils/index-of';
+import hasOwnProp from '../utils/has-own-prop';
+import { createUTC } from '../create/utc';
+import getParsingFlags from '../create/parsing-flags';
+
+// FORMATTING
+
+addFormatToken('d', 0, 'do', 'day');
+
+addFormatToken('dd', 0, 0, function (format) {
+ return this.localeData().weekdaysMin(this, format);
+});
+
+addFormatToken('ddd', 0, 0, function (format) {
+ return this.localeData().weekdaysShort(this, format);
+});
+
+addFormatToken('dddd', 0, 0, function (format) {
+ return this.localeData().weekdays(this, format);
+});
+
+addFormatToken('e', 0, 0, 'weekday');
+addFormatToken('E', 0, 0, 'isoWeekday');
+
+// ALIASES
+
+addUnitAlias('day', 'd');
+addUnitAlias('weekday', 'e');
+addUnitAlias('isoWeekday', 'E');
+
+// PRIORITY
+addUnitPriority('day', 11);
+addUnitPriority('weekday', 11);
+addUnitPriority('isoWeekday', 11);
+
+// PARSING
+
+addRegexToken('d', match1to2);
+addRegexToken('e', match1to2);
+addRegexToken('E', match1to2);
+addRegexToken('dd', function (isStrict, locale) {
+ return locale.weekdaysMinRegex(isStrict);
+});
+addRegexToken('ddd', function (isStrict, locale) {
+ return locale.weekdaysShortRegex(isStrict);
+});
+addRegexToken('dddd', function (isStrict, locale) {
+ return locale.weekdaysRegex(isStrict);
+});
+
+addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
+ var weekday = config._locale.weekdaysParse(input, token, config._strict);
+ // if we didn't get a weekday name, mark the date as invalid
+ if (weekday != null) {
+ week.d = weekday;
+ } else {
+ getParsingFlags(config).invalidWeekday = input;
+ }
+});
+
+addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
+ week[token] = toInt(input);
+});
+
+// HELPERS
+
+function parseWeekday(input, locale) {
+ if (typeof input !== 'string') {
+ return input;
+ }
+
+ if (!isNaN(input)) {
+ return parseInt(input, 10);
+ }
+
+ input = locale.weekdaysParse(input);
+ if (typeof input === 'number') {
+ return input;
+ }
+
+ return null;
+}
+
+function parseIsoWeekday(input, locale) {
+ if (typeof input === 'string') {
+ return locale.weekdaysParse(input) % 7 || 7;
+ }
+ return isNaN(input) ? null : input;
+}
+
+// LOCALES
+function shiftWeekdays(ws, n) {
+ return ws.slice(n, 7).concat(ws.slice(0, n));
+}
+
+var defaultLocaleWeekdays =
+ 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ defaultWeekdaysRegex = matchWord,
+ defaultWeekdaysShortRegex = matchWord,
+ defaultWeekdaysMinRegex = matchWord;
+
+export {
+ defaultLocaleWeekdays,
+ defaultLocaleWeekdaysShort,
+ defaultLocaleWeekdaysMin,
+};
+
+export function localeWeekdays(m, format) {
+ var weekdays = isArray(this._weekdays)
+ ? this._weekdays
+ : this._weekdays[
+ m && m !== true && this._weekdays.isFormat.test(format)
+ ? 'format'
+ : 'standalone'
+ ];
+ return m === true
+ ? shiftWeekdays(weekdays, this._week.dow)
+ : m
+ ? weekdays[m.day()]
+ : weekdays;
+}
+
+export function localeWeekdaysShort(m) {
+ return m === true
+ ? shiftWeekdays(this._weekdaysShort, this._week.dow)
+ : m
+ ? this._weekdaysShort[m.day()]
+ : this._weekdaysShort;
+}
+
+export function localeWeekdaysMin(m) {
+ return m === true
+ ? shiftWeekdays(this._weekdaysMin, this._week.dow)
+ : m
+ ? this._weekdaysMin[m.day()]
+ : this._weekdaysMin;
+}
+
+function handleStrictParse(weekdayName, format, strict) {
+ var i,
+ ii,
+ mom,
+ llc = weekdayName.toLocaleLowerCase();
+ if (!this._weekdaysParse) {
+ this._weekdaysParse = [];
+ this._shortWeekdaysParse = [];
+ this._minWeekdaysParse = [];
+
+ for (i = 0; i < 7; ++i) {
+ mom = createUTC([2000, 1]).day(i);
+ this._minWeekdaysParse[i] = this.weekdaysMin(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._shortWeekdaysParse[i] = this.weekdaysShort(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
+ }
+ }
+
+ if (strict) {
+ if (format === 'dddd') {
+ ii = indexOf.call(this._weekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else if (format === 'ddd') {
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ } else {
+ if (format === 'dddd') {
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else if (format === 'ddd') {
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._minWeekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._weekdaysParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ }
+}
+
+export function localeWeekdaysParse(weekdayName, format, strict) {
+ var i, mom, regex;
+
+ if (this._weekdaysParseExact) {
+ return handleStrictParse.call(this, weekdayName, format, strict);
+ }
+
+ if (!this._weekdaysParse) {
+ this._weekdaysParse = [];
+ this._minWeekdaysParse = [];
+ this._shortWeekdaysParse = [];
+ this._fullWeekdaysParse = [];
+ }
+
+ for (i = 0; i < 7; i++) {
+ // make the regex if we don't have it already
+
+ mom = createUTC([2000, 1]).day(i);
+ if (strict && !this._fullWeekdaysParse[i]) {
+ this._fullWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ this._shortWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ this._minWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
+ 'i'
+ );
+ }
+ if (!this._weekdaysParse[i]) {
+ regex =
+ '^' +
+ this.weekdays(mom, '') +
+ '|^' +
+ this.weekdaysShort(mom, '') +
+ '|^' +
+ this.weekdaysMin(mom, '');
+ this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (
+ strict &&
+ format === 'dddd' &&
+ this._fullWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'ddd' &&
+ this._shortWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'dd' &&
+ this._minWeekdaysParse[i].test(weekdayName)
+ ) {
+ return i;
+ } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
+ return i;
+ }
+ }
+}
+
+// MOMENTS
+
+export function getSetDayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
+ if (input != null) {
+ input = parseWeekday(input, this.localeData());
+ return this.add(input - day, 'd');
+ } else {
+ return day;
+ }
+}
+
+export function getSetLocaleDayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
+ return input == null ? weekday : this.add(input - weekday, 'd');
+}
+
+export function getSetISODayOfWeek(input) {
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+
+ // behaves the same as moment#day except
+ // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
+ // as a setter, sunday should belong to the previous week.
+
+ if (input != null) {
+ var weekday = parseIsoWeekday(input, this.localeData());
+ return this.day(this.day() % 7 ? weekday : weekday - 7);
+ } else {
+ return this.day() || 7;
+ }
+}
+
+export function weekdaysRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysStrictRegex;
+ } else {
+ return this._weekdaysRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ this._weekdaysRegex = defaultWeekdaysRegex;
+ }
+ return this._weekdaysStrictRegex && isStrict
+ ? this._weekdaysStrictRegex
+ : this._weekdaysRegex;
+ }
+}
+
+export function weekdaysShortRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysShortStrictRegex;
+ } else {
+ return this._weekdaysShortRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysShortRegex')) {
+ this._weekdaysShortRegex = defaultWeekdaysShortRegex;
+ }
+ return this._weekdaysShortStrictRegex && isStrict
+ ? this._weekdaysShortStrictRegex
+ : this._weekdaysShortRegex;
+ }
+}
+
+export function weekdaysMinRegex(isStrict) {
+ if (this._weekdaysParseExact) {
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
+ computeWeekdaysParse.call(this);
+ }
+ if (isStrict) {
+ return this._weekdaysMinStrictRegex;
+ } else {
+ return this._weekdaysMinRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_weekdaysMinRegex')) {
+ this._weekdaysMinRegex = defaultWeekdaysMinRegex;
+ }
+ return this._weekdaysMinStrictRegex && isStrict
+ ? this._weekdaysMinStrictRegex
+ : this._weekdaysMinRegex;
+ }
+}
+
+function computeWeekdaysParse() {
+ function cmpLenRev(a, b) {
+ return b.length - a.length;
+ }
+
+ var minPieces = [],
+ shortPieces = [],
+ longPieces = [],
+ mixedPieces = [],
+ i,
+ mom,
+ minp,
+ shortp,
+ longp;
+ for (i = 0; i < 7; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, 1]).day(i);
+ minp = regexEscape(this.weekdaysMin(mom, ''));
+ shortp = regexEscape(this.weekdaysShort(mom, ''));
+ longp = regexEscape(this.weekdays(mom, ''));
+ minPieces.push(minp);
+ shortPieces.push(shortp);
+ longPieces.push(longp);
+ mixedPieces.push(minp);
+ mixedPieces.push(shortp);
+ mixedPieces.push(longp);
+ }
+ // Sorting makes sure if one weekday (or abbr) is a prefix of another it
+ // will match the longer piece.
+ minPieces.sort(cmpLenRev);
+ shortPieces.sort(cmpLenRev);
+ longPieces.sort(cmpLenRev);
+ mixedPieces.sort(cmpLenRev);
+
+ this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._weekdaysShortRegex = this._weekdaysRegex;
+ this._weekdaysMinRegex = this._weekdaysRegex;
+
+ this._weekdaysStrictRegex = new RegExp(
+ '^(' + longPieces.join('|') + ')',
+ 'i'
+ );
+ this._weekdaysShortStrictRegex = new RegExp(
+ '^(' + shortPieces.join('|') + ')',
+ 'i'
+ );
+ this._weekdaysMinStrictRegex = new RegExp(
+ '^(' + minPieces.join('|') + ')',
+ 'i'
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/day-of-year.js b/vendor/assets/javascripts/momentjs/src/lib/units/day-of-year.js
new file mode 100644
index 000000000..9aecb5bc1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/day-of-year.js
@@ -0,0 +1,37 @@
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import { addRegexToken, match3, match1to3 } from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import toInt from '../utils/to-int';
+
+// FORMATTING
+
+addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
+
+// ALIASES
+
+addUnitAlias('dayOfYear', 'DDD');
+
+// PRIORITY
+addUnitPriority('dayOfYear', 4);
+
+// PARSING
+
+addRegexToken('DDD', match1to3);
+addRegexToken('DDDD', match3);
+addParseToken(['DDD', 'DDDD'], function (input, array, config) {
+ config._dayOfYear = toInt(input);
+});
+
+// HELPERS
+
+// MOMENTS
+
+export function getSetDayOfYear(input) {
+ var dayOfYear =
+ Math.round(
+ (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
+ ) + 1;
+ return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/era.js b/vendor/assets/javascripts/momentjs/src/lib/units/era.js
new file mode 100644
index 000000000..1d2c9f2f6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/era.js
@@ -0,0 +1,287 @@
+import { addFormatToken } from '../format/format';
+import { addRegexToken, matchUnsigned, regexEscape } from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import { YEAR } from './constants';
+import { hooks as moment } from '../utils/hooks';
+import { getLocale } from '../locale/locales';
+import getParsingFlags from '../create/parsing-flags';
+import hasOwnProp from '../utils/has-own-prop';
+
+addFormatToken('N', 0, 0, 'eraAbbr');
+addFormatToken('NN', 0, 0, 'eraAbbr');
+addFormatToken('NNN', 0, 0, 'eraAbbr');
+addFormatToken('NNNN', 0, 0, 'eraName');
+addFormatToken('NNNNN', 0, 0, 'eraNarrow');
+
+addFormatToken('y', ['y', 1], 'yo', 'eraYear');
+addFormatToken('y', ['yy', 2], 0, 'eraYear');
+addFormatToken('y', ['yyy', 3], 0, 'eraYear');
+addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
+
+addRegexToken('N', matchEraAbbr);
+addRegexToken('NN', matchEraAbbr);
+addRegexToken('NNN', matchEraAbbr);
+addRegexToken('NNNN', matchEraName);
+addRegexToken('NNNNN', matchEraNarrow);
+
+addParseToken(
+ ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
+ function (input, array, config, token) {
+ var era = config._locale.erasParse(input, token, config._strict);
+ if (era) {
+ getParsingFlags(config).era = era;
+ } else {
+ getParsingFlags(config).invalidEra = input;
+ }
+ }
+);
+
+addRegexToken('y', matchUnsigned);
+addRegexToken('yy', matchUnsigned);
+addRegexToken('yyy', matchUnsigned);
+addRegexToken('yyyy', matchUnsigned);
+addRegexToken('yo', matchEraYearOrdinal);
+
+addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
+addParseToken(['yo'], function (input, array, config, token) {
+ var match;
+ if (config._locale._eraYearOrdinalRegex) {
+ match = input.match(config._locale._eraYearOrdinalRegex);
+ }
+
+ if (config._locale.eraYearOrdinalParse) {
+ array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
+ } else {
+ array[YEAR] = parseInt(input, 10);
+ }
+});
+
+export function localeEras(m, format) {
+ var i,
+ l,
+ date,
+ eras = this._eras || getLocale('en')._eras;
+ for (i = 0, l = eras.length; i < l; ++i) {
+ switch (typeof eras[i].since) {
+ case 'string':
+ // truncate time
+ date = moment(eras[i].since).startOf('day');
+ eras[i].since = date.valueOf();
+ break;
+ }
+
+ switch (typeof eras[i].until) {
+ case 'undefined':
+ eras[i].until = +Infinity;
+ break;
+ case 'string':
+ // truncate time
+ date = moment(eras[i].until).startOf('day').valueOf();
+ eras[i].until = date.valueOf();
+ break;
+ }
+ }
+ return eras;
+}
+
+export function localeErasParse(eraName, format, strict) {
+ var i,
+ l,
+ eras = this.eras(),
+ name,
+ abbr,
+ narrow;
+ eraName = eraName.toUpperCase();
+
+ for (i = 0, l = eras.length; i < l; ++i) {
+ name = eras[i].name.toUpperCase();
+ abbr = eras[i].abbr.toUpperCase();
+ narrow = eras[i].narrow.toUpperCase();
+
+ if (strict) {
+ switch (format) {
+ case 'N':
+ case 'NN':
+ case 'NNN':
+ if (abbr === eraName) {
+ return eras[i];
+ }
+ break;
+
+ case 'NNNN':
+ if (name === eraName) {
+ return eras[i];
+ }
+ break;
+
+ case 'NNNNN':
+ if (narrow === eraName) {
+ return eras[i];
+ }
+ break;
+ }
+ } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
+ return eras[i];
+ }
+ }
+}
+
+export function localeErasConvertYear(era, year) {
+ var dir = era.since <= era.until ? +1 : -1;
+ if (year === undefined) {
+ return moment(era.since).year();
+ } else {
+ return moment(era.since).year() + (year - era.offset) * dir;
+ }
+}
+
+export function getEraName() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].name;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].name;
+ }
+ }
+
+ return '';
+}
+
+export function getEraNarrow() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].narrow;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].narrow;
+ }
+ }
+
+ return '';
+}
+
+export function getEraAbbr() {
+ var i,
+ l,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (eras[i].since <= val && val <= eras[i].until) {
+ return eras[i].abbr;
+ }
+ if (eras[i].until <= val && val <= eras[i].since) {
+ return eras[i].abbr;
+ }
+ }
+
+ return '';
+}
+
+export function getEraYear() {
+ var i,
+ l,
+ dir,
+ val,
+ eras = this.localeData().eras();
+ for (i = 0, l = eras.length; i < l; ++i) {
+ dir = eras[i].since <= eras[i].until ? +1 : -1;
+
+ // truncate time
+ val = this.clone().startOf('day').valueOf();
+
+ if (
+ (eras[i].since <= val && val <= eras[i].until) ||
+ (eras[i].until <= val && val <= eras[i].since)
+ ) {
+ return (
+ (this.year() - moment(eras[i].since).year()) * dir +
+ eras[i].offset
+ );
+ }
+ }
+
+ return this.year();
+}
+
+export function erasNameRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasNameRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasNameRegex : this._erasRegex;
+}
+
+export function erasAbbrRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasAbbrRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasAbbrRegex : this._erasRegex;
+}
+
+export function erasNarrowRegex(isStrict) {
+ if (!hasOwnProp(this, '_erasNarrowRegex')) {
+ computeErasParse.call(this);
+ }
+ return isStrict ? this._erasNarrowRegex : this._erasRegex;
+}
+
+function matchEraAbbr(isStrict, locale) {
+ return locale.erasAbbrRegex(isStrict);
+}
+
+function matchEraName(isStrict, locale) {
+ return locale.erasNameRegex(isStrict);
+}
+
+function matchEraNarrow(isStrict, locale) {
+ return locale.erasNarrowRegex(isStrict);
+}
+
+function matchEraYearOrdinal(isStrict, locale) {
+ return locale._eraYearOrdinalRegex || matchUnsigned;
+}
+
+function computeErasParse() {
+ var abbrPieces = [],
+ namePieces = [],
+ narrowPieces = [],
+ mixedPieces = [],
+ i,
+ l,
+ eras = this.eras();
+
+ for (i = 0, l = eras.length; i < l; ++i) {
+ namePieces.push(regexEscape(eras[i].name));
+ abbrPieces.push(regexEscape(eras[i].abbr));
+ narrowPieces.push(regexEscape(eras[i].narrow));
+
+ mixedPieces.push(regexEscape(eras[i].name));
+ mixedPieces.push(regexEscape(eras[i].abbr));
+ mixedPieces.push(regexEscape(eras[i].narrow));
+ }
+
+ this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
+ this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
+ this._erasNarrowRegex = new RegExp(
+ '^(' + narrowPieces.join('|') + ')',
+ 'i'
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/hour.js b/vendor/assets/javascripts/momentjs/src/lib/units/hour.js
new file mode 100644
index 000000000..431121f53
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/hour.js
@@ -0,0 +1,159 @@
+import { makeGetSet } from '../moment/get-set';
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import {
+ addRegexToken,
+ match1to2,
+ match2,
+ match3to4,
+ match5to6,
+} from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import { HOUR, MINUTE, SECOND } from './constants';
+import toInt from '../utils/to-int';
+import zeroFill from '../utils/zero-fill';
+import getParsingFlags from '../create/parsing-flags';
+
+// FORMATTING
+
+function hFormat() {
+ return this.hours() % 12 || 12;
+}
+
+function kFormat() {
+ return this.hours() || 24;
+}
+
+addFormatToken('H', ['HH', 2], 0, 'hour');
+addFormatToken('h', ['hh', 2], 0, hFormat);
+addFormatToken('k', ['kk', 2], 0, kFormat);
+
+addFormatToken('hmm', 0, 0, function () {
+ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
+});
+
+addFormatToken('hmmss', 0, 0, function () {
+ return (
+ '' +
+ hFormat.apply(this) +
+ zeroFill(this.minutes(), 2) +
+ zeroFill(this.seconds(), 2)
+ );
+});
+
+addFormatToken('Hmm', 0, 0, function () {
+ return '' + this.hours() + zeroFill(this.minutes(), 2);
+});
+
+addFormatToken('Hmmss', 0, 0, function () {
+ return (
+ '' +
+ this.hours() +
+ zeroFill(this.minutes(), 2) +
+ zeroFill(this.seconds(), 2)
+ );
+});
+
+function meridiem(token, lowercase) {
+ addFormatToken(token, 0, 0, function () {
+ return this.localeData().meridiem(
+ this.hours(),
+ this.minutes(),
+ lowercase
+ );
+ });
+}
+
+meridiem('a', true);
+meridiem('A', false);
+
+// ALIASES
+
+addUnitAlias('hour', 'h');
+
+// PRIORITY
+addUnitPriority('hour', 13);
+
+// PARSING
+
+function matchMeridiem(isStrict, locale) {
+ return locale._meridiemParse;
+}
+
+addRegexToken('a', matchMeridiem);
+addRegexToken('A', matchMeridiem);
+addRegexToken('H', match1to2);
+addRegexToken('h', match1to2);
+addRegexToken('k', match1to2);
+addRegexToken('HH', match1to2, match2);
+addRegexToken('hh', match1to2, match2);
+addRegexToken('kk', match1to2, match2);
+
+addRegexToken('hmm', match3to4);
+addRegexToken('hmmss', match5to6);
+addRegexToken('Hmm', match3to4);
+addRegexToken('Hmmss', match5to6);
+
+addParseToken(['H', 'HH'], HOUR);
+addParseToken(['k', 'kk'], function (input, array, config) {
+ var kInput = toInt(input);
+ array[HOUR] = kInput === 24 ? 0 : kInput;
+});
+addParseToken(['a', 'A'], function (input, array, config) {
+ config._isPm = config._locale.isPM(input);
+ config._meridiem = input;
+});
+addParseToken(['h', 'hh'], function (input, array, config) {
+ array[HOUR] = toInt(input);
+ getParsingFlags(config).bigHour = true;
+});
+addParseToken('hmm', function (input, array, config) {
+ var pos = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos));
+ array[MINUTE] = toInt(input.substr(pos));
+ getParsingFlags(config).bigHour = true;
+});
+addParseToken('hmmss', function (input, array, config) {
+ var pos1 = input.length - 4,
+ pos2 = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos1));
+ array[MINUTE] = toInt(input.substr(pos1, 2));
+ array[SECOND] = toInt(input.substr(pos2));
+ getParsingFlags(config).bigHour = true;
+});
+addParseToken('Hmm', function (input, array, config) {
+ var pos = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos));
+ array[MINUTE] = toInt(input.substr(pos));
+});
+addParseToken('Hmmss', function (input, array, config) {
+ var pos1 = input.length - 4,
+ pos2 = input.length - 2;
+ array[HOUR] = toInt(input.substr(0, pos1));
+ array[MINUTE] = toInt(input.substr(pos1, 2));
+ array[SECOND] = toInt(input.substr(pos2));
+});
+
+// LOCALES
+
+export function localeIsPM(input) {
+ // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
+ // Using charAt should be more compatible.
+ return (input + '').toLowerCase().charAt(0) === 'p';
+}
+
+export var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
+ // Setting the hour should keep the time, because the user explicitly
+ // specified which hour they want. So trying to maintain the same hour (in
+ // a new timezone) makes sense. Adding/subtracting hours does not follow
+ // this rule.
+ getSetHour = makeGetSet('Hours', true);
+
+export function localeMeridiem(hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'pm' : 'PM';
+ } else {
+ return isLower ? 'am' : 'AM';
+ }
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/millisecond.js b/vendor/assets/javascripts/momentjs/src/lib/units/millisecond.js
new file mode 100644
index 000000000..b60e89a50
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/millisecond.js
@@ -0,0 +1,76 @@
+import { makeGetSet } from '../moment/get-set';
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import {
+ addRegexToken,
+ match1,
+ match2,
+ match3,
+ match1to3,
+ matchUnsigned,
+} from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import { MILLISECOND } from './constants';
+import toInt from '../utils/to-int';
+
+// FORMATTING
+
+addFormatToken('S', 0, 0, function () {
+ return ~~(this.millisecond() / 100);
+});
+
+addFormatToken(0, ['SS', 2], 0, function () {
+ return ~~(this.millisecond() / 10);
+});
+
+addFormatToken(0, ['SSS', 3], 0, 'millisecond');
+addFormatToken(0, ['SSSS', 4], 0, function () {
+ return this.millisecond() * 10;
+});
+addFormatToken(0, ['SSSSS', 5], 0, function () {
+ return this.millisecond() * 100;
+});
+addFormatToken(0, ['SSSSSS', 6], 0, function () {
+ return this.millisecond() * 1000;
+});
+addFormatToken(0, ['SSSSSSS', 7], 0, function () {
+ return this.millisecond() * 10000;
+});
+addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
+ return this.millisecond() * 100000;
+});
+addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
+ return this.millisecond() * 1000000;
+});
+
+// ALIASES
+
+addUnitAlias('millisecond', 'ms');
+
+// PRIORITY
+
+addUnitPriority('millisecond', 16);
+
+// PARSING
+
+addRegexToken('S', match1to3, match1);
+addRegexToken('SS', match1to3, match2);
+addRegexToken('SSS', match1to3, match3);
+
+var token, getSetMillisecond;
+for (token = 'SSSS'; token.length <= 9; token += 'S') {
+ addRegexToken(token, matchUnsigned);
+}
+
+function parseMs(input, array) {
+ array[MILLISECOND] = toInt(('0.' + input) * 1000);
+}
+
+for (token = 'S'; token.length <= 9; token += 'S') {
+ addParseToken(token, parseMs);
+}
+
+getSetMillisecond = makeGetSet('Milliseconds', false);
+
+export { getSetMillisecond };
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/minute.js b/vendor/assets/javascripts/momentjs/src/lib/units/minute.js
new file mode 100644
index 000000000..036d7380b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/minute.js
@@ -0,0 +1,29 @@
+import { makeGetSet } from '../moment/get-set';
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import { addRegexToken, match1to2, match2 } from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import { MINUTE } from './constants';
+
+// FORMATTING
+
+addFormatToken('m', ['mm', 2], 0, 'minute');
+
+// ALIASES
+
+addUnitAlias('minute', 'm');
+
+// PRIORITY
+
+addUnitPriority('minute', 14);
+
+// PARSING
+
+addRegexToken('m', match1to2);
+addRegexToken('mm', match1to2, match2);
+addParseToken(['m', 'mm'], MINUTE);
+
+// MOMENTS
+
+export var getSetMinute = makeGetSet('Minutes', false);
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/month.js b/vendor/assets/javascripts/momentjs/src/lib/units/month.js
new file mode 100644
index 000000000..a11d46b25
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/month.js
@@ -0,0 +1,349 @@
+import { get } from '../moment/get-set';
+import hasOwnProp from '../utils/has-own-prop';
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import {
+ addRegexToken,
+ match1to2,
+ match2,
+ matchWord,
+ regexEscape,
+} from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import { hooks } from '../utils/hooks';
+import { MONTH } from './constants';
+import toInt from '../utils/to-int';
+import isArray from '../utils/is-array';
+import isNumber from '../utils/is-number';
+import mod from '../utils/mod';
+import indexOf from '../utils/index-of';
+import { createUTC } from '../create/utc';
+import getParsingFlags from '../create/parsing-flags';
+import { isLeapYear } from '../utils/is-leap-year';
+
+export function daysInMonth(year, month) {
+ if (isNaN(year) || isNaN(month)) {
+ return NaN;
+ }
+ var modMonth = mod(month, 12);
+ year += (month - modMonth) / 12;
+ return modMonth === 1
+ ? isLeapYear(year)
+ ? 29
+ : 28
+ : 31 - ((modMonth % 7) % 2);
+}
+
+// FORMATTING
+
+addFormatToken('M', ['MM', 2], 'Mo', function () {
+ return this.month() + 1;
+});
+
+addFormatToken('MMM', 0, 0, function (format) {
+ return this.localeData().monthsShort(this, format);
+});
+
+addFormatToken('MMMM', 0, 0, function (format) {
+ return this.localeData().months(this, format);
+});
+
+// ALIASES
+
+addUnitAlias('month', 'M');
+
+// PRIORITY
+
+addUnitPriority('month', 8);
+
+// PARSING
+
+addRegexToken('M', match1to2);
+addRegexToken('MM', match1to2, match2);
+addRegexToken('MMM', function (isStrict, locale) {
+ return locale.monthsShortRegex(isStrict);
+});
+addRegexToken('MMMM', function (isStrict, locale) {
+ return locale.monthsRegex(isStrict);
+});
+
+addParseToken(['M', 'MM'], function (input, array) {
+ array[MONTH] = toInt(input) - 1;
+});
+
+addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
+ var month = config._locale.monthsParse(input, token, config._strict);
+ // if we didn't find a month name, mark the date as invalid.
+ if (month != null) {
+ array[MONTH] = month;
+ } else {
+ getParsingFlags(config).invalidMonth = input;
+ }
+});
+
+// LOCALES
+
+var defaultLocaleMonths =
+ 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ defaultLocaleMonthsShort =
+ 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
+ defaultMonthsShortRegex = matchWord,
+ defaultMonthsRegex = matchWord;
+
+export { defaultLocaleMonths, defaultLocaleMonthsShort };
+
+export function localeMonths(m, format) {
+ if (!m) {
+ return isArray(this._months)
+ ? this._months
+ : this._months['standalone'];
+ }
+ return isArray(this._months)
+ ? this._months[m.month()]
+ : this._months[
+ (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
+ ? 'format'
+ : 'standalone'
+ ][m.month()];
+}
+
+export function localeMonthsShort(m, format) {
+ if (!m) {
+ return isArray(this._monthsShort)
+ ? this._monthsShort
+ : this._monthsShort['standalone'];
+ }
+ return isArray(this._monthsShort)
+ ? this._monthsShort[m.month()]
+ : this._monthsShort[
+ MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
+ ][m.month()];
+}
+
+function handleStrictParse(monthName, format, strict) {
+ var i,
+ ii,
+ mom,
+ llc = monthName.toLocaleLowerCase();
+ if (!this._monthsParse) {
+ // this is not used
+ this._monthsParse = [];
+ this._longMonthsParse = [];
+ this._shortMonthsParse = [];
+ for (i = 0; i < 12; ++i) {
+ mom = createUTC([2000, i]);
+ this._shortMonthsParse[i] = this.monthsShort(
+ mom,
+ ''
+ ).toLocaleLowerCase();
+ this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
+ }
+ }
+
+ if (strict) {
+ if (format === 'MMM') {
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._longMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ } else {
+ if (format === 'MMM') {
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._longMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ } else {
+ ii = indexOf.call(this._longMonthsParse, llc);
+ if (ii !== -1) {
+ return ii;
+ }
+ ii = indexOf.call(this._shortMonthsParse, llc);
+ return ii !== -1 ? ii : null;
+ }
+ }
+}
+
+export function localeMonthsParse(monthName, format, strict) {
+ var i, mom, regex;
+
+ if (this._monthsParseExact) {
+ return handleStrictParse.call(this, monthName, format, strict);
+ }
+
+ if (!this._monthsParse) {
+ this._monthsParse = [];
+ this._longMonthsParse = [];
+ this._shortMonthsParse = [];
+ }
+
+ // TODO: add sorting
+ // Sorting makes sure if one month (or abbr) is a prefix of another
+ // see sorting in computeMonthsParse
+ for (i = 0; i < 12; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, i]);
+ if (strict && !this._longMonthsParse[i]) {
+ this._longMonthsParse[i] = new RegExp(
+ '^' + this.months(mom, '').replace('.', '') + '$',
+ 'i'
+ );
+ this._shortMonthsParse[i] = new RegExp(
+ '^' + this.monthsShort(mom, '').replace('.', '') + '$',
+ 'i'
+ );
+ }
+ if (!strict && !this._monthsParse[i]) {
+ regex =
+ '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
+ this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (
+ strict &&
+ format === 'MMMM' &&
+ this._longMonthsParse[i].test(monthName)
+ ) {
+ return i;
+ } else if (
+ strict &&
+ format === 'MMM' &&
+ this._shortMonthsParse[i].test(monthName)
+ ) {
+ return i;
+ } else if (!strict && this._monthsParse[i].test(monthName)) {
+ return i;
+ }
+ }
+}
+
+// MOMENTS
+
+export function setMonth(mom, value) {
+ var dayOfMonth;
+
+ if (!mom.isValid()) {
+ // No op
+ return mom;
+ }
+
+ if (typeof value === 'string') {
+ if (/^\d+$/.test(value)) {
+ value = toInt(value);
+ } else {
+ value = mom.localeData().monthsParse(value);
+ // TODO: Another silent failure?
+ if (!isNumber(value)) {
+ return mom;
+ }
+ }
+ }
+
+ dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
+ return mom;
+}
+
+export function getSetMonth(value) {
+ if (value != null) {
+ setMonth(this, value);
+ hooks.updateOffset(this, true);
+ return this;
+ } else {
+ return get(this, 'Month');
+ }
+}
+
+export function getDaysInMonth() {
+ return daysInMonth(this.year(), this.month());
+}
+
+export function monthsShortRegex(isStrict) {
+ if (this._monthsParseExact) {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ computeMonthsParse.call(this);
+ }
+ if (isStrict) {
+ return this._monthsShortStrictRegex;
+ } else {
+ return this._monthsShortRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_monthsShortRegex')) {
+ this._monthsShortRegex = defaultMonthsShortRegex;
+ }
+ return this._monthsShortStrictRegex && isStrict
+ ? this._monthsShortStrictRegex
+ : this._monthsShortRegex;
+ }
+}
+
+export function monthsRegex(isStrict) {
+ if (this._monthsParseExact) {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ computeMonthsParse.call(this);
+ }
+ if (isStrict) {
+ return this._monthsStrictRegex;
+ } else {
+ return this._monthsRegex;
+ }
+ } else {
+ if (!hasOwnProp(this, '_monthsRegex')) {
+ this._monthsRegex = defaultMonthsRegex;
+ }
+ return this._monthsStrictRegex && isStrict
+ ? this._monthsStrictRegex
+ : this._monthsRegex;
+ }
+}
+
+function computeMonthsParse() {
+ function cmpLenRev(a, b) {
+ return b.length - a.length;
+ }
+
+ var shortPieces = [],
+ longPieces = [],
+ mixedPieces = [],
+ i,
+ mom;
+ for (i = 0; i < 12; i++) {
+ // make the regex if we don't have it already
+ mom = createUTC([2000, i]);
+ shortPieces.push(this.monthsShort(mom, ''));
+ longPieces.push(this.months(mom, ''));
+ mixedPieces.push(this.months(mom, ''));
+ mixedPieces.push(this.monthsShort(mom, ''));
+ }
+ // Sorting makes sure if one month (or abbr) is a prefix of another it
+ // will match the longer piece.
+ shortPieces.sort(cmpLenRev);
+ longPieces.sort(cmpLenRev);
+ mixedPieces.sort(cmpLenRev);
+ for (i = 0; i < 12; i++) {
+ shortPieces[i] = regexEscape(shortPieces[i]);
+ longPieces[i] = regexEscape(longPieces[i]);
+ }
+ for (i = 0; i < 24; i++) {
+ mixedPieces[i] = regexEscape(mixedPieces[i]);
+ }
+
+ this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+ this._monthsShortRegex = this._monthsRegex;
+ this._monthsStrictRegex = new RegExp(
+ '^(' + longPieces.join('|') + ')',
+ 'i'
+ );
+ this._monthsShortStrictRegex = new RegExp(
+ '^(' + shortPieces.join('|') + ')',
+ 'i'
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/offset.js b/vendor/assets/javascripts/momentjs/src/lib/units/offset.js
new file mode 100644
index 000000000..668ebb9a7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/offset.js
@@ -0,0 +1,249 @@
+import zeroFill from '../utils/zero-fill';
+import { createDuration } from '../duration/create';
+import { addSubtract } from '../moment/add-subtract';
+import { isMoment, copyConfig } from '../moment/constructor';
+import { addFormatToken } from '../format/format';
+import { addRegexToken, matchOffset, matchShortOffset } from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import { createLocal } from '../create/local';
+import { prepareConfig } from '../create/from-anything';
+import { createUTC } from '../create/utc';
+import isDate from '../utils/is-date';
+import toInt from '../utils/to-int';
+import isUndefined from '../utils/is-undefined';
+import compareArrays from '../utils/compare-arrays';
+import { hooks } from '../utils/hooks';
+
+// FORMATTING
+
+function offset(token, separator) {
+ addFormatToken(token, 0, 0, function () {
+ var offset = this.utcOffset(),
+ sign = '+';
+ if (offset < 0) {
+ offset = -offset;
+ sign = '-';
+ }
+ return (
+ sign +
+ zeroFill(~~(offset / 60), 2) +
+ separator +
+ zeroFill(~~offset % 60, 2)
+ );
+ });
+}
+
+offset('Z', ':');
+offset('ZZ', '');
+
+// PARSING
+
+addRegexToken('Z', matchShortOffset);
+addRegexToken('ZZ', matchShortOffset);
+addParseToken(['Z', 'ZZ'], function (input, array, config) {
+ config._useUTC = true;
+ config._tzm = offsetFromString(matchShortOffset, input);
+});
+
+// HELPERS
+
+// timezone chunker
+// '+10:00' > ['10', '00']
+// '-1530' > ['-15', '30']
+var chunkOffset = /([\+\-]|\d\d)/gi;
+
+function offsetFromString(matcher, string) {
+ var matches = (string || '').match(matcher),
+ chunk,
+ parts,
+ minutes;
+
+ if (matches === null) {
+ return null;
+ }
+
+ chunk = matches[matches.length - 1] || [];
+ parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
+ minutes = +(parts[1] * 60) + toInt(parts[2]);
+
+ return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
+}
+
+// Return a moment from input, that is local/utc/zone equivalent to model.
+export function cloneWithOffset(input, model) {
+ var res, diff;
+ if (model._isUTC) {
+ res = model.clone();
+ diff =
+ (isMoment(input) || isDate(input)
+ ? input.valueOf()
+ : createLocal(input).valueOf()) - res.valueOf();
+ // Use low-level api, because this fn is low-level api.
+ res._d.setTime(res._d.valueOf() + diff);
+ hooks.updateOffset(res, false);
+ return res;
+ } else {
+ return createLocal(input).local();
+ }
+}
+
+function getDateOffset(m) {
+ // On Firefox.24 Date#getTimezoneOffset returns a floating point.
+ // https://github.com/moment/moment/pull/1871
+ return -Math.round(m._d.getTimezoneOffset());
+}
+
+// HOOKS
+
+// This function will be called whenever a moment is mutated.
+// It is intended to keep the offset in sync with the timezone.
+hooks.updateOffset = function () {};
+
+// MOMENTS
+
+// keepLocalTime = true means only change the timezone, without
+// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
+// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
+// +0200, so we adjust the time as needed, to be valid.
+//
+// Keeping the time actually adds/subtracts (one hour)
+// from the actual represented time. That is why we call updateOffset
+// a second time. In case it wants us to change the offset again
+// _changeInProgress == true case, then we have to adjust, because
+// there is no such time in the given timezone.
+export function getSetOffset(input, keepLocalTime, keepMinutes) {
+ var offset = this._offset || 0,
+ localAdjust;
+ if (!this.isValid()) {
+ return input != null ? this : NaN;
+ }
+ if (input != null) {
+ if (typeof input === 'string') {
+ input = offsetFromString(matchShortOffset, input);
+ if (input === null) {
+ return this;
+ }
+ } else if (Math.abs(input) < 16 && !keepMinutes) {
+ input = input * 60;
+ }
+ if (!this._isUTC && keepLocalTime) {
+ localAdjust = getDateOffset(this);
+ }
+ this._offset = input;
+ this._isUTC = true;
+ if (localAdjust != null) {
+ this.add(localAdjust, 'm');
+ }
+ if (offset !== input) {
+ if (!keepLocalTime || this._changeInProgress) {
+ addSubtract(
+ this,
+ createDuration(input - offset, 'm'),
+ 1,
+ false
+ );
+ } else if (!this._changeInProgress) {
+ this._changeInProgress = true;
+ hooks.updateOffset(this, true);
+ this._changeInProgress = null;
+ }
+ }
+ return this;
+ } else {
+ return this._isUTC ? offset : getDateOffset(this);
+ }
+}
+
+export function getSetZone(input, keepLocalTime) {
+ if (input != null) {
+ if (typeof input !== 'string') {
+ input = -input;
+ }
+
+ this.utcOffset(input, keepLocalTime);
+
+ return this;
+ } else {
+ return -this.utcOffset();
+ }
+}
+
+export function setOffsetToUTC(keepLocalTime) {
+ return this.utcOffset(0, keepLocalTime);
+}
+
+export function setOffsetToLocal(keepLocalTime) {
+ if (this._isUTC) {
+ this.utcOffset(0, keepLocalTime);
+ this._isUTC = false;
+
+ if (keepLocalTime) {
+ this.subtract(getDateOffset(this), 'm');
+ }
+ }
+ return this;
+}
+
+export function setOffsetToParsedOffset() {
+ if (this._tzm != null) {
+ this.utcOffset(this._tzm, false, true);
+ } else if (typeof this._i === 'string') {
+ var tZone = offsetFromString(matchOffset, this._i);
+ if (tZone != null) {
+ this.utcOffset(tZone);
+ } else {
+ this.utcOffset(0, true);
+ }
+ }
+ return this;
+}
+
+export function hasAlignedHourOffset(input) {
+ if (!this.isValid()) {
+ return false;
+ }
+ input = input ? createLocal(input).utcOffset() : 0;
+
+ return (this.utcOffset() - input) % 60 === 0;
+}
+
+export function isDaylightSavingTime() {
+ return (
+ this.utcOffset() > this.clone().month(0).utcOffset() ||
+ this.utcOffset() > this.clone().month(5).utcOffset()
+ );
+}
+
+export function isDaylightSavingTimeShifted() {
+ if (!isUndefined(this._isDSTShifted)) {
+ return this._isDSTShifted;
+ }
+
+ var c = {},
+ other;
+
+ copyConfig(c, this);
+ c = prepareConfig(c);
+
+ if (c._a) {
+ other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
+ this._isDSTShifted =
+ this.isValid() && compareArrays(c._a, other.toArray()) > 0;
+ } else {
+ this._isDSTShifted = false;
+ }
+
+ return this._isDSTShifted;
+}
+
+export function isLocal() {
+ return this.isValid() ? !this._isUTC : false;
+}
+
+export function isUtcOffset() {
+ return this.isValid() ? this._isUTC : false;
+}
+
+export function isUtc() {
+ return this.isValid() ? this._isUTC && this._offset === 0 : false;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/priorities.js b/vendor/assets/javascripts/momentjs/src/lib/units/priorities.js
new file mode 100644
index 000000000..b0b732a42
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/priorities.js
@@ -0,0 +1,21 @@
+import hasOwnProp from '../utils/has-own-prop';
+
+var priorities = {};
+
+export function addUnitPriority(unit, priority) {
+ priorities[unit] = priority;
+}
+
+export function getPrioritizedUnits(unitsObj) {
+ var units = [],
+ u;
+ for (u in unitsObj) {
+ if (hasOwnProp(unitsObj, u)) {
+ units.push({ unit: u, priority: priorities[u] });
+ }
+ }
+ units.sort(function (a, b) {
+ return a.priority - b.priority;
+ });
+ return units;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/quarter.js b/vendor/assets/javascripts/momentjs/src/lib/units/quarter.js
new file mode 100644
index 000000000..907b57996
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/quarter.js
@@ -0,0 +1,34 @@
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import { addRegexToken, match1 } from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import { MONTH } from './constants';
+import toInt from '../utils/to-int';
+
+// FORMATTING
+
+addFormatToken('Q', 0, 'Qo', 'quarter');
+
+// ALIASES
+
+addUnitAlias('quarter', 'Q');
+
+// PRIORITY
+
+addUnitPriority('quarter', 7);
+
+// PARSING
+
+addRegexToken('Q', match1);
+addParseToken('Q', function (input, array) {
+ array[MONTH] = (toInt(input) - 1) * 3;
+});
+
+// MOMENTS
+
+export function getSetQuarter(input) {
+ return input == null
+ ? Math.ceil((this.month() + 1) / 3)
+ : this.month((input - 1) * 3 + (this.month() % 3));
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/second.js b/vendor/assets/javascripts/momentjs/src/lib/units/second.js
new file mode 100644
index 000000000..eedbfc927
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/second.js
@@ -0,0 +1,29 @@
+import { makeGetSet } from '../moment/get-set';
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import { addRegexToken, match1to2, match2 } from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import { SECOND } from './constants';
+
+// FORMATTING
+
+addFormatToken('s', ['ss', 2], 0, 'second');
+
+// ALIASES
+
+addUnitAlias('second', 's');
+
+// PRIORITY
+
+addUnitPriority('second', 15);
+
+// PARSING
+
+addRegexToken('s', match1to2);
+addRegexToken('ss', match1to2, match2);
+addParseToken(['s', 'ss'], SECOND);
+
+// MOMENTS
+
+export var getSetSecond = makeGetSet('Seconds', false);
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/timestamp.js b/vendor/assets/javascripts/momentjs/src/lib/units/timestamp.js
new file mode 100644
index 000000000..50c6b87fe
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/timestamp.js
@@ -0,0 +1,20 @@
+import { addFormatToken } from '../format/format';
+import { addRegexToken, matchTimestamp, matchSigned } from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import toInt from '../utils/to-int';
+
+// FORMATTING
+
+addFormatToken('X', 0, 0, 'unix');
+addFormatToken('x', 0, 0, 'valueOf');
+
+// PARSING
+
+addRegexToken('x', matchSigned);
+addRegexToken('X', matchTimestamp);
+addParseToken('X', function (input, array, config) {
+ config._d = new Date(parseFloat(input) * 1000);
+});
+addParseToken('x', function (input, array, config) {
+ config._d = new Date(toInt(input));
+});
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/timezone.js b/vendor/assets/javascripts/momentjs/src/lib/units/timezone.js
new file mode 100644
index 000000000..3831fd3bd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/timezone.js
@@ -0,0 +1,16 @@
+import { addFormatToken } from '../format/format';
+
+// FORMATTING
+
+addFormatToken('z', 0, 0, 'zoneAbbr');
+addFormatToken('zz', 0, 0, 'zoneName');
+
+// MOMENTS
+
+export function getZoneAbbr() {
+ return this._isUTC ? 'UTC' : '';
+}
+
+export function getZoneName() {
+ return this._isUTC ? 'Coordinated Universal Time' : '';
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/units.js b/vendor/assets/javascripts/momentjs/src/lib/units/units.js
new file mode 100644
index 000000000..6f45f1c04
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/units.js
@@ -0,0 +1,20 @@
+// Side effect imports
+import './day-of-month';
+import './day-of-week';
+import './day-of-year';
+import './hour';
+import './millisecond';
+import './minute';
+import './month';
+import './offset';
+import './quarter';
+import './second';
+import './timestamp';
+import './timezone';
+import './week-year';
+import './week';
+import './year';
+
+import { normalizeUnits } from './aliases';
+
+export { normalizeUnits };
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/week-calendar-utils.js b/vendor/assets/javascripts/momentjs/src/lib/units/week-calendar-utils.js
new file mode 100644
index 000000000..be67184ca
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/week-calendar-utils.js
@@ -0,0 +1,66 @@
+import { daysInYear } from './year';
+import { createUTCDate } from '../create/date-from-array';
+
+// start-of-first-week - start-of-year
+function firstWeekOffset(year, dow, doy) {
+ var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
+ fwd = 7 + dow - doy,
+ // first-week day local weekday -- which local weekday is fwd
+ fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
+
+ return -fwdlw + fwd - 1;
+}
+
+// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
+export function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
+ var localWeekday = (7 + weekday - dow) % 7,
+ weekOffset = firstWeekOffset(year, dow, doy),
+ dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
+ resYear,
+ resDayOfYear;
+
+ if (dayOfYear <= 0) {
+ resYear = year - 1;
+ resDayOfYear = daysInYear(resYear) + dayOfYear;
+ } else if (dayOfYear > daysInYear(year)) {
+ resYear = year + 1;
+ resDayOfYear = dayOfYear - daysInYear(year);
+ } else {
+ resYear = year;
+ resDayOfYear = dayOfYear;
+ }
+
+ return {
+ year: resYear,
+ dayOfYear: resDayOfYear,
+ };
+}
+
+export function weekOfYear(mom, dow, doy) {
+ var weekOffset = firstWeekOffset(mom.year(), dow, doy),
+ week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
+ resWeek,
+ resYear;
+
+ if (week < 1) {
+ resYear = mom.year() - 1;
+ resWeek = week + weeksInYear(resYear, dow, doy);
+ } else if (week > weeksInYear(mom.year(), dow, doy)) {
+ resWeek = week - weeksInYear(mom.year(), dow, doy);
+ resYear = mom.year() + 1;
+ } else {
+ resYear = mom.year();
+ resWeek = week;
+ }
+
+ return {
+ week: resWeek,
+ year: resYear,
+ };
+}
+
+export function weeksInYear(year, dow, doy) {
+ var weekOffset = firstWeekOffset(year, dow, doy),
+ weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
+ return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/week-year.js b/vendor/assets/javascripts/momentjs/src/lib/units/week-year.js
new file mode 100644
index 000000000..960c345c4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/week-year.js
@@ -0,0 +1,138 @@
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import {
+ addRegexToken,
+ match1to2,
+ match1to4,
+ match1to6,
+ match2,
+ match4,
+ match6,
+ matchSigned,
+} from '../parse/regex';
+import { addWeekParseToken } from '../parse/token';
+import {
+ weekOfYear,
+ weeksInYear,
+ dayOfYearFromWeeks,
+} from './week-calendar-utils';
+import toInt from '../utils/to-int';
+import { hooks } from '../utils/hooks';
+import { createUTCDate } from '../create/date-from-array';
+
+// FORMATTING
+
+addFormatToken(0, ['gg', 2], 0, function () {
+ return this.weekYear() % 100;
+});
+
+addFormatToken(0, ['GG', 2], 0, function () {
+ return this.isoWeekYear() % 100;
+});
+
+function addWeekYearFormatToken(token, getter) {
+ addFormatToken(0, [token, token.length], 0, getter);
+}
+
+addWeekYearFormatToken('gggg', 'weekYear');
+addWeekYearFormatToken('ggggg', 'weekYear');
+addWeekYearFormatToken('GGGG', 'isoWeekYear');
+addWeekYearFormatToken('GGGGG', 'isoWeekYear');
+
+// ALIASES
+
+addUnitAlias('weekYear', 'gg');
+addUnitAlias('isoWeekYear', 'GG');
+
+// PRIORITY
+
+addUnitPriority('weekYear', 1);
+addUnitPriority('isoWeekYear', 1);
+
+// PARSING
+
+addRegexToken('G', matchSigned);
+addRegexToken('g', matchSigned);
+addRegexToken('GG', match1to2, match2);
+addRegexToken('gg', match1to2, match2);
+addRegexToken('GGGG', match1to4, match4);
+addRegexToken('gggg', match1to4, match4);
+addRegexToken('GGGGG', match1to6, match6);
+addRegexToken('ggggg', match1to6, match6);
+
+addWeekParseToken(
+ ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
+ function (input, week, config, token) {
+ week[token.substr(0, 2)] = toInt(input);
+ }
+);
+
+addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
+ week[token] = hooks.parseTwoDigitYear(input);
+});
+
+// MOMENTS
+
+export function getSetWeekYear(input) {
+ return getSetWeekYearHelper.call(
+ this,
+ input,
+ this.week(),
+ this.weekday(),
+ this.localeData()._week.dow,
+ this.localeData()._week.doy
+ );
+}
+
+export function getSetISOWeekYear(input) {
+ return getSetWeekYearHelper.call(
+ this,
+ input,
+ this.isoWeek(),
+ this.isoWeekday(),
+ 1,
+ 4
+ );
+}
+
+export function getISOWeeksInYear() {
+ return weeksInYear(this.year(), 1, 4);
+}
+
+export function getISOWeeksInISOWeekYear() {
+ return weeksInYear(this.isoWeekYear(), 1, 4);
+}
+
+export function getWeeksInYear() {
+ var weekInfo = this.localeData()._week;
+ return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
+}
+
+export function getWeeksInWeekYear() {
+ var weekInfo = this.localeData()._week;
+ return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
+}
+
+function getSetWeekYearHelper(input, week, weekday, dow, doy) {
+ var weeksTarget;
+ if (input == null) {
+ return weekOfYear(this, dow, doy).year;
+ } else {
+ weeksTarget = weeksInYear(input, dow, doy);
+ if (week > weeksTarget) {
+ week = weeksTarget;
+ }
+ return setWeekAll.call(this, input, week, weekday, dow, doy);
+ }
+}
+
+function setWeekAll(weekYear, week, weekday, dow, doy) {
+ var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
+ date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
+
+ this.year(date.getUTCFullYear());
+ this.month(date.getUTCMonth());
+ this.date(date.getUTCDate());
+ return this;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/week.js b/vendor/assets/javascripts/momentjs/src/lib/units/week.js
new file mode 100644
index 000000000..e6b7b55d3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/week.js
@@ -0,0 +1,69 @@
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import { addRegexToken, match1to2, match2 } from '../parse/regex';
+import { addWeekParseToken } from '../parse/token';
+import toInt from '../utils/to-int';
+import { weekOfYear } from './week-calendar-utils';
+
+// FORMATTING
+
+addFormatToken('w', ['ww', 2], 'wo', 'week');
+addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
+
+// ALIASES
+
+addUnitAlias('week', 'w');
+addUnitAlias('isoWeek', 'W');
+
+// PRIORITIES
+
+addUnitPriority('week', 5);
+addUnitPriority('isoWeek', 5);
+
+// PARSING
+
+addRegexToken('w', match1to2);
+addRegexToken('ww', match1to2, match2);
+addRegexToken('W', match1to2);
+addRegexToken('WW', match1to2, match2);
+
+addWeekParseToken(
+ ['w', 'ww', 'W', 'WW'],
+ function (input, week, config, token) {
+ week[token.substr(0, 1)] = toInt(input);
+ }
+);
+
+// HELPERS
+
+// LOCALES
+
+export function localeWeek(mom) {
+ return weekOfYear(mom, this._week.dow, this._week.doy).week;
+}
+
+export var defaultLocaleWeek = {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+};
+
+export function localeFirstDayOfWeek() {
+ return this._week.dow;
+}
+
+export function localeFirstDayOfYear() {
+ return this._week.doy;
+}
+
+// MOMENTS
+
+export function getSetWeek(input) {
+ var week = this.localeData().week(this);
+ return input == null ? week : this.add((input - week) * 7, 'd');
+}
+
+export function getSetISOWeek(input) {
+ var week = weekOfYear(this, 1, 4).week;
+ return input == null ? week : this.add((input - week) * 7, 'd');
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/units/year.js b/vendor/assets/javascripts/momentjs/src/lib/units/year.js
new file mode 100644
index 000000000..027d6bf9b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/units/year.js
@@ -0,0 +1,85 @@
+import { makeGetSet } from '../moment/get-set';
+import { addFormatToken } from '../format/format';
+import { addUnitAlias } from './aliases';
+import { addUnitPriority } from './priorities';
+import {
+ addRegexToken,
+ match1to2,
+ match1to4,
+ match1to6,
+ match2,
+ match4,
+ match6,
+ matchSigned,
+} from '../parse/regex';
+import { addParseToken } from '../parse/token';
+import { isLeapYear } from '../utils/is-leap-year';
+import { hooks } from '../utils/hooks';
+import { YEAR } from './constants';
+import toInt from '../utils/to-int';
+import zeroFill from '../utils/zero-fill';
+
+// FORMATTING
+
+addFormatToken('Y', 0, 0, function () {
+ var y = this.year();
+ return y <= 9999 ? zeroFill(y, 4) : '+' + y;
+});
+
+addFormatToken(0, ['YY', 2], 0, function () {
+ return this.year() % 100;
+});
+
+addFormatToken(0, ['YYYY', 4], 0, 'year');
+addFormatToken(0, ['YYYYY', 5], 0, 'year');
+addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
+
+// ALIASES
+
+addUnitAlias('year', 'y');
+
+// PRIORITIES
+
+addUnitPriority('year', 1);
+
+// PARSING
+
+addRegexToken('Y', matchSigned);
+addRegexToken('YY', match1to2, match2);
+addRegexToken('YYYY', match1to4, match4);
+addRegexToken('YYYYY', match1to6, match6);
+addRegexToken('YYYYYY', match1to6, match6);
+
+addParseToken(['YYYYY', 'YYYYYY'], YEAR);
+addParseToken('YYYY', function (input, array) {
+ array[YEAR] =
+ input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
+});
+addParseToken('YY', function (input, array) {
+ array[YEAR] = hooks.parseTwoDigitYear(input);
+});
+addParseToken('Y', function (input, array) {
+ array[YEAR] = parseInt(input, 10);
+});
+
+// HELPERS
+
+export function daysInYear(year) {
+ return isLeapYear(year) ? 366 : 365;
+}
+
+export { isLeapYear };
+
+// HOOKS
+
+hooks.parseTwoDigitYear = function (input) {
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
+};
+
+// MOMENTS
+
+export var getSetYear = makeGetSet('FullYear', true);
+
+export function getIsLeapYear() {
+ return isLeapYear(this.year());
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/abs-ceil.js b/vendor/assets/javascripts/momentjs/src/lib/utils/abs-ceil.js
new file mode 100644
index 000000000..e4c7bc237
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/abs-ceil.js
@@ -0,0 +1,7 @@
+export default function absCeil(number) {
+ if (number < 0) {
+ return Math.floor(number);
+ } else {
+ return Math.ceil(number);
+ }
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/abs-floor.js b/vendor/assets/javascripts/momentjs/src/lib/utils/abs-floor.js
new file mode 100644
index 000000000..7c2ed2409
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/abs-floor.js
@@ -0,0 +1,8 @@
+export default function absFloor(number) {
+ if (number < 0) {
+ // -0 -> 0
+ return Math.ceil(number) || 0;
+ } else {
+ return Math.floor(number);
+ }
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/abs-round.js b/vendor/assets/javascripts/momentjs/src/lib/utils/abs-round.js
new file mode 100644
index 000000000..175fea2b0
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/abs-round.js
@@ -0,0 +1,7 @@
+export default function absRound(number) {
+ if (number < 0) {
+ return Math.round(-1 * number) * -1;
+ } else {
+ return Math.round(number);
+ }
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/compare-arrays.js b/vendor/assets/javascripts/momentjs/src/lib/utils/compare-arrays.js
new file mode 100644
index 000000000..3e37b53c3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/compare-arrays.js
@@ -0,0 +1,18 @@
+import toInt from './to-int';
+
+// compare two arrays, return the number of differences
+export default function compareArrays(array1, array2, dontConvert) {
+ var len = Math.min(array1.length, array2.length),
+ lengthDiff = Math.abs(array1.length - array2.length),
+ diffs = 0,
+ i;
+ for (i = 0; i < len; i++) {
+ if (
+ (dontConvert && array1[i] !== array2[i]) ||
+ (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
+ ) {
+ diffs++;
+ }
+ }
+ return diffs + lengthDiff;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/defaults.js b/vendor/assets/javascripts/momentjs/src/lib/utils/defaults.js
new file mode 100644
index 000000000..45c5e8794
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/defaults.js
@@ -0,0 +1,10 @@
+// Pick the first defined of two or three arguments.
+export default function defaults(a, b, c) {
+ if (a != null) {
+ return a;
+ }
+ if (b != null) {
+ return b;
+ }
+ return c;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/deprecate.js b/vendor/assets/javascripts/momentjs/src/lib/utils/deprecate.js
new file mode 100644
index 000000000..6f28236a9
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/deprecate.js
@@ -0,0 +1,69 @@
+import extend from './extend';
+import { hooks } from './hooks';
+import hasOwnProp from './has-own-prop';
+
+function warn(msg) {
+ if (
+ hooks.suppressDeprecationWarnings === false &&
+ typeof console !== 'undefined' &&
+ console.warn
+ ) {
+ console.warn('Deprecation warning: ' + msg);
+ }
+}
+
+export function deprecate(msg, fn) {
+ var firstTime = true;
+
+ return extend(function () {
+ if (hooks.deprecationHandler != null) {
+ hooks.deprecationHandler(null, msg);
+ }
+ if (firstTime) {
+ var args = [],
+ arg,
+ i,
+ key,
+ argLen = arguments.length;
+ for (i = 0; i < argLen; i++) {
+ arg = '';
+ if (typeof arguments[i] === 'object') {
+ arg += '\n[' + i + '] ';
+ for (key in arguments[0]) {
+ if (hasOwnProp(arguments[0], key)) {
+ arg += key + ': ' + arguments[0][key] + ', ';
+ }
+ }
+ arg = arg.slice(0, -2); // Remove trailing comma and space
+ } else {
+ arg = arguments[i];
+ }
+ args.push(arg);
+ }
+ warn(
+ msg +
+ '\nArguments: ' +
+ Array.prototype.slice.call(args).join('') +
+ '\n' +
+ new Error().stack
+ );
+ firstTime = false;
+ }
+ return fn.apply(this, arguments);
+ }, fn);
+}
+
+var deprecations = {};
+
+export function deprecateSimple(name, msg) {
+ if (hooks.deprecationHandler != null) {
+ hooks.deprecationHandler(name, msg);
+ }
+ if (!deprecations[name]) {
+ warn(msg);
+ deprecations[name] = true;
+ }
+}
+
+hooks.suppressDeprecationWarnings = false;
+hooks.deprecationHandler = null;
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/extend.js b/vendor/assets/javascripts/momentjs/src/lib/utils/extend.js
new file mode 100644
index 000000000..ba74a0bf1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/extend.js
@@ -0,0 +1,19 @@
+import hasOwnProp from './has-own-prop';
+
+export default function extend(a, b) {
+ for (var i in b) {
+ if (hasOwnProp(b, i)) {
+ a[i] = b[i];
+ }
+ }
+
+ if (hasOwnProp(b, 'toString')) {
+ a.toString = b.toString;
+ }
+
+ if (hasOwnProp(b, 'valueOf')) {
+ a.valueOf = b.valueOf;
+ }
+
+ return a;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/has-own-prop.js b/vendor/assets/javascripts/momentjs/src/lib/utils/has-own-prop.js
new file mode 100644
index 000000000..4d2403ccb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/has-own-prop.js
@@ -0,0 +1,3 @@
+export default function hasOwnProp(a, b) {
+ return Object.prototype.hasOwnProperty.call(a, b);
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/hooks.js b/vendor/assets/javascripts/momentjs/src/lib/utils/hooks.js
new file mode 100644
index 000000000..2e86836b1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/hooks.js
@@ -0,0 +1,13 @@
+export { hooks, setHookCallback };
+
+var hookCallback;
+
+function hooks() {
+ return hookCallback.apply(null, arguments);
+}
+
+// This is done to register the method called with moment()
+// without creating circular dependencies.
+function setHookCallback(callback) {
+ hookCallback = callback;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/index-of.js b/vendor/assets/javascripts/momentjs/src/lib/utils/index-of.js
new file mode 100644
index 000000000..92298cff3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/index-of.js
@@ -0,0 +1,18 @@
+var indexOf;
+
+if (Array.prototype.indexOf) {
+ indexOf = Array.prototype.indexOf;
+} else {
+ indexOf = function (o) {
+ // I know
+ var i;
+ for (i = 0; i < this.length; ++i) {
+ if (this[i] === o) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+
+export { indexOf as default };
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/is-array.js b/vendor/assets/javascripts/momentjs/src/lib/utils/is-array.js
new file mode 100644
index 000000000..d57c8757c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/is-array.js
@@ -0,0 +1,6 @@
+export default function isArray(input) {
+ return (
+ input instanceof Array ||
+ Object.prototype.toString.call(input) === '[object Array]'
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/is-calendar-spec.js b/vendor/assets/javascripts/momentjs/src/lib/utils/is-calendar-spec.js
new file mode 100644
index 000000000..e8b6d382b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/is-calendar-spec.js
@@ -0,0 +1,25 @@
+import isObjectEmpty from './is-object-empty';
+import hasOwnProp from './has-own-prop';
+import isObject from './is-object';
+
+export default function isCalendarSpec(input) {
+ var objectTest = isObject(input) && !isObjectEmpty(input),
+ propertyTest = false,
+ properties = [
+ 'sameDay',
+ 'nextDay',
+ 'lastDay',
+ 'nextWeek',
+ 'lastWeek',
+ 'sameElse',
+ ],
+ i,
+ property;
+
+ for (i = 0; i < properties.length; i += 1) {
+ property = properties[i];
+ propertyTest = propertyTest || hasOwnProp(input, property);
+ }
+
+ return objectTest && propertyTest;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/is-date.js b/vendor/assets/javascripts/momentjs/src/lib/utils/is-date.js
new file mode 100644
index 000000000..378924b19
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/is-date.js
@@ -0,0 +1,6 @@
+export default function isDate(input) {
+ return (
+ input instanceof Date ||
+ Object.prototype.toString.call(input) === '[object Date]'
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/is-function.js b/vendor/assets/javascripts/momentjs/src/lib/utils/is-function.js
new file mode 100644
index 000000000..45496864a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/is-function.js
@@ -0,0 +1,6 @@
+export default function isFunction(input) {
+ return (
+ (typeof Function !== 'undefined' && input instanceof Function) ||
+ Object.prototype.toString.call(input) === '[object Function]'
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/is-leap-year.js b/vendor/assets/javascripts/momentjs/src/lib/utils/is-leap-year.js
new file mode 100644
index 000000000..e399d9360
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/is-leap-year.js
@@ -0,0 +1,3 @@
+export function isLeapYear(year) {
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/is-moment-input.js b/vendor/assets/javascripts/momentjs/src/lib/utils/is-moment-input.js
new file mode 100644
index 000000000..7543bdeab
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/is-moment-input.js
@@ -0,0 +1,75 @@
+import isObjectEmpty from './is-object-empty';
+import hasOwnProp from './has-own-prop';
+import isObject from './is-object';
+import isDate from './is-date';
+import isNumber from './is-number';
+import isString from './is-string';
+import { isMoment } from '../moment/constructor';
+import isArray from './is-array';
+
+// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
+export function isMomentInput(input) {
+ return (
+ isMoment(input) ||
+ isDate(input) ||
+ isString(input) ||
+ isNumber(input) ||
+ isNumberOrStringArray(input) ||
+ isMomentInputObject(input) ||
+ input === null ||
+ input === undefined
+ );
+}
+
+export function isMomentInputObject(input) {
+ var objectTest = isObject(input) && !isObjectEmpty(input),
+ propertyTest = false,
+ properties = [
+ 'years',
+ 'year',
+ 'y',
+ 'months',
+ 'month',
+ 'M',
+ 'days',
+ 'day',
+ 'd',
+ 'dates',
+ 'date',
+ 'D',
+ 'hours',
+ 'hour',
+ 'h',
+ 'minutes',
+ 'minute',
+ 'm',
+ 'seconds',
+ 'second',
+ 's',
+ 'milliseconds',
+ 'millisecond',
+ 'ms',
+ ],
+ i,
+ property,
+ propertyLen = properties.length;
+
+ for (i = 0; i < propertyLen; i += 1) {
+ property = properties[i];
+ propertyTest = propertyTest || hasOwnProp(input, property);
+ }
+
+ return objectTest && propertyTest;
+}
+
+function isNumberOrStringArray(input) {
+ var arrayTest = isArray(input),
+ dataTypeTest = false;
+ if (arrayTest) {
+ dataTypeTest =
+ input.filter(function (item) {
+ return !isNumber(item) && isString(input);
+ }).length === 0;
+ }
+ return arrayTest && dataTypeTest;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/is-number.js b/vendor/assets/javascripts/momentjs/src/lib/utils/is-number.js
new file mode 100644
index 000000000..4a737531d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/is-number.js
@@ -0,0 +1,6 @@
+export default function isNumber(input) {
+ return (
+ typeof input === 'number' ||
+ Object.prototype.toString.call(input) === '[object Number]'
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/is-object-empty.js b/vendor/assets/javascripts/momentjs/src/lib/utils/is-object-empty.js
new file mode 100644
index 000000000..62f4e6931
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/is-object-empty.js
@@ -0,0 +1,15 @@
+import hasOwnProp from './has-own-prop';
+
+export default function isObjectEmpty(obj) {
+ if (Object.getOwnPropertyNames) {
+ return Object.getOwnPropertyNames(obj).length === 0;
+ } else {
+ var k;
+ for (k in obj) {
+ if (hasOwnProp(obj, k)) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/is-object.js b/vendor/assets/javascripts/momentjs/src/lib/utils/is-object.js
new file mode 100644
index 000000000..a1b2d42ba
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/is-object.js
@@ -0,0 +1,8 @@
+export default function isObject(input) {
+ // IE8 will treat undefined and null as object if it wasn't for
+ // input != null
+ return (
+ input != null &&
+ Object.prototype.toString.call(input) === '[object Object]'
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/is-string.js b/vendor/assets/javascripts/momentjs/src/lib/utils/is-string.js
new file mode 100644
index 000000000..34b8dcc51
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/is-string.js
@@ -0,0 +1,3 @@
+export default function isString(input) {
+ return typeof input === 'string' || input instanceof String;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/is-undefined.js b/vendor/assets/javascripts/momentjs/src/lib/utils/is-undefined.js
new file mode 100644
index 000000000..de57a8b28
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/is-undefined.js
@@ -0,0 +1,3 @@
+export default function isUndefined(input) {
+ return input === void 0;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/keys.js b/vendor/assets/javascripts/momentjs/src/lib/utils/keys.js
new file mode 100644
index 000000000..1996e6486
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/keys.js
@@ -0,0 +1,20 @@
+import hasOwnProp from './has-own-prop';
+
+var keys;
+
+if (Object.keys) {
+ keys = Object.keys;
+} else {
+ keys = function (obj) {
+ var i,
+ res = [];
+ for (i in obj) {
+ if (hasOwnProp(obj, i)) {
+ res.push(i);
+ }
+ }
+ return res;
+ };
+}
+
+export { keys as default };
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/map.js b/vendor/assets/javascripts/momentjs/src/lib/utils/map.js
new file mode 100644
index 000000000..14245fe2d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/map.js
@@ -0,0 +1,9 @@
+export default function map(arr, fn) {
+ var res = [],
+ i,
+ arrLen = arr.length;
+ for (i = 0; i < arrLen; ++i) {
+ res.push(fn(arr[i], i));
+ }
+ return res;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/mod.js b/vendor/assets/javascripts/momentjs/src/lib/utils/mod.js
new file mode 100644
index 000000000..8046cdac9
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/mod.js
@@ -0,0 +1,3 @@
+export default function mod(n, x) {
+ return ((n % x) + x) % x;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/some.js b/vendor/assets/javascripts/momentjs/src/lib/utils/some.js
new file mode 100644
index 000000000..7c0dd392b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/some.js
@@ -0,0 +1,20 @@
+var some;
+if (Array.prototype.some) {
+ some = Array.prototype.some;
+} else {
+ some = function (fun) {
+ var t = Object(this),
+ len = t.length >>> 0,
+ i;
+
+ for (i = 0; i < len; i++) {
+ if (i in t && fun.call(this, t[i], i, t)) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+}
+
+export { some as default };
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/to-int.js b/vendor/assets/javascripts/momentjs/src/lib/utils/to-int.js
new file mode 100644
index 000000000..fb489416f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/to-int.js
@@ -0,0 +1,12 @@
+import absFloor from './abs-floor';
+
+export default function toInt(argumentForCoercion) {
+ var coercedNumber = +argumentForCoercion,
+ value = 0;
+
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
+ value = absFloor(coercedNumber);
+ }
+
+ return value;
+}
diff --git a/vendor/assets/javascripts/momentjs/src/lib/utils/zero-fill.js b/vendor/assets/javascripts/momentjs/src/lib/utils/zero-fill.js
new file mode 100644
index 000000000..e2d2f6ecb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/lib/utils/zero-fill.js
@@ -0,0 +1,10 @@
+export default function zeroFill(number, targetLength, forceSign) {
+ var absNumber = '' + Math.abs(number),
+ zerosToFill = targetLength - absNumber.length,
+ sign = number >= 0;
+ return (
+ (sign ? (forceSign ? '+' : '') : '-') +
+ Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
+ absNumber
+ );
+}
diff --git a/vendor/assets/javascripts/momentjs/src/locale/af.js b/vendor/assets/javascripts/momentjs/src/locale/af.js
new file mode 100644
index 000000000..374d8536b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/af.js
@@ -0,0 +1,71 @@
+//! moment.js locale configuration
+//! locale : Afrikaans [af]
+//! author : Werner Mollentze : https://github.com/wernerm
+
+import moment from '../moment';
+
+export default moment.defineLocale('af', {
+ months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
+ weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
+ '_'
+ ),
+ weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
+ weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
+ meridiemParse: /vm|nm/i,
+ isPM: function (input) {
+ return /^nm$/i.test(input);
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'vm' : 'VM';
+ } else {
+ return isLower ? 'nm' : 'NM';
+ }
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Vandag om] LT',
+ nextDay: '[Môre om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[Gister om] LT',
+ lastWeek: '[Laas] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'oor %s',
+ past: '%s gelede',
+ s: "'n paar sekondes",
+ ss: '%d sekondes',
+ m: "'n minuut",
+ mm: '%d minute',
+ h: "'n uur",
+ hh: '%d ure',
+ d: "'n dag",
+ dd: '%d dae',
+ M: "'n maand",
+ MM: '%d maande',
+ y: "'n jaar",
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ ); // Thanks to Joris Röling : https://github.com/jjupiter
+ },
+ week: {
+ dow: 1, // Maandag is die eerste dag van die week.
+ doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ar-dz.js b/vendor/assets/javascripts/momentjs/src/locale/ar-dz.js
new file mode 100644
index 000000000..12687a6c5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ar-dz.js
@@ -0,0 +1,156 @@
+//! moment.js locale configuration
+//! locale : Arabic (Algeria) [ar-dz]
+//! author : Amine Roukh: https://github.com/Amine27
+//! author : Abdel Said: https://github.com/abdelsaid
+//! author : Ahmed Elkhatib
+//! author : forabi https://github.com/forabi
+//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
+
+import moment from '../moment';
+
+var pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months = [
+ 'جانفي',
+ 'فيفري',
+ 'مارس',
+ 'أفريل',
+ 'ماي',
+ 'جوان',
+ 'جويلية',
+ 'أوت',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+export default moment.defineLocale('ar-dz', {
+ months: months,
+ monthsShort: months,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ar-kw.js b/vendor/assets/javascripts/momentjs/src/locale/ar-kw.js
new file mode 100644
index 000000000..c2b0f8765
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ar-kw.js
@@ -0,0 +1,55 @@
+//! moment.js locale configuration
+//! locale : Arabic (Kuwait) [ar-kw]
+//! author : Nusret Parlak: https://github.com/nusretparlak
+
+import moment from '../moment';
+
+export default moment.defineLocale('ar-kw', {
+ months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ar-ly.js b/vendor/assets/javascripts/momentjs/src/locale/ar-ly.js
new file mode 100644
index 000000000..a8d4056d1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ar-ly.js
@@ -0,0 +1,171 @@
+//! moment.js locale configuration
+//! locale : Arabic (Libya) [ar-ly]
+//! author : Ali Hmer: https://github.com/kikoanis
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '1',
+ 2: '2',
+ 3: '3',
+ 4: '4',
+ 5: '5',
+ 6: '6',
+ 7: '7',
+ 8: '8',
+ 9: '9',
+ 0: '0',
+ },
+ pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months = [
+ 'يناير',
+ 'فبراير',
+ 'مارس',
+ 'أبريل',
+ 'مايو',
+ 'يونيو',
+ 'يوليو',
+ 'أغسطس',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+export default moment.defineLocale('ar-ly', {
+ months: months,
+ monthsShort: months,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ar-ma.js b/vendor/assets/javascripts/momentjs/src/locale/ar-ma.js
new file mode 100644
index 000000000..4010aa01d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ar-ma.js
@@ -0,0 +1,56 @@
+//! moment.js locale configuration
+//! locale : Arabic (Morocco) [ar-ma]
+//! author : ElFadili Yassine : https://github.com/ElFadiliY
+//! author : Abdel Said : https://github.com/abdelsaid
+
+import moment from '../moment';
+
+export default moment.defineLocale('ar-ma', {
+ months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ar-sa.js b/vendor/assets/javascripts/momentjs/src/locale/ar-sa.js
new file mode 100644
index 000000000..4505ea1cf
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ar-sa.js
@@ -0,0 +1,105 @@
+//! moment.js locale configuration
+//! locale : Arabic (Saudi Arabia) [ar-sa]
+//! author : Suhail Alkowaileet : https://github.com/xsoh
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ };
+
+export default moment.defineLocale('ar-sa', {
+ months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ar-tn.js b/vendor/assets/javascripts/momentjs/src/locale/ar-tn.js
new file mode 100644
index 000000000..0f416ae5c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ar-tn.js
@@ -0,0 +1,55 @@
+//! moment.js locale configuration
+//! locale : Arabic (Tunisia) [ar-tn]
+//! author : Nader Toukabri : https://github.com/naderio
+
+import moment from '../moment';
+
+export default moment.defineLocale('ar-tn', {
+ months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
+ '_'
+ ),
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'في %s',
+ past: 'منذ %s',
+ s: 'ثوان',
+ ss: '%d ثانية',
+ m: 'دقيقة',
+ mm: '%d دقائق',
+ h: 'ساعة',
+ hh: '%d ساعات',
+ d: 'يوم',
+ dd: '%d أيام',
+ M: 'شهر',
+ MM: '%d أشهر',
+ y: 'سنة',
+ yy: '%d سنوات',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ar.js b/vendor/assets/javascripts/momentjs/src/locale/ar.js
new file mode 100644
index 000000000..fb430b964
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ar.js
@@ -0,0 +1,189 @@
+//! moment.js locale configuration
+//! locale : Arabic [ar]
+//! author : Abdel Said: https://github.com/abdelsaid
+//! author : Ahmed Elkhatib
+//! author : forabi https://github.com/forabi
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ },
+ pluralForm = function (n) {
+ return n === 0
+ ? 0
+ : n === 1
+ ? 1
+ : n === 2
+ ? 2
+ : n % 100 >= 3 && n % 100 <= 10
+ ? 3
+ : n % 100 >= 11
+ ? 4
+ : 5;
+ },
+ plurals = {
+ s: [
+ 'أقل من ثانية',
+ 'ثانية واحدة',
+ ['ثانيتان', 'ثانيتين'],
+ '%d ثوان',
+ '%d ثانية',
+ '%d ثانية',
+ ],
+ m: [
+ 'أقل من دقيقة',
+ 'دقيقة واحدة',
+ ['دقيقتان', 'دقيقتين'],
+ '%d دقائق',
+ '%d دقيقة',
+ '%d دقيقة',
+ ],
+ h: [
+ 'أقل من ساعة',
+ 'ساعة واحدة',
+ ['ساعتان', 'ساعتين'],
+ '%d ساعات',
+ '%d ساعة',
+ '%d ساعة',
+ ],
+ d: [
+ 'أقل من يوم',
+ 'يوم واحد',
+ ['يومان', 'يومين'],
+ '%d أيام',
+ '%d يومًا',
+ '%d يوم',
+ ],
+ M: [
+ 'أقل من شهر',
+ 'شهر واحد',
+ ['شهران', 'شهرين'],
+ '%d أشهر',
+ '%d شهرا',
+ '%d شهر',
+ ],
+ y: [
+ 'أقل من عام',
+ 'عام واحد',
+ ['عامان', 'عامين'],
+ '%d أعوام',
+ '%d عامًا',
+ '%d عام',
+ ],
+ },
+ pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ },
+ months = [
+ 'يناير',
+ 'فبراير',
+ 'مارس',
+ 'أبريل',
+ 'مايو',
+ 'يونيو',
+ 'يوليو',
+ 'أغسطس',
+ 'سبتمبر',
+ 'أكتوبر',
+ 'نوفمبر',
+ 'ديسمبر',
+ ];
+
+export default moment.defineLocale('ar', {
+ months: months,
+ monthsShort: months,
+ weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/\u200FM/\u200FYYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ص|م/,
+ isPM: function (input) {
+ return 'م' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar: {
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'بعد %s',
+ past: 'منذ %s',
+ s: pluralize('s'),
+ ss: pluralize('s'),
+ m: pluralize('m'),
+ mm: pluralize('m'),
+ h: pluralize('h'),
+ hh: pluralize('h'),
+ d: pluralize('d'),
+ dd: pluralize('d'),
+ M: pluralize('M'),
+ MM: pluralize('M'),
+ y: pluralize('y'),
+ yy: pluralize('y'),
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/az.js b/vendor/assets/javascripts/momentjs/src/locale/az.js
new file mode 100644
index 000000000..2e06aa17a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/az.js
@@ -0,0 +1,102 @@
+//! moment.js locale configuration
+//! locale : Azerbaijani [az]
+//! author : topchiyev : https://github.com/topchiyev
+
+import moment from '../moment';
+
+var suffixes = {
+ 1: '-inci',
+ 5: '-inci',
+ 8: '-inci',
+ 70: '-inci',
+ 80: '-inci',
+ 2: '-nci',
+ 7: '-nci',
+ 20: '-nci',
+ 50: '-nci',
+ 3: '-üncü',
+ 4: '-üncü',
+ 100: '-üncü',
+ 6: '-ncı',
+ 9: '-uncu',
+ 10: '-uncu',
+ 30: '-uncu',
+ 60: '-ıncı',
+ 90: '-ıncı',
+};
+
+export default moment.defineLocale('az', {
+ months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
+ weekdays:
+ 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
+ '_'
+ ),
+ weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
+ weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün saat] LT',
+ nextDay: '[sabah saat] LT',
+ nextWeek: '[gələn həftə] dddd [saat] LT',
+ lastDay: '[dünən] LT',
+ lastWeek: '[keçən həftə] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s sonra',
+ past: '%s əvvəl',
+ s: 'bir neçə saniyə',
+ ss: '%d saniyə',
+ m: 'bir dəqiqə',
+ mm: '%d dəqiqə',
+ h: 'bir saat',
+ hh: '%d saat',
+ d: 'bir gün',
+ dd: '%d gün',
+ M: 'bir ay',
+ MM: '%d ay',
+ y: 'bir il',
+ yy: '%d il',
+ },
+ meridiemParse: /gecə|səhər|gündüz|axşam/,
+ isPM: function (input) {
+ return /^(gündüz|axşam)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'gecə';
+ } else if (hour < 12) {
+ return 'səhər';
+ } else if (hour < 17) {
+ return 'gündüz';
+ } else {
+ return 'axşam';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
+ ordinal: function (number) {
+ if (number === 0) {
+ // special case for zero
+ return number + '-ıncı';
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/be.js b/vendor/assets/javascripts/momentjs/src/locale/be.js
new file mode 100644
index 000000000..4b4d1cb27
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/be.js
@@ -0,0 +1,142 @@
+//! moment.js locale configuration
+//! locale : Belarusian [be]
+//! author : Dmitry Demidov : https://github.com/demidov91
+//! author: Praleska: http://praleska.pro/
+//! Author : Menelion Elensúle : https://github.com/Oire
+
+import moment from '../moment';
+
+function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+}
+function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
+ mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
+ hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
+ dd: 'дзень_дні_дзён',
+ MM: 'месяц_месяцы_месяцаў',
+ yy: 'год_гады_гадоў',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'хвіліна' : 'хвіліну';
+ } else if (key === 'h') {
+ return withoutSuffix ? 'гадзіна' : 'гадзіну';
+ } else {
+ return number + ' ' + plural(format[key], +number);
+ }
+}
+
+export default moment.defineLocale('be', {
+ months: {
+ format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
+ '_'
+ ),
+ standalone:
+ 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
+ weekdays: {
+ format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
+ '_'
+ ),
+ standalone:
+ 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
+ '_'
+ ),
+ isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
+ },
+ weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+ weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY г.',
+ LLL: 'D MMMM YYYY г., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY г., HH:mm',
+ },
+ calendar: {
+ sameDay: '[Сёння ў] LT',
+ nextDay: '[Заўтра ў] LT',
+ lastDay: '[Учора ў] LT',
+ nextWeek: function () {
+ return '[У] dddd [ў] LT';
+ },
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 5:
+ case 6:
+ return '[У мінулую] dddd [ў] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[У мінулы] dddd [ў] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'праз %s',
+ past: '%s таму',
+ s: 'некалькі секунд',
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: relativeTimeWithPlural,
+ hh: relativeTimeWithPlural,
+ d: 'дзень',
+ dd: relativeTimeWithPlural,
+ M: 'месяц',
+ MM: relativeTimeWithPlural,
+ y: 'год',
+ yy: relativeTimeWithPlural,
+ },
+ meridiemParse: /ночы|раніцы|дня|вечара/,
+ isPM: function (input) {
+ return /^(дня|вечара)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночы';
+ } else if (hour < 12) {
+ return 'раніцы';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечара';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ case 'w':
+ case 'W':
+ return (number % 10 === 2 || number % 10 === 3) &&
+ number % 100 !== 12 &&
+ number % 100 !== 13
+ ? number + '-і'
+ : number + '-ы';
+ case 'D':
+ return number + '-га';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/bg.js b/vendor/assets/javascripts/momentjs/src/locale/bg.js
new file mode 100644
index 000000000..e8b060fab
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/bg.js
@@ -0,0 +1,87 @@
+//! moment.js locale configuration
+//! locale : Bulgarian [bg]
+//! author : Krasen Borisov : https://github.com/kraz
+
+import moment from '../moment';
+
+export default moment.defineLocale('bg', {
+ months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
+ '_'
+ ),
+ monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
+ '_'
+ ),
+ weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
+ weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Днес в] LT',
+ nextDay: '[Утре в] LT',
+ nextWeek: 'dddd [в] LT',
+ lastDay: '[Вчера в] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 6:
+ return '[Миналата] dddd [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[Миналия] dddd [в] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'след %s',
+ past: 'преди %s',
+ s: 'няколко секунди',
+ ss: '%d секунди',
+ m: 'минута',
+ mm: '%d минути',
+ h: 'час',
+ hh: '%d часа',
+ d: 'ден',
+ dd: '%d дена',
+ w: 'седмица',
+ ww: '%d седмици',
+ M: 'месец',
+ MM: '%d месеца',
+ y: 'година',
+ yy: '%d години',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+ ordinal: function (number) {
+ var lastDigit = number % 10,
+ last2Digits = number % 100;
+ if (number === 0) {
+ return number + '-ев';
+ } else if (last2Digits === 0) {
+ return number + '-ен';
+ } else if (last2Digits > 10 && last2Digits < 20) {
+ return number + '-ти';
+ } else if (lastDigit === 1) {
+ return number + '-ви';
+ } else if (lastDigit === 2) {
+ return number + '-ри';
+ } else if (lastDigit === 7 || lastDigit === 8) {
+ return number + '-ми';
+ } else {
+ return number + '-ти';
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/bm.js b/vendor/assets/javascripts/momentjs/src/locale/bm.js
new file mode 100644
index 000000000..037d018ec
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/bm.js
@@ -0,0 +1,52 @@
+//! moment.js locale configuration
+//! locale : Bambara [bm]
+//! author : Estelle Comment : https://github.com/estellecomment
+// Language contact person : Abdoufata Kane : https://github.com/abdoufata
+
+import moment from '../moment';
+
+export default moment.defineLocale('bm', {
+ months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
+ '_'
+ ),
+ monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
+ weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
+ weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
+ weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'MMMM [tile] D [san] YYYY',
+ LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
+ LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
+ },
+ calendar: {
+ sameDay: '[Bi lɛrɛ] LT',
+ nextDay: '[Sini lɛrɛ] LT',
+ nextWeek: 'dddd [don lɛrɛ] LT',
+ lastDay: '[Kunu lɛrɛ] LT',
+ lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s kɔnɔ',
+ past: 'a bɛ %s bɔ',
+ s: 'sanga dama dama',
+ ss: 'sekondi %d',
+ m: 'miniti kelen',
+ mm: 'miniti %d',
+ h: 'lɛrɛ kelen',
+ hh: 'lɛrɛ %d',
+ d: 'tile kelen',
+ dd: 'tile %d',
+ M: 'kalo kelen',
+ MM: 'kalo %d',
+ y: 'san kelen',
+ yy: 'san %d',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/bn-bd.js b/vendor/assets/javascripts/momentjs/src/locale/bn-bd.js
new file mode 100644
index 000000000..054f44fcc
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/bn-bd.js
@@ -0,0 +1,129 @@
+//! moment.js locale configuration
+//! locale : Bengali (Bangladesh) [bn-bd]
+//! author : Asraf Hossain Patoary : https://github.com/ashwoolford
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
+ },
+ numberMap = {
+ '১': '1',
+ '২': '2',
+ '৩': '3',
+ '৪': '4',
+ '৫': '5',
+ '৬': '6',
+ '৭': '7',
+ '৮': '8',
+ '৯': '9',
+ '০': '0',
+ };
+
+export default moment.defineLocale('bn-bd', {
+ months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
+ '_'
+ ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
+ weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
+ '_'
+ ),
+ weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+ weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm সময়',
+ LTS: 'A h:mm:ss সময়',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm সময়',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
+ },
+ calendar: {
+ sameDay: '[আজ] LT',
+ nextDay: '[আগামীকাল] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[গতকাল] LT',
+ lastWeek: '[গত] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s পরে',
+ past: '%s আগে',
+ s: 'কয়েক সেকেন্ড',
+ ss: '%d সেকেন্ড',
+ m: 'এক মিনিট',
+ mm: '%d মিনিট',
+ h: 'এক ঘন্টা',
+ hh: '%d ঘন্টা',
+ d: 'এক দিন',
+ dd: '%d দিন',
+ M: 'এক মাস',
+ MM: '%d মাস',
+ y: 'এক বছর',
+ yy: '%d বছর',
+ },
+ preparse: function (string) {
+ return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+
+ meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'রাত') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ভোর') {
+ return hour;
+ } else if (meridiem === 'সকাল') {
+ return hour;
+ } else if (meridiem === 'দুপুর') {
+ return hour >= 3 ? hour : hour + 12;
+ } else if (meridiem === 'বিকাল') {
+ return hour + 12;
+ } else if (meridiem === 'সন্ধ্যা') {
+ return hour + 12;
+ }
+ },
+
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'রাত';
+ } else if (hour < 6) {
+ return 'ভোর';
+ } else if (hour < 12) {
+ return 'সকাল';
+ } else if (hour < 15) {
+ return 'দুপুর';
+ } else if (hour < 18) {
+ return 'বিকাল';
+ } else if (hour < 20) {
+ return 'সন্ধ্যা';
+ } else {
+ return 'রাত';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/bn.js b/vendor/assets/javascripts/momentjs/src/locale/bn.js
new file mode 100644
index 000000000..14ba050f2
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/bn.js
@@ -0,0 +1,119 @@
+//! moment.js locale configuration
+//! locale : Bengali [bn]
+//! author : Kaushik Gandhi : https://github.com/kaushikgandhi
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '১',
+ 2: '২',
+ 3: '৩',
+ 4: '৪',
+ 5: '৫',
+ 6: '৬',
+ 7: '৭',
+ 8: '৮',
+ 9: '৯',
+ 0: '০',
+ },
+ numberMap = {
+ '১': '1',
+ '২': '2',
+ '৩': '3',
+ '৪': '4',
+ '৫': '5',
+ '৬': '6',
+ '৭': '7',
+ '৮': '8',
+ '৯': '9',
+ '০': '0',
+ };
+
+export default moment.defineLocale('bn', {
+ months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
+ '_'
+ ),
+ monthsShort:
+ 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
+ '_'
+ ),
+ weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
+ '_'
+ ),
+ weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+ weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm সময়',
+ LTS: 'A h:mm:ss সময়',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm সময়',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
+ },
+ calendar: {
+ sameDay: '[আজ] LT',
+ nextDay: '[আগামীকাল] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[গতকাল] LT',
+ lastWeek: '[গত] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s পরে',
+ past: '%s আগে',
+ s: 'কয়েক সেকেন্ড',
+ ss: '%d সেকেন্ড',
+ m: 'এক মিনিট',
+ mm: '%d মিনিট',
+ h: 'এক ঘন্টা',
+ hh: '%d ঘন্টা',
+ d: 'এক দিন',
+ dd: '%d দিন',
+ M: 'এক মাস',
+ MM: '%d মাস',
+ y: 'এক বছর',
+ yy: '%d বছর',
+ },
+ preparse: function (string) {
+ return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'রাত' && hour >= 4) ||
+ (meridiem === 'দুপুর' && hour < 5) ||
+ meridiem === 'বিকাল'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'রাত';
+ } else if (hour < 10) {
+ return 'সকাল';
+ } else if (hour < 17) {
+ return 'দুপুর';
+ } else if (hour < 20) {
+ return 'বিকাল';
+ } else {
+ return 'রাত';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/bo.js b/vendor/assets/javascripts/momentjs/src/locale/bo.js
new file mode 100644
index 000000000..4fbca2e33
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/bo.js
@@ -0,0 +1,124 @@
+//! moment.js locale configuration
+//! locale : Tibetan [bo]
+//! author : Thupten N. Chakrishar : https://github.com/vajradog
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '༡',
+ 2: '༢',
+ 3: '༣',
+ 4: '༤',
+ 5: '༥',
+ 6: '༦',
+ 7: '༧',
+ 8: '༨',
+ 9: '༩',
+ 0: '༠',
+ },
+ numberMap = {
+ '༡': '1',
+ '༢': '2',
+ '༣': '3',
+ '༤': '4',
+ '༥': '5',
+ '༦': '6',
+ '༧': '7',
+ '༨': '8',
+ '༩': '9',
+ '༠': '0',
+ };
+
+export default moment.defineLocale('bo', {
+ months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
+ '_'
+ ),
+ monthsShortRegex: /^(ཟླ་\d{1,2})/,
+ monthsParseExact: true,
+ weekdays:
+ 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
+ '_'
+ ),
+ weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
+ '_'
+ ),
+ weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[དི་རིང] LT',
+ nextDay: '[སང་ཉིན] LT',
+ nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
+ lastDay: '[ཁ་སང] LT',
+ lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ལ་',
+ past: '%s སྔན་ལ',
+ s: 'ལམ་སང',
+ ss: '%d སྐར་ཆ།',
+ m: 'སྐར་མ་གཅིག',
+ mm: '%d སྐར་མ',
+ h: 'ཆུ་ཚོད་གཅིག',
+ hh: '%d ཆུ་ཚོད',
+ d: 'ཉིན་གཅིག',
+ dd: '%d ཉིན་',
+ M: 'ཟླ་བ་གཅིག',
+ MM: '%d ཟླ་བ',
+ y: 'ལོ་གཅིག',
+ yy: '%d ལོ',
+ },
+ preparse: function (string) {
+ return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'མཚན་མོ' && hour >= 4) ||
+ (meridiem === 'ཉིན་གུང' && hour < 5) ||
+ meridiem === 'དགོང་དག'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'མཚན་མོ';
+ } else if (hour < 10) {
+ return 'ཞོགས་ཀས';
+ } else if (hour < 17) {
+ return 'ཉིན་གུང';
+ } else if (hour < 20) {
+ return 'དགོང་དག';
+ } else {
+ return 'མཚན་མོ';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/br.js b/vendor/assets/javascripts/momentjs/src/locale/br.js
new file mode 100644
index 000000000..a7dda4902
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/br.js
@@ -0,0 +1,168 @@
+//! moment.js locale configuration
+//! locale : Breton [br]
+//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
+
+import moment from '../moment';
+
+function relativeTimeWithMutation(number, withoutSuffix, key) {
+ var format = {
+ mm: 'munutenn',
+ MM: 'miz',
+ dd: 'devezh',
+ };
+ return number + ' ' + mutation(format[key], number);
+}
+function specialMutationForYears(number) {
+ switch (lastNumber(number)) {
+ case 1:
+ case 3:
+ case 4:
+ case 5:
+ case 9:
+ return number + ' bloaz';
+ default:
+ return number + ' vloaz';
+ }
+}
+function lastNumber(number) {
+ if (number > 9) {
+ return lastNumber(number % 10);
+ }
+ return number;
+}
+function mutation(text, number) {
+ if (number === 2) {
+ return softMutation(text);
+ }
+ return text;
+}
+function softMutation(text) {
+ var mutationTable = {
+ m: 'v',
+ b: 'v',
+ d: 'z',
+ };
+ if (mutationTable[text.charAt(0)] === undefined) {
+ return text;
+ }
+ return mutationTable[text.charAt(0)] + text.substring(1);
+}
+
+var monthsParse = [
+ /^gen/i,
+ /^c[ʼ\']hwe/i,
+ /^meu/i,
+ /^ebr/i,
+ /^mae/i,
+ /^(mez|eve)/i,
+ /^gou/i,
+ /^eos/i,
+ /^gwe/i,
+ /^her/i,
+ /^du/i,
+ /^ker/i,
+ ],
+ monthsRegex =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ monthsStrictRegex =
+ /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
+ monthsShortStrictRegex =
+ /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
+ fullWeekdaysParse = [
+ /^sul/i,
+ /^lun/i,
+ /^meurzh/i,
+ /^merc[ʼ\']her/i,
+ /^yaou/i,
+ /^gwener/i,
+ /^sadorn/i,
+ ],
+ shortWeekdaysParse = [
+ /^Sul/i,
+ /^Lun/i,
+ /^Meu/i,
+ /^Mer/i,
+ /^Yao/i,
+ /^Gwe/i,
+ /^Sad/i,
+ ],
+ minWeekdaysParse = [
+ /^Su/i,
+ /^Lu/i,
+ /^Me([^r]|$)/i,
+ /^Mer/i,
+ /^Ya/i,
+ /^Gw/i,
+ /^Sa/i,
+ ];
+
+export default moment.defineLocale('br', {
+ months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
+ '_'
+ ),
+ monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
+ weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
+ weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
+ weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
+ weekdaysParse: minWeekdaysParse,
+ fullWeekdaysParse: fullWeekdaysParse,
+ shortWeekdaysParse: shortWeekdaysParse,
+ minWeekdaysParse: minWeekdaysParse,
+
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex: monthsStrictRegex,
+ monthsShortStrictRegex: monthsShortStrictRegex,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [a viz] MMMM YYYY',
+ LLL: 'D [a viz] MMMM YYYY HH:mm',
+ LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hiziv da] LT',
+ nextDay: '[Warcʼhoazh da] LT',
+ nextWeek: 'dddd [da] LT',
+ lastDay: '[Decʼh da] LT',
+ lastWeek: 'dddd [paset da] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'a-benn %s',
+ past: '%s ʼzo',
+ s: 'un nebeud segondennoù',
+ ss: '%d eilenn',
+ m: 'ur vunutenn',
+ mm: relativeTimeWithMutation,
+ h: 'un eur',
+ hh: '%d eur',
+ d: 'un devezh',
+ dd: relativeTimeWithMutation,
+ M: 'ur miz',
+ MM: relativeTimeWithMutation,
+ y: 'ur bloaz',
+ yy: specialMutationForYears,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'añ' : 'vet';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
+ isPM: function (token) {
+ return token === 'g.m.';
+ },
+ meridiem: function (hour, minute, isLower) {
+ return hour < 12 ? 'a.m.' : 'g.m.';
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/bs.js b/vendor/assets/javascripts/momentjs/src/locale/bs.js
new file mode 100644
index 000000000..3d62945b8
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/bs.js
@@ -0,0 +1,150 @@
+//! moment.js locale configuration
+//! locale : Bosnian [bs]
+//! author : Nedim Cholich : https://github.com/frontyard
+//! based on (hr) translation by Bojan Marković
+
+import moment from '../moment';
+
+function translate(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ if (number === 1) {
+ result += 'sekunda';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sekunde';
+ } else {
+ result += 'sekundi';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
+ }
+}
+
+export default moment.defineLocale('bs', {
+ months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[jučer u] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ return '[prošlu] dddd [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'par sekundi',
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: 'dan',
+ dd: translate,
+ M: 'mjesec',
+ MM: translate,
+ y: 'godinu',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ca.js b/vendor/assets/javascripts/momentjs/src/locale/ca.js
new file mode 100644
index 000000000..0fe9da472
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ca.js
@@ -0,0 +1,100 @@
+//! moment.js locale configuration
+//! locale : Catalan [ca]
+//! author : Juan G. Hurtado : https://github.com/juanghurtado
+
+import moment from '../moment';
+
+export default moment.defineLocale('ca', {
+ months: {
+ standalone:
+ 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
+ '_'
+ ),
+ format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\s)+MMMM/,
+ },
+ monthsShort:
+ 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
+ '_'
+ ),
+ weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
+ weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [de] YYYY',
+ ll: 'D MMM YYYY',
+ LLL: 'D MMMM [de] YYYY [a les] H:mm',
+ lll: 'D MMM YYYY, H:mm',
+ LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
+ llll: 'ddd D MMM YYYY, H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ nextDay: function () {
+ return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ lastDay: function () {
+ return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [passat a ' +
+ (this.hours() !== 1 ? 'les' : 'la') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: "d'aquí %s",
+ past: 'fa %s',
+ s: 'uns segons',
+ ss: '%d segons',
+ m: 'un minut',
+ mm: '%d minuts',
+ h: 'una hora',
+ hh: '%d hores',
+ d: 'un dia',
+ dd: '%d dies',
+ M: 'un mes',
+ MM: '%d mesos',
+ y: 'un any',
+ yy: '%d anys',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
+ ordinal: function (number, period) {
+ var output =
+ number === 1
+ ? 'r'
+ : number === 2
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
+ if (period === 'w' || period === 'W') {
+ output = 'a';
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/cs.js b/vendor/assets/javascripts/momentjs/src/locale/cs.js
new file mode 100644
index 000000000..7a98abacc
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/cs.js
@@ -0,0 +1,180 @@
+//! moment.js locale configuration
+//! locale : Czech [cs]
+//! author : petrbela : https://github.com/petrbela
+
+import moment from '../moment';
+
+var months = {
+ format: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
+ '_'
+ ),
+ standalone:
+ 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(
+ '_'
+ ),
+ },
+ monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
+ monthsParse = [
+ /^led/i,
+ /^úno/i,
+ /^bře/i,
+ /^dub/i,
+ /^kvě/i,
+ /^(čvn|červen$|června)/i,
+ /^(čvc|červenec|července)/i,
+ /^srp/i,
+ /^zář/i,
+ /^říj/i,
+ /^lis/i,
+ /^pro/i,
+ ],
+ // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
+ // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
+ monthsRegex =
+ /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
+
+function plural(n) {
+ return n > 1 && n < 5 && ~~(n / 10) !== 1;
+}
+function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
+ case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'sekundy' : 'sekund');
+ } else {
+ return result + 'sekundami';
+ }
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'minuty' : 'minut');
+ } else {
+ return result + 'minutami';
+ }
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'hodiny' : 'hodin');
+ } else {
+ return result + 'hodinami';
+ }
+ case 'd': // a day / in a day / a day ago
+ return withoutSuffix || isFuture ? 'den' : 'dnem';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'dny' : 'dní');
+ } else {
+ return result + 'dny';
+ }
+ case 'M': // a month / in a month / a month ago
+ return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'měsíce' : 'měsíců');
+ } else {
+ return result + 'měsíci';
+ }
+ case 'y': // a year / in a year / a year ago
+ return withoutSuffix || isFuture ? 'rok' : 'rokem';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'roky' : 'let');
+ } else {
+ return result + 'lety';
+ }
+ }
+}
+
+export default moment.defineLocale('cs', {
+ months: months,
+ monthsShort: monthsShort,
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
+ // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
+ monthsStrictRegex:
+ /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
+ monthsShortStrictRegex:
+ /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
+ weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
+ weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd D. MMMM YYYY H:mm',
+ l: 'D. M. YYYY',
+ },
+ calendar: {
+ sameDay: '[dnes v] LT',
+ nextDay: '[zítra v] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v neděli v] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [v] LT';
+ case 3:
+ return '[ve středu v] LT';
+ case 4:
+ return '[ve čtvrtek v] LT';
+ case 5:
+ return '[v pátek v] LT';
+ case 6:
+ return '[v sobotu v] LT';
+ }
+ },
+ lastDay: '[včera v] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[minulou neděli v] LT';
+ case 1:
+ case 2:
+ return '[minulé] dddd [v] LT';
+ case 3:
+ return '[minulou středu v] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [v] LT';
+ case 6:
+ return '[minulou sobotu v] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'před %s',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/cv.js b/vendor/assets/javascripts/momentjs/src/locale/cv.js
new file mode 100644
index 000000000..f349157db
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/cv.js
@@ -0,0 +1,63 @@
+//! moment.js locale configuration
+//! locale : Chuvash [cv]
+//! author : Anatoly Mironov : https://github.com/mirontoli
+
+import moment from '../moment';
+
+export default moment.defineLocale('cv', {
+ months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
+ '_'
+ ),
+ monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
+ weekdays:
+ 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
+ '_'
+ ),
+ weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
+ weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
+ LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+ LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+ },
+ calendar: {
+ sameDay: '[Паян] LT [сехетре]',
+ nextDay: '[Ыран] LT [сехетре]',
+ lastDay: '[Ӗнер] LT [сехетре]',
+ nextWeek: '[Ҫитес] dddd LT [сехетре]',
+ lastWeek: '[Иртнӗ] dddd LT [сехетре]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (output) {
+ var affix = /сехет$/i.exec(output)
+ ? 'рен'
+ : /ҫул$/i.exec(output)
+ ? 'тан'
+ : 'ран';
+ return output + affix;
+ },
+ past: '%s каялла',
+ s: 'пӗр-ик ҫеккунт',
+ ss: '%d ҫеккунт',
+ m: 'пӗр минут',
+ mm: '%d минут',
+ h: 'пӗр сехет',
+ hh: '%d сехет',
+ d: 'пӗр кун',
+ dd: '%d кун',
+ M: 'пӗр уйӑх',
+ MM: '%d уйӑх',
+ y: 'пӗр ҫул',
+ yy: '%d ҫул',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
+ ordinal: '%d-мӗш',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/cy.js b/vendor/assets/javascripts/momentjs/src/locale/cy.js
new file mode 100644
index 000000000..e12344a1d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/cy.js
@@ -0,0 +1,98 @@
+//! moment.js locale configuration
+//! locale : Welsh [cy]
+//! author : Robert Allen : https://github.com/robgallen
+//! author : https://github.com/ryangreaves
+
+import moment from '../moment';
+
+export default moment.defineLocale('cy', {
+ months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
+ '_'
+ ),
+ monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
+ '_'
+ ),
+ weekdays:
+ 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
+ weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
+ weekdaysParseExact: true,
+ // time formats are the same as en-gb
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Heddiw am] LT',
+ nextDay: '[Yfory am] LT',
+ nextWeek: 'dddd [am] LT',
+ lastDay: '[Ddoe am] LT',
+ lastWeek: 'dddd [diwethaf am] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'mewn %s',
+ past: '%s yn ôl',
+ s: 'ychydig eiliadau',
+ ss: '%d eiliad',
+ m: 'munud',
+ mm: '%d munud',
+ h: 'awr',
+ hh: '%d awr',
+ d: 'diwrnod',
+ dd: '%d diwrnod',
+ M: 'mis',
+ MM: '%d mis',
+ y: 'blwyddyn',
+ yy: '%d flynedd',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
+ // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
+ ordinal: function (number) {
+ var b = number,
+ output = '',
+ lookup = [
+ '',
+ 'af',
+ 'il',
+ 'ydd',
+ 'ydd',
+ 'ed',
+ 'ed',
+ 'ed',
+ 'fed',
+ 'fed',
+ 'fed', // 1af to 10fed
+ 'eg',
+ 'fed',
+ 'eg',
+ 'eg',
+ 'fed',
+ 'eg',
+ 'eg',
+ 'fed',
+ 'eg',
+ 'fed', // 11eg to 20fed
+ ];
+ if (b > 20) {
+ if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
+ output = 'fed'; // not 30ain, 70ain or 90ain
+ } else {
+ output = 'ain';
+ }
+ } else if (b > 0) {
+ output = lookup[b];
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/da.js b/vendor/assets/javascripts/momentjs/src/locale/da.js
new file mode 100644
index 000000000..d1fc181dd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/da.js
@@ -0,0 +1,53 @@
+//! moment.js locale configuration
+//! locale : Danish [da]
+//! author : Ulrik Nielsen : https://github.com/mrbase
+
+import moment from '../moment';
+
+export default moment.defineLocale('da', {
+ months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
+ weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i dag kl.] LT',
+ nextDay: '[i morgen kl.] LT',
+ nextWeek: 'på dddd [kl.] LT',
+ lastDay: '[i går kl.] LT',
+ lastWeek: '[i] dddd[s kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s siden',
+ s: 'få sekunder',
+ ss: '%d sekunder',
+ m: 'et minut',
+ mm: '%d minutter',
+ h: 'en time',
+ hh: '%d timer',
+ d: 'en dag',
+ dd: '%d dage',
+ M: 'en måned',
+ MM: '%d måneder',
+ y: 'et år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/de-at.js b/vendor/assets/javascripts/momentjs/src/locale/de-at.js
new file mode 100644
index 000000000..8318fec1e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/de-at.js
@@ -0,0 +1,79 @@
+//! moment.js locale configuration
+//! locale : German (Austria) [de-at]
+//! author : lluchs : https://github.com/lluchs
+//! author: Menelion Elensúle: https://github.com/Oire
+//! author : Martin Groller : https://github.com/MadMG
+//! author : Mikolaj Dadela : https://github.com/mik01aj
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('de-at', {
+ months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime,
+ mm: '%d Minuten',
+ h: processRelativeTime,
+ hh: '%d Stunden',
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/de-ch.js b/vendor/assets/javascripts/momentjs/src/locale/de-ch.js
new file mode 100644
index 000000000..4e675073c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/de-ch.js
@@ -0,0 +1,78 @@
+//! moment.js locale configuration
+//! locale : German (Switzerland) [de-ch]
+//! author : sschueller : https://github.com/sschueller
+
+// based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de#
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('de-ch', {
+ months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime,
+ mm: '%d Minuten',
+ h: processRelativeTime,
+ hh: '%d Stunden',
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/de.js b/vendor/assets/javascripts/momentjs/src/locale/de.js
new file mode 100644
index 000000000..cb9c8d5ca
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/de.js
@@ -0,0 +1,78 @@
+//! moment.js locale configuration
+//! locale : German [de]
+//! author : lluchs : https://github.com/lluchs
+//! author: Menelion Elensúle: https://github.com/Oire
+//! author : Mikolaj Dadela : https://github.com/mik01aj
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eine Minute', 'einer Minute'],
+ h: ['eine Stunde', 'einer Stunde'],
+ d: ['ein Tag', 'einem Tag'],
+ dd: [number + ' Tage', number + ' Tagen'],
+ w: ['eine Woche', 'einer Woche'],
+ M: ['ein Monat', 'einem Monat'],
+ MM: [number + ' Monate', number + ' Monaten'],
+ y: ['ein Jahr', 'einem Jahr'],
+ yy: [number + ' Jahre', number + ' Jahren'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('de', {
+ months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY HH:mm',
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: 'vor %s',
+ s: 'ein paar Sekunden',
+ ss: '%d Sekunden',
+ m: processRelativeTime,
+ mm: '%d Minuten',
+ h: processRelativeTime,
+ hh: '%d Stunden',
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ w: processRelativeTime,
+ ww: '%d Wochen',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/dv.js b/vendor/assets/javascripts/momentjs/src/locale/dv.js
new file mode 100644
index 000000000..26520d410
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/dv.js
@@ -0,0 +1,90 @@
+//! moment.js locale configuration
+//! locale : Maldivian [dv]
+//! author : Jawish Hameed : https://github.com/jawish
+
+import moment from '../moment';
+
+var months = [
+ 'ޖެނުއަރީ',
+ 'ފެބްރުއަރީ',
+ 'މާރިޗު',
+ 'އޭޕްރީލު',
+ 'މޭ',
+ 'ޖޫން',
+ 'ޖުލައި',
+ 'އޯގަސްޓު',
+ 'ސެޕްޓެމްބަރު',
+ 'އޮކްޓޯބަރު',
+ 'ނޮވެމްބަރު',
+ 'ޑިސެމްބަރު',
+ ],
+ weekdays = [
+ 'އާދިއްތަ',
+ 'ހޯމަ',
+ 'އަންގާރަ',
+ 'ބުދަ',
+ 'ބުރާސްފަތި',
+ 'ހުކުރު',
+ 'ހޮނިހިރު',
+ ];
+
+export default moment.defineLocale('dv', {
+ months: months,
+ monthsShort: months,
+ weekdays: weekdays,
+ weekdaysShort: weekdays,
+ weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'D/M/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /މކ|މފ/,
+ isPM: function (input) {
+ return 'މފ' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'މކ';
+ } else {
+ return 'މފ';
+ }
+ },
+ calendar: {
+ sameDay: '[މިއަދު] LT',
+ nextDay: '[މާދަމާ] LT',
+ nextWeek: 'dddd LT',
+ lastDay: '[އިއްޔެ] LT',
+ lastWeek: '[ފާއިތުވި] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ތެރޭގައި %s',
+ past: 'ކުރިން %s',
+ s: 'ސިކުންތުކޮޅެއް',
+ ss: 'd% ސިކުންތު',
+ m: 'މިނިޓެއް',
+ mm: 'މިނިޓު %d',
+ h: 'ގަޑިއިރެއް',
+ hh: 'ގަޑިއިރު %d',
+ d: 'ދުވަހެއް',
+ dd: 'ދުވަސް %d',
+ M: 'މަހެއް',
+ MM: 'މަސް %d',
+ y: 'އަހަރެއް',
+ yy: 'އަހަރު %d',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 7, // Sunday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/el.js b/vendor/assets/javascripts/momentjs/src/locale/el.js
new file mode 100644
index 000000000..8a596f10e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/el.js
@@ -0,0 +1,106 @@
+//! moment.js locale configuration
+//! locale : Greek [el]
+//! author : Aggelos Karalias : https://github.com/mehiel
+
+import moment from '../moment';
+
+function isFunction(input) {
+ return (
+ (typeof Function !== 'undefined' && input instanceof Function) ||
+ Object.prototype.toString.call(input) === '[object Function]'
+ );
+}
+
+export default moment.defineLocale('el', {
+ monthsNominativeEl:
+ 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
+ '_'
+ ),
+ monthsGenitiveEl:
+ 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
+ '_'
+ ),
+ months: function (momentToFormat, format) {
+ if (!momentToFormat) {
+ return this._monthsNominativeEl;
+ } else if (
+ typeof format === 'string' &&
+ /D/.test(format.substring(0, format.indexOf('MMMM')))
+ ) {
+ // if there is a day number before 'MMMM'
+ return this._monthsGenitiveEl[momentToFormat.month()];
+ } else {
+ return this._monthsNominativeEl[momentToFormat.month()];
+ }
+ },
+ monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
+ weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
+ '_'
+ ),
+ weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
+ weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'μμ' : 'ΜΜ';
+ } else {
+ return isLower ? 'πμ' : 'ΠΜ';
+ }
+ },
+ isPM: function (input) {
+ return (input + '').toLowerCase()[0] === 'μ';
+ },
+ meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendarEl: {
+ sameDay: '[Σήμερα {}] LT',
+ nextDay: '[Αύριο {}] LT',
+ nextWeek: 'dddd [{}] LT',
+ lastDay: '[Χθες {}] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 6:
+ return '[το προηγούμενο] dddd [{}] LT';
+ default:
+ return '[την προηγούμενη] dddd [{}] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ calendar: function (key, mom) {
+ var output = this._calendarEl[key],
+ hours = mom && mom.hours();
+ if (isFunction(output)) {
+ output = output.apply(mom);
+ }
+ return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
+ },
+ relativeTime: {
+ future: 'σε %s',
+ past: '%s πριν',
+ s: 'λίγα δευτερόλεπτα',
+ ss: '%d δευτερόλεπτα',
+ m: 'ένα λεπτό',
+ mm: '%d λεπτά',
+ h: 'μία ώρα',
+ hh: '%d ώρες',
+ d: 'μία μέρα',
+ dd: '%d μέρες',
+ M: 'ένας μήνας',
+ MM: '%d μήνες',
+ y: 'ένας χρόνος',
+ yy: '%d χρόνια',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}η/,
+ ordinal: '%dη',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4st is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/en-au.js b/vendor/assets/javascripts/momentjs/src/locale/en-au.js
new file mode 100644
index 000000000..8ee6197f2
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/en-au.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (Australia) [en-au]
+//! author : Jared Morse : https://github.com/jarcoal
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-au', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/en-ca.js b/vendor/assets/javascripts/momentjs/src/locale/en-ca.js
new file mode 100644
index 000000000..bc4e9a532
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/en-ca.js
@@ -0,0 +1,64 @@
+//! moment.js locale configuration
+//! locale : English (Canada) [en-ca]
+//! author : Jonathan Abourbih : https://github.com/jonbca
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-ca', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'YYYY-MM-DD',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY h:mm A',
+ LLLL: 'dddd, MMMM D, YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/en-gb.js b/vendor/assets/javascripts/momentjs/src/locale/en-gb.js
new file mode 100644
index 000000000..9391cc943
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/en-gb.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (United Kingdom) [en-gb]
+//! author : Chris Gedrim : https://github.com/chrisgedrim
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-gb', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/en-ie.js b/vendor/assets/javascripts/momentjs/src/locale/en-ie.js
new file mode 100644
index 000000000..8200e55fd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/en-ie.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (Ireland) [en-ie]
+//! author : Chris Cartlidge : https://github.com/chriscartlidge
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-ie', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/en-il.js b/vendor/assets/javascripts/momentjs/src/locale/en-il.js
new file mode 100644
index 000000000..ba16f103c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/en-il.js
@@ -0,0 +1,64 @@
+//! moment.js locale configuration
+//! locale : English (Israel) [en-il]
+//! author : Chris Gedrim : https://github.com/chrisgedrim
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-il', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/en-in.js b/vendor/assets/javascripts/momentjs/src/locale/en-in.js
new file mode 100644
index 000000000..7d940d2f0
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/en-in.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (India) [en-in]
+//! author : Jatin Agrawal : https://github.com/jatinag22
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-in', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 1st is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/en-nz.js b/vendor/assets/javascripts/momentjs/src/locale/en-nz.js
new file mode 100644
index 000000000..dff324cc2
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/en-nz.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (New Zealand) [en-nz]
+//! author : Luke McGregor : https://github.com/lukemcgregor
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-nz', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/en-sg.js b/vendor/assets/javascripts/momentjs/src/locale/en-sg.js
new file mode 100644
index 000000000..433531e01
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/en-sg.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : English (Singapore) [en-sg]
+//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension
+
+import moment from '../moment';
+
+export default moment.defineLocale('en-sg', {
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/eo.js b/vendor/assets/javascripts/momentjs/src/locale/eo.js
new file mode 100644
index 000000000..38d494aca
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/eo.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : Esperanto [eo]
+//! author : Colin Dean : https://github.com/colindean
+//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
+//! comment : miestasmia corrected the translation by colindean
+//! comment : Vivakvo corrected the translation by colindean and miestasmia
+
+import moment from '../moment';
+
+export default moment.defineLocale('eo', {
+ months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
+ weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
+ weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: '[la] D[-an de] MMMM, YYYY',
+ LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
+ LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
+ llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',
+ },
+ meridiemParse: /[ap]\.t\.m/i,
+ isPM: function (input) {
+ return input.charAt(0).toLowerCase() === 'p';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'p.t.m.' : 'P.T.M.';
+ } else {
+ return isLower ? 'a.t.m.' : 'A.T.M.';
+ }
+ },
+ calendar: {
+ sameDay: '[Hodiaŭ je] LT',
+ nextDay: '[Morgaŭ je] LT',
+ nextWeek: 'dddd[n je] LT',
+ lastDay: '[Hieraŭ je] LT',
+ lastWeek: '[pasintan] dddd[n je] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'post %s',
+ past: 'antaŭ %s',
+ s: 'kelkaj sekundoj',
+ ss: '%d sekundoj',
+ m: 'unu minuto',
+ mm: '%d minutoj',
+ h: 'unu horo',
+ hh: '%d horoj',
+ d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
+ dd: '%d tagoj',
+ M: 'unu monato',
+ MM: '%d monatoj',
+ y: 'unu jaro',
+ yy: '%d jaroj',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}a/,
+ ordinal: '%da',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/es-do.js b/vendor/assets/javascripts/momentjs/src/locale/es-do.js
new file mode 100644
index 000000000..8c3ccfd2d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/es-do.js
@@ -0,0 +1,108 @@
+//! moment.js locale configuration
+//! locale : Spanish (Dominican Republic) [es-do]
+
+import moment from '../moment';
+
+var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+export default moment.defineLocale('es-do', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY h:mm A',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/es-mx.js b/vendor/assets/javascripts/momentjs/src/locale/es-mx.js
new file mode 100644
index 000000000..43dd7ccfb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/es-mx.js
@@ -0,0 +1,110 @@
+//! moment.js locale configuration
+//! locale : Spanish (Mexico) [es-mx]
+//! author : JC Franco : https://github.com/jcfranco
+
+import moment from '../moment';
+
+var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+export default moment.defineLocale('es-mx', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ invalidDate: 'Fecha inválida',
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/es-us.js b/vendor/assets/javascripts/momentjs/src/locale/es-us.js
new file mode 100644
index 000000000..bac8cd897
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/es-us.js
@@ -0,0 +1,110 @@
+//! moment.js locale configuration
+//! locale : Spanish (United States) [es-us]
+//! author : bustta : https://github.com/bustta
+//! author : chrisrodz : https://github.com/chrisrodz
+
+import moment from '../moment';
+
+var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+export default moment.defineLocale('es-us', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'MM/DD/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY h:mm A',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/es.js b/vendor/assets/javascripts/momentjs/src/locale/es.js
new file mode 100644
index 000000000..a3428ad54
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/es.js
@@ -0,0 +1,110 @@
+//! moment.js locale configuration
+//! locale : Spanish [es]
+//! author : Julio Napurí : https://github.com/julionc
+
+import moment from '../moment';
+
+var monthsShortDot =
+ 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
+ '_'
+ ),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
+ monthsParse = [
+ /^ene/i,
+ /^feb/i,
+ /^mar/i,
+ /^abr/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^ago/i,
+ /^sep/i,
+ /^oct/i,
+ /^nov/i,
+ /^dic/i,
+ ],
+ monthsRegex =
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+
+export default moment.defineLocale('es', {
+ months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortDot;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShort[m.month()];
+ } else {
+ return monthsShortDot[m.month()];
+ }
+ },
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
+ monthsShortStrictRegex:
+ /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastDay: function () {
+ return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[el] dddd [pasado a la' +
+ (this.hours() !== 1 ? 's' : '') +
+ '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'en %s',
+ past: 'hace %s',
+ s: 'unos segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'una hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ w: 'una semana',
+ ww: '%d semanas',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un año',
+ yy: '%d años',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+ invalidDate: 'Fecha inválida',
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/et.js b/vendor/assets/javascripts/momentjs/src/locale/et.js
new file mode 100644
index 000000000..5da4ec460
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/et.js
@@ -0,0 +1,78 @@
+//! moment.js locale configuration
+//! locale : Estonian [et]
+//! author : Henry Kehlmann : https://github.com/madhenry
+//! improvements : Illimar Tambek : https://github.com/ragulka
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
+ ss: [number + 'sekundi', number + 'sekundit'],
+ m: ['ühe minuti', 'üks minut'],
+ mm: [number + ' minuti', number + ' minutit'],
+ h: ['ühe tunni', 'tund aega', 'üks tund'],
+ hh: [number + ' tunni', number + ' tundi'],
+ d: ['ühe päeva', 'üks päev'],
+ M: ['kuu aja', 'kuu aega', 'üks kuu'],
+ MM: [number + ' kuu', number + ' kuud'],
+ y: ['ühe aasta', 'aasta', 'üks aasta'],
+ yy: [number + ' aasta', number + ' aastat'],
+ };
+ if (withoutSuffix) {
+ return format[key][2] ? format[key][2] : format[key][1];
+ }
+ return isFuture ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('et', {
+ months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
+ weekdays:
+ 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
+ '_'
+ ),
+ weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
+ weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Täna,] LT',
+ nextDay: '[Homme,] LT',
+ nextWeek: '[Järgmine] dddd LT',
+ lastDay: '[Eile,] LT',
+ lastWeek: '[Eelmine] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s pärast',
+ past: '%s tagasi',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: '%d päeva',
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/eu.js b/vendor/assets/javascripts/momentjs/src/locale/eu.js
new file mode 100644
index 000000000..261a17b29
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/eu.js
@@ -0,0 +1,65 @@
+//! moment.js locale configuration
+//! locale : Basque [eu]
+//! author : Eneko Illarramendi : https://github.com/eillarra
+
+import moment from '../moment';
+
+export default moment.defineLocale('eu', {
+ months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
+ '_'
+ ),
+ monthsShort:
+ 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
+ '_'
+ ),
+ weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
+ weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY[ko] MMMM[ren] D[a]',
+ LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
+ LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
+ l: 'YYYY-M-D',
+ ll: 'YYYY[ko] MMM D[a]',
+ lll: 'YYYY[ko] MMM D[a] HH:mm',
+ llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',
+ },
+ calendar: {
+ sameDay: '[gaur] LT[etan]',
+ nextDay: '[bihar] LT[etan]',
+ nextWeek: 'dddd LT[etan]',
+ lastDay: '[atzo] LT[etan]',
+ lastWeek: '[aurreko] dddd LT[etan]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s barru',
+ past: 'duela %s',
+ s: 'segundo batzuk',
+ ss: '%d segundo',
+ m: 'minutu bat',
+ mm: '%d minutu',
+ h: 'ordu bat',
+ hh: '%d ordu',
+ d: 'egun bat',
+ dd: '%d egun',
+ M: 'hilabete bat',
+ MM: '%d hilabete',
+ y: 'urte bat',
+ yy: '%d urte',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/fa.js b/vendor/assets/javascripts/momentjs/src/locale/fa.js
new file mode 100644
index 000000000..52ffb72d4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/fa.js
@@ -0,0 +1,113 @@
+//! moment.js locale configuration
+//! locale : Persian [fa]
+//! author : Ebrahim Byagowi : https://github.com/ebraminio
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '۱',
+ 2: '۲',
+ 3: '۳',
+ 4: '۴',
+ 5: '۵',
+ 6: '۶',
+ 7: '۷',
+ 8: '۸',
+ 9: '۹',
+ 0: '۰',
+ },
+ numberMap = {
+ '۱': '1',
+ '۲': '2',
+ '۳': '3',
+ '۴': '4',
+ '۵': '5',
+ '۶': '6',
+ '۷': '7',
+ '۸': '8',
+ '۹': '9',
+ '۰': '0',
+ };
+
+export default moment.defineLocale('fa', {
+ months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
+ '_'
+ ),
+ weekdays:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
+ '_'
+ ),
+ weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /قبل از ظهر|بعد از ظهر/,
+ isPM: function (input) {
+ return /بعد از ظهر/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'قبل از ظهر';
+ } else {
+ return 'بعد از ظهر';
+ }
+ },
+ calendar: {
+ sameDay: '[امروز ساعت] LT',
+ nextDay: '[فردا ساعت] LT',
+ nextWeek: 'dddd [ساعت] LT',
+ lastDay: '[دیروز ساعت] LT',
+ lastWeek: 'dddd [پیش] [ساعت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'در %s',
+ past: '%s پیش',
+ s: 'چند ثانیه',
+ ss: '%d ثانیه',
+ m: 'یک دقیقه',
+ mm: '%d دقیقه',
+ h: 'یک ساعت',
+ hh: '%d ساعت',
+ d: 'یک روز',
+ dd: '%d روز',
+ M: 'یک ماه',
+ MM: '%d ماه',
+ y: 'یک سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[۰-۹]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}م/,
+ ordinal: '%dم',
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/fi.js b/vendor/assets/javascripts/momentjs/src/locale/fi.js
new file mode 100644
index 000000000..2e20bff79
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/fi.js
@@ -0,0 +1,124 @@
+//! moment.js locale configuration
+//! locale : Finnish [fi]
+//! author : Tarmo Aidantausta : https://github.com/bleadof
+
+import moment from '../moment';
+
+var numbersPast =
+ 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
+ ' '
+ ),
+ numbersFuture = [
+ 'nolla',
+ 'yhden',
+ 'kahden',
+ 'kolmen',
+ 'neljän',
+ 'viiden',
+ 'kuuden',
+ numbersPast[7],
+ numbersPast[8],
+ numbersPast[9],
+ ];
+function translate(number, withoutSuffix, key, isFuture) {
+ var result = '';
+ switch (key) {
+ case 's':
+ return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
+ case 'ss':
+ result = isFuture ? 'sekunnin' : 'sekuntia';
+ break;
+ case 'm':
+ return isFuture ? 'minuutin' : 'minuutti';
+ case 'mm':
+ result = isFuture ? 'minuutin' : 'minuuttia';
+ break;
+ case 'h':
+ return isFuture ? 'tunnin' : 'tunti';
+ case 'hh':
+ result = isFuture ? 'tunnin' : 'tuntia';
+ break;
+ case 'd':
+ return isFuture ? 'päivän' : 'päivä';
+ case 'dd':
+ result = isFuture ? 'päivän' : 'päivää';
+ break;
+ case 'M':
+ return isFuture ? 'kuukauden' : 'kuukausi';
+ case 'MM':
+ result = isFuture ? 'kuukauden' : 'kuukautta';
+ break;
+ case 'y':
+ return isFuture ? 'vuoden' : 'vuosi';
+ case 'yy':
+ result = isFuture ? 'vuoden' : 'vuotta';
+ break;
+ }
+ result = verbalNumber(number, isFuture) + ' ' + result;
+ return result;
+}
+function verbalNumber(number, isFuture) {
+ return number < 10
+ ? isFuture
+ ? numbersFuture[number]
+ : numbersPast[number]
+ : number;
+}
+
+export default moment.defineLocale('fi', {
+ months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
+ '_'
+ ),
+ monthsShort:
+ 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
+ '_'
+ ),
+ weekdays:
+ 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
+ '_'
+ ),
+ weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
+ weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD.MM.YYYY',
+ LL: 'Do MMMM[ta] YYYY',
+ LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
+ LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
+ l: 'D.M.YYYY',
+ ll: 'Do MMM YYYY',
+ lll: 'Do MMM YYYY, [klo] HH.mm',
+ llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
+ },
+ calendar: {
+ sameDay: '[tänään] [klo] LT',
+ nextDay: '[huomenna] [klo] LT',
+ nextWeek: 'dddd [klo] LT',
+ lastDay: '[eilen] [klo] LT',
+ lastWeek: '[viime] dddd[na] [klo] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s päästä',
+ past: '%s sitten',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/fil.js b/vendor/assets/javascripts/momentjs/src/locale/fil.js
new file mode 100644
index 000000000..e0447aaf5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/fil.js
@@ -0,0 +1,58 @@
+//! moment.js locale configuration
+//! locale : Filipino [fil]
+//! author : Dan Hagman : https://github.com/hagmandan
+//! author : Matthew Co : https://github.com/matthewdeeco
+
+import moment from '../moment';
+
+export default moment.defineLocale('fil', {
+ months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
+ '_'
+ ),
+ monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+ weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+ weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'MM/D/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY HH:mm',
+ LLLL: 'dddd, MMMM DD, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: 'LT [ngayong araw]',
+ nextDay: '[Bukas ng] LT',
+ nextWeek: 'LT [sa susunod na] dddd',
+ lastDay: 'LT [kahapon]',
+ lastWeek: 'LT [noong nakaraang] dddd',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'sa loob ng %s',
+ past: '%s ang nakalipas',
+ s: 'ilang segundo',
+ ss: '%d segundo',
+ m: 'isang minuto',
+ mm: '%d minuto',
+ h: 'isang oras',
+ hh: '%d oras',
+ d: 'isang araw',
+ dd: '%d araw',
+ M: 'isang buwan',
+ MM: '%d buwan',
+ y: 'isang taon',
+ yy: '%d taon',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/fo.js b/vendor/assets/javascripts/momentjs/src/locale/fo.js
new file mode 100644
index 000000000..c8fd0bc4d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/fo.js
@@ -0,0 +1,57 @@
+//! moment.js locale configuration
+//! locale : Faroese [fo]
+//! author : Ragnar Johannesen : https://github.com/ragnar123
+//! author : Kristian Sakarisson : https://github.com/sakarisson
+
+import moment from '../moment';
+
+export default moment.defineLocale('fo', {
+ months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
+ weekdays:
+ 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
+ '_'
+ ),
+ weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
+ weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D. MMMM, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Í dag kl.] LT',
+ nextDay: '[Í morgin kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[Í gjár kl.] LT',
+ lastWeek: '[síðstu] dddd [kl] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'um %s',
+ past: '%s síðani',
+ s: 'fá sekund',
+ ss: '%d sekundir',
+ m: 'ein minuttur',
+ mm: '%d minuttir',
+ h: 'ein tími',
+ hh: '%d tímar',
+ d: 'ein dagur',
+ dd: '%d dagar',
+ M: 'ein mánaður',
+ MM: '%d mánaðir',
+ y: 'eitt ár',
+ yy: '%d ár',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/fr-ca.js b/vendor/assets/javascripts/momentjs/src/locale/fr-ca.js
new file mode 100644
index 000000000..6187291c5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/fr-ca.js
@@ -0,0 +1,70 @@
+//! moment.js locale configuration
+//! locale : French (Canada) [fr-ca]
+//! author : Jonathan Abourbih : https://github.com/jonbca
+
+import moment from '../moment';
+
+export default moment.defineLocale('fr-ca', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'D':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/fr-ch.js b/vendor/assets/javascripts/momentjs/src/locale/fr-ch.js
new file mode 100644
index 000000000..2cc90d8a3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/fr-ch.js
@@ -0,0 +1,74 @@
+//! moment.js locale configuration
+//! locale : French (Switzerland) [fr-ch]
+//! author : Gaspard Bucher : https://github.com/gaspard
+
+import moment from '../moment';
+
+export default moment.defineLocale('fr-ch', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'D':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/fr.js b/vendor/assets/javascripts/momentjs/src/locale/fr.js
new file mode 100644
index 000000000..a3afb4b9f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/fr.js
@@ -0,0 +1,108 @@
+//! moment.js locale configuration
+//! locale : French [fr]
+//! author : John Fischer : https://github.com/jfroffice
+
+import moment from '../moment';
+
+var monthsStrictRegex =
+ /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsShortStrictRegex =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
+ monthsRegex =
+ /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
+ monthsParse = [
+ /^janv/i,
+ /^févr/i,
+ /^mars/i,
+ /^avr/i,
+ /^mai/i,
+ /^juin/i,
+ /^juil/i,
+ /^août/i,
+ /^sept/i,
+ /^oct/i,
+ /^nov/i,
+ /^déc/i,
+ ];
+
+export default moment.defineLocale('fr', {
+ months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
+ '_'
+ ),
+ monthsShort:
+ 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
+ '_'
+ ),
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex: monthsStrictRegex,
+ monthsShortStrictRegex: monthsShortStrictRegex,
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Aujourd’hui à] LT',
+ nextDay: '[Demain à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[Hier à] LT',
+ lastWeek: 'dddd [dernier à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dans %s',
+ past: 'il y a %s',
+ s: 'quelques secondes',
+ ss: '%d secondes',
+ m: 'une minute',
+ mm: '%d minutes',
+ h: 'une heure',
+ hh: '%d heures',
+ d: 'un jour',
+ dd: '%d jours',
+ w: 'une semaine',
+ ww: '%d semaines',
+ M: 'un mois',
+ MM: '%d mois',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // TODO: Return 'e' when day of month > 1. Move this case inside
+ // block for masculine words below.
+ // See https://github.com/moment/moment/issues/3375
+ case 'D':
+ return number + (number === 1 ? 'er' : '');
+
+ // Words with masculine grammatical gender: mois, trimestre, jour
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ return number + (number === 1 ? 'er' : 'e');
+
+ // Words with feminine grammatical gender: semaine
+ case 'w':
+ case 'W':
+ return number + (number === 1 ? 're' : 'e');
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/fy.js b/vendor/assets/javascripts/momentjs/src/locale/fy.js
new file mode 100644
index 000000000..4844587d7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/fy.js
@@ -0,0 +1,75 @@
+//! moment.js locale configuration
+//! locale : Frisian [fy]
+//! author : Robin van der Vliet : https://github.com/robin0van0der0v
+
+import moment from '../moment';
+
+var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
+
+export default moment.defineLocale('fy', {
+ months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots[m.month()];
+ } else {
+ return monthsShortWithDots[m.month()];
+ }
+ },
+ monthsParseExact: true,
+ weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
+ '_'
+ ),
+ weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
+ weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[hjoed om] LT',
+ nextDay: '[moarn om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[juster om] LT',
+ lastWeek: '[ôfrûne] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'oer %s',
+ past: '%s lyn',
+ s: 'in pear sekonden',
+ ss: '%d sekonden',
+ m: 'ien minút',
+ mm: '%d minuten',
+ h: 'ien oere',
+ hh: '%d oeren',
+ d: 'ien dei',
+ dd: '%d dagen',
+ M: 'ien moanne',
+ MM: '%d moannen',
+ y: 'ien jier',
+ yy: '%d jierren',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ga.js b/vendor/assets/javascripts/momentjs/src/locale/ga.js
new file mode 100644
index 000000000..7f36fb661
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ga.js
@@ -0,0 +1,95 @@
+//! moment.js locale configuration
+//! locale : Irish or Irish Gaelic [ga]
+//! author : André Silva : https://github.com/askpt
+
+import moment from '../moment';
+
+var months = [
+ 'Eanáir',
+ 'Feabhra',
+ 'Márta',
+ 'Aibreán',
+ 'Bealtaine',
+ 'Meitheamh',
+ 'Iúil',
+ 'Lúnasa',
+ 'Meán Fómhair',
+ 'Deireadh Fómhair',
+ 'Samhain',
+ 'Nollaig',
+ ],
+ monthsShort = [
+ 'Ean',
+ 'Feabh',
+ 'Márt',
+ 'Aib',
+ 'Beal',
+ 'Meith',
+ 'Iúil',
+ 'Lún',
+ 'M.F.',
+ 'D.F.',
+ 'Samh',
+ 'Noll',
+ ],
+ weekdays = [
+ 'Dé Domhnaigh',
+ 'Dé Luain',
+ 'Dé Máirt',
+ 'Dé Céadaoin',
+ 'Déardaoin',
+ 'Dé hAoine',
+ 'Dé Sathairn',
+ ],
+ weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
+ weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
+
+export default moment.defineLocale('ga', {
+ months: months,
+ monthsShort: monthsShort,
+ monthsParseExact: true,
+ weekdays: weekdays,
+ weekdaysShort: weekdaysShort,
+ weekdaysMin: weekdaysMin,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Inniu ag] LT',
+ nextDay: '[Amárach ag] LT',
+ nextWeek: 'dddd [ag] LT',
+ lastDay: '[Inné ag] LT',
+ lastWeek: 'dddd [seo caite] [ag] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'i %s',
+ past: '%s ó shin',
+ s: 'cúpla soicind',
+ ss: '%d soicind',
+ m: 'nóiméad',
+ mm: '%d nóiméad',
+ h: 'uair an chloig',
+ hh: '%d uair an chloig',
+ d: 'lá',
+ dd: '%d lá',
+ M: 'mí',
+ MM: '%d míonna',
+ y: 'bliain',
+ yy: '%d bliain',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/gd.js b/vendor/assets/javascripts/momentjs/src/locale/gd.js
new file mode 100644
index 000000000..81f735b88
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/gd.js
@@ -0,0 +1,95 @@
+//! moment.js locale configuration
+//! locale : Scottish Gaelic [gd]
+//! author : Jon Ashdown : https://github.com/jonashdown
+
+import moment from '../moment';
+
+var months = [
+ 'Am Faoilleach',
+ 'An Gearran',
+ 'Am Màrt',
+ 'An Giblean',
+ 'An Cèitean',
+ 'An t-Ògmhios',
+ 'An t-Iuchar',
+ 'An Lùnastal',
+ 'An t-Sultain',
+ 'An Dàmhair',
+ 'An t-Samhain',
+ 'An Dùbhlachd',
+ ],
+ monthsShort = [
+ 'Faoi',
+ 'Gear',
+ 'Màrt',
+ 'Gibl',
+ 'Cèit',
+ 'Ògmh',
+ 'Iuch',
+ 'Lùn',
+ 'Sult',
+ 'Dàmh',
+ 'Samh',
+ 'Dùbh',
+ ],
+ weekdays = [
+ 'Didòmhnaich',
+ 'Diluain',
+ 'Dimàirt',
+ 'Diciadain',
+ 'Diardaoin',
+ 'Dihaoine',
+ 'Disathairne',
+ ],
+ weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
+ weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
+
+export default moment.defineLocale('gd', {
+ months: months,
+ monthsShort: monthsShort,
+ monthsParseExact: true,
+ weekdays: weekdays,
+ weekdaysShort: weekdaysShort,
+ weekdaysMin: weekdaysMin,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[An-diugh aig] LT',
+ nextDay: '[A-màireach aig] LT',
+ nextWeek: 'dddd [aig] LT',
+ lastDay: '[An-dè aig] LT',
+ lastWeek: 'dddd [seo chaidh] [aig] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ann an %s',
+ past: 'bho chionn %s',
+ s: 'beagan diogan',
+ ss: '%d diogan',
+ m: 'mionaid',
+ mm: '%d mionaidean',
+ h: 'uair',
+ hh: '%d uairean',
+ d: 'latha',
+ dd: '%d latha',
+ M: 'mìos',
+ MM: '%d mìosan',
+ y: 'bliadhna',
+ yy: '%d bliadhna',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
+ ordinal: function (number) {
+ var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/gl.js b/vendor/assets/javascripts/momentjs/src/locale/gl.js
new file mode 100644
index 000000000..980591c47
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/gl.js
@@ -0,0 +1,75 @@
+//! moment.js locale configuration
+//! locale : Galician [gl]
+//! author : Juan G. Hurtado : https://github.com/juanghurtado
+
+import moment from '../moment';
+
+export default moment.defineLocale('gl', {
+ months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
+ '_'
+ ),
+ monthsShort:
+ 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
+ weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
+ weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY H:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
+ },
+ nextDay: function () {
+ return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
+ },
+ nextWeek: function () {
+ return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
+ },
+ lastDay: function () {
+ return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
+ },
+ lastWeek: function () {
+ return (
+ '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
+ );
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (str) {
+ if (str.indexOf('un') === 0) {
+ return 'n' + str;
+ }
+ return 'en ' + str;
+ },
+ past: 'hai %s',
+ s: 'uns segundos',
+ ss: '%d segundos',
+ m: 'un minuto',
+ mm: '%d minutos',
+ h: 'unha hora',
+ hh: '%d horas',
+ d: 'un día',
+ dd: '%d días',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/gom-deva.js b/vendor/assets/javascripts/momentjs/src/locale/gom-deva.js
new file mode 100644
index 000000000..294e35867
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/gom-deva.js
@@ -0,0 +1,126 @@
+//! moment.js locale configuration
+//! locale : Konkani Devanagari script [gom-deva]
+//! author : The Discoverer : https://github.com/WikiDiscoverer
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
+ ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
+ m: ['एका मिणटान', 'एक मिनूट'],
+ mm: [number + ' मिणटांनी', number + ' मिणटां'],
+ h: ['एका वरान', 'एक वर'],
+ hh: [number + ' वरांनी', number + ' वरां'],
+ d: ['एका दिसान', 'एक दीस'],
+ dd: [number + ' दिसांनी', number + ' दीस'],
+ M: ['एका म्हयन्यान', 'एक म्हयनो'],
+ MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
+ y: ['एका वर्सान', 'एक वर्स'],
+ yy: [number + ' वर्सांनी', number + ' वर्सां'],
+ };
+ return isFuture ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('gom-deva', {
+ months: {
+ standalone:
+ 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
+ '_'
+ ),
+ format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
+ '_'
+ ),
+ isFormat: /MMMM(\s)+D[oD]?/,
+ },
+ monthsShort:
+ 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
+ weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
+ weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'A h:mm [वाजतां]',
+ LTS: 'A h:mm:ss [वाजतां]',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY A h:mm [वाजतां]',
+ LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
+ llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
+ },
+ calendar: {
+ sameDay: '[आयज] LT',
+ nextDay: '[फाल्यां] LT',
+ nextWeek: '[फुडलो] dddd[,] LT',
+ lastDay: '[काल] LT',
+ lastWeek: '[फाटलो] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s',
+ past: '%s आदीं',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // the ordinal 'वेर' only applies to day of the month
+ case 'D':
+ return number + 'वेर';
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ case 'w':
+ case 'W':
+ return number;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
+ },
+ meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'राती') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सकाळीं') {
+ return hour;
+ } else if (meridiem === 'दनपारां') {
+ return hour > 12 ? hour : hour + 12;
+ } else if (meridiem === 'सांजे') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'राती';
+ } else if (hour < 12) {
+ return 'सकाळीं';
+ } else if (hour < 16) {
+ return 'दनपारां';
+ } else if (hour < 20) {
+ return 'सांजे';
+ } else {
+ return 'राती';
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/gom-latn.js b/vendor/assets/javascripts/momentjs/src/locale/gom-latn.js
new file mode 100644
index 000000000..d237161f7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/gom-latn.js
@@ -0,0 +1,124 @@
+//! moment.js locale configuration
+//! locale : Konkani Latin script [gom-latn]
+//! author : The Discoverer : https://github.com/WikiDiscoverer
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['thoddea sekondamni', 'thodde sekond'],
+ ss: [number + ' sekondamni', number + ' sekond'],
+ m: ['eka mintan', 'ek minut'],
+ mm: [number + ' mintamni', number + ' mintam'],
+ h: ['eka voran', 'ek vor'],
+ hh: [number + ' voramni', number + ' voram'],
+ d: ['eka disan', 'ek dis'],
+ dd: [number + ' disamni', number + ' dis'],
+ M: ['eka mhoinean', 'ek mhoino'],
+ MM: [number + ' mhoineamni', number + ' mhoine'],
+ y: ['eka vorsan', 'ek voros'],
+ yy: [number + ' vorsamni', number + ' vorsam'],
+ };
+ return isFuture ? format[key][0] : format[key][1];
+}
+
+export default moment.defineLocale('gom-latn', {
+ months: {
+ standalone:
+ 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
+ '_'
+ ),
+ format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
+ '_'
+ ),
+ isFormat: /MMMM(\s)+D[oD]?/,
+ },
+ monthsShort:
+ 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
+ monthsParseExact: true,
+ weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
+ weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
+ weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'A h:mm [vazta]',
+ LTS: 'A h:mm:ss [vazta]',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY A h:mm [vazta]',
+ LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
+ llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
+ },
+ calendar: {
+ sameDay: '[Aiz] LT',
+ nextDay: '[Faleam] LT',
+ nextWeek: '[Fuddlo] dddd[,] LT',
+ lastDay: '[Kal] LT',
+ lastWeek: '[Fattlo] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s',
+ past: '%s adim',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(er)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ // the ordinal 'er' only applies to day of the month
+ case 'D':
+ return number + 'er';
+ default:
+ case 'M':
+ case 'Q':
+ case 'DDD':
+ case 'd':
+ case 'w':
+ case 'W':
+ return number;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week
+ doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
+ },
+ meridiemParse: /rati|sokallim|donparam|sanje/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'rati') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'sokallim') {
+ return hour;
+ } else if (meridiem === 'donparam') {
+ return hour > 12 ? hour : hour + 12;
+ } else if (meridiem === 'sanje') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'rati';
+ } else if (hour < 12) {
+ return 'sokallim';
+ } else if (hour < 16) {
+ return 'donparam';
+ } else if (hour < 20) {
+ return 'sanje';
+ } else {
+ return 'rati';
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/gu.js b/vendor/assets/javascripts/momentjs/src/locale/gu.js
new file mode 100644
index 000000000..d432d2c33
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/gu.js
@@ -0,0 +1,122 @@
+//! moment.js locale configuration
+//! locale : Gujarati [gu]
+//! author : Kaushik Thanki : https://github.com/Kaushik1987
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '૧',
+ 2: '૨',
+ 3: '૩',
+ 4: '૪',
+ 5: '૫',
+ 6: '૬',
+ 7: '૭',
+ 8: '૮',
+ 9: '૯',
+ 0: '૦',
+ },
+ numberMap = {
+ '૧': '1',
+ '૨': '2',
+ '૩': '3',
+ '૪': '4',
+ '૫': '5',
+ '૬': '6',
+ '૭': '7',
+ '૮': '8',
+ '૯': '9',
+ '૦': '0',
+ };
+
+export default moment.defineLocale('gu', {
+ months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
+ '_'
+ ),
+ monthsShort:
+ 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
+ '_'
+ ),
+ weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
+ weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm વાગ્યે',
+ LTS: 'A h:mm:ss વાગ્યે',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
+ },
+ calendar: {
+ sameDay: '[આજ] LT',
+ nextDay: '[કાલે] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ગઇકાલે] LT',
+ lastWeek: '[પાછલા] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s મા',
+ past: '%s પહેલા',
+ s: 'અમુક પળો',
+ ss: '%d સેકંડ',
+ m: 'એક મિનિટ',
+ mm: '%d મિનિટ',
+ h: 'એક કલાક',
+ hh: '%d કલાક',
+ d: 'એક દિવસ',
+ dd: '%d દિવસ',
+ M: 'એક મહિનો',
+ MM: '%d મહિનો',
+ y: 'એક વર્ષ',
+ yy: '%d વર્ષ',
+ },
+ preparse: function (string) {
+ return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
+ meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'રાત') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'સવાર') {
+ return hour;
+ } else if (meridiem === 'બપોર') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'સાંજ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'રાત';
+ } else if (hour < 10) {
+ return 'સવાર';
+ } else if (hour < 17) {
+ return 'બપોર';
+ } else if (hour < 20) {
+ return 'સાંજ';
+ } else {
+ return 'રાત';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/he.js b/vendor/assets/javascripts/momentjs/src/locale/he.js
new file mode 100644
index 000000000..08add2cf6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/he.js
@@ -0,0 +1,94 @@
+//! moment.js locale configuration
+//! locale : Hebrew [he]
+//! author : Tomer Cohen : https://github.com/tomer
+//! author : Moshe Simantov : https://github.com/DevelopmentIL
+//! author : Tal Ater : https://github.com/TalAter
+
+import moment from '../moment';
+
+export default moment.defineLocale('he', {
+ months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
+ weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
+ weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
+ weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [ב]MMMM YYYY',
+ LLL: 'D [ב]MMMM YYYY HH:mm',
+ LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
+ l: 'D/M/YYYY',
+ ll: 'D MMM YYYY',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd, D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[היום ב־]LT',
+ nextDay: '[מחר ב־]LT',
+ nextWeek: 'dddd [בשעה] LT',
+ lastDay: '[אתמול ב־]LT',
+ lastWeek: '[ביום] dddd [האחרון בשעה] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'בעוד %s',
+ past: 'לפני %s',
+ s: 'מספר שניות',
+ ss: '%d שניות',
+ m: 'דקה',
+ mm: '%d דקות',
+ h: 'שעה',
+ hh: function (number) {
+ if (number === 2) {
+ return 'שעתיים';
+ }
+ return number + ' שעות';
+ },
+ d: 'יום',
+ dd: function (number) {
+ if (number === 2) {
+ return 'יומיים';
+ }
+ return number + ' ימים';
+ },
+ M: 'חודש',
+ MM: function (number) {
+ if (number === 2) {
+ return 'חודשיים';
+ }
+ return number + ' חודשים';
+ },
+ y: 'שנה',
+ yy: function (number) {
+ if (number === 2) {
+ return 'שנתיים';
+ } else if (number % 10 === 0 && number !== 10) {
+ return number + ' שנה';
+ }
+ return number + ' שנים';
+ },
+ },
+ meridiemParse:
+ /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
+ isPM: function (input) {
+ return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 5) {
+ return 'לפנות בוקר';
+ } else if (hour < 10) {
+ return 'בבוקר';
+ } else if (hour < 12) {
+ return isLower ? 'לפנה"צ' : 'לפני הצהריים';
+ } else if (hour < 18) {
+ return isLower ? 'אחה"צ' : 'אחרי הצהריים';
+ } else {
+ return 'בערב';
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/hi.js b/vendor/assets/javascripts/momentjs/src/locale/hi.js
new file mode 100644
index 000000000..2e3a973af
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/hi.js
@@ -0,0 +1,168 @@
+//! moment.js locale configuration
+//! locale : Hindi [hi]
+//! author : Mayank Singhal : https://github.com/mayanksinghal
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ },
+ monthsParse = [
+ /^जन/i,
+ /^फ़र|फर/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सितं|सित/i,
+ /^अक्टू/i,
+ /^नव|नवं/i,
+ /^दिसं|दिस/i,
+ ],
+ shortMonthsParse = [
+ /^जन/i,
+ /^फ़र/i,
+ /^मार्च/i,
+ /^अप्रै/i,
+ /^मई/i,
+ /^जून/i,
+ /^जुल/i,
+ /^अग/i,
+ /^सित/i,
+ /^अक्टू/i,
+ /^नव/i,
+ /^दिस/i,
+ ];
+
+export default moment.defineLocale('hi', {
+ months: {
+ format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
+ '_'
+ ),
+ standalone:
+ 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
+ weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm बजे',
+ LTS: 'A h:mm:ss बजे',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm बजे',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
+ },
+
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: shortMonthsParse,
+
+ monthsRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsShortRegex:
+ /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
+
+ monthsStrictRegex:
+ /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
+
+ monthsShortStrictRegex:
+ /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
+
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[कल] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[कल] LT',
+ lastWeek: '[पिछले] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s में',
+ past: '%s पहले',
+ s: 'कुछ ही क्षण',
+ ss: '%d सेकंड',
+ m: 'एक मिनट',
+ mm: '%d मिनट',
+ h: 'एक घंटा',
+ hh: '%d घंटे',
+ d: 'एक दिन',
+ dd: '%d दिन',
+ M: 'एक महीने',
+ MM: '%d महीने',
+ y: 'एक वर्ष',
+ yy: '%d वर्ष',
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // Hindi notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
+ meridiemParse: /रात|सुबह|दोपहर|शाम/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'रात') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सुबह') {
+ return hour;
+ } else if (meridiem === 'दोपहर') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'शाम') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'रात';
+ } else if (hour < 10) {
+ return 'सुबह';
+ } else if (hour < 17) {
+ return 'दोपहर';
+ } else if (hour < 20) {
+ return 'शाम';
+ } else {
+ return 'रात';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/hr.js b/vendor/assets/javascripts/momentjs/src/locale/hr.js
new file mode 100644
index 000000000..48c1e9ebc
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/hr.js
@@ -0,0 +1,156 @@
+//! moment.js locale configuration
+//! locale : Croatian [hr]
+//! author : Bojan Marković : https://github.com/bmarkovic
+
+import moment from '../moment';
+
+function translate(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ if (number === 1) {
+ result += 'sekunda';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sekunde';
+ } else {
+ result += 'sekundi';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
+ }
+}
+
+export default moment.defineLocale('hr', {
+ months: {
+ format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
+ '_'
+ ),
+ standalone:
+ 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
+ '_'
+ ),
+ },
+ monthsShort:
+ 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'Do MMMM YYYY',
+ LLL: 'Do MMMM YYYY H:mm',
+ LLLL: 'dddd, Do MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[jučer u] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[prošlu] [nedjelju] [u] LT';
+ case 3:
+ return '[prošlu] [srijedu] [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'par sekundi',
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: 'dan',
+ dd: translate,
+ M: 'mjesec',
+ MM: translate,
+ y: 'godinu',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/hu.js b/vendor/assets/javascripts/momentjs/src/locale/hu.js
new file mode 100644
index 000000000..f2f59817e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/hu.js
@@ -0,0 +1,118 @@
+//! moment.js locale configuration
+//! locale : Hungarian [hu]
+//! author : Adam Brunner : https://github.com/adambrunner
+//! author : Peter Viszt : https://github.com/passatgt
+
+import moment from '../moment';
+
+var weekEndings =
+ 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
+function translate(number, withoutSuffix, key, isFuture) {
+ var num = number;
+ switch (key) {
+ case 's':
+ return isFuture || withoutSuffix
+ ? 'néhány másodperc'
+ : 'néhány másodperce';
+ case 'ss':
+ return num + (isFuture || withoutSuffix)
+ ? ' másodperc'
+ : ' másodperce';
+ case 'm':
+ return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'mm':
+ return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'h':
+ return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'hh':
+ return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'd':
+ return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'dd':
+ return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'M':
+ return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'MM':
+ return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'y':
+ return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
+ case 'yy':
+ return num + (isFuture || withoutSuffix ? ' év' : ' éve');
+ }
+ return '';
+}
+function week(isFuture) {
+ return (
+ (isFuture ? '' : '[múlt] ') +
+ '[' +
+ weekEndings[this.day()] +
+ '] LT[-kor]'
+ );
+}
+
+export default moment.defineLocale('hu', {
+ months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
+ weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
+ weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'YYYY.MM.DD.',
+ LL: 'YYYY. MMMM D.',
+ LLL: 'YYYY. MMMM D. H:mm',
+ LLLL: 'YYYY. MMMM D., dddd H:mm',
+ },
+ meridiemParse: /de|du/i,
+ isPM: function (input) {
+ return input.charAt(1).toLowerCase() === 'u';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower === true ? 'de' : 'DE';
+ } else {
+ return isLower === true ? 'du' : 'DU';
+ }
+ },
+ calendar: {
+ sameDay: '[ma] LT[-kor]',
+ nextDay: '[holnap] LT[-kor]',
+ nextWeek: function () {
+ return week.call(this, true);
+ },
+ lastDay: '[tegnap] LT[-kor]',
+ lastWeek: function () {
+ return week.call(this, false);
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s múlva',
+ past: '%s',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/hy-am.js b/vendor/assets/javascripts/momentjs/src/locale/hy-am.js
new file mode 100644
index 000000000..283cfbd97
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/hy-am.js
@@ -0,0 +1,94 @@
+//! moment.js locale configuration
+//! locale : Armenian [hy-am]
+//! author : Armendarabyan : https://github.com/armendarabyan
+
+import moment from '../moment';
+
+export default moment.defineLocale('hy-am', {
+ months: {
+ format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
+ '_'
+ ),
+ standalone:
+ 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
+ weekdays:
+ 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
+ '_'
+ ),
+ weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+ weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY թ.',
+ LLL: 'D MMMM YYYY թ., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY թ., HH:mm',
+ },
+ calendar: {
+ sameDay: '[այսօր] LT',
+ nextDay: '[վաղը] LT',
+ lastDay: '[երեկ] LT',
+ nextWeek: function () {
+ return 'dddd [օրը ժամը] LT';
+ },
+ lastWeek: function () {
+ return '[անցած] dddd [օրը ժամը] LT';
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s հետո',
+ past: '%s առաջ',
+ s: 'մի քանի վայրկյան',
+ ss: '%d վայրկյան',
+ m: 'րոպե',
+ mm: '%d րոպե',
+ h: 'ժամ',
+ hh: '%d ժամ',
+ d: 'օր',
+ dd: '%d օր',
+ M: 'ամիս',
+ MM: '%d ամիս',
+ y: 'տարի',
+ yy: '%d տարի',
+ },
+ meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
+ isPM: function (input) {
+ return /^(ցերեկվա|երեկոյան)$/.test(input);
+ },
+ meridiem: function (hour) {
+ if (hour < 4) {
+ return 'գիշերվա';
+ } else if (hour < 12) {
+ return 'առավոտվա';
+ } else if (hour < 17) {
+ return 'ցերեկվա';
+ } else {
+ return 'երեկոյան';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'DDD':
+ case 'w':
+ case 'W':
+ case 'DDDo':
+ if (number === 1) {
+ return number + '-ին';
+ }
+ return number + '-րդ';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/id.js b/vendor/assets/javascripts/momentjs/src/locale/id.js
new file mode 100644
index 000000000..3260e1c4a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/id.js
@@ -0,0 +1,76 @@
+//! moment.js locale configuration
+//! locale : Indonesian [id]
+//! author : Mohammad Satrio Utomo : https://github.com/tyok
+//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
+
+import moment from '../moment';
+
+export default moment.defineLocale('id', {
+ months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
+ weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
+ weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
+ weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|siang|sore|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'siang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sore' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'siang';
+ } else if (hours < 19) {
+ return 'sore';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Besok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kemarin pukul] LT',
+ lastWeek: 'dddd [lalu pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lalu',
+ s: 'beberapa detik',
+ ss: '%d detik',
+ m: 'semenit',
+ mm: '%d menit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/is.js b/vendor/assets/javascripts/momentjs/src/locale/is.js
new file mode 100644
index 000000000..d2c6f47ea
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/is.js
@@ -0,0 +1,140 @@
+//! moment.js locale configuration
+//! locale : Icelandic [is]
+//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
+
+import moment from '../moment';
+
+function plural(n) {
+ if (n % 100 === 11) {
+ return true;
+ } else if (n % 10 === 1) {
+ return false;
+ }
+ return true;
+}
+function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's':
+ return withoutSuffix || isFuture
+ ? 'nokkrar sekúndur'
+ : 'nokkrum sekúndum';
+ case 'ss':
+ if (plural(number)) {
+ return (
+ result +
+ (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
+ );
+ }
+ return result + 'sekúnda';
+ case 'm':
+ return withoutSuffix ? 'mínúta' : 'mínútu';
+ case 'mm':
+ if (plural(number)) {
+ return (
+ result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
+ );
+ } else if (withoutSuffix) {
+ return result + 'mínúta';
+ }
+ return result + 'mínútu';
+ case 'hh':
+ if (plural(number)) {
+ return (
+ result +
+ (withoutSuffix || isFuture
+ ? 'klukkustundir'
+ : 'klukkustundum')
+ );
+ }
+ return result + 'klukkustund';
+ case 'd':
+ if (withoutSuffix) {
+ return 'dagur';
+ }
+ return isFuture ? 'dag' : 'degi';
+ case 'dd':
+ if (plural(number)) {
+ if (withoutSuffix) {
+ return result + 'dagar';
+ }
+ return result + (isFuture ? 'daga' : 'dögum');
+ } else if (withoutSuffix) {
+ return result + 'dagur';
+ }
+ return result + (isFuture ? 'dag' : 'degi');
+ case 'M':
+ if (withoutSuffix) {
+ return 'mánuður';
+ }
+ return isFuture ? 'mánuð' : 'mánuði';
+ case 'MM':
+ if (plural(number)) {
+ if (withoutSuffix) {
+ return result + 'mánuðir';
+ }
+ return result + (isFuture ? 'mánuði' : 'mánuðum');
+ } else if (withoutSuffix) {
+ return result + 'mánuður';
+ }
+ return result + (isFuture ? 'mánuð' : 'mánuði');
+ case 'y':
+ return withoutSuffix || isFuture ? 'ár' : 'ári';
+ case 'yy':
+ if (plural(number)) {
+ return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
+ }
+ return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
+ }
+}
+
+export default moment.defineLocale('is', {
+ months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
+ weekdays:
+ 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
+ '_'
+ ),
+ weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
+ weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] H:mm',
+ LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
+ },
+ calendar: {
+ sameDay: '[í dag kl.] LT',
+ nextDay: '[á morgun kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[í gær kl.] LT',
+ lastWeek: '[síðasta] dddd [kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'eftir %s',
+ past: 'fyrir %s síðan',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: 'klukkustund',
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/it-ch.js b/vendor/assets/javascripts/momentjs/src/locale/it-ch.js
new file mode 100644
index 000000000..343745328
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/it-ch.js
@@ -0,0 +1,64 @@
+//! moment.js locale configuration
+//! locale : Italian (Switzerland) [it-ch]
+//! author : xfh : https://github.com/xfh
+
+import moment from '../moment';
+
+export default moment.defineLocale('it-ch', {
+ months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
+ '_'
+ ),
+ monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+ weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
+ weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Oggi alle] LT',
+ nextDay: '[Domani alle] LT',
+ nextWeek: 'dddd [alle] LT',
+ lastDay: '[Ieri alle] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[la scorsa] dddd [alle] LT';
+ default:
+ return '[lo scorso] dddd [alle] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (s) {
+ return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
+ },
+ past: '%s fa',
+ s: 'alcuni secondi',
+ ss: '%d secondi',
+ m: 'un minuto',
+ mm: '%d minuti',
+ h: "un'ora",
+ hh: '%d ore',
+ d: 'un giorno',
+ dd: '%d giorni',
+ M: 'un mese',
+ MM: '%d mesi',
+ y: 'un anno',
+ yy: '%d anni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/it.js b/vendor/assets/javascripts/momentjs/src/locale/it.js
new file mode 100644
index 000000000..46aaccfbe
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/it.js
@@ -0,0 +1,106 @@
+//! moment.js locale configuration
+//! locale : Italian [it]
+//! author : Lorenzo : https://github.com/aliem
+//! author: Mattia Larentis: https://github.com/nostalgiaz
+//! author: Marco : https://github.com/Manfre98
+
+import moment from '../moment';
+
+export default moment.defineLocale('it', {
+ months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
+ '_'
+ ),
+ monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+ weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
+ weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: function () {
+ return (
+ '[Oggi a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ nextDay: function () {
+ return (
+ '[Domani a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ nextWeek: function () {
+ return (
+ 'dddd [a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ lastDay: function () {
+ return (
+ '[Ieri a' +
+ (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
+ ']LT'
+ );
+ },
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return (
+ '[La scorsa] dddd [a' +
+ (this.hours() > 1
+ ? 'lle '
+ : this.hours() === 0
+ ? ' '
+ : "ll'") +
+ ']LT'
+ );
+ default:
+ return (
+ '[Lo scorso] dddd [a' +
+ (this.hours() > 1
+ ? 'lle '
+ : this.hours() === 0
+ ? ' '
+ : "ll'") +
+ ']LT'
+ );
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'tra %s',
+ past: '%s fa',
+ s: 'alcuni secondi',
+ ss: '%d secondi',
+ m: 'un minuto',
+ mm: '%d minuti',
+ h: "un'ora",
+ hh: '%d ore',
+ d: 'un giorno',
+ dd: '%d giorni',
+ w: 'una settimana',
+ ww: '%d settimane',
+ M: 'un mese',
+ MM: '%d mesi',
+ y: 'un anno',
+ yy: '%d anni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ja.js b/vendor/assets/javascripts/momentjs/src/locale/ja.js
new file mode 100644
index 000000000..abe921ad4
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ja.js
@@ -0,0 +1,148 @@
+//! moment.js locale configuration
+//! locale : Japanese [ja]
+//! author : LI Long : https://github.com/baryon
+
+import moment from '../moment';
+
+export default moment.defineLocale('ja', {
+ eras: [
+ {
+ since: '2019-05-01',
+ offset: 1,
+ name: '令和',
+ narrow: '㋿',
+ abbr: 'R',
+ },
+ {
+ since: '1989-01-08',
+ until: '2019-04-30',
+ offset: 1,
+ name: '平成',
+ narrow: '㍻',
+ abbr: 'H',
+ },
+ {
+ since: '1926-12-25',
+ until: '1989-01-07',
+ offset: 1,
+ name: '昭和',
+ narrow: '㍼',
+ abbr: 'S',
+ },
+ {
+ since: '1912-07-30',
+ until: '1926-12-24',
+ offset: 1,
+ name: '大正',
+ narrow: '㍽',
+ abbr: 'T',
+ },
+ {
+ since: '1873-01-01',
+ until: '1912-07-29',
+ offset: 6,
+ name: '明治',
+ narrow: '㍾',
+ abbr: 'M',
+ },
+ {
+ since: '0001-01-01',
+ until: '1873-12-31',
+ offset: 1,
+ name: '西暦',
+ narrow: 'AD',
+ abbr: 'AD',
+ },
+ {
+ since: '0000-12-31',
+ until: -Infinity,
+ offset: 1,
+ name: '紀元前',
+ narrow: 'BC',
+ abbr: 'BC',
+ },
+ ],
+ eraYearOrdinalRegex: /(元|\d+)年/,
+ eraYearOrdinalParse: function (input, match) {
+ return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
+ },
+ months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
+ weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
+ weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日 dddd HH:mm',
+ l: 'YYYY/MM/DD',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日(ddd) HH:mm',
+ },
+ meridiemParse: /午前|午後/i,
+ isPM: function (input) {
+ return input === '午後';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return '午前';
+ } else {
+ return '午後';
+ }
+ },
+ calendar: {
+ sameDay: '[今日] LT',
+ nextDay: '[明日] LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ return '[来週]dddd LT';
+ } else {
+ return 'dddd LT';
+ }
+ },
+ lastDay: '[昨日] LT',
+ lastWeek: function (now) {
+ if (this.week() !== now.week()) {
+ return '[先週]dddd LT';
+ } else {
+ return 'dddd LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}日/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'y':
+ return number === 1 ? '元年' : number + '年';
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '数秒',
+ ss: '%d秒',
+ m: '1分',
+ mm: '%d分',
+ h: '1時間',
+ hh: '%d時間',
+ d: '1日',
+ dd: '%d日',
+ M: '1ヶ月',
+ MM: '%dヶ月',
+ y: '1年',
+ yy: '%d年',
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/jv.js b/vendor/assets/javascripts/momentjs/src/locale/jv.js
new file mode 100644
index 000000000..b52f48d18
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/jv.js
@@ -0,0 +1,76 @@
+//! moment.js locale configuration
+//! locale : Javanese [jv]
+//! author : Rony Lantip : https://github.com/lantip
+//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
+
+import moment from '../moment';
+
+export default moment.defineLocale('jv', {
+ months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
+ weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
+ weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
+ weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /enjing|siyang|sonten|ndalu/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'enjing') {
+ return hour;
+ } else if (meridiem === 'siyang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'enjing';
+ } else if (hours < 15) {
+ return 'siyang';
+ } else if (hours < 19) {
+ return 'sonten';
+ } else {
+ return 'ndalu';
+ }
+ },
+ calendar: {
+ sameDay: '[Dinten puniko pukul] LT',
+ nextDay: '[Mbenjang pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kala wingi pukul] LT',
+ lastWeek: 'dddd [kepengker pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'wonten ing %s',
+ past: '%s ingkang kepengker',
+ s: 'sawetawis detik',
+ ss: '%d detik',
+ m: 'setunggal menit',
+ mm: '%d menit',
+ h: 'setunggal jam',
+ hh: '%d jam',
+ d: 'sedinten',
+ dd: '%d dinten',
+ M: 'sewulan',
+ MM: '%d wulan',
+ y: 'setaun',
+ yy: '%d taun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ka.js b/vendor/assets/javascripts/momentjs/src/locale/ka.js
new file mode 100644
index 000000000..15b6ead4f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ka.js
@@ -0,0 +1,92 @@
+//! moment.js locale configuration
+//! locale : Georgian [ka]
+//! author : Irakli Janiashvili : https://github.com/IrakliJani
+
+import moment from '../moment';
+
+export default moment.defineLocale('ka', {
+ months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
+ '_'
+ ),
+ monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
+ weekdays: {
+ standalone:
+ 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
+ '_'
+ ),
+ format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
+ '_'
+ ),
+ isFormat: /(წინა|შემდეგ)/,
+ },
+ weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
+ weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[დღეს] LT[-ზე]',
+ nextDay: '[ხვალ] LT[-ზე]',
+ lastDay: '[გუშინ] LT[-ზე]',
+ nextWeek: '[შემდეგ] dddd LT[-ზე]',
+ lastWeek: '[წინა] dddd LT-ზე',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: function (s) {
+ return s.replace(
+ /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,
+ function ($0, $1, $2) {
+ return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
+ }
+ );
+ },
+ past: function (s) {
+ if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
+ return s.replace(/(ი|ე)$/, 'ის წინ');
+ }
+ if (/წელი/.test(s)) {
+ return s.replace(/წელი$/, 'წლის წინ');
+ }
+ return s;
+ },
+ s: 'რამდენიმე წამი',
+ ss: '%d წამი',
+ m: 'წუთი',
+ mm: '%d წუთი',
+ h: 'საათი',
+ hh: '%d საათი',
+ d: 'დღე',
+ dd: '%d დღე',
+ M: 'თვე',
+ MM: '%d თვე',
+ y: 'წელი',
+ yy: '%d წელი',
+ },
+ dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
+ ordinal: function (number) {
+ if (number === 0) {
+ return number;
+ }
+ if (number === 1) {
+ return number + '-ლი';
+ }
+ if (
+ number < 20 ||
+ (number <= 100 && number % 20 === 0) ||
+ number % 100 === 0
+ ) {
+ return 'მე-' + number;
+ }
+ return number + '-ე';
+ },
+ week: {
+ dow: 1,
+ doy: 7,
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/kk.js b/vendor/assets/javascripts/momentjs/src/locale/kk.js
new file mode 100644
index 000000000..9cab15256
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/kk.js
@@ -0,0 +1,82 @@
+//! moment.js locale configuration
+//! locale : Kazakh [kk]
+//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
+
+import moment from '../moment';
+
+var suffixes = {
+ 0: '-ші',
+ 1: '-ші',
+ 2: '-ші',
+ 3: '-ші',
+ 4: '-ші',
+ 5: '-ші',
+ 6: '-шы',
+ 7: '-ші',
+ 8: '-ші',
+ 9: '-шы',
+ 10: '-шы',
+ 20: '-шы',
+ 30: '-шы',
+ 40: '-шы',
+ 50: '-ші',
+ 60: '-шы',
+ 70: '-ші',
+ 80: '-ші',
+ 90: '-шы',
+ 100: '-ші',
+};
+
+export default moment.defineLocale('kk', {
+ months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
+ '_'
+ ),
+ monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
+ weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
+ '_'
+ ),
+ weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
+ weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бүгін сағат] LT',
+ nextDay: '[Ертең сағат] LT',
+ nextWeek: 'dddd [сағат] LT',
+ lastDay: '[Кеше сағат] LT',
+ lastWeek: '[Өткен аптаның] dddd [сағат] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ішінде',
+ past: '%s бұрын',
+ s: 'бірнеше секунд',
+ ss: '%d секунд',
+ m: 'бір минут',
+ mm: '%d минут',
+ h: 'бір сағат',
+ hh: '%d сағат',
+ d: 'бір күн',
+ dd: '%d күн',
+ M: 'бір ай',
+ MM: '%d ай',
+ y: 'бір жыл',
+ yy: '%d жыл',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes[number] || suffixes[a] || suffixes[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/km.js b/vendor/assets/javascripts/momentjs/src/locale/km.js
new file mode 100644
index 000000000..984c4dcc6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/km.js
@@ -0,0 +1,103 @@
+//! moment.js locale configuration
+//! locale : Cambodian [km]
+//! author : Kruy Vanna : https://github.com/kruyvanna
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '១',
+ 2: '២',
+ 3: '៣',
+ 4: '៤',
+ 5: '៥',
+ 6: '៦',
+ 7: '៧',
+ 8: '៨',
+ 9: '៩',
+ 0: '០',
+ },
+ numberMap = {
+ '១': '1',
+ '២': '2',
+ '៣': '3',
+ '៤': '4',
+ '៥': '5',
+ '៦': '6',
+ '៧': '7',
+ '៨': '8',
+ '៩': '9',
+ '០': '0',
+ };
+
+export default moment.defineLocale('km', {
+ months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
+ '_'
+ ),
+ weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
+ weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
+ weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ព្រឹក|ល្ងាច/,
+ isPM: function (input) {
+ return input === 'ល្ងាច';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ព្រឹក';
+ } else {
+ return 'ល្ងាច';
+ }
+ },
+ calendar: {
+ sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
+ nextDay: '[ស្អែក ម៉ោង] LT',
+ nextWeek: 'dddd [ម៉ោង] LT',
+ lastDay: '[ម្សិលមិញ ម៉ោង] LT',
+ lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sទៀត',
+ past: '%sមុន',
+ s: 'ប៉ុន្មានវិនាទី',
+ ss: '%d វិនាទី',
+ m: 'មួយនាទី',
+ mm: '%d នាទី',
+ h: 'មួយម៉ោង',
+ hh: '%d ម៉ោង',
+ d: 'មួយថ្ងៃ',
+ dd: '%d ថ្ងៃ',
+ M: 'មួយខែ',
+ MM: '%d ខែ',
+ y: 'មួយឆ្នាំ',
+ yy: '%d ឆ្នាំ',
+ },
+ dayOfMonthOrdinalParse: /ទី\d{1,2}/,
+ ordinal: 'ទី%d',
+ preparse: function (string) {
+ return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/kn.js b/vendor/assets/javascripts/momentjs/src/locale/kn.js
new file mode 100644
index 000000000..e7cb35441
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/kn.js
@@ -0,0 +1,124 @@
+//! moment.js locale configuration
+//! locale : Kannada [kn]
+//! author : Rajeev Naik : https://github.com/rajeevnaikte
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '೧',
+ 2: '೨',
+ 3: '೩',
+ 4: '೪',
+ 5: '೫',
+ 6: '೬',
+ 7: '೭',
+ 8: '೮',
+ 9: '೯',
+ 0: '೦',
+ },
+ numberMap = {
+ '೧': '1',
+ '೨': '2',
+ '೩': '3',
+ '೪': '4',
+ '೫': '5',
+ '೬': '6',
+ '೭': '7',
+ '೮': '8',
+ '೯': '9',
+ '೦': '0',
+ };
+
+export default moment.defineLocale('kn', {
+ months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
+ '_'
+ ),
+ weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
+ weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[ಇಂದು] LT',
+ nextDay: '[ನಾಳೆ] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ನಿನ್ನೆ] LT',
+ lastWeek: '[ಕೊನೆಯ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ನಂತರ',
+ past: '%s ಹಿಂದೆ',
+ s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
+ ss: '%d ಸೆಕೆಂಡುಗಳು',
+ m: 'ಒಂದು ನಿಮಿಷ',
+ mm: '%d ನಿಮಿಷ',
+ h: 'ಒಂದು ಗಂಟೆ',
+ hh: '%d ಗಂಟೆ',
+ d: 'ಒಂದು ದಿನ',
+ dd: '%d ದಿನ',
+ M: 'ಒಂದು ತಿಂಗಳು',
+ MM: '%d ತಿಂಗಳು',
+ y: 'ಒಂದು ವರ್ಷ',
+ yy: '%d ವರ್ಷ',
+ },
+ preparse: function (string) {
+ return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ರಾತ್ರಿ') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
+ return hour;
+ } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'ಸಂಜೆ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ರಾತ್ರಿ';
+ } else if (hour < 10) {
+ return 'ಬೆಳಿಗ್ಗೆ';
+ } else if (hour < 17) {
+ return 'ಮಧ್ಯಾಹ್ನ';
+ } else if (hour < 20) {
+ return 'ಸಂಜೆ';
+ } else {
+ return 'ರಾತ್ರಿ';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
+ ordinal: function (number) {
+ return number + 'ನೇ';
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ko.js b/vendor/assets/javascripts/momentjs/src/locale/ko.js
new file mode 100644
index 000000000..c45f3e3bd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ko.js
@@ -0,0 +1,75 @@
+//! moment.js locale configuration
+//! locale : Korean [ko]
+//! author : Kyungwook, Park : https://github.com/kyungw00k
+//! author : Jeeeyul Lee
+
+import moment from '../moment';
+
+export default moment.defineLocale('ko', {
+ months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
+ monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
+ '_'
+ ),
+ weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
+ weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
+ weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'YYYY.MM.DD.',
+ LL: 'YYYY년 MMMM D일',
+ LLL: 'YYYY년 MMMM D일 A h:mm',
+ LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
+ l: 'YYYY.MM.DD.',
+ ll: 'YYYY년 MMMM D일',
+ lll: 'YYYY년 MMMM D일 A h:mm',
+ llll: 'YYYY년 MMMM D일 dddd A h:mm',
+ },
+ calendar: {
+ sameDay: '오늘 LT',
+ nextDay: '내일 LT',
+ nextWeek: 'dddd LT',
+ lastDay: '어제 LT',
+ lastWeek: '지난주 dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s 후',
+ past: '%s 전',
+ s: '몇 초',
+ ss: '%d초',
+ m: '1분',
+ mm: '%d분',
+ h: '한 시간',
+ hh: '%d시간',
+ d: '하루',
+ dd: '%d일',
+ M: '한 달',
+ MM: '%d달',
+ y: '일 년',
+ yy: '%d년',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '일';
+ case 'M':
+ return number + '월';
+ case 'w':
+ case 'W':
+ return number + '주';
+ default:
+ return number;
+ }
+ },
+ meridiemParse: /오전|오후/,
+ isPM: function (token) {
+ return token === '오후';
+ },
+ meridiem: function (hour, minute, isUpper) {
+ return hour < 12 ? '오전' : '오후';
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ku.js b/vendor/assets/javascripts/momentjs/src/locale/ku.js
new file mode 100644
index 000000000..e705f0169
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ku.js
@@ -0,0 +1,118 @@
+//! moment.js locale configuration
+//! locale : Kurdish [ku]
+//! author : Shahram Mebashar : https://github.com/ShahramMebashar
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '١',
+ 2: '٢',
+ 3: '٣',
+ 4: '٤',
+ 5: '٥',
+ 6: '٦',
+ 7: '٧',
+ 8: '٨',
+ 9: '٩',
+ 0: '٠',
+ },
+ numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0',
+ },
+ months = [
+ 'کانونی دووەم',
+ 'شوبات',
+ 'ئازار',
+ 'نیسان',
+ 'ئایار',
+ 'حوزەیران',
+ 'تەمموز',
+ 'ئاب',
+ 'ئەیلوول',
+ 'تشرینی یەكەم',
+ 'تشرینی دووەم',
+ 'كانونی یەکەم',
+ ];
+
+export default moment.defineLocale('ku', {
+ months: months,
+ monthsShort: months,
+ weekdays:
+ 'یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه'.split('_'),
+ weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ئێواره|بهیانی/,
+ isPM: function (input) {
+ return /ئێواره/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'بهیانی';
+ } else {
+ return 'ئێواره';
+ }
+ },
+ calendar: {
+ sameDay: '[ئهمرۆ كاتژمێر] LT',
+ nextDay: '[بهیانی كاتژمێر] LT',
+ nextWeek: 'dddd [كاتژمێر] LT',
+ lastDay: '[دوێنێ كاتژمێر] LT',
+ lastWeek: 'dddd [كاتژمێر] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'له %s',
+ past: '%s',
+ s: 'چهند چركهیهك',
+ ss: 'چركه %d',
+ m: 'یهك خولهك',
+ mm: '%d خولهك',
+ h: 'یهك كاتژمێر',
+ hh: '%d كاتژمێر',
+ d: 'یهك ڕۆژ',
+ dd: '%d ڕۆژ',
+ M: 'یهك مانگ',
+ MM: '%d مانگ',
+ y: 'یهك ساڵ',
+ yy: '%d ساڵ',
+ },
+ preparse: function (string) {
+ return string
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+ return numberMap[match];
+ })
+ .replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string
+ .replace(/\d/g, function (match) {
+ return symbolMap[match];
+ })
+ .replace(/,/g, '،');
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ky.js b/vendor/assets/javascripts/momentjs/src/locale/ky.js
new file mode 100644
index 000000000..2108d0906
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ky.js
@@ -0,0 +1,84 @@
+//! moment.js locale configuration
+//! locale : Kyrgyz [ky]
+//! author : Chyngyz Arystan uulu : https://github.com/chyngyz
+
+import moment from '../moment';
+
+var suffixes = {
+ 0: '-чү',
+ 1: '-чи',
+ 2: '-чи',
+ 3: '-чү',
+ 4: '-чү',
+ 5: '-чи',
+ 6: '-чы',
+ 7: '-чи',
+ 8: '-чи',
+ 9: '-чу',
+ 10: '-чу',
+ 20: '-чы',
+ 30: '-чу',
+ 40: '-чы',
+ 50: '-чү',
+ 60: '-чы',
+ 70: '-чи',
+ 80: '-чи',
+ 90: '-чу',
+ 100: '-чү',
+};
+
+export default moment.defineLocale('ky', {
+ months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
+ '_'
+ ),
+ monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
+ '_'
+ ),
+ weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
+ '_'
+ ),
+ weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
+ weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бүгүн саат] LT',
+ nextDay: '[Эртең саат] LT',
+ nextWeek: 'dddd [саат] LT',
+ lastDay: '[Кечээ саат] LT',
+ lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ичинде',
+ past: '%s мурун',
+ s: 'бирнече секунд',
+ ss: '%d секунд',
+ m: 'бир мүнөт',
+ mm: '%d мүнөт',
+ h: 'бир саат',
+ hh: '%d саат',
+ d: 'бир күн',
+ dd: '%d күн',
+ M: 'бир ай',
+ MM: '%d ай',
+ y: 'бир жыл',
+ yy: '%d жыл',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes[number] || suffixes[a] || suffixes[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/lb.js b/vendor/assets/javascripts/momentjs/src/locale/lb.js
new file mode 100644
index 000000000..f01e66274
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/lb.js
@@ -0,0 +1,137 @@
+//! moment.js locale configuration
+//! locale : Luxembourgish [lb]
+//! author : mweimerskirch : https://github.com/mweimerskirch
+//! author : David Raison : https://github.com/kwisatz
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ m: ['eng Minutt', 'enger Minutt'],
+ h: ['eng Stonn', 'enger Stonn'],
+ d: ['een Dag', 'engem Dag'],
+ M: ['ee Mount', 'engem Mount'],
+ y: ['ee Joer', 'engem Joer'],
+ };
+ return withoutSuffix ? format[key][0] : format[key][1];
+}
+function processFutureTime(string) {
+ var number = string.substr(0, string.indexOf(' '));
+ if (eifelerRegelAppliesToNumber(number)) {
+ return 'a ' + string;
+ }
+ return 'an ' + string;
+}
+function processPastTime(string) {
+ var number = string.substr(0, string.indexOf(' '));
+ if (eifelerRegelAppliesToNumber(number)) {
+ return 'viru ' + string;
+ }
+ return 'virun ' + string;
+}
+/**
+ * Returns true if the word before the given number loses the '-n' ending.
+ * e.g. 'an 10 Deeg' but 'a 5 Deeg'
+ *
+ * @param number {integer}
+ * @returns {boolean}
+ */
+function eifelerRegelAppliesToNumber(number) {
+ number = parseInt(number, 10);
+ if (isNaN(number)) {
+ return false;
+ }
+ if (number < 0) {
+ // Negative Number --> always true
+ return true;
+ } else if (number < 10) {
+ // Only 1 digit
+ if (4 <= number && number <= 7) {
+ return true;
+ }
+ return false;
+ } else if (number < 100) {
+ // 2 digits
+ var lastDigit = number % 10,
+ firstDigit = number / 10;
+ if (lastDigit === 0) {
+ return eifelerRegelAppliesToNumber(firstDigit);
+ }
+ return eifelerRegelAppliesToNumber(lastDigit);
+ } else if (number < 10000) {
+ // 3 or 4 digits --> recursively check first digit
+ while (number >= 10) {
+ number = number / 10;
+ }
+ return eifelerRegelAppliesToNumber(number);
+ } else {
+ // Anything larger than 4 digits: recursively check first n-3 digits
+ number = number / 1000;
+ return eifelerRegelAppliesToNumber(number);
+ }
+}
+
+export default moment.defineLocale('lb', {
+ months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
+ '_'
+ ),
+ weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm [Auer]',
+ LTS: 'H:mm:ss [Auer]',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm [Auer]',
+ LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
+ },
+ calendar: {
+ sameDay: '[Haut um] LT',
+ sameElse: 'L',
+ nextDay: '[Muer um] LT',
+ nextWeek: 'dddd [um] LT',
+ lastDay: '[Gëschter um] LT',
+ lastWeek: function () {
+ // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
+ switch (this.day()) {
+ case 2:
+ case 4:
+ return '[Leschten] dddd [um] LT';
+ default:
+ return '[Leschte] dddd [um] LT';
+ }
+ },
+ },
+ relativeTime: {
+ future: processFutureTime,
+ past: processPastTime,
+ s: 'e puer Sekonnen',
+ ss: '%d Sekonnen',
+ m: processRelativeTime,
+ mm: '%d Minutten',
+ h: processRelativeTime,
+ hh: '%d Stonnen',
+ d: processRelativeTime,
+ dd: '%d Deeg',
+ M: processRelativeTime,
+ MM: '%d Méint',
+ y: processRelativeTime,
+ yy: '%d Joer',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/lo.js b/vendor/assets/javascripts/momentjs/src/locale/lo.js
new file mode 100644
index 000000000..cd6cc2021
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/lo.js
@@ -0,0 +1,66 @@
+//! moment.js locale configuration
+//! locale : Lao [lo]
+//! author : Ryan Hart : https://github.com/ryanhart2
+
+import moment from '../moment';
+
+export default moment.defineLocale('lo', {
+ months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
+ '_'
+ ),
+ weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+ weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+ weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'ວັນdddd D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
+ isPM: function (input) {
+ return input === 'ຕອນແລງ';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ຕອນເຊົ້າ';
+ } else {
+ return 'ຕອນແລງ';
+ }
+ },
+ calendar: {
+ sameDay: '[ມື້ນີ້ເວລາ] LT',
+ nextDay: '[ມື້ອື່ນເວລາ] LT',
+ nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
+ lastDay: '[ມື້ວານນີ້ເວລາ] LT',
+ lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ອີກ %s',
+ past: '%sຜ່ານມາ',
+ s: 'ບໍ່ເທົ່າໃດວິນາທີ',
+ ss: '%d ວິນາທີ',
+ m: '1 ນາທີ',
+ mm: '%d ນາທີ',
+ h: '1 ຊົ່ວໂມງ',
+ hh: '%d ຊົ່ວໂມງ',
+ d: '1 ມື້',
+ dd: '%d ມື້',
+ M: '1 ເດືອນ',
+ MM: '%d ເດືອນ',
+ y: '1 ປີ',
+ yy: '%d ປີ',
+ },
+ dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
+ ordinal: function (number) {
+ return 'ທີ່' + number;
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/lt.js b/vendor/assets/javascripts/momentjs/src/locale/lt.js
new file mode 100644
index 000000000..f01126136
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/lt.js
@@ -0,0 +1,125 @@
+//! moment.js locale configuration
+//! locale : Lithuanian [lt]
+//! author : Mindaugas Mozūras : https://github.com/mmozuras
+
+import moment from '../moment';
+
+var units = {
+ ss: 'sekundė_sekundžių_sekundes',
+ m: 'minutė_minutės_minutę',
+ mm: 'minutės_minučių_minutes',
+ h: 'valanda_valandos_valandą',
+ hh: 'valandos_valandų_valandas',
+ d: 'diena_dienos_dieną',
+ dd: 'dienos_dienų_dienas',
+ M: 'mėnuo_mėnesio_mėnesį',
+ MM: 'mėnesiai_mėnesių_mėnesius',
+ y: 'metai_metų_metus',
+ yy: 'metai_metų_metus',
+};
+function translateSeconds(number, withoutSuffix, key, isFuture) {
+ if (withoutSuffix) {
+ return 'kelios sekundės';
+ } else {
+ return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
+ }
+}
+function translateSingular(number, withoutSuffix, key, isFuture) {
+ return withoutSuffix
+ ? forms(key)[0]
+ : isFuture
+ ? forms(key)[1]
+ : forms(key)[2];
+}
+function special(number) {
+ return number % 10 === 0 || (number > 10 && number < 20);
+}
+function forms(key) {
+ return units[key].split('_');
+}
+function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ if (number === 1) {
+ return (
+ result + translateSingular(number, withoutSuffix, key[0], isFuture)
+ );
+ } else if (withoutSuffix) {
+ return result + (special(number) ? forms(key)[1] : forms(key)[0]);
+ } else {
+ if (isFuture) {
+ return result + forms(key)[1];
+ } else {
+ return result + (special(number) ? forms(key)[1] : forms(key)[2]);
+ }
+ }
+}
+export default moment.defineLocale('lt', {
+ months: {
+ format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
+ '_'
+ ),
+ standalone:
+ 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
+ },
+ monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
+ weekdays: {
+ format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
+ '_'
+ ),
+ standalone:
+ 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
+ '_'
+ ),
+ isFormat: /dddd HH:mm/,
+ },
+ weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
+ weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY [m.] MMMM D [d.]',
+ LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
+ l: 'YYYY-MM-DD',
+ ll: 'YYYY [m.] MMMM D [d.]',
+ lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
+ },
+ calendar: {
+ sameDay: '[Šiandien] LT',
+ nextDay: '[Rytoj] LT',
+ nextWeek: 'dddd LT',
+ lastDay: '[Vakar] LT',
+ lastWeek: '[Praėjusį] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'po %s',
+ past: 'prieš %s',
+ s: translateSeconds,
+ ss: translate,
+ m: translateSingular,
+ mm: translate,
+ h: translateSingular,
+ hh: translate,
+ d: translateSingular,
+ dd: translate,
+ M: translateSingular,
+ MM: translate,
+ y: translateSingular,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-oji/,
+ ordinal: function (number) {
+ return number + '-oji';
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/lv.js b/vendor/assets/javascripts/momentjs/src/locale/lv.js
new file mode 100644
index 000000000..3a8965350
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/lv.js
@@ -0,0 +1,94 @@
+//! moment.js locale configuration
+//! locale : Latvian [lv]
+//! author : Kristaps Karlsons : https://github.com/skakri
+//! author : Jānis Elmeris : https://github.com/JanisE
+
+import moment from '../moment';
+
+var units = {
+ ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
+ m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ h: 'stundas_stundām_stunda_stundas'.split('_'),
+ hh: 'stundas_stundām_stunda_stundas'.split('_'),
+ d: 'dienas_dienām_diena_dienas'.split('_'),
+ dd: 'dienas_dienām_diena_dienas'.split('_'),
+ M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ y: 'gada_gadiem_gads_gadi'.split('_'),
+ yy: 'gada_gadiem_gads_gadi'.split('_'),
+};
+/**
+ * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
+ */
+function format(forms, number, withoutSuffix) {
+ if (withoutSuffix) {
+ // E.g. "21 minūte", "3 minūtes".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
+ } else {
+ // E.g. "21 minūtes" as in "pēc 21 minūtes".
+ // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
+ }
+}
+function relativeTimeWithPlural(number, withoutSuffix, key) {
+ return number + ' ' + format(units[key], number, withoutSuffix);
+}
+function relativeTimeWithSingular(number, withoutSuffix, key) {
+ return format(units[key], number, withoutSuffix);
+}
+function relativeSeconds(number, withoutSuffix) {
+ return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
+}
+
+export default moment.defineLocale('lv', {
+ months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
+ weekdays:
+ 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
+ '_'
+ ),
+ weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY.',
+ LL: 'YYYY. [gada] D. MMMM',
+ LLL: 'YYYY. [gada] D. MMMM, HH:mm',
+ LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
+ },
+ calendar: {
+ sameDay: '[Šodien pulksten] LT',
+ nextDay: '[Rīt pulksten] LT',
+ nextWeek: 'dddd [pulksten] LT',
+ lastDay: '[Vakar pulksten] LT',
+ lastWeek: '[Pagājušā] dddd [pulksten] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'pēc %s',
+ past: 'pirms %s',
+ s: relativeSeconds,
+ ss: relativeTimeWithPlural,
+ m: relativeTimeWithSingular,
+ mm: relativeTimeWithPlural,
+ h: relativeTimeWithSingular,
+ hh: relativeTimeWithPlural,
+ d: relativeTimeWithSingular,
+ dd: relativeTimeWithPlural,
+ M: relativeTimeWithSingular,
+ MM: relativeTimeWithPlural,
+ y: relativeTimeWithSingular,
+ yy: relativeTimeWithPlural,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/me.js b/vendor/assets/javascripts/momentjs/src/locale/me.js
new file mode 100644
index 000000000..c0986df67
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/me.js
@@ -0,0 +1,117 @@
+//! moment.js locale configuration
+//! locale : Montenegrin [me]
+//! author : Miodrag Nikač : https://github.com/miodragnikac
+
+import moment from '../moment';
+
+var translator = {
+ words: {
+ //Different grammatical cases
+ ss: ['sekund', 'sekunda', 'sekundi'],
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ dd: ['dan', 'dana', 'dana'],
+ MM: ['mjesec', 'mjeseca', 'mjeseci'],
+ yy: ['godina', 'godine', 'godina'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ return number === 1
+ ? wordKey[0]
+ : number >= 2 && number <= 4
+ ? wordKey[1]
+ : wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key) {
+ var wordKey = translator.words[key];
+ if (key.length === 1) {
+ return withoutSuffix ? wordKey[0] : wordKey[1];
+ } else {
+ return (
+ number +
+ ' ' +
+ translator.correctGrammaticalCase(number, wordKey)
+ );
+ }
+ },
+};
+
+export default moment.defineLocale('me', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sjutra u] LT',
+
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[juče u] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[prošle] [nedjelje] [u] LT',
+ '[prošlog] [ponedjeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srijede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'prije %s',
+ s: 'nekoliko sekundi',
+ ss: translator.translate,
+ m: translator.translate,
+ mm: translator.translate,
+ h: translator.translate,
+ hh: translator.translate,
+ d: 'dan',
+ dd: translator.translate,
+ M: 'mjesec',
+ MM: translator.translate,
+ y: 'godinu',
+ yy: translator.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/mi.js b/vendor/assets/javascripts/momentjs/src/locale/mi.js
new file mode 100644
index 000000000..635a56ac2
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/mi.js
@@ -0,0 +1,60 @@
+//! moment.js locale configuration
+//! locale : Maori [mi]
+//! author : John Corrigan : https://github.com/johnideal
+
+import moment from '../moment';
+
+export default moment.defineLocale('mi', {
+ months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
+ '_'
+ ),
+ monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+ monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
+ weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
+ weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+ weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [i] HH:mm',
+ LLLL: 'dddd, D MMMM YYYY [i] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i teie mahana, i] LT',
+ nextDay: '[apopo i] LT',
+ nextWeek: 'dddd [i] LT',
+ lastDay: '[inanahi i] LT',
+ lastWeek: 'dddd [whakamutunga i] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'i roto i %s',
+ past: '%s i mua',
+ s: 'te hēkona ruarua',
+ ss: '%d hēkona',
+ m: 'he meneti',
+ mm: '%d meneti',
+ h: 'te haora',
+ hh: '%d haora',
+ d: 'he ra',
+ dd: '%d ra',
+ M: 'he marama',
+ MM: '%d marama',
+ y: 'he tau',
+ yy: '%d tau',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/mk.js b/vendor/assets/javascripts/momentjs/src/locale/mk.js
new file mode 100644
index 000000000..f3ecad75c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/mk.js
@@ -0,0 +1,85 @@
+//! moment.js locale configuration
+//! locale : Macedonian [mk]
+//! author : Borislav Mickov : https://github.com/B0k0
+//! author : Sashko Todorov : https://github.com/bkyceh
+import moment from '../moment';
+
+export default moment.defineLocale('mk', {
+ months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
+ '_'
+ ),
+ monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
+ '_'
+ ),
+ weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
+ weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[Денес во] LT',
+ nextDay: '[Утре во] LT',
+ nextWeek: '[Во] dddd [во] LT',
+ lastDay: '[Вчера во] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 6:
+ return '[Изминатата] dddd [во] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[Изминатиот] dddd [во] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: 'пред %s',
+ s: 'неколку секунди',
+ ss: '%d секунди',
+ m: 'една минута',
+ mm: '%d минути',
+ h: 'еден час',
+ hh: '%d часа',
+ d: 'еден ден',
+ dd: '%d дена',
+ M: 'еден месец',
+ MM: '%d месеци',
+ y: 'една година',
+ yy: '%d години',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+ ordinal: function (number) {
+ var lastDigit = number % 10,
+ last2Digits = number % 100;
+ if (number === 0) {
+ return number + '-ев';
+ } else if (last2Digits === 0) {
+ return number + '-ен';
+ } else if (last2Digits > 10 && last2Digits < 20) {
+ return number + '-ти';
+ } else if (lastDigit === 1) {
+ return number + '-ви';
+ } else if (lastDigit === 2) {
+ return number + '-ри';
+ } else if (lastDigit === 7 || lastDigit === 8) {
+ return number + '-ми';
+ } else {
+ return number + '-ти';
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ml.js b/vendor/assets/javascripts/momentjs/src/locale/ml.js
new file mode 100644
index 000000000..5df6ae4c9
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ml.js
@@ -0,0 +1,82 @@
+//! moment.js locale configuration
+//! locale : Malayalam [ml]
+//! author : Floyd Pink : https://github.com/floydpink
+
+import moment from '../moment';
+
+export default moment.defineLocale('ml', {
+ months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
+ '_'
+ ),
+ weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
+ weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm -നു',
+ LTS: 'A h:mm:ss -നു',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm -നു',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',
+ },
+ calendar: {
+ sameDay: '[ഇന്ന്] LT',
+ nextDay: '[നാളെ] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[ഇന്നലെ] LT',
+ lastWeek: '[കഴിഞ്ഞ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s കഴിഞ്ഞ്',
+ past: '%s മുൻപ്',
+ s: 'അൽപ നിമിഷങ്ങൾ',
+ ss: '%d സെക്കൻഡ്',
+ m: 'ഒരു മിനിറ്റ്',
+ mm: '%d മിനിറ്റ്',
+ h: 'ഒരു മണിക്കൂർ',
+ hh: '%d മണിക്കൂർ',
+ d: 'ഒരു ദിവസം',
+ dd: '%d ദിവസം',
+ M: 'ഒരു മാസം',
+ MM: '%d മാസം',
+ y: 'ഒരു വർഷം',
+ yy: '%d വർഷം',
+ },
+ meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ (meridiem === 'രാത്രി' && hour >= 4) ||
+ meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
+ meridiem === 'വൈകുന്നേരം'
+ ) {
+ return hour + 12;
+ } else {
+ return hour;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'രാത്രി';
+ } else if (hour < 12) {
+ return 'രാവിലെ';
+ } else if (hour < 17) {
+ return 'ഉച്ച കഴിഞ്ഞ്';
+ } else if (hour < 20) {
+ return 'വൈകുന്നേരം';
+ } else {
+ return 'രാത്രി';
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/mn.js b/vendor/assets/javascripts/momentjs/src/locale/mn.js
new file mode 100644
index 000000000..36cf69f29
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/mn.js
@@ -0,0 +1,100 @@
+//! moment.js locale configuration
+//! locale : Mongolian [mn]
+//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
+
+import moment from '../moment';
+
+function translate(number, withoutSuffix, key, isFuture) {
+ switch (key) {
+ case 's':
+ return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
+ case 'ss':
+ return number + (withoutSuffix ? ' секунд' : ' секундын');
+ case 'm':
+ case 'mm':
+ return number + (withoutSuffix ? ' минут' : ' минутын');
+ case 'h':
+ case 'hh':
+ return number + (withoutSuffix ? ' цаг' : ' цагийн');
+ case 'd':
+ case 'dd':
+ return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
+ case 'M':
+ case 'MM':
+ return number + (withoutSuffix ? ' сар' : ' сарын');
+ case 'y':
+ case 'yy':
+ return number + (withoutSuffix ? ' жил' : ' жилийн');
+ default:
+ return number;
+ }
+}
+
+export default moment.defineLocale('mn', {
+ months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
+ '_'
+ ),
+ monthsShort:
+ '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
+ weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
+ weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY оны MMMMын D',
+ LLL: 'YYYY оны MMMMын D HH:mm',
+ LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
+ },
+ meridiemParse: /ҮӨ|ҮХ/i,
+ isPM: function (input) {
+ return input === 'ҮХ';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ҮӨ';
+ } else {
+ return 'ҮХ';
+ }
+ },
+ calendar: {
+ sameDay: '[Өнөөдөр] LT',
+ nextDay: '[Маргааш] LT',
+ nextWeek: '[Ирэх] dddd LT',
+ lastDay: '[Өчигдөр] LT',
+ lastWeek: '[Өнгөрсөн] dddd LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s дараа',
+ past: '%s өмнө',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + ' өдөр';
+ default:
+ return number;
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/mr.js b/vendor/assets/javascripts/momentjs/src/locale/mr.js
new file mode 100644
index 000000000..d174909b3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/mr.js
@@ -0,0 +1,203 @@
+//! moment.js locale configuration
+//! locale : Marathi [mr]
+//! author : Harshad Kale : https://github.com/kalehv
+//! author : Vivek Athalye : https://github.com/vnathalye
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ };
+
+function relativeTimeMr(number, withoutSuffix, string, isFuture) {
+ var output = '';
+ if (withoutSuffix) {
+ switch (string) {
+ case 's':
+ output = 'काही सेकंद';
+ break;
+ case 'ss':
+ output = '%d सेकंद';
+ break;
+ case 'm':
+ output = 'एक मिनिट';
+ break;
+ case 'mm':
+ output = '%d मिनिटे';
+ break;
+ case 'h':
+ output = 'एक तास';
+ break;
+ case 'hh':
+ output = '%d तास';
+ break;
+ case 'd':
+ output = 'एक दिवस';
+ break;
+ case 'dd':
+ output = '%d दिवस';
+ break;
+ case 'M':
+ output = 'एक महिना';
+ break;
+ case 'MM':
+ output = '%d महिने';
+ break;
+ case 'y':
+ output = 'एक वर्ष';
+ break;
+ case 'yy':
+ output = '%d वर्षे';
+ break;
+ }
+ } else {
+ switch (string) {
+ case 's':
+ output = 'काही सेकंदां';
+ break;
+ case 'ss':
+ output = '%d सेकंदां';
+ break;
+ case 'm':
+ output = 'एका मिनिटा';
+ break;
+ case 'mm':
+ output = '%d मिनिटां';
+ break;
+ case 'h':
+ output = 'एका तासा';
+ break;
+ case 'hh':
+ output = '%d तासां';
+ break;
+ case 'd':
+ output = 'एका दिवसा';
+ break;
+ case 'dd':
+ output = '%d दिवसां';
+ break;
+ case 'M':
+ output = 'एका महिन्या';
+ break;
+ case 'MM':
+ output = '%d महिन्यां';
+ break;
+ case 'y':
+ output = 'एका वर्षा';
+ break;
+ case 'yy':
+ output = '%d वर्षां';
+ break;
+ }
+ }
+ return output.replace(/%d/i, number);
+}
+
+export default moment.defineLocale('mr', {
+ months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
+ '_'
+ ),
+ monthsShort:
+ 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm वाजता',
+ LTS: 'A h:mm:ss वाजता',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm वाजता',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',
+ },
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[उद्या] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[काल] LT',
+ lastWeek: '[मागील] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sमध्ये',
+ past: '%sपूर्वी',
+ s: relativeTimeMr,
+ ss: relativeTimeMr,
+ m: relativeTimeMr,
+ mm: relativeTimeMr,
+ h: relativeTimeMr,
+ hh: relativeTimeMr,
+ d: relativeTimeMr,
+ dd: relativeTimeMr,
+ M: relativeTimeMr,
+ MM: relativeTimeMr,
+ y: relativeTimeMr,
+ yy: relativeTimeMr,
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
+ return hour;
+ } else if (
+ meridiem === 'दुपारी' ||
+ meridiem === 'सायंकाळी' ||
+ meridiem === 'रात्री'
+ ) {
+ return hour >= 12 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour >= 0 && hour < 6) {
+ return 'पहाटे';
+ } else if (hour < 12) {
+ return 'सकाळी';
+ } else if (hour < 17) {
+ return 'दुपारी';
+ } else if (hour < 20) {
+ return 'सायंकाळी';
+ } else {
+ return 'रात्री';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ms-my.js b/vendor/assets/javascripts/momentjs/src/locale/ms-my.js
new file mode 100644
index 000000000..f8adf9885
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ms-my.js
@@ -0,0 +1,76 @@
+//! moment.js locale configuration
+//! locale : Malay [ms-my]
+//! note : DEPRECATED, the correct one is [ms]
+//! author : Weldan Jamili : https://github.com/weldan
+
+import moment from '../moment';
+
+export default moment.defineLocale('ms-my', {
+ months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+ weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+ weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+ weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'tengahari';
+ } else if (hours < 19) {
+ return 'petang';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Esok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kelmarin pukul] LT',
+ lastWeek: 'dddd [lepas pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lepas',
+ s: 'beberapa saat',
+ ss: '%d saat',
+ m: 'seminit',
+ mm: '%d minit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ms.js b/vendor/assets/javascripts/momentjs/src/locale/ms.js
new file mode 100644
index 000000000..335cc90d5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ms.js
@@ -0,0 +1,75 @@
+//! moment.js locale configuration
+//! locale : Malay [ms]
+//! author : Weldan Jamili : https://github.com/weldan
+
+import moment from '../moment';
+
+export default moment.defineLocale('ms', {
+ months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+ weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+ weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+ weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [pukul] HH.mm',
+ LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'pagi';
+ } else if (hours < 15) {
+ return 'tengahari';
+ } else if (hours < 19) {
+ return 'petang';
+ } else {
+ return 'malam';
+ }
+ },
+ calendar: {
+ sameDay: '[Hari ini pukul] LT',
+ nextDay: '[Esok pukul] LT',
+ nextWeek: 'dddd [pukul] LT',
+ lastDay: '[Kelmarin pukul] LT',
+ lastWeek: 'dddd [lepas pukul] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dalam %s',
+ past: '%s yang lepas',
+ s: 'beberapa saat',
+ ss: '%d saat',
+ m: 'seminit',
+ mm: '%d minit',
+ h: 'sejam',
+ hh: '%d jam',
+ d: 'sehari',
+ dd: '%d hari',
+ M: 'sebulan',
+ MM: '%d bulan',
+ y: 'setahun',
+ yy: '%d tahun',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/mt.js b/vendor/assets/javascripts/momentjs/src/locale/mt.js
new file mode 100644
index 000000000..850cf6a4a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/mt.js
@@ -0,0 +1,56 @@
+//! moment.js locale configuration
+//! locale : Maltese (Malta) [mt]
+//! author : Alessandro Maruccia : https://github.com/alesma
+
+import moment from '../moment';
+
+export default moment.defineLocale('mt', {
+ months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
+ weekdays:
+ 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
+ '_'
+ ),
+ weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
+ weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Illum fil-]LT',
+ nextDay: '[Għada fil-]LT',
+ nextWeek: 'dddd [fil-]LT',
+ lastDay: '[Il-bieraħ fil-]LT',
+ lastWeek: 'dddd [li għadda] [fil-]LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'f’ %s',
+ past: '%s ilu',
+ s: 'ftit sekondi',
+ ss: '%d sekondi',
+ m: 'minuta',
+ mm: '%d minuti',
+ h: 'siegħa',
+ hh: '%d siegħat',
+ d: 'ġurnata',
+ dd: '%d ġranet',
+ M: 'xahar',
+ MM: '%d xhur',
+ y: 'sena',
+ yy: '%d sni',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/my.js b/vendor/assets/javascripts/momentjs/src/locale/my.js
new file mode 100644
index 000000000..034b221ab
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/my.js
@@ -0,0 +1,91 @@
+//! moment.js locale configuration
+//! locale : Burmese [my]
+//! author : Squar team, mysquar.com
+//! author : David Rossellat : https://github.com/gholadr
+//! author : Tin Aung Lin : https://github.com/thanyawzinmin
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '၁',
+ 2: '၂',
+ 3: '၃',
+ 4: '၄',
+ 5: '၅',
+ 6: '၆',
+ 7: '၇',
+ 8: '၈',
+ 9: '၉',
+ 0: '၀',
+ },
+ numberMap = {
+ '၁': '1',
+ '၂': '2',
+ '၃': '3',
+ '၄': '4',
+ '၅': '5',
+ '၆': '6',
+ '၇': '7',
+ '၈': '8',
+ '၉': '9',
+ '၀': '0',
+ };
+
+export default moment.defineLocale('my', {
+ months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
+ '_'
+ ),
+ monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
+ weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
+ '_'
+ ),
+ weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+ weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[ယနေ.] LT [မှာ]',
+ nextDay: '[မနက်ဖြန်] LT [မှာ]',
+ nextWeek: 'dddd LT [မှာ]',
+ lastDay: '[မနေ.က] LT [မှာ]',
+ lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'လာမည့် %s မှာ',
+ past: 'လွန်ခဲ့သော %s က',
+ s: 'စက္ကန်.အနည်းငယ်',
+ ss: '%d စက္ကန့်',
+ m: 'တစ်မိနစ်',
+ mm: '%d မိနစ်',
+ h: 'တစ်နာရီ',
+ hh: '%d နာရီ',
+ d: 'တစ်ရက်',
+ dd: '%d ရက်',
+ M: 'တစ်လ',
+ MM: '%d လ',
+ y: 'တစ်နှစ်',
+ yy: '%d နှစ်',
+ },
+ preparse: function (string) {
+ return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/nb.js b/vendor/assets/javascripts/momentjs/src/locale/nb.js
new file mode 100644
index 000000000..c218f518f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/nb.js
@@ -0,0 +1,60 @@
+//! moment.js locale configuration
+//! locale : Norwegian Bokmål [nb]
+//! authors : Espen Hovlandsdal : https://github.com/rexxars
+//! Sigurd Gartmann : https://github.com/sigurdga
+//! Stephen Ramthun : https://github.com/stephenramthun
+
+import moment from '../moment';
+
+export default moment.defineLocale('nb', {
+ months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
+ weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] HH:mm',
+ LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[i dag kl.] LT',
+ nextDay: '[i morgen kl.] LT',
+ nextWeek: 'dddd [kl.] LT',
+ lastDay: '[i går kl.] LT',
+ lastWeek: '[forrige] dddd [kl.] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s siden',
+ s: 'noen sekunder',
+ ss: '%d sekunder',
+ m: 'ett minutt',
+ mm: '%d minutter',
+ h: 'en time',
+ hh: '%d timer',
+ d: 'en dag',
+ dd: '%d dager',
+ w: 'en uke',
+ ww: '%d uker',
+ M: 'en måned',
+ MM: '%d måneder',
+ y: 'ett år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ne.js b/vendor/assets/javascripts/momentjs/src/locale/ne.js
new file mode 100644
index 000000000..1f0a0edc3
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ne.js
@@ -0,0 +1,121 @@
+//! moment.js locale configuration
+//! locale : Nepalese [ne]
+//! author : suvash : https://github.com/suvash
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '१',
+ 2: '२',
+ 3: '३',
+ 4: '४',
+ 5: '५',
+ 6: '६',
+ 7: '७',
+ 8: '८',
+ 9: '९',
+ 0: '०',
+ },
+ numberMap = {
+ '१': '1',
+ '२': '2',
+ '३': '3',
+ '४': '4',
+ '५': '5',
+ '६': '6',
+ '७': '7',
+ '८': '8',
+ '९': '9',
+ '०': '0',
+ };
+
+export default moment.defineLocale('ne', {
+ months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
+ '_'
+ ),
+ monthsShort:
+ 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
+ '_'
+ ),
+ weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
+ weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'Aको h:mm बजे',
+ LTS: 'Aको h:mm:ss बजे',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, Aको h:mm बजे',
+ LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
+ },
+ preparse: function (string) {
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'राति') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'बिहान') {
+ return hour;
+ } else if (meridiem === 'दिउँसो') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'साँझ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 3) {
+ return 'राति';
+ } else if (hour < 12) {
+ return 'बिहान';
+ } else if (hour < 16) {
+ return 'दिउँसो';
+ } else if (hour < 20) {
+ return 'साँझ';
+ } else {
+ return 'राति';
+ }
+ },
+ calendar: {
+ sameDay: '[आज] LT',
+ nextDay: '[भोलि] LT',
+ nextWeek: '[आउँदो] dddd[,] LT',
+ lastDay: '[हिजो] LT',
+ lastWeek: '[गएको] dddd[,] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sमा',
+ past: '%s अगाडि',
+ s: 'केही क्षण',
+ ss: '%d सेकेण्ड',
+ m: 'एक मिनेट',
+ mm: '%d मिनेट',
+ h: 'एक घण्टा',
+ hh: '%d घण्टा',
+ d: 'एक दिन',
+ dd: '%d दिन',
+ M: 'एक महिना',
+ MM: '%d महिना',
+ y: 'एक बर्ष',
+ yy: '%d बर्ष',
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/nl-be.js b/vendor/assets/javascripts/momentjs/src/locale/nl-be.js
new file mode 100644
index 000000000..a1ab29586
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/nl-be.js
@@ -0,0 +1,102 @@
+//! moment.js locale configuration
+//! locale : Dutch (Belgium) [nl-be]
+//! author : Joris Röling : https://github.com/jorisroling
+//! author : Jacob Middag : https://github.com/middagj
+
+import moment from '../moment';
+
+var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ monthsParse = [
+ /^jan/i,
+ /^feb/i,
+ /^maart|mrt.?$/i,
+ /^apr/i,
+ /^mei$/i,
+ /^jun[i.]?$/i,
+ /^jul[i.]?$/i,
+ /^aug/i,
+ /^sep/i,
+ /^okt/i,
+ /^nov/i,
+ /^dec/i,
+ ],
+ monthsRegex =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+export default moment.defineLocale('nl-be', {
+ months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots[m.month()];
+ } else {
+ return monthsShortWithDots[m.month()];
+ }
+ },
+
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+ weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+ weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[vandaag om] LT',
+ nextDay: '[morgen om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[gisteren om] LT',
+ lastWeek: '[afgelopen] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'over %s',
+ past: '%s geleden',
+ s: 'een paar seconden',
+ ss: '%d seconden',
+ m: 'één minuut',
+ mm: '%d minuten',
+ h: 'één uur',
+ hh: '%d uur',
+ d: 'één dag',
+ dd: '%d dagen',
+ M: 'één maand',
+ MM: '%d maanden',
+ y: 'één jaar',
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/nl.js b/vendor/assets/javascripts/momentjs/src/locale/nl.js
new file mode 100644
index 000000000..7d0711261
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/nl.js
@@ -0,0 +1,104 @@
+//! moment.js locale configuration
+//! locale : Dutch [nl]
+//! author : Joris Röling : https://github.com/jorisroling
+//! author : Jacob Middag : https://github.com/middagj
+
+import moment from '../moment';
+
+var monthsShortWithDots =
+ 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots =
+ 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ monthsParse = [
+ /^jan/i,
+ /^feb/i,
+ /^maart|mrt.?$/i,
+ /^apr/i,
+ /^mei$/i,
+ /^jun[i.]?$/i,
+ /^jul[i.]?$/i,
+ /^aug/i,
+ /^sep/i,
+ /^okt/i,
+ /^nov/i,
+ /^dec/i,
+ ],
+ monthsRegex =
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+export default moment.defineLocale('nl', {
+ months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: function (m, format) {
+ if (!m) {
+ return monthsShortWithDots;
+ } else if (/-MMM-/.test(format)) {
+ return monthsShortWithoutDots[m.month()];
+ } else {
+ return monthsShortWithDots[m.month()];
+ }
+ },
+
+ monthsRegex: monthsRegex,
+ monthsShortRegex: monthsRegex,
+ monthsStrictRegex:
+ /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
+ monthsShortStrictRegex:
+ /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ weekdays:
+ 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+ weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+ weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD-MM-YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[vandaag om] LT',
+ nextDay: '[morgen om] LT',
+ nextWeek: 'dddd [om] LT',
+ lastDay: '[gisteren om] LT',
+ lastWeek: '[afgelopen] dddd [om] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'over %s',
+ past: '%s geleden',
+ s: 'een paar seconden',
+ ss: '%d seconden',
+ m: 'één minuut',
+ mm: '%d minuten',
+ h: 'één uur',
+ hh: '%d uur',
+ d: 'één dag',
+ dd: '%d dagen',
+ w: 'één week',
+ ww: '%d weken',
+ M: 'één maand',
+ MM: '%d maanden',
+ y: 'één jaar',
+ yy: '%d jaar',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+ ordinal: function (number) {
+ return (
+ number +
+ (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
+ );
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/nn.js b/vendor/assets/javascripts/momentjs/src/locale/nn.js
new file mode 100644
index 000000000..0da11504d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/nn.js
@@ -0,0 +1,59 @@
+//! moment.js locale configuration
+//! locale : Nynorsk [nn]
+//! authors : https://github.com/mechuwind
+//! Stephen Ramthun : https://github.com/stephenramthun
+
+import moment from '../moment';
+
+export default moment.defineLocale('nn', {
+ months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
+ weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
+ weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY [kl.] H:mm',
+ LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[I dag klokka] LT',
+ nextDay: '[I morgon klokka] LT',
+ nextWeek: 'dddd [klokka] LT',
+ lastDay: '[I går klokka] LT',
+ lastWeek: '[Føregåande] dddd [klokka] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: '%s sidan',
+ s: 'nokre sekund',
+ ss: '%d sekund',
+ m: 'eit minutt',
+ mm: '%d minutt',
+ h: 'ein time',
+ hh: '%d timar',
+ d: 'ein dag',
+ dd: '%d dagar',
+ w: 'ei veke',
+ ww: '%d veker',
+ M: 'ein månad',
+ MM: '%d månader',
+ y: 'eit år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/oc-lnc.js b/vendor/assets/javascripts/momentjs/src/locale/oc-lnc.js
new file mode 100644
index 000000000..cc055613a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/oc-lnc.js
@@ -0,0 +1,85 @@
+//! moment.js locale configuration
+//! locale : Occitan, lengadocian dialecte [oc-lnc]
+//! author : Quentin PAGÈS : https://github.com/Quenty31
+
+import moment from '../moment';
+
+export default moment.defineLocale('oc-lnc', {
+ months: {
+ standalone:
+ 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
+ '_'
+ ),
+ format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
+ '_'
+ ),
+ isFormat: /D[oD]?(\s)+MMMM/,
+ },
+ monthsShort:
+ 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
+ '_'
+ ),
+ weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
+ weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [de] YYYY',
+ ll: 'D MMM YYYY',
+ LLL: 'D MMMM [de] YYYY [a] H:mm',
+ lll: 'D MMM YYYY, H:mm',
+ LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
+ llll: 'ddd D MMM YYYY, H:mm',
+ },
+ calendar: {
+ sameDay: '[uèi a] LT',
+ nextDay: '[deman a] LT',
+ nextWeek: 'dddd [a] LT',
+ lastDay: '[ièr a] LT',
+ lastWeek: 'dddd [passat a] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: "d'aquí %s",
+ past: 'fa %s',
+ s: 'unas segondas',
+ ss: '%d segondas',
+ m: 'una minuta',
+ mm: '%d minutas',
+ h: 'una ora',
+ hh: '%d oras',
+ d: 'un jorn',
+ dd: '%d jorns',
+ M: 'un mes',
+ MM: '%d meses',
+ y: 'un an',
+ yy: '%d ans',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
+ ordinal: function (number, period) {
+ var output =
+ number === 1
+ ? 'r'
+ : number === 2
+ ? 'n'
+ : number === 3
+ ? 'r'
+ : number === 4
+ ? 't'
+ : 'è';
+ if (period === 'w' || period === 'W') {
+ output = 'a';
+ }
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4,
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/pa-in.js b/vendor/assets/javascripts/momentjs/src/locale/pa-in.js
new file mode 100644
index 000000000..e39dbd58c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/pa-in.js
@@ -0,0 +1,122 @@
+//! moment.js locale configuration
+//! locale : Punjabi (India) [pa-in]
+//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '੧',
+ 2: '੨',
+ 3: '੩',
+ 4: '੪',
+ 5: '੫',
+ 6: '੬',
+ 7: '੭',
+ 8: '੮',
+ 9: '੯',
+ 0: '੦',
+ },
+ numberMap = {
+ '੧': '1',
+ '੨': '2',
+ '੩': '3',
+ '੪': '4',
+ '੫': '5',
+ '੬': '6',
+ '੭': '7',
+ '੮': '8',
+ '੯': '9',
+ '੦': '0',
+ };
+
+export default moment.defineLocale('pa-in', {
+ // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
+ months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
+ '_'
+ ),
+ weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
+ '_'
+ ),
+ weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+ weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm ਵਜੇ',
+ LTS: 'A h:mm:ss ਵਜੇ',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
+ },
+ calendar: {
+ sameDay: '[ਅਜ] LT',
+ nextDay: '[ਕਲ] LT',
+ nextWeek: '[ਅਗਲਾ] dddd, LT',
+ lastDay: '[ਕਲ] LT',
+ lastWeek: '[ਪਿਛਲੇ] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s ਵਿੱਚ',
+ past: '%s ਪਿਛਲੇ',
+ s: 'ਕੁਝ ਸਕਿੰਟ',
+ ss: '%d ਸਕਿੰਟ',
+ m: 'ਇਕ ਮਿੰਟ',
+ mm: '%d ਮਿੰਟ',
+ h: 'ਇੱਕ ਘੰਟਾ',
+ hh: '%d ਘੰਟੇ',
+ d: 'ਇੱਕ ਦਿਨ',
+ dd: '%d ਦਿਨ',
+ M: 'ਇੱਕ ਮਹੀਨਾ',
+ MM: '%d ਮਹੀਨੇ',
+ y: 'ਇੱਕ ਸਾਲ',
+ yy: '%d ਸਾਲ',
+ },
+ preparse: function (string) {
+ return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
+ meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ਰਾਤ') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ਸਵੇਰ') {
+ return hour;
+ } else if (meridiem === 'ਦੁਪਹਿਰ') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'ਸ਼ਾਮ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ਰਾਤ';
+ } else if (hour < 10) {
+ return 'ਸਵੇਰ';
+ } else if (hour < 17) {
+ return 'ਦੁਪਹਿਰ';
+ } else if (hour < 20) {
+ return 'ਸ਼ਾਮ';
+ } else {
+ return 'ਰਾਤ';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/pl.js b/vendor/assets/javascripts/momentjs/src/locale/pl.js
new file mode 100644
index 000000000..0608c0db1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/pl.js
@@ -0,0 +1,140 @@
+//! moment.js locale configuration
+//! locale : Polish [pl]
+//! author : Rafal Hirsz : https://github.com/evoL
+
+import moment from '../moment';
+
+var monthsNominative =
+ 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
+ '_'
+ ),
+ monthsSubjective =
+ 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
+ '_'
+ ),
+ monthsParse = [
+ /^sty/i,
+ /^lut/i,
+ /^mar/i,
+ /^kwi/i,
+ /^maj/i,
+ /^cze/i,
+ /^lip/i,
+ /^sie/i,
+ /^wrz/i,
+ /^paź/i,
+ /^lis/i,
+ /^gru/i,
+ ];
+function plural(n) {
+ return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
+}
+function translate(number, withoutSuffix, key) {
+ var result = number + ' ';
+ switch (key) {
+ case 'ss':
+ return result + (plural(number) ? 'sekundy' : 'sekund');
+ case 'm':
+ return withoutSuffix ? 'minuta' : 'minutę';
+ case 'mm':
+ return result + (plural(number) ? 'minuty' : 'minut');
+ case 'h':
+ return withoutSuffix ? 'godzina' : 'godzinę';
+ case 'hh':
+ return result + (plural(number) ? 'godziny' : 'godzin');
+ case 'ww':
+ return result + (plural(number) ? 'tygodnie' : 'tygodni');
+ case 'MM':
+ return result + (plural(number) ? 'miesiące' : 'miesięcy');
+ case 'yy':
+ return result + (plural(number) ? 'lata' : 'lat');
+ }
+}
+
+export default moment.defineLocale('pl', {
+ months: function (momentToFormat, format) {
+ if (!momentToFormat) {
+ return monthsNominative;
+ } else if (/D MMMM/.test(format)) {
+ return monthsSubjective[momentToFormat.month()];
+ } else {
+ return monthsNominative[momentToFormat.month()];
+ }
+ },
+ monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+ weekdays:
+ 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
+ weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
+ weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Dziś o] LT',
+ nextDay: '[Jutro o] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[W niedzielę o] LT';
+
+ case 2:
+ return '[We wtorek o] LT';
+
+ case 3:
+ return '[W środę o] LT';
+
+ case 6:
+ return '[W sobotę o] LT';
+
+ default:
+ return '[W] dddd [o] LT';
+ }
+ },
+ lastDay: '[Wczoraj o] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[W zeszłą niedzielę o] LT';
+ case 3:
+ return '[W zeszłą środę o] LT';
+ case 6:
+ return '[W zeszłą sobotę o] LT';
+ default:
+ return '[W zeszły] dddd [o] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: '%s temu',
+ s: 'kilka sekund',
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: '1 dzień',
+ dd: '%d dni',
+ w: 'tydzień',
+ ww: translate,
+ M: 'miesiąc',
+ MM: translate,
+ y: 'rok',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/pt-br.js b/vendor/assets/javascripts/momentjs/src/locale/pt-br.js
new file mode 100644
index 000000000..eb9aa64ac
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/pt-br.js
@@ -0,0 +1,58 @@
+//! moment.js locale configuration
+//! locale : Portuguese (Brazil) [pt-br]
+//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
+
+import moment from '../moment';
+
+export default moment.defineLocale('pt-br', {
+ months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
+ weekdays:
+ 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
+ '_'
+ ),
+ weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
+ weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hoje às] LT',
+ nextDay: '[Amanhã às] LT',
+ nextWeek: 'dddd [às] LT',
+ lastDay: '[Ontem às] LT',
+ lastWeek: function () {
+ return this.day() === 0 || this.day() === 6
+ ? '[Último] dddd [às] LT' // Saturday + Sunday
+ : '[Última] dddd [às] LT'; // Monday - Friday
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'em %s',
+ past: 'há %s',
+ s: 'poucos segundos',
+ ss: '%d segundos',
+ m: 'um minuto',
+ mm: '%d minutos',
+ h: 'uma hora',
+ hh: '%d horas',
+ d: 'um dia',
+ dd: '%d dias',
+ M: 'um mês',
+ MM: '%d meses',
+ y: 'um ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ invalidDate: 'Data inválida',
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/pt.js b/vendor/assets/javascripts/momentjs/src/locale/pt.js
new file mode 100644
index 000000000..d9b605575
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/pt.js
@@ -0,0 +1,63 @@
+//! moment.js locale configuration
+//! locale : Portuguese [pt]
+//! author : Jefferson : https://github.com/jalex79
+
+import moment from '../moment';
+
+export default moment.defineLocale('pt', {
+ months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
+ '_'
+ ),
+ monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
+ weekdays:
+ 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
+ weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D [de] MMMM [de] YYYY',
+ LLL: 'D [de] MMMM [de] YYYY HH:mm',
+ LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hoje às] LT',
+ nextDay: '[Amanhã às] LT',
+ nextWeek: 'dddd [às] LT',
+ lastDay: '[Ontem às] LT',
+ lastWeek: function () {
+ return this.day() === 0 || this.day() === 6
+ ? '[Último] dddd [às] LT' // Saturday + Sunday
+ : '[Última] dddd [às] LT'; // Monday - Friday
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'em %s',
+ past: 'há %s',
+ s: 'segundos',
+ ss: '%d segundos',
+ m: 'um minuto',
+ mm: '%d minutos',
+ h: 'uma hora',
+ hh: '%d horas',
+ d: 'um dia',
+ dd: '%d dias',
+ w: 'uma semana',
+ ww: '%d semanas',
+ M: 'um mês',
+ MM: '%d meses',
+ y: 'um ano',
+ yy: '%d anos',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
+ ordinal: '%dº',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ro.js b/vendor/assets/javascripts/momentjs/src/locale/ro.js
new file mode 100644
index 000000000..d5bc5ea76
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ro.js
@@ -0,0 +1,76 @@
+//! moment.js locale configuration
+//! locale : Romanian [ro]
+//! author : Vlad Gurdiga : https://github.com/gurdiga
+//! author : Valentin Agachi : https://github.com/avaly
+//! author : Emanuel Cepoi : https://github.com/cepem
+
+import moment from '../moment';
+
+function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: 'secunde',
+ mm: 'minute',
+ hh: 'ore',
+ dd: 'zile',
+ ww: 'săptămâni',
+ MM: 'luni',
+ yy: 'ani',
+ },
+ separator = ' ';
+ if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
+ separator = ' de ';
+ }
+ return number + separator + format[key];
+}
+
+export default moment.defineLocale('ro', {
+ months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
+ weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
+ weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY H:mm',
+ LLLL: 'dddd, D MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[azi la] LT',
+ nextDay: '[mâine la] LT',
+ nextWeek: 'dddd [la] LT',
+ lastDay: '[ieri la] LT',
+ lastWeek: '[fosta] dddd [la] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'peste %s',
+ past: '%s în urmă',
+ s: 'câteva secunde',
+ ss: relativeTimeWithPlural,
+ m: 'un minut',
+ mm: relativeTimeWithPlural,
+ h: 'o oră',
+ hh: relativeTimeWithPlural,
+ d: 'o zi',
+ dd: relativeTimeWithPlural,
+ w: 'o săptămână',
+ ww: relativeTimeWithPlural,
+ M: 'o lună',
+ MM: relativeTimeWithPlural,
+ y: 'un an',
+ yy: relativeTimeWithPlural,
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ru.js b/vendor/assets/javascripts/momentjs/src/locale/ru.js
new file mode 100644
index 000000000..9f17e18ea
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ru.js
@@ -0,0 +1,213 @@
+//! moment.js locale configuration
+//! locale : Russian [ru]
+//! author : Viktorminator : https://github.com/Viktorminator
+//! author : Menelion Elensúle : https://github.com/Oire
+//! author : Коренберг Марк : https://github.com/socketpair
+
+import moment from '../moment';
+
+function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+}
+function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
+ mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
+ hh: 'час_часа_часов',
+ dd: 'день_дня_дней',
+ ww: 'неделя_недели_недель',
+ MM: 'месяц_месяца_месяцев',
+ yy: 'год_года_лет',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'минута' : 'минуту';
+ } else {
+ return number + ' ' + plural(format[key], +number);
+ }
+}
+var monthsParse = [
+ /^янв/i,
+ /^фев/i,
+ /^мар/i,
+ /^апр/i,
+ /^ма[йя]/i,
+ /^июн/i,
+ /^июл/i,
+ /^авг/i,
+ /^сен/i,
+ /^окт/i,
+ /^ноя/i,
+ /^дек/i,
+];
+
+// http://new.gramota.ru/spravka/rules/139-prop : § 103
+// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
+// CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
+export default moment.defineLocale('ru', {
+ months: {
+ format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
+ '_'
+ ),
+ standalone:
+ 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
+ '_'
+ ),
+ },
+ monthsShort: {
+ // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
+ format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
+ '_'
+ ),
+ standalone:
+ 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
+ '_'
+ ),
+ },
+ weekdays: {
+ standalone:
+ 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
+ '_'
+ ),
+ format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
+ '_'
+ ),
+ isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
+ },
+ weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ monthsParse: monthsParse,
+ longMonthsParse: monthsParse,
+ shortMonthsParse: monthsParse,
+
+ // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
+ monthsRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+ // копия предыдущего
+ monthsShortRegex:
+ /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+ // полные названия с падежами
+ monthsStrictRegex:
+ /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
+
+ // Выражение, которое соответствует только сокращённым формам
+ monthsShortStrictRegex:
+ /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY г.',
+ LLL: 'D MMMM YYYY г., H:mm',
+ LLLL: 'dddd, D MMMM YYYY г., H:mm',
+ },
+ calendar: {
+ sameDay: '[Сегодня, в] LT',
+ nextDay: '[Завтра, в] LT',
+ lastDay: '[Вчера, в] LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В следующее] dddd, [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В следующий] dddd, [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В следующую] dddd, [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd, [в] LT';
+ } else {
+ return '[В] dddd, [в] LT';
+ }
+ }
+ },
+ lastWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В прошлое] dddd, [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В прошлый] dddd, [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В прошлую] dddd, [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd, [в] LT';
+ } else {
+ return '[В] dddd, [в] LT';
+ }
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'через %s',
+ past: '%s назад',
+ s: 'несколько секунд',
+ ss: relativeTimeWithPlural,
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: 'час',
+ hh: relativeTimeWithPlural,
+ d: 'день',
+ dd: relativeTimeWithPlural,
+ w: 'неделя',
+ ww: relativeTimeWithPlural,
+ M: 'месяц',
+ MM: relativeTimeWithPlural,
+ y: 'год',
+ yy: relativeTimeWithPlural,
+ },
+ meridiemParse: /ночи|утра|дня|вечера/i,
+ isPM: function (input) {
+ return /^(дня|вечера)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночи';
+ } else if (hour < 12) {
+ return 'утра';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечера';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ case 'w':
+ case 'W':
+ return number + '-я';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/sd.js b/vendor/assets/javascripts/momentjs/src/locale/sd.js
new file mode 100644
index 000000000..20f10590a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/sd.js
@@ -0,0 +1,81 @@
+//! moment.js locale configuration
+//! locale : Sindhi [sd]
+//! author : Narain Sagar : https://github.com/narainsagar
+
+import moment from '../moment';
+
+var months = [
+ 'جنوري',
+ 'فيبروري',
+ 'مارچ',
+ 'اپريل',
+ 'مئي',
+ 'جون',
+ 'جولاءِ',
+ 'آگسٽ',
+ 'سيپٽمبر',
+ 'آڪٽوبر',
+ 'نومبر',
+ 'ڊسمبر',
+ ],
+ days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
+
+export default moment.defineLocale('sd', {
+ months: months,
+ monthsShort: months,
+ weekdays: days,
+ weekdaysShort: days,
+ weekdaysMin: days,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd، D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /صبح|شام/,
+ isPM: function (input) {
+ return 'شام' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'صبح';
+ }
+ return 'شام';
+ },
+ calendar: {
+ sameDay: '[اڄ] LT',
+ nextDay: '[سڀاڻي] LT',
+ nextWeek: 'dddd [اڳين هفتي تي] LT',
+ lastDay: '[ڪالهه] LT',
+ lastWeek: '[گزريل هفتي] dddd [تي] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s پوء',
+ past: '%s اڳ',
+ s: 'چند سيڪنڊ',
+ ss: '%d سيڪنڊ',
+ m: 'هڪ منٽ',
+ mm: '%d منٽ',
+ h: 'هڪ ڪلاڪ',
+ hh: '%d ڪلاڪ',
+ d: 'هڪ ڏينهن',
+ dd: '%d ڏينهن',
+ M: 'هڪ مهينو',
+ MM: '%d مهينا',
+ y: 'هڪ سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/se.js b/vendor/assets/javascripts/momentjs/src/locale/se.js
new file mode 100644
index 000000000..e8eec580b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/se.js
@@ -0,0 +1,57 @@
+//! moment.js locale configuration
+//! locale : Northern Sami [se]
+//! authors : Bård Rolstad Henriksen : https://github.com/karamell
+
+import moment from '../moment';
+
+export default moment.defineLocale('se', {
+ months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
+ weekdays:
+ 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
+ '_'
+ ),
+ weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
+ weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'MMMM D. [b.] YYYY',
+ LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
+ LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',
+ },
+ calendar: {
+ sameDay: '[otne ti] LT',
+ nextDay: '[ihttin ti] LT',
+ nextWeek: 'dddd [ti] LT',
+ lastDay: '[ikte ti] LT',
+ lastWeek: '[ovddit] dddd [ti] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s geažes',
+ past: 'maŋit %s',
+ s: 'moadde sekunddat',
+ ss: '%d sekunddat',
+ m: 'okta minuhta',
+ mm: '%d minuhtat',
+ h: 'okta diimmu',
+ hh: '%d diimmut',
+ d: 'okta beaivi',
+ dd: '%d beaivvit',
+ M: 'okta mánnu',
+ MM: '%d mánut',
+ y: 'okta jahki',
+ yy: '%d jagit',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/si.js b/vendor/assets/javascripts/momentjs/src/locale/si.js
new file mode 100644
index 000000000..0f2498ca0
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/si.js
@@ -0,0 +1,69 @@
+//! moment.js locale configuration
+//! locale : Sinhalese [si]
+//! author : Sampath Sitinamaluwa : https://github.com/sampathsris
+
+import moment from '../moment';
+
+/*jshint -W100*/
+export default moment.defineLocale('si', {
+ months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
+ '_'
+ ),
+ monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
+ '_'
+ ),
+ weekdays:
+ 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
+ '_'
+ ),
+ weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),
+ weekdaysMin: 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'a h:mm',
+ LTS: 'a h:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY MMMM D',
+ LLL: 'YYYY MMMM D, a h:mm',
+ LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',
+ },
+ calendar: {
+ sameDay: '[අද] LT[ට]',
+ nextDay: '[හෙට] LT[ට]',
+ nextWeek: 'dddd LT[ට]',
+ lastDay: '[ඊයේ] LT[ට]',
+ lastWeek: '[පසුගිය] dddd LT[ට]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%sකින්',
+ past: '%sකට පෙර',
+ s: 'තත්පර කිහිපය',
+ ss: 'තත්පර %d',
+ m: 'මිනිත්තුව',
+ mm: 'මිනිත්තු %d',
+ h: 'පැය',
+ hh: 'පැය %d',
+ d: 'දිනය',
+ dd: 'දින %d',
+ M: 'මාසය',
+ MM: 'මාස %d',
+ y: 'වසර',
+ yy: 'වසර %d',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
+ ordinal: function (number) {
+ return number + ' වැනි';
+ },
+ meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
+ isPM: function (input) {
+ return input === 'ප.ව.' || input === 'පස් වරු';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'ප.ව.' : 'පස් වරු';
+ } else {
+ return isLower ? 'පෙ.ව.' : 'පෙර වරු';
+ }
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/sk.js b/vendor/assets/javascripts/momentjs/src/locale/sk.js
new file mode 100644
index 000000000..7162ed677
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/sk.js
@@ -0,0 +1,145 @@
+//! moment.js locale configuration
+//! locale : Slovak [sk]
+//! author : Martin Minka : https://github.com/k2s
+//! based on work of petrbela : https://github.com/petrbela
+
+import moment from '../moment';
+
+var months =
+ 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
+ '_'
+ ),
+ monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
+function plural(n) {
+ return n > 1 && n < 5;
+}
+function translate(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
+ case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'sekundy' : 'sekúnd');
+ } else {
+ return result + 'sekundami';
+ }
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'minúty' : 'minút');
+ } else {
+ return result + 'minútami';
+ }
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'hodiny' : 'hodín');
+ } else {
+ return result + 'hodinami';
+ }
+ case 'd': // a day / in a day / a day ago
+ return withoutSuffix || isFuture ? 'deň' : 'dňom';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'dni' : 'dní');
+ } else {
+ return result + 'dňami';
+ }
+ case 'M': // a month / in a month / a month ago
+ return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'mesiace' : 'mesiacov');
+ } else {
+ return result + 'mesiacmi';
+ }
+ case 'y': // a year / in a year / a year ago
+ return withoutSuffix || isFuture ? 'rok' : 'rokom';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'roky' : 'rokov');
+ } else {
+ return result + 'rokmi';
+ }
+ }
+}
+
+export default moment.defineLocale('sk', {
+ months: months,
+ monthsShort: monthsShort,
+ weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
+ weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
+ weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[dnes o] LT',
+ nextDay: '[zajtra o] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [o] LT';
+ case 3:
+ return '[v stredu o] LT';
+ case 4:
+ return '[vo štvrtok o] LT';
+ case 5:
+ return '[v piatok o] LT';
+ case 6:
+ return '[v sobotu o] LT';
+ }
+ },
+ lastDay: '[včera o] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[minulú nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[minulý] dddd [o] LT';
+ case 3:
+ return '[minulú stredu o] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [o] LT';
+ case 6:
+ return '[minulú sobotu o] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'pred %s',
+ s: translate,
+ ss: translate,
+ m: translate,
+ mm: translate,
+ h: translate,
+ hh: translate,
+ d: translate,
+ dd: translate,
+ M: translate,
+ MM: translate,
+ y: translate,
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/sl.js b/vendor/assets/javascripts/momentjs/src/locale/sl.js
new file mode 100644
index 000000000..0290a8ec7
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/sl.js
@@ -0,0 +1,171 @@
+//! moment.js locale configuration
+//! locale : Slovenian [sl]
+//! author : Robert Sedovšek : https://github.com/sedovsek
+
+import moment from '../moment';
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
+ switch (key) {
+ case 's':
+ return withoutSuffix || isFuture
+ ? 'nekaj sekund'
+ : 'nekaj sekundami';
+ case 'ss':
+ if (number === 1) {
+ result += withoutSuffix ? 'sekundo' : 'sekundi';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
+ } else {
+ result += 'sekund';
+ }
+ return result;
+ case 'm':
+ return withoutSuffix ? 'ena minuta' : 'eno minuto';
+ case 'mm':
+ if (number === 1) {
+ result += withoutSuffix ? 'minuta' : 'minuto';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'minute' : 'minutami';
+ } else {
+ result += withoutSuffix || isFuture ? 'minut' : 'minutami';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'ena ura' : 'eno uro';
+ case 'hh':
+ if (number === 1) {
+ result += withoutSuffix ? 'ura' : 'uro';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'uri' : 'urama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'ure' : 'urami';
+ } else {
+ result += withoutSuffix || isFuture ? 'ur' : 'urami';
+ }
+ return result;
+ case 'd':
+ return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
+ case 'dd':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'dan' : 'dnem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
+ } else {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
+ }
+ return result;
+ case 'M':
+ return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
+ case 'MM':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
+ } else {
+ result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
+ }
+ return result;
+ case 'y':
+ return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
+ case 'yy':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'leto' : 'letom';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'leti' : 'letoma';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'leta' : 'leti';
+ } else {
+ result += withoutSuffix || isFuture ? 'let' : 'leti';
+ }
+ return result;
+ }
+}
+
+export default moment.defineLocale('sl', {
+ months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
+ weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
+ weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD. MM. YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm',
+ },
+ calendar: {
+ sameDay: '[danes ob] LT',
+ nextDay: '[jutri ob] LT',
+
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[v] [nedeljo] [ob] LT';
+ case 3:
+ return '[v] [sredo] [ob] LT';
+ case 6:
+ return '[v] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[v] dddd [ob] LT';
+ }
+ },
+ lastDay: '[včeraj ob] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[prejšnjo] [nedeljo] [ob] LT';
+ case 3:
+ return '[prejšnjo] [sredo] [ob] LT';
+ case 6:
+ return '[prejšnjo] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prejšnji] dddd [ob] LT';
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'čez %s',
+ past: 'pred %s',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/sq.js b/vendor/assets/javascripts/momentjs/src/locale/sq.js
new file mode 100644
index 000000000..3b3bcfa9f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/sq.js
@@ -0,0 +1,65 @@
+//! moment.js locale configuration
+//! locale : Albanian [sq]
+//! author : Flakërim Ismani : https://github.com/flakerimi
+//! author : Menelion Elensúle : https://github.com/Oire
+//! author : Oerd Cukalla : https://github.com/oerd
+
+import moment from '../moment';
+
+export default moment.defineLocale('sq', {
+ months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
+ weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
+ '_'
+ ),
+ weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
+ weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
+ weekdaysParseExact: true,
+ meridiemParse: /PD|MD/,
+ isPM: function (input) {
+ return input.charAt(0) === 'M';
+ },
+ meridiem: function (hours, minutes, isLower) {
+ return hours < 12 ? 'PD' : 'MD';
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Sot në] LT',
+ nextDay: '[Nesër në] LT',
+ nextWeek: 'dddd [në] LT',
+ lastDay: '[Dje në] LT',
+ lastWeek: 'dddd [e kaluar në] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'në %s',
+ past: '%s më parë',
+ s: 'disa sekonda',
+ ss: '%d sekonda',
+ m: 'një minutë',
+ mm: '%d minuta',
+ h: 'një orë',
+ hh: '%d orë',
+ d: 'një ditë',
+ dd: '%d ditë',
+ M: 'një muaj',
+ MM: '%d muaj',
+ y: 'një vit',
+ yy: '%d vite',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/sr-cyrl.js b/vendor/assets/javascripts/momentjs/src/locale/sr-cyrl.js
new file mode 100644
index 000000000..5e0581014
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/sr-cyrl.js
@@ -0,0 +1,127 @@
+//! moment.js locale configuration
+//! locale : Serbian Cyrillic [sr-cyrl]
+//! author : Milan Janačković : https://github.com/milan-j
+//! author : Stefan Crnjaković : https://github.com/crnjakovic
+
+import moment from '../moment';
+
+var translator = {
+ words: {
+ //Different grammatical cases
+ ss: ['секунда', 'секунде', 'секунди'],
+ m: ['један минут', 'једног минута'],
+ mm: ['минут', 'минута', 'минута'],
+ h: ['један сат', 'једног сата'],
+ hh: ['сат', 'сата', 'сати'],
+ d: ['један дан', 'једног дана'],
+ dd: ['дан', 'дана', 'дана'],
+ M: ['један месец', 'једног месеца'],
+ MM: ['месец', 'месеца', 'месеци'],
+ y: ['једну годину', 'једне године'],
+ yy: ['годину', 'године', 'година'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator.words[key],
+ word;
+
+ if (key.length === 1) {
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'једна година';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'годину') {
+ return number + ' година';
+ }
+
+ return number + ' ' + word;
+ },
+};
+
+export default moment.defineLocale('sr-cyrl', {
+ months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
+ '_'
+ ),
+ monthsShort:
+ 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
+ weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
+ weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
+ },
+ calendar: {
+ sameDay: '[данас у] LT',
+ nextDay: '[сутра у] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[у] [недељу] [у] LT';
+ case 3:
+ return '[у] [среду] [у] LT';
+ case 6:
+ return '[у] [суботу] [у] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[у] dddd [у] LT';
+ }
+ },
+ lastDay: '[јуче у] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[прошле] [недеље] [у] LT',
+ '[прошлог] [понедељка] [у] LT',
+ '[прошлог] [уторка] [у] LT',
+ '[прошле] [среде] [у] LT',
+ '[прошлог] [четвртка] [у] LT',
+ '[прошлог] [петка] [у] LT',
+ '[прошле] [суботе] [у] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: 'пре %s',
+ s: 'неколико секунди',
+ ss: translator.translate,
+ m: translator.translate,
+ mm: translator.translate,
+ h: translator.translate,
+ hh: translator.translate,
+ d: translator.translate,
+ dd: translator.translate,
+ M: translator.translate,
+ MM: translator.translate,
+ y: translator.translate,
+ yy: translator.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/sr.js b/vendor/assets/javascripts/momentjs/src/locale/sr.js
new file mode 100644
index 000000000..a407ec761
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/sr.js
@@ -0,0 +1,129 @@
+//! moment.js locale configuration
+//! locale : Serbian [sr]
+//! author : Milan Janačković : https://github.com/milan-j
+//! author : Stefan Crnjaković : https://github.com/crnjakovic
+
+import moment from '../moment';
+
+var translator = {
+ words: {
+ //Different grammatical cases
+ ss: ['sekunda', 'sekunde', 'sekundi'],
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ d: ['jedan dan', 'jednog dana'],
+ dd: ['dan', 'dana', 'dana'],
+ M: ['jedan mesec', 'jednog meseca'],
+ MM: ['mesec', 'meseca', 'meseci'],
+ y: ['jednu godinu', 'jedne godine'],
+ yy: ['godinu', 'godine', 'godina'],
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ if (
+ number % 10 >= 1 &&
+ number % 10 <= 4 &&
+ (number % 100 < 10 || number % 100 >= 20)
+ ) {
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
+ }
+ return wordKey[2];
+ },
+ translate: function (number, withoutSuffix, key, isFuture) {
+ var wordKey = translator.words[key],
+ word;
+
+ if (key.length === 1) {
+ // Nominativ
+ if (key === 'y' && withoutSuffix) return 'jedna godina';
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
+ }
+
+ word = translator.correctGrammaticalCase(number, wordKey);
+ // Nominativ
+ if (key === 'yy' && withoutSuffix && word === 'godinu') {
+ return number + ' godina';
+ }
+
+ return number + ' ' + word;
+ },
+};
+
+export default moment.defineLocale('sr', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
+ '_'
+ ),
+ weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'D. M. YYYY.',
+ LL: 'D. MMMM YYYY.',
+ LLL: 'D. MMMM YYYY. H:mm',
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sutra u] LT',
+ nextWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[u] [nedelju] [u] LT';
+ case 3:
+ return '[u] [sredu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
+ }
+ },
+ lastDay: '[juče u] LT',
+ lastWeek: function () {
+ var lastWeekDays = [
+ '[prošle] [nedelje] [u] LT',
+ '[prošlog] [ponedeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT',
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'za %s',
+ past: 'pre %s',
+ s: 'nekoliko sekundi',
+ ss: translator.translate,
+ m: translator.translate,
+ mm: translator.translate,
+ h: translator.translate,
+ hh: translator.translate,
+ d: translator.translate,
+ dd: translator.translate,
+ M: translator.translate,
+ MM: translator.translate,
+ y: translator.translate,
+ yy: translator.translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ss.js b/vendor/assets/javascripts/momentjs/src/locale/ss.js
new file mode 100644
index 000000000..60db499eb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ss.js
@@ -0,0 +1,84 @@
+//! moment.js locale configuration
+//! locale : siSwati [ss]
+//! author : Nicolai Davies : https://github.com/nicolaidavies
+
+import moment from '../moment';
+
+export default moment.defineLocale('ss', {
+ months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
+ '_'
+ ),
+ monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
+ weekdays:
+ 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
+ weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Namuhla nga] LT',
+ nextDay: '[Kusasa nga] LT',
+ nextWeek: 'dddd [nga] LT',
+ lastDay: '[Itolo nga] LT',
+ lastWeek: 'dddd [leliphelile] [nga] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'nga %s',
+ past: 'wenteka nga %s',
+ s: 'emizuzwana lomcane',
+ ss: '%d mzuzwana',
+ m: 'umzuzu',
+ mm: '%d emizuzu',
+ h: 'lihora',
+ hh: '%d emahora',
+ d: 'lilanga',
+ dd: '%d emalanga',
+ M: 'inyanga',
+ MM: '%d tinyanga',
+ y: 'umnyaka',
+ yy: '%d iminyaka',
+ },
+ meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 11) {
+ return 'ekuseni';
+ } else if (hours < 15) {
+ return 'emini';
+ } else if (hours < 19) {
+ return 'entsambama';
+ } else {
+ return 'ebusuku';
+ }
+ },
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'ekuseni') {
+ return hour;
+ } else if (meridiem === 'emini') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
+ if (hour === 0) {
+ return 0;
+ }
+ return hour + 12;
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: '%d',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/sv.js b/vendor/assets/javascripts/momentjs/src/locale/sv.js
new file mode 100644
index 000000000..6f5c1d999
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/sv.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : Swedish [sv]
+//! author : Jens Alm : https://github.com/ulmus
+
+import moment from '../moment';
+
+export default moment.defineLocale('sv', {
+ months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
+ '_'
+ ),
+ monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
+ weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
+ weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY [kl.] HH:mm',
+ LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Idag] LT',
+ nextDay: '[Imorgon] LT',
+ lastDay: '[Igår] LT',
+ nextWeek: '[På] dddd LT',
+ lastWeek: '[I] dddd[s] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'om %s',
+ past: 'för %s sedan',
+ s: 'några sekunder',
+ ss: '%d sekunder',
+ m: 'en minut',
+ mm: '%d minuter',
+ h: 'en timme',
+ hh: '%d timmar',
+ d: 'en dag',
+ dd: '%d dagar',
+ M: 'en månad',
+ MM: '%d månader',
+ y: 'ett år',
+ yy: '%d år',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? ':e'
+ : b === 1
+ ? ':a'
+ : b === 2
+ ? ':a'
+ : b === 3
+ ? ':e'
+ : ':e';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/sw.js b/vendor/assets/javascripts/momentjs/src/locale/sw.js
new file mode 100644
index 000000000..35a266832
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/sw.js
@@ -0,0 +1,55 @@
+//! moment.js locale configuration
+//! locale : Swahili [sw]
+//! author : Fahad Kassim : https://github.com/fadsel
+
+import moment from '../moment';
+
+export default moment.defineLocale('sw', {
+ months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
+ weekdays:
+ 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
+ '_'
+ ),
+ weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
+ weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'hh:mm A',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[leo saa] LT',
+ nextDay: '[kesho saa] LT',
+ nextWeek: '[wiki ijayo] dddd [saat] LT',
+ lastDay: '[jana] LT',
+ lastWeek: '[wiki iliyopita] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s baadaye',
+ past: 'tokea %s',
+ s: 'hivi punde',
+ ss: 'sekunde %d',
+ m: 'dakika moja',
+ mm: 'dakika %d',
+ h: 'saa limoja',
+ hh: 'masaa %d',
+ d: 'siku moja',
+ dd: 'siku %d',
+ M: 'mwezi mmoja',
+ MM: 'miezi %d',
+ y: 'mwaka mmoja',
+ yy: 'miaka %d',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ta.js b/vendor/assets/javascripts/momentjs/src/locale/ta.js
new file mode 100644
index 000000000..fdfa1ba1a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ta.js
@@ -0,0 +1,131 @@
+//! moment.js locale configuration
+//! locale : Tamil [ta]
+//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
+
+import moment from '../moment';
+
+var symbolMap = {
+ 1: '௧',
+ 2: '௨',
+ 3: '௩',
+ 4: '௪',
+ 5: '௫',
+ 6: '௬',
+ 7: '௭',
+ 8: '௮',
+ 9: '௯',
+ 0: '௦',
+ },
+ numberMap = {
+ '௧': '1',
+ '௨': '2',
+ '௩': '3',
+ '௪': '4',
+ '௫': '5',
+ '௬': '6',
+ '௭': '7',
+ '௮': '8',
+ '௯': '9',
+ '௦': '0',
+ };
+
+export default moment.defineLocale('ta', {
+ months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
+ '_'
+ ),
+ weekdays:
+ 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
+ '_'
+ ),
+ weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
+ '_'
+ ),
+ weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, HH:mm',
+ LLLL: 'dddd, D MMMM YYYY, HH:mm',
+ },
+ calendar: {
+ sameDay: '[இன்று] LT',
+ nextDay: '[நாளை] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[நேற்று] LT',
+ lastWeek: '[கடந்த வாரம்] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s இல்',
+ past: '%s முன்',
+ s: 'ஒரு சில விநாடிகள்',
+ ss: '%d விநாடிகள்',
+ m: 'ஒரு நிமிடம்',
+ mm: '%d நிமிடங்கள்',
+ h: 'ஒரு மணி நேரம்',
+ hh: '%d மணி நேரம்',
+ d: 'ஒரு நாள்',
+ dd: '%d நாட்கள்',
+ M: 'ஒரு மாதம்',
+ MM: '%d மாதங்கள்',
+ y: 'ஒரு வருடம்',
+ yy: '%d ஆண்டுகள்',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}வது/,
+ ordinal: function (number) {
+ return number + 'வது';
+ },
+ preparse: function (string) {
+ return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
+ return numberMap[match];
+ });
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ });
+ },
+ // refer http://ta.wikipedia.org/s/1er1
+ meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 2) {
+ return ' யாமம்';
+ } else if (hour < 6) {
+ return ' வைகறை'; // வைகறை
+ } else if (hour < 10) {
+ return ' காலை'; // காலை
+ } else if (hour < 14) {
+ return ' நண்பகல்'; // நண்பகல்
+ } else if (hour < 18) {
+ return ' எற்பாடு'; // எற்பாடு
+ } else if (hour < 22) {
+ return ' மாலை'; // மாலை
+ } else {
+ return ' யாமம்';
+ }
+ },
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'யாமம்') {
+ return hour < 2 ? hour : hour + 12;
+ } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
+ return hour;
+ } else if (meridiem === 'நண்பகல்') {
+ return hour >= 10 ? hour : hour + 12;
+ } else {
+ return hour + 12;
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/te.js b/vendor/assets/javascripts/momentjs/src/locale/te.js
new file mode 100644
index 000000000..56f9f163d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/te.js
@@ -0,0 +1,88 @@
+//! moment.js locale configuration
+//! locale : Telugu [te]
+//! author : Krishna Chaitanya Thota : https://github.com/kcthota
+
+import moment from '../moment';
+
+export default moment.defineLocale('te', {
+ months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
+ '_'
+ ),
+ monthsShort:
+ 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
+ '_'
+ ),
+ weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
+ weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
+ longDateFormat: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY, A h:mm',
+ LLLL: 'dddd, D MMMM YYYY, A h:mm',
+ },
+ calendar: {
+ sameDay: '[నేడు] LT',
+ nextDay: '[రేపు] LT',
+ nextWeek: 'dddd, LT',
+ lastDay: '[నిన్న] LT',
+ lastWeek: '[గత] dddd, LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s లో',
+ past: '%s క్రితం',
+ s: 'కొన్ని క్షణాలు',
+ ss: '%d సెకన్లు',
+ m: 'ఒక నిమిషం',
+ mm: '%d నిమిషాలు',
+ h: 'ఒక గంట',
+ hh: '%d గంటలు',
+ d: 'ఒక రోజు',
+ dd: '%d రోజులు',
+ M: 'ఒక నెల',
+ MM: '%d నెలలు',
+ y: 'ఒక సంవత్సరం',
+ yy: '%d సంవత్సరాలు',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}వ/,
+ ordinal: '%dవ',
+ meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'రాత్రి') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'ఉదయం') {
+ return hour;
+ } else if (meridiem === 'మధ్యాహ్నం') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'సాయంత్రం') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'రాత్రి';
+ } else if (hour < 10) {
+ return 'ఉదయం';
+ } else if (hour < 17) {
+ return 'మధ్యాహ్నం';
+ } else if (hour < 20) {
+ return 'సాయంత్రం';
+ } else {
+ return 'రాత్రి';
+ }
+ },
+ week: {
+ dow: 0, // Sunday is the first day of the week.
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/tet.js b/vendor/assets/javascripts/momentjs/src/locale/tet.js
new file mode 100644
index 000000000..8d834d71f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/tet.js
@@ -0,0 +1,68 @@
+//! moment.js locale configuration
+//! locale : Tetun Dili (East Timor) [tet]
+//! author : Joshua Brooks : https://github.com/joshbrooks
+//! author : Onorio De J. Afonso : https://github.com/marobo
+//! author : Sonia Simoes : https://github.com/soniasimoes
+
+import moment from '../moment';
+
+export default moment.defineLocale('tet', {
+ months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
+ weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
+ weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
+ weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Ohin iha] LT',
+ nextDay: '[Aban iha] LT',
+ nextWeek: 'dddd [iha] LT',
+ lastDay: '[Horiseik iha] LT',
+ lastWeek: 'dddd [semana kotuk] [iha] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'iha %s',
+ past: '%s liuba',
+ s: 'segundu balun',
+ ss: 'segundu %d',
+ m: 'minutu ida',
+ mm: 'minutu %d',
+ h: 'oras ida',
+ hh: 'oras %d',
+ d: 'loron ida',
+ dd: 'loron %d',
+ M: 'fulan ida',
+ MM: 'fulan %d',
+ y: 'tinan ida',
+ yy: 'tinan %d',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/tg.js b/vendor/assets/javascripts/momentjs/src/locale/tg.js
new file mode 100644
index 000000000..60d33c756
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/tg.js
@@ -0,0 +1,117 @@
+//! moment.js locale configuration
+//! locale : Tajik [tg]
+//! author : Orif N. Jr. : https://github.com/orif-jr
+
+import moment from '../moment';
+
+var suffixes = {
+ 0: '-ум',
+ 1: '-ум',
+ 2: '-юм',
+ 3: '-юм',
+ 4: '-ум',
+ 5: '-ум',
+ 6: '-ум',
+ 7: '-ум',
+ 8: '-ум',
+ 9: '-ум',
+ 10: '-ум',
+ 12: '-ум',
+ 13: '-ум',
+ 20: '-ум',
+ 30: '-юм',
+ 40: '-ум',
+ 50: '-ум',
+ 60: '-ум',
+ 70: '-ум',
+ 80: '-ум',
+ 90: '-ум',
+ 100: '-ум',
+};
+
+export default moment.defineLocale('tg', {
+ months: {
+ format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
+ '_'
+ ),
+ standalone:
+ 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+ weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
+ '_'
+ ),
+ weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
+ weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Имрӯз соати] LT',
+ nextDay: '[Фардо соати] LT',
+ lastDay: '[Дирӯз соати] LT',
+ nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
+ lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'баъди %s',
+ past: '%s пеш',
+ s: 'якчанд сония',
+ m: 'як дақиқа',
+ mm: '%d дақиқа',
+ h: 'як соат',
+ hh: '%d соат',
+ d: 'як рӯз',
+ dd: '%d рӯз',
+ M: 'як моҳ',
+ MM: '%d моҳ',
+ y: 'як сол',
+ yy: '%d сол',
+ },
+ meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'шаб') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'субҳ') {
+ return hour;
+ } else if (meridiem === 'рӯз') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'бегоҳ') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'шаб';
+ } else if (hour < 11) {
+ return 'субҳ';
+ } else if (hour < 16) {
+ return 'рӯз';
+ } else if (hour < 19) {
+ return 'бегоҳ';
+ } else {
+ return 'шаб';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
+ ordinal: function (number) {
+ var a = number % 10,
+ b = number >= 100 ? 100 : null;
+ return number + (suffixes[number] || suffixes[a] || suffixes[b]);
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/th.js b/vendor/assets/javascripts/momentjs/src/locale/th.js
new file mode 100644
index 000000000..b3a5560ef
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/th.js
@@ -0,0 +1,65 @@
+//! moment.js locale configuration
+//! locale : Thai [th]
+//! author : Kridsada Thanabulpong : https://github.com/sirn
+
+import moment from '../moment';
+
+export default moment.defineLocale('th', {
+ months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
+ weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
+ weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY เวลา H:mm',
+ LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',
+ },
+ meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
+ isPM: function (input) {
+ return input === 'หลังเที่ยง';
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ก่อนเที่ยง';
+ } else {
+ return 'หลังเที่ยง';
+ }
+ },
+ calendar: {
+ sameDay: '[วันนี้ เวลา] LT',
+ nextDay: '[พรุ่งนี้ เวลา] LT',
+ nextWeek: 'dddd[หน้า เวลา] LT',
+ lastDay: '[เมื่อวานนี้ เวลา] LT',
+ lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'อีก %s',
+ past: '%sที่แล้ว',
+ s: 'ไม่กี่วินาที',
+ ss: '%d วินาที',
+ m: '1 นาที',
+ mm: '%d นาที',
+ h: '1 ชั่วโมง',
+ hh: '%d ชั่วโมง',
+ d: '1 วัน',
+ dd: '%d วัน',
+ w: '1 สัปดาห์',
+ ww: '%d สัปดาห์',
+ M: '1 เดือน',
+ MM: '%d เดือน',
+ y: '1 ปี',
+ yy: '%d ปี',
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/tk.js b/vendor/assets/javascripts/momentjs/src/locale/tk.js
new file mode 100644
index 000000000..b26f99e3d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/tk.js
@@ -0,0 +1,91 @@
+//! moment.js locale configuration
+//! locale : Turkmen [tk]
+//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy
+
+import moment from '../moment';
+
+var suffixes = {
+ 1: "'inji",
+ 5: "'inji",
+ 8: "'inji",
+ 70: "'inji",
+ 80: "'inji",
+ 2: "'nji",
+ 7: "'nji",
+ 20: "'nji",
+ 50: "'nji",
+ 3: "'ünji",
+ 4: "'ünji",
+ 100: "'ünji",
+ 6: "'njy",
+ 9: "'unjy",
+ 10: "'unjy",
+ 30: "'unjy",
+ 60: "'ynjy",
+ 90: "'ynjy",
+};
+
+export default moment.defineLocale('tk', {
+ months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
+ weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
+ '_'
+ ),
+ weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
+ weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün sagat] LT',
+ nextDay: '[ertir sagat] LT',
+ nextWeek: '[indiki] dddd [sagat] LT',
+ lastDay: '[düýn] LT',
+ lastWeek: '[geçen] dddd [sagat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s soň',
+ past: '%s öň',
+ s: 'birnäçe sekunt',
+ m: 'bir minut',
+ mm: '%d minut',
+ h: 'bir sagat',
+ hh: '%d sagat',
+ d: 'bir gün',
+ dd: '%d gün',
+ M: 'bir aý',
+ MM: '%d aý',
+ y: 'bir ýyl',
+ yy: '%d ýyl',
+ },
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'Do':
+ case 'DD':
+ return number;
+ default:
+ if (number === 0) {
+ // special case for zero
+ return number + "'unjy";
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/tl-ph.js b/vendor/assets/javascripts/momentjs/src/locale/tl-ph.js
new file mode 100644
index 000000000..581d74af5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/tl-ph.js
@@ -0,0 +1,57 @@
+//! moment.js locale configuration
+//! locale : Tagalog (Philippines) [tl-ph]
+//! author : Dan Hagman : https://github.com/hagmandan
+
+import moment from '../moment';
+
+export default moment.defineLocale('tl-ph', {
+ months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
+ '_'
+ ),
+ monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+ weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
+ '_'
+ ),
+ weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+ weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'MM/D/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY HH:mm',
+ LLLL: 'dddd, MMMM DD, YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: 'LT [ngayong araw]',
+ nextDay: '[Bukas ng] LT',
+ nextWeek: 'LT [sa susunod na] dddd',
+ lastDay: 'LT [kahapon]',
+ lastWeek: 'LT [noong nakaraang] dddd',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'sa loob ng %s',
+ past: '%s ang nakalipas',
+ s: 'ilang segundo',
+ ss: '%d segundo',
+ m: 'isang minuto',
+ mm: '%d minuto',
+ h: 'isang oras',
+ hh: '%d oras',
+ d: 'isang araw',
+ dd: '%d araw',
+ M: 'isang buwan',
+ MM: '%d buwan',
+ y: 'isang taon',
+ yy: '%d taon',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/tlh.js b/vendor/assets/javascripts/momentjs/src/locale/tlh.js
new file mode 100644
index 000000000..95b91513c
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/tlh.js
@@ -0,0 +1,124 @@
+//! moment.js locale configuration
+//! locale : Klingon [tlh]
+//! author : Dominika Kruk : https://github.com/amaranthrose
+
+import moment from '../moment';
+
+var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
+
+function translateFuture(output) {
+ var time = output;
+ time =
+ output.indexOf('jaj') !== -1
+ ? time.slice(0, -3) + 'leS'
+ : output.indexOf('jar') !== -1
+ ? time.slice(0, -3) + 'waQ'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'nem'
+ : time + ' pIq';
+ return time;
+}
+
+function translatePast(output) {
+ var time = output;
+ time =
+ output.indexOf('jaj') !== -1
+ ? time.slice(0, -3) + 'Hu’'
+ : output.indexOf('jar') !== -1
+ ? time.slice(0, -3) + 'wen'
+ : output.indexOf('DIS') !== -1
+ ? time.slice(0, -3) + 'ben'
+ : time + ' ret';
+ return time;
+}
+
+function translate(number, withoutSuffix, string, isFuture) {
+ var numberNoun = numberAsNoun(number);
+ switch (string) {
+ case 'ss':
+ return numberNoun + ' lup';
+ case 'mm':
+ return numberNoun + ' tup';
+ case 'hh':
+ return numberNoun + ' rep';
+ case 'dd':
+ return numberNoun + ' jaj';
+ case 'MM':
+ return numberNoun + ' jar';
+ case 'yy':
+ return numberNoun + ' DIS';
+ }
+}
+
+function numberAsNoun(number) {
+ var hundred = Math.floor((number % 1000) / 100),
+ ten = Math.floor((number % 100) / 10),
+ one = number % 10,
+ word = '';
+ if (hundred > 0) {
+ word += numbersNouns[hundred] + 'vatlh';
+ }
+ if (ten > 0) {
+ word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
+ }
+ if (one > 0) {
+ word += (word !== '' ? ' ' : '') + numbersNouns[one];
+ }
+ return word === '' ? 'pagh' : word;
+}
+
+export default moment.defineLocale('tlh', {
+ months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
+ '_'
+ ),
+ monthsShort:
+ 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
+ '_'
+ ),
+ weekdaysShort:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+ weekdaysMin:
+ 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[DaHjaj] LT',
+ nextDay: '[wa’leS] LT',
+ nextWeek: 'LLL',
+ lastDay: '[wa’Hu’] LT',
+ lastWeek: 'LLL',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: translateFuture,
+ past: translatePast,
+ s: 'puS lup',
+ ss: translate,
+ m: 'wa’ tup',
+ mm: translate,
+ h: 'wa’ rep',
+ hh: translate,
+ d: 'wa’ jaj',
+ dd: translate,
+ M: 'wa’ jar',
+ MM: translate,
+ y: 'wa’ DIS',
+ yy: translate,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/tr.js b/vendor/assets/javascripts/momentjs/src/locale/tr.js
new file mode 100644
index 000000000..c5abbdc06
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/tr.js
@@ -0,0 +1,106 @@
+//! moment.js locale configuration
+//! locale : Turkish [tr]
+//! authors : Erhan Gundogan : https://github.com/erhangundogan,
+//! Burak Yiğit Kaya: https://github.com/BYK
+
+import moment from '../moment';
+
+var suffixes = {
+ 1: "'inci",
+ 5: "'inci",
+ 8: "'inci",
+ 70: "'inci",
+ 80: "'inci",
+ 2: "'nci",
+ 7: "'nci",
+ 20: "'nci",
+ 50: "'nci",
+ 3: "'üncü",
+ 4: "'üncü",
+ 100: "'üncü",
+ 6: "'ncı",
+ 9: "'uncu",
+ 10: "'uncu",
+ 30: "'uncu",
+ 60: "'ıncı",
+ 90: "'ıncı",
+};
+
+export default moment.defineLocale('tr', {
+ months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
+ '_'
+ ),
+ monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
+ weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
+ '_'
+ ),
+ weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),
+ weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'öö' : 'ÖÖ';
+ } else {
+ return isLower ? 'ös' : 'ÖS';
+ }
+ },
+ meridiemParse: /öö|ÖÖ|ös|ÖS/,
+ isPM: function (input) {
+ return input === 'ös' || input === 'ÖS';
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[bugün saat] LT',
+ nextDay: '[yarın saat] LT',
+ nextWeek: '[gelecek] dddd [saat] LT',
+ lastDay: '[dün] LT',
+ lastWeek: '[geçen] dddd [saat] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s sonra',
+ past: '%s önce',
+ s: 'birkaç saniye',
+ ss: '%d saniye',
+ m: 'bir dakika',
+ mm: '%d dakika',
+ h: 'bir saat',
+ hh: '%d saat',
+ d: 'bir gün',
+ dd: '%d gün',
+ w: 'bir hafta',
+ ww: '%d hafta',
+ M: 'bir ay',
+ MM: '%d ay',
+ y: 'bir yıl',
+ yy: '%d yıl',
+ },
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'Do':
+ case 'DD':
+ return number;
+ default:
+ if (number === 0) {
+ // special case for zero
+ return number + "'ıncı";
+ }
+ var a = number % 10,
+ b = (number % 100) - a,
+ c = number >= 100 ? 100 : null;
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/tzl.js b/vendor/assets/javascripts/momentjs/src/locale/tzl.js
new file mode 100644
index 000000000..62bfcdc5f
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/tzl.js
@@ -0,0 +1,89 @@
+//! moment.js locale configuration
+//! locale : Talossan [tzl]
+//! author : Robin van der Vliet : https://github.com/robin0van0der0v
+//! author : Iustì Canun
+
+import moment from '../moment';
+
+// After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
+// This is currently too difficult (maybe even impossible) to add.
+export default moment.defineLocale('tzl', {
+ months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
+ '_'
+ ),
+ monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
+ weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
+ weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
+ weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
+ longDateFormat: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM [dallas] YYYY',
+ LLL: 'D. MMMM [dallas] YYYY HH.mm',
+ LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',
+ },
+ meridiemParse: /d\'o|d\'a/i,
+ isPM: function (input) {
+ return "d'o" === input.toLowerCase();
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? "d'o" : "D'O";
+ } else {
+ return isLower ? "d'a" : "D'A";
+ }
+ },
+ calendar: {
+ sameDay: '[oxhi à] LT',
+ nextDay: '[demà à] LT',
+ nextWeek: 'dddd [à] LT',
+ lastDay: '[ieiri à] LT',
+ lastWeek: '[sür el] dddd [lasteu à] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'osprei %s',
+ past: 'ja%s',
+ s: processRelativeTime,
+ ss: processRelativeTime,
+ m: processRelativeTime,
+ mm: processRelativeTime,
+ h: processRelativeTime,
+ hh: processRelativeTime,
+ d: processRelativeTime,
+ dd: processRelativeTime,
+ M: processRelativeTime,
+ MM: processRelativeTime,
+ y: processRelativeTime,
+ yy: processRelativeTime,
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
+ ordinal: '%d.',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
+
+function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var format = {
+ s: ['viensas secunds', "'iensas secunds"],
+ ss: [number + ' secunds', '' + number + ' secunds'],
+ m: ["'n míut", "'iens míut"],
+ mm: [number + ' míuts', '' + number + ' míuts'],
+ h: ["'n þora", "'iensa þora"],
+ hh: [number + ' þoras', '' + number + ' þoras'],
+ d: ["'n ziua", "'iensa ziua"],
+ dd: [number + ' ziuas', '' + number + ' ziuas'],
+ M: ["'n mes", "'iens mes"],
+ MM: [number + ' mesen', '' + number + ' mesen'],
+ y: ["'n ar", "'iens ar"],
+ yy: [number + ' ars', '' + number + ' ars'],
+ };
+ return isFuture
+ ? format[key][0]
+ : withoutSuffix
+ ? format[key][0]
+ : format[key][1];
+}
diff --git a/vendor/assets/javascripts/momentjs/src/locale/tzm-latn.js b/vendor/assets/javascripts/momentjs/src/locale/tzm-latn.js
new file mode 100644
index 000000000..6a427d8e6
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/tzm-latn.js
@@ -0,0 +1,54 @@
+//! moment.js locale configuration
+//! locale : Central Atlas Tamazight Latin [tzm-latn]
+//! author : Abdel Said : https://github.com/abdelsaid
+
+import moment from '../moment';
+
+export default moment.defineLocale('tzm-latn', {
+ months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
+ '_'
+ ),
+ monthsShort:
+ 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
+ '_'
+ ),
+ weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[asdkh g] LT',
+ nextDay: '[aska g] LT',
+ nextWeek: 'dddd [g] LT',
+ lastDay: '[assant g] LT',
+ lastWeek: 'dddd [g] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'dadkh s yan %s',
+ past: 'yan %s',
+ s: 'imik',
+ ss: '%d imik',
+ m: 'minuḍ',
+ mm: '%d minuḍ',
+ h: 'saɛa',
+ hh: '%d tassaɛin',
+ d: 'ass',
+ dd: '%d ossan',
+ M: 'ayowr',
+ MM: '%d iyyirn',
+ y: 'asgas',
+ yy: '%d isgasn',
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/tzm.js b/vendor/assets/javascripts/momentjs/src/locale/tzm.js
new file mode 100644
index 000000000..1e5d5978e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/tzm.js
@@ -0,0 +1,54 @@
+//! moment.js locale configuration
+//! locale : Central Atlas Tamazight [tzm]
+//! author : Abdel Said : https://github.com/abdelsaid
+
+import moment from '../moment';
+
+export default moment.defineLocale('tzm', {
+ months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
+ '_'
+ ),
+ monthsShort:
+ 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
+ '_'
+ ),
+ weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
+ nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
+ nextWeek: 'dddd [ⴴ] LT',
+ lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
+ lastWeek: 'dddd [ⴴ] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
+ past: 'ⵢⴰⵏ %s',
+ s: 'ⵉⵎⵉⴽ',
+ ss: '%d ⵉⵎⵉⴽ',
+ m: 'ⵎⵉⵏⵓⴺ',
+ mm: '%d ⵎⵉⵏⵓⴺ',
+ h: 'ⵙⴰⵄⴰ',
+ hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
+ d: 'ⴰⵙⵙ',
+ dd: '%d oⵙⵙⴰⵏ',
+ M: 'ⴰⵢoⵓⵔ',
+ MM: '%d ⵉⵢⵢⵉⵔⵏ',
+ y: 'ⴰⵙⴳⴰⵙ',
+ yy: '%d ⵉⵙⴳⴰⵙⵏ',
+ },
+ week: {
+ dow: 6, // Saturday is the first day of the week.
+ doy: 12, // The week that contains Jan 12th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ug-cn.js b/vendor/assets/javascripts/momentjs/src/locale/ug-cn.js
new file mode 100644
index 000000000..ad6fa947b
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ug-cn.js
@@ -0,0 +1,111 @@
+//! moment.js locale configuration
+//! locale : Uyghur (China) [ug-cn]
+//! author: boyaq : https://github.com/boyaq
+
+import moment from '../moment';
+
+export default moment.defineLocale('ug-cn', {
+ months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
+ '_'
+ ),
+ monthsShort:
+ 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
+ '_'
+ ),
+ weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
+ '_'
+ ),
+ weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
+ weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY-MM-DD',
+ LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
+ LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
+ LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
+ },
+ meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (
+ meridiem === 'يېرىم كېچە' ||
+ meridiem === 'سەھەر' ||
+ meridiem === 'چۈشتىن بۇرۇن'
+ ) {
+ return hour;
+ } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
+ return hour + 12;
+ } else {
+ return hour >= 11 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return 'يېرىم كېچە';
+ } else if (hm < 900) {
+ return 'سەھەر';
+ } else if (hm < 1130) {
+ return 'چۈشتىن بۇرۇن';
+ } else if (hm < 1230) {
+ return 'چۈش';
+ } else if (hm < 1800) {
+ return 'چۈشتىن كېيىن';
+ } else {
+ return 'كەچ';
+ }
+ },
+ calendar: {
+ sameDay: '[بۈگۈن سائەت] LT',
+ nextDay: '[ئەتە سائەت] LT',
+ nextWeek: '[كېلەركى] dddd [سائەت] LT',
+ lastDay: '[تۆنۈگۈن] LT',
+ lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s كېيىن',
+ past: '%s بۇرۇن',
+ s: 'نەچچە سېكونت',
+ ss: '%d سېكونت',
+ m: 'بىر مىنۇت',
+ mm: '%d مىنۇت',
+ h: 'بىر سائەت',
+ hh: '%d سائەت',
+ d: 'بىر كۈن',
+ dd: '%d كۈن',
+ M: 'بىر ئاي',
+ MM: '%d ئاي',
+ y: 'بىر يىل',
+ yy: '%d يىل',
+ },
+
+ dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '-كۈنى';
+ case 'w':
+ case 'W':
+ return number + '-ھەپتە';
+ default:
+ return number;
+ }
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/uk.js b/vendor/assets/javascripts/momentjs/src/locale/uk.js
new file mode 100644
index 000000000..8879b5e2a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/uk.js
@@ -0,0 +1,167 @@
+//! moment.js locale configuration
+//! locale : Ukrainian [uk]
+//! author : zemlanin : https://github.com/zemlanin
+//! Author : Menelion Elensúle : https://github.com/Oire
+
+import moment from '../moment';
+
+function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11
+ ? forms[0]
+ : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
+ ? forms[1]
+ : forms[2];
+}
+function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
+ mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
+ hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
+ dd: 'день_дні_днів',
+ MM: 'місяць_місяці_місяців',
+ yy: 'рік_роки_років',
+ };
+ if (key === 'm') {
+ return withoutSuffix ? 'хвилина' : 'хвилину';
+ } else if (key === 'h') {
+ return withoutSuffix ? 'година' : 'годину';
+ } else {
+ return number + ' ' + plural(format[key], +number);
+ }
+}
+function weekdaysCaseReplace(m, format) {
+ var weekdays = {
+ nominative:
+ 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
+ '_'
+ ),
+ accusative:
+ 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
+ '_'
+ ),
+ genitive:
+ 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
+ '_'
+ ),
+ },
+ nounCase;
+
+ if (m === true) {
+ return weekdays['nominative']
+ .slice(1, 7)
+ .concat(weekdays['nominative'].slice(0, 1));
+ }
+ if (!m) {
+ return weekdays['nominative'];
+ }
+
+ nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
+ ? 'accusative'
+ : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
+ ? 'genitive'
+ : 'nominative';
+ return weekdays[nounCase][m.day()];
+}
+function processHoursFunction(str) {
+ return function () {
+ return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
+ };
+}
+
+export default moment.defineLocale('uk', {
+ months: {
+ format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
+ '_'
+ ),
+ standalone:
+ 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
+ '_'
+ ),
+ },
+ monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
+ '_'
+ ),
+ weekdays: weekdaysCaseReplace,
+ weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY р.',
+ LLL: 'D MMMM YYYY р., HH:mm',
+ LLLL: 'dddd, D MMMM YYYY р., HH:mm',
+ },
+ calendar: {
+ sameDay: processHoursFunction('[Сьогодні '),
+ nextDay: processHoursFunction('[Завтра '),
+ lastDay: processHoursFunction('[Вчора '),
+ nextWeek: processHoursFunction('[У] dddd ['),
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ case 3:
+ case 5:
+ case 6:
+ return processHoursFunction('[Минулої] dddd [').call(this);
+ case 1:
+ case 2:
+ case 4:
+ return processHoursFunction('[Минулого] dddd [').call(this);
+ }
+ },
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'за %s',
+ past: '%s тому',
+ s: 'декілька секунд',
+ ss: relativeTimeWithPlural,
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: 'годину',
+ hh: relativeTimeWithPlural,
+ d: 'день',
+ dd: relativeTimeWithPlural,
+ M: 'місяць',
+ MM: relativeTimeWithPlural,
+ y: 'рік',
+ yy: relativeTimeWithPlural,
+ },
+ // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
+ meridiemParse: /ночі|ранку|дня|вечора/,
+ isPM: function (input) {
+ return /^(дня|вечора)$/.test(input);
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 4) {
+ return 'ночі';
+ } else if (hour < 12) {
+ return 'ранку';
+ } else if (hour < 17) {
+ return 'дня';
+ } else {
+ return 'вечора';
+ }
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'M':
+ case 'd':
+ case 'DDD':
+ case 'w':
+ case 'W':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ default:
+ return number;
+ }
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/ur.js b/vendor/assets/javascripts/momentjs/src/locale/ur.js
new file mode 100644
index 000000000..ca5e25246
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/ur.js
@@ -0,0 +1,82 @@
+//! moment.js locale configuration
+//! locale : Urdu [ur]
+//! author : Sawood Alam : https://github.com/ibnesayeed
+//! author : Zack : https://github.com/ZackVision
+
+import moment from '../moment';
+
+var months = [
+ 'جنوری',
+ 'فروری',
+ 'مارچ',
+ 'اپریل',
+ 'مئی',
+ 'جون',
+ 'جولائی',
+ 'اگست',
+ 'ستمبر',
+ 'اکتوبر',
+ 'نومبر',
+ 'دسمبر',
+ ],
+ days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
+
+export default moment.defineLocale('ur', {
+ months: months,
+ monthsShort: months,
+ weekdays: days,
+ weekdaysShort: days,
+ weekdaysMin: days,
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd، D MMMM YYYY HH:mm',
+ },
+ meridiemParse: /صبح|شام/,
+ isPM: function (input) {
+ return 'شام' === input;
+ },
+ meridiem: function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'صبح';
+ }
+ return 'شام';
+ },
+ calendar: {
+ sameDay: '[آج بوقت] LT',
+ nextDay: '[کل بوقت] LT',
+ nextWeek: 'dddd [بوقت] LT',
+ lastDay: '[گذشتہ روز بوقت] LT',
+ lastWeek: '[گذشتہ] dddd [بوقت] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s بعد',
+ past: '%s قبل',
+ s: 'چند سیکنڈ',
+ ss: '%d سیکنڈ',
+ m: 'ایک منٹ',
+ mm: '%d منٹ',
+ h: 'ایک گھنٹہ',
+ hh: '%d گھنٹے',
+ d: 'ایک دن',
+ dd: '%d دن',
+ M: 'ایک ماہ',
+ MM: '%d ماہ',
+ y: 'ایک سال',
+ yy: '%d سال',
+ },
+ preparse: function (string) {
+ return string.replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/,/g, '،');
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/uz-latn.js b/vendor/assets/javascripts/momentjs/src/locale/uz-latn.js
new file mode 100644
index 000000000..a2d577ecb
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/uz-latn.js
@@ -0,0 +1,54 @@
+//! moment.js locale configuration
+//! locale : Uzbek Latin [uz-latn]
+//! author : Rasulbek Mirzayev : github.com/Rasulbeeek
+
+import moment from '../moment';
+
+export default moment.defineLocale('uz-latn', {
+ months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
+ '_'
+ ),
+ monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
+ weekdays:
+ 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
+ '_'
+ ),
+ weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
+ weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'D MMMM YYYY, dddd HH:mm',
+ },
+ calendar: {
+ sameDay: '[Bugun soat] LT [da]',
+ nextDay: '[Ertaga] LT [da]',
+ nextWeek: 'dddd [kuni soat] LT [da]',
+ lastDay: '[Kecha soat] LT [da]',
+ lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'Yaqin %s ichida',
+ past: 'Bir necha %s oldin',
+ s: 'soniya',
+ ss: '%d soniya',
+ m: 'bir daqiqa',
+ mm: '%d daqiqa',
+ h: 'bir soat',
+ hh: '%d soat',
+ d: 'bir kun',
+ dd: '%d kun',
+ M: 'bir oy',
+ MM: '%d oy',
+ y: 'bir yil',
+ yy: '%d yil',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/uz.js b/vendor/assets/javascripts/momentjs/src/locale/uz.js
new file mode 100644
index 000000000..03914dd2d
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/uz.js
@@ -0,0 +1,51 @@
+//! moment.js locale configuration
+//! locale : Uzbek [uz]
+//! author : Sardor Muminov : https://github.com/muminoff
+
+import moment from '../moment';
+
+export default moment.defineLocale('uz', {
+ months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
+ '_'
+ ),
+ monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+ weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
+ weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
+ weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'D MMMM YYYY, dddd HH:mm',
+ },
+ calendar: {
+ sameDay: '[Бугун соат] LT [да]',
+ nextDay: '[Эртага] LT [да]',
+ nextWeek: 'dddd [куни соат] LT [да]',
+ lastDay: '[Кеча соат] LT [да]',
+ lastWeek: '[Утган] dddd [куни соат] LT [да]',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'Якин %s ичида',
+ past: 'Бир неча %s олдин',
+ s: 'фурсат',
+ ss: '%d фурсат',
+ m: 'бир дакика',
+ mm: '%d дакика',
+ h: 'бир соат',
+ hh: '%d соат',
+ d: 'бир кун',
+ dd: '%d кун',
+ M: 'бир ой',
+ MM: '%d ой',
+ y: 'бир йил',
+ yy: '%d йил',
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 7, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/vi.js b/vendor/assets/javascripts/momentjs/src/locale/vi.js
new file mode 100644
index 000000000..2b11cf6bd
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/vi.js
@@ -0,0 +1,80 @@
+//! moment.js locale configuration
+//! locale : Vietnamese [vi]
+//! author : Bang Nguyen : https://github.com/bangnk
+//! author : Chien Kira : https://github.com/chienkira
+
+import moment from '../moment';
+
+export default moment.defineLocale('vi', {
+ months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
+ '_'
+ ),
+ monthsShort:
+ 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
+ '_'
+ ),
+ weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysParseExact: true,
+ meridiemParse: /sa|ch/i,
+ isPM: function (input) {
+ return /^ch$/i.test(input);
+ },
+ meridiem: function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'sa' : 'SA';
+ } else {
+ return isLower ? 'ch' : 'CH';
+ }
+ },
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM [năm] YYYY',
+ LLL: 'D MMMM [năm] YYYY HH:mm',
+ LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
+ l: 'DD/M/YYYY',
+ ll: 'D MMM YYYY',
+ lll: 'D MMM YYYY HH:mm',
+ llll: 'ddd, D MMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[Hôm nay lúc] LT',
+ nextDay: '[Ngày mai lúc] LT',
+ nextWeek: 'dddd [tuần tới lúc] LT',
+ lastDay: '[Hôm qua lúc] LT',
+ lastWeek: 'dddd [tuần trước lúc] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: '%s tới',
+ past: '%s trước',
+ s: 'vài giây',
+ ss: '%d giây',
+ m: 'một phút',
+ mm: '%d phút',
+ h: 'một giờ',
+ hh: '%d giờ',
+ d: 'một ngày',
+ dd: '%d ngày',
+ w: 'một tuần',
+ ww: '%d tuần',
+ M: 'một tháng',
+ MM: '%d tháng',
+ y: 'một năm',
+ yy: '%d năm',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ ordinal: function (number) {
+ return number;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/x-pseudo.js b/vendor/assets/javascripts/momentjs/src/locale/x-pseudo.js
new file mode 100644
index 000000000..f8adbb8ff
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/x-pseudo.js
@@ -0,0 +1,73 @@
+//! moment.js locale configuration
+//! locale : Pseudo [x-pseudo]
+//! author : Andrew Hood : https://github.com/andrewhood125
+
+import moment from '../moment';
+
+export default moment.defineLocale('x-pseudo', {
+ months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
+ '_'
+ ),
+ monthsShort:
+ 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
+ '_'
+ ),
+ monthsParseExact: true,
+ weekdays:
+ 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
+ '_'
+ ),
+ weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
+ weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
+ weekdaysParseExact: true,
+ longDateFormat: {
+ LT: 'HH:mm',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm',
+ },
+ calendar: {
+ sameDay: '[T~ódá~ý át] LT',
+ nextDay: '[T~ómó~rró~w át] LT',
+ nextWeek: 'dddd [át] LT',
+ lastDay: '[Ý~ést~érdá~ý át] LT',
+ lastWeek: '[L~ást] dddd [át] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'í~ñ %s',
+ past: '%s á~gó',
+ s: 'á ~féw ~sécó~ñds',
+ ss: '%d s~écóñ~ds',
+ m: 'á ~míñ~úté',
+ mm: '%d m~íñú~tés',
+ h: 'á~ñ hó~úr',
+ hh: '%d h~óúrs',
+ d: 'á ~dáý',
+ dd: '%d d~áýs',
+ M: 'á ~móñ~th',
+ MM: '%d m~óñt~hs',
+ y: 'á ~ýéár',
+ yy: '%d ý~éárs',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ ~~((number % 100) / 10) === 1
+ ? 'th'
+ : b === 1
+ ? 'st'
+ : b === 2
+ ? 'nd'
+ : b === 3
+ ? 'rd'
+ : 'th';
+ return number + output;
+ },
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/yo.js b/vendor/assets/javascripts/momentjs/src/locale/yo.js
new file mode 100644
index 000000000..2fcb6e4f5
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/yo.js
@@ -0,0 +1,53 @@
+//! moment.js locale configuration
+//! locale : Yoruba Nigeria [yo]
+//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
+
+import moment from '../moment';
+
+export default moment.defineLocale('yo', {
+ months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
+ '_'
+ ),
+ monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
+ weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
+ weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
+ weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
+ longDateFormat: {
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY h:mm A',
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
+ },
+ calendar: {
+ sameDay: '[Ònì ni] LT',
+ nextDay: '[Ọ̀la ni] LT',
+ nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
+ lastDay: '[Àna ni] LT',
+ lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
+ sameElse: 'L',
+ },
+ relativeTime: {
+ future: 'ní %s',
+ past: '%s kọjá',
+ s: 'ìsẹjú aayá die',
+ ss: 'aayá %d',
+ m: 'ìsẹjú kan',
+ mm: 'ìsẹjú %d',
+ h: 'wákati kan',
+ hh: 'wákati %d',
+ d: 'ọjọ́ kan',
+ dd: 'ọjọ́ %d',
+ M: 'osù kan',
+ MM: 'osù %d',
+ y: 'ọdún kan',
+ yy: 'ọdún %d',
+ },
+ dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
+ ordinal: 'ọjọ́ %d',
+ week: {
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/zh-cn.js b/vendor/assets/javascripts/momentjs/src/locale/zh-cn.js
new file mode 100644
index 000000000..2345ee6c1
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/zh-cn.js
@@ -0,0 +1,120 @@
+//! moment.js locale configuration
+//! locale : Chinese (China) [zh-cn]
+//! author : suupic : https://github.com/suupic
+//! author : Zeno Zeng : https://github.com/zenozeng
+//! author : uu109 : https://github.com/uu109
+
+import moment from '../moment';
+
+export default moment.defineLocale('zh-cn', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日Ah点mm分',
+ LLLL: 'YYYY年M月D日ddddAh点mm分',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ } else {
+ // '中午'
+ return hour >= 11 ? hour : hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天]LT',
+ nextDay: '[明天]LT',
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ return '[下]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
+ lastDay: '[昨天]LT',
+ lastWeek: function (now) {
+ if (this.week() !== now.week()) {
+ return '[上]dddLT';
+ } else {
+ return '[本]dddLT';
+ }
+ },
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '周';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s后',
+ past: '%s前',
+ s: '几秒',
+ ss: '%d 秒',
+ m: '1 分钟',
+ mm: '%d 分钟',
+ h: '1 小时',
+ hh: '%d 小时',
+ d: '1 天',
+ dd: '%d 天',
+ w: '1 周',
+ ww: '%d 周',
+ M: '1 个月',
+ MM: '%d 个月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+ week: {
+ // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+ dow: 1, // Monday is the first day of the week.
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/zh-hk.js b/vendor/assets/javascripts/momentjs/src/locale/zh-hk.js
new file mode 100644
index 000000000..78a10190e
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/zh-hk.js
@@ -0,0 +1,101 @@
+//! moment.js locale configuration
+//! locale : Chinese (Hong Kong) [zh-hk]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
+//! author : Konstantin : https://github.com/skfd
+//! author : Anthony : https://github.com/anthonylau
+
+import moment from '../moment';
+
+export default moment.defineLocale('zh-hk', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1200) {
+ return '上午';
+ } else if (hm === 1200) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天]LT',
+ nextDay: '[明天]LT',
+ nextWeek: '[下]ddddLT',
+ lastDay: '[昨天]LT',
+ lastWeek: '[上]ddddLT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/zh-mo.js b/vendor/assets/javascripts/momentjs/src/locale/zh-mo.js
new file mode 100644
index 000000000..9ed795d28
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/zh-mo.js
@@ -0,0 +1,100 @@
+//! moment.js locale configuration
+//! locale : Chinese (Macau) [zh-mo]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
+//! author : Tan Yuanhong : https://github.com/le0tan
+
+import moment from '../moment';
+
+export default moment.defineLocale('zh-mo', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'D/M/YYYY',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天] LT',
+ nextDay: '[明天] LT',
+ nextWeek: '[下]dddd LT',
+ lastDay: '[昨天] LT',
+ lastWeek: '[上]dddd LT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s內',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/locale/zh-tw.js b/vendor/assets/javascripts/momentjs/src/locale/zh-tw.js
new file mode 100644
index 000000000..aa98ab105
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/locale/zh-tw.js
@@ -0,0 +1,99 @@
+//! moment.js locale configuration
+//! locale : Chinese (Taiwan) [zh-tw]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
+
+import moment from '../moment';
+
+export default moment.defineLocale('zh-tw', {
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
+ '_'
+ ),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
+ '_'
+ ),
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm',
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar: {
+ sameDay: '[今天] LT',
+ nextDay: '[明天] LT',
+ nextWeek: '[下]dddd LT',
+ lastDay: '[昨天] LT',
+ lastWeek: '[上]dddd LT',
+ sameElse: 'L',
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+ ordinal: function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '週';
+ default:
+ return number;
+ }
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '幾秒',
+ ss: '%d 秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年',
+ },
+});
diff --git a/vendor/assets/javascripts/momentjs/src/moment.js b/vendor/assets/javascripts/momentjs/src/moment.js
new file mode 100644
index 000000000..527e1857a
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/src/moment.js
@@ -0,0 +1,93 @@
+//! moment.js
+//! version : 2.29.4
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+
+import { hooks as moment, setHookCallback } from './lib/utils/hooks';
+
+moment.version = '2.29.4';
+
+import {
+ min,
+ max,
+ now,
+ isMoment,
+ momentPrototype as fn,
+ createUTC as utc,
+ createUnix as unix,
+ createLocal as local,
+ createInvalid as invalid,
+ createInZone as parseZone,
+} from './lib/moment/moment';
+
+import { getCalendarFormat } from './lib/moment/calendar';
+
+import {
+ defineLocale,
+ updateLocale,
+ getSetGlobalLocale as locale,
+ getLocale as localeData,
+ listLocales as locales,
+ listMonths as months,
+ listMonthsShort as monthsShort,
+ listWeekdays as weekdays,
+ listWeekdaysMin as weekdaysMin,
+ listWeekdaysShort as weekdaysShort,
+} from './lib/locale/locale';
+
+import {
+ isDuration,
+ createDuration as duration,
+ getSetRelativeTimeRounding as relativeTimeRounding,
+ getSetRelativeTimeThreshold as relativeTimeThreshold,
+} from './lib/duration/duration';
+
+import { normalizeUnits } from './lib/units/units';
+
+import isDate from './lib/utils/is-date';
+
+setHookCallback(local);
+
+moment.fn = fn;
+moment.min = min;
+moment.max = max;
+moment.now = now;
+moment.utc = utc;
+moment.unix = unix;
+moment.months = months;
+moment.isDate = isDate;
+moment.locale = locale;
+moment.invalid = invalid;
+moment.duration = duration;
+moment.isMoment = isMoment;
+moment.weekdays = weekdays;
+moment.parseZone = parseZone;
+moment.localeData = localeData;
+moment.isDuration = isDuration;
+moment.monthsShort = monthsShort;
+moment.weekdaysMin = weekdaysMin;
+moment.defineLocale = defineLocale;
+moment.updateLocale = updateLocale;
+moment.locales = locales;
+moment.weekdaysShort = weekdaysShort;
+moment.normalizeUnits = normalizeUnits;
+moment.relativeTimeRounding = relativeTimeRounding;
+moment.relativeTimeThreshold = relativeTimeThreshold;
+moment.calendarFormat = getCalendarFormat;
+moment.prototype = fn;
+
+// currently HTML5 input type only supports 24-hour formats
+moment.HTML5_FMT = {
+ DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', //
+ DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', //
+ DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', //
+ DATE: 'YYYY-MM-DD', //
+ TIME: 'HH:mm', //
+ TIME_SECONDS: 'HH:mm:ss', //
+ TIME_MS: 'HH:mm:ss.SSS', //
+ WEEK: 'GGGG-[W]WW', //
+ MONTH: 'YYYY-MM', //
+};
+
+export default moment;
diff --git a/vendor/assets/javascripts/momentjs/templates/default.js b/vendor/assets/javascripts/momentjs/templates/default.js
new file mode 100644
index 000000000..095a78f54
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/templates/default.js
@@ -0,0 +1,5 @@
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ global.moment = factory()
+}(this, (function () { 'use strict';
diff --git a/vendor/assets/javascripts/momentjs/templates/empty.js b/vendor/assets/javascripts/momentjs/templates/empty.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/vendor/assets/javascripts/momentjs/templates/locale-header.js b/vendor/assets/javascripts/momentjs/templates/locale-header.js
new file mode 100644
index 000000000..eadcc1d81
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/templates/locale-header.js
@@ -0,0 +1,6 @@
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
diff --git a/vendor/assets/javascripts/momentjs/templates/test-header.js b/vendor/assets/javascripts/momentjs/templates/test-header.js
new file mode 100644
index 000000000..1b208a359
--- /dev/null
+++ b/vendor/assets/javascripts/momentjs/templates/test-header.js
@@ -0,0 +1,6 @@
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../../moment')) :
+ typeof define === 'function' && define.amd ? define(['../../moment'], factory) :
+ factory(global.moment)
+}(this, (function (moment) { 'use strict';
diff --git a/vendor/assets/javascripts/spectrum.js b/vendor/assets/javascripts/spectrum.js
new file mode 100644
index 000000000..6c0f8e7ba
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum.js
@@ -0,0 +1 @@
+//= require spectrum/spectrum.js
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-ar.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-ar.js
new file mode 100644
index 000000000..8de4a5e91
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-ar.js
@@ -0,0 +1,17 @@
+// Spectrum Colorpicker
+// Arabic (ar) localization
+// https://github.com/bgrins/spectrum
+(function ( $ ) {
+
+var localization = $.spectrum.localization["ar"] = {
+ cancelText: "إلغاء",
+ chooseText: "إختار",
+ clearText: "إرجاع الألوان على ما كانت",
+ noColorSelectedText: "لم تختار أي لون",
+ togglePaletteMoreText: "أكثر",
+ togglePaletteLessText: "أقل"
+};
+
+$.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-de.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-de.js
new file mode 100644
index 000000000..dfc953115
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-de.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// German (de) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["de"] = {
+ cancelText: "Abbrechen",
+ chooseText: "Wählen",
+ clearText: "Farbauswahl zurücksetzen",
+ noColorSelectedText: "Keine Farbe ausgewählt",
+ togglePaletteMoreText: "Mehr",
+ togglePaletteLessText: "Weniger"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-dk.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-dk.js
new file mode 100644
index 000000000..454f5e181
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-dk.js
@@ -0,0 +1,14 @@
+// Spectrum Colorpicker
+// Danish (dk) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["dk"] = {
+ cancelText: "annuller",
+ chooseText: "Vælg"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-es.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-es.js
new file mode 100644
index 000000000..77bab9a9c
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-es.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// Spanish (es) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["es"] = {
+ cancelText: "Cancelar",
+ chooseText: "Elegir",
+ clearText: "Borrar color seleccionado",
+ noColorSelectedText: "Ningún color seleccionado",
+ togglePaletteMoreText: "Más",
+ togglePaletteLessText: "Menos"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-fa.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-fa.js
new file mode 100644
index 000000000..f052d5150
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-fa.js
@@ -0,0 +1,14 @@
+// Spectrum Colorpicker
+// Persian (fa) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["fa"] = {
+ cancelText: "لغو",
+ chooseText: "انتخاب"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-fi.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-fi.js
new file mode 100644
index 000000000..e339dd58c
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-fi.js
@@ -0,0 +1,14 @@
+// Spectrum Colorpicker
+// Finnish (fi) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["fi"] = {
+ cancelText: "Kumoa",
+ chooseText: "Valitse"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-fr.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-fr.js
new file mode 100644
index 000000000..a2e1b0a64
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-fr.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// French (fr) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["fr"] = {
+ cancelText: "Annuler",
+ chooseText: "Valider",
+ clearText: "Effacer couleur sélectionnée",
+ noColorSelectedText: "Aucune couleur sélectionnée",
+ togglePaletteMoreText: "Plus",
+ togglePaletteLessText: "Moins"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-gr.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-gr.js
new file mode 100644
index 000000000..d595f663e
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-gr.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// Greek (gr) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["gr"] = {
+ cancelText: "Ακύρωση",
+ chooseText: "Επιλογή",
+ clearText: "Καθαρισμός επιλεγμένου χρώματος",
+ noColorSelectedText: "Δεν έχει επιλεχθεί κάποιο χρώμα",
+ togglePaletteMoreText: "Περισσότερα",
+ togglePaletteLessText: "Λιγότερα"
+ };
+
+ $.extend($.gr.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-he.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-he.js
new file mode 100644
index 000000000..bb981c29c
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-he.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// Hebrew (he) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["he"] = {
+ cancelText: "בטל בחירה",
+ chooseText: "בחר צבע",
+ clearText: "אפס בחירה",
+ noColorSelectedText: "לא נבחר צבע",
+ togglePaletteMoreText: "עוד צבעים",
+ togglePaletteLessText: "פחות צבעים"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-hr.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-hr.js
new file mode 100644
index 000000000..87c52ad24
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-hr.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// Croatian (hr) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["hr"] = {
+ cancelText: "Odustani",
+ chooseText: "Odaberi",
+ clearText: "Poništi odabir",
+ noColorSelectedText: "Niti jedna boja nije odabrana",
+ togglePaletteMoreText: "Više",
+ togglePaletteLessText: "Manje"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-id.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-id.js
new file mode 100644
index 000000000..5f99aeb73
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-id.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// Indonesia/Bahasa Indonesia (id) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["id"] = {
+ cancelText: "Batal",
+ chooseText: "Pilih",
+ clearText: "Hapus Pilihan Warna",
+ noColorSelectedText: "Warna Tidak Dipilih",
+ togglePaletteMoreText: "tambah",
+ togglePaletteLessText: "kurangi"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-it.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-it.js
new file mode 100644
index 000000000..2d82e63c0
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-it.js
@@ -0,0 +1,16 @@
+// Spectrum Colorpicker
+// Italian (it) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["it"] = {
+ cancelText: "annulla",
+ chooseText: "scegli",
+ clearText: "Annulla selezione colore",
+ noColorSelectedText: "Nessun colore selezionato"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-ja.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-ja.js
new file mode 100644
index 000000000..d570dc2cc
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-ja.js
@@ -0,0 +1,14 @@
+// Spectrum Colorpicker
+// Japanese (ja) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["ja"] = {
+ cancelText: "中止",
+ chooseText: "選択"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-lt.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-lt.js
new file mode 100644
index 000000000..875dd6d77
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-lt.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// Lithuanian (lt) localization
+// https://github.com/liesislukas
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["lt"] = {
+ cancelText: "Atšaukti",
+ chooseText: "Pasirinkti",
+ clearText: "Išvalyti pasirinkimą",
+ noColorSelectedText: "Spalva nepasirinkta",
+ togglePaletteMoreText: "Daugiau",
+ togglePaletteLessText: "Mažiau"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-nl.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-nl.js
new file mode 100644
index 000000000..da5ca87e2
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-nl.js
@@ -0,0 +1,17 @@
+// Spectrum Colorpicker
+// Dutch (nl-nl) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["nl-nl"] = {
+ cancelText: "Annuleer",
+ chooseText: "Kies",
+ clearText: "Wis kleur selectie",
+ togglePaletteMoreText: 'Meer',
+ togglePaletteLessText: 'Minder'
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-pl.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-pl.js
new file mode 100644
index 000000000..febb46031
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-pl.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// Polish (pl) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["pl"] = {
+ cancelText: "Anuluj",
+ chooseText: "Wybierz",
+ clearText: "Usuń wybór koloru",
+ noColorSelectedText: "Nie wybrano koloru",
+ togglePaletteMoreText: "Więcej",
+ togglePaletteLessText: "Mniej"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-pt-br.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-pt-br.js
new file mode 100644
index 000000000..27be3c14d
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-pt-br.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// Brazilian (pt-br) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["pt-br"] = {
+ cancelText: "Cancelar",
+ chooseText: "Escolher",
+ clearText: "Limpar cor selecionada",
+ noColorSelectedText: "Nenhuma cor selecionada",
+ togglePaletteMoreText: "Mais",
+ togglePaletteLessText: "Menos"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-ru.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-ru.js
new file mode 100644
index 000000000..72d915fd0
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-ru.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// Russian (ru) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["ru"] = {
+ cancelText: "Отмена",
+ chooseText: "Выбрать",
+ clearText: "Сбросить",
+ noColorSelectedText: "Цвет не выбран",
+ togglePaletteMoreText: "Ещё",
+ togglePaletteLessText: "Скрыть"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-sv.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-sv.js
new file mode 100644
index 000000000..23a1d4752
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-sv.js
@@ -0,0 +1,14 @@
+// Spectrum Colorpicker
+// Swedish (sv) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["sv"] = {
+ cancelText: "Avbryt",
+ chooseText: "Välj"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-tr.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-tr.js
new file mode 100644
index 000000000..9a02879b2
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-tr.js
@@ -0,0 +1,14 @@
+// Spectrum Colorpicker
+// Turkish (tr) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["tr"] = {
+ cancelText: "iptal",
+ chooseText: "tamam"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-zh-cn.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-zh-cn.js
new file mode 100644
index 000000000..271e2e978
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-zh-cn.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// Simplified Chinese (zh-cn) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["zh-cn"] = {
+ cancelText: "取消",
+ chooseText: "选择",
+ clearText: "清除",
+ togglePaletteMoreText: "更多选项",
+ togglePaletteLessText: "隐藏",
+ noColorSelectedText: "尚未选择任何颜色"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-zh-tw.js b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-zh-tw.js
new file mode 100644
index 000000000..4f326a5f8
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/i18n/jquery.spectrum-zh-tw.js
@@ -0,0 +1,18 @@
+// Spectrum Colorpicker
+// Traditional Chinese (zh-tw) localization
+// https://github.com/bgrins/spectrum
+
+(function ( $ ) {
+
+ var localization = $.spectrum.localization["zh-tw"] = {
+ cancelText: "取消",
+ chooseText: "選擇",
+ clearText: "清除",
+ togglePaletteMoreText: "更多選項",
+ togglePaletteLessText: "隱藏",
+ noColorSelectedText: "尚未選擇任何顏色"
+ };
+
+ $.extend($.fn.spectrum.defaults, localization);
+
+})( jQuery );
diff --git a/vendor/assets/javascripts/spectrum/spectrum.js b/vendor/assets/javascripts/spectrum/spectrum.js
new file mode 100644
index 000000000..720097877
--- /dev/null
+++ b/vendor/assets/javascripts/spectrum/spectrum.js
@@ -0,0 +1,2323 @@
+// Spectrum Colorpicker v1.8.0
+// https://github.com/bgrins/spectrum
+// Author: Brian Grinstead
+// License: MIT
+
+(function (factory) {
+ "use strict";
+
+ if (typeof define === 'function' && define.amd) { // AMD
+ define(['jquery'], factory);
+ }
+ else if (typeof exports == "object" && typeof module == "object") { // CommonJS
+ module.exports = factory(require('jquery'));
+ }
+ else { // Browser
+ factory(jQuery);
+ }
+})(function($, undefined) {
+ "use strict";
+
+ var defaultOpts = {
+
+ // Callbacks
+ beforeShow: noop,
+ move: noop,
+ change: noop,
+ show: noop,
+ hide: noop,
+
+ // Options
+ color: false,
+ flat: false,
+ showInput: false,
+ allowEmpty: false,
+ showButtons: true,
+ clickoutFiresChange: true,
+ showInitial: false,
+ showPalette: false,
+ showPaletteOnly: false,
+ hideAfterPaletteSelect: false,
+ togglePaletteOnly: false,
+ showSelectionPalette: true,
+ localStorageKey: false,
+ appendTo: "body",
+ maxSelectionSize: 7,
+ cancelText: "cancel",
+ chooseText: "choose",
+ togglePaletteMoreText: "more",
+ togglePaletteLessText: "less",
+ clearText: "Clear Color Selection",
+ noColorSelectedText: "No Color Selected",
+ preferredFormat: false,
+ className: "", // Deprecated - use containerClassName and replacerClassName instead.
+ containerClassName: "",
+ replacerClassName: "",
+ showAlpha: false,
+ theme: "sp-light",
+ palette: [["#ffffff", "#000000", "#ff0000", "#ff8000", "#ffff00", "#008000", "#0000ff", "#4b0082", "#9400d3"]],
+ selectionPalette: [],
+ disabled: false,
+ offset: null
+ },
+ spectrums = [],
+ IE = !!/msie/i.exec( window.navigator.userAgent ),
+ rgbaSupport = (function() {
+ function contains( str, substr ) {
+ return !!~('' + str).indexOf(substr);
+ }
+
+ var elem = document.createElement('div');
+ var style = elem.style;
+ style.cssText = 'background-color:rgba(0,0,0,.5)';
+ return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');
+ })(),
+ replaceInput = [
+ ""
+ ].join(''),
+ markup = (function () {
+
+ // IE does not support gradients with multiple stops, so we need to simulate
+ // that for the rainbow slider with 8 divs that each have a single gradient
+ var gradientFix = "";
+ if (IE) {
+ for (var i = 1; i <= 6; i++) {
+ gradientFix += "
";
+ }
+ }
+
+ return [
+ "",
+ "
",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
",
+ "
",
+ "
",
+ "
",
+ "
",
+ "
",
+ "
",
+ "
",
+ "
",
+ gradientFix,
+ "
",
+ "
",
+ "
",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
",
+ "
",
+ "
"
+ ].join("");
+ })();
+
+ function paletteTemplate (p, color, className, opts) {
+ var html = [];
+ for (var i = 0; i < p.length; i++) {
+ var current = p[i];
+ if(current) {
+ var tiny = tinycolor(current);
+ var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light";
+ c += (tinycolor.equals(color, current)) ? " sp-thumb-active" : "";
+ var formattedString = tiny.toString(opts.preferredFormat || "rgb");
+ var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter();
+ html.push(' ');
+ } else {
+ var cls = 'sp-clear-display';
+ html.push($('
')
+ .append($(' ')
+ .attr('title', opts.noColorSelectedText)
+ )
+ .html()
+ );
+ }
+ }
+ return "" + html.join('') + "
";
+ }
+
+ function hideAll() {
+ for (var i = 0; i < spectrums.length; i++) {
+ if (spectrums[i]) {
+ spectrums[i].hide();
+ }
+ }
+ }
+
+ function instanceOptions(o, callbackContext) {
+ var opts = $.extend({}, defaultOpts, o);
+ opts.callbacks = {
+ 'move': bind(opts.move, callbackContext),
+ 'change': bind(opts.change, callbackContext),
+ 'show': bind(opts.show, callbackContext),
+ 'hide': bind(opts.hide, callbackContext),
+ 'beforeShow': bind(opts.beforeShow, callbackContext)
+ };
+
+ return opts;
+ }
+
+ function spectrum(element, o) {
+
+ var opts = instanceOptions(o, element),
+ flat = opts.flat,
+ showSelectionPalette = opts.showSelectionPalette,
+ localStorageKey = opts.localStorageKey,
+ theme = opts.theme,
+ callbacks = opts.callbacks,
+ resize = throttle(reflow, 10),
+ visible = false,
+ isDragging = false,
+ dragWidth = 0,
+ dragHeight = 0,
+ dragHelperHeight = 0,
+ slideHeight = 0,
+ slideWidth = 0,
+ alphaWidth = 0,
+ alphaSlideHelperWidth = 0,
+ slideHelperHeight = 0,
+ currentHue = 0,
+ currentSaturation = 0,
+ currentValue = 0,
+ currentAlpha = 1,
+ palette = [],
+ paletteArray = [],
+ paletteLookup = {},
+ selectionPalette = opts.selectionPalette.slice(0),
+ maxSelectionSize = opts.maxSelectionSize,
+ draggingClass = "sp-dragging",
+ shiftMovementDirection = null;
+
+ var doc = element.ownerDocument,
+ body = doc.body,
+ boundElement = $(element),
+ disabled = false,
+ container = $(markup, doc).addClass(theme),
+ pickerContainer = container.find(".sp-picker-container"),
+ dragger = container.find(".sp-color"),
+ dragHelper = container.find(".sp-dragger"),
+ slider = container.find(".sp-hue"),
+ slideHelper = container.find(".sp-slider"),
+ alphaSliderInner = container.find(".sp-alpha-inner"),
+ alphaSlider = container.find(".sp-alpha"),
+ alphaSlideHelper = container.find(".sp-alpha-handle"),
+ textInput = container.find(".sp-input"),
+ paletteContainer = container.find(".sp-palette"),
+ initialColorContainer = container.find(".sp-initial"),
+ cancelButton = container.find(".sp-cancel"),
+ clearButton = container.find(".sp-clear"),
+ chooseButton = container.find(".sp-choose"),
+ toggleButton = container.find(".sp-palette-toggle"),
+ isInput = boundElement.is("input"),
+ isInputTypeColor = isInput && boundElement.attr("type") === "color" && inputTypeColorSupport(),
+ shouldReplace = isInput && !flat,
+ replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className).addClass(opts.replacerClassName) : $([]),
+ offsetElement = (shouldReplace) ? replacer : boundElement,
+ previewElement = replacer.find(".sp-preview-inner"),
+ initialColor = opts.color || (isInput && boundElement.val()),
+ colorOnShow = false,
+ currentPreferredFormat = opts.preferredFormat,
+ clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange,
+ isEmpty = !initialColor,
+ allowEmpty = opts.allowEmpty && !isInputTypeColor;
+
+ function applyOptions() {
+
+ if (opts.showPaletteOnly) {
+ opts.showPalette = true;
+ }
+
+ toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);
+
+ if (opts.palette) {
+ palette = opts.palette.slice(0);
+ paletteArray = $.isArray(palette[0]) ? palette : [palette];
+ paletteLookup = {};
+ for (var i = 0; i < paletteArray.length; i++) {
+ for (var j = 0; j < paletteArray[i].length; j++) {
+ var rgb = tinycolor(paletteArray[i][j]).toRgbString();
+ paletteLookup[rgb] = true;
+ }
+ }
+ }
+
+ container.toggleClass("sp-flat", flat);
+ container.toggleClass("sp-input-disabled", !opts.showInput);
+ container.toggleClass("sp-alpha-enabled", opts.showAlpha);
+ container.toggleClass("sp-clear-enabled", allowEmpty);
+ container.toggleClass("sp-buttons-disabled", !opts.showButtons);
+ container.toggleClass("sp-palette-buttons-disabled", !opts.togglePaletteOnly);
+ container.toggleClass("sp-palette-disabled", !opts.showPalette);
+ container.toggleClass("sp-palette-only", opts.showPaletteOnly);
+ container.toggleClass("sp-initial-disabled", !opts.showInitial);
+ container.addClass(opts.className).addClass(opts.containerClassName);
+
+ reflow();
+ }
+
+ function initialize() {
+
+ if (IE) {
+ container.find("*:not(input)").attr("unselectable", "on");
+ }
+
+ applyOptions();
+
+ if (shouldReplace) {
+ boundElement.after(replacer).hide();
+ }
+
+ if (!allowEmpty) {
+ clearButton.hide();
+ }
+
+ if (flat) {
+ boundElement.after(container).hide();
+ }
+ else {
+
+ var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo);
+ if (appendTo.length !== 1) {
+ appendTo = $("body");
+ }
+
+ appendTo.append(container);
+ }
+
+ updateSelectionPaletteFromStorage();
+
+ offsetElement.bind("click.spectrum touchstart.spectrum", function (e) {
+ if (!disabled) {
+ toggle();
+ }
+
+ e.stopPropagation();
+
+ if (!$(e.target).is("input")) {
+ e.preventDefault();
+ }
+ });
+
+ if(boundElement.is(":disabled") || (opts.disabled === true)) {
+ disable();
+ }
+
+ // Prevent clicks from bubbling up to document. This would cause it to be hidden.
+ container.click(stopPropagation);
+
+ // Handle user typed input
+ textInput.change(setFromTextInput);
+ textInput.bind("paste", function () {
+ setTimeout(setFromTextInput, 1);
+ });
+ textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } });
+
+ cancelButton.text(opts.cancelText);
+ cancelButton.bind("click.spectrum", function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+ revert();
+ hide();
+ });
+
+ clearButton.attr("title", opts.clearText);
+ clearButton.bind("click.spectrum", function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+ isEmpty = true;
+ move();
+
+ if(flat) {
+ //for the flat style, this is a change event
+ updateOriginalInput(true);
+ }
+ });
+
+ chooseButton.text(opts.chooseText);
+ chooseButton.bind("click.spectrum", function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ if (IE && textInput.is(":focus")) {
+ textInput.trigger('change');
+ }
+
+ if (isValid()) {
+ updateOriginalInput(true);
+ hide();
+ }
+ });
+
+ toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);
+ toggleButton.bind("click.spectrum", function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ opts.showPaletteOnly = !opts.showPaletteOnly;
+
+ // To make sure the Picker area is drawn on the right, next to the
+ // Palette area (and not below the palette), first move the Palette
+ // to the left to make space for the picker, plus 5px extra.
+ // The 'applyOptions' function puts the whole container back into place
+ // and takes care of the button-text and the sp-palette-only CSS class.
+ if (!opts.showPaletteOnly && !flat) {
+ container.css('left', '-=' + (pickerContainer.outerWidth(true) + 5));
+ }
+ applyOptions();
+ });
+
+ draggable(alphaSlider, function (dragX, dragY, e) {
+ currentAlpha = (dragX / alphaWidth);
+ isEmpty = false;
+ if (e.shiftKey) {
+ currentAlpha = Math.round(currentAlpha * 10) / 10;
+ }
+
+ move();
+ }, dragStart, dragStop);
+
+ draggable(slider, function (dragX, dragY) {
+ currentHue = parseFloat(dragY / slideHeight);
+ isEmpty = false;
+ if (!opts.showAlpha) {
+ currentAlpha = 1;
+ }
+ move();
+ }, dragStart, dragStop);
+
+ draggable(dragger, function (dragX, dragY, e) {
+
+ // shift+drag should snap the movement to either the x or y axis.
+ if (!e.shiftKey) {
+ shiftMovementDirection = null;
+ }
+ else if (!shiftMovementDirection) {
+ var oldDragX = currentSaturation * dragWidth;
+ var oldDragY = dragHeight - (currentValue * dragHeight);
+ var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY);
+
+ shiftMovementDirection = furtherFromX ? "x" : "y";
+ }
+
+ var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x";
+ var setValue = !shiftMovementDirection || shiftMovementDirection === "y";
+
+ if (setSaturation) {
+ currentSaturation = parseFloat(dragX / dragWidth);
+ }
+ if (setValue) {
+ currentValue = parseFloat((dragHeight - dragY) / dragHeight);
+ }
+
+ isEmpty = false;
+ if (!opts.showAlpha) {
+ currentAlpha = 1;
+ }
+
+ move();
+
+ }, dragStart, dragStop);
+
+ if (!!initialColor) {
+ set(initialColor);
+
+ // In case color was black - update the preview UI and set the format
+ // since the set function will not run (default color is black).
+ updateUI();
+ currentPreferredFormat = opts.preferredFormat || tinycolor(initialColor).format;
+
+ addColorToSelectionPalette(initialColor);
+ }
+ else {
+ updateUI();
+ }
+
+ if (flat) {
+ show();
+ }
+
+ function paletteElementClick(e) {
+ if (e.data && e.data.ignore) {
+ set($(e.target).closest(".sp-thumb-el").data("color"));
+ move();
+ }
+ else {
+ set($(e.target).closest(".sp-thumb-el").data("color"));
+ move();
+ updateOriginalInput(true);
+ if (opts.hideAfterPaletteSelect) {
+ hide();
+ }
+ }
+
+ return false;
+ }
+
+ var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum";
+ paletteContainer.delegate(".sp-thumb-el", paletteEvent, paletteElementClick);
+ initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, paletteElementClick);
+ }
+
+ function updateSelectionPaletteFromStorage() {
+
+ if (localStorageKey && window.localStorage) {
+
+ // Migrate old palettes over to new format. May want to remove this eventually.
+ try {
+ var oldPalette = window.localStorage[localStorageKey].split(",#");
+ if (oldPalette.length > 1) {
+ delete window.localStorage[localStorageKey];
+ $.each(oldPalette, function(i, c) {
+ addColorToSelectionPalette(c);
+ });
+ }
+ }
+ catch(e) { }
+
+ try {
+ selectionPalette = window.localStorage[localStorageKey].split(";");
+ }
+ catch (e) { }
+ }
+ }
+
+ function addColorToSelectionPalette(color) {
+ if (showSelectionPalette) {
+ var rgb = tinycolor(color).toRgbString();
+ if (!paletteLookup[rgb] && $.inArray(rgb, selectionPalette) === -1) {
+ selectionPalette.push(rgb);
+ while(selectionPalette.length > maxSelectionSize) {
+ selectionPalette.shift();
+ }
+ }
+
+ if (localStorageKey && window.localStorage) {
+ try {
+ window.localStorage[localStorageKey] = selectionPalette.join(";");
+ }
+ catch(e) { }
+ }
+ }
+ }
+
+ function getUniqueSelectionPalette() {
+ var unique = [];
+ if (opts.showPalette) {
+ for (var i = 0; i < selectionPalette.length; i++) {
+ var rgb = tinycolor(selectionPalette[i]).toRgbString();
+
+ if (!paletteLookup[rgb]) {
+ unique.push(selectionPalette[i]);
+ }
+ }
+ }
+
+ return unique.reverse().slice(0, opts.maxSelectionSize);
+ }
+
+ function drawPalette() {
+
+ var currentColor = get();
+
+ var html = $.map(paletteArray, function (palette, i) {
+ return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i, opts);
+ });
+
+ updateSelectionPaletteFromStorage();
+
+ if (selectionPalette) {
+ html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection", opts));
+ }
+
+ paletteContainer.html(html.join(""));
+ }
+
+ function drawInitial() {
+ if (opts.showInitial) {
+ var initial = colorOnShow;
+ var current = get();
+ initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial", opts));
+ }
+ }
+
+ function dragStart() {
+ if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) {
+ reflow();
+ }
+ isDragging = true;
+ container.addClass(draggingClass);
+ shiftMovementDirection = null;
+ boundElement.trigger('dragstart.spectrum', [ get() ]);
+ }
+
+ function dragStop() {
+ isDragging = false;
+ container.removeClass(draggingClass);
+ boundElement.trigger('dragstop.spectrum', [ get() ]);
+ }
+
+ function setFromTextInput() {
+
+ var value = textInput.val();
+
+ if ((value === null || value === "") && allowEmpty) {
+ set(null);
+ updateOriginalInput(true);
+ }
+ else {
+ var tiny = tinycolor(value);
+ if (tiny.isValid()) {
+ set(tiny);
+ updateOriginalInput(true);
+ }
+ else {
+ textInput.addClass("sp-validation-error");
+ }
+ }
+ }
+
+ function toggle() {
+ if (visible) {
+ hide();
+ }
+ else {
+ show();
+ }
+ }
+
+ function show() {
+ var event = $.Event('beforeShow.spectrum');
+
+ if (visible) {
+ reflow();
+ return;
+ }
+
+ boundElement.trigger(event, [ get() ]);
+
+ if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) {
+ return;
+ }
+
+ hideAll();
+ visible = true;
+
+ $(doc).bind("keydown.spectrum", onkeydown);
+ $(doc).bind("click.spectrum", clickout);
+ $(window).bind("resize.spectrum", resize);
+ replacer.addClass("sp-active");
+ container.removeClass("sp-hidden");
+
+ reflow();
+ updateUI();
+
+ colorOnShow = get();
+
+ drawInitial();
+ callbacks.show(colorOnShow);
+ boundElement.trigger('show.spectrum', [ colorOnShow ]);
+ }
+
+ function onkeydown(e) {
+ // Close on ESC
+ if (e.keyCode === 27) {
+ hide();
+ }
+ }
+
+ function clickout(e) {
+ // Return on right click.
+ if (e.button == 2) { return; }
+
+ // If a drag event was happening during the mouseup, don't hide
+ // on click.
+ if (isDragging) { return; }
+
+ if (clickoutFiresChange) {
+ updateOriginalInput(true);
+ }
+ else {
+ revert();
+ }
+ hide();
+ }
+
+ function hide() {
+ // Return if hiding is unnecessary
+ if (!visible || flat) { return; }
+ visible = false;
+
+ $(doc).unbind("keydown.spectrum", onkeydown);
+ $(doc).unbind("click.spectrum", clickout);
+ $(window).unbind("resize.spectrum", resize);
+
+ replacer.removeClass("sp-active");
+ container.addClass("sp-hidden");
+
+ callbacks.hide(get());
+ boundElement.trigger('hide.spectrum', [ get() ]);
+ }
+
+ function revert() {
+ set(colorOnShow, true);
+ }
+
+ function set(color, ignoreFormatChange) {
+ if (tinycolor.equals(color, get())) {
+ // Update UI just in case a validation error needs
+ // to be cleared.
+ updateUI();
+ return;
+ }
+
+ var newColor, newHsv;
+ if (!color && allowEmpty) {
+ isEmpty = true;
+ } else {
+ isEmpty = false;
+ newColor = tinycolor(color);
+ newHsv = newColor.toHsv();
+
+ currentHue = (newHsv.h % 360) / 360;
+ currentSaturation = newHsv.s;
+ currentValue = newHsv.v;
+ currentAlpha = newHsv.a;
+ }
+ updateUI();
+
+ if (newColor && newColor.isValid() && !ignoreFormatChange) {
+ currentPreferredFormat = opts.preferredFormat || newColor.getFormat();
+ }
+ }
+
+ function get(opts) {
+ opts = opts || { };
+
+ if (allowEmpty && isEmpty) {
+ return null;
+ }
+
+ return tinycolor.fromRatio({
+ h: currentHue,
+ s: currentSaturation,
+ v: currentValue,
+ a: Math.round(currentAlpha * 100) / 100
+ }, { format: opts.format || currentPreferredFormat });
+ }
+
+ function isValid() {
+ return !textInput.hasClass("sp-validation-error");
+ }
+
+ function move() {
+ updateUI();
+
+ callbacks.move(get());
+ boundElement.trigger('move.spectrum', [ get() ]);
+ }
+
+ function updateUI() {
+
+ textInput.removeClass("sp-validation-error");
+
+ updateHelperLocations();
+
+ // Update dragger background color (gradients take care of saturation and value).
+ var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 });
+ dragger.css("background-color", flatColor.toHexString());
+
+ // Get a format that alpha will be included in (hex and names ignore alpha)
+ var format = currentPreferredFormat;
+ if (currentAlpha < 1 && !(currentAlpha === 0 && format === "name")) {
+ if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") {
+ format = "rgb";
+ }
+ }
+
+ var realColor = get({ format: format }),
+ displayColor = '';
+
+ //reset background info for preview element
+ previewElement.removeClass("sp-clear-display");
+ previewElement.css('background-color', 'transparent');
+
+ if (!realColor && allowEmpty) {
+ // Update the replaced elements background with icon indicating no color selection
+ previewElement.addClass("sp-clear-display");
+ }
+ else {
+ var realHex = realColor.toHexString(),
+ realRgb = realColor.toRgbString();
+
+ // Update the replaced elements background color (with actual selected color)
+ if (rgbaSupport || realColor.alpha === 1) {
+ previewElement.css("background-color", realRgb);
+ }
+ else {
+ previewElement.css("background-color", "transparent");
+ previewElement.css("filter", realColor.toFilter());
+ }
+
+ if (opts.showAlpha) {
+ var rgb = realColor.toRgb();
+ rgb.a = 0;
+ var realAlpha = tinycolor(rgb).toRgbString();
+ var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")";
+
+ if (IE) {
+ alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex));
+ }
+ else {
+ alphaSliderInner.css("background", "-webkit-" + gradient);
+ alphaSliderInner.css("background", "-moz-" + gradient);
+ alphaSliderInner.css("background", "-ms-" + gradient);
+ // Use current syntax gradient on unprefixed property.
+ alphaSliderInner.css("background",
+ "linear-gradient(to right, " + realAlpha + ", " + realHex + ")");
+ }
+ }
+
+ displayColor = realColor.toString(format);
+ }
+
+ // Update the text entry input as it changes happen
+ if (opts.showInput) {
+ textInput.val(displayColor);
+ }
+
+ if (opts.showPalette) {
+ drawPalette();
+ }
+
+ drawInitial();
+ }
+
+ function updateHelperLocations() {
+ var s = currentSaturation;
+ var v = currentValue;
+
+ if(allowEmpty && isEmpty) {
+ //if selected color is empty, hide the helpers
+ alphaSlideHelper.hide();
+ slideHelper.hide();
+ dragHelper.hide();
+ }
+ else {
+ //make sure helpers are visible
+ alphaSlideHelper.show();
+ slideHelper.show();
+ dragHelper.show();
+
+ // Where to show the little circle in that displays your current selected color
+ var dragX = s * dragWidth;
+ var dragY = dragHeight - (v * dragHeight);
+ dragX = Math.max(
+ -dragHelperHeight,
+ Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight)
+ );
+ dragY = Math.max(
+ -dragHelperHeight,
+ Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight)
+ );
+ dragHelper.css({
+ "top": dragY + "px",
+ "left": dragX + "px"
+ });
+
+ var alphaX = currentAlpha * alphaWidth;
+ alphaSlideHelper.css({
+ "left": (alphaX - (alphaSlideHelperWidth / 2)) + "px"
+ });
+
+ // Where to show the bar that displays your current selected hue
+ var slideY = (currentHue) * slideHeight;
+ slideHelper.css({
+ "top": (slideY - slideHelperHeight) + "px"
+ });
+ }
+ }
+
+ function updateOriginalInput(fireCallback) {
+ var color = get(),
+ displayColor = '',
+ hasChanged = !tinycolor.equals(color, colorOnShow);
+
+ if (color) {
+ displayColor = color.toString(currentPreferredFormat);
+ // Update the selection palette with the current color
+ addColorToSelectionPalette(color);
+ }
+
+ if (isInput) {
+ boundElement.val(displayColor);
+ }
+
+ if (fireCallback && hasChanged) {
+ callbacks.change(color);
+ boundElement.trigger('change', [ color ]);
+ }
+ }
+
+ function reflow() {
+ if (!visible) {
+ return; // Calculations would be useless and wouldn't be reliable anyways
+ }
+ dragWidth = dragger.width();
+ dragHeight = dragger.height();
+ dragHelperHeight = dragHelper.height();
+ slideWidth = slider.width();
+ slideHeight = slider.height();
+ slideHelperHeight = slideHelper.height();
+ alphaWidth = alphaSlider.width();
+ alphaSlideHelperWidth = alphaSlideHelper.width();
+
+ if (!flat) {
+ container.css("position", "absolute");
+ if (opts.offset) {
+ container.offset(opts.offset);
+ } else {
+ container.offset(getOffset(container, offsetElement));
+ }
+ }
+
+ updateHelperLocations();
+
+ if (opts.showPalette) {
+ drawPalette();
+ }
+
+ boundElement.trigger('reflow.spectrum');
+ }
+
+ function destroy() {
+ boundElement.show();
+ offsetElement.unbind("click.spectrum touchstart.spectrum");
+ container.remove();
+ replacer.remove();
+ spectrums[spect.id] = null;
+ }
+
+ function option(optionName, optionValue) {
+ if (optionName === undefined) {
+ return $.extend({}, opts);
+ }
+ if (optionValue === undefined) {
+ return opts[optionName];
+ }
+
+ opts[optionName] = optionValue;
+
+ if (optionName === "preferredFormat") {
+ currentPreferredFormat = opts.preferredFormat;
+ }
+ applyOptions();
+ }
+
+ function enable() {
+ disabled = false;
+ boundElement.attr("disabled", false);
+ offsetElement.removeClass("sp-disabled");
+ }
+
+ function disable() {
+ hide();
+ disabled = true;
+ boundElement.attr("disabled", true);
+ offsetElement.addClass("sp-disabled");
+ }
+
+ function setOffset(coord) {
+ opts.offset = coord;
+ reflow();
+ }
+
+ initialize();
+
+ var spect = {
+ show: show,
+ hide: hide,
+ toggle: toggle,
+ reflow: reflow,
+ option: option,
+ enable: enable,
+ disable: disable,
+ offset: setOffset,
+ set: function (c) {
+ set(c);
+ updateOriginalInput();
+ },
+ get: get,
+ destroy: destroy,
+ container: container
+ };
+
+ spect.id = spectrums.push(spect) - 1;
+
+ return spect;
+ }
+
+ /**
+ * checkOffset - get the offset below/above and left/right element depending on screen position
+ * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js
+ */
+ function getOffset(picker, input) {
+ var extraY = 0;
+ var dpWidth = picker.outerWidth();
+ var dpHeight = picker.outerHeight();
+ var inputHeight = input.outerHeight();
+ var doc = picker[0].ownerDocument;
+ var docElem = doc.documentElement;
+ var viewWidth = docElem.clientWidth + $(doc).scrollLeft();
+ var viewHeight = docElem.clientHeight + $(doc).scrollTop();
+ var offset = input.offset();
+ offset.top += inputHeight;
+
+ offset.left -=
+ Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
+ Math.abs(offset.left + dpWidth - viewWidth) : 0);
+
+ offset.top -=
+ Math.min(offset.top, ((offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
+ Math.abs(dpHeight + inputHeight - extraY) : extraY));
+
+ return offset;
+ }
+
+ /**
+ * noop - do nothing
+ */
+ function noop() {
+
+ }
+
+ /**
+ * stopPropagation - makes the code only doing this a little easier to read in line
+ */
+ function stopPropagation(e) {
+ e.stopPropagation();
+ }
+
+ /**
+ * Create a function bound to a given object
+ * Thanks to underscore.js
+ */
+ function bind(func, obj) {
+ var slice = Array.prototype.slice;
+ var args = slice.call(arguments, 2);
+ return function () {
+ return func.apply(obj, args.concat(slice.call(arguments)));
+ };
+ }
+
+ /**
+ * Lightweight drag helper. Handles containment within the element, so that
+ * when dragging, the x is within [0,element.width] and y is within [0,element.height]
+ */
+ function draggable(element, onmove, onstart, onstop) {
+ onmove = onmove || function () { };
+ onstart = onstart || function () { };
+ onstop = onstop || function () { };
+ var doc = document;
+ var dragging = false;
+ var offset = {};
+ var maxHeight = 0;
+ var maxWidth = 0;
+ var hasTouch = ('ontouchstart' in window);
+
+ var duringDragEvents = {};
+ duringDragEvents["selectstart"] = prevent;
+ duringDragEvents["dragstart"] = prevent;
+ duringDragEvents["touchmove mousemove"] = move;
+ duringDragEvents["touchend mouseup"] = stop;
+
+ function prevent(e) {
+ if (e.stopPropagation) {
+ e.stopPropagation();
+ }
+ if (e.preventDefault) {
+ e.preventDefault();
+ }
+ e.returnValue = false;
+ }
+
+ function move(e) {
+ if (dragging) {
+ // Mouseup happened outside of window
+ if (IE && doc.documentMode < 9 && !e.button) {
+ return stop();
+ }
+
+ var t0 = e.originalEvent && e.originalEvent.touches && e.originalEvent.touches[0];
+ var pageX = t0 && t0.pageX || e.pageX;
+ var pageY = t0 && t0.pageY || e.pageY;
+
+ var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth));
+ var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight));
+
+ if (hasTouch) {
+ // Stop scrolling in iOS
+ prevent(e);
+ }
+
+ onmove.apply(element, [dragX, dragY, e]);
+ }
+ }
+
+ function start(e) {
+ var rightclick = (e.which) ? (e.which == 3) : (e.button == 2);
+
+ if (!rightclick && !dragging) {
+ if (onstart.apply(element, arguments) !== false) {
+ dragging = true;
+ maxHeight = $(element).height();
+ maxWidth = $(element).width();
+ offset = $(element).offset();
+
+ $(doc).bind(duringDragEvents);
+ $(doc.body).addClass("sp-dragging");
+
+ move(e);
+
+ prevent(e);
+ }
+ }
+ }
+
+ function stop() {
+ if (dragging) {
+ $(doc).unbind(duringDragEvents);
+ $(doc.body).removeClass("sp-dragging");
+
+ // Wait a tick before notifying observers to allow the click event
+ // to fire in Chrome.
+ setTimeout(function() {
+ onstop.apply(element, arguments);
+ }, 0);
+ }
+ dragging = false;
+ }
+
+ $(element).bind("touchstart mousedown", start);
+ }
+
+ function throttle(func, wait, debounce) {
+ var timeout;
+ return function () {
+ var context = this, args = arguments;
+ var throttler = function () {
+ timeout = null;
+ func.apply(context, args);
+ };
+ if (debounce) clearTimeout(timeout);
+ if (debounce || !timeout) timeout = setTimeout(throttler, wait);
+ };
+ }
+
+ function inputTypeColorSupport() {
+ return $.fn.spectrum.inputTypeColorSupport();
+ }
+
+ /**
+ * Define a jQuery plugin
+ */
+ var dataID = "spectrum.id";
+ $.fn.spectrum = function (opts, extra) {
+
+ if (typeof opts == "string") {
+
+ var returnValue = this;
+ var args = Array.prototype.slice.call( arguments, 1 );
+
+ this.each(function () {
+ var spect = spectrums[$(this).data(dataID)];
+ if (spect) {
+ var method = spect[opts];
+ if (!method) {
+ throw new Error( "Spectrum: no such method: '" + opts + "'" );
+ }
+
+ if (opts == "get") {
+ returnValue = spect.get();
+ }
+ else if (opts == "container") {
+ returnValue = spect.container;
+ }
+ else if (opts == "option") {
+ returnValue = spect.option.apply(spect, args);
+ }
+ else if (opts == "destroy") {
+ spect.destroy();
+ $(this).removeData(dataID);
+ }
+ else {
+ method.apply(spect, args);
+ }
+ }
+ });
+
+ return returnValue;
+ }
+
+ // Initializing a new instance of spectrum
+ return this.spectrum("destroy").each(function () {
+ var options = $.extend({}, opts, $(this).data());
+ var spect = spectrum(this, options);
+ $(this).data(dataID, spect.id);
+ });
+ };
+
+ $.fn.spectrum.load = true;
+ $.fn.spectrum.loadOpts = {};
+ $.fn.spectrum.draggable = draggable;
+ $.fn.spectrum.defaults = defaultOpts;
+ $.fn.spectrum.inputTypeColorSupport = function inputTypeColorSupport() {
+ if (typeof inputTypeColorSupport._cachedResult === "undefined") {
+ var colorInput = $(" ")[0]; // if color element is supported, value will default to not null
+ inputTypeColorSupport._cachedResult = colorInput.type === "color" && colorInput.value !== "";
+ }
+ return inputTypeColorSupport._cachedResult;
+ };
+
+ $.spectrum = { };
+ $.spectrum.localization = { };
+ $.spectrum.palettes = { };
+
+ $.fn.spectrum.processNativeColorInputs = function () {
+ var colorInputs = $("input[type=color]");
+ if (colorInputs.length && !inputTypeColorSupport()) {
+ colorInputs.spectrum({
+ preferredFormat: "hex6"
+ });
+ }
+ };
+
+ // TinyColor v1.1.2
+ // https://github.com/bgrins/TinyColor
+ // Brian Grinstead, MIT License
+
+ (function() {
+
+ var trimLeft = /^[\s,#]+/,
+ trimRight = /\s+$/,
+ tinyCounter = 0,
+ math = Math,
+ mathRound = math.round,
+ mathMin = math.min,
+ mathMax = math.max,
+ mathRandom = math.random;
+
+ var tinycolor = function(color, opts) {
+
+ color = (color) ? color : '';
+ opts = opts || { };
+
+ // If input is already a tinycolor, return itself
+ if (color instanceof tinycolor) {
+ return color;
+ }
+ // If we are called as a function, call using new instead
+ if (!(this instanceof tinycolor)) {
+ return new tinycolor(color, opts);
+ }
+
+ var rgb = inputToRGB(color);
+ this._originalInput = color,
+ this._r = rgb.r,
+ this._g = rgb.g,
+ this._b = rgb.b,
+ this._a = rgb.a,
+ this._roundA = mathRound(100*this._a) / 100,
+ this._format = opts.format || rgb.format;
+ this._gradientType = opts.gradientType;
+
+ // Don't let the range of [0,255] come back in [0,1].
+ // Potentially lose a little bit of precision here, but will fix issues where
+ // .5 gets interpreted as half of the total, instead of half of 1
+ // If it was supposed to be 128, this was already taken care of by `inputToRgb`
+ if (this._r < 1) { this._r = mathRound(this._r); }
+ if (this._g < 1) { this._g = mathRound(this._g); }
+ if (this._b < 1) { this._b = mathRound(this._b); }
+
+ this._ok = rgb.ok;
+ this._tc_id = tinyCounter++;
+ };
+
+ tinycolor.prototype = {
+ isDark: function() {
+ return this.getBrightness() < 128;
+ },
+ isLight: function() {
+ return !this.isDark();
+ },
+ isValid: function() {
+ return this._ok;
+ },
+ getOriginalInput: function() {
+ return this._originalInput;
+ },
+ getFormat: function() {
+ return this._format;
+ },
+ getAlpha: function() {
+ return this._a;
+ },
+ getBrightness: function() {
+ var rgb = this.toRgb();
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
+ },
+ setAlpha: function(value) {
+ this._a = boundAlpha(value);
+ this._roundA = mathRound(100*this._a) / 100;
+ return this;
+ },
+ toHsv: function() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
+ },
+ toHsvString: function() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
+ return (this._a == 1) ?
+ "hsv(" + h + ", " + s + "%, " + v + "%)" :
+ "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
+ },
+ toHsl: function() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
+ },
+ toHslString: function() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
+ return (this._a == 1) ?
+ "hsl(" + h + ", " + s + "%, " + l + "%)" :
+ "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
+ },
+ toHex: function(allow3Char) {
+ return rgbToHex(this._r, this._g, this._b, allow3Char);
+ },
+ toHexString: function(allow3Char) {
+ return '#' + this.toHex(allow3Char);
+ },
+ toHex8: function() {
+ return rgbaToHex(this._r, this._g, this._b, this._a);
+ },
+ toHex8String: function() {
+ return '#' + this.toHex8();
+ },
+ toRgb: function() {
+ return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
+ },
+ toRgbString: function() {
+ return (this._a == 1) ?
+ "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
+ "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
+ },
+ toPercentageRgb: function() {
+ return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
+ },
+ toPercentageRgbString: function() {
+ return (this._a == 1) ?
+ "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
+ "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
+ },
+ toName: function() {
+ if (this._a === 0) {
+ return "transparent";
+ }
+
+ if (this._a < 1) {
+ return false;
+ }
+
+ return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
+ },
+ toFilter: function(secondColor) {
+ var hex8String = '#' + rgbaToHex(this._r, this._g, this._b, this._a);
+ var secondHex8String = hex8String;
+ var gradientType = this._gradientType ? "GradientType = 1, " : "";
+
+ if (secondColor) {
+ var s = tinycolor(secondColor);
+ secondHex8String = s.toHex8String();
+ }
+
+ return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
+ },
+ toString: function(format) {
+ var formatSet = !!format;
+ format = format || this._format;
+
+ var formattedString = false;
+ var hasAlpha = this._a < 1 && this._a >= 0;
+ var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "name");
+
+ if (needsAlphaFormat) {
+ // Special case for "transparent", all other non-alpha formats
+ // will return rgba when there is transparency.
+ if (format === "name" && this._a === 0) {
+ return this.toName();
+ }
+ return this.toRgbString();
+ }
+ if (format === "rgb") {
+ formattedString = this.toRgbString();
+ }
+ if (format === "prgb") {
+ formattedString = this.toPercentageRgbString();
+ }
+ if (format === "hex" || format === "hex6") {
+ formattedString = this.toHexString();
+ }
+ if (format === "hex3") {
+ formattedString = this.toHexString(true);
+ }
+ if (format === "hex8") {
+ formattedString = this.toHex8String();
+ }
+ if (format === "name") {
+ formattedString = this.toName();
+ }
+ if (format === "hsl") {
+ formattedString = this.toHslString();
+ }
+ if (format === "hsv") {
+ formattedString = this.toHsvString();
+ }
+
+ return formattedString || this.toHexString();
+ },
+
+ _applyModification: function(fn, args) {
+ var color = fn.apply(null, [this].concat([].slice.call(args)));
+ this._r = color._r;
+ this._g = color._g;
+ this._b = color._b;
+ this.setAlpha(color._a);
+ return this;
+ },
+ lighten: function() {
+ return this._applyModification(lighten, arguments);
+ },
+ brighten: function() {
+ return this._applyModification(brighten, arguments);
+ },
+ darken: function() {
+ return this._applyModification(darken, arguments);
+ },
+ desaturate: function() {
+ return this._applyModification(desaturate, arguments);
+ },
+ saturate: function() {
+ return this._applyModification(saturate, arguments);
+ },
+ greyscale: function() {
+ return this._applyModification(greyscale, arguments);
+ },
+ spin: function() {
+ return this._applyModification(spin, arguments);
+ },
+
+ _applyCombination: function(fn, args) {
+ return fn.apply(null, [this].concat([].slice.call(args)));
+ },
+ analogous: function() {
+ return this._applyCombination(analogous, arguments);
+ },
+ complement: function() {
+ return this._applyCombination(complement, arguments);
+ },
+ monochromatic: function() {
+ return this._applyCombination(monochromatic, arguments);
+ },
+ splitcomplement: function() {
+ return this._applyCombination(splitcomplement, arguments);
+ },
+ triad: function() {
+ return this._applyCombination(triad, arguments);
+ },
+ tetrad: function() {
+ return this._applyCombination(tetrad, arguments);
+ }
+ };
+
+ // If input is an object, force 1 into "1.0" to handle ratios properly
+ // String input requires "1.0" as input, so 1 will be treated as 1
+ tinycolor.fromRatio = function(color, opts) {
+ if (typeof color == "object") {
+ var newColor = {};
+ for (var i in color) {
+ if (color.hasOwnProperty(i)) {
+ if (i === "a") {
+ newColor[i] = color[i];
+ }
+ else {
+ newColor[i] = convertToPercentage(color[i]);
+ }
+ }
+ }
+ color = newColor;
+ }
+
+ return tinycolor(color, opts);
+ };
+
+ // Given a string or object, convert that input to RGB
+ // Possible string inputs:
+ //
+ // "red"
+ // "#f00" or "f00"
+ // "#ff0000" or "ff0000"
+ // "#ff000000" or "ff000000"
+ // "rgb 255 0 0" or "rgb (255, 0, 0)"
+ // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
+ // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
+ // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
+ // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
+ // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
+ // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
+ //
+ function inputToRGB(color) {
+
+ var rgb = { r: 0, g: 0, b: 0 };
+ var a = 1;
+ var ok = false;
+ var format = false;
+
+ if (typeof color == "string") {
+ color = stringInputToObject(color);
+ }
+
+ if (typeof color == "object") {
+ if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) {
+ rgb = rgbToRgb(color.r, color.g, color.b);
+ ok = true;
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
+ }
+ else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) {
+ color.s = convertToPercentage(color.s);
+ color.v = convertToPercentage(color.v);
+ rgb = hsvToRgb(color.h, color.s, color.v);
+ ok = true;
+ format = "hsv";
+ }
+ else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) {
+ color.s = convertToPercentage(color.s);
+ color.l = convertToPercentage(color.l);
+ rgb = hslToRgb(color.h, color.s, color.l);
+ ok = true;
+ format = "hsl";
+ }
+
+ if (color.hasOwnProperty("a")) {
+ a = color.a;
+ }
+ }
+
+ a = boundAlpha(a);
+
+ return {
+ ok: ok,
+ format: color.format || format,
+ r: mathMin(255, mathMax(rgb.r, 0)),
+ g: mathMin(255, mathMax(rgb.g, 0)),
+ b: mathMin(255, mathMax(rgb.b, 0)),
+ a: a
+ };
+ }
+
+
+ // Conversion Functions
+ // --------------------
+
+ // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
+ //
+
+ // `rgbToRgb`
+ // Handle bounds / percentage checking to conform to CSS color spec
+ //
+ // *Assumes:* r, g, b in [0, 255] or [0, 1]
+ // *Returns:* { r, g, b } in [0, 255]
+ function rgbToRgb(r, g, b){
+ return {
+ r: bound01(r, 255) * 255,
+ g: bound01(g, 255) * 255,
+ b: bound01(b, 255) * 255
+ };
+ }
+
+ // `rgbToHsl`
+ // Converts an RGB color value to HSL.
+ // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
+ // *Returns:* { h, s, l } in [0,1]
+ function rgbToHsl(r, g, b) {
+
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+
+ var max = mathMax(r, g, b), min = mathMin(r, g, b);
+ var h, s, l = (max + min) / 2;
+
+ if(max == min) {
+ h = s = 0; // achromatic
+ }
+ else {
+ var d = max - min;
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+ switch(max) {
+ case r: h = (g - b) / d + (g < b ? 6 : 0); break;
+ case g: h = (b - r) / d + 2; break;
+ case b: h = (r - g) / d + 4; break;
+ }
+
+ h /= 6;
+ }
+
+ return { h: h, s: s, l: l };
+ }
+
+ // `hslToRgb`
+ // Converts an HSL color value to RGB.
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
+ // *Returns:* { r, g, b } in the set [0, 255]
+ function hslToRgb(h, s, l) {
+ var r, g, b;
+
+ h = bound01(h, 360);
+ s = bound01(s, 100);
+ l = bound01(l, 100);
+
+ function hue2rgb(p, q, t) {
+ if(t < 0) t += 1;
+ if(t > 1) t -= 1;
+ if(t < 1/6) return p + (q - p) * 6 * t;
+ if(t < 1/2) return q;
+ if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
+ return p;
+ }
+
+ if(s === 0) {
+ r = g = b = l; // achromatic
+ }
+ else {
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+ var p = 2 * l - q;
+ r = hue2rgb(p, q, h + 1/3);
+ g = hue2rgb(p, q, h);
+ b = hue2rgb(p, q, h - 1/3);
+ }
+
+ return { r: r * 255, g: g * 255, b: b * 255 };
+ }
+
+ // `rgbToHsv`
+ // Converts an RGB color value to HSV
+ // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
+ // *Returns:* { h, s, v } in [0,1]
+ function rgbToHsv(r, g, b) {
+
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+
+ var max = mathMax(r, g, b), min = mathMin(r, g, b);
+ var h, s, v = max;
+
+ var d = max - min;
+ s = max === 0 ? 0 : d / max;
+
+ if(max == min) {
+ h = 0; // achromatic
+ }
+ else {
+ switch(max) {
+ case r: h = (g - b) / d + (g < b ? 6 : 0); break;
+ case g: h = (b - r) / d + 2; break;
+ case b: h = (r - g) / d + 4; break;
+ }
+ h /= 6;
+ }
+ return { h: h, s: s, v: v };
+ }
+
+ // `hsvToRgb`
+ // Converts an HSV color value to RGB.
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
+ // *Returns:* { r, g, b } in the set [0, 255]
+ function hsvToRgb(h, s, v) {
+
+ h = bound01(h, 360) * 6;
+ s = bound01(s, 100);
+ v = bound01(v, 100);
+
+ var i = math.floor(h),
+ f = h - i,
+ p = v * (1 - s),
+ q = v * (1 - f * s),
+ t = v * (1 - (1 - f) * s),
+ mod = i % 6,
+ r = [v, q, p, p, t, v][mod],
+ g = [t, v, v, q, p, p][mod],
+ b = [p, p, t, v, v, q][mod];
+
+ return { r: r * 255, g: g * 255, b: b * 255 };
+ }
+
+ // `rgbToHex`
+ // Converts an RGB color to hex
+ // Assumes r, g, and b are contained in the set [0, 255]
+ // Returns a 3 or 6 character hex
+ function rgbToHex(r, g, b, allow3Char) {
+
+ var hex = [
+ pad2(mathRound(r).toString(16)),
+ pad2(mathRound(g).toString(16)),
+ pad2(mathRound(b).toString(16))
+ ];
+
+ // Return a 3 character hex if possible
+ if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
+ }
+
+ return hex.join("");
+ }
+ // `rgbaToHex`
+ // Converts an RGBA color plus alpha transparency to hex
+ // Assumes r, g, b and a are contained in the set [0, 255]
+ // Returns an 8 character hex
+ function rgbaToHex(r, g, b, a) {
+
+ var hex = [
+ pad2(convertDecimalToHex(a)),
+ pad2(mathRound(r).toString(16)),
+ pad2(mathRound(g).toString(16)),
+ pad2(mathRound(b).toString(16))
+ ];
+
+ return hex.join("");
+ }
+
+ // `equals`
+ // Can be called with any tinycolor input
+ tinycolor.equals = function (color1, color2) {
+ if (!color1 || !color2) { return false; }
+ return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
+ };
+ tinycolor.random = function() {
+ return tinycolor.fromRatio({
+ r: mathRandom(),
+ g: mathRandom(),
+ b: mathRandom()
+ });
+ };
+
+
+ // Modification Functions
+ // ----------------------
+ // Thanks to less.js for some of the basics here
+ //
+
+ function desaturate(color, amount) {
+ amount = (amount === 0) ? 0 : (amount || 10);
+ var hsl = tinycolor(color).toHsl();
+ hsl.s -= amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+ }
+
+ function saturate(color, amount) {
+ amount = (amount === 0) ? 0 : (amount || 10);
+ var hsl = tinycolor(color).toHsl();
+ hsl.s += amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+ }
+
+ function greyscale(color) {
+ return tinycolor(color).desaturate(100);
+ }
+
+ function lighten (color, amount) {
+ amount = (amount === 0) ? 0 : (amount || 10);
+ var hsl = tinycolor(color).toHsl();
+ hsl.l += amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+ }
+
+ function brighten(color, amount) {
+ amount = (amount === 0) ? 0 : (amount || 10);
+ var rgb = tinycolor(color).toRgb();
+ rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
+ rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
+ rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
+ return tinycolor(rgb);
+ }
+
+ function darken (color, amount) {
+ amount = (amount === 0) ? 0 : (amount || 10);
+ var hsl = tinycolor(color).toHsl();
+ hsl.l -= amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+ }
+
+ // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
+ // Values outside of this range will be wrapped into this range.
+ function spin(color, amount) {
+ var hsl = tinycolor(color).toHsl();
+ var hue = (mathRound(hsl.h) + amount) % 360;
+ hsl.h = hue < 0 ? 360 + hue : hue;
+ return tinycolor(hsl);
+ }
+
+ // Combination Functions
+ // ---------------------
+ // Thanks to jQuery xColor for some of the ideas behind these
+ //
+
+ function complement(color) {
+ var hsl = tinycolor(color).toHsl();
+ hsl.h = (hsl.h + 180) % 360;
+ return tinycolor(hsl);
+ }
+
+ function triad(color) {
+ var hsl = tinycolor(color).toHsl();
+ var h = hsl.h;
+ return [
+ tinycolor(color),
+ tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
+ tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
+ ];
+ }
+
+ function tetrad(color) {
+ var hsl = tinycolor(color).toHsl();
+ var h = hsl.h;
+ return [
+ tinycolor(color),
+ tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
+ tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
+ tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
+ ];
+ }
+
+ function splitcomplement(color) {
+ var hsl = tinycolor(color).toHsl();
+ var h = hsl.h;
+ return [
+ tinycolor(color),
+ tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
+ tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
+ ];
+ }
+
+ function analogous(color, results, slices) {
+ results = results || 6;
+ slices = slices || 30;
+
+ var hsl = tinycolor(color).toHsl();
+ var part = 360 / slices;
+ var ret = [tinycolor(color)];
+
+ for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
+ hsl.h = (hsl.h + part) % 360;
+ ret.push(tinycolor(hsl));
+ }
+ return ret;
+ }
+
+ function monochromatic(color, results) {
+ results = results || 6;
+ var hsv = tinycolor(color).toHsv();
+ var h = hsv.h, s = hsv.s, v = hsv.v;
+ var ret = [];
+ var modification = 1 / results;
+
+ while (results--) {
+ ret.push(tinycolor({ h: h, s: s, v: v}));
+ v = (v + modification) % 1;
+ }
+
+ return ret;
+ }
+
+ // Utility Functions
+ // ---------------------
+
+ tinycolor.mix = function(color1, color2, amount) {
+ amount = (amount === 0) ? 0 : (amount || 50);
+
+ var rgb1 = tinycolor(color1).toRgb();
+ var rgb2 = tinycolor(color2).toRgb();
+
+ var p = amount / 100;
+ var w = p * 2 - 1;
+ var a = rgb2.a - rgb1.a;
+
+ var w1;
+
+ if (w * a == -1) {
+ w1 = w;
+ } else {
+ w1 = (w + a) / (1 + w * a);
+ }
+
+ w1 = (w1 + 1) / 2;
+
+ var w2 = 1 - w1;
+
+ var rgba = {
+ r: rgb2.r * w1 + rgb1.r * w2,
+ g: rgb2.g * w1 + rgb1.g * w2,
+ b: rgb2.b * w1 + rgb1.b * w2,
+ a: rgb2.a * p + rgb1.a * (1 - p)
+ };
+
+ return tinycolor(rgba);
+ };
+
+
+ // Readability Functions
+ // ---------------------
+ //
+
+ // `readability`
+ // Analyze the 2 colors and returns an object with the following properties:
+ // `brightness`: difference in brightness between the two colors
+ // `color`: difference in color/hue between the two colors
+ tinycolor.readability = function(color1, color2) {
+ var c1 = tinycolor(color1);
+ var c2 = tinycolor(color2);
+ var rgb1 = c1.toRgb();
+ var rgb2 = c2.toRgb();
+ var brightnessA = c1.getBrightness();
+ var brightnessB = c2.getBrightness();
+ var colorDiff = (
+ Math.max(rgb1.r, rgb2.r) - Math.min(rgb1.r, rgb2.r) +
+ Math.max(rgb1.g, rgb2.g) - Math.min(rgb1.g, rgb2.g) +
+ Math.max(rgb1.b, rgb2.b) - Math.min(rgb1.b, rgb2.b)
+ );
+
+ return {
+ brightness: Math.abs(brightnessA - brightnessB),
+ color: colorDiff
+ };
+ };
+
+ // `readable`
+ // http://www.w3.org/TR/AERT#color-contrast
+ // Ensure that foreground and background color combinations provide sufficient contrast.
+ // *Example*
+ // tinycolor.isReadable("#000", "#111") => false
+ tinycolor.isReadable = function(color1, color2) {
+ var readability = tinycolor.readability(color1, color2);
+ return readability.brightness > 125 && readability.color > 500;
+ };
+
+ // `mostReadable`
+ // Given a base color and a list of possible foreground or background
+ // colors for that base, returns the most readable color.
+ // *Example*
+ // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000"
+ tinycolor.mostReadable = function(baseColor, colorList) {
+ var bestColor = null;
+ var bestScore = 0;
+ var bestIsReadable = false;
+ for (var i=0; i < colorList.length; i++) {
+
+ // We normalize both around the "acceptable" breaking point,
+ // but rank brightness constrast higher than hue.
+
+ var readability = tinycolor.readability(baseColor, colorList[i]);
+ var readable = readability.brightness > 125 && readability.color > 500;
+ var score = 3 * (readability.brightness / 125) + (readability.color / 500);
+
+ if ((readable && ! bestIsReadable) ||
+ (readable && bestIsReadable && score > bestScore) ||
+ ((! readable) && (! bestIsReadable) && score > bestScore)) {
+ bestIsReadable = readable;
+ bestScore = score;
+ bestColor = tinycolor(colorList[i]);
+ }
+ }
+ return bestColor;
+ };
+
+
+ // Big List of Colors
+ // ------------------
+ //
+ var names = tinycolor.names = {
+ aliceblue: "f0f8ff",
+ antiquewhite: "faebd7",
+ aqua: "0ff",
+ aquamarine: "7fffd4",
+ azure: "f0ffff",
+ beige: "f5f5dc",
+ bisque: "ffe4c4",
+ black: "000",
+ blanchedalmond: "ffebcd",
+ blue: "00f",
+ blueviolet: "8a2be2",
+ brown: "a52a2a",
+ burlywood: "deb887",
+ burntsienna: "ea7e5d",
+ cadetblue: "5f9ea0",
+ chartreuse: "7fff00",
+ chocolate: "d2691e",
+ coral: "ff7f50",
+ cornflowerblue: "6495ed",
+ cornsilk: "fff8dc",
+ crimson: "dc143c",
+ cyan: "0ff",
+ darkblue: "00008b",
+ darkcyan: "008b8b",
+ darkgoldenrod: "b8860b",
+ darkgray: "a9a9a9",
+ darkgreen: "006400",
+ darkgrey: "a9a9a9",
+ darkkhaki: "bdb76b",
+ darkmagenta: "8b008b",
+ darkolivegreen: "556b2f",
+ darkorange: "ff8c00",
+ darkorchid: "9932cc",
+ darkred: "8b0000",
+ darksalmon: "e9967a",
+ darkseagreen: "8fbc8f",
+ darkslateblue: "483d8b",
+ darkslategray: "2f4f4f",
+ darkslategrey: "2f4f4f",
+ darkturquoise: "00ced1",
+ darkviolet: "9400d3",
+ deeppink: "ff1493",
+ deepskyblue: "00bfff",
+ dimgray: "696969",
+ dimgrey: "696969",
+ dodgerblue: "1e90ff",
+ firebrick: "b22222",
+ floralwhite: "fffaf0",
+ forestgreen: "228b22",
+ fuchsia: "f0f",
+ gainsboro: "dcdcdc",
+ ghostwhite: "f8f8ff",
+ gold: "ffd700",
+ goldenrod: "daa520",
+ gray: "808080",
+ green: "008000",
+ greenyellow: "adff2f",
+ grey: "808080",
+ honeydew: "f0fff0",
+ hotpink: "ff69b4",
+ indianred: "cd5c5c",
+ indigo: "4b0082",
+ ivory: "fffff0",
+ khaki: "f0e68c",
+ lavender: "e6e6fa",
+ lavenderblush: "fff0f5",
+ lawngreen: "7cfc00",
+ lemonchiffon: "fffacd",
+ lightblue: "add8e6",
+ lightcoral: "f08080",
+ lightcyan: "e0ffff",
+ lightgoldenrodyellow: "fafad2",
+ lightgray: "d3d3d3",
+ lightgreen: "90ee90",
+ lightgrey: "d3d3d3",
+ lightpink: "ffb6c1",
+ lightsalmon: "ffa07a",
+ lightseagreen: "20b2aa",
+ lightskyblue: "87cefa",
+ lightslategray: "789",
+ lightslategrey: "789",
+ lightsteelblue: "b0c4de",
+ lightyellow: "ffffe0",
+ lime: "0f0",
+ limegreen: "32cd32",
+ linen: "faf0e6",
+ magenta: "f0f",
+ maroon: "800000",
+ mediumaquamarine: "66cdaa",
+ mediumblue: "0000cd",
+ mediumorchid: "ba55d3",
+ mediumpurple: "9370db",
+ mediumseagreen: "3cb371",
+ mediumslateblue: "7b68ee",
+ mediumspringgreen: "00fa9a",
+ mediumturquoise: "48d1cc",
+ mediumvioletred: "c71585",
+ midnightblue: "191970",
+ mintcream: "f5fffa",
+ mistyrose: "ffe4e1",
+ moccasin: "ffe4b5",
+ navajowhite: "ffdead",
+ navy: "000080",
+ oldlace: "fdf5e6",
+ olive: "808000",
+ olivedrab: "6b8e23",
+ orange: "ffa500",
+ orangered: "ff4500",
+ orchid: "da70d6",
+ palegoldenrod: "eee8aa",
+ palegreen: "98fb98",
+ paleturquoise: "afeeee",
+ palevioletred: "db7093",
+ papayawhip: "ffefd5",
+ peachpuff: "ffdab9",
+ peru: "cd853f",
+ pink: "ffc0cb",
+ plum: "dda0dd",
+ powderblue: "b0e0e6",
+ purple: "800080",
+ rebeccapurple: "663399",
+ red: "f00",
+ rosybrown: "bc8f8f",
+ royalblue: "4169e1",
+ saddlebrown: "8b4513",
+ salmon: "fa8072",
+ sandybrown: "f4a460",
+ seagreen: "2e8b57",
+ seashell: "fff5ee",
+ sienna: "a0522d",
+ silver: "c0c0c0",
+ skyblue: "87ceeb",
+ slateblue: "6a5acd",
+ slategray: "708090",
+ slategrey: "708090",
+ snow: "fffafa",
+ springgreen: "00ff7f",
+ steelblue: "4682b4",
+ tan: "d2b48c",
+ teal: "008080",
+ thistle: "d8bfd8",
+ tomato: "ff6347",
+ turquoise: "40e0d0",
+ violet: "ee82ee",
+ wheat: "f5deb3",
+ white: "fff",
+ whitesmoke: "f5f5f5",
+ yellow: "ff0",
+ yellowgreen: "9acd32"
+ };
+
+ // Make it easy to access colors via `hexNames[hex]`
+ var hexNames = tinycolor.hexNames = flip(names);
+
+
+ // Utilities
+ // ---------
+
+ // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
+ function flip(o) {
+ var flipped = { };
+ for (var i in o) {
+ if (o.hasOwnProperty(i)) {
+ flipped[o[i]] = i;
+ }
+ }
+ return flipped;
+ }
+
+ // Return a valid alpha value [0,1] with all invalid values being set to 1
+ function boundAlpha(a) {
+ a = parseFloat(a);
+
+ if (isNaN(a) || a < 0 || a > 1) {
+ a = 1;
+ }
+
+ return a;
+ }
+
+ // Take input from [0, n] and return it as [0, 1]
+ function bound01(n, max) {
+ if (isOnePointZero(n)) { n = "100%"; }
+
+ var processPercent = isPercentage(n);
+ n = mathMin(max, mathMax(0, parseFloat(n)));
+
+ // Automatically convert percentage into number
+ if (processPercent) {
+ n = parseInt(n * max, 10) / 100;
+ }
+
+ // Handle floating point rounding errors
+ if ((math.abs(n - max) < 0.000001)) {
+ return 1;
+ }
+
+ // Convert into [0, 1] range if it isn't already
+ return (n % max) / parseFloat(max);
+ }
+
+ // Force a number between 0 and 1
+ function clamp01(val) {
+ return mathMin(1, mathMax(0, val));
+ }
+
+ // Parse a base-16 hex value into a base-10 integer
+ function parseIntFromHex(val) {
+ return parseInt(val, 16);
+ }
+
+ // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
+ //
+ function isOnePointZero(n) {
+ return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
+ }
+
+ // Check to see if string passed in is a percentage
+ function isPercentage(n) {
+ return typeof n === "string" && n.indexOf('%') != -1;
+ }
+
+ // Force a hex value to have 2 characters
+ function pad2(c) {
+ return c.length == 1 ? '0' + c : '' + c;
+ }
+
+ // Replace a decimal with it's percentage value
+ function convertToPercentage(n) {
+ if (n <= 1) {
+ n = (n * 100) + "%";
+ }
+
+ return n;
+ }
+
+ // Converts a decimal to a hex value
+ function convertDecimalToHex(d) {
+ return Math.round(parseFloat(d) * 255).toString(16);
+ }
+ // Converts a hex value to a decimal
+ function convertHexToDecimal(h) {
+ return (parseIntFromHex(h) / 255);
+ }
+
+ var matchers = (function() {
+
+ //
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
+
+ //
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
+
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
+
+ // Actual matching.
+ // Parentheses and commas are optional, but not required.
+ // Whitespace can take the place of commas or opening paren
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+
+ return {
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
+ hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
+ hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
+ };
+ })();
+
+ // `stringInputToObject`
+ // Permissive string parsing. Take in a number of formats, and output an object
+ // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
+ function stringInputToObject(color) {
+
+ color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
+ var named = false;
+ if (names[color]) {
+ color = names[color];
+ named = true;
+ }
+ else if (color == 'transparent') {
+ return { r: 0, g: 0, b: 0, a: 0, format: "name" };
+ }
+
+ // Try to match string input using regular expressions.
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
+ // Just return an object and let the conversion functions handle that.
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
+ var match;
+ if ((match = matchers.rgb.exec(color))) {
+ return { r: match[1], g: match[2], b: match[3] };
+ }
+ if ((match = matchers.rgba.exec(color))) {
+ return { r: match[1], g: match[2], b: match[3], a: match[4] };
+ }
+ if ((match = matchers.hsl.exec(color))) {
+ return { h: match[1], s: match[2], l: match[3] };
+ }
+ if ((match = matchers.hsla.exec(color))) {
+ return { h: match[1], s: match[2], l: match[3], a: match[4] };
+ }
+ if ((match = matchers.hsv.exec(color))) {
+ return { h: match[1], s: match[2], v: match[3] };
+ }
+ if ((match = matchers.hsva.exec(color))) {
+ return { h: match[1], s: match[2], v: match[3], a: match[4] };
+ }
+ if ((match = matchers.hex8.exec(color))) {
+ return {
+ a: convertHexToDecimal(match[1]),
+ r: parseIntFromHex(match[2]),
+ g: parseIntFromHex(match[3]),
+ b: parseIntFromHex(match[4]),
+ format: named ? "name" : "hex8"
+ };
+ }
+ if ((match = matchers.hex6.exec(color))) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+ if ((match = matchers.hex3.exec(color))) {
+ return {
+ r: parseIntFromHex(match[1] + '' + match[1]),
+ g: parseIntFromHex(match[2] + '' + match[2]),
+ b: parseIntFromHex(match[3] + '' + match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+
+ return false;
+ }
+
+ window.tinycolor = tinycolor;
+ })();
+
+ $(function () {
+ if ($.fn.spectrum.load) {
+ $.fn.spectrum.processNativeColorInputs();
+ }
+ });
+
+});
diff --git a/vendor/assets/javascripts/tinycolor.js b/vendor/assets/javascripts/tinycolor.js
new file mode 100644
index 000000000..aad187399
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor.js
@@ -0,0 +1 @@
+//= require tinycolor/tinycolor.js
diff --git a/vendor/assets/javascripts/tinycolor/build.js b/vendor/assets/javascripts/tinycolor/build.js
new file mode 100644
index 000000000..13cac633d
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/build.js
@@ -0,0 +1,101 @@
+import { rollup } from "npm:rollup@3.13.0";
+import { minify } from "npm:terser@5.16.1";
+import { babel } from "npm:@rollup/plugin-babel@6.0.3";
+// This import is required for presetEnv to work:
+import _ from "https://esm.sh/@babel/core@7.20.12";
+import babelPresetEnv from "https://esm.sh/@babel/preset-env@7.20.2";
+
+let bundle = await rollup({
+ input: "mod.js",
+ plugins: [
+ babel({
+ babelHelpers: "bundled",
+ presets: [[babelPresetEnv]],
+ }),
+ ],
+});
+
+// Write legacy UMD files to tinycolor.js and dist/tinycolor-min.js.
+// It'd be nice to get rid of these, if we could ensure they aren't used.
+async function write_cdn_umd() {
+ let { output } = await bundle.generate({
+ format: "umd",
+ name: "tinycolor",
+ });
+ let minified = await minify(output[0].code);
+ const preamble = `// This file is autogenerated.
+// It's here at this path for backwards compatibility for links to it
+// but the npm package now exports both CJS and ESM.
+// See https://github.com/bgrins/TinyColor/ for instructions.
+ `;
+ Deno.writeTextFileSync("npm/tinycolor.js", preamble + output[0].code);
+ Deno.writeTextFileSync("npm/dist/tinycolor-min.js", preamble + minified.code);
+
+ // Keeping these (without preamble) until we can confirm they aren't used by CDNs
+ // after moving to the npm/ path. At that point these files can be removed in
+ // https://github.com/bgrins/TinyColor/issues/260.
+ Deno.writeTextFileSync("tinycolor.js", output[0].code);
+ Deno.writeTextFileSync("dist/tinycolor-min.js", minified.code);
+}
+
+// Write necessary files for testing & publishing commonjs to npm.
+// The subdirectory sets { "type": "commonjs" } in the package.json,
+// and includes a lightweight test runner to ensure it works like mod.js.
+async function write_npm_cjs() {
+ let { output } = await bundle.generate({
+ format: "umd",
+ name: "tinycolor",
+ });
+
+ Deno.writeTextFileSync(
+ "./npm/cjs/tinycolor.js",
+ `// This file is autogenerated. It's used to publish CJS to npm.
+` + output[0].code
+ );
+ const test_template = Deno.readTextFileSync("./npm/cjs/test_template.js");
+ const test_content = Deno.readTextFileSync("test.js");
+ Deno.writeTextFileSync(
+ "./npm/cjs/test.js",
+ test_template.replace(
+ "// CONTENT_GOES_HERE",
+ test_content.substring(
+ test_content.indexOf("// TEST_BEGINS_HERE"),
+ test_content.length - 1
+ )
+ )
+ );
+}
+
+// Write necessary files for testing & publishing esm to npm.
+// The subdirectory sets { "type": "module" } in the package.json,
+// and includes a lightweight test runner to ensure it works like mod.js.
+async function write_npm_esm() {
+ let { output } = await bundle.generate({
+ format: "esm",
+ });
+
+ Deno.writeTextFileSync(
+ "./npm/esm/tinycolor.js",
+ `// This file is autogenerated. It's used to publish ESM to npm.
+` + output[0].code
+ );
+ const test_template = Deno.readTextFileSync("./npm/esm/test_template.js");
+ const test_content = Deno.readTextFileSync("test.js");
+ Deno.writeTextFileSync(
+ "./npm/esm/test.js",
+ test_template.replace(
+ "// CONTENT_GOES_HERE",
+ test_content.substring(
+ test_content.indexOf("// TEST_BEGINS_HERE"),
+ test_content.length - 1
+ )
+ )
+ );
+}
+
+await write_cdn_umd();
+await write_npm_cjs();
+await write_npm_esm();
+
+await Deno.copyFile("README.md", "npm/README.md");
+await Deno.copyFile("LICENSE", "npm/LICENSE");
diff --git a/vendor/assets/javascripts/tinycolor/dist/tinycolor-min.js b/vendor/assets/javascripts/tinycolor/dist/tinycolor-min.js
new file mode 100644
index 000000000..6af34fca5
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/dist/tinycolor-min.js
@@ -0,0 +1 @@
+!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).tinycolor=r()}(this,(function(){"use strict";function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}var r=/^\s+/,e=/\s+$/;function n(a,i){if(i=i||{},(a=a||"")instanceof n)return a;if(!(this instanceof n))return new n(a,i);var o=function(n){var a={r:0,g:0,b:0},i=1,o=null,h=null,s=null,f=!1,u=!1;"string"==typeof n&&(n=function(t){t=t.replace(r,"").replace(e,"").toLowerCase();var n,a=!1;if(y[t])t=y[t],a=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(n=T.rgb.exec(t))return{r:n[1],g:n[2],b:n[3]};if(n=T.rgba.exec(t))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=T.hsl.exec(t))return{h:n[1],s:n[2],l:n[3]};if(n=T.hsla.exec(t))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=T.hsv.exec(t))return{h:n[1],s:n[2],v:n[3]};if(n=T.hsva.exec(t))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=T.hex8.exec(t))return{r:w(n[1]),g:w(n[2]),b:w(n[3]),a:F(n[4]),format:a?"name":"hex8"};if(n=T.hex6.exec(t))return{r:w(n[1]),g:w(n[2]),b:w(n[3]),format:a?"name":"hex"};if(n=T.hex4.exec(t))return{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),a:F(n[4]+""+n[4]),format:a?"name":"hex8"};if(n=T.hex3.exec(t))return{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),format:a?"name":"hex"};return!1}(n));"object"==t(n)&&(E(n.r)&&E(n.g)&&E(n.b)?(l=n.r,c=n.g,d=n.b,a={r:255*A(l,255),g:255*A(c,255),b:255*A(d,255)},f=!0,u="%"===String(n.r).substr(-1)?"prgb":"rgb"):E(n.h)&&E(n.s)&&E(n.v)?(o=H(n.s),h=H(n.v),a=function(t,r,e){t=6*A(t,360),r=A(r,100),e=A(e,100);var n=Math.floor(t),a=t-n,i=e*(1-r),o=e*(1-a*r),h=e*(1-(1-a)*r),s=n%6,f=[e,o,i,i,h,e][s],u=[h,e,e,o,i,i][s],l=[i,i,h,e,e,o][s];return{r:255*f,g:255*u,b:255*l}}(n.h,o,h),f=!0,u="hsv"):E(n.h)&&E(n.s)&&E(n.l)&&(o=H(n.s),s=H(n.l),a=function(t,r,e){var n,a,i;function o(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(r-t)*e:e<.5?r:e<2/3?t+(r-t)*(2/3-e)*6:t}if(t=A(t,360),r=A(r,100),e=A(e,100),0===r)n=a=i=e;else{var h=e<.5?e*(1+r):e+r-e*r,s=2*e-h;n=o(s,h,t+1/3),a=o(s,h,t),i=o(s,h,t-1/3)}return{r:255*n,g:255*a,b:255*i}}(n.h,o,s),f=!0,u="hsl"),n.hasOwnProperty("a")&&(i=n.a));var l,c,d;return i=x(i),{ok:f,format:n.format||u,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:i}}(a);this._originalInput=a,this._r=o.r,this._g=o.g,this._b=o.b,this._a=o.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||o.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=o.ok}function a(t,r,e){t=A(t,255),r=A(r,255),e=A(e,255);var n,a,i=Math.max(t,r,e),o=Math.min(t,r,e),h=(i+o)/2;if(i==o)n=a=0;else{var s=i-o;switch(a=h>.5?s/(2-i-o):s/(i+o),i){case t:n=(r-e)/s+(r>1)+720)%360;--r;)a.h=(a.h+i)%360,o.push(n(a));return o}function v(t,r){r=r||6;for(var e=n(t).toHsv(),a=e.h,i=e.s,o=e.v,h=[],s=1/r;r--;)h.push(n({h:a,s:i,v:o})),o=(o+s)%1;return h}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,e,n=this.toRgb();return t=n.r/255,r=n.g/255,e=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))},setAlpha:function(t){return this._a=x(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+r+", "+e+"%, "+n+"%)":"hsva("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=a(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=a(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+r+", "+e+"%, "+n+"%)":"hsla("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return o(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,r,e,n,a){var i=[S(Math.round(t).toString(16)),S(Math.round(r).toString(16)),S(Math.round(e).toString(16)),S(R(n))];if(a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*A(this._r,255))+"%",g:Math.round(100*A(this._g,255))+"%",b:Math.round(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%)":"rgba("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[o(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var r="#"+h(this._r,this._g,this._b,this._a),e=r,a=this._gradientType?"GradientType = 1, ":"";if(t){var i=n(t);e="#"+h(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+e+")"},toString:function(t){var r=!!t;t=t||this._format;var e=!1,n=this._a<1&&this._a>=0;return r||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,r){var e=t.apply(null,[this].concat([].slice.call(r)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(f,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(v,arguments)},splitcomplement:function(){return this._applyCombination(p,arguments)},triad:function(){return this._applyCombination(m,[3])},tetrad:function(){return this._applyCombination(m,[4])}},n.fromRatio=function(r,e){if("object"==t(r)){var a={};for(var i in r)r.hasOwnProperty(i)&&(a[i]="a"===i?r[i]:H(r[i]));r=a}return n(r,e)},n.equals=function(t,r){return!(!t||!r)&&n(t).toRgbString()==n(r).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},n.mix=function(t,r,e){e=0===e?0:e||50;var a=n(t).toRgb(),i=n(r).toRgb(),o=e/100;return n({r:(i.r-a.r)*o+a.r,g:(i.g-a.g)*o+a.g,b:(i.b-a.b)*o+a.b,a:(i.a-a.a)*o+a.a})},n.readability=function(t,r){var e=n(t),a=n(r);return(Math.max(e.getLuminance(),a.getLuminance())+.05)/(Math.min(e.getLuminance(),a.getLuminance())+.05)},n.isReadable=function(t,r,e){var a,i,o=n.readability(t,r);switch(i=!1,(a=function(t){var r,e;r=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(t.size||"small").toLowerCase(),"AA"!==r&&"AAA"!==r&&(r="AA");"small"!==e&&"large"!==e&&(e="small");return{level:r,size:e}}(e)).level+a.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},n.mostReadable=function(t,r,e){var a,i,o,h,s=null,f=0;i=(e=e||{}).includeFallbackColors,o=e.level,h=e.size;for(var u=0;uf&&(f=a,s=n(r[u]));return n.isReadable(t,s,{level:o,size:h})||!i?s:(e.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],e))};var y=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=n.hexNames=function(t){var r={};for(var e in t)t.hasOwnProperty(e)&&(r[t[e]]=e);return r}(y);function x(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function A(t,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var e=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(r,Math.max(0,parseFloat(t))),e&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function k(t){return Math.min(1,Math.max(0,t))}function w(t){return parseInt(t,16)}function S(t){return 1==t.length?"0"+t:""+t}function H(t){return t<=1&&(t=100*t+"%"),t}function R(t){return Math.round(255*parseFloat(t)).toString(16)}function F(t){return w(t)/255}var C,q,N,T=(q="[\\s|\\(]+("+(C="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?",N="[\\s|\\(]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?",{CSS_UNIT:new RegExp(C),rgb:new RegExp("rgb"+q),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+q),hsva:new RegExp("hsva"+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function E(t){return!!T.CSS_UNIT.exec(t)}return n}));
\ No newline at end of file
diff --git a/vendor/assets/javascripts/tinycolor/mod.js b/vendor/assets/javascripts/tinycolor/mod.js
new file mode 100644
index 000000000..be6b38252
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/mod.js
@@ -0,0 +1,1275 @@
+// https://github.com/bgrins/TinyColor
+// Brian Grinstead, MIT License
+
+const trimLeft = /^\s+/;
+const trimRight = /\s+$/;
+
+export default function tinycolor(color, opts) {
+ color = color ? color : "";
+ opts = opts || {};
+
+ // If input is already a tinycolor, return itself
+ if (color instanceof tinycolor) {
+ return color;
+ }
+ // If we are called as a function, call using new instead
+ if (!(this instanceof tinycolor)) {
+ return new tinycolor(color, opts);
+ }
+
+ var rgb = inputToRGB(color);
+ (this._originalInput = color),
+ (this._r = rgb.r),
+ (this._g = rgb.g),
+ (this._b = rgb.b),
+ (this._a = rgb.a),
+ (this._roundA = Math.round(100 * this._a) / 100),
+ (this._format = opts.format || rgb.format);
+ this._gradientType = opts.gradientType;
+
+ // Don't let the range of [0,255] come back in [0,1].
+ // Potentially lose a little bit of precision here, but will fix issues where
+ // .5 gets interpreted as half of the total, instead of half of 1
+ // If it was supposed to be 128, this was already taken care of by `inputToRgb`
+ if (this._r < 1) this._r = Math.round(this._r);
+ if (this._g < 1) this._g = Math.round(this._g);
+ if (this._b < 1) this._b = Math.round(this._b);
+
+ this._ok = rgb.ok;
+}
+
+tinycolor.prototype = {
+ isDark: function () {
+ return this.getBrightness() < 128;
+ },
+ isLight: function () {
+ return !this.isDark();
+ },
+ isValid: function () {
+ return this._ok;
+ },
+ getOriginalInput: function () {
+ return this._originalInput;
+ },
+ getFormat: function () {
+ return this._format;
+ },
+ getAlpha: function () {
+ return this._a;
+ },
+ getBrightness: function () {
+ //http://www.w3.org/TR/AERT#color-contrast
+ var rgb = this.toRgb();
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
+ },
+ getLuminance: function () {
+ //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
+ var rgb = this.toRgb();
+ var RsRGB, GsRGB, BsRGB, R, G, B;
+ RsRGB = rgb.r / 255;
+ GsRGB = rgb.g / 255;
+ BsRGB = rgb.b / 255;
+
+ if (RsRGB <= 0.03928) R = RsRGB / 12.92;
+ else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
+ if (GsRGB <= 0.03928) G = GsRGB / 12.92;
+ else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
+ if (BsRGB <= 0.03928) B = BsRGB / 12.92;
+ else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
+ return 0.2126 * R + 0.7152 * G + 0.0722 * B;
+ },
+ setAlpha: function (value) {
+ this._a = boundAlpha(value);
+ this._roundA = Math.round(100 * this._a) / 100;
+ return this;
+ },
+ toHsv: function () {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
+ },
+ toHsvString: function () {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ var h = Math.round(hsv.h * 360),
+ s = Math.round(hsv.s * 100),
+ v = Math.round(hsv.v * 100);
+ return this._a == 1
+ ? "hsv(" + h + ", " + s + "%, " + v + "%)"
+ : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
+ },
+ toHsl: function () {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
+ },
+ toHslString: function () {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ var h = Math.round(hsl.h * 360),
+ s = Math.round(hsl.s * 100),
+ l = Math.round(hsl.l * 100);
+ return this._a == 1
+ ? "hsl(" + h + ", " + s + "%, " + l + "%)"
+ : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
+ },
+ toHex: function (allow3Char) {
+ return rgbToHex(this._r, this._g, this._b, allow3Char);
+ },
+ toHexString: function (allow3Char) {
+ return "#" + this.toHex(allow3Char);
+ },
+ toHex8: function (allow4Char) {
+ return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
+ },
+ toHex8String: function (allow4Char) {
+ return "#" + this.toHex8(allow4Char);
+ },
+ toRgb: function () {
+ return {
+ r: Math.round(this._r),
+ g: Math.round(this._g),
+ b: Math.round(this._b),
+ a: this._a,
+ };
+ },
+ toRgbString: function () {
+ return this._a == 1
+ ? "rgb(" +
+ Math.round(this._r) +
+ ", " +
+ Math.round(this._g) +
+ ", " +
+ Math.round(this._b) +
+ ")"
+ : "rgba(" +
+ Math.round(this._r) +
+ ", " +
+ Math.round(this._g) +
+ ", " +
+ Math.round(this._b) +
+ ", " +
+ this._roundA +
+ ")";
+ },
+ toPercentageRgb: function () {
+ return {
+ r: Math.round(bound01(this._r, 255) * 100) + "%",
+ g: Math.round(bound01(this._g, 255) * 100) + "%",
+ b: Math.round(bound01(this._b, 255) * 100) + "%",
+ a: this._a,
+ };
+ },
+ toPercentageRgbString: function () {
+ return this._a == 1
+ ? "rgb(" +
+ Math.round(bound01(this._r, 255) * 100) +
+ "%, " +
+ Math.round(bound01(this._g, 255) * 100) +
+ "%, " +
+ Math.round(bound01(this._b, 255) * 100) +
+ "%)"
+ : "rgba(" +
+ Math.round(bound01(this._r, 255) * 100) +
+ "%, " +
+ Math.round(bound01(this._g, 255) * 100) +
+ "%, " +
+ Math.round(bound01(this._b, 255) * 100) +
+ "%, " +
+ this._roundA +
+ ")";
+ },
+ toName: function () {
+ if (this._a === 0) {
+ return "transparent";
+ }
+
+ if (this._a < 1) {
+ return false;
+ }
+
+ return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
+ },
+ toFilter: function (secondColor) {
+ var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
+ var secondHex8String = hex8String;
+ var gradientType = this._gradientType ? "GradientType = 1, " : "";
+
+ if (secondColor) {
+ var s = tinycolor(secondColor);
+ secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
+ }
+
+ return (
+ "progid:DXImageTransform.Microsoft.gradient(" +
+ gradientType +
+ "startColorstr=" +
+ hex8String +
+ ",endColorstr=" +
+ secondHex8String +
+ ")"
+ );
+ },
+ toString: function (format) {
+ var formatSet = !!format;
+ format = format || this._format;
+
+ var formattedString = false;
+ var hasAlpha = this._a < 1 && this._a >= 0;
+ var needsAlphaFormat =
+ !formatSet &&
+ hasAlpha &&
+ (format === "hex" ||
+ format === "hex6" ||
+ format === "hex3" ||
+ format === "hex4" ||
+ format === "hex8" ||
+ format === "name");
+
+ if (needsAlphaFormat) {
+ // Special case for "transparent", all other non-alpha formats
+ // will return rgba when there is transparency.
+ if (format === "name" && this._a === 0) {
+ return this.toName();
+ }
+ return this.toRgbString();
+ }
+ if (format === "rgb") {
+ formattedString = this.toRgbString();
+ }
+ if (format === "prgb") {
+ formattedString = this.toPercentageRgbString();
+ }
+ if (format === "hex" || format === "hex6") {
+ formattedString = this.toHexString();
+ }
+ if (format === "hex3") {
+ formattedString = this.toHexString(true);
+ }
+ if (format === "hex4") {
+ formattedString = this.toHex8String(true);
+ }
+ if (format === "hex8") {
+ formattedString = this.toHex8String();
+ }
+ if (format === "name") {
+ formattedString = this.toName();
+ }
+ if (format === "hsl") {
+ formattedString = this.toHslString();
+ }
+ if (format === "hsv") {
+ formattedString = this.toHsvString();
+ }
+
+ return formattedString || this.toHexString();
+ },
+ clone: function () {
+ return tinycolor(this.toString());
+ },
+
+ _applyModification: function (fn, args) {
+ var color = fn.apply(null, [this].concat([].slice.call(args)));
+ this._r = color._r;
+ this._g = color._g;
+ this._b = color._b;
+ this.setAlpha(color._a);
+ return this;
+ },
+ lighten: function () {
+ return this._applyModification(lighten, arguments);
+ },
+ brighten: function () {
+ return this._applyModification(brighten, arguments);
+ },
+ darken: function () {
+ return this._applyModification(darken, arguments);
+ },
+ desaturate: function () {
+ return this._applyModification(desaturate, arguments);
+ },
+ saturate: function () {
+ return this._applyModification(saturate, arguments);
+ },
+ greyscale: function () {
+ return this._applyModification(greyscale, arguments);
+ },
+ spin: function () {
+ return this._applyModification(spin, arguments);
+ },
+
+ _applyCombination: function (fn, args) {
+ return fn.apply(null, [this].concat([].slice.call(args)));
+ },
+ analogous: function () {
+ return this._applyCombination(analogous, arguments);
+ },
+ complement: function () {
+ return this._applyCombination(complement, arguments);
+ },
+ monochromatic: function () {
+ return this._applyCombination(monochromatic, arguments);
+ },
+ splitcomplement: function () {
+ return this._applyCombination(splitcomplement, arguments);
+ },
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
+ // polyad: function (number) {
+ // return this._applyCombination(polyad, [number]);
+ // },
+ triad: function () {
+ return this._applyCombination(polyad, [3]);
+ },
+ tetrad: function () {
+ return this._applyCombination(polyad, [4]);
+ },
+};
+
+// If input is an object, force 1 into "1.0" to handle ratios properly
+// String input requires "1.0" as input, so 1 will be treated as 1
+tinycolor.fromRatio = function (color, opts) {
+ if (typeof color == "object") {
+ var newColor = {};
+ for (var i in color) {
+ if (color.hasOwnProperty(i)) {
+ if (i === "a") {
+ newColor[i] = color[i];
+ } else {
+ newColor[i] = convertToPercentage(color[i]);
+ }
+ }
+ }
+ color = newColor;
+ }
+
+ return tinycolor(color, opts);
+};
+
+// Given a string or object, convert that input to RGB
+// Possible string inputs:
+//
+// "red"
+// "#f00" or "f00"
+// "#ff0000" or "ff0000"
+// "#ff000000" or "ff000000"
+// "rgb 255 0 0" or "rgb (255, 0, 0)"
+// "rgb 1.0 0 0" or "rgb (1, 0, 0)"
+// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
+// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
+// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
+// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
+// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
+//
+function inputToRGB(color) {
+ var rgb = { r: 0, g: 0, b: 0 };
+ var a = 1;
+ var s = null;
+ var v = null;
+ var l = null;
+ var ok = false;
+ var format = false;
+
+ if (typeof color == "string") {
+ color = stringInputToObject(color);
+ }
+
+ if (typeof color == "object") {
+ if (
+ isValidCSSUnit(color.r) &&
+ isValidCSSUnit(color.g) &&
+ isValidCSSUnit(color.b)
+ ) {
+ rgb = rgbToRgb(color.r, color.g, color.b);
+ ok = true;
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
+ } else if (
+ isValidCSSUnit(color.h) &&
+ isValidCSSUnit(color.s) &&
+ isValidCSSUnit(color.v)
+ ) {
+ s = convertToPercentage(color.s);
+ v = convertToPercentage(color.v);
+ rgb = hsvToRgb(color.h, s, v);
+ ok = true;
+ format = "hsv";
+ } else if (
+ isValidCSSUnit(color.h) &&
+ isValidCSSUnit(color.s) &&
+ isValidCSSUnit(color.l)
+ ) {
+ s = convertToPercentage(color.s);
+ l = convertToPercentage(color.l);
+ rgb = hslToRgb(color.h, s, l);
+ ok = true;
+ format = "hsl";
+ }
+
+ if (color.hasOwnProperty("a")) {
+ a = color.a;
+ }
+ }
+
+ a = boundAlpha(a);
+
+ return {
+ ok: ok,
+ format: color.format || format,
+ r: Math.min(255, Math.max(rgb.r, 0)),
+ g: Math.min(255, Math.max(rgb.g, 0)),
+ b: Math.min(255, Math.max(rgb.b, 0)),
+ a: a,
+ };
+}
+
+// Conversion Functions
+// --------------------
+
+// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
+//
+
+// `rgbToRgb`
+// Handle bounds / percentage checking to conform to CSS color spec
+//
+// *Assumes:* r, g, b in [0, 255] or [0, 1]
+// *Returns:* { r, g, b } in [0, 255]
+function rgbToRgb(r, g, b) {
+ return {
+ r: bound01(r, 255) * 255,
+ g: bound01(g, 255) * 255,
+ b: bound01(b, 255) * 255,
+ };
+}
+
+// `rgbToHsl`
+// Converts an RGB color value to HSL.
+// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
+// *Returns:* { h, s, l } in [0,1]
+function rgbToHsl(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ l = (max + min) / 2;
+
+ if (max == min) {
+ h = s = 0; // achromatic
+ } else {
+ var d = max - min;
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+
+ h /= 6;
+ }
+
+ return { h: h, s: s, l: l };
+}
+
+// `hslToRgb`
+// Converts an HSL color value to RGB.
+// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
+// *Returns:* { r, g, b } in the set [0, 255]
+function hslToRgb(h, s, l) {
+ var r, g, b;
+
+ h = bound01(h, 360);
+ s = bound01(s, 100);
+ l = bound01(l, 100);
+
+ function hue2rgb(p, q, t) {
+ if (t < 0) t += 1;
+ if (t > 1) t -= 1;
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
+ if (t < 1 / 2) return q;
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+ return p;
+ }
+
+ if (s === 0) {
+ r = g = b = l; // achromatic
+ } else {
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+ var p = 2 * l - q;
+ r = hue2rgb(p, q, h + 1 / 3);
+ g = hue2rgb(p, q, h);
+ b = hue2rgb(p, q, h - 1 / 3);
+ }
+
+ return { r: r * 255, g: g * 255, b: b * 255 };
+}
+
+// `rgbToHsv`
+// Converts an RGB color value to HSV
+// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
+// *Returns:* { h, s, v } in [0,1]
+function rgbToHsv(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ v = max;
+
+ var d = max - min;
+ s = max === 0 ? 0 : d / max;
+
+ if (max == min) {
+ h = 0; // achromatic
+ } else {
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+ h /= 6;
+ }
+ return { h: h, s: s, v: v };
+}
+
+// `hsvToRgb`
+// Converts an HSV color value to RGB.
+// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
+// *Returns:* { r, g, b } in the set [0, 255]
+function hsvToRgb(h, s, v) {
+ h = bound01(h, 360) * 6;
+ s = bound01(s, 100);
+ v = bound01(v, 100);
+
+ var i = Math.floor(h),
+ f = h - i,
+ p = v * (1 - s),
+ q = v * (1 - f * s),
+ t = v * (1 - (1 - f) * s),
+ mod = i % 6,
+ r = [v, q, p, p, t, v][mod],
+ g = [t, v, v, q, p, p][mod],
+ b = [p, p, t, v, v, q][mod];
+
+ return { r: r * 255, g: g * 255, b: b * 255 };
+}
+
+// `rgbToHex`
+// Converts an RGB color to hex
+// Assumes r, g, and b are contained in the set [0, 255]
+// Returns a 3 or 6 character hex
+function rgbToHex(r, g, b, allow3Char) {
+ var hex = [
+ pad2(Math.round(r).toString(16)),
+ pad2(Math.round(g).toString(16)),
+ pad2(Math.round(b).toString(16)),
+ ];
+
+ // Return a 3 character hex if possible
+ if (
+ allow3Char &&
+ hex[0].charAt(0) == hex[0].charAt(1) &&
+ hex[1].charAt(0) == hex[1].charAt(1) &&
+ hex[2].charAt(0) == hex[2].charAt(1)
+ ) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
+ }
+
+ return hex.join("");
+}
+
+// `rgbaToHex`
+// Converts an RGBA color plus alpha transparency to hex
+// Assumes r, g, b are contained in the set [0, 255] and
+// a in [0, 1]. Returns a 4 or 8 character rgba hex
+function rgbaToHex(r, g, b, a, allow4Char) {
+ var hex = [
+ pad2(Math.round(r).toString(16)),
+ pad2(Math.round(g).toString(16)),
+ pad2(Math.round(b).toString(16)),
+ pad2(convertDecimalToHex(a)),
+ ];
+
+ // Return a 4 character hex if possible
+ if (
+ allow4Char &&
+ hex[0].charAt(0) == hex[0].charAt(1) &&
+ hex[1].charAt(0) == hex[1].charAt(1) &&
+ hex[2].charAt(0) == hex[2].charAt(1) &&
+ hex[3].charAt(0) == hex[3].charAt(1)
+ ) {
+ return (
+ hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0)
+ );
+ }
+
+ return hex.join("");
+}
+
+// `rgbaToArgbHex`
+// Converts an RGBA color to an ARGB Hex8 string
+// Rarely used, but required for "toFilter()"
+function rgbaToArgbHex(r, g, b, a) {
+ var hex = [
+ pad2(convertDecimalToHex(a)),
+ pad2(Math.round(r).toString(16)),
+ pad2(Math.round(g).toString(16)),
+ pad2(Math.round(b).toString(16)),
+ ];
+
+ return hex.join("");
+}
+
+// `equals`
+// Can be called with any tinycolor input
+tinycolor.equals = function (color1, color2) {
+ if (!color1 || !color2) return false;
+ return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
+};
+
+tinycolor.random = function () {
+ return tinycolor.fromRatio({
+ r: Math.random(),
+ g: Math.random(),
+ b: Math.random(),
+ });
+};
+
+// Modification Functions
+// ----------------------
+// Thanks to less.js for some of the basics here
+//
+
+function desaturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s -= amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+}
+
+function saturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s += amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+}
+
+function greyscale(color) {
+ return tinycolor(color).desaturate(100);
+}
+
+function lighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l += amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+}
+
+function brighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var rgb = tinycolor(color).toRgb();
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
+ return tinycolor(rgb);
+}
+
+function darken(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l -= amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+}
+
+// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
+// Values outside of this range will be wrapped into this range.
+function spin(color, amount) {
+ var hsl = tinycolor(color).toHsl();
+ var hue = (hsl.h + amount) % 360;
+ hsl.h = hue < 0 ? 360 + hue : hue;
+ return tinycolor(hsl);
+}
+
+// Combination Functions
+// ---------------------
+// Thanks to jQuery xColor for some of the ideas behind these
+//
+
+function complement(color) {
+ var hsl = tinycolor(color).toHsl();
+ hsl.h = (hsl.h + 180) % 360;
+ return tinycolor(hsl);
+}
+
+function polyad(color, number) {
+ if (isNaN(number) || number <= 0) {
+ throw new Error("Argument to polyad must be a positive number");
+ }
+ var hsl = tinycolor(color).toHsl();
+ var result = [tinycolor(color)];
+ var step = 360 / number;
+ for (var i = 1; i < number; i++) {
+ result.push(tinycolor({ h: (hsl.h + i * step) % 360, s: hsl.s, l: hsl.l }));
+ }
+
+ return result;
+}
+
+function splitcomplement(color) {
+ var hsl = tinycolor(color).toHsl();
+ var h = hsl.h;
+ return [
+ tinycolor(color),
+ tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),
+ tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),
+ ];
+}
+
+function analogous(color, results, slices) {
+ results = results || 6;
+ slices = slices || 30;
+
+ var hsl = tinycolor(color).toHsl();
+ var part = 360 / slices;
+ var ret = [tinycolor(color)];
+
+ for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) {
+ hsl.h = (hsl.h + part) % 360;
+ ret.push(tinycolor(hsl));
+ }
+ return ret;
+}
+
+function monochromatic(color, results) {
+ results = results || 6;
+ var hsv = tinycolor(color).toHsv();
+ var h = hsv.h,
+ s = hsv.s,
+ v = hsv.v;
+ var ret = [];
+ var modification = 1 / results;
+
+ while (results--) {
+ ret.push(tinycolor({ h: h, s: s, v: v }));
+ v = (v + modification) % 1;
+ }
+
+ return ret;
+}
+
+// Utility Functions
+// ---------------------
+
+tinycolor.mix = function (color1, color2, amount) {
+ amount = amount === 0 ? 0 : amount || 50;
+
+ var rgb1 = tinycolor(color1).toRgb();
+ var rgb2 = tinycolor(color2).toRgb();
+
+ var p = amount / 100;
+
+ var rgba = {
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
+ a: (rgb2.a - rgb1.a) * p + rgb1.a,
+ };
+
+ return tinycolor(rgba);
+};
+
+// Readability Functions
+// ---------------------
+// false
+// tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
+tinycolor.isReadable = function (color1, color2, wcag2) {
+ var readability = tinycolor.readability(color1, color2);
+ var wcag2Parms, out;
+
+ out = false;
+
+ wcag2Parms = validateWCAG2Parms(wcag2);
+ switch (wcag2Parms.level + wcag2Parms.size) {
+ case "AAsmall":
+ case "AAAlarge":
+ out = readability >= 4.5;
+ break;
+ case "AAlarge":
+ out = readability >= 3;
+ break;
+ case "AAAsmall":
+ out = readability >= 7;
+ break;
+ }
+ return out;
+};
+
+// `mostReadable`
+// Given a base color and a list of possible foreground or background
+// colors for that base, returns the most readable color.
+// Optionally returns Black or White if the most readable color is unreadable.
+// *Example*
+// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
+// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
+// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
+// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
+tinycolor.mostReadable = function (baseColor, colorList, args) {
+ var bestColor = null;
+ var bestScore = 0;
+ var readability;
+ var includeFallbackColors, level, size;
+ args = args || {};
+ includeFallbackColors = args.includeFallbackColors;
+ level = args.level;
+ size = args.size;
+
+ for (var i = 0; i < colorList.length; i++) {
+ readability = tinycolor.readability(baseColor, colorList[i]);
+ if (readability > bestScore) {
+ bestScore = readability;
+ bestColor = tinycolor(colorList[i]);
+ }
+ }
+
+ if (
+ tinycolor.isReadable(baseColor, bestColor, {
+ level: level,
+ size: size,
+ }) ||
+ !includeFallbackColors
+ ) {
+ return bestColor;
+ } else {
+ args.includeFallbackColors = false;
+ return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
+ }
+};
+
+// Big List of Colors
+// ------------------
+//
+var names = (tinycolor.names = {
+ aliceblue: "f0f8ff",
+ antiquewhite: "faebd7",
+ aqua: "0ff",
+ aquamarine: "7fffd4",
+ azure: "f0ffff",
+ beige: "f5f5dc",
+ bisque: "ffe4c4",
+ black: "000",
+ blanchedalmond: "ffebcd",
+ blue: "00f",
+ blueviolet: "8a2be2",
+ brown: "a52a2a",
+ burlywood: "deb887",
+ burntsienna: "ea7e5d",
+ cadetblue: "5f9ea0",
+ chartreuse: "7fff00",
+ chocolate: "d2691e",
+ coral: "ff7f50",
+ cornflowerblue: "6495ed",
+ cornsilk: "fff8dc",
+ crimson: "dc143c",
+ cyan: "0ff",
+ darkblue: "00008b",
+ darkcyan: "008b8b",
+ darkgoldenrod: "b8860b",
+ darkgray: "a9a9a9",
+ darkgreen: "006400",
+ darkgrey: "a9a9a9",
+ darkkhaki: "bdb76b",
+ darkmagenta: "8b008b",
+ darkolivegreen: "556b2f",
+ darkorange: "ff8c00",
+ darkorchid: "9932cc",
+ darkred: "8b0000",
+ darksalmon: "e9967a",
+ darkseagreen: "8fbc8f",
+ darkslateblue: "483d8b",
+ darkslategray: "2f4f4f",
+ darkslategrey: "2f4f4f",
+ darkturquoise: "00ced1",
+ darkviolet: "9400d3",
+ deeppink: "ff1493",
+ deepskyblue: "00bfff",
+ dimgray: "696969",
+ dimgrey: "696969",
+ dodgerblue: "1e90ff",
+ firebrick: "b22222",
+ floralwhite: "fffaf0",
+ forestgreen: "228b22",
+ fuchsia: "f0f",
+ gainsboro: "dcdcdc",
+ ghostwhite: "f8f8ff",
+ gold: "ffd700",
+ goldenrod: "daa520",
+ gray: "808080",
+ green: "008000",
+ greenyellow: "adff2f",
+ grey: "808080",
+ honeydew: "f0fff0",
+ hotpink: "ff69b4",
+ indianred: "cd5c5c",
+ indigo: "4b0082",
+ ivory: "fffff0",
+ khaki: "f0e68c",
+ lavender: "e6e6fa",
+ lavenderblush: "fff0f5",
+ lawngreen: "7cfc00",
+ lemonchiffon: "fffacd",
+ lightblue: "add8e6",
+ lightcoral: "f08080",
+ lightcyan: "e0ffff",
+ lightgoldenrodyellow: "fafad2",
+ lightgray: "d3d3d3",
+ lightgreen: "90ee90",
+ lightgrey: "d3d3d3",
+ lightpink: "ffb6c1",
+ lightsalmon: "ffa07a",
+ lightseagreen: "20b2aa",
+ lightskyblue: "87cefa",
+ lightslategray: "789",
+ lightslategrey: "789",
+ lightsteelblue: "b0c4de",
+ lightyellow: "ffffe0",
+ lime: "0f0",
+ limegreen: "32cd32",
+ linen: "faf0e6",
+ magenta: "f0f",
+ maroon: "800000",
+ mediumaquamarine: "66cdaa",
+ mediumblue: "0000cd",
+ mediumorchid: "ba55d3",
+ mediumpurple: "9370db",
+ mediumseagreen: "3cb371",
+ mediumslateblue: "7b68ee",
+ mediumspringgreen: "00fa9a",
+ mediumturquoise: "48d1cc",
+ mediumvioletred: "c71585",
+ midnightblue: "191970",
+ mintcream: "f5fffa",
+ mistyrose: "ffe4e1",
+ moccasin: "ffe4b5",
+ navajowhite: "ffdead",
+ navy: "000080",
+ oldlace: "fdf5e6",
+ olive: "808000",
+ olivedrab: "6b8e23",
+ orange: "ffa500",
+ orangered: "ff4500",
+ orchid: "da70d6",
+ palegoldenrod: "eee8aa",
+ palegreen: "98fb98",
+ paleturquoise: "afeeee",
+ palevioletred: "db7093",
+ papayawhip: "ffefd5",
+ peachpuff: "ffdab9",
+ peru: "cd853f",
+ pink: "ffc0cb",
+ plum: "dda0dd",
+ powderblue: "b0e0e6",
+ purple: "800080",
+ rebeccapurple: "663399",
+ red: "f00",
+ rosybrown: "bc8f8f",
+ royalblue: "4169e1",
+ saddlebrown: "8b4513",
+ salmon: "fa8072",
+ sandybrown: "f4a460",
+ seagreen: "2e8b57",
+ seashell: "fff5ee",
+ sienna: "a0522d",
+ silver: "c0c0c0",
+ skyblue: "87ceeb",
+ slateblue: "6a5acd",
+ slategray: "708090",
+ slategrey: "708090",
+ snow: "fffafa",
+ springgreen: "00ff7f",
+ steelblue: "4682b4",
+ tan: "d2b48c",
+ teal: "008080",
+ thistle: "d8bfd8",
+ tomato: "ff6347",
+ turquoise: "40e0d0",
+ violet: "ee82ee",
+ wheat: "f5deb3",
+ white: "fff",
+ whitesmoke: "f5f5f5",
+ yellow: "ff0",
+ yellowgreen: "9acd32",
+});
+
+// Make it easy to access colors via `hexNames[hex]`
+var hexNames = (tinycolor.hexNames = flip(names));
+
+// Utilities
+// ---------
+
+// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
+function flip(o) {
+ var flipped = {};
+ for (var i in o) {
+ if (o.hasOwnProperty(i)) {
+ flipped[o[i]] = i;
+ }
+ }
+ return flipped;
+}
+
+// Return a valid alpha value [0,1] with all invalid values being set to 1
+function boundAlpha(a) {
+ a = parseFloat(a);
+
+ if (isNaN(a) || a < 0 || a > 1) {
+ a = 1;
+ }
+
+ return a;
+}
+
+// Take input from [0, n] and return it as [0, 1]
+function bound01(n, max) {
+ if (isOnePointZero(n)) n = "100%";
+
+ var processPercent = isPercentage(n);
+ n = Math.min(max, Math.max(0, parseFloat(n)));
+
+ // Automatically convert percentage into number
+ if (processPercent) {
+ n = parseInt(n * max, 10) / 100;
+ }
+
+ // Handle floating point rounding errors
+ if (Math.abs(n - max) < 0.000001) {
+ return 1;
+ }
+
+ // Convert into [0, 1] range if it isn't already
+ return (n % max) / parseFloat(max);
+}
+
+// Force a number between 0 and 1
+function clamp01(val) {
+ return Math.min(1, Math.max(0, val));
+}
+
+// Parse a base-16 hex value into a base-10 integer
+function parseIntFromHex(val) {
+ return parseInt(val, 16);
+}
+
+// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
+//
+function isOnePointZero(n) {
+ return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
+}
+
+// Check to see if string passed in is a percentage
+function isPercentage(n) {
+ return typeof n === "string" && n.indexOf("%") != -1;
+}
+
+// Force a hex value to have 2 characters
+function pad2(c) {
+ return c.length == 1 ? "0" + c : "" + c;
+}
+
+// Replace a decimal with it's percentage value
+function convertToPercentage(n) {
+ if (n <= 1) {
+ n = n * 100 + "%";
+ }
+
+ return n;
+}
+
+// Converts a decimal to a hex value
+function convertDecimalToHex(d) {
+ return Math.round(parseFloat(d) * 255).toString(16);
+}
+// Converts a hex value to a decimal
+function convertHexToDecimal(h) {
+ return parseIntFromHex(h) / 255;
+}
+
+var matchers = (function () {
+ //
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
+
+ //
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
+
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
+
+ // Actual matching.
+ // Parentheses and commas are optional, but not required.
+ // Whitespace can take the place of commas or opening paren
+ var PERMISSIVE_MATCH3 =
+ "[\\s|\\(]+(" +
+ CSS_UNIT +
+ ")[,|\\s]+(" +
+ CSS_UNIT +
+ ")[,|\\s]+(" +
+ CSS_UNIT +
+ ")\\s*\\)?";
+ var PERMISSIVE_MATCH4 =
+ "[\\s|\\(]+(" +
+ CSS_UNIT +
+ ")[,|\\s]+(" +
+ CSS_UNIT +
+ ")[,|\\s]+(" +
+ CSS_UNIT +
+ ")[,|\\s]+(" +
+ CSS_UNIT +
+ ")\\s*\\)?";
+
+ return {
+ CSS_UNIT: new RegExp(CSS_UNIT),
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
+ };
+})();
+
+// `isValidCSSUnit`
+// Take in a single string / number and check to see if it looks like a CSS unit
+// (see `matchers` above for definition).
+function isValidCSSUnit(color) {
+ return !!matchers.CSS_UNIT.exec(color);
+}
+
+// `stringInputToObject`
+// Permissive string parsing. Take in a number of formats, and output an object
+// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
+function stringInputToObject(color) {
+ color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
+ var named = false;
+ if (names[color]) {
+ color = names[color];
+ named = true;
+ } else if (color == "transparent") {
+ return { r: 0, g: 0, b: 0, a: 0, format: "name" };
+ }
+
+ // Try to match string input using regular expressions.
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
+ // Just return an object and let the conversion functions handle that.
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
+ var match;
+ if ((match = matchers.rgb.exec(color))) {
+ return { r: match[1], g: match[2], b: match[3] };
+ }
+ if ((match = matchers.rgba.exec(color))) {
+ return { r: match[1], g: match[2], b: match[3], a: match[4] };
+ }
+ if ((match = matchers.hsl.exec(color))) {
+ return { h: match[1], s: match[2], l: match[3] };
+ }
+ if ((match = matchers.hsla.exec(color))) {
+ return { h: match[1], s: match[2], l: match[3], a: match[4] };
+ }
+ if ((match = matchers.hsv.exec(color))) {
+ return { h: match[1], s: match[2], v: match[3] };
+ }
+ if ((match = matchers.hsva.exec(color))) {
+ return { h: match[1], s: match[2], v: match[3], a: match[4] };
+ }
+ if ((match = matchers.hex8.exec(color))) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ a: convertHexToDecimal(match[4]),
+ format: named ? "name" : "hex8",
+ };
+ }
+ if ((match = matchers.hex6.exec(color))) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ format: named ? "name" : "hex",
+ };
+ }
+ if ((match = matchers.hex4.exec(color))) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ a: convertHexToDecimal(match[4] + "" + match[4]),
+ format: named ? "name" : "hex8",
+ };
+ }
+ if ((match = matchers.hex3.exec(color))) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ format: named ? "name" : "hex",
+ };
+ }
+
+ return false;
+}
+
+function validateWCAG2Parms(parms) {
+ // return valid WCAG2 parms for isReadable.
+ // If input parms are invalid, return {"level":"AA", "size":"small"}
+ var level, size;
+ parms = parms || { level: "AA", size: "small" };
+ level = (parms.level || "AA").toUpperCase();
+ size = (parms.size || "small").toLowerCase();
+ if (level !== "AA" && level !== "AAA") {
+ level = "AA";
+ }
+ if (size !== "small" && size !== "large") {
+ size = "small";
+ }
+ return { level: level, size: size };
+}
diff --git a/vendor/assets/javascripts/tinycolor/npm/cjs/test.js b/vendor/assets/javascripts/tinycolor/npm/cjs/test.js
new file mode 100644
index 000000000..40be5fddc
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/npm/cjs/test.js
@@ -0,0 +1,2191 @@
+// This file is autogenerated.
+// Ideally it wouldn't exist, but it's here to test cjs in node
+// Changes should go into ./test.js, and if new assertions are needed
+// they'll need to be shimmed here as well
+const tinycolor = require("./tinycolor.js");
+const { Deno, testDefinitions } = require("@deno/shim-deno-test");
+async function runDenoTests() {
+ for (const test of testDefinitions) {
+ if (test.ignore) {
+ console.log(`Ignoring ${test.name}`);
+ continue;
+ }
+ console.log(`Running ${test.name}`);
+ await test.fn();
+ console.log(`> Passed ${test.name}`);
+ }
+}
+(async () => {
+ const { assertEquals, assert, assertThrows } = await import(
+ "../deno_asserts@0.168.0.mjs"
+ );
+
+ // TEST_BEGINS_HERE
+
+Deno.test("TinyColor initialization", function () {
+ assert(
+ typeof tinycolor != "undefined",
+ "tinycolor is initialized on the page"
+ );
+ assert(
+ typeof tinycolor("red") == "object",
+ "tinycolor is able to be instantiated"
+ );
+
+ var r = tinycolor("red");
+ assert(
+ tinycolor(r) === r,
+ "when given a tinycolor instance, tinycolor() returns it"
+ );
+ assert(
+ new tinycolor(r) === r,
+ "when given a tinycolor instance, new tinycolor() returns it"
+ );
+ assertEquals(
+ tinycolor("red", { format: "hex" }).toString(),
+ "#ff0000",
+ "tinycolor options are being parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0 }, { format: "hex" }).toString(),
+ "#ff0000",
+ "tinycolor options are being parsed"
+ );
+
+ var obj = { h: 180, s: 0.5, l: 0.5 };
+ var color = tinycolor(obj);
+ assert(
+ obj.s === 0.5,
+ "when given an object, the original object is not modified"
+ );
+});
+
+Deno.test("Original input", function () {
+ var colorRgbUp = "RGB(39, 39, 39)";
+ var colorRgbLow = "rgb(39, 39, 39)";
+ var colorRgbMix = "RgB(39, 39, 39)";
+ var tinycolorObj = tinycolor(colorRgbMix);
+ var inputObj = { r: 100, g: 100, b: 100 };
+ var r = tinycolor("red");
+
+ assert(
+ tinycolor(colorRgbLow).getOriginalInput() === colorRgbLow,
+ "original lowercase input is returned"
+ );
+ assert(
+ tinycolor(colorRgbUp).getOriginalInput() === colorRgbUp,
+ "original uppercase input is returned"
+ );
+ assert(
+ tinycolor(colorRgbMix).getOriginalInput() === colorRgbMix,
+ "original mixed input is returned"
+ );
+ assert(
+ tinycolor(tinycolorObj).getOriginalInput() === colorRgbMix,
+ "when given a tinycolor instance, the color string is returned"
+ );
+ assert(
+ tinycolor(inputObj).getOriginalInput() === inputObj,
+ "when given an object, the object is returned"
+ );
+ assert(
+ new tinycolor("").getOriginalInput() === "",
+ "when given an empty string, an empty string is returned"
+ );
+ assert(
+ new tinycolor(null).getOriginalInput() === "",
+ "when given a null value, an empty string is returned"
+ );
+});
+
+Deno.test("Cloning color", function () {
+ var originalColor = tinycolor("red");
+ var originalColorRgbString = originalColor.toRgbString();
+
+ var clonedColor = originalColor.clone();
+ assert(
+ clonedColor.toRgbString() === originalColor.toRgbString(),
+ "cloned color is identical"
+ );
+
+ clonedColor.setAlpha(0.5);
+ assert(
+ clonedColor.toRgbString() !== originalColor.toRgbString(),
+ "cloned color is changing independently from original color"
+ );
+ assert(
+ originalColorRgbString === originalColor.toRgbString(),
+ "original color was not changed by cloned color change"
+ );
+});
+Deno.test("Random color", function () {
+ var randomColor = tinycolor.random();
+ assertEquals(randomColor.getAlpha(), 1);
+ assertEquals(randomColor.getFormat(), "prgb");
+
+ randomColor.setAlpha(0.5);
+ assertEquals(randomColor.toHex8String().slice(-2), "80");
+});
+
+// Taken from convertWikipediaColors.html
+var conversions = [
+ {
+ hex: "#FFFFFF",
+ hex8: "#FFFFFFFF",
+ rgb: { r: "100.0%", g: "100.0%", b: "100.0%" },
+ hsv: { h: "0", s: "0.000", v: "1.000" },
+ hsl: { h: "0", s: "0.000", l: "1.000" },
+ },
+ {
+ hex: "#808080",
+ hex8: "#808080FF",
+ rgb: { r: "050.0%", g: "050.0%", b: "050.0%" },
+ hsv: { h: "0", s: "0.000", v: "0.500" },
+ hsl: { h: "0", s: "0.000", l: "0.500" },
+ },
+ {
+ hex: "#000000",
+ hex8: "#000000FF",
+ rgb: { r: "000.0%", g: "000.0%", b: "000.0%" },
+ hsv: { h: "0", s: "0.000", v: "0.000" },
+ hsl: { h: "0", s: "0.000", l: "0.000" },
+ },
+ {
+ hex: "#FF0000",
+ hex8: "#FF0000FF",
+ rgb: { r: "100.0%", g: "000.0%", b: "000.0%" },
+ hsv: { h: "0.0", s: "1.000", v: "1.000" },
+ hsl: { h: "0.0", s: "1.000", l: "0.500" },
+ },
+ {
+ hex: "#BFBF00",
+ hex8: "#BFBF00FF",
+ rgb: { r: "075.0%", g: "075.0%", b: "000.0%" },
+ hsv: { h: "60.0", s: "1.000", v: "0.750" },
+ hsl: { h: "60.0", s: "1.000", l: "0.375" },
+ },
+ {
+ hex: "#008000",
+ hex8: "#008000FF",
+ rgb: { r: "000.0%", g: "050.0%", b: "000.0%" },
+ hsv: { h: "120.0", s: "1.000", v: "0.500" },
+ hsl: { h: "120.0", s: "1.000", l: "0.250" },
+ },
+ {
+ hex: "#80FFFF",
+ hex8: "#80FFFFFF",
+ rgb: { r: "050.0%", g: "100.0%", b: "100.0%" },
+ hsv: { h: "180.0", s: "0.500", v: "1.000" },
+ hsl: { h: "180.0", s: "1.000", l: "0.750" },
+ },
+ {
+ hex: "#8080FF",
+ hex8: "#8080FFFF",
+ rgb: { r: "050.0%", g: "050.0%", b: "100.0%" },
+ hsv: { h: "240.0", s: "0.500", v: "1.000" },
+ hsl: { h: "240.0", s: "1.000", l: "0.750" },
+ },
+ {
+ hex: "#BF40BF",
+ hex8: "#BF40BFFF",
+ rgb: { r: "075.0%", g: "025.0%", b: "075.0%" },
+ hsv: { h: "300.0", s: "0.667", v: "0.750" },
+ hsl: { h: "300.0", s: "0.500", l: "0.500" },
+ },
+ {
+ hex: "#A0A424",
+ hex8: "#A0A424FF",
+ rgb: { r: "062.8%", g: "064.3%", b: "014.2%" },
+ hsv: { h: "61.8", s: "0.779", v: "0.643" },
+ hsl: { h: "61.8", s: "0.638", l: "0.393" },
+ },
+ {
+ hex: "#1EAC41",
+ hex8: "#1EAC41FF",
+ rgb: { r: "011.6%", g: "067.5%", b: "025.5%" },
+ hsv: { h: "134.9", s: "0.828", v: "0.675" },
+ hsl: { h: "134.9", s: "0.707", l: "0.396" },
+ },
+ {
+ hex: "#B430E5",
+ hex8: "#B430E5FF",
+ rgb: { r: "070.4%", g: "018.7%", b: "089.7%" },
+ hsv: { h: "283.7", s: "0.792", v: "0.897" },
+ hsl: { h: "283.7", s: "0.775", l: "0.542" },
+ },
+ {
+ hex: "#FEF888",
+ hex8: "#FEF888FF",
+ rgb: { r: "099.8%", g: "097.4%", b: "053.2%" },
+ hsv: { h: "56.9", s: "0.467", v: "0.998" },
+ hsl: { h: "56.9", s: "0.991", l: "0.765" },
+ },
+ {
+ hex: "#19CB97",
+ hex8: "#19CB97FF",
+ rgb: { r: "009.9%", g: "079.5%", b: "059.1%" },
+ hsv: { h: "162.4", s: "0.875", v: "0.795" },
+ hsl: { h: "162.4", s: "0.779", l: "0.447" },
+ },
+ {
+ hex: "#362698",
+ hex8: "#362698FF",
+ rgb: { r: "021.1%", g: "014.9%", b: "059.7%" },
+ hsv: { h: "248.3", s: "0.750", v: "0.597" },
+ hsl: { h: "248.3", s: "0.601", l: "0.373" },
+ },
+ {
+ hex: "#7E7EB8",
+ hex8: "#7E7EB8FF",
+ rgb: { r: "049.5%", g: "049.3%", b: "072.1%" },
+ hsv: { h: "240.5", s: "0.316", v: "0.721" },
+ hsl: { h: "240.5", s: "0.290", l: "0.607" },
+ },
+];
+
+Deno.test("Color Equality", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+
+ assert(true, tiny.isValid());
+ assert(
+ true,
+ "Testing " +
+ c.hex +
+ ": " +
+ tiny.toRgbString() +
+ " " +
+ tiny.toPercentageRgbString() +
+ " " +
+ tiny.toHsvString() +
+ " " +
+ tiny.toHslString() +
+ " " +
+ tiny.toHexString() +
+ "Original: " +
+ JSON.stringify(c.rgb) +
+ " " +
+ JSON.stringify(c.hsv) +
+ " " +
+ JSON.stringify(c.hsl)
+ );
+ assert(tinycolor.equals(c.rgb, c.hex), "RGB equals hex " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.hex8), "RGB equals hex " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.hsl), "RGB equals HSL " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.hsv), "RGB equals HSV " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.rgb), "RGB equals RGB " + c.hex);
+
+ assert(tinycolor.equals(c.hex, c.hex), "hex equals hex " + c.hex);
+ assert(tinycolor.equals(c.hex, c.hex8), "hex equals hex8 " + c.hex);
+ assert(tinycolor.equals(c.hex, c.hsl), "hex equals HSL " + c.hex);
+ assert(tinycolor.equals(c.hex, c.hsv), "hex equals HSV " + c.hex);
+
+ assert(tinycolor.equals(c.hsl, c.hsv), "HSL equals HSV " + c.hex);
+ }
+});
+
+Deno.test("With Ratio", function () {
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 1, b: 1 }).toHexString(),
+ "#ffffff",
+ "white"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 0.5 }).toRgbString(),
+ "rgba(255, 0, 0, 0.5)",
+ "alpha works when ratio is parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 1 }).toRgbString(),
+ "rgb(255, 0, 0)",
+ "alpha = 1 works when ratio is parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 10 }).toRgbString(),
+ "rgb(255, 0, 0)",
+ "alpha > 1 works when ratio is parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: -1 }).toRgbString(),
+ "rgb(255, 0, 0)",
+ "alpha < 1 works when ratio is parsed"
+ );
+});
+
+Deno.test("Without Ratio", function () {
+ assertEquals(
+ tinycolor({ r: 1, g: 1, b: 1 }).toHexString(),
+ "#010101",
+ "010101"
+ );
+ assertEquals(
+ tinycolor({ r: 0.1, g: 0.1, b: 0.1 }).toHexString(),
+ "#000000",
+ "000000"
+ );
+ assertEquals(tinycolor("rgb .1 .1 .1").toHexString(), "#000000", "000000");
+});
+
+Deno.test("RGB Text Parsing", function () {
+ assertEquals(
+ tinycolor("rgb 255 0 0").toHexString(),
+ "#ff0000",
+ "spaced input"
+ );
+ assertEquals(
+ tinycolor("rgb(255, 0, 0)").toHexString(),
+ "#ff0000",
+ "parenthesized input"
+ );
+ assertEquals(
+ tinycolor("rgb (255, 0, 0)").toHexString(),
+ "#ff0000",
+ "parenthesized spaced input"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 0, b: 0 }).toHexString(),
+ "#ff0000",
+ "object input"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 0, b: 0 }).toRgb(),
+ {
+ r: 255,
+ g: 0,
+ b: 0,
+ a: 1,
+ },
+ "object input and compare"
+ );
+
+ assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb(200, 100, 0)"));
+ assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb 200 100 0"));
+ assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb 200 100 0"));
+ assert(
+ tinycolor.equals({ r: 200, g: 100, b: 0, a: 0.4 }, "rgba 200 100 0 .4")
+ );
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgba 200 100 0 1"));
+
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb(200, 100, 0)"));
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb 200 100 0"));
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb 200 100 0"));
+
+ assert(
+ tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb(200, 100, 0)")
+ );
+ assert(
+ tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb 200 100 0")
+ );
+ assert(
+ tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb 200 100 0")
+ );
+});
+
+Deno.test("Percentage RGB Text Parsing", function () {
+ assertEquals(
+ tinycolor("rgb 100% 0% 0%").toHexString(),
+ "#ff0000",
+ "spaced input"
+ );
+ assertEquals(
+ tinycolor("rgb(100%, 0%, 0%)").toHexString(),
+ "#ff0000",
+ "parenthesized input"
+ );
+ assertEquals(
+ tinycolor("rgb (100%, 0%, 0%)").toHexString(),
+ "#ff0000",
+ "parenthesized spaced input"
+ );
+ assertEquals(
+ tinycolor({ r: "100%", g: "0%", b: "0%" }).toHexString(),
+ "#ff0000",
+ "object input"
+ );
+ assertEquals(
+ tinycolor({ r: "100%", g: "0%", b: "0%" }).toRgb(),
+ {
+ r: 255,
+ g: 0,
+ b: 0,
+ a: 1,
+ },
+ "object input and compare"
+ );
+
+ assert(
+ tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb(90%, 45%, 0%)")
+ );
+ assert(tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+ assert(tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+ assert(
+ tinycolor.equals(
+ { r: "90%", g: "45%", b: "0%", a: 0.4 },
+ "rgba 90% 45% 0% .4"
+ )
+ );
+ assert(
+ !tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgba 90% 45% 0% 1")
+ );
+
+ assert(
+ !tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb(90%, 45%, 0%)")
+ );
+ assert(!tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+ assert(!tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+
+ assert(
+ tinycolor.equals(
+ tinycolor({ r: "90%", g: "45%", b: "0%" }),
+ "rgb(90%, 45%, 0%)"
+ )
+ );
+ assert(
+ tinycolor.equals(
+ tinycolor({ r: "90%", g: "45%", b: "0%" }),
+ "rgb 90% 45% 0%"
+ )
+ );
+ assert(
+ tinycolor.equals(
+ tinycolor({ r: "90%", g: "45%", b: "0%" }),
+ "rgb 90% 45% 0%"
+ )
+ );
+});
+
+Deno.test("HSL parsing", function () {
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38 }).toHexString(),
+ "#2400c2",
+ "to hex"
+ );
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38 }).toRgbString(),
+ "rgb(36, 0, 194)",
+ "to rgb"
+ );
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38 }).toHslString(),
+ "hsl(251, 100%, 38%)",
+ "to hsl"
+ );
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38, a: 0.5 }).toHslString(),
+ "hsla(251, 100%, 38%, 0.5)",
+ "to hsla"
+ );
+ assertEquals(
+ tinycolor("hsl(251, 100, 38)").toHexString(),
+ "#2400c2",
+ "to hex"
+ );
+ assertEquals(
+ tinycolor("hsl(251, 100%, 38%)").toRgbString(),
+ "rgb(36, 0, 194)",
+ "to rgb"
+ );
+ assertEquals(
+ tinycolor("hsl(251, 100%, 38%)").toHslString(),
+ "hsl(251, 100%, 38%)",
+ "to hsl"
+ );
+ assertEquals(
+ tinycolor("hsl 100 20 10").toHslString(),
+ "hsl(100, 20%, 10%)",
+ "problematic hsl"
+ );
+});
+
+Deno.test("Hex Parsing", function () {
+ assertEquals(tinycolor("rgb 255 0 0").toHexString(), "#ff0000");
+ assertEquals(tinycolor("rgb 255 0 0").toHexString(true), "#f00");
+
+ assertEquals(tinycolor("rgba 255 0 0 0.5").toHex8String(), "#ff000080");
+ assertEquals(tinycolor("rgba 255 0 0 0").toHex8String(), "#ff000000");
+ assertEquals(tinycolor("rgba 255 0 0 1").toHex8String(), "#ff0000ff");
+ assertEquals(tinycolor("rgba 255 0 0 1").toHex8String(true), "#f00f");
+
+ assertEquals(tinycolor("rgb 255 0 0").toHex(), "ff0000");
+ assertEquals(tinycolor("rgb 255 0 0").toHex(true), "f00");
+ assertEquals(tinycolor("rgba 255 0 0 0.5").toHex8(), "ff000080");
+});
+
+Deno.test("HSV Parsing", function () {
+ assertEquals(
+ tinycolor("hsv 251.1 0.887 .918").toHsvString(),
+ "hsv(251, 89%, 92%)"
+ );
+ assertEquals(
+ tinycolor("hsv 251.1 0.887 0.918").toHsvString(),
+ "hsv(251, 89%, 92%)"
+ );
+ assertEquals(
+ tinycolor("hsva 251.1 0.887 0.918 0.5").toHsvString(),
+ "hsva(251, 89%, 92%, 0.5)"
+ );
+});
+
+Deno.test("Invalid Parsing", function () {
+ var invalidColor = tinycolor("this is not a color");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor("#red");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor(" #red");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor("##123456");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor(" ##123456");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor({ r: "invalid", g: "invalid", b: "invalid" });
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor({ h: "invalid", s: "invalid", l: "invalid" });
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor({ h: "invalid", s: "invalid", v: "invalid" });
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+});
+
+Deno.test("Named colors", function () {
+ assertEquals(tinycolor("aliceblue").toHex(), "f0f8ff");
+ assertEquals(tinycolor("antiquewhite").toHex(), "faebd7");
+ assertEquals(tinycolor("aqua").toHex(), "00ffff");
+ assertEquals(tinycolor("aquamarine").toHex(), "7fffd4");
+ assertEquals(tinycolor("azure").toHex(), "f0ffff");
+ assertEquals(tinycolor("beige").toHex(), "f5f5dc");
+ assertEquals(tinycolor("bisque").toHex(), "ffe4c4");
+ assertEquals(tinycolor("black").toHex(), "000000");
+ assertEquals(tinycolor("blanchedalmond").toHex(), "ffebcd");
+ assertEquals(tinycolor("blue").toHex(), "0000ff");
+ assertEquals(tinycolor("blueviolet").toHex(), "8a2be2");
+ assertEquals(tinycolor("brown").toHex(), "a52a2a");
+ assertEquals(tinycolor("burlywood").toHex(), "deb887");
+ assertEquals(tinycolor("cadetblue").toHex(), "5f9ea0");
+ assertEquals(tinycolor("chartreuse").toHex(), "7fff00");
+ assertEquals(tinycolor("chocolate").toHex(), "d2691e");
+ assertEquals(tinycolor("coral").toHex(), "ff7f50");
+ assertEquals(tinycolor("cornflowerblue").toHex(), "6495ed");
+ assertEquals(tinycolor("cornsilk").toHex(), "fff8dc");
+ assertEquals(tinycolor("crimson").toHex(), "dc143c");
+ assertEquals(tinycolor("cyan").toHex(), "00ffff");
+ assertEquals(tinycolor("darkblue").toHex(), "00008b");
+ assertEquals(tinycolor("darkcyan").toHex(), "008b8b");
+ assertEquals(tinycolor("darkgoldenrod").toHex(), "b8860b");
+ assertEquals(tinycolor("darkgray").toHex(), "a9a9a9");
+ assertEquals(tinycolor("darkgreen").toHex(), "006400");
+ assertEquals(tinycolor("darkkhaki").toHex(), "bdb76b");
+ assertEquals(tinycolor("darkmagenta").toHex(), "8b008b");
+ assertEquals(tinycolor("darkolivegreen").toHex(), "556b2f");
+ assertEquals(tinycolor("darkorange").toHex(), "ff8c00");
+ assertEquals(tinycolor("darkorchid").toHex(), "9932cc");
+ assertEquals(tinycolor("darkred").toHex(), "8b0000");
+ assertEquals(tinycolor("darksalmon").toHex(), "e9967a");
+ assertEquals(tinycolor("darkseagreen").toHex(), "8fbc8f");
+ assertEquals(tinycolor("darkslateblue").toHex(), "483d8b");
+ assertEquals(tinycolor("darkslategray").toHex(), "2f4f4f");
+ assertEquals(tinycolor("darkturquoise").toHex(), "00ced1");
+ assertEquals(tinycolor("darkviolet").toHex(), "9400d3");
+ assertEquals(tinycolor("deeppink").toHex(), "ff1493");
+ assertEquals(tinycolor("deepskyblue").toHex(), "00bfff");
+ assertEquals(tinycolor("dimgray").toHex(), "696969");
+ assertEquals(tinycolor("dodgerblue").toHex(), "1e90ff");
+ assertEquals(tinycolor("firebrick").toHex(), "b22222");
+ assertEquals(tinycolor("floralwhite").toHex(), "fffaf0");
+ assertEquals(tinycolor("forestgreen").toHex(), "228b22");
+ assertEquals(tinycolor("fuchsia").toHex(), "ff00ff");
+ assertEquals(tinycolor("gainsboro").toHex(), "dcdcdc");
+ assertEquals(tinycolor("ghostwhite").toHex(), "f8f8ff");
+ assertEquals(tinycolor("gold").toHex(), "ffd700");
+ assertEquals(tinycolor("goldenrod").toHex(), "daa520");
+ assertEquals(tinycolor("gray").toHex(), "808080");
+ assertEquals(tinycolor("grey").toHex(), "808080");
+ assertEquals(tinycolor("green").toHex(), "008000");
+ assertEquals(tinycolor("greenyellow").toHex(), "adff2f");
+ assertEquals(tinycolor("honeydew").toHex(), "f0fff0");
+ assertEquals(tinycolor("hotpink").toHex(), "ff69b4");
+ assertEquals(tinycolor("indianred ").toHex(), "cd5c5c");
+ assertEquals(tinycolor("indigo ").toHex(), "4b0082");
+ assertEquals(tinycolor("ivory").toHex(), "fffff0");
+ assertEquals(tinycolor("khaki").toHex(), "f0e68c");
+ assertEquals(tinycolor("lavender").toHex(), "e6e6fa");
+ assertEquals(tinycolor("lavenderblush").toHex(), "fff0f5");
+ assertEquals(tinycolor("lawngreen").toHex(), "7cfc00");
+ assertEquals(tinycolor("lemonchiffon").toHex(), "fffacd");
+ assertEquals(tinycolor("lightblue").toHex(), "add8e6");
+ assertEquals(tinycolor("lightcoral").toHex(), "f08080");
+ assertEquals(tinycolor("lightcyan").toHex(), "e0ffff");
+ assertEquals(tinycolor("lightgoldenrodyellow").toHex(), "fafad2");
+ assertEquals(tinycolor("lightgrey").toHex(), "d3d3d3");
+ assertEquals(tinycolor("lightgreen").toHex(), "90ee90");
+ assertEquals(tinycolor("lightpink").toHex(), "ffb6c1");
+ assertEquals(tinycolor("lightsalmon").toHex(), "ffa07a");
+ assertEquals(tinycolor("lightseagreen").toHex(), "20b2aa");
+ assertEquals(tinycolor("lightskyblue").toHex(), "87cefa");
+ assertEquals(tinycolor("lightslategray").toHex(), "778899");
+ assertEquals(tinycolor("lightsteelblue").toHex(), "b0c4de");
+ assertEquals(tinycolor("lightyellow").toHex(), "ffffe0");
+ assertEquals(tinycolor("lime").toHex(), "00ff00");
+ assertEquals(tinycolor("limegreen").toHex(), "32cd32");
+ assertEquals(tinycolor("linen").toHex(), "faf0e6");
+ assertEquals(tinycolor("magenta").toHex(), "ff00ff");
+ assertEquals(tinycolor("maroon").toHex(), "800000");
+ assertEquals(tinycolor("mediumaquamarine").toHex(), "66cdaa");
+ assertEquals(tinycolor("mediumblue").toHex(), "0000cd");
+ assertEquals(tinycolor("mediumorchid").toHex(), "ba55d3");
+ assertEquals(tinycolor("mediumpurple").toHex(), "9370db");
+ assertEquals(tinycolor("mediumseagreen").toHex(), "3cb371");
+ assertEquals(tinycolor("mediumslateblue").toHex(), "7b68ee");
+ assertEquals(tinycolor("mediumspringgreen").toHex(), "00fa9a");
+ assertEquals(tinycolor("mediumturquoise").toHex(), "48d1cc");
+ assertEquals(tinycolor("mediumvioletred").toHex(), "c71585");
+ assertEquals(tinycolor("midnightblue").toHex(), "191970");
+ assertEquals(tinycolor("mintcream").toHex(), "f5fffa");
+ assertEquals(tinycolor("mistyrose").toHex(), "ffe4e1");
+ assertEquals(tinycolor("moccasin").toHex(), "ffe4b5");
+ assertEquals(tinycolor("navajowhite").toHex(), "ffdead");
+ assertEquals(tinycolor("navy").toHex(), "000080");
+ assertEquals(tinycolor("oldlace").toHex(), "fdf5e6");
+ assertEquals(tinycolor("olive").toHex(), "808000");
+ assertEquals(tinycolor("olivedrab").toHex(), "6b8e23");
+ assertEquals(tinycolor("orange").toHex(), "ffa500");
+ assertEquals(tinycolor("orangered").toHex(), "ff4500");
+ assertEquals(tinycolor("orchid").toHex(), "da70d6");
+ assertEquals(tinycolor("palegoldenrod").toHex(), "eee8aa");
+ assertEquals(tinycolor("palegreen").toHex(), "98fb98");
+ assertEquals(tinycolor("paleturquoise").toHex(), "afeeee");
+ assertEquals(tinycolor("palevioletred").toHex(), "db7093");
+ assertEquals(tinycolor("papayawhip").toHex(), "ffefd5");
+ assertEquals(tinycolor("peachpuff").toHex(), "ffdab9");
+ assertEquals(tinycolor("peru").toHex(), "cd853f");
+ assertEquals(tinycolor("pink").toHex(), "ffc0cb");
+ assertEquals(tinycolor("plum").toHex(), "dda0dd");
+ assertEquals(tinycolor("powderblue").toHex(), "b0e0e6");
+ assertEquals(tinycolor("purple").toHex(), "800080");
+ assertEquals(tinycolor("rebeccapurple").toHex(), "663399");
+ assertEquals(tinycolor("red").toHex(), "ff0000");
+ assertEquals(tinycolor("rosybrown").toHex(), "bc8f8f");
+ assertEquals(tinycolor("royalblue").toHex(), "4169e1");
+ assertEquals(tinycolor("saddlebrown").toHex(), "8b4513");
+ assertEquals(tinycolor("salmon").toHex(), "fa8072");
+ assertEquals(tinycolor("sandybrown").toHex(), "f4a460");
+ assertEquals(tinycolor("seagreen").toHex(), "2e8b57");
+ assertEquals(tinycolor("seashell").toHex(), "fff5ee");
+ assertEquals(tinycolor("sienna").toHex(), "a0522d");
+ assertEquals(tinycolor("silver").toHex(), "c0c0c0");
+ assertEquals(tinycolor("skyblue").toHex(), "87ceeb");
+ assertEquals(tinycolor("slateblue").toHex(), "6a5acd");
+ assertEquals(tinycolor("slategray").toHex(), "708090");
+ assertEquals(tinycolor("snow").toHex(), "fffafa");
+ assertEquals(tinycolor("springgreen").toHex(), "00ff7f");
+ assertEquals(tinycolor("steelblue").toHex(), "4682b4");
+ assertEquals(tinycolor("tan").toHex(), "d2b48c");
+ assertEquals(tinycolor("teal").toHex(), "008080");
+ assertEquals(tinycolor("thistle").toHex(), "d8bfd8");
+ assertEquals(tinycolor("tomato").toHex(), "ff6347");
+ assertEquals(tinycolor("turquoise").toHex(), "40e0d0");
+ assertEquals(tinycolor("violet").toHex(), "ee82ee");
+ assertEquals(tinycolor("wheat").toHex(), "f5deb3");
+ assertEquals(tinycolor("white").toHex(), "ffffff");
+ assertEquals(tinycolor("whitesmoke").toHex(), "f5f5f5");
+ assertEquals(tinycolor("yellow").toHex(), "ffff00");
+ assertEquals(tinycolor("yellowgreen").toHex(), "9acd32");
+
+ assertEquals(tinycolor("#f00").toName(), "red");
+ assertEquals(tinycolor("#fa0a0a").toName(), false);
+});
+
+Deno.test("Invalid alpha should normalize to 1", function () {
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: -1 }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "Negative value"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: -0 }).toRgbString(),
+ "rgba(255, 20, 10, 0)",
+ "Negative 0"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 0 }).toRgbString(),
+ "rgba(255, 20, 10, 0)",
+ "0"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 0.5 }).toRgbString(),
+ "rgba(255, 20, 10, 0.5)",
+ ".5"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 1 }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "1"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 100 }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "Greater than 1"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: "asdfasd" }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "Non Numeric"
+ );
+
+ assertEquals(
+ tinycolor("#fff").toRgbString(),
+ "rgb(255, 255, 255)",
+ "Hex should be 1"
+ );
+ assertEquals(
+ tinycolor("rgba 255 0 0 100").toRgbString(),
+ "rgb(255, 0, 0)",
+ "Greater than 1 in string parsing"
+ );
+});
+
+Deno.test("toString() with alpha set", function () {
+ var redNamed = tinycolor.fromRatio(
+ { r: 255, g: 0, b: 0, a: 0.6 },
+ {
+ format: "name",
+ }
+ );
+ var transparentNamed = tinycolor.fromRatio(
+ { r: 255, g: 0, b: 0, a: 0 },
+ {
+ format: "name",
+ }
+ );
+ var redHex = tinycolor.fromRatio(
+ { r: 255, g: 0, b: 0, a: 0.4 },
+ {
+ format: "hex",
+ }
+ );
+
+ assertEquals(redNamed.getFormat(), "name", "getFormat() is correct");
+ assertEquals(redHex.getFormat(), "hex", "getFormat() is correct");
+
+ assertEquals(
+ redNamed.toString(),
+ "rgba(255, 0, 0, 0.6)",
+ "Names should default to rgba if alpha is < 1"
+ );
+ assertEquals(
+ redHex.toString(),
+ "rgba(255, 0, 0, 0.4)",
+ "Hex should default to rgba if alpha is < 1"
+ );
+
+ assertEquals(
+ redNamed.toString("hex"),
+ "#ff0000",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex6"),
+ "#ff0000",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex3"),
+ "#f00",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex8"),
+ "#ff000099",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex4"),
+ "#f009",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("name"),
+ "#ff0000",
+ "Semi transparent names should return hex in toString() if name format is specified"
+ );
+
+ assertEquals(
+ redNamed.toName(),
+ false,
+ "Semi transparent names should be false in toName()"
+ );
+
+ assertEquals(
+ redHex.toString(),
+ "rgba(255, 0, 0, 0.4)",
+ "Hex should default to rgba if alpha is < 1"
+ );
+ assertEquals(
+ transparentNamed.toString(),
+ "transparent",
+ "Named color should equal transparent if alpha == 0"
+ );
+
+ redHex.setAlpha(0);
+ assertEquals(
+ redHex.toString(),
+ "rgba(255, 0, 0, 0)",
+ "Hex should default to rgba if alpha is = 0"
+ );
+});
+
+Deno.test("setting alpha", function () {
+ var hexSetter = tinycolor("rgba(255, 0, 0, 1)");
+ assertEquals(hexSetter.getAlpha(), 1, "Alpha should start as 1");
+ var returnedFromSetAlpha = hexSetter.setAlpha(0.9);
+ assertEquals(
+ returnedFromSetAlpha,
+ hexSetter,
+ "setAlpha return value should be the color."
+ );
+ assertEquals(hexSetter.getAlpha(), 0.9, "setAlpha should change alpha value");
+ hexSetter.setAlpha(0.5);
+ assertEquals(hexSetter.getAlpha(), 0.5, "setAlpha should change alpha value");
+ hexSetter.setAlpha(0);
+ assertEquals(hexSetter.getAlpha(), 0, "setAlpha should change alpha value");
+ hexSetter.setAlpha(-1);
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with value < 0 should be bound to 1"
+ );
+ hexSetter.setAlpha(2);
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with value > 1 should be bound to 1"
+ );
+ hexSetter.setAlpha();
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with invalid value should be bound to 1"
+ );
+ hexSetter.setAlpha(null);
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with invalid value should be bound to 1"
+ );
+ hexSetter.setAlpha("test");
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with invalid value should be bound to 1"
+ );
+});
+
+Deno.test("Alpha = 0 should act differently on toName()", function () {
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 0 }).toName(),
+ "transparent",
+ "0"
+ );
+ assertEquals(
+ tinycolor("transparent").toString(),
+ "transparent",
+ "toString when passed"
+ );
+ assertEquals(tinycolor("transparent").toHex(), "000000", "toHex");
+});
+
+Deno.test("getBrightness", function () {
+ assertEquals(tinycolor("#000").getBrightness(), 0, "returns 0 for #000");
+ assertEquals(tinycolor("#fff").getBrightness(), 255, "returns 255 for #fff");
+});
+
+Deno.test("getLuminance", function () {
+ assertEquals(tinycolor("#000").getLuminance(), 0, "returns 0 for #000");
+ assertEquals(tinycolor("#fff").getLuminance(), 1, "returns 1 for #fff");
+});
+
+Deno.test("isDark returns true/false for dark/light colors", function () {
+ assertEquals(tinycolor("#000").isDark(), true, "#000 is dark");
+ assertEquals(tinycolor("#111").isDark(), true, "#111 is dark");
+ assertEquals(tinycolor("#222").isDark(), true, "#222 is dark");
+ assertEquals(tinycolor("#333").isDark(), true, "#333 is dark");
+ assertEquals(tinycolor("#444").isDark(), true, "#444 is dark");
+ assertEquals(tinycolor("#555").isDark(), true, "#555 is dark");
+ assertEquals(tinycolor("#666").isDark(), true, "#666 is dark");
+ assertEquals(tinycolor("#777").isDark(), true, "#777 is dark");
+ assertEquals(tinycolor("#888").isDark(), false, "#888 is not dark");
+ assertEquals(tinycolor("#999").isDark(), false, "#999 is not dark");
+ assertEquals(tinycolor("#aaa").isDark(), false, "#aaa is not dark");
+ assertEquals(tinycolor("#bbb").isDark(), false, "#bbb is not dark");
+ assertEquals(tinycolor("#ccc").isDark(), false, "#ccc is not dark");
+ assertEquals(tinycolor("#ddd").isDark(), false, "#ddd is not dark");
+ assertEquals(tinycolor("#eee").isDark(), false, "#eee is not dark");
+ assertEquals(tinycolor("#fff").isDark(), false, "#fff is not dark");
+});
+
+Deno.test("isLight returns true/false for light/dark colors", function () {
+ assertEquals(tinycolor("#000").isLight(), false, "#000 is not light");
+ assertEquals(tinycolor("#111").isLight(), false, "#111 is not light");
+ assertEquals(tinycolor("#222").isLight(), false, "#222 is not light");
+ assertEquals(tinycolor("#333").isLight(), false, "#333 is not light");
+ assertEquals(tinycolor("#444").isLight(), false, "#444 is not light");
+ assertEquals(tinycolor("#555").isLight(), false, "#555 is not light");
+ assertEquals(tinycolor("#666").isLight(), false, "#666 is not light");
+ assertEquals(tinycolor("#777").isLight(), false, "#777 is not light");
+ assertEquals(tinycolor("#888").isLight(), true, "#888 is light");
+ assertEquals(tinycolor("#999").isLight(), true, "#999 is light");
+ assertEquals(tinycolor("#aaa").isLight(), true, "#aaa is light");
+ assertEquals(tinycolor("#bbb").isLight(), true, "#bbb is light");
+ assertEquals(tinycolor("#ccc").isLight(), true, "#ccc is light");
+ assertEquals(tinycolor("#ddd").isLight(), true, "#ddd is light");
+ assertEquals(tinycolor("#eee").isLight(), true, "#eee is light");
+ assertEquals(tinycolor("#fff").isLight(), true, "#fff is light");
+});
+
+Deno.test("HSL Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toHsl()).toHexString(),
+ "HSL Object"
+ );
+ }
+});
+
+Deno.test("HSL String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toHslString()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "toHslString red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "toHslString green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "toHslString blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("HSV String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toHsvString()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "toHsvString red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "toHsvString green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "toHsvString blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("HSV Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toHsv()).toHexString(),
+ "HSV Object"
+ );
+ }
+});
+
+Deno.test("RGB Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toRgb()).toHexString(),
+ "RGB Object"
+ );
+ }
+});
+
+Deno.test("RGB String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toRgbString()).toHexString(),
+ "RGB String"
+ );
+ }
+});
+
+Deno.test("PRGB Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toPercentageRgb()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "Red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "Green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "Blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("PRGB String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toPercentageRgbString()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "Red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "Green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "Blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(tiny.toHexString(), tinycolor(tiny).toHexString(), "Object");
+ }
+});
+
+Deno.test("Color equality", function () {
+ assert(tinycolor.equals("#ff0000", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("#ff0000", "rgb(255, 0, 0)"), "Same alphas");
+ assert(
+ !tinycolor.equals("#ff0000", "rgba(255, 0, 0, .1)"),
+ "Different alphas"
+ );
+ assert(tinycolor.equals("#ff000066", "rgba(255, 0, 0, .4)"), "Same alphas");
+ assert(tinycolor.equals("#f009", "rgba(255, 0, 0, .6)"), "Same alphas");
+ assert(tinycolor.equals("#336699CC", "369C"), "Same hex");
+ assert(tinycolor.equals("ff0000", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("#f00", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("#f00", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("f00", "#ff0000"), "Same hex");
+ assertEquals(tinycolor("010101").toHexString(), "#010101");
+ assert(!tinycolor.equals("#ff0000", "#00ff00"), "Different hex");
+ assert(
+ tinycolor.equals("#ff8000", "rgb(100%, 50%, 0%)"),
+ "Percentage bounds checking"
+ );
+});
+
+Deno.test("isReadable", function () {
+ // "#ff0088", "#8822aa" (values used in old WCAG1 tests)
+ assert(
+ tinycolor.isReadable("#000000", "#ffffff", { level: "AA", size: "small" }),
+ "white/black is readable"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", {}),
+ "not readable - empty wcag2 object"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", { level: "AA", size: "small" }),
+ "not readable - AA small"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", { level: "AA", size: "large" }),
+ "not readable - AA large"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", {
+ level: "AAA",
+ size: "small",
+ }),
+ "not readable - AAA small"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", {
+ level: "AAA",
+ size: "large",
+ }),
+ "not readable - AAA large"
+ );
+
+ // values derived from and validated using the calculators at http://www.dasplankton.de/ContrastA/
+ // and http://webaim.org/resources/contrastchecker/
+
+ // "#ff0088", "#5c1a72": contrast ratio 3.04
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", { level: "AA", size: "small" }),
+ "not readable - AA small"
+ );
+ assert(
+ tinycolor.isReadable("#ff0088", "#5c1a72", { level: "AA", size: "large" }),
+ "readable - AA large"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", {
+ level: "AAA",
+ size: "small",
+ }),
+ "not readable - AAA small"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", {
+ level: "AAA",
+ size: "large",
+ }),
+ "not readable - AAA large"
+ );
+
+ // "#ff0088", "#2e0c3a": contrast ratio 4.56
+ assert(
+ tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AA", size: "small" }),
+ "readable - AA small"
+ );
+ assert(
+ tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AA", size: "large" }),
+ "readable - AA large"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#2e0c3a", {
+ level: "AAA",
+ size: "small",
+ }),
+ "not readable - AAA small"
+ );
+ assert(
+ tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AAA", size: "large" }),
+ "readable - AAA large"
+ );
+
+ // "#db91b8", "#2e0c3a": contrast ratio 7.12
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AA", size: "small" }),
+ "readable - AA small"
+ );
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AA", size: "large" }),
+ "readable - AA large"
+ );
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AAA", size: "small" }),
+ "readable - AAA small"
+ );
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AAA", size: "large" }),
+ "readable - AAA large"
+ );
+});
+
+Deno.test("readability", function () {
+ // check return values from readability function. See isReadable above for standards tests.
+ assertEquals(
+ tinycolor.readability("#000", "#000"),
+ 1,
+ "Readability function test 0"
+ );
+ assertEquals(
+ tinycolor.readability("#000", "#111"),
+ 1.1121078324840545,
+ "Readability function test 1"
+ );
+ assertEquals(
+ tinycolor.readability("#000", "#fff"),
+ 21,
+ "Readability function test 2"
+ );
+});
+
+Deno.test("mostReadable", function () {
+ assertEquals(
+ tinycolor
+ .mostReadable("#000", ["#111", "#222", { wcag2: {} }])
+ .toHexString(),
+ "#222222",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#f00", ["#d00", "#0d0"], { wcag2: {} })
+ .toHexString(),
+ "#00dd00",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#fff", ["#fff", "#fff"], { wcag2: {} })
+ .toHexString(),
+ "#ffffff",
+ "no different color in list"
+ );
+ //includeFallbackColors
+ assertEquals(
+ tinycolor
+ .mostReadable("#fff", ["#fff", "#fff"], {
+ includeFallbackColors: true,
+ })
+ .toHexString(),
+ "#000000",
+ "no different color in list"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#123", ["#124", "#125"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#112255",
+ "no readable color in list"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#123", ["#000", "#fff"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#ffffff",
+ "verify assumption"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#123", ["#124", "#125"], {
+ includeFallbackColors: true,
+ })
+ .toHexString(),
+ "#ffffff",
+ "no readable color in list"
+ );
+
+ assertEquals(
+ tinycolor
+ .mostReadable("#ff0088", ["#000", "#fff"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#000000",
+ "verify assumption"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#ff0088", ["#2e0c3a"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "large",
+ })
+ .toHexString(),
+ "#2e0c3a",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#ff0088", ["#2e0c3a"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "small",
+ })
+ .toHexString(),
+ "#000000",
+ "no readable color in list"
+ );
+
+ assertEquals(
+ tinycolor
+ .mostReadable("#371b2c", ["#000", "#fff"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#ffffff",
+ "verify assumption"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#371b2c", ["#a9acb6"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "large",
+ })
+ .toHexString(),
+ "#a9acb6",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#371b2c", ["#a9acb6"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "small",
+ })
+ .toHexString(),
+ "#ffffff",
+ "no readable color in list"
+ );
+});
+
+Deno.test("Filters", function () {
+ assertEquals(
+ tinycolor("red").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)"
+ );
+ assertEquals(
+ tinycolor("red").toFilter("blue"),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ff0000ff)"
+ );
+
+ assertEquals(
+ tinycolor("transparent").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr=#00000000)"
+ );
+ assertEquals(
+ tinycolor("transparent").toFilter("red"),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr=#ffff0000)"
+ );
+
+ assertEquals(
+ tinycolor("#f0f0f0dd").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ddf0f0f0,endColorstr=#ddf0f0f0)"
+ );
+ assertEquals(
+ tinycolor("rgba(0, 0, 255, .5").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#800000ff,endColorstr=#800000ff)"
+ );
+});
+
+/* Originally generated with:
+var results = [];
+for (var i = 0; i <= 100; i++) results.push( tinycolor.saturate("red", i).toHex() )
+console.log(JSON.stringify(results))
+*/
+var DESATURATIONS = [
+ "ff0000",
+ "fe0101",
+ "fc0303",
+ "fb0404",
+ "fa0505",
+ "f90606",
+ "f70808",
+ "f60909",
+ "f50a0a",
+ "f40b0b",
+ "f20d0d",
+ "f10e0e",
+ "f00f0f",
+ "ee1111",
+ "ed1212",
+ "ec1313",
+ "eb1414",
+ "e91616",
+ "e81717",
+ "e71818",
+ "e61919",
+ "e41b1b",
+ "e31c1c",
+ "e21d1d",
+ "e01f1f",
+ "df2020",
+ "de2121",
+ "dd2222",
+ "db2424",
+ "da2525",
+ "d92626",
+ "d72828",
+ "d62929",
+ "d52a2a",
+ "d42b2b",
+ "d22d2d",
+ "d12e2e",
+ "d02f2f",
+ "cf3030",
+ "cd3232",
+ "cc3333",
+ "cb3434",
+ "c93636",
+ "c83737",
+ "c73838",
+ "c63939",
+ "c43b3b",
+ "c33c3c",
+ "c23d3d",
+ "c13e3e",
+ "bf4040",
+ "be4141",
+ "bd4242",
+ "bb4444",
+ "ba4545",
+ "b94646",
+ "b84747",
+ "b64949",
+ "b54a4a",
+ "b44b4b",
+ "b34d4d",
+ "b14e4e",
+ "b04f4f",
+ "af5050",
+ "ad5252",
+ "ac5353",
+ "ab5454",
+ "aa5555",
+ "a85757",
+ "a75858",
+ "a65959",
+ "a45b5b",
+ "a35c5c",
+ "a25d5d",
+ "a15e5e",
+ "9f6060",
+ "9e6161",
+ "9d6262",
+ "9c6363",
+ "9a6565",
+ "996666",
+ "986767",
+ "966969",
+ "956a6a",
+ "946b6b",
+ "936c6c",
+ "916e6e",
+ "906f6f",
+ "8f7070",
+ "8e7171",
+ "8c7373",
+ "8b7474",
+ "8a7575",
+ "887777",
+ "877878",
+ "867979",
+ "857a7a",
+ "837c7c",
+ "827d7d",
+ "817e7e",
+ "808080",
+];
+var SATURATIONS = [
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+];
+var LIGHTENS = [
+ "ff0000",
+ "ff0505",
+ "ff0a0a",
+ "ff0f0f",
+ "ff1414",
+ "ff1a1a",
+ "ff1f1f",
+ "ff2424",
+ "ff2929",
+ "ff2e2e",
+ "ff3333",
+ "ff3838",
+ "ff3d3d",
+ "ff4242",
+ "ff4747",
+ "ff4d4d",
+ "ff5252",
+ "ff5757",
+ "ff5c5c",
+ "ff6161",
+ "ff6666",
+ "ff6b6b",
+ "ff7070",
+ "ff7575",
+ "ff7a7a",
+ "ff8080",
+ "ff8585",
+ "ff8a8a",
+ "ff8f8f",
+ "ff9494",
+ "ff9999",
+ "ff9e9e",
+ "ffa3a3",
+ "ffa8a8",
+ "ffadad",
+ "ffb3b3",
+ "ffb8b8",
+ "ffbdbd",
+ "ffc2c2",
+ "ffc7c7",
+ "ffcccc",
+ "ffd1d1",
+ "ffd6d6",
+ "ffdbdb",
+ "ffe0e0",
+ "ffe5e5",
+ "ffebeb",
+ "fff0f0",
+ "fff5f5",
+ "fffafa",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+];
+var BRIGHTENS = [
+ "ff0000",
+ "ff0303",
+ "ff0505",
+ "ff0808",
+ "ff0a0a",
+ "ff0d0d",
+ "ff0f0f",
+ "ff1212",
+ "ff1414",
+ "ff1717",
+ "ff1919",
+ "ff1c1c",
+ "ff1f1f",
+ "ff2121",
+ "ff2424",
+ "ff2626",
+ "ff2929",
+ "ff2b2b",
+ "ff2e2e",
+ "ff3030",
+ "ff3333",
+ "ff3636",
+ "ff3838",
+ "ff3b3b",
+ "ff3d3d",
+ "ff4040",
+ "ff4242",
+ "ff4545",
+ "ff4747",
+ "ff4a4a",
+ "ff4c4c",
+ "ff4f4f",
+ "ff5252",
+ "ff5454",
+ "ff5757",
+ "ff5959",
+ "ff5c5c",
+ "ff5e5e",
+ "ff6161",
+ "ff6363",
+ "ff6666",
+ "ff6969",
+ "ff6b6b",
+ "ff6e6e",
+ "ff7070",
+ "ff7373",
+ "ff7575",
+ "ff7878",
+ "ff7a7a",
+ "ff7d7d",
+ "ff7f7f",
+ "ff8282",
+ "ff8585",
+ "ff8787",
+ "ff8a8a",
+ "ff8c8c",
+ "ff8f8f",
+ "ff9191",
+ "ff9494",
+ "ff9696",
+ "ff9999",
+ "ff9c9c",
+ "ff9e9e",
+ "ffa1a1",
+ "ffa3a3",
+ "ffa6a6",
+ "ffa8a8",
+ "ffabab",
+ "ffadad",
+ "ffb0b0",
+ "ffb2b2",
+ "ffb5b5",
+ "ffb8b8",
+ "ffbaba",
+ "ffbdbd",
+ "ffbfbf",
+ "ffc2c2",
+ "ffc4c4",
+ "ffc7c7",
+ "ffc9c9",
+ "ffcccc",
+ "ffcfcf",
+ "ffd1d1",
+ "ffd4d4",
+ "ffd6d6",
+ "ffd9d9",
+ "ffdbdb",
+ "ffdede",
+ "ffe0e0",
+ "ffe3e3",
+ "ffe5e5",
+ "ffe8e8",
+ "ffebeb",
+ "ffeded",
+ "fff0f0",
+ "fff2f2",
+ "fff5f5",
+ "fff7f7",
+ "fffafa",
+ "fffcfc",
+ "ffffff",
+];
+var DARKENS = [
+ "ff0000",
+ "fa0000",
+ "f50000",
+ "f00000",
+ "eb0000",
+ "e60000",
+ "e00000",
+ "db0000",
+ "d60000",
+ "d10000",
+ "cc0000",
+ "c70000",
+ "c20000",
+ "bd0000",
+ "b80000",
+ "b30000",
+ "ad0000",
+ "a80000",
+ "a30000",
+ "9e0000",
+ "990000",
+ "940000",
+ "8f0000",
+ "8a0000",
+ "850000",
+ "800000",
+ "7a0000",
+ "750000",
+ "700000",
+ "6b0000",
+ "660000",
+ "610000",
+ "5c0000",
+ "570000",
+ "520000",
+ "4d0000",
+ "470000",
+ "420000",
+ "3d0000",
+ "380000",
+ "330000",
+ "2e0000",
+ "290000",
+ "240000",
+ "1f0000",
+ "190000",
+ "140000",
+ "0f0000",
+ "0a0000",
+ "050000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+];
+
+Deno.test("Modifications", function () {
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").desaturate(i).toHex(),
+ DESATURATIONS[i],
+ "Desaturation " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").saturate(i).toHex(),
+ SATURATIONS[i],
+ "Saturation " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").lighten(i).toHex(),
+ LIGHTENS[i],
+ "Lighten " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").brighten(i).toHex(),
+ BRIGHTENS[i],
+ "Brighter " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").darken(i).toHex(),
+ DARKENS[i],
+ "Darken " + i + " works"
+ );
+ }
+
+ assertEquals(
+ tinycolor("red").greyscale().toHex(),
+ "808080",
+ "Greyscale works"
+ );
+});
+
+Deno.test("Spin", function () {
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(-1234).toHsl().h),
+ 206,
+ "Spinning -1234 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(-360).toHsl().h),
+ 0,
+ "Spinning -360 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(-120).toHsl().h),
+ 240,
+ "Spinning -120 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(0).toHsl().h),
+ 0,
+ "Spinning 0 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(10).toHsl().h),
+ 10,
+ "Spinning 10 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(360).toHsl().h),
+ 0,
+ "Spinning 360 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(2345).toHsl().h),
+ 185,
+ "Spinning 2345 works"
+ );
+
+ [-360, 0, 360].forEach(function (delta) {
+ Object.keys(tinycolor.names).forEach(function (name) {
+ assertEquals(
+ tinycolor(name).toHex(),
+ tinycolor(name).spin(delta).toHex(),
+ "Spinning " + delta.toString() + " has no effect"
+ );
+ });
+ });
+});
+
+Deno.test("Mix", function () {
+ // amount 0 or none
+ assertEquals(
+ tinycolor.mix("#000", "#fff").toHsl().l,
+ 0.5,
+ "Mixing without amount works"
+ );
+ assertEquals(
+ tinycolor.mix("#f00", "#000", 0).toHex(),
+ "ff0000",
+ "Mixing with 0 amount works"
+ );
+ // This case checks the the problem with floating point numbers (eg 255/90)
+ assertEquals(
+ tinycolor.mix("#fff", "#000", 90).toHex(),
+ "1a1a1a",
+ "Mixing with 90 amount works correctly"
+ );
+
+ // black and white
+ for (var i = 0; i < 100; i++) {
+ assertEquals(
+ Math.round(tinycolor.mix("#000", "#fff", i).toHsl().l * 100) / 100,
+ i / 100,
+ "Mixing black and white with " + i + " amount works"
+ );
+ }
+
+ // with colors
+ for (var i = 0; i < 100; i++) {
+ var new_hex = Math.round((255 * (100 - i)) / 100).toString(16);
+
+ if (new_hex.length === 1) {
+ new_hex = "0" + new_hex;
+ }
+
+ assertEquals(
+ tinycolor.mix("#f00", "#000", i).toHex(),
+ new_hex + "0000",
+ "Mixing " + i + " (red channel)"
+ );
+ assertEquals(
+ tinycolor.mix("#0f0", "#000", i).toHex(),
+ "00" + new_hex + "00",
+ "Mixing " + i + " (green channel)"
+ );
+ assertEquals(
+ tinycolor.mix("#00f", "#000", i).toHex(),
+ "0000" + new_hex,
+ "Mixing " + i + " (blue channel)"
+ );
+ assertEquals(
+ tinycolor.mix(tinycolor("transparent"), "#000", i).toRgb().a,
+ i / 100,
+ "Mixing " + i + " (alpha channel)"
+ );
+ }
+});
+
+// The combination tests need to be expanded furthe
+
+function colorsToHexString(colors) {
+ return colors
+ .map(function (c) {
+ return c.toHex();
+ })
+ .join(",");
+}
+
+Deno.test("complement", function () {
+ var complementDoesntModifyInstance = tinycolor("red");
+ assertEquals(
+ complementDoesntModifyInstance.complement().toHex(),
+ "00ffff",
+ "Complement works"
+ );
+ assertEquals(
+ complementDoesntModifyInstance.toHex(),
+ "ff0000",
+ "Complement did not modify this color"
+ );
+});
+
+Deno.test("analogous", function () {
+ var combination = tinycolor("red").analogous();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,ff0066,ff0033,ff0000,ff3300,ff6600",
+ "Correct Combination"
+ );
+});
+
+Deno.test("monochromatic", function () {
+ var combination = tinycolor("red").monochromatic();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,2a0000,550000,800000,aa0000,d40000",
+ "Correct Combination"
+ );
+});
+
+Deno.test("splitcomplement", function () {
+ var combination = tinycolor("red").splitcomplement();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,ccff00,0066ff",
+ "Correct Combination"
+ );
+});
+
+Deno.test("triad", function () {
+ var combination = tinycolor("red").triad();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,00ff00,0000ff",
+ "Correct Combination"
+ );
+});
+
+Deno.test("tetrad", function () {
+ var combination = tinycolor("red").tetrad();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,80ff00,00ffff,7f00ff",
+ "Correct Combination"
+ );
+});
+
+Deno.test({
+ name: "polyad",
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
+ ignore: true,
+ fn: function () {
+ assertThrows(() => {
+ tinycolor("red").polyad();
+ });
+ assertThrows(() => {
+ tinycolor("red").polyad(-1);
+ });
+ assertThrows(() => {
+ tinycolor("red").polyad("invalid");
+ });
+ assertEquals(colorsToHexString(tinycolor("red").polyad(1)), "ff0000");
+ assertEquals(colorsToHexString(tinycolor("red").polyad("1")), "ff0000");
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(2)),
+ "ff0000,00ffff"
+ );
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(3)),
+ "ff0000,00ff00,0000ff"
+ );
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(4)),
+ "ff0000,80ff00,00ffff,7f00ff"
+ );
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(5)),
+ "ff0000,ccff00,00ff66,0066ff,cc00ff"
+ );
+ },
+});
+
+ runDenoTests();
+})();
diff --git a/vendor/assets/javascripts/tinycolor/npm/cjs/test_template.js b/vendor/assets/javascripts/tinycolor/npm/cjs/test_template.js
new file mode 100644
index 000000000..d170c2cd7
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/npm/cjs/test_template.js
@@ -0,0 +1,26 @@
+// This file is autogenerated.
+// Ideally it wouldn't exist, but it's here to test cjs in node
+// Changes should go into ./test.js, and if new assertions are needed
+// they'll need to be shimmed here as well
+const tinycolor = require("./tinycolor.js");
+const { Deno, testDefinitions } = require("@deno/shim-deno-test");
+async function runDenoTests() {
+ for (const test of testDefinitions) {
+ if (test.ignore) {
+ console.log(`Ignoring ${test.name}`);
+ continue;
+ }
+ console.log(`Running ${test.name}`);
+ await test.fn();
+ console.log(`> Passed ${test.name}`);
+ }
+}
+(async () => {
+ const { assertEquals, assert, assertThrows } = await import(
+ "../deno_asserts@0.168.0.mjs"
+ );
+
+ // CONTENT_GOES_HERE
+
+ runDenoTests();
+})();
diff --git a/vendor/assets/javascripts/tinycolor/npm/cjs/tinycolor.js b/vendor/assets/javascripts/tinycolor/npm/cjs/tinycolor.js
new file mode 100644
index 000000000..4f584cab5
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/npm/cjs/tinycolor.js
@@ -0,0 +1,1188 @@
+// This file is autogenerated. It's used to publish CJS to npm.
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.tinycolor = factory());
+})(this, (function () { 'use strict';
+
+ function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
+ return typeof obj;
+ } : function (obj) {
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ }, _typeof(obj);
+ }
+
+ // https://github.com/bgrins/TinyColor
+ // Brian Grinstead, MIT License
+
+ var trimLeft = /^\s+/;
+ var trimRight = /\s+$/;
+ function tinycolor(color, opts) {
+ color = color ? color : "";
+ opts = opts || {};
+
+ // If input is already a tinycolor, return itself
+ if (color instanceof tinycolor) {
+ return color;
+ }
+ // If we are called as a function, call using new instead
+ if (!(this instanceof tinycolor)) {
+ return new tinycolor(color, opts);
+ }
+ var rgb = inputToRGB(color);
+ this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;
+ this._gradientType = opts.gradientType;
+
+ // Don't let the range of [0,255] come back in [0,1].
+ // Potentially lose a little bit of precision here, but will fix issues where
+ // .5 gets interpreted as half of the total, instead of half of 1
+ // If it was supposed to be 128, this was already taken care of by `inputToRgb`
+ if (this._r < 1) this._r = Math.round(this._r);
+ if (this._g < 1) this._g = Math.round(this._g);
+ if (this._b < 1) this._b = Math.round(this._b);
+ this._ok = rgb.ok;
+ }
+ tinycolor.prototype = {
+ isDark: function isDark() {
+ return this.getBrightness() < 128;
+ },
+ isLight: function isLight() {
+ return !this.isDark();
+ },
+ isValid: function isValid() {
+ return this._ok;
+ },
+ getOriginalInput: function getOriginalInput() {
+ return this._originalInput;
+ },
+ getFormat: function getFormat() {
+ return this._format;
+ },
+ getAlpha: function getAlpha() {
+ return this._a;
+ },
+ getBrightness: function getBrightness() {
+ //http://www.w3.org/TR/AERT#color-contrast
+ var rgb = this.toRgb();
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
+ },
+ getLuminance: function getLuminance() {
+ //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
+ var rgb = this.toRgb();
+ var RsRGB, GsRGB, BsRGB, R, G, B;
+ RsRGB = rgb.r / 255;
+ GsRGB = rgb.g / 255;
+ BsRGB = rgb.b / 255;
+ if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
+ if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
+ if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
+ return 0.2126 * R + 0.7152 * G + 0.0722 * B;
+ },
+ setAlpha: function setAlpha(value) {
+ this._a = boundAlpha(value);
+ this._roundA = Math.round(100 * this._a) / 100;
+ return this;
+ },
+ toHsv: function toHsv() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ return {
+ h: hsv.h * 360,
+ s: hsv.s,
+ v: hsv.v,
+ a: this._a
+ };
+ },
+ toHsvString: function toHsvString() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ var h = Math.round(hsv.h * 360),
+ s = Math.round(hsv.s * 100),
+ v = Math.round(hsv.v * 100);
+ return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
+ },
+ toHsl: function toHsl() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ return {
+ h: hsl.h * 360,
+ s: hsl.s,
+ l: hsl.l,
+ a: this._a
+ };
+ },
+ toHslString: function toHslString() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ var h = Math.round(hsl.h * 360),
+ s = Math.round(hsl.s * 100),
+ l = Math.round(hsl.l * 100);
+ return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
+ },
+ toHex: function toHex(allow3Char) {
+ return rgbToHex(this._r, this._g, this._b, allow3Char);
+ },
+ toHexString: function toHexString(allow3Char) {
+ return "#" + this.toHex(allow3Char);
+ },
+ toHex8: function toHex8(allow4Char) {
+ return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
+ },
+ toHex8String: function toHex8String(allow4Char) {
+ return "#" + this.toHex8(allow4Char);
+ },
+ toRgb: function toRgb() {
+ return {
+ r: Math.round(this._r),
+ g: Math.round(this._g),
+ b: Math.round(this._b),
+ a: this._a
+ };
+ },
+ toRgbString: function toRgbString() {
+ return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
+ },
+ toPercentageRgb: function toPercentageRgb() {
+ return {
+ r: Math.round(bound01(this._r, 255) * 100) + "%",
+ g: Math.round(bound01(this._g, 255) * 100) + "%",
+ b: Math.round(bound01(this._b, 255) * 100) + "%",
+ a: this._a
+ };
+ },
+ toPercentageRgbString: function toPercentageRgbString() {
+ return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
+ },
+ toName: function toName() {
+ if (this._a === 0) {
+ return "transparent";
+ }
+ if (this._a < 1) {
+ return false;
+ }
+ return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
+ },
+ toFilter: function toFilter(secondColor) {
+ var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
+ var secondHex8String = hex8String;
+ var gradientType = this._gradientType ? "GradientType = 1, " : "";
+ if (secondColor) {
+ var s = tinycolor(secondColor);
+ secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
+ }
+ return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
+ },
+ toString: function toString(format) {
+ var formatSet = !!format;
+ format = format || this._format;
+ var formattedString = false;
+ var hasAlpha = this._a < 1 && this._a >= 0;
+ var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
+ if (needsAlphaFormat) {
+ // Special case for "transparent", all other non-alpha formats
+ // will return rgba when there is transparency.
+ if (format === "name" && this._a === 0) {
+ return this.toName();
+ }
+ return this.toRgbString();
+ }
+ if (format === "rgb") {
+ formattedString = this.toRgbString();
+ }
+ if (format === "prgb") {
+ formattedString = this.toPercentageRgbString();
+ }
+ if (format === "hex" || format === "hex6") {
+ formattedString = this.toHexString();
+ }
+ if (format === "hex3") {
+ formattedString = this.toHexString(true);
+ }
+ if (format === "hex4") {
+ formattedString = this.toHex8String(true);
+ }
+ if (format === "hex8") {
+ formattedString = this.toHex8String();
+ }
+ if (format === "name") {
+ formattedString = this.toName();
+ }
+ if (format === "hsl") {
+ formattedString = this.toHslString();
+ }
+ if (format === "hsv") {
+ formattedString = this.toHsvString();
+ }
+ return formattedString || this.toHexString();
+ },
+ clone: function clone() {
+ return tinycolor(this.toString());
+ },
+ _applyModification: function _applyModification(fn, args) {
+ var color = fn.apply(null, [this].concat([].slice.call(args)));
+ this._r = color._r;
+ this._g = color._g;
+ this._b = color._b;
+ this.setAlpha(color._a);
+ return this;
+ },
+ lighten: function lighten() {
+ return this._applyModification(_lighten, arguments);
+ },
+ brighten: function brighten() {
+ return this._applyModification(_brighten, arguments);
+ },
+ darken: function darken() {
+ return this._applyModification(_darken, arguments);
+ },
+ desaturate: function desaturate() {
+ return this._applyModification(_desaturate, arguments);
+ },
+ saturate: function saturate() {
+ return this._applyModification(_saturate, arguments);
+ },
+ greyscale: function greyscale() {
+ return this._applyModification(_greyscale, arguments);
+ },
+ spin: function spin() {
+ return this._applyModification(_spin, arguments);
+ },
+ _applyCombination: function _applyCombination(fn, args) {
+ return fn.apply(null, [this].concat([].slice.call(args)));
+ },
+ analogous: function analogous() {
+ return this._applyCombination(_analogous, arguments);
+ },
+ complement: function complement() {
+ return this._applyCombination(_complement, arguments);
+ },
+ monochromatic: function monochromatic() {
+ return this._applyCombination(_monochromatic, arguments);
+ },
+ splitcomplement: function splitcomplement() {
+ return this._applyCombination(_splitcomplement, arguments);
+ },
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
+ // polyad: function (number) {
+ // return this._applyCombination(polyad, [number]);
+ // },
+ triad: function triad() {
+ return this._applyCombination(polyad, [3]);
+ },
+ tetrad: function tetrad() {
+ return this._applyCombination(polyad, [4]);
+ }
+ };
+
+ // If input is an object, force 1 into "1.0" to handle ratios properly
+ // String input requires "1.0" as input, so 1 will be treated as 1
+ tinycolor.fromRatio = function (color, opts) {
+ if (_typeof(color) == "object") {
+ var newColor = {};
+ for (var i in color) {
+ if (color.hasOwnProperty(i)) {
+ if (i === "a") {
+ newColor[i] = color[i];
+ } else {
+ newColor[i] = convertToPercentage(color[i]);
+ }
+ }
+ }
+ color = newColor;
+ }
+ return tinycolor(color, opts);
+ };
+
+ // Given a string or object, convert that input to RGB
+ // Possible string inputs:
+ //
+ // "red"
+ // "#f00" or "f00"
+ // "#ff0000" or "ff0000"
+ // "#ff000000" or "ff000000"
+ // "rgb 255 0 0" or "rgb (255, 0, 0)"
+ // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
+ // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
+ // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
+ // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
+ // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
+ // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
+ //
+ function inputToRGB(color) {
+ var rgb = {
+ r: 0,
+ g: 0,
+ b: 0
+ };
+ var a = 1;
+ var s = null;
+ var v = null;
+ var l = null;
+ var ok = false;
+ var format = false;
+ if (typeof color == "string") {
+ color = stringInputToObject(color);
+ }
+ if (_typeof(color) == "object") {
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
+ rgb = rgbToRgb(color.r, color.g, color.b);
+ ok = true;
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
+ s = convertToPercentage(color.s);
+ v = convertToPercentage(color.v);
+ rgb = hsvToRgb(color.h, s, v);
+ ok = true;
+ format = "hsv";
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
+ s = convertToPercentage(color.s);
+ l = convertToPercentage(color.l);
+ rgb = hslToRgb(color.h, s, l);
+ ok = true;
+ format = "hsl";
+ }
+ if (color.hasOwnProperty("a")) {
+ a = color.a;
+ }
+ }
+ a = boundAlpha(a);
+ return {
+ ok: ok,
+ format: color.format || format,
+ r: Math.min(255, Math.max(rgb.r, 0)),
+ g: Math.min(255, Math.max(rgb.g, 0)),
+ b: Math.min(255, Math.max(rgb.b, 0)),
+ a: a
+ };
+ }
+
+ // Conversion Functions
+ // --------------------
+
+ // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
+ //
+
+ // `rgbToRgb`
+ // Handle bounds / percentage checking to conform to CSS color spec
+ //
+ // *Assumes:* r, g, b in [0, 255] or [0, 1]
+ // *Returns:* { r, g, b } in [0, 255]
+ function rgbToRgb(r, g, b) {
+ return {
+ r: bound01(r, 255) * 255,
+ g: bound01(g, 255) * 255,
+ b: bound01(b, 255) * 255
+ };
+ }
+
+ // `rgbToHsl`
+ // Converts an RGB color value to HSL.
+ // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
+ // *Returns:* { h, s, l } in [0,1]
+ function rgbToHsl(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ l = (max + min) / 2;
+ if (max == min) {
+ h = s = 0; // achromatic
+ } else {
+ var d = max - min;
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+ h /= 6;
+ }
+ return {
+ h: h,
+ s: s,
+ l: l
+ };
+ }
+
+ // `hslToRgb`
+ // Converts an HSL color value to RGB.
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
+ // *Returns:* { r, g, b } in the set [0, 255]
+ function hslToRgb(h, s, l) {
+ var r, g, b;
+ h = bound01(h, 360);
+ s = bound01(s, 100);
+ l = bound01(l, 100);
+ function hue2rgb(p, q, t) {
+ if (t < 0) t += 1;
+ if (t > 1) t -= 1;
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
+ if (t < 1 / 2) return q;
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+ return p;
+ }
+ if (s === 0) {
+ r = g = b = l; // achromatic
+ } else {
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+ var p = 2 * l - q;
+ r = hue2rgb(p, q, h + 1 / 3);
+ g = hue2rgb(p, q, h);
+ b = hue2rgb(p, q, h - 1 / 3);
+ }
+ return {
+ r: r * 255,
+ g: g * 255,
+ b: b * 255
+ };
+ }
+
+ // `rgbToHsv`
+ // Converts an RGB color value to HSV
+ // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
+ // *Returns:* { h, s, v } in [0,1]
+ function rgbToHsv(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ v = max;
+ var d = max - min;
+ s = max === 0 ? 0 : d / max;
+ if (max == min) {
+ h = 0; // achromatic
+ } else {
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+ h /= 6;
+ }
+ return {
+ h: h,
+ s: s,
+ v: v
+ };
+ }
+
+ // `hsvToRgb`
+ // Converts an HSV color value to RGB.
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
+ // *Returns:* { r, g, b } in the set [0, 255]
+ function hsvToRgb(h, s, v) {
+ h = bound01(h, 360) * 6;
+ s = bound01(s, 100);
+ v = bound01(v, 100);
+ var i = Math.floor(h),
+ f = h - i,
+ p = v * (1 - s),
+ q = v * (1 - f * s),
+ t = v * (1 - (1 - f) * s),
+ mod = i % 6,
+ r = [v, q, p, p, t, v][mod],
+ g = [t, v, v, q, p, p][mod],
+ b = [p, p, t, v, v, q][mod];
+ return {
+ r: r * 255,
+ g: g * 255,
+ b: b * 255
+ };
+ }
+
+ // `rgbToHex`
+ // Converts an RGB color to hex
+ // Assumes r, g, and b are contained in the set [0, 255]
+ // Returns a 3 or 6 character hex
+ function rgbToHex(r, g, b, allow3Char) {
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
+
+ // Return a 3 character hex if possible
+ if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
+ }
+ return hex.join("");
+ }
+
+ // `rgbaToHex`
+ // Converts an RGBA color plus alpha transparency to hex
+ // Assumes r, g, b are contained in the set [0, 255] and
+ // a in [0, 1]. Returns a 4 or 8 character rgba hex
+ function rgbaToHex(r, g, b, a, allow4Char) {
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
+
+ // Return a 4 character hex if possible
+ if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
+ }
+ return hex.join("");
+ }
+
+ // `rgbaToArgbHex`
+ // Converts an RGBA color to an ARGB Hex8 string
+ // Rarely used, but required for "toFilter()"
+ function rgbaToArgbHex(r, g, b, a) {
+ var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
+ return hex.join("");
+ }
+
+ // `equals`
+ // Can be called with any tinycolor input
+ tinycolor.equals = function (color1, color2) {
+ if (!color1 || !color2) return false;
+ return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
+ };
+ tinycolor.random = function () {
+ return tinycolor.fromRatio({
+ r: Math.random(),
+ g: Math.random(),
+ b: Math.random()
+ });
+ };
+
+ // Modification Functions
+ // ----------------------
+ // Thanks to less.js for some of the basics here
+ //
+
+ function _desaturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s -= amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+ }
+ function _saturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s += amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+ }
+ function _greyscale(color) {
+ return tinycolor(color).desaturate(100);
+ }
+ function _lighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l += amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+ }
+ function _brighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var rgb = tinycolor(color).toRgb();
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
+ return tinycolor(rgb);
+ }
+ function _darken(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l -= amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+ }
+
+ // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
+ // Values outside of this range will be wrapped into this range.
+ function _spin(color, amount) {
+ var hsl = tinycolor(color).toHsl();
+ var hue = (hsl.h + amount) % 360;
+ hsl.h = hue < 0 ? 360 + hue : hue;
+ return tinycolor(hsl);
+ }
+
+ // Combination Functions
+ // ---------------------
+ // Thanks to jQuery xColor for some of the ideas behind these
+ //
+
+ function _complement(color) {
+ var hsl = tinycolor(color).toHsl();
+ hsl.h = (hsl.h + 180) % 360;
+ return tinycolor(hsl);
+ }
+ function polyad(color, number) {
+ if (isNaN(number) || number <= 0) {
+ throw new Error("Argument to polyad must be a positive number");
+ }
+ var hsl = tinycolor(color).toHsl();
+ var result = [tinycolor(color)];
+ var step = 360 / number;
+ for (var i = 1; i < number; i++) {
+ result.push(tinycolor({
+ h: (hsl.h + i * step) % 360,
+ s: hsl.s,
+ l: hsl.l
+ }));
+ }
+ return result;
+ }
+ function _splitcomplement(color) {
+ var hsl = tinycolor(color).toHsl();
+ var h = hsl.h;
+ return [tinycolor(color), tinycolor({
+ h: (h + 72) % 360,
+ s: hsl.s,
+ l: hsl.l
+ }), tinycolor({
+ h: (h + 216) % 360,
+ s: hsl.s,
+ l: hsl.l
+ })];
+ }
+ function _analogous(color, results, slices) {
+ results = results || 6;
+ slices = slices || 30;
+ var hsl = tinycolor(color).toHsl();
+ var part = 360 / slices;
+ var ret = [tinycolor(color)];
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
+ hsl.h = (hsl.h + part) % 360;
+ ret.push(tinycolor(hsl));
+ }
+ return ret;
+ }
+ function _monochromatic(color, results) {
+ results = results || 6;
+ var hsv = tinycolor(color).toHsv();
+ var h = hsv.h,
+ s = hsv.s,
+ v = hsv.v;
+ var ret = [];
+ var modification = 1 / results;
+ while (results--) {
+ ret.push(tinycolor({
+ h: h,
+ s: s,
+ v: v
+ }));
+ v = (v + modification) % 1;
+ }
+ return ret;
+ }
+
+ // Utility Functions
+ // ---------------------
+
+ tinycolor.mix = function (color1, color2, amount) {
+ amount = amount === 0 ? 0 : amount || 50;
+ var rgb1 = tinycolor(color1).toRgb();
+ var rgb2 = tinycolor(color2).toRgb();
+ var p = amount / 100;
+ var rgba = {
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
+ };
+ return tinycolor(rgba);
+ };
+
+ // Readability Functions
+ // ---------------------
+ // false
+ // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
+ tinycolor.isReadable = function (color1, color2, wcag2) {
+ var readability = tinycolor.readability(color1, color2);
+ var wcag2Parms, out;
+ out = false;
+ wcag2Parms = validateWCAG2Parms(wcag2);
+ switch (wcag2Parms.level + wcag2Parms.size) {
+ case "AAsmall":
+ case "AAAlarge":
+ out = readability >= 4.5;
+ break;
+ case "AAlarge":
+ out = readability >= 3;
+ break;
+ case "AAAsmall":
+ out = readability >= 7;
+ break;
+ }
+ return out;
+ };
+
+ // `mostReadable`
+ // Given a base color and a list of possible foreground or background
+ // colors for that base, returns the most readable color.
+ // Optionally returns Black or White if the most readable color is unreadable.
+ // *Example*
+ // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
+ // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
+ // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
+ // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
+ tinycolor.mostReadable = function (baseColor, colorList, args) {
+ var bestColor = null;
+ var bestScore = 0;
+ var readability;
+ var includeFallbackColors, level, size;
+ args = args || {};
+ includeFallbackColors = args.includeFallbackColors;
+ level = args.level;
+ size = args.size;
+ for (var i = 0; i < colorList.length; i++) {
+ readability = tinycolor.readability(baseColor, colorList[i]);
+ if (readability > bestScore) {
+ bestScore = readability;
+ bestColor = tinycolor(colorList[i]);
+ }
+ }
+ if (tinycolor.isReadable(baseColor, bestColor, {
+ level: level,
+ size: size
+ }) || !includeFallbackColors) {
+ return bestColor;
+ } else {
+ args.includeFallbackColors = false;
+ return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
+ }
+ };
+
+ // Big List of Colors
+ // ------------------
+ //
+ var names = tinycolor.names = {
+ aliceblue: "f0f8ff",
+ antiquewhite: "faebd7",
+ aqua: "0ff",
+ aquamarine: "7fffd4",
+ azure: "f0ffff",
+ beige: "f5f5dc",
+ bisque: "ffe4c4",
+ black: "000",
+ blanchedalmond: "ffebcd",
+ blue: "00f",
+ blueviolet: "8a2be2",
+ brown: "a52a2a",
+ burlywood: "deb887",
+ burntsienna: "ea7e5d",
+ cadetblue: "5f9ea0",
+ chartreuse: "7fff00",
+ chocolate: "d2691e",
+ coral: "ff7f50",
+ cornflowerblue: "6495ed",
+ cornsilk: "fff8dc",
+ crimson: "dc143c",
+ cyan: "0ff",
+ darkblue: "00008b",
+ darkcyan: "008b8b",
+ darkgoldenrod: "b8860b",
+ darkgray: "a9a9a9",
+ darkgreen: "006400",
+ darkgrey: "a9a9a9",
+ darkkhaki: "bdb76b",
+ darkmagenta: "8b008b",
+ darkolivegreen: "556b2f",
+ darkorange: "ff8c00",
+ darkorchid: "9932cc",
+ darkred: "8b0000",
+ darksalmon: "e9967a",
+ darkseagreen: "8fbc8f",
+ darkslateblue: "483d8b",
+ darkslategray: "2f4f4f",
+ darkslategrey: "2f4f4f",
+ darkturquoise: "00ced1",
+ darkviolet: "9400d3",
+ deeppink: "ff1493",
+ deepskyblue: "00bfff",
+ dimgray: "696969",
+ dimgrey: "696969",
+ dodgerblue: "1e90ff",
+ firebrick: "b22222",
+ floralwhite: "fffaf0",
+ forestgreen: "228b22",
+ fuchsia: "f0f",
+ gainsboro: "dcdcdc",
+ ghostwhite: "f8f8ff",
+ gold: "ffd700",
+ goldenrod: "daa520",
+ gray: "808080",
+ green: "008000",
+ greenyellow: "adff2f",
+ grey: "808080",
+ honeydew: "f0fff0",
+ hotpink: "ff69b4",
+ indianred: "cd5c5c",
+ indigo: "4b0082",
+ ivory: "fffff0",
+ khaki: "f0e68c",
+ lavender: "e6e6fa",
+ lavenderblush: "fff0f5",
+ lawngreen: "7cfc00",
+ lemonchiffon: "fffacd",
+ lightblue: "add8e6",
+ lightcoral: "f08080",
+ lightcyan: "e0ffff",
+ lightgoldenrodyellow: "fafad2",
+ lightgray: "d3d3d3",
+ lightgreen: "90ee90",
+ lightgrey: "d3d3d3",
+ lightpink: "ffb6c1",
+ lightsalmon: "ffa07a",
+ lightseagreen: "20b2aa",
+ lightskyblue: "87cefa",
+ lightslategray: "789",
+ lightslategrey: "789",
+ lightsteelblue: "b0c4de",
+ lightyellow: "ffffe0",
+ lime: "0f0",
+ limegreen: "32cd32",
+ linen: "faf0e6",
+ magenta: "f0f",
+ maroon: "800000",
+ mediumaquamarine: "66cdaa",
+ mediumblue: "0000cd",
+ mediumorchid: "ba55d3",
+ mediumpurple: "9370db",
+ mediumseagreen: "3cb371",
+ mediumslateblue: "7b68ee",
+ mediumspringgreen: "00fa9a",
+ mediumturquoise: "48d1cc",
+ mediumvioletred: "c71585",
+ midnightblue: "191970",
+ mintcream: "f5fffa",
+ mistyrose: "ffe4e1",
+ moccasin: "ffe4b5",
+ navajowhite: "ffdead",
+ navy: "000080",
+ oldlace: "fdf5e6",
+ olive: "808000",
+ olivedrab: "6b8e23",
+ orange: "ffa500",
+ orangered: "ff4500",
+ orchid: "da70d6",
+ palegoldenrod: "eee8aa",
+ palegreen: "98fb98",
+ paleturquoise: "afeeee",
+ palevioletred: "db7093",
+ papayawhip: "ffefd5",
+ peachpuff: "ffdab9",
+ peru: "cd853f",
+ pink: "ffc0cb",
+ plum: "dda0dd",
+ powderblue: "b0e0e6",
+ purple: "800080",
+ rebeccapurple: "663399",
+ red: "f00",
+ rosybrown: "bc8f8f",
+ royalblue: "4169e1",
+ saddlebrown: "8b4513",
+ salmon: "fa8072",
+ sandybrown: "f4a460",
+ seagreen: "2e8b57",
+ seashell: "fff5ee",
+ sienna: "a0522d",
+ silver: "c0c0c0",
+ skyblue: "87ceeb",
+ slateblue: "6a5acd",
+ slategray: "708090",
+ slategrey: "708090",
+ snow: "fffafa",
+ springgreen: "00ff7f",
+ steelblue: "4682b4",
+ tan: "d2b48c",
+ teal: "008080",
+ thistle: "d8bfd8",
+ tomato: "ff6347",
+ turquoise: "40e0d0",
+ violet: "ee82ee",
+ wheat: "f5deb3",
+ white: "fff",
+ whitesmoke: "f5f5f5",
+ yellow: "ff0",
+ yellowgreen: "9acd32"
+ };
+
+ // Make it easy to access colors via `hexNames[hex]`
+ var hexNames = tinycolor.hexNames = flip(names);
+
+ // Utilities
+ // ---------
+
+ // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
+ function flip(o) {
+ var flipped = {};
+ for (var i in o) {
+ if (o.hasOwnProperty(i)) {
+ flipped[o[i]] = i;
+ }
+ }
+ return flipped;
+ }
+
+ // Return a valid alpha value [0,1] with all invalid values being set to 1
+ function boundAlpha(a) {
+ a = parseFloat(a);
+ if (isNaN(a) || a < 0 || a > 1) {
+ a = 1;
+ }
+ return a;
+ }
+
+ // Take input from [0, n] and return it as [0, 1]
+ function bound01(n, max) {
+ if (isOnePointZero(n)) n = "100%";
+ var processPercent = isPercentage(n);
+ n = Math.min(max, Math.max(0, parseFloat(n)));
+
+ // Automatically convert percentage into number
+ if (processPercent) {
+ n = parseInt(n * max, 10) / 100;
+ }
+
+ // Handle floating point rounding errors
+ if (Math.abs(n - max) < 0.000001) {
+ return 1;
+ }
+
+ // Convert into [0, 1] range if it isn't already
+ return n % max / parseFloat(max);
+ }
+
+ // Force a number between 0 and 1
+ function clamp01(val) {
+ return Math.min(1, Math.max(0, val));
+ }
+
+ // Parse a base-16 hex value into a base-10 integer
+ function parseIntFromHex(val) {
+ return parseInt(val, 16);
+ }
+
+ // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
+ //
+ function isOnePointZero(n) {
+ return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
+ }
+
+ // Check to see if string passed in is a percentage
+ function isPercentage(n) {
+ return typeof n === "string" && n.indexOf("%") != -1;
+ }
+
+ // Force a hex value to have 2 characters
+ function pad2(c) {
+ return c.length == 1 ? "0" + c : "" + c;
+ }
+
+ // Replace a decimal with it's percentage value
+ function convertToPercentage(n) {
+ if (n <= 1) {
+ n = n * 100 + "%";
+ }
+ return n;
+ }
+
+ // Converts a decimal to a hex value
+ function convertDecimalToHex(d) {
+ return Math.round(parseFloat(d) * 255).toString(16);
+ }
+ // Converts a hex value to a decimal
+ function convertHexToDecimal(h) {
+ return parseIntFromHex(h) / 255;
+ }
+ var matchers = function () {
+ //
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
+
+ //
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
+
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
+
+ // Actual matching.
+ // Parentheses and commas are optional, but not required.
+ // Whitespace can take the place of commas or opening paren
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+ return {
+ CSS_UNIT: new RegExp(CSS_UNIT),
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
+ };
+ }();
+
+ // `isValidCSSUnit`
+ // Take in a single string / number and check to see if it looks like a CSS unit
+ // (see `matchers` above for definition).
+ function isValidCSSUnit(color) {
+ return !!matchers.CSS_UNIT.exec(color);
+ }
+
+ // `stringInputToObject`
+ // Permissive string parsing. Take in a number of formats, and output an object
+ // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
+ function stringInputToObject(color) {
+ color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
+ var named = false;
+ if (names[color]) {
+ color = names[color];
+ named = true;
+ } else if (color == "transparent") {
+ return {
+ r: 0,
+ g: 0,
+ b: 0,
+ a: 0,
+ format: "name"
+ };
+ }
+
+ // Try to match string input using regular expressions.
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
+ // Just return an object and let the conversion functions handle that.
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
+ var match;
+ if (match = matchers.rgb.exec(color)) {
+ return {
+ r: match[1],
+ g: match[2],
+ b: match[3]
+ };
+ }
+ if (match = matchers.rgba.exec(color)) {
+ return {
+ r: match[1],
+ g: match[2],
+ b: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hsl.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ l: match[3]
+ };
+ }
+ if (match = matchers.hsla.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ l: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hsv.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ v: match[3]
+ };
+ }
+ if (match = matchers.hsva.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ v: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hex8.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ a: convertHexToDecimal(match[4]),
+ format: named ? "name" : "hex8"
+ };
+ }
+ if (match = matchers.hex6.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+ if (match = matchers.hex4.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ a: convertHexToDecimal(match[4] + "" + match[4]),
+ format: named ? "name" : "hex8"
+ };
+ }
+ if (match = matchers.hex3.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+ return false;
+ }
+ function validateWCAG2Parms(parms) {
+ // return valid WCAG2 parms for isReadable.
+ // If input parms are invalid, return {"level":"AA", "size":"small"}
+ var level, size;
+ parms = parms || {
+ level: "AA",
+ size: "small"
+ };
+ level = (parms.level || "AA").toUpperCase();
+ size = (parms.size || "small").toLowerCase();
+ if (level !== "AA" && level !== "AAA") {
+ level = "AA";
+ }
+ if (size !== "small" && size !== "large") {
+ size = "small";
+ }
+ return {
+ level: level,
+ size: size
+ };
+ }
+
+ return tinycolor;
+
+}));
diff --git a/vendor/assets/javascripts/tinycolor/npm/dist/tinycolor-min.js b/vendor/assets/javascripts/tinycolor/npm/dist/tinycolor-min.js
new file mode 100644
index 000000000..14389aa18
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/npm/dist/tinycolor-min.js
@@ -0,0 +1,5 @@
+// This file is autogenerated.
+// It's here at this path for backwards compatibility for links to it
+// but the npm package now exports both CJS and ESM.
+// See https://github.com/bgrins/TinyColor/ for instructions.
+ !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).tinycolor=r()}(this,(function(){"use strict";function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}var r=/^\s+/,e=/\s+$/;function n(a,i){if(i=i||{},(a=a||"")instanceof n)return a;if(!(this instanceof n))return new n(a,i);var o=function(n){var a={r:0,g:0,b:0},i=1,o=null,h=null,s=null,f=!1,u=!1;"string"==typeof n&&(n=function(t){t=t.replace(r,"").replace(e,"").toLowerCase();var n,a=!1;if(y[t])t=y[t],a=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(n=T.rgb.exec(t))return{r:n[1],g:n[2],b:n[3]};if(n=T.rgba.exec(t))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=T.hsl.exec(t))return{h:n[1],s:n[2],l:n[3]};if(n=T.hsla.exec(t))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=T.hsv.exec(t))return{h:n[1],s:n[2],v:n[3]};if(n=T.hsva.exec(t))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=T.hex8.exec(t))return{r:w(n[1]),g:w(n[2]),b:w(n[3]),a:F(n[4]),format:a?"name":"hex8"};if(n=T.hex6.exec(t))return{r:w(n[1]),g:w(n[2]),b:w(n[3]),format:a?"name":"hex"};if(n=T.hex4.exec(t))return{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),a:F(n[4]+""+n[4]),format:a?"name":"hex8"};if(n=T.hex3.exec(t))return{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),format:a?"name":"hex"};return!1}(n));"object"==t(n)&&(E(n.r)&&E(n.g)&&E(n.b)?(l=n.r,c=n.g,d=n.b,a={r:255*A(l,255),g:255*A(c,255),b:255*A(d,255)},f=!0,u="%"===String(n.r).substr(-1)?"prgb":"rgb"):E(n.h)&&E(n.s)&&E(n.v)?(o=H(n.s),h=H(n.v),a=function(t,r,e){t=6*A(t,360),r=A(r,100),e=A(e,100);var n=Math.floor(t),a=t-n,i=e*(1-r),o=e*(1-a*r),h=e*(1-(1-a)*r),s=n%6,f=[e,o,i,i,h,e][s],u=[h,e,e,o,i,i][s],l=[i,i,h,e,e,o][s];return{r:255*f,g:255*u,b:255*l}}(n.h,o,h),f=!0,u="hsv"):E(n.h)&&E(n.s)&&E(n.l)&&(o=H(n.s),s=H(n.l),a=function(t,r,e){var n,a,i;function o(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(r-t)*e:e<.5?r:e<2/3?t+(r-t)*(2/3-e)*6:t}if(t=A(t,360),r=A(r,100),e=A(e,100),0===r)n=a=i=e;else{var h=e<.5?e*(1+r):e+r-e*r,s=2*e-h;n=o(s,h,t+1/3),a=o(s,h,t),i=o(s,h,t-1/3)}return{r:255*n,g:255*a,b:255*i}}(n.h,o,s),f=!0,u="hsl"),n.hasOwnProperty("a")&&(i=n.a));var l,c,d;return i=x(i),{ok:f,format:n.format||u,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:i}}(a);this._originalInput=a,this._r=o.r,this._g=o.g,this._b=o.b,this._a=o.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||o.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=o.ok}function a(t,r,e){t=A(t,255),r=A(r,255),e=A(e,255);var n,a,i=Math.max(t,r,e),o=Math.min(t,r,e),h=(i+o)/2;if(i==o)n=a=0;else{var s=i-o;switch(a=h>.5?s/(2-i-o):s/(i+o),i){case t:n=(r-e)/s+(r>1)+720)%360;--r;)a.h=(a.h+i)%360,o.push(n(a));return o}function v(t,r){r=r||6;for(var e=n(t).toHsv(),a=e.h,i=e.s,o=e.v,h=[],s=1/r;r--;)h.push(n({h:a,s:i,v:o})),o=(o+s)%1;return h}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,e,n=this.toRgb();return t=n.r/255,r=n.g/255,e=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))},setAlpha:function(t){return this._a=x(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+r+", "+e+"%, "+n+"%)":"hsva("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=a(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=a(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+r+", "+e+"%, "+n+"%)":"hsla("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return o(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,r,e,n,a){var i=[S(Math.round(t).toString(16)),S(Math.round(r).toString(16)),S(Math.round(e).toString(16)),S(R(n))];if(a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*A(this._r,255))+"%",g:Math.round(100*A(this._g,255))+"%",b:Math.round(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%)":"rgba("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[o(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var r="#"+h(this._r,this._g,this._b,this._a),e=r,a=this._gradientType?"GradientType = 1, ":"";if(t){var i=n(t);e="#"+h(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+e+")"},toString:function(t){var r=!!t;t=t||this._format;var e=!1,n=this._a<1&&this._a>=0;return r||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,r){var e=t.apply(null,[this].concat([].slice.call(r)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(f,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(v,arguments)},splitcomplement:function(){return this._applyCombination(p,arguments)},triad:function(){return this._applyCombination(m,[3])},tetrad:function(){return this._applyCombination(m,[4])}},n.fromRatio=function(r,e){if("object"==t(r)){var a={};for(var i in r)r.hasOwnProperty(i)&&(a[i]="a"===i?r[i]:H(r[i]));r=a}return n(r,e)},n.equals=function(t,r){return!(!t||!r)&&n(t).toRgbString()==n(r).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},n.mix=function(t,r,e){e=0===e?0:e||50;var a=n(t).toRgb(),i=n(r).toRgb(),o=e/100;return n({r:(i.r-a.r)*o+a.r,g:(i.g-a.g)*o+a.g,b:(i.b-a.b)*o+a.b,a:(i.a-a.a)*o+a.a})},n.readability=function(t,r){var e=n(t),a=n(r);return(Math.max(e.getLuminance(),a.getLuminance())+.05)/(Math.min(e.getLuminance(),a.getLuminance())+.05)},n.isReadable=function(t,r,e){var a,i,o=n.readability(t,r);switch(i=!1,(a=function(t){var r,e;r=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(t.size||"small").toLowerCase(),"AA"!==r&&"AAA"!==r&&(r="AA");"small"!==e&&"large"!==e&&(e="small");return{level:r,size:e}}(e)).level+a.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},n.mostReadable=function(t,r,e){var a,i,o,h,s=null,f=0;i=(e=e||{}).includeFallbackColors,o=e.level,h=e.size;for(var u=0;uf&&(f=a,s=n(r[u]));return n.isReadable(t,s,{level:o,size:h})||!i?s:(e.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],e))};var y=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=n.hexNames=function(t){var r={};for(var e in t)t.hasOwnProperty(e)&&(r[t[e]]=e);return r}(y);function x(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function A(t,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var e=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(r,Math.max(0,parseFloat(t))),e&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function k(t){return Math.min(1,Math.max(0,t))}function w(t){return parseInt(t,16)}function S(t){return 1==t.length?"0"+t:""+t}function H(t){return t<=1&&(t=100*t+"%"),t}function R(t){return Math.round(255*parseFloat(t)).toString(16)}function F(t){return w(t)/255}var C,q,N,T=(q="[\\s|\\(]+("+(C="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?",N="[\\s|\\(]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?",{CSS_UNIT:new RegExp(C),rgb:new RegExp("rgb"+q),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+q),hsva:new RegExp("hsva"+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function E(t){return!!T.CSS_UNIT.exec(t)}return n}));
\ No newline at end of file
diff --git a/vendor/assets/javascripts/tinycolor/npm/esm/test.js b/vendor/assets/javascripts/tinycolor/npm/esm/test.js
new file mode 100644
index 000000000..4f02b0ce9
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/npm/esm/test.js
@@ -0,0 +1,2189 @@
+// This file is autogenerated.
+// Ideally it wouldn't exist, but it's here to test cjs in node
+// Changes should go into ./test.js, and if new assertions are needed
+// they'll need to be shimmed here as well
+import tinycolor from "./tinycolor.js";
+import { Deno, testDefinitions } from "@deno/shim-deno-test";
+const { assertEquals, assert, assertThrows } = await import(
+ "../deno_asserts@0.168.0.mjs"
+);
+async function runDenoTests() {
+ for (const test of testDefinitions) {
+ if (test.ignore) {
+ console.log(`Ignoring ${test.name}`);
+ continue;
+ }
+ console.log(`Running ${test.name}`);
+ await test.fn();
+ console.log(`> Passed ${test.name}`);
+ }
+}
+
+// TEST_BEGINS_HERE
+
+Deno.test("TinyColor initialization", function () {
+ assert(
+ typeof tinycolor != "undefined",
+ "tinycolor is initialized on the page"
+ );
+ assert(
+ typeof tinycolor("red") == "object",
+ "tinycolor is able to be instantiated"
+ );
+
+ var r = tinycolor("red");
+ assert(
+ tinycolor(r) === r,
+ "when given a tinycolor instance, tinycolor() returns it"
+ );
+ assert(
+ new tinycolor(r) === r,
+ "when given a tinycolor instance, new tinycolor() returns it"
+ );
+ assertEquals(
+ tinycolor("red", { format: "hex" }).toString(),
+ "#ff0000",
+ "tinycolor options are being parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0 }, { format: "hex" }).toString(),
+ "#ff0000",
+ "tinycolor options are being parsed"
+ );
+
+ var obj = { h: 180, s: 0.5, l: 0.5 };
+ var color = tinycolor(obj);
+ assert(
+ obj.s === 0.5,
+ "when given an object, the original object is not modified"
+ );
+});
+
+Deno.test("Original input", function () {
+ var colorRgbUp = "RGB(39, 39, 39)";
+ var colorRgbLow = "rgb(39, 39, 39)";
+ var colorRgbMix = "RgB(39, 39, 39)";
+ var tinycolorObj = tinycolor(colorRgbMix);
+ var inputObj = { r: 100, g: 100, b: 100 };
+ var r = tinycolor("red");
+
+ assert(
+ tinycolor(colorRgbLow).getOriginalInput() === colorRgbLow,
+ "original lowercase input is returned"
+ );
+ assert(
+ tinycolor(colorRgbUp).getOriginalInput() === colorRgbUp,
+ "original uppercase input is returned"
+ );
+ assert(
+ tinycolor(colorRgbMix).getOriginalInput() === colorRgbMix,
+ "original mixed input is returned"
+ );
+ assert(
+ tinycolor(tinycolorObj).getOriginalInput() === colorRgbMix,
+ "when given a tinycolor instance, the color string is returned"
+ );
+ assert(
+ tinycolor(inputObj).getOriginalInput() === inputObj,
+ "when given an object, the object is returned"
+ );
+ assert(
+ new tinycolor("").getOriginalInput() === "",
+ "when given an empty string, an empty string is returned"
+ );
+ assert(
+ new tinycolor(null).getOriginalInput() === "",
+ "when given a null value, an empty string is returned"
+ );
+});
+
+Deno.test("Cloning color", function () {
+ var originalColor = tinycolor("red");
+ var originalColorRgbString = originalColor.toRgbString();
+
+ var clonedColor = originalColor.clone();
+ assert(
+ clonedColor.toRgbString() === originalColor.toRgbString(),
+ "cloned color is identical"
+ );
+
+ clonedColor.setAlpha(0.5);
+ assert(
+ clonedColor.toRgbString() !== originalColor.toRgbString(),
+ "cloned color is changing independently from original color"
+ );
+ assert(
+ originalColorRgbString === originalColor.toRgbString(),
+ "original color was not changed by cloned color change"
+ );
+});
+Deno.test("Random color", function () {
+ var randomColor = tinycolor.random();
+ assertEquals(randomColor.getAlpha(), 1);
+ assertEquals(randomColor.getFormat(), "prgb");
+
+ randomColor.setAlpha(0.5);
+ assertEquals(randomColor.toHex8String().slice(-2), "80");
+});
+
+// Taken from convertWikipediaColors.html
+var conversions = [
+ {
+ hex: "#FFFFFF",
+ hex8: "#FFFFFFFF",
+ rgb: { r: "100.0%", g: "100.0%", b: "100.0%" },
+ hsv: { h: "0", s: "0.000", v: "1.000" },
+ hsl: { h: "0", s: "0.000", l: "1.000" },
+ },
+ {
+ hex: "#808080",
+ hex8: "#808080FF",
+ rgb: { r: "050.0%", g: "050.0%", b: "050.0%" },
+ hsv: { h: "0", s: "0.000", v: "0.500" },
+ hsl: { h: "0", s: "0.000", l: "0.500" },
+ },
+ {
+ hex: "#000000",
+ hex8: "#000000FF",
+ rgb: { r: "000.0%", g: "000.0%", b: "000.0%" },
+ hsv: { h: "0", s: "0.000", v: "0.000" },
+ hsl: { h: "0", s: "0.000", l: "0.000" },
+ },
+ {
+ hex: "#FF0000",
+ hex8: "#FF0000FF",
+ rgb: { r: "100.0%", g: "000.0%", b: "000.0%" },
+ hsv: { h: "0.0", s: "1.000", v: "1.000" },
+ hsl: { h: "0.0", s: "1.000", l: "0.500" },
+ },
+ {
+ hex: "#BFBF00",
+ hex8: "#BFBF00FF",
+ rgb: { r: "075.0%", g: "075.0%", b: "000.0%" },
+ hsv: { h: "60.0", s: "1.000", v: "0.750" },
+ hsl: { h: "60.0", s: "1.000", l: "0.375" },
+ },
+ {
+ hex: "#008000",
+ hex8: "#008000FF",
+ rgb: { r: "000.0%", g: "050.0%", b: "000.0%" },
+ hsv: { h: "120.0", s: "1.000", v: "0.500" },
+ hsl: { h: "120.0", s: "1.000", l: "0.250" },
+ },
+ {
+ hex: "#80FFFF",
+ hex8: "#80FFFFFF",
+ rgb: { r: "050.0%", g: "100.0%", b: "100.0%" },
+ hsv: { h: "180.0", s: "0.500", v: "1.000" },
+ hsl: { h: "180.0", s: "1.000", l: "0.750" },
+ },
+ {
+ hex: "#8080FF",
+ hex8: "#8080FFFF",
+ rgb: { r: "050.0%", g: "050.0%", b: "100.0%" },
+ hsv: { h: "240.0", s: "0.500", v: "1.000" },
+ hsl: { h: "240.0", s: "1.000", l: "0.750" },
+ },
+ {
+ hex: "#BF40BF",
+ hex8: "#BF40BFFF",
+ rgb: { r: "075.0%", g: "025.0%", b: "075.0%" },
+ hsv: { h: "300.0", s: "0.667", v: "0.750" },
+ hsl: { h: "300.0", s: "0.500", l: "0.500" },
+ },
+ {
+ hex: "#A0A424",
+ hex8: "#A0A424FF",
+ rgb: { r: "062.8%", g: "064.3%", b: "014.2%" },
+ hsv: { h: "61.8", s: "0.779", v: "0.643" },
+ hsl: { h: "61.8", s: "0.638", l: "0.393" },
+ },
+ {
+ hex: "#1EAC41",
+ hex8: "#1EAC41FF",
+ rgb: { r: "011.6%", g: "067.5%", b: "025.5%" },
+ hsv: { h: "134.9", s: "0.828", v: "0.675" },
+ hsl: { h: "134.9", s: "0.707", l: "0.396" },
+ },
+ {
+ hex: "#B430E5",
+ hex8: "#B430E5FF",
+ rgb: { r: "070.4%", g: "018.7%", b: "089.7%" },
+ hsv: { h: "283.7", s: "0.792", v: "0.897" },
+ hsl: { h: "283.7", s: "0.775", l: "0.542" },
+ },
+ {
+ hex: "#FEF888",
+ hex8: "#FEF888FF",
+ rgb: { r: "099.8%", g: "097.4%", b: "053.2%" },
+ hsv: { h: "56.9", s: "0.467", v: "0.998" },
+ hsl: { h: "56.9", s: "0.991", l: "0.765" },
+ },
+ {
+ hex: "#19CB97",
+ hex8: "#19CB97FF",
+ rgb: { r: "009.9%", g: "079.5%", b: "059.1%" },
+ hsv: { h: "162.4", s: "0.875", v: "0.795" },
+ hsl: { h: "162.4", s: "0.779", l: "0.447" },
+ },
+ {
+ hex: "#362698",
+ hex8: "#362698FF",
+ rgb: { r: "021.1%", g: "014.9%", b: "059.7%" },
+ hsv: { h: "248.3", s: "0.750", v: "0.597" },
+ hsl: { h: "248.3", s: "0.601", l: "0.373" },
+ },
+ {
+ hex: "#7E7EB8",
+ hex8: "#7E7EB8FF",
+ rgb: { r: "049.5%", g: "049.3%", b: "072.1%" },
+ hsv: { h: "240.5", s: "0.316", v: "0.721" },
+ hsl: { h: "240.5", s: "0.290", l: "0.607" },
+ },
+];
+
+Deno.test("Color Equality", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+
+ assert(true, tiny.isValid());
+ assert(
+ true,
+ "Testing " +
+ c.hex +
+ ": " +
+ tiny.toRgbString() +
+ " " +
+ tiny.toPercentageRgbString() +
+ " " +
+ tiny.toHsvString() +
+ " " +
+ tiny.toHslString() +
+ " " +
+ tiny.toHexString() +
+ "Original: " +
+ JSON.stringify(c.rgb) +
+ " " +
+ JSON.stringify(c.hsv) +
+ " " +
+ JSON.stringify(c.hsl)
+ );
+ assert(tinycolor.equals(c.rgb, c.hex), "RGB equals hex " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.hex8), "RGB equals hex " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.hsl), "RGB equals HSL " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.hsv), "RGB equals HSV " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.rgb), "RGB equals RGB " + c.hex);
+
+ assert(tinycolor.equals(c.hex, c.hex), "hex equals hex " + c.hex);
+ assert(tinycolor.equals(c.hex, c.hex8), "hex equals hex8 " + c.hex);
+ assert(tinycolor.equals(c.hex, c.hsl), "hex equals HSL " + c.hex);
+ assert(tinycolor.equals(c.hex, c.hsv), "hex equals HSV " + c.hex);
+
+ assert(tinycolor.equals(c.hsl, c.hsv), "HSL equals HSV " + c.hex);
+ }
+});
+
+Deno.test("With Ratio", function () {
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 1, b: 1 }).toHexString(),
+ "#ffffff",
+ "white"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 0.5 }).toRgbString(),
+ "rgba(255, 0, 0, 0.5)",
+ "alpha works when ratio is parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 1 }).toRgbString(),
+ "rgb(255, 0, 0)",
+ "alpha = 1 works when ratio is parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 10 }).toRgbString(),
+ "rgb(255, 0, 0)",
+ "alpha > 1 works when ratio is parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: -1 }).toRgbString(),
+ "rgb(255, 0, 0)",
+ "alpha < 1 works when ratio is parsed"
+ );
+});
+
+Deno.test("Without Ratio", function () {
+ assertEquals(
+ tinycolor({ r: 1, g: 1, b: 1 }).toHexString(),
+ "#010101",
+ "010101"
+ );
+ assertEquals(
+ tinycolor({ r: 0.1, g: 0.1, b: 0.1 }).toHexString(),
+ "#000000",
+ "000000"
+ );
+ assertEquals(tinycolor("rgb .1 .1 .1").toHexString(), "#000000", "000000");
+});
+
+Deno.test("RGB Text Parsing", function () {
+ assertEquals(
+ tinycolor("rgb 255 0 0").toHexString(),
+ "#ff0000",
+ "spaced input"
+ );
+ assertEquals(
+ tinycolor("rgb(255, 0, 0)").toHexString(),
+ "#ff0000",
+ "parenthesized input"
+ );
+ assertEquals(
+ tinycolor("rgb (255, 0, 0)").toHexString(),
+ "#ff0000",
+ "parenthesized spaced input"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 0, b: 0 }).toHexString(),
+ "#ff0000",
+ "object input"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 0, b: 0 }).toRgb(),
+ {
+ r: 255,
+ g: 0,
+ b: 0,
+ a: 1,
+ },
+ "object input and compare"
+ );
+
+ assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb(200, 100, 0)"));
+ assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb 200 100 0"));
+ assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb 200 100 0"));
+ assert(
+ tinycolor.equals({ r: 200, g: 100, b: 0, a: 0.4 }, "rgba 200 100 0 .4")
+ );
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgba 200 100 0 1"));
+
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb(200, 100, 0)"));
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb 200 100 0"));
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb 200 100 0"));
+
+ assert(
+ tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb(200, 100, 0)")
+ );
+ assert(
+ tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb 200 100 0")
+ );
+ assert(
+ tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb 200 100 0")
+ );
+});
+
+Deno.test("Percentage RGB Text Parsing", function () {
+ assertEquals(
+ tinycolor("rgb 100% 0% 0%").toHexString(),
+ "#ff0000",
+ "spaced input"
+ );
+ assertEquals(
+ tinycolor("rgb(100%, 0%, 0%)").toHexString(),
+ "#ff0000",
+ "parenthesized input"
+ );
+ assertEquals(
+ tinycolor("rgb (100%, 0%, 0%)").toHexString(),
+ "#ff0000",
+ "parenthesized spaced input"
+ );
+ assertEquals(
+ tinycolor({ r: "100%", g: "0%", b: "0%" }).toHexString(),
+ "#ff0000",
+ "object input"
+ );
+ assertEquals(
+ tinycolor({ r: "100%", g: "0%", b: "0%" }).toRgb(),
+ {
+ r: 255,
+ g: 0,
+ b: 0,
+ a: 1,
+ },
+ "object input and compare"
+ );
+
+ assert(
+ tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb(90%, 45%, 0%)")
+ );
+ assert(tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+ assert(tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+ assert(
+ tinycolor.equals(
+ { r: "90%", g: "45%", b: "0%", a: 0.4 },
+ "rgba 90% 45% 0% .4"
+ )
+ );
+ assert(
+ !tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgba 90% 45% 0% 1")
+ );
+
+ assert(
+ !tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb(90%, 45%, 0%)")
+ );
+ assert(!tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+ assert(!tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+
+ assert(
+ tinycolor.equals(
+ tinycolor({ r: "90%", g: "45%", b: "0%" }),
+ "rgb(90%, 45%, 0%)"
+ )
+ );
+ assert(
+ tinycolor.equals(
+ tinycolor({ r: "90%", g: "45%", b: "0%" }),
+ "rgb 90% 45% 0%"
+ )
+ );
+ assert(
+ tinycolor.equals(
+ tinycolor({ r: "90%", g: "45%", b: "0%" }),
+ "rgb 90% 45% 0%"
+ )
+ );
+});
+
+Deno.test("HSL parsing", function () {
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38 }).toHexString(),
+ "#2400c2",
+ "to hex"
+ );
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38 }).toRgbString(),
+ "rgb(36, 0, 194)",
+ "to rgb"
+ );
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38 }).toHslString(),
+ "hsl(251, 100%, 38%)",
+ "to hsl"
+ );
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38, a: 0.5 }).toHslString(),
+ "hsla(251, 100%, 38%, 0.5)",
+ "to hsla"
+ );
+ assertEquals(
+ tinycolor("hsl(251, 100, 38)").toHexString(),
+ "#2400c2",
+ "to hex"
+ );
+ assertEquals(
+ tinycolor("hsl(251, 100%, 38%)").toRgbString(),
+ "rgb(36, 0, 194)",
+ "to rgb"
+ );
+ assertEquals(
+ tinycolor("hsl(251, 100%, 38%)").toHslString(),
+ "hsl(251, 100%, 38%)",
+ "to hsl"
+ );
+ assertEquals(
+ tinycolor("hsl 100 20 10").toHslString(),
+ "hsl(100, 20%, 10%)",
+ "problematic hsl"
+ );
+});
+
+Deno.test("Hex Parsing", function () {
+ assertEquals(tinycolor("rgb 255 0 0").toHexString(), "#ff0000");
+ assertEquals(tinycolor("rgb 255 0 0").toHexString(true), "#f00");
+
+ assertEquals(tinycolor("rgba 255 0 0 0.5").toHex8String(), "#ff000080");
+ assertEquals(tinycolor("rgba 255 0 0 0").toHex8String(), "#ff000000");
+ assertEquals(tinycolor("rgba 255 0 0 1").toHex8String(), "#ff0000ff");
+ assertEquals(tinycolor("rgba 255 0 0 1").toHex8String(true), "#f00f");
+
+ assertEquals(tinycolor("rgb 255 0 0").toHex(), "ff0000");
+ assertEquals(tinycolor("rgb 255 0 0").toHex(true), "f00");
+ assertEquals(tinycolor("rgba 255 0 0 0.5").toHex8(), "ff000080");
+});
+
+Deno.test("HSV Parsing", function () {
+ assertEquals(
+ tinycolor("hsv 251.1 0.887 .918").toHsvString(),
+ "hsv(251, 89%, 92%)"
+ );
+ assertEquals(
+ tinycolor("hsv 251.1 0.887 0.918").toHsvString(),
+ "hsv(251, 89%, 92%)"
+ );
+ assertEquals(
+ tinycolor("hsva 251.1 0.887 0.918 0.5").toHsvString(),
+ "hsva(251, 89%, 92%, 0.5)"
+ );
+});
+
+Deno.test("Invalid Parsing", function () {
+ var invalidColor = tinycolor("this is not a color");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor("#red");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor(" #red");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor("##123456");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor(" ##123456");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor({ r: "invalid", g: "invalid", b: "invalid" });
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor({ h: "invalid", s: "invalid", l: "invalid" });
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor({ h: "invalid", s: "invalid", v: "invalid" });
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+});
+
+Deno.test("Named colors", function () {
+ assertEquals(tinycolor("aliceblue").toHex(), "f0f8ff");
+ assertEquals(tinycolor("antiquewhite").toHex(), "faebd7");
+ assertEquals(tinycolor("aqua").toHex(), "00ffff");
+ assertEquals(tinycolor("aquamarine").toHex(), "7fffd4");
+ assertEquals(tinycolor("azure").toHex(), "f0ffff");
+ assertEquals(tinycolor("beige").toHex(), "f5f5dc");
+ assertEquals(tinycolor("bisque").toHex(), "ffe4c4");
+ assertEquals(tinycolor("black").toHex(), "000000");
+ assertEquals(tinycolor("blanchedalmond").toHex(), "ffebcd");
+ assertEquals(tinycolor("blue").toHex(), "0000ff");
+ assertEquals(tinycolor("blueviolet").toHex(), "8a2be2");
+ assertEquals(tinycolor("brown").toHex(), "a52a2a");
+ assertEquals(tinycolor("burlywood").toHex(), "deb887");
+ assertEquals(tinycolor("cadetblue").toHex(), "5f9ea0");
+ assertEquals(tinycolor("chartreuse").toHex(), "7fff00");
+ assertEquals(tinycolor("chocolate").toHex(), "d2691e");
+ assertEquals(tinycolor("coral").toHex(), "ff7f50");
+ assertEquals(tinycolor("cornflowerblue").toHex(), "6495ed");
+ assertEquals(tinycolor("cornsilk").toHex(), "fff8dc");
+ assertEquals(tinycolor("crimson").toHex(), "dc143c");
+ assertEquals(tinycolor("cyan").toHex(), "00ffff");
+ assertEquals(tinycolor("darkblue").toHex(), "00008b");
+ assertEquals(tinycolor("darkcyan").toHex(), "008b8b");
+ assertEquals(tinycolor("darkgoldenrod").toHex(), "b8860b");
+ assertEquals(tinycolor("darkgray").toHex(), "a9a9a9");
+ assertEquals(tinycolor("darkgreen").toHex(), "006400");
+ assertEquals(tinycolor("darkkhaki").toHex(), "bdb76b");
+ assertEquals(tinycolor("darkmagenta").toHex(), "8b008b");
+ assertEquals(tinycolor("darkolivegreen").toHex(), "556b2f");
+ assertEquals(tinycolor("darkorange").toHex(), "ff8c00");
+ assertEquals(tinycolor("darkorchid").toHex(), "9932cc");
+ assertEquals(tinycolor("darkred").toHex(), "8b0000");
+ assertEquals(tinycolor("darksalmon").toHex(), "e9967a");
+ assertEquals(tinycolor("darkseagreen").toHex(), "8fbc8f");
+ assertEquals(tinycolor("darkslateblue").toHex(), "483d8b");
+ assertEquals(tinycolor("darkslategray").toHex(), "2f4f4f");
+ assertEquals(tinycolor("darkturquoise").toHex(), "00ced1");
+ assertEquals(tinycolor("darkviolet").toHex(), "9400d3");
+ assertEquals(tinycolor("deeppink").toHex(), "ff1493");
+ assertEquals(tinycolor("deepskyblue").toHex(), "00bfff");
+ assertEquals(tinycolor("dimgray").toHex(), "696969");
+ assertEquals(tinycolor("dodgerblue").toHex(), "1e90ff");
+ assertEquals(tinycolor("firebrick").toHex(), "b22222");
+ assertEquals(tinycolor("floralwhite").toHex(), "fffaf0");
+ assertEquals(tinycolor("forestgreen").toHex(), "228b22");
+ assertEquals(tinycolor("fuchsia").toHex(), "ff00ff");
+ assertEquals(tinycolor("gainsboro").toHex(), "dcdcdc");
+ assertEquals(tinycolor("ghostwhite").toHex(), "f8f8ff");
+ assertEquals(tinycolor("gold").toHex(), "ffd700");
+ assertEquals(tinycolor("goldenrod").toHex(), "daa520");
+ assertEquals(tinycolor("gray").toHex(), "808080");
+ assertEquals(tinycolor("grey").toHex(), "808080");
+ assertEquals(tinycolor("green").toHex(), "008000");
+ assertEquals(tinycolor("greenyellow").toHex(), "adff2f");
+ assertEquals(tinycolor("honeydew").toHex(), "f0fff0");
+ assertEquals(tinycolor("hotpink").toHex(), "ff69b4");
+ assertEquals(tinycolor("indianred ").toHex(), "cd5c5c");
+ assertEquals(tinycolor("indigo ").toHex(), "4b0082");
+ assertEquals(tinycolor("ivory").toHex(), "fffff0");
+ assertEquals(tinycolor("khaki").toHex(), "f0e68c");
+ assertEquals(tinycolor("lavender").toHex(), "e6e6fa");
+ assertEquals(tinycolor("lavenderblush").toHex(), "fff0f5");
+ assertEquals(tinycolor("lawngreen").toHex(), "7cfc00");
+ assertEquals(tinycolor("lemonchiffon").toHex(), "fffacd");
+ assertEquals(tinycolor("lightblue").toHex(), "add8e6");
+ assertEquals(tinycolor("lightcoral").toHex(), "f08080");
+ assertEquals(tinycolor("lightcyan").toHex(), "e0ffff");
+ assertEquals(tinycolor("lightgoldenrodyellow").toHex(), "fafad2");
+ assertEquals(tinycolor("lightgrey").toHex(), "d3d3d3");
+ assertEquals(tinycolor("lightgreen").toHex(), "90ee90");
+ assertEquals(tinycolor("lightpink").toHex(), "ffb6c1");
+ assertEquals(tinycolor("lightsalmon").toHex(), "ffa07a");
+ assertEquals(tinycolor("lightseagreen").toHex(), "20b2aa");
+ assertEquals(tinycolor("lightskyblue").toHex(), "87cefa");
+ assertEquals(tinycolor("lightslategray").toHex(), "778899");
+ assertEquals(tinycolor("lightsteelblue").toHex(), "b0c4de");
+ assertEquals(tinycolor("lightyellow").toHex(), "ffffe0");
+ assertEquals(tinycolor("lime").toHex(), "00ff00");
+ assertEquals(tinycolor("limegreen").toHex(), "32cd32");
+ assertEquals(tinycolor("linen").toHex(), "faf0e6");
+ assertEquals(tinycolor("magenta").toHex(), "ff00ff");
+ assertEquals(tinycolor("maroon").toHex(), "800000");
+ assertEquals(tinycolor("mediumaquamarine").toHex(), "66cdaa");
+ assertEquals(tinycolor("mediumblue").toHex(), "0000cd");
+ assertEquals(tinycolor("mediumorchid").toHex(), "ba55d3");
+ assertEquals(tinycolor("mediumpurple").toHex(), "9370db");
+ assertEquals(tinycolor("mediumseagreen").toHex(), "3cb371");
+ assertEquals(tinycolor("mediumslateblue").toHex(), "7b68ee");
+ assertEquals(tinycolor("mediumspringgreen").toHex(), "00fa9a");
+ assertEquals(tinycolor("mediumturquoise").toHex(), "48d1cc");
+ assertEquals(tinycolor("mediumvioletred").toHex(), "c71585");
+ assertEquals(tinycolor("midnightblue").toHex(), "191970");
+ assertEquals(tinycolor("mintcream").toHex(), "f5fffa");
+ assertEquals(tinycolor("mistyrose").toHex(), "ffe4e1");
+ assertEquals(tinycolor("moccasin").toHex(), "ffe4b5");
+ assertEquals(tinycolor("navajowhite").toHex(), "ffdead");
+ assertEquals(tinycolor("navy").toHex(), "000080");
+ assertEquals(tinycolor("oldlace").toHex(), "fdf5e6");
+ assertEquals(tinycolor("olive").toHex(), "808000");
+ assertEquals(tinycolor("olivedrab").toHex(), "6b8e23");
+ assertEquals(tinycolor("orange").toHex(), "ffa500");
+ assertEquals(tinycolor("orangered").toHex(), "ff4500");
+ assertEquals(tinycolor("orchid").toHex(), "da70d6");
+ assertEquals(tinycolor("palegoldenrod").toHex(), "eee8aa");
+ assertEquals(tinycolor("palegreen").toHex(), "98fb98");
+ assertEquals(tinycolor("paleturquoise").toHex(), "afeeee");
+ assertEquals(tinycolor("palevioletred").toHex(), "db7093");
+ assertEquals(tinycolor("papayawhip").toHex(), "ffefd5");
+ assertEquals(tinycolor("peachpuff").toHex(), "ffdab9");
+ assertEquals(tinycolor("peru").toHex(), "cd853f");
+ assertEquals(tinycolor("pink").toHex(), "ffc0cb");
+ assertEquals(tinycolor("plum").toHex(), "dda0dd");
+ assertEquals(tinycolor("powderblue").toHex(), "b0e0e6");
+ assertEquals(tinycolor("purple").toHex(), "800080");
+ assertEquals(tinycolor("rebeccapurple").toHex(), "663399");
+ assertEquals(tinycolor("red").toHex(), "ff0000");
+ assertEquals(tinycolor("rosybrown").toHex(), "bc8f8f");
+ assertEquals(tinycolor("royalblue").toHex(), "4169e1");
+ assertEquals(tinycolor("saddlebrown").toHex(), "8b4513");
+ assertEquals(tinycolor("salmon").toHex(), "fa8072");
+ assertEquals(tinycolor("sandybrown").toHex(), "f4a460");
+ assertEquals(tinycolor("seagreen").toHex(), "2e8b57");
+ assertEquals(tinycolor("seashell").toHex(), "fff5ee");
+ assertEquals(tinycolor("sienna").toHex(), "a0522d");
+ assertEquals(tinycolor("silver").toHex(), "c0c0c0");
+ assertEquals(tinycolor("skyblue").toHex(), "87ceeb");
+ assertEquals(tinycolor("slateblue").toHex(), "6a5acd");
+ assertEquals(tinycolor("slategray").toHex(), "708090");
+ assertEquals(tinycolor("snow").toHex(), "fffafa");
+ assertEquals(tinycolor("springgreen").toHex(), "00ff7f");
+ assertEquals(tinycolor("steelblue").toHex(), "4682b4");
+ assertEquals(tinycolor("tan").toHex(), "d2b48c");
+ assertEquals(tinycolor("teal").toHex(), "008080");
+ assertEquals(tinycolor("thistle").toHex(), "d8bfd8");
+ assertEquals(tinycolor("tomato").toHex(), "ff6347");
+ assertEquals(tinycolor("turquoise").toHex(), "40e0d0");
+ assertEquals(tinycolor("violet").toHex(), "ee82ee");
+ assertEquals(tinycolor("wheat").toHex(), "f5deb3");
+ assertEquals(tinycolor("white").toHex(), "ffffff");
+ assertEquals(tinycolor("whitesmoke").toHex(), "f5f5f5");
+ assertEquals(tinycolor("yellow").toHex(), "ffff00");
+ assertEquals(tinycolor("yellowgreen").toHex(), "9acd32");
+
+ assertEquals(tinycolor("#f00").toName(), "red");
+ assertEquals(tinycolor("#fa0a0a").toName(), false);
+});
+
+Deno.test("Invalid alpha should normalize to 1", function () {
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: -1 }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "Negative value"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: -0 }).toRgbString(),
+ "rgba(255, 20, 10, 0)",
+ "Negative 0"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 0 }).toRgbString(),
+ "rgba(255, 20, 10, 0)",
+ "0"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 0.5 }).toRgbString(),
+ "rgba(255, 20, 10, 0.5)",
+ ".5"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 1 }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "1"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 100 }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "Greater than 1"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: "asdfasd" }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "Non Numeric"
+ );
+
+ assertEquals(
+ tinycolor("#fff").toRgbString(),
+ "rgb(255, 255, 255)",
+ "Hex should be 1"
+ );
+ assertEquals(
+ tinycolor("rgba 255 0 0 100").toRgbString(),
+ "rgb(255, 0, 0)",
+ "Greater than 1 in string parsing"
+ );
+});
+
+Deno.test("toString() with alpha set", function () {
+ var redNamed = tinycolor.fromRatio(
+ { r: 255, g: 0, b: 0, a: 0.6 },
+ {
+ format: "name",
+ }
+ );
+ var transparentNamed = tinycolor.fromRatio(
+ { r: 255, g: 0, b: 0, a: 0 },
+ {
+ format: "name",
+ }
+ );
+ var redHex = tinycolor.fromRatio(
+ { r: 255, g: 0, b: 0, a: 0.4 },
+ {
+ format: "hex",
+ }
+ );
+
+ assertEquals(redNamed.getFormat(), "name", "getFormat() is correct");
+ assertEquals(redHex.getFormat(), "hex", "getFormat() is correct");
+
+ assertEquals(
+ redNamed.toString(),
+ "rgba(255, 0, 0, 0.6)",
+ "Names should default to rgba if alpha is < 1"
+ );
+ assertEquals(
+ redHex.toString(),
+ "rgba(255, 0, 0, 0.4)",
+ "Hex should default to rgba if alpha is < 1"
+ );
+
+ assertEquals(
+ redNamed.toString("hex"),
+ "#ff0000",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex6"),
+ "#ff0000",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex3"),
+ "#f00",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex8"),
+ "#ff000099",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex4"),
+ "#f009",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("name"),
+ "#ff0000",
+ "Semi transparent names should return hex in toString() if name format is specified"
+ );
+
+ assertEquals(
+ redNamed.toName(),
+ false,
+ "Semi transparent names should be false in toName()"
+ );
+
+ assertEquals(
+ redHex.toString(),
+ "rgba(255, 0, 0, 0.4)",
+ "Hex should default to rgba if alpha is < 1"
+ );
+ assertEquals(
+ transparentNamed.toString(),
+ "transparent",
+ "Named color should equal transparent if alpha == 0"
+ );
+
+ redHex.setAlpha(0);
+ assertEquals(
+ redHex.toString(),
+ "rgba(255, 0, 0, 0)",
+ "Hex should default to rgba if alpha is = 0"
+ );
+});
+
+Deno.test("setting alpha", function () {
+ var hexSetter = tinycolor("rgba(255, 0, 0, 1)");
+ assertEquals(hexSetter.getAlpha(), 1, "Alpha should start as 1");
+ var returnedFromSetAlpha = hexSetter.setAlpha(0.9);
+ assertEquals(
+ returnedFromSetAlpha,
+ hexSetter,
+ "setAlpha return value should be the color."
+ );
+ assertEquals(hexSetter.getAlpha(), 0.9, "setAlpha should change alpha value");
+ hexSetter.setAlpha(0.5);
+ assertEquals(hexSetter.getAlpha(), 0.5, "setAlpha should change alpha value");
+ hexSetter.setAlpha(0);
+ assertEquals(hexSetter.getAlpha(), 0, "setAlpha should change alpha value");
+ hexSetter.setAlpha(-1);
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with value < 0 should be bound to 1"
+ );
+ hexSetter.setAlpha(2);
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with value > 1 should be bound to 1"
+ );
+ hexSetter.setAlpha();
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with invalid value should be bound to 1"
+ );
+ hexSetter.setAlpha(null);
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with invalid value should be bound to 1"
+ );
+ hexSetter.setAlpha("test");
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with invalid value should be bound to 1"
+ );
+});
+
+Deno.test("Alpha = 0 should act differently on toName()", function () {
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 0 }).toName(),
+ "transparent",
+ "0"
+ );
+ assertEquals(
+ tinycolor("transparent").toString(),
+ "transparent",
+ "toString when passed"
+ );
+ assertEquals(tinycolor("transparent").toHex(), "000000", "toHex");
+});
+
+Deno.test("getBrightness", function () {
+ assertEquals(tinycolor("#000").getBrightness(), 0, "returns 0 for #000");
+ assertEquals(tinycolor("#fff").getBrightness(), 255, "returns 255 for #fff");
+});
+
+Deno.test("getLuminance", function () {
+ assertEquals(tinycolor("#000").getLuminance(), 0, "returns 0 for #000");
+ assertEquals(tinycolor("#fff").getLuminance(), 1, "returns 1 for #fff");
+});
+
+Deno.test("isDark returns true/false for dark/light colors", function () {
+ assertEquals(tinycolor("#000").isDark(), true, "#000 is dark");
+ assertEquals(tinycolor("#111").isDark(), true, "#111 is dark");
+ assertEquals(tinycolor("#222").isDark(), true, "#222 is dark");
+ assertEquals(tinycolor("#333").isDark(), true, "#333 is dark");
+ assertEquals(tinycolor("#444").isDark(), true, "#444 is dark");
+ assertEquals(tinycolor("#555").isDark(), true, "#555 is dark");
+ assertEquals(tinycolor("#666").isDark(), true, "#666 is dark");
+ assertEquals(tinycolor("#777").isDark(), true, "#777 is dark");
+ assertEquals(tinycolor("#888").isDark(), false, "#888 is not dark");
+ assertEquals(tinycolor("#999").isDark(), false, "#999 is not dark");
+ assertEquals(tinycolor("#aaa").isDark(), false, "#aaa is not dark");
+ assertEquals(tinycolor("#bbb").isDark(), false, "#bbb is not dark");
+ assertEquals(tinycolor("#ccc").isDark(), false, "#ccc is not dark");
+ assertEquals(tinycolor("#ddd").isDark(), false, "#ddd is not dark");
+ assertEquals(tinycolor("#eee").isDark(), false, "#eee is not dark");
+ assertEquals(tinycolor("#fff").isDark(), false, "#fff is not dark");
+});
+
+Deno.test("isLight returns true/false for light/dark colors", function () {
+ assertEquals(tinycolor("#000").isLight(), false, "#000 is not light");
+ assertEquals(tinycolor("#111").isLight(), false, "#111 is not light");
+ assertEquals(tinycolor("#222").isLight(), false, "#222 is not light");
+ assertEquals(tinycolor("#333").isLight(), false, "#333 is not light");
+ assertEquals(tinycolor("#444").isLight(), false, "#444 is not light");
+ assertEquals(tinycolor("#555").isLight(), false, "#555 is not light");
+ assertEquals(tinycolor("#666").isLight(), false, "#666 is not light");
+ assertEquals(tinycolor("#777").isLight(), false, "#777 is not light");
+ assertEquals(tinycolor("#888").isLight(), true, "#888 is light");
+ assertEquals(tinycolor("#999").isLight(), true, "#999 is light");
+ assertEquals(tinycolor("#aaa").isLight(), true, "#aaa is light");
+ assertEquals(tinycolor("#bbb").isLight(), true, "#bbb is light");
+ assertEquals(tinycolor("#ccc").isLight(), true, "#ccc is light");
+ assertEquals(tinycolor("#ddd").isLight(), true, "#ddd is light");
+ assertEquals(tinycolor("#eee").isLight(), true, "#eee is light");
+ assertEquals(tinycolor("#fff").isLight(), true, "#fff is light");
+});
+
+Deno.test("HSL Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toHsl()).toHexString(),
+ "HSL Object"
+ );
+ }
+});
+
+Deno.test("HSL String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toHslString()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "toHslString red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "toHslString green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "toHslString blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("HSV String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toHsvString()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "toHsvString red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "toHsvString green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "toHsvString blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("HSV Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toHsv()).toHexString(),
+ "HSV Object"
+ );
+ }
+});
+
+Deno.test("RGB Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toRgb()).toHexString(),
+ "RGB Object"
+ );
+ }
+});
+
+Deno.test("RGB String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toRgbString()).toHexString(),
+ "RGB String"
+ );
+ }
+});
+
+Deno.test("PRGB Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toPercentageRgb()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "Red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "Green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "Blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("PRGB String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toPercentageRgbString()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "Red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "Green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "Blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(tiny.toHexString(), tinycolor(tiny).toHexString(), "Object");
+ }
+});
+
+Deno.test("Color equality", function () {
+ assert(tinycolor.equals("#ff0000", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("#ff0000", "rgb(255, 0, 0)"), "Same alphas");
+ assert(
+ !tinycolor.equals("#ff0000", "rgba(255, 0, 0, .1)"),
+ "Different alphas"
+ );
+ assert(tinycolor.equals("#ff000066", "rgba(255, 0, 0, .4)"), "Same alphas");
+ assert(tinycolor.equals("#f009", "rgba(255, 0, 0, .6)"), "Same alphas");
+ assert(tinycolor.equals("#336699CC", "369C"), "Same hex");
+ assert(tinycolor.equals("ff0000", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("#f00", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("#f00", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("f00", "#ff0000"), "Same hex");
+ assertEquals(tinycolor("010101").toHexString(), "#010101");
+ assert(!tinycolor.equals("#ff0000", "#00ff00"), "Different hex");
+ assert(
+ tinycolor.equals("#ff8000", "rgb(100%, 50%, 0%)"),
+ "Percentage bounds checking"
+ );
+});
+
+Deno.test("isReadable", function () {
+ // "#ff0088", "#8822aa" (values used in old WCAG1 tests)
+ assert(
+ tinycolor.isReadable("#000000", "#ffffff", { level: "AA", size: "small" }),
+ "white/black is readable"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", {}),
+ "not readable - empty wcag2 object"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", { level: "AA", size: "small" }),
+ "not readable - AA small"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", { level: "AA", size: "large" }),
+ "not readable - AA large"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", {
+ level: "AAA",
+ size: "small",
+ }),
+ "not readable - AAA small"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", {
+ level: "AAA",
+ size: "large",
+ }),
+ "not readable - AAA large"
+ );
+
+ // values derived from and validated using the calculators at http://www.dasplankton.de/ContrastA/
+ // and http://webaim.org/resources/contrastchecker/
+
+ // "#ff0088", "#5c1a72": contrast ratio 3.04
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", { level: "AA", size: "small" }),
+ "not readable - AA small"
+ );
+ assert(
+ tinycolor.isReadable("#ff0088", "#5c1a72", { level: "AA", size: "large" }),
+ "readable - AA large"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", {
+ level: "AAA",
+ size: "small",
+ }),
+ "not readable - AAA small"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", {
+ level: "AAA",
+ size: "large",
+ }),
+ "not readable - AAA large"
+ );
+
+ // "#ff0088", "#2e0c3a": contrast ratio 4.56
+ assert(
+ tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AA", size: "small" }),
+ "readable - AA small"
+ );
+ assert(
+ tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AA", size: "large" }),
+ "readable - AA large"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#2e0c3a", {
+ level: "AAA",
+ size: "small",
+ }),
+ "not readable - AAA small"
+ );
+ assert(
+ tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AAA", size: "large" }),
+ "readable - AAA large"
+ );
+
+ // "#db91b8", "#2e0c3a": contrast ratio 7.12
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AA", size: "small" }),
+ "readable - AA small"
+ );
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AA", size: "large" }),
+ "readable - AA large"
+ );
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AAA", size: "small" }),
+ "readable - AAA small"
+ );
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AAA", size: "large" }),
+ "readable - AAA large"
+ );
+});
+
+Deno.test("readability", function () {
+ // check return values from readability function. See isReadable above for standards tests.
+ assertEquals(
+ tinycolor.readability("#000", "#000"),
+ 1,
+ "Readability function test 0"
+ );
+ assertEquals(
+ tinycolor.readability("#000", "#111"),
+ 1.1121078324840545,
+ "Readability function test 1"
+ );
+ assertEquals(
+ tinycolor.readability("#000", "#fff"),
+ 21,
+ "Readability function test 2"
+ );
+});
+
+Deno.test("mostReadable", function () {
+ assertEquals(
+ tinycolor
+ .mostReadable("#000", ["#111", "#222", { wcag2: {} }])
+ .toHexString(),
+ "#222222",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#f00", ["#d00", "#0d0"], { wcag2: {} })
+ .toHexString(),
+ "#00dd00",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#fff", ["#fff", "#fff"], { wcag2: {} })
+ .toHexString(),
+ "#ffffff",
+ "no different color in list"
+ );
+ //includeFallbackColors
+ assertEquals(
+ tinycolor
+ .mostReadable("#fff", ["#fff", "#fff"], {
+ includeFallbackColors: true,
+ })
+ .toHexString(),
+ "#000000",
+ "no different color in list"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#123", ["#124", "#125"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#112255",
+ "no readable color in list"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#123", ["#000", "#fff"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#ffffff",
+ "verify assumption"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#123", ["#124", "#125"], {
+ includeFallbackColors: true,
+ })
+ .toHexString(),
+ "#ffffff",
+ "no readable color in list"
+ );
+
+ assertEquals(
+ tinycolor
+ .mostReadable("#ff0088", ["#000", "#fff"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#000000",
+ "verify assumption"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#ff0088", ["#2e0c3a"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "large",
+ })
+ .toHexString(),
+ "#2e0c3a",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#ff0088", ["#2e0c3a"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "small",
+ })
+ .toHexString(),
+ "#000000",
+ "no readable color in list"
+ );
+
+ assertEquals(
+ tinycolor
+ .mostReadable("#371b2c", ["#000", "#fff"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#ffffff",
+ "verify assumption"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#371b2c", ["#a9acb6"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "large",
+ })
+ .toHexString(),
+ "#a9acb6",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#371b2c", ["#a9acb6"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "small",
+ })
+ .toHexString(),
+ "#ffffff",
+ "no readable color in list"
+ );
+});
+
+Deno.test("Filters", function () {
+ assertEquals(
+ tinycolor("red").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)"
+ );
+ assertEquals(
+ tinycolor("red").toFilter("blue"),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ff0000ff)"
+ );
+
+ assertEquals(
+ tinycolor("transparent").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr=#00000000)"
+ );
+ assertEquals(
+ tinycolor("transparent").toFilter("red"),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr=#ffff0000)"
+ );
+
+ assertEquals(
+ tinycolor("#f0f0f0dd").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ddf0f0f0,endColorstr=#ddf0f0f0)"
+ );
+ assertEquals(
+ tinycolor("rgba(0, 0, 255, .5").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#800000ff,endColorstr=#800000ff)"
+ );
+});
+
+/* Originally generated with:
+var results = [];
+for (var i = 0; i <= 100; i++) results.push( tinycolor.saturate("red", i).toHex() )
+console.log(JSON.stringify(results))
+*/
+var DESATURATIONS = [
+ "ff0000",
+ "fe0101",
+ "fc0303",
+ "fb0404",
+ "fa0505",
+ "f90606",
+ "f70808",
+ "f60909",
+ "f50a0a",
+ "f40b0b",
+ "f20d0d",
+ "f10e0e",
+ "f00f0f",
+ "ee1111",
+ "ed1212",
+ "ec1313",
+ "eb1414",
+ "e91616",
+ "e81717",
+ "e71818",
+ "e61919",
+ "e41b1b",
+ "e31c1c",
+ "e21d1d",
+ "e01f1f",
+ "df2020",
+ "de2121",
+ "dd2222",
+ "db2424",
+ "da2525",
+ "d92626",
+ "d72828",
+ "d62929",
+ "d52a2a",
+ "d42b2b",
+ "d22d2d",
+ "d12e2e",
+ "d02f2f",
+ "cf3030",
+ "cd3232",
+ "cc3333",
+ "cb3434",
+ "c93636",
+ "c83737",
+ "c73838",
+ "c63939",
+ "c43b3b",
+ "c33c3c",
+ "c23d3d",
+ "c13e3e",
+ "bf4040",
+ "be4141",
+ "bd4242",
+ "bb4444",
+ "ba4545",
+ "b94646",
+ "b84747",
+ "b64949",
+ "b54a4a",
+ "b44b4b",
+ "b34d4d",
+ "b14e4e",
+ "b04f4f",
+ "af5050",
+ "ad5252",
+ "ac5353",
+ "ab5454",
+ "aa5555",
+ "a85757",
+ "a75858",
+ "a65959",
+ "a45b5b",
+ "a35c5c",
+ "a25d5d",
+ "a15e5e",
+ "9f6060",
+ "9e6161",
+ "9d6262",
+ "9c6363",
+ "9a6565",
+ "996666",
+ "986767",
+ "966969",
+ "956a6a",
+ "946b6b",
+ "936c6c",
+ "916e6e",
+ "906f6f",
+ "8f7070",
+ "8e7171",
+ "8c7373",
+ "8b7474",
+ "8a7575",
+ "887777",
+ "877878",
+ "867979",
+ "857a7a",
+ "837c7c",
+ "827d7d",
+ "817e7e",
+ "808080",
+];
+var SATURATIONS = [
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+];
+var LIGHTENS = [
+ "ff0000",
+ "ff0505",
+ "ff0a0a",
+ "ff0f0f",
+ "ff1414",
+ "ff1a1a",
+ "ff1f1f",
+ "ff2424",
+ "ff2929",
+ "ff2e2e",
+ "ff3333",
+ "ff3838",
+ "ff3d3d",
+ "ff4242",
+ "ff4747",
+ "ff4d4d",
+ "ff5252",
+ "ff5757",
+ "ff5c5c",
+ "ff6161",
+ "ff6666",
+ "ff6b6b",
+ "ff7070",
+ "ff7575",
+ "ff7a7a",
+ "ff8080",
+ "ff8585",
+ "ff8a8a",
+ "ff8f8f",
+ "ff9494",
+ "ff9999",
+ "ff9e9e",
+ "ffa3a3",
+ "ffa8a8",
+ "ffadad",
+ "ffb3b3",
+ "ffb8b8",
+ "ffbdbd",
+ "ffc2c2",
+ "ffc7c7",
+ "ffcccc",
+ "ffd1d1",
+ "ffd6d6",
+ "ffdbdb",
+ "ffe0e0",
+ "ffe5e5",
+ "ffebeb",
+ "fff0f0",
+ "fff5f5",
+ "fffafa",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+];
+var BRIGHTENS = [
+ "ff0000",
+ "ff0303",
+ "ff0505",
+ "ff0808",
+ "ff0a0a",
+ "ff0d0d",
+ "ff0f0f",
+ "ff1212",
+ "ff1414",
+ "ff1717",
+ "ff1919",
+ "ff1c1c",
+ "ff1f1f",
+ "ff2121",
+ "ff2424",
+ "ff2626",
+ "ff2929",
+ "ff2b2b",
+ "ff2e2e",
+ "ff3030",
+ "ff3333",
+ "ff3636",
+ "ff3838",
+ "ff3b3b",
+ "ff3d3d",
+ "ff4040",
+ "ff4242",
+ "ff4545",
+ "ff4747",
+ "ff4a4a",
+ "ff4c4c",
+ "ff4f4f",
+ "ff5252",
+ "ff5454",
+ "ff5757",
+ "ff5959",
+ "ff5c5c",
+ "ff5e5e",
+ "ff6161",
+ "ff6363",
+ "ff6666",
+ "ff6969",
+ "ff6b6b",
+ "ff6e6e",
+ "ff7070",
+ "ff7373",
+ "ff7575",
+ "ff7878",
+ "ff7a7a",
+ "ff7d7d",
+ "ff7f7f",
+ "ff8282",
+ "ff8585",
+ "ff8787",
+ "ff8a8a",
+ "ff8c8c",
+ "ff8f8f",
+ "ff9191",
+ "ff9494",
+ "ff9696",
+ "ff9999",
+ "ff9c9c",
+ "ff9e9e",
+ "ffa1a1",
+ "ffa3a3",
+ "ffa6a6",
+ "ffa8a8",
+ "ffabab",
+ "ffadad",
+ "ffb0b0",
+ "ffb2b2",
+ "ffb5b5",
+ "ffb8b8",
+ "ffbaba",
+ "ffbdbd",
+ "ffbfbf",
+ "ffc2c2",
+ "ffc4c4",
+ "ffc7c7",
+ "ffc9c9",
+ "ffcccc",
+ "ffcfcf",
+ "ffd1d1",
+ "ffd4d4",
+ "ffd6d6",
+ "ffd9d9",
+ "ffdbdb",
+ "ffdede",
+ "ffe0e0",
+ "ffe3e3",
+ "ffe5e5",
+ "ffe8e8",
+ "ffebeb",
+ "ffeded",
+ "fff0f0",
+ "fff2f2",
+ "fff5f5",
+ "fff7f7",
+ "fffafa",
+ "fffcfc",
+ "ffffff",
+];
+var DARKENS = [
+ "ff0000",
+ "fa0000",
+ "f50000",
+ "f00000",
+ "eb0000",
+ "e60000",
+ "e00000",
+ "db0000",
+ "d60000",
+ "d10000",
+ "cc0000",
+ "c70000",
+ "c20000",
+ "bd0000",
+ "b80000",
+ "b30000",
+ "ad0000",
+ "a80000",
+ "a30000",
+ "9e0000",
+ "990000",
+ "940000",
+ "8f0000",
+ "8a0000",
+ "850000",
+ "800000",
+ "7a0000",
+ "750000",
+ "700000",
+ "6b0000",
+ "660000",
+ "610000",
+ "5c0000",
+ "570000",
+ "520000",
+ "4d0000",
+ "470000",
+ "420000",
+ "3d0000",
+ "380000",
+ "330000",
+ "2e0000",
+ "290000",
+ "240000",
+ "1f0000",
+ "190000",
+ "140000",
+ "0f0000",
+ "0a0000",
+ "050000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+];
+
+Deno.test("Modifications", function () {
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").desaturate(i).toHex(),
+ DESATURATIONS[i],
+ "Desaturation " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").saturate(i).toHex(),
+ SATURATIONS[i],
+ "Saturation " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").lighten(i).toHex(),
+ LIGHTENS[i],
+ "Lighten " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").brighten(i).toHex(),
+ BRIGHTENS[i],
+ "Brighter " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").darken(i).toHex(),
+ DARKENS[i],
+ "Darken " + i + " works"
+ );
+ }
+
+ assertEquals(
+ tinycolor("red").greyscale().toHex(),
+ "808080",
+ "Greyscale works"
+ );
+});
+
+Deno.test("Spin", function () {
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(-1234).toHsl().h),
+ 206,
+ "Spinning -1234 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(-360).toHsl().h),
+ 0,
+ "Spinning -360 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(-120).toHsl().h),
+ 240,
+ "Spinning -120 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(0).toHsl().h),
+ 0,
+ "Spinning 0 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(10).toHsl().h),
+ 10,
+ "Spinning 10 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(360).toHsl().h),
+ 0,
+ "Spinning 360 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(2345).toHsl().h),
+ 185,
+ "Spinning 2345 works"
+ );
+
+ [-360, 0, 360].forEach(function (delta) {
+ Object.keys(tinycolor.names).forEach(function (name) {
+ assertEquals(
+ tinycolor(name).toHex(),
+ tinycolor(name).spin(delta).toHex(),
+ "Spinning " + delta.toString() + " has no effect"
+ );
+ });
+ });
+});
+
+Deno.test("Mix", function () {
+ // amount 0 or none
+ assertEquals(
+ tinycolor.mix("#000", "#fff").toHsl().l,
+ 0.5,
+ "Mixing without amount works"
+ );
+ assertEquals(
+ tinycolor.mix("#f00", "#000", 0).toHex(),
+ "ff0000",
+ "Mixing with 0 amount works"
+ );
+ // This case checks the the problem with floating point numbers (eg 255/90)
+ assertEquals(
+ tinycolor.mix("#fff", "#000", 90).toHex(),
+ "1a1a1a",
+ "Mixing with 90 amount works correctly"
+ );
+
+ // black and white
+ for (var i = 0; i < 100; i++) {
+ assertEquals(
+ Math.round(tinycolor.mix("#000", "#fff", i).toHsl().l * 100) / 100,
+ i / 100,
+ "Mixing black and white with " + i + " amount works"
+ );
+ }
+
+ // with colors
+ for (var i = 0; i < 100; i++) {
+ var new_hex = Math.round((255 * (100 - i)) / 100).toString(16);
+
+ if (new_hex.length === 1) {
+ new_hex = "0" + new_hex;
+ }
+
+ assertEquals(
+ tinycolor.mix("#f00", "#000", i).toHex(),
+ new_hex + "0000",
+ "Mixing " + i + " (red channel)"
+ );
+ assertEquals(
+ tinycolor.mix("#0f0", "#000", i).toHex(),
+ "00" + new_hex + "00",
+ "Mixing " + i + " (green channel)"
+ );
+ assertEquals(
+ tinycolor.mix("#00f", "#000", i).toHex(),
+ "0000" + new_hex,
+ "Mixing " + i + " (blue channel)"
+ );
+ assertEquals(
+ tinycolor.mix(tinycolor("transparent"), "#000", i).toRgb().a,
+ i / 100,
+ "Mixing " + i + " (alpha channel)"
+ );
+ }
+});
+
+// The combination tests need to be expanded furthe
+
+function colorsToHexString(colors) {
+ return colors
+ .map(function (c) {
+ return c.toHex();
+ })
+ .join(",");
+}
+
+Deno.test("complement", function () {
+ var complementDoesntModifyInstance = tinycolor("red");
+ assertEquals(
+ complementDoesntModifyInstance.complement().toHex(),
+ "00ffff",
+ "Complement works"
+ );
+ assertEquals(
+ complementDoesntModifyInstance.toHex(),
+ "ff0000",
+ "Complement did not modify this color"
+ );
+});
+
+Deno.test("analogous", function () {
+ var combination = tinycolor("red").analogous();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,ff0066,ff0033,ff0000,ff3300,ff6600",
+ "Correct Combination"
+ );
+});
+
+Deno.test("monochromatic", function () {
+ var combination = tinycolor("red").monochromatic();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,2a0000,550000,800000,aa0000,d40000",
+ "Correct Combination"
+ );
+});
+
+Deno.test("splitcomplement", function () {
+ var combination = tinycolor("red").splitcomplement();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,ccff00,0066ff",
+ "Correct Combination"
+ );
+});
+
+Deno.test("triad", function () {
+ var combination = tinycolor("red").triad();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,00ff00,0000ff",
+ "Correct Combination"
+ );
+});
+
+Deno.test("tetrad", function () {
+ var combination = tinycolor("red").tetrad();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,80ff00,00ffff,7f00ff",
+ "Correct Combination"
+ );
+});
+
+Deno.test({
+ name: "polyad",
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
+ ignore: true,
+ fn: function () {
+ assertThrows(() => {
+ tinycolor("red").polyad();
+ });
+ assertThrows(() => {
+ tinycolor("red").polyad(-1);
+ });
+ assertThrows(() => {
+ tinycolor("red").polyad("invalid");
+ });
+ assertEquals(colorsToHexString(tinycolor("red").polyad(1)), "ff0000");
+ assertEquals(colorsToHexString(tinycolor("red").polyad("1")), "ff0000");
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(2)),
+ "ff0000,00ffff"
+ );
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(3)),
+ "ff0000,00ff00,0000ff"
+ );
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(4)),
+ "ff0000,80ff00,00ffff,7f00ff"
+ );
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(5)),
+ "ff0000,ccff00,00ff66,0066ff,cc00ff"
+ );
+ },
+});
+
+runDenoTests();
diff --git a/vendor/assets/javascripts/tinycolor/npm/esm/test_template.js b/vendor/assets/javascripts/tinycolor/npm/esm/test_template.js
new file mode 100644
index 000000000..84914f76a
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/npm/esm/test_template.js
@@ -0,0 +1,24 @@
+// This file is autogenerated.
+// Ideally it wouldn't exist, but it's here to test cjs in node
+// Changes should go into ./test.js, and if new assertions are needed
+// they'll need to be shimmed here as well
+import tinycolor from "./tinycolor.js";
+import { Deno, testDefinitions } from "@deno/shim-deno-test";
+const { assertEquals, assert, assertThrows } = await import(
+ "../deno_asserts@0.168.0.mjs"
+);
+async function runDenoTests() {
+ for (const test of testDefinitions) {
+ if (test.ignore) {
+ console.log(`Ignoring ${test.name}`);
+ continue;
+ }
+ console.log(`Running ${test.name}`);
+ await test.fn();
+ console.log(`> Passed ${test.name}`);
+ }
+}
+
+// CONTENT_GOES_HERE
+
+runDenoTests();
diff --git a/vendor/assets/javascripts/tinycolor/npm/esm/tinycolor.js b/vendor/assets/javascripts/tinycolor/npm/esm/tinycolor.js
new file mode 100644
index 000000000..374f5ea99
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/npm/esm/tinycolor.js
@@ -0,0 +1,1180 @@
+// This file is autogenerated. It's used to publish ESM to npm.
+function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
+ return typeof obj;
+ } : function (obj) {
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ }, _typeof(obj);
+}
+
+// https://github.com/bgrins/TinyColor
+// Brian Grinstead, MIT License
+
+var trimLeft = /^\s+/;
+var trimRight = /\s+$/;
+function tinycolor(color, opts) {
+ color = color ? color : "";
+ opts = opts || {};
+
+ // If input is already a tinycolor, return itself
+ if (color instanceof tinycolor) {
+ return color;
+ }
+ // If we are called as a function, call using new instead
+ if (!(this instanceof tinycolor)) {
+ return new tinycolor(color, opts);
+ }
+ var rgb = inputToRGB(color);
+ this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;
+ this._gradientType = opts.gradientType;
+
+ // Don't let the range of [0,255] come back in [0,1].
+ // Potentially lose a little bit of precision here, but will fix issues where
+ // .5 gets interpreted as half of the total, instead of half of 1
+ // If it was supposed to be 128, this was already taken care of by `inputToRgb`
+ if (this._r < 1) this._r = Math.round(this._r);
+ if (this._g < 1) this._g = Math.round(this._g);
+ if (this._b < 1) this._b = Math.round(this._b);
+ this._ok = rgb.ok;
+}
+tinycolor.prototype = {
+ isDark: function isDark() {
+ return this.getBrightness() < 128;
+ },
+ isLight: function isLight() {
+ return !this.isDark();
+ },
+ isValid: function isValid() {
+ return this._ok;
+ },
+ getOriginalInput: function getOriginalInput() {
+ return this._originalInput;
+ },
+ getFormat: function getFormat() {
+ return this._format;
+ },
+ getAlpha: function getAlpha() {
+ return this._a;
+ },
+ getBrightness: function getBrightness() {
+ //http://www.w3.org/TR/AERT#color-contrast
+ var rgb = this.toRgb();
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
+ },
+ getLuminance: function getLuminance() {
+ //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
+ var rgb = this.toRgb();
+ var RsRGB, GsRGB, BsRGB, R, G, B;
+ RsRGB = rgb.r / 255;
+ GsRGB = rgb.g / 255;
+ BsRGB = rgb.b / 255;
+ if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
+ if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
+ if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
+ return 0.2126 * R + 0.7152 * G + 0.0722 * B;
+ },
+ setAlpha: function setAlpha(value) {
+ this._a = boundAlpha(value);
+ this._roundA = Math.round(100 * this._a) / 100;
+ return this;
+ },
+ toHsv: function toHsv() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ return {
+ h: hsv.h * 360,
+ s: hsv.s,
+ v: hsv.v,
+ a: this._a
+ };
+ },
+ toHsvString: function toHsvString() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ var h = Math.round(hsv.h * 360),
+ s = Math.round(hsv.s * 100),
+ v = Math.round(hsv.v * 100);
+ return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
+ },
+ toHsl: function toHsl() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ return {
+ h: hsl.h * 360,
+ s: hsl.s,
+ l: hsl.l,
+ a: this._a
+ };
+ },
+ toHslString: function toHslString() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ var h = Math.round(hsl.h * 360),
+ s = Math.round(hsl.s * 100),
+ l = Math.round(hsl.l * 100);
+ return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
+ },
+ toHex: function toHex(allow3Char) {
+ return rgbToHex(this._r, this._g, this._b, allow3Char);
+ },
+ toHexString: function toHexString(allow3Char) {
+ return "#" + this.toHex(allow3Char);
+ },
+ toHex8: function toHex8(allow4Char) {
+ return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
+ },
+ toHex8String: function toHex8String(allow4Char) {
+ return "#" + this.toHex8(allow4Char);
+ },
+ toRgb: function toRgb() {
+ return {
+ r: Math.round(this._r),
+ g: Math.round(this._g),
+ b: Math.round(this._b),
+ a: this._a
+ };
+ },
+ toRgbString: function toRgbString() {
+ return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
+ },
+ toPercentageRgb: function toPercentageRgb() {
+ return {
+ r: Math.round(bound01(this._r, 255) * 100) + "%",
+ g: Math.round(bound01(this._g, 255) * 100) + "%",
+ b: Math.round(bound01(this._b, 255) * 100) + "%",
+ a: this._a
+ };
+ },
+ toPercentageRgbString: function toPercentageRgbString() {
+ return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
+ },
+ toName: function toName() {
+ if (this._a === 0) {
+ return "transparent";
+ }
+ if (this._a < 1) {
+ return false;
+ }
+ return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
+ },
+ toFilter: function toFilter(secondColor) {
+ var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
+ var secondHex8String = hex8String;
+ var gradientType = this._gradientType ? "GradientType = 1, " : "";
+ if (secondColor) {
+ var s = tinycolor(secondColor);
+ secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
+ }
+ return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
+ },
+ toString: function toString(format) {
+ var formatSet = !!format;
+ format = format || this._format;
+ var formattedString = false;
+ var hasAlpha = this._a < 1 && this._a >= 0;
+ var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
+ if (needsAlphaFormat) {
+ // Special case for "transparent", all other non-alpha formats
+ // will return rgba when there is transparency.
+ if (format === "name" && this._a === 0) {
+ return this.toName();
+ }
+ return this.toRgbString();
+ }
+ if (format === "rgb") {
+ formattedString = this.toRgbString();
+ }
+ if (format === "prgb") {
+ formattedString = this.toPercentageRgbString();
+ }
+ if (format === "hex" || format === "hex6") {
+ formattedString = this.toHexString();
+ }
+ if (format === "hex3") {
+ formattedString = this.toHexString(true);
+ }
+ if (format === "hex4") {
+ formattedString = this.toHex8String(true);
+ }
+ if (format === "hex8") {
+ formattedString = this.toHex8String();
+ }
+ if (format === "name") {
+ formattedString = this.toName();
+ }
+ if (format === "hsl") {
+ formattedString = this.toHslString();
+ }
+ if (format === "hsv") {
+ formattedString = this.toHsvString();
+ }
+ return formattedString || this.toHexString();
+ },
+ clone: function clone() {
+ return tinycolor(this.toString());
+ },
+ _applyModification: function _applyModification(fn, args) {
+ var color = fn.apply(null, [this].concat([].slice.call(args)));
+ this._r = color._r;
+ this._g = color._g;
+ this._b = color._b;
+ this.setAlpha(color._a);
+ return this;
+ },
+ lighten: function lighten() {
+ return this._applyModification(_lighten, arguments);
+ },
+ brighten: function brighten() {
+ return this._applyModification(_brighten, arguments);
+ },
+ darken: function darken() {
+ return this._applyModification(_darken, arguments);
+ },
+ desaturate: function desaturate() {
+ return this._applyModification(_desaturate, arguments);
+ },
+ saturate: function saturate() {
+ return this._applyModification(_saturate, arguments);
+ },
+ greyscale: function greyscale() {
+ return this._applyModification(_greyscale, arguments);
+ },
+ spin: function spin() {
+ return this._applyModification(_spin, arguments);
+ },
+ _applyCombination: function _applyCombination(fn, args) {
+ return fn.apply(null, [this].concat([].slice.call(args)));
+ },
+ analogous: function analogous() {
+ return this._applyCombination(_analogous, arguments);
+ },
+ complement: function complement() {
+ return this._applyCombination(_complement, arguments);
+ },
+ monochromatic: function monochromatic() {
+ return this._applyCombination(_monochromatic, arguments);
+ },
+ splitcomplement: function splitcomplement() {
+ return this._applyCombination(_splitcomplement, arguments);
+ },
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
+ // polyad: function (number) {
+ // return this._applyCombination(polyad, [number]);
+ // },
+ triad: function triad() {
+ return this._applyCombination(polyad, [3]);
+ },
+ tetrad: function tetrad() {
+ return this._applyCombination(polyad, [4]);
+ }
+};
+
+// If input is an object, force 1 into "1.0" to handle ratios properly
+// String input requires "1.0" as input, so 1 will be treated as 1
+tinycolor.fromRatio = function (color, opts) {
+ if (_typeof(color) == "object") {
+ var newColor = {};
+ for (var i in color) {
+ if (color.hasOwnProperty(i)) {
+ if (i === "a") {
+ newColor[i] = color[i];
+ } else {
+ newColor[i] = convertToPercentage(color[i]);
+ }
+ }
+ }
+ color = newColor;
+ }
+ return tinycolor(color, opts);
+};
+
+// Given a string or object, convert that input to RGB
+// Possible string inputs:
+//
+// "red"
+// "#f00" or "f00"
+// "#ff0000" or "ff0000"
+// "#ff000000" or "ff000000"
+// "rgb 255 0 0" or "rgb (255, 0, 0)"
+// "rgb 1.0 0 0" or "rgb (1, 0, 0)"
+// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
+// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
+// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
+// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
+// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
+//
+function inputToRGB(color) {
+ var rgb = {
+ r: 0,
+ g: 0,
+ b: 0
+ };
+ var a = 1;
+ var s = null;
+ var v = null;
+ var l = null;
+ var ok = false;
+ var format = false;
+ if (typeof color == "string") {
+ color = stringInputToObject(color);
+ }
+ if (_typeof(color) == "object") {
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
+ rgb = rgbToRgb(color.r, color.g, color.b);
+ ok = true;
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
+ s = convertToPercentage(color.s);
+ v = convertToPercentage(color.v);
+ rgb = hsvToRgb(color.h, s, v);
+ ok = true;
+ format = "hsv";
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
+ s = convertToPercentage(color.s);
+ l = convertToPercentage(color.l);
+ rgb = hslToRgb(color.h, s, l);
+ ok = true;
+ format = "hsl";
+ }
+ if (color.hasOwnProperty("a")) {
+ a = color.a;
+ }
+ }
+ a = boundAlpha(a);
+ return {
+ ok: ok,
+ format: color.format || format,
+ r: Math.min(255, Math.max(rgb.r, 0)),
+ g: Math.min(255, Math.max(rgb.g, 0)),
+ b: Math.min(255, Math.max(rgb.b, 0)),
+ a: a
+ };
+}
+
+// Conversion Functions
+// --------------------
+
+// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
+//
+
+// `rgbToRgb`
+// Handle bounds / percentage checking to conform to CSS color spec
+//
+// *Assumes:* r, g, b in [0, 255] or [0, 1]
+// *Returns:* { r, g, b } in [0, 255]
+function rgbToRgb(r, g, b) {
+ return {
+ r: bound01(r, 255) * 255,
+ g: bound01(g, 255) * 255,
+ b: bound01(b, 255) * 255
+ };
+}
+
+// `rgbToHsl`
+// Converts an RGB color value to HSL.
+// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
+// *Returns:* { h, s, l } in [0,1]
+function rgbToHsl(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ l = (max + min) / 2;
+ if (max == min) {
+ h = s = 0; // achromatic
+ } else {
+ var d = max - min;
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+ h /= 6;
+ }
+ return {
+ h: h,
+ s: s,
+ l: l
+ };
+}
+
+// `hslToRgb`
+// Converts an HSL color value to RGB.
+// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
+// *Returns:* { r, g, b } in the set [0, 255]
+function hslToRgb(h, s, l) {
+ var r, g, b;
+ h = bound01(h, 360);
+ s = bound01(s, 100);
+ l = bound01(l, 100);
+ function hue2rgb(p, q, t) {
+ if (t < 0) t += 1;
+ if (t > 1) t -= 1;
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
+ if (t < 1 / 2) return q;
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+ return p;
+ }
+ if (s === 0) {
+ r = g = b = l; // achromatic
+ } else {
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+ var p = 2 * l - q;
+ r = hue2rgb(p, q, h + 1 / 3);
+ g = hue2rgb(p, q, h);
+ b = hue2rgb(p, q, h - 1 / 3);
+ }
+ return {
+ r: r * 255,
+ g: g * 255,
+ b: b * 255
+ };
+}
+
+// `rgbToHsv`
+// Converts an RGB color value to HSV
+// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
+// *Returns:* { h, s, v } in [0,1]
+function rgbToHsv(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ v = max;
+ var d = max - min;
+ s = max === 0 ? 0 : d / max;
+ if (max == min) {
+ h = 0; // achromatic
+ } else {
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+ h /= 6;
+ }
+ return {
+ h: h,
+ s: s,
+ v: v
+ };
+}
+
+// `hsvToRgb`
+// Converts an HSV color value to RGB.
+// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
+// *Returns:* { r, g, b } in the set [0, 255]
+function hsvToRgb(h, s, v) {
+ h = bound01(h, 360) * 6;
+ s = bound01(s, 100);
+ v = bound01(v, 100);
+ var i = Math.floor(h),
+ f = h - i,
+ p = v * (1 - s),
+ q = v * (1 - f * s),
+ t = v * (1 - (1 - f) * s),
+ mod = i % 6,
+ r = [v, q, p, p, t, v][mod],
+ g = [t, v, v, q, p, p][mod],
+ b = [p, p, t, v, v, q][mod];
+ return {
+ r: r * 255,
+ g: g * 255,
+ b: b * 255
+ };
+}
+
+// `rgbToHex`
+// Converts an RGB color to hex
+// Assumes r, g, and b are contained in the set [0, 255]
+// Returns a 3 or 6 character hex
+function rgbToHex(r, g, b, allow3Char) {
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
+
+ // Return a 3 character hex if possible
+ if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
+ }
+ return hex.join("");
+}
+
+// `rgbaToHex`
+// Converts an RGBA color plus alpha transparency to hex
+// Assumes r, g, b are contained in the set [0, 255] and
+// a in [0, 1]. Returns a 4 or 8 character rgba hex
+function rgbaToHex(r, g, b, a, allow4Char) {
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
+
+ // Return a 4 character hex if possible
+ if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
+ }
+ return hex.join("");
+}
+
+// `rgbaToArgbHex`
+// Converts an RGBA color to an ARGB Hex8 string
+// Rarely used, but required for "toFilter()"
+function rgbaToArgbHex(r, g, b, a) {
+ var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
+ return hex.join("");
+}
+
+// `equals`
+// Can be called with any tinycolor input
+tinycolor.equals = function (color1, color2) {
+ if (!color1 || !color2) return false;
+ return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
+};
+tinycolor.random = function () {
+ return tinycolor.fromRatio({
+ r: Math.random(),
+ g: Math.random(),
+ b: Math.random()
+ });
+};
+
+// Modification Functions
+// ----------------------
+// Thanks to less.js for some of the basics here
+//
+
+function _desaturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s -= amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+}
+function _saturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s += amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+}
+function _greyscale(color) {
+ return tinycolor(color).desaturate(100);
+}
+function _lighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l += amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+}
+function _brighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var rgb = tinycolor(color).toRgb();
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
+ return tinycolor(rgb);
+}
+function _darken(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l -= amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+}
+
+// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
+// Values outside of this range will be wrapped into this range.
+function _spin(color, amount) {
+ var hsl = tinycolor(color).toHsl();
+ var hue = (hsl.h + amount) % 360;
+ hsl.h = hue < 0 ? 360 + hue : hue;
+ return tinycolor(hsl);
+}
+
+// Combination Functions
+// ---------------------
+// Thanks to jQuery xColor for some of the ideas behind these
+//
+
+function _complement(color) {
+ var hsl = tinycolor(color).toHsl();
+ hsl.h = (hsl.h + 180) % 360;
+ return tinycolor(hsl);
+}
+function polyad(color, number) {
+ if (isNaN(number) || number <= 0) {
+ throw new Error("Argument to polyad must be a positive number");
+ }
+ var hsl = tinycolor(color).toHsl();
+ var result = [tinycolor(color)];
+ var step = 360 / number;
+ for (var i = 1; i < number; i++) {
+ result.push(tinycolor({
+ h: (hsl.h + i * step) % 360,
+ s: hsl.s,
+ l: hsl.l
+ }));
+ }
+ return result;
+}
+function _splitcomplement(color) {
+ var hsl = tinycolor(color).toHsl();
+ var h = hsl.h;
+ return [tinycolor(color), tinycolor({
+ h: (h + 72) % 360,
+ s: hsl.s,
+ l: hsl.l
+ }), tinycolor({
+ h: (h + 216) % 360,
+ s: hsl.s,
+ l: hsl.l
+ })];
+}
+function _analogous(color, results, slices) {
+ results = results || 6;
+ slices = slices || 30;
+ var hsl = tinycolor(color).toHsl();
+ var part = 360 / slices;
+ var ret = [tinycolor(color)];
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
+ hsl.h = (hsl.h + part) % 360;
+ ret.push(tinycolor(hsl));
+ }
+ return ret;
+}
+function _monochromatic(color, results) {
+ results = results || 6;
+ var hsv = tinycolor(color).toHsv();
+ var h = hsv.h,
+ s = hsv.s,
+ v = hsv.v;
+ var ret = [];
+ var modification = 1 / results;
+ while (results--) {
+ ret.push(tinycolor({
+ h: h,
+ s: s,
+ v: v
+ }));
+ v = (v + modification) % 1;
+ }
+ return ret;
+}
+
+// Utility Functions
+// ---------------------
+
+tinycolor.mix = function (color1, color2, amount) {
+ amount = amount === 0 ? 0 : amount || 50;
+ var rgb1 = tinycolor(color1).toRgb();
+ var rgb2 = tinycolor(color2).toRgb();
+ var p = amount / 100;
+ var rgba = {
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
+ };
+ return tinycolor(rgba);
+};
+
+// Readability Functions
+// ---------------------
+// false
+// tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
+tinycolor.isReadable = function (color1, color2, wcag2) {
+ var readability = tinycolor.readability(color1, color2);
+ var wcag2Parms, out;
+ out = false;
+ wcag2Parms = validateWCAG2Parms(wcag2);
+ switch (wcag2Parms.level + wcag2Parms.size) {
+ case "AAsmall":
+ case "AAAlarge":
+ out = readability >= 4.5;
+ break;
+ case "AAlarge":
+ out = readability >= 3;
+ break;
+ case "AAAsmall":
+ out = readability >= 7;
+ break;
+ }
+ return out;
+};
+
+// `mostReadable`
+// Given a base color and a list of possible foreground or background
+// colors for that base, returns the most readable color.
+// Optionally returns Black or White if the most readable color is unreadable.
+// *Example*
+// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
+// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
+// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
+// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
+tinycolor.mostReadable = function (baseColor, colorList, args) {
+ var bestColor = null;
+ var bestScore = 0;
+ var readability;
+ var includeFallbackColors, level, size;
+ args = args || {};
+ includeFallbackColors = args.includeFallbackColors;
+ level = args.level;
+ size = args.size;
+ for (var i = 0; i < colorList.length; i++) {
+ readability = tinycolor.readability(baseColor, colorList[i]);
+ if (readability > bestScore) {
+ bestScore = readability;
+ bestColor = tinycolor(colorList[i]);
+ }
+ }
+ if (tinycolor.isReadable(baseColor, bestColor, {
+ level: level,
+ size: size
+ }) || !includeFallbackColors) {
+ return bestColor;
+ } else {
+ args.includeFallbackColors = false;
+ return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
+ }
+};
+
+// Big List of Colors
+// ------------------
+//
+var names = tinycolor.names = {
+ aliceblue: "f0f8ff",
+ antiquewhite: "faebd7",
+ aqua: "0ff",
+ aquamarine: "7fffd4",
+ azure: "f0ffff",
+ beige: "f5f5dc",
+ bisque: "ffe4c4",
+ black: "000",
+ blanchedalmond: "ffebcd",
+ blue: "00f",
+ blueviolet: "8a2be2",
+ brown: "a52a2a",
+ burlywood: "deb887",
+ burntsienna: "ea7e5d",
+ cadetblue: "5f9ea0",
+ chartreuse: "7fff00",
+ chocolate: "d2691e",
+ coral: "ff7f50",
+ cornflowerblue: "6495ed",
+ cornsilk: "fff8dc",
+ crimson: "dc143c",
+ cyan: "0ff",
+ darkblue: "00008b",
+ darkcyan: "008b8b",
+ darkgoldenrod: "b8860b",
+ darkgray: "a9a9a9",
+ darkgreen: "006400",
+ darkgrey: "a9a9a9",
+ darkkhaki: "bdb76b",
+ darkmagenta: "8b008b",
+ darkolivegreen: "556b2f",
+ darkorange: "ff8c00",
+ darkorchid: "9932cc",
+ darkred: "8b0000",
+ darksalmon: "e9967a",
+ darkseagreen: "8fbc8f",
+ darkslateblue: "483d8b",
+ darkslategray: "2f4f4f",
+ darkslategrey: "2f4f4f",
+ darkturquoise: "00ced1",
+ darkviolet: "9400d3",
+ deeppink: "ff1493",
+ deepskyblue: "00bfff",
+ dimgray: "696969",
+ dimgrey: "696969",
+ dodgerblue: "1e90ff",
+ firebrick: "b22222",
+ floralwhite: "fffaf0",
+ forestgreen: "228b22",
+ fuchsia: "f0f",
+ gainsboro: "dcdcdc",
+ ghostwhite: "f8f8ff",
+ gold: "ffd700",
+ goldenrod: "daa520",
+ gray: "808080",
+ green: "008000",
+ greenyellow: "adff2f",
+ grey: "808080",
+ honeydew: "f0fff0",
+ hotpink: "ff69b4",
+ indianred: "cd5c5c",
+ indigo: "4b0082",
+ ivory: "fffff0",
+ khaki: "f0e68c",
+ lavender: "e6e6fa",
+ lavenderblush: "fff0f5",
+ lawngreen: "7cfc00",
+ lemonchiffon: "fffacd",
+ lightblue: "add8e6",
+ lightcoral: "f08080",
+ lightcyan: "e0ffff",
+ lightgoldenrodyellow: "fafad2",
+ lightgray: "d3d3d3",
+ lightgreen: "90ee90",
+ lightgrey: "d3d3d3",
+ lightpink: "ffb6c1",
+ lightsalmon: "ffa07a",
+ lightseagreen: "20b2aa",
+ lightskyblue: "87cefa",
+ lightslategray: "789",
+ lightslategrey: "789",
+ lightsteelblue: "b0c4de",
+ lightyellow: "ffffe0",
+ lime: "0f0",
+ limegreen: "32cd32",
+ linen: "faf0e6",
+ magenta: "f0f",
+ maroon: "800000",
+ mediumaquamarine: "66cdaa",
+ mediumblue: "0000cd",
+ mediumorchid: "ba55d3",
+ mediumpurple: "9370db",
+ mediumseagreen: "3cb371",
+ mediumslateblue: "7b68ee",
+ mediumspringgreen: "00fa9a",
+ mediumturquoise: "48d1cc",
+ mediumvioletred: "c71585",
+ midnightblue: "191970",
+ mintcream: "f5fffa",
+ mistyrose: "ffe4e1",
+ moccasin: "ffe4b5",
+ navajowhite: "ffdead",
+ navy: "000080",
+ oldlace: "fdf5e6",
+ olive: "808000",
+ olivedrab: "6b8e23",
+ orange: "ffa500",
+ orangered: "ff4500",
+ orchid: "da70d6",
+ palegoldenrod: "eee8aa",
+ palegreen: "98fb98",
+ paleturquoise: "afeeee",
+ palevioletred: "db7093",
+ papayawhip: "ffefd5",
+ peachpuff: "ffdab9",
+ peru: "cd853f",
+ pink: "ffc0cb",
+ plum: "dda0dd",
+ powderblue: "b0e0e6",
+ purple: "800080",
+ rebeccapurple: "663399",
+ red: "f00",
+ rosybrown: "bc8f8f",
+ royalblue: "4169e1",
+ saddlebrown: "8b4513",
+ salmon: "fa8072",
+ sandybrown: "f4a460",
+ seagreen: "2e8b57",
+ seashell: "fff5ee",
+ sienna: "a0522d",
+ silver: "c0c0c0",
+ skyblue: "87ceeb",
+ slateblue: "6a5acd",
+ slategray: "708090",
+ slategrey: "708090",
+ snow: "fffafa",
+ springgreen: "00ff7f",
+ steelblue: "4682b4",
+ tan: "d2b48c",
+ teal: "008080",
+ thistle: "d8bfd8",
+ tomato: "ff6347",
+ turquoise: "40e0d0",
+ violet: "ee82ee",
+ wheat: "f5deb3",
+ white: "fff",
+ whitesmoke: "f5f5f5",
+ yellow: "ff0",
+ yellowgreen: "9acd32"
+};
+
+// Make it easy to access colors via `hexNames[hex]`
+var hexNames = tinycolor.hexNames = flip(names);
+
+// Utilities
+// ---------
+
+// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
+function flip(o) {
+ var flipped = {};
+ for (var i in o) {
+ if (o.hasOwnProperty(i)) {
+ flipped[o[i]] = i;
+ }
+ }
+ return flipped;
+}
+
+// Return a valid alpha value [0,1] with all invalid values being set to 1
+function boundAlpha(a) {
+ a = parseFloat(a);
+ if (isNaN(a) || a < 0 || a > 1) {
+ a = 1;
+ }
+ return a;
+}
+
+// Take input from [0, n] and return it as [0, 1]
+function bound01(n, max) {
+ if (isOnePointZero(n)) n = "100%";
+ var processPercent = isPercentage(n);
+ n = Math.min(max, Math.max(0, parseFloat(n)));
+
+ // Automatically convert percentage into number
+ if (processPercent) {
+ n = parseInt(n * max, 10) / 100;
+ }
+
+ // Handle floating point rounding errors
+ if (Math.abs(n - max) < 0.000001) {
+ return 1;
+ }
+
+ // Convert into [0, 1] range if it isn't already
+ return n % max / parseFloat(max);
+}
+
+// Force a number between 0 and 1
+function clamp01(val) {
+ return Math.min(1, Math.max(0, val));
+}
+
+// Parse a base-16 hex value into a base-10 integer
+function parseIntFromHex(val) {
+ return parseInt(val, 16);
+}
+
+// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
+//
+function isOnePointZero(n) {
+ return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
+}
+
+// Check to see if string passed in is a percentage
+function isPercentage(n) {
+ return typeof n === "string" && n.indexOf("%") != -1;
+}
+
+// Force a hex value to have 2 characters
+function pad2(c) {
+ return c.length == 1 ? "0" + c : "" + c;
+}
+
+// Replace a decimal with it's percentage value
+function convertToPercentage(n) {
+ if (n <= 1) {
+ n = n * 100 + "%";
+ }
+ return n;
+}
+
+// Converts a decimal to a hex value
+function convertDecimalToHex(d) {
+ return Math.round(parseFloat(d) * 255).toString(16);
+}
+// Converts a hex value to a decimal
+function convertHexToDecimal(h) {
+ return parseIntFromHex(h) / 255;
+}
+var matchers = function () {
+ //
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
+
+ //
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
+
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
+
+ // Actual matching.
+ // Parentheses and commas are optional, but not required.
+ // Whitespace can take the place of commas or opening paren
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+ return {
+ CSS_UNIT: new RegExp(CSS_UNIT),
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
+ };
+}();
+
+// `isValidCSSUnit`
+// Take in a single string / number and check to see if it looks like a CSS unit
+// (see `matchers` above for definition).
+function isValidCSSUnit(color) {
+ return !!matchers.CSS_UNIT.exec(color);
+}
+
+// `stringInputToObject`
+// Permissive string parsing. Take in a number of formats, and output an object
+// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
+function stringInputToObject(color) {
+ color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
+ var named = false;
+ if (names[color]) {
+ color = names[color];
+ named = true;
+ } else if (color == "transparent") {
+ return {
+ r: 0,
+ g: 0,
+ b: 0,
+ a: 0,
+ format: "name"
+ };
+ }
+
+ // Try to match string input using regular expressions.
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
+ // Just return an object and let the conversion functions handle that.
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
+ var match;
+ if (match = matchers.rgb.exec(color)) {
+ return {
+ r: match[1],
+ g: match[2],
+ b: match[3]
+ };
+ }
+ if (match = matchers.rgba.exec(color)) {
+ return {
+ r: match[1],
+ g: match[2],
+ b: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hsl.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ l: match[3]
+ };
+ }
+ if (match = matchers.hsla.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ l: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hsv.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ v: match[3]
+ };
+ }
+ if (match = matchers.hsva.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ v: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hex8.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ a: convertHexToDecimal(match[4]),
+ format: named ? "name" : "hex8"
+ };
+ }
+ if (match = matchers.hex6.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+ if (match = matchers.hex4.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ a: convertHexToDecimal(match[4] + "" + match[4]),
+ format: named ? "name" : "hex8"
+ };
+ }
+ if (match = matchers.hex3.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+ return false;
+}
+function validateWCAG2Parms(parms) {
+ // return valid WCAG2 parms for isReadable.
+ // If input parms are invalid, return {"level":"AA", "size":"small"}
+ var level, size;
+ parms = parms || {
+ level: "AA",
+ size: "small"
+ };
+ level = (parms.level || "AA").toUpperCase();
+ size = (parms.size || "small").toLowerCase();
+ if (level !== "AA" && level !== "AAA") {
+ level = "AA";
+ }
+ if (size !== "small" && size !== "large") {
+ size = "small";
+ }
+ return {
+ level: level,
+ size: size
+ };
+}
+
+export { tinycolor as default };
diff --git a/vendor/assets/javascripts/tinycolor/npm/tinycolor.js b/vendor/assets/javascripts/tinycolor/npm/tinycolor.js
new file mode 100644
index 000000000..52601dfe4
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/npm/tinycolor.js
@@ -0,0 +1,1191 @@
+// This file is autogenerated.
+// It's here at this path for backwards compatibility for links to it
+// but the npm package now exports both CJS and ESM.
+// See https://github.com/bgrins/TinyColor/ for instructions.
+ (function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.tinycolor = factory());
+})(this, (function () { 'use strict';
+
+ function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
+ return typeof obj;
+ } : function (obj) {
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ }, _typeof(obj);
+ }
+
+ // https://github.com/bgrins/TinyColor
+ // Brian Grinstead, MIT License
+
+ var trimLeft = /^\s+/;
+ var trimRight = /\s+$/;
+ function tinycolor(color, opts) {
+ color = color ? color : "";
+ opts = opts || {};
+
+ // If input is already a tinycolor, return itself
+ if (color instanceof tinycolor) {
+ return color;
+ }
+ // If we are called as a function, call using new instead
+ if (!(this instanceof tinycolor)) {
+ return new tinycolor(color, opts);
+ }
+ var rgb = inputToRGB(color);
+ this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;
+ this._gradientType = opts.gradientType;
+
+ // Don't let the range of [0,255] come back in [0,1].
+ // Potentially lose a little bit of precision here, but will fix issues where
+ // .5 gets interpreted as half of the total, instead of half of 1
+ // If it was supposed to be 128, this was already taken care of by `inputToRgb`
+ if (this._r < 1) this._r = Math.round(this._r);
+ if (this._g < 1) this._g = Math.round(this._g);
+ if (this._b < 1) this._b = Math.round(this._b);
+ this._ok = rgb.ok;
+ }
+ tinycolor.prototype = {
+ isDark: function isDark() {
+ return this.getBrightness() < 128;
+ },
+ isLight: function isLight() {
+ return !this.isDark();
+ },
+ isValid: function isValid() {
+ return this._ok;
+ },
+ getOriginalInput: function getOriginalInput() {
+ return this._originalInput;
+ },
+ getFormat: function getFormat() {
+ return this._format;
+ },
+ getAlpha: function getAlpha() {
+ return this._a;
+ },
+ getBrightness: function getBrightness() {
+ //http://www.w3.org/TR/AERT#color-contrast
+ var rgb = this.toRgb();
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
+ },
+ getLuminance: function getLuminance() {
+ //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
+ var rgb = this.toRgb();
+ var RsRGB, GsRGB, BsRGB, R, G, B;
+ RsRGB = rgb.r / 255;
+ GsRGB = rgb.g / 255;
+ BsRGB = rgb.b / 255;
+ if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
+ if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
+ if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
+ return 0.2126 * R + 0.7152 * G + 0.0722 * B;
+ },
+ setAlpha: function setAlpha(value) {
+ this._a = boundAlpha(value);
+ this._roundA = Math.round(100 * this._a) / 100;
+ return this;
+ },
+ toHsv: function toHsv() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ return {
+ h: hsv.h * 360,
+ s: hsv.s,
+ v: hsv.v,
+ a: this._a
+ };
+ },
+ toHsvString: function toHsvString() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ var h = Math.round(hsv.h * 360),
+ s = Math.round(hsv.s * 100),
+ v = Math.round(hsv.v * 100);
+ return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
+ },
+ toHsl: function toHsl() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ return {
+ h: hsl.h * 360,
+ s: hsl.s,
+ l: hsl.l,
+ a: this._a
+ };
+ },
+ toHslString: function toHslString() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ var h = Math.round(hsl.h * 360),
+ s = Math.round(hsl.s * 100),
+ l = Math.round(hsl.l * 100);
+ return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
+ },
+ toHex: function toHex(allow3Char) {
+ return rgbToHex(this._r, this._g, this._b, allow3Char);
+ },
+ toHexString: function toHexString(allow3Char) {
+ return "#" + this.toHex(allow3Char);
+ },
+ toHex8: function toHex8(allow4Char) {
+ return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
+ },
+ toHex8String: function toHex8String(allow4Char) {
+ return "#" + this.toHex8(allow4Char);
+ },
+ toRgb: function toRgb() {
+ return {
+ r: Math.round(this._r),
+ g: Math.round(this._g),
+ b: Math.round(this._b),
+ a: this._a
+ };
+ },
+ toRgbString: function toRgbString() {
+ return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
+ },
+ toPercentageRgb: function toPercentageRgb() {
+ return {
+ r: Math.round(bound01(this._r, 255) * 100) + "%",
+ g: Math.round(bound01(this._g, 255) * 100) + "%",
+ b: Math.round(bound01(this._b, 255) * 100) + "%",
+ a: this._a
+ };
+ },
+ toPercentageRgbString: function toPercentageRgbString() {
+ return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
+ },
+ toName: function toName() {
+ if (this._a === 0) {
+ return "transparent";
+ }
+ if (this._a < 1) {
+ return false;
+ }
+ return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
+ },
+ toFilter: function toFilter(secondColor) {
+ var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
+ var secondHex8String = hex8String;
+ var gradientType = this._gradientType ? "GradientType = 1, " : "";
+ if (secondColor) {
+ var s = tinycolor(secondColor);
+ secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
+ }
+ return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
+ },
+ toString: function toString(format) {
+ var formatSet = !!format;
+ format = format || this._format;
+ var formattedString = false;
+ var hasAlpha = this._a < 1 && this._a >= 0;
+ var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
+ if (needsAlphaFormat) {
+ // Special case for "transparent", all other non-alpha formats
+ // will return rgba when there is transparency.
+ if (format === "name" && this._a === 0) {
+ return this.toName();
+ }
+ return this.toRgbString();
+ }
+ if (format === "rgb") {
+ formattedString = this.toRgbString();
+ }
+ if (format === "prgb") {
+ formattedString = this.toPercentageRgbString();
+ }
+ if (format === "hex" || format === "hex6") {
+ formattedString = this.toHexString();
+ }
+ if (format === "hex3") {
+ formattedString = this.toHexString(true);
+ }
+ if (format === "hex4") {
+ formattedString = this.toHex8String(true);
+ }
+ if (format === "hex8") {
+ formattedString = this.toHex8String();
+ }
+ if (format === "name") {
+ formattedString = this.toName();
+ }
+ if (format === "hsl") {
+ formattedString = this.toHslString();
+ }
+ if (format === "hsv") {
+ formattedString = this.toHsvString();
+ }
+ return formattedString || this.toHexString();
+ },
+ clone: function clone() {
+ return tinycolor(this.toString());
+ },
+ _applyModification: function _applyModification(fn, args) {
+ var color = fn.apply(null, [this].concat([].slice.call(args)));
+ this._r = color._r;
+ this._g = color._g;
+ this._b = color._b;
+ this.setAlpha(color._a);
+ return this;
+ },
+ lighten: function lighten() {
+ return this._applyModification(_lighten, arguments);
+ },
+ brighten: function brighten() {
+ return this._applyModification(_brighten, arguments);
+ },
+ darken: function darken() {
+ return this._applyModification(_darken, arguments);
+ },
+ desaturate: function desaturate() {
+ return this._applyModification(_desaturate, arguments);
+ },
+ saturate: function saturate() {
+ return this._applyModification(_saturate, arguments);
+ },
+ greyscale: function greyscale() {
+ return this._applyModification(_greyscale, arguments);
+ },
+ spin: function spin() {
+ return this._applyModification(_spin, arguments);
+ },
+ _applyCombination: function _applyCombination(fn, args) {
+ return fn.apply(null, [this].concat([].slice.call(args)));
+ },
+ analogous: function analogous() {
+ return this._applyCombination(_analogous, arguments);
+ },
+ complement: function complement() {
+ return this._applyCombination(_complement, arguments);
+ },
+ monochromatic: function monochromatic() {
+ return this._applyCombination(_monochromatic, arguments);
+ },
+ splitcomplement: function splitcomplement() {
+ return this._applyCombination(_splitcomplement, arguments);
+ },
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
+ // polyad: function (number) {
+ // return this._applyCombination(polyad, [number]);
+ // },
+ triad: function triad() {
+ return this._applyCombination(polyad, [3]);
+ },
+ tetrad: function tetrad() {
+ return this._applyCombination(polyad, [4]);
+ }
+ };
+
+ // If input is an object, force 1 into "1.0" to handle ratios properly
+ // String input requires "1.0" as input, so 1 will be treated as 1
+ tinycolor.fromRatio = function (color, opts) {
+ if (_typeof(color) == "object") {
+ var newColor = {};
+ for (var i in color) {
+ if (color.hasOwnProperty(i)) {
+ if (i === "a") {
+ newColor[i] = color[i];
+ } else {
+ newColor[i] = convertToPercentage(color[i]);
+ }
+ }
+ }
+ color = newColor;
+ }
+ return tinycolor(color, opts);
+ };
+
+ // Given a string or object, convert that input to RGB
+ // Possible string inputs:
+ //
+ // "red"
+ // "#f00" or "f00"
+ // "#ff0000" or "ff0000"
+ // "#ff000000" or "ff000000"
+ // "rgb 255 0 0" or "rgb (255, 0, 0)"
+ // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
+ // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
+ // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
+ // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
+ // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
+ // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
+ //
+ function inputToRGB(color) {
+ var rgb = {
+ r: 0,
+ g: 0,
+ b: 0
+ };
+ var a = 1;
+ var s = null;
+ var v = null;
+ var l = null;
+ var ok = false;
+ var format = false;
+ if (typeof color == "string") {
+ color = stringInputToObject(color);
+ }
+ if (_typeof(color) == "object") {
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
+ rgb = rgbToRgb(color.r, color.g, color.b);
+ ok = true;
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
+ s = convertToPercentage(color.s);
+ v = convertToPercentage(color.v);
+ rgb = hsvToRgb(color.h, s, v);
+ ok = true;
+ format = "hsv";
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
+ s = convertToPercentage(color.s);
+ l = convertToPercentage(color.l);
+ rgb = hslToRgb(color.h, s, l);
+ ok = true;
+ format = "hsl";
+ }
+ if (color.hasOwnProperty("a")) {
+ a = color.a;
+ }
+ }
+ a = boundAlpha(a);
+ return {
+ ok: ok,
+ format: color.format || format,
+ r: Math.min(255, Math.max(rgb.r, 0)),
+ g: Math.min(255, Math.max(rgb.g, 0)),
+ b: Math.min(255, Math.max(rgb.b, 0)),
+ a: a
+ };
+ }
+
+ // Conversion Functions
+ // --------------------
+
+ // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
+ //
+
+ // `rgbToRgb`
+ // Handle bounds / percentage checking to conform to CSS color spec
+ //
+ // *Assumes:* r, g, b in [0, 255] or [0, 1]
+ // *Returns:* { r, g, b } in [0, 255]
+ function rgbToRgb(r, g, b) {
+ return {
+ r: bound01(r, 255) * 255,
+ g: bound01(g, 255) * 255,
+ b: bound01(b, 255) * 255
+ };
+ }
+
+ // `rgbToHsl`
+ // Converts an RGB color value to HSL.
+ // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
+ // *Returns:* { h, s, l } in [0,1]
+ function rgbToHsl(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ l = (max + min) / 2;
+ if (max == min) {
+ h = s = 0; // achromatic
+ } else {
+ var d = max - min;
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+ h /= 6;
+ }
+ return {
+ h: h,
+ s: s,
+ l: l
+ };
+ }
+
+ // `hslToRgb`
+ // Converts an HSL color value to RGB.
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
+ // *Returns:* { r, g, b } in the set [0, 255]
+ function hslToRgb(h, s, l) {
+ var r, g, b;
+ h = bound01(h, 360);
+ s = bound01(s, 100);
+ l = bound01(l, 100);
+ function hue2rgb(p, q, t) {
+ if (t < 0) t += 1;
+ if (t > 1) t -= 1;
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
+ if (t < 1 / 2) return q;
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+ return p;
+ }
+ if (s === 0) {
+ r = g = b = l; // achromatic
+ } else {
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+ var p = 2 * l - q;
+ r = hue2rgb(p, q, h + 1 / 3);
+ g = hue2rgb(p, q, h);
+ b = hue2rgb(p, q, h - 1 / 3);
+ }
+ return {
+ r: r * 255,
+ g: g * 255,
+ b: b * 255
+ };
+ }
+
+ // `rgbToHsv`
+ // Converts an RGB color value to HSV
+ // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
+ // *Returns:* { h, s, v } in [0,1]
+ function rgbToHsv(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ v = max;
+ var d = max - min;
+ s = max === 0 ? 0 : d / max;
+ if (max == min) {
+ h = 0; // achromatic
+ } else {
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+ h /= 6;
+ }
+ return {
+ h: h,
+ s: s,
+ v: v
+ };
+ }
+
+ // `hsvToRgb`
+ // Converts an HSV color value to RGB.
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
+ // *Returns:* { r, g, b } in the set [0, 255]
+ function hsvToRgb(h, s, v) {
+ h = bound01(h, 360) * 6;
+ s = bound01(s, 100);
+ v = bound01(v, 100);
+ var i = Math.floor(h),
+ f = h - i,
+ p = v * (1 - s),
+ q = v * (1 - f * s),
+ t = v * (1 - (1 - f) * s),
+ mod = i % 6,
+ r = [v, q, p, p, t, v][mod],
+ g = [t, v, v, q, p, p][mod],
+ b = [p, p, t, v, v, q][mod];
+ return {
+ r: r * 255,
+ g: g * 255,
+ b: b * 255
+ };
+ }
+
+ // `rgbToHex`
+ // Converts an RGB color to hex
+ // Assumes r, g, and b are contained in the set [0, 255]
+ // Returns a 3 or 6 character hex
+ function rgbToHex(r, g, b, allow3Char) {
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
+
+ // Return a 3 character hex if possible
+ if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
+ }
+ return hex.join("");
+ }
+
+ // `rgbaToHex`
+ // Converts an RGBA color plus alpha transparency to hex
+ // Assumes r, g, b are contained in the set [0, 255] and
+ // a in [0, 1]. Returns a 4 or 8 character rgba hex
+ function rgbaToHex(r, g, b, a, allow4Char) {
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
+
+ // Return a 4 character hex if possible
+ if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
+ }
+ return hex.join("");
+ }
+
+ // `rgbaToArgbHex`
+ // Converts an RGBA color to an ARGB Hex8 string
+ // Rarely used, but required for "toFilter()"
+ function rgbaToArgbHex(r, g, b, a) {
+ var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
+ return hex.join("");
+ }
+
+ // `equals`
+ // Can be called with any tinycolor input
+ tinycolor.equals = function (color1, color2) {
+ if (!color1 || !color2) return false;
+ return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
+ };
+ tinycolor.random = function () {
+ return tinycolor.fromRatio({
+ r: Math.random(),
+ g: Math.random(),
+ b: Math.random()
+ });
+ };
+
+ // Modification Functions
+ // ----------------------
+ // Thanks to less.js for some of the basics here
+ //
+
+ function _desaturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s -= amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+ }
+ function _saturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s += amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+ }
+ function _greyscale(color) {
+ return tinycolor(color).desaturate(100);
+ }
+ function _lighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l += amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+ }
+ function _brighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var rgb = tinycolor(color).toRgb();
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
+ return tinycolor(rgb);
+ }
+ function _darken(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l -= amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+ }
+
+ // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
+ // Values outside of this range will be wrapped into this range.
+ function _spin(color, amount) {
+ var hsl = tinycolor(color).toHsl();
+ var hue = (hsl.h + amount) % 360;
+ hsl.h = hue < 0 ? 360 + hue : hue;
+ return tinycolor(hsl);
+ }
+
+ // Combination Functions
+ // ---------------------
+ // Thanks to jQuery xColor for some of the ideas behind these
+ //
+
+ function _complement(color) {
+ var hsl = tinycolor(color).toHsl();
+ hsl.h = (hsl.h + 180) % 360;
+ return tinycolor(hsl);
+ }
+ function polyad(color, number) {
+ if (isNaN(number) || number <= 0) {
+ throw new Error("Argument to polyad must be a positive number");
+ }
+ var hsl = tinycolor(color).toHsl();
+ var result = [tinycolor(color)];
+ var step = 360 / number;
+ for (var i = 1; i < number; i++) {
+ result.push(tinycolor({
+ h: (hsl.h + i * step) % 360,
+ s: hsl.s,
+ l: hsl.l
+ }));
+ }
+ return result;
+ }
+ function _splitcomplement(color) {
+ var hsl = tinycolor(color).toHsl();
+ var h = hsl.h;
+ return [tinycolor(color), tinycolor({
+ h: (h + 72) % 360,
+ s: hsl.s,
+ l: hsl.l
+ }), tinycolor({
+ h: (h + 216) % 360,
+ s: hsl.s,
+ l: hsl.l
+ })];
+ }
+ function _analogous(color, results, slices) {
+ results = results || 6;
+ slices = slices || 30;
+ var hsl = tinycolor(color).toHsl();
+ var part = 360 / slices;
+ var ret = [tinycolor(color)];
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
+ hsl.h = (hsl.h + part) % 360;
+ ret.push(tinycolor(hsl));
+ }
+ return ret;
+ }
+ function _monochromatic(color, results) {
+ results = results || 6;
+ var hsv = tinycolor(color).toHsv();
+ var h = hsv.h,
+ s = hsv.s,
+ v = hsv.v;
+ var ret = [];
+ var modification = 1 / results;
+ while (results--) {
+ ret.push(tinycolor({
+ h: h,
+ s: s,
+ v: v
+ }));
+ v = (v + modification) % 1;
+ }
+ return ret;
+ }
+
+ // Utility Functions
+ // ---------------------
+
+ tinycolor.mix = function (color1, color2, amount) {
+ amount = amount === 0 ? 0 : amount || 50;
+ var rgb1 = tinycolor(color1).toRgb();
+ var rgb2 = tinycolor(color2).toRgb();
+ var p = amount / 100;
+ var rgba = {
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
+ };
+ return tinycolor(rgba);
+ };
+
+ // Readability Functions
+ // ---------------------
+ // false
+ // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
+ tinycolor.isReadable = function (color1, color2, wcag2) {
+ var readability = tinycolor.readability(color1, color2);
+ var wcag2Parms, out;
+ out = false;
+ wcag2Parms = validateWCAG2Parms(wcag2);
+ switch (wcag2Parms.level + wcag2Parms.size) {
+ case "AAsmall":
+ case "AAAlarge":
+ out = readability >= 4.5;
+ break;
+ case "AAlarge":
+ out = readability >= 3;
+ break;
+ case "AAAsmall":
+ out = readability >= 7;
+ break;
+ }
+ return out;
+ };
+
+ // `mostReadable`
+ // Given a base color and a list of possible foreground or background
+ // colors for that base, returns the most readable color.
+ // Optionally returns Black or White if the most readable color is unreadable.
+ // *Example*
+ // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
+ // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
+ // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
+ // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
+ tinycolor.mostReadable = function (baseColor, colorList, args) {
+ var bestColor = null;
+ var bestScore = 0;
+ var readability;
+ var includeFallbackColors, level, size;
+ args = args || {};
+ includeFallbackColors = args.includeFallbackColors;
+ level = args.level;
+ size = args.size;
+ for (var i = 0; i < colorList.length; i++) {
+ readability = tinycolor.readability(baseColor, colorList[i]);
+ if (readability > bestScore) {
+ bestScore = readability;
+ bestColor = tinycolor(colorList[i]);
+ }
+ }
+ if (tinycolor.isReadable(baseColor, bestColor, {
+ level: level,
+ size: size
+ }) || !includeFallbackColors) {
+ return bestColor;
+ } else {
+ args.includeFallbackColors = false;
+ return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
+ }
+ };
+
+ // Big List of Colors
+ // ------------------
+ //
+ var names = tinycolor.names = {
+ aliceblue: "f0f8ff",
+ antiquewhite: "faebd7",
+ aqua: "0ff",
+ aquamarine: "7fffd4",
+ azure: "f0ffff",
+ beige: "f5f5dc",
+ bisque: "ffe4c4",
+ black: "000",
+ blanchedalmond: "ffebcd",
+ blue: "00f",
+ blueviolet: "8a2be2",
+ brown: "a52a2a",
+ burlywood: "deb887",
+ burntsienna: "ea7e5d",
+ cadetblue: "5f9ea0",
+ chartreuse: "7fff00",
+ chocolate: "d2691e",
+ coral: "ff7f50",
+ cornflowerblue: "6495ed",
+ cornsilk: "fff8dc",
+ crimson: "dc143c",
+ cyan: "0ff",
+ darkblue: "00008b",
+ darkcyan: "008b8b",
+ darkgoldenrod: "b8860b",
+ darkgray: "a9a9a9",
+ darkgreen: "006400",
+ darkgrey: "a9a9a9",
+ darkkhaki: "bdb76b",
+ darkmagenta: "8b008b",
+ darkolivegreen: "556b2f",
+ darkorange: "ff8c00",
+ darkorchid: "9932cc",
+ darkred: "8b0000",
+ darksalmon: "e9967a",
+ darkseagreen: "8fbc8f",
+ darkslateblue: "483d8b",
+ darkslategray: "2f4f4f",
+ darkslategrey: "2f4f4f",
+ darkturquoise: "00ced1",
+ darkviolet: "9400d3",
+ deeppink: "ff1493",
+ deepskyblue: "00bfff",
+ dimgray: "696969",
+ dimgrey: "696969",
+ dodgerblue: "1e90ff",
+ firebrick: "b22222",
+ floralwhite: "fffaf0",
+ forestgreen: "228b22",
+ fuchsia: "f0f",
+ gainsboro: "dcdcdc",
+ ghostwhite: "f8f8ff",
+ gold: "ffd700",
+ goldenrod: "daa520",
+ gray: "808080",
+ green: "008000",
+ greenyellow: "adff2f",
+ grey: "808080",
+ honeydew: "f0fff0",
+ hotpink: "ff69b4",
+ indianred: "cd5c5c",
+ indigo: "4b0082",
+ ivory: "fffff0",
+ khaki: "f0e68c",
+ lavender: "e6e6fa",
+ lavenderblush: "fff0f5",
+ lawngreen: "7cfc00",
+ lemonchiffon: "fffacd",
+ lightblue: "add8e6",
+ lightcoral: "f08080",
+ lightcyan: "e0ffff",
+ lightgoldenrodyellow: "fafad2",
+ lightgray: "d3d3d3",
+ lightgreen: "90ee90",
+ lightgrey: "d3d3d3",
+ lightpink: "ffb6c1",
+ lightsalmon: "ffa07a",
+ lightseagreen: "20b2aa",
+ lightskyblue: "87cefa",
+ lightslategray: "789",
+ lightslategrey: "789",
+ lightsteelblue: "b0c4de",
+ lightyellow: "ffffe0",
+ lime: "0f0",
+ limegreen: "32cd32",
+ linen: "faf0e6",
+ magenta: "f0f",
+ maroon: "800000",
+ mediumaquamarine: "66cdaa",
+ mediumblue: "0000cd",
+ mediumorchid: "ba55d3",
+ mediumpurple: "9370db",
+ mediumseagreen: "3cb371",
+ mediumslateblue: "7b68ee",
+ mediumspringgreen: "00fa9a",
+ mediumturquoise: "48d1cc",
+ mediumvioletred: "c71585",
+ midnightblue: "191970",
+ mintcream: "f5fffa",
+ mistyrose: "ffe4e1",
+ moccasin: "ffe4b5",
+ navajowhite: "ffdead",
+ navy: "000080",
+ oldlace: "fdf5e6",
+ olive: "808000",
+ olivedrab: "6b8e23",
+ orange: "ffa500",
+ orangered: "ff4500",
+ orchid: "da70d6",
+ palegoldenrod: "eee8aa",
+ palegreen: "98fb98",
+ paleturquoise: "afeeee",
+ palevioletred: "db7093",
+ papayawhip: "ffefd5",
+ peachpuff: "ffdab9",
+ peru: "cd853f",
+ pink: "ffc0cb",
+ plum: "dda0dd",
+ powderblue: "b0e0e6",
+ purple: "800080",
+ rebeccapurple: "663399",
+ red: "f00",
+ rosybrown: "bc8f8f",
+ royalblue: "4169e1",
+ saddlebrown: "8b4513",
+ salmon: "fa8072",
+ sandybrown: "f4a460",
+ seagreen: "2e8b57",
+ seashell: "fff5ee",
+ sienna: "a0522d",
+ silver: "c0c0c0",
+ skyblue: "87ceeb",
+ slateblue: "6a5acd",
+ slategray: "708090",
+ slategrey: "708090",
+ snow: "fffafa",
+ springgreen: "00ff7f",
+ steelblue: "4682b4",
+ tan: "d2b48c",
+ teal: "008080",
+ thistle: "d8bfd8",
+ tomato: "ff6347",
+ turquoise: "40e0d0",
+ violet: "ee82ee",
+ wheat: "f5deb3",
+ white: "fff",
+ whitesmoke: "f5f5f5",
+ yellow: "ff0",
+ yellowgreen: "9acd32"
+ };
+
+ // Make it easy to access colors via `hexNames[hex]`
+ var hexNames = tinycolor.hexNames = flip(names);
+
+ // Utilities
+ // ---------
+
+ // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
+ function flip(o) {
+ var flipped = {};
+ for (var i in o) {
+ if (o.hasOwnProperty(i)) {
+ flipped[o[i]] = i;
+ }
+ }
+ return flipped;
+ }
+
+ // Return a valid alpha value [0,1] with all invalid values being set to 1
+ function boundAlpha(a) {
+ a = parseFloat(a);
+ if (isNaN(a) || a < 0 || a > 1) {
+ a = 1;
+ }
+ return a;
+ }
+
+ // Take input from [0, n] and return it as [0, 1]
+ function bound01(n, max) {
+ if (isOnePointZero(n)) n = "100%";
+ var processPercent = isPercentage(n);
+ n = Math.min(max, Math.max(0, parseFloat(n)));
+
+ // Automatically convert percentage into number
+ if (processPercent) {
+ n = parseInt(n * max, 10) / 100;
+ }
+
+ // Handle floating point rounding errors
+ if (Math.abs(n - max) < 0.000001) {
+ return 1;
+ }
+
+ // Convert into [0, 1] range if it isn't already
+ return n % max / parseFloat(max);
+ }
+
+ // Force a number between 0 and 1
+ function clamp01(val) {
+ return Math.min(1, Math.max(0, val));
+ }
+
+ // Parse a base-16 hex value into a base-10 integer
+ function parseIntFromHex(val) {
+ return parseInt(val, 16);
+ }
+
+ // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
+ //
+ function isOnePointZero(n) {
+ return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
+ }
+
+ // Check to see if string passed in is a percentage
+ function isPercentage(n) {
+ return typeof n === "string" && n.indexOf("%") != -1;
+ }
+
+ // Force a hex value to have 2 characters
+ function pad2(c) {
+ return c.length == 1 ? "0" + c : "" + c;
+ }
+
+ // Replace a decimal with it's percentage value
+ function convertToPercentage(n) {
+ if (n <= 1) {
+ n = n * 100 + "%";
+ }
+ return n;
+ }
+
+ // Converts a decimal to a hex value
+ function convertDecimalToHex(d) {
+ return Math.round(parseFloat(d) * 255).toString(16);
+ }
+ // Converts a hex value to a decimal
+ function convertHexToDecimal(h) {
+ return parseIntFromHex(h) / 255;
+ }
+ var matchers = function () {
+ //
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
+
+ //
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
+
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
+
+ // Actual matching.
+ // Parentheses and commas are optional, but not required.
+ // Whitespace can take the place of commas or opening paren
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+ return {
+ CSS_UNIT: new RegExp(CSS_UNIT),
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
+ };
+ }();
+
+ // `isValidCSSUnit`
+ // Take in a single string / number and check to see if it looks like a CSS unit
+ // (see `matchers` above for definition).
+ function isValidCSSUnit(color) {
+ return !!matchers.CSS_UNIT.exec(color);
+ }
+
+ // `stringInputToObject`
+ // Permissive string parsing. Take in a number of formats, and output an object
+ // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
+ function stringInputToObject(color) {
+ color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
+ var named = false;
+ if (names[color]) {
+ color = names[color];
+ named = true;
+ } else if (color == "transparent") {
+ return {
+ r: 0,
+ g: 0,
+ b: 0,
+ a: 0,
+ format: "name"
+ };
+ }
+
+ // Try to match string input using regular expressions.
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
+ // Just return an object and let the conversion functions handle that.
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
+ var match;
+ if (match = matchers.rgb.exec(color)) {
+ return {
+ r: match[1],
+ g: match[2],
+ b: match[3]
+ };
+ }
+ if (match = matchers.rgba.exec(color)) {
+ return {
+ r: match[1],
+ g: match[2],
+ b: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hsl.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ l: match[3]
+ };
+ }
+ if (match = matchers.hsla.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ l: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hsv.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ v: match[3]
+ };
+ }
+ if (match = matchers.hsva.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ v: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hex8.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ a: convertHexToDecimal(match[4]),
+ format: named ? "name" : "hex8"
+ };
+ }
+ if (match = matchers.hex6.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+ if (match = matchers.hex4.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ a: convertHexToDecimal(match[4] + "" + match[4]),
+ format: named ? "name" : "hex8"
+ };
+ }
+ if (match = matchers.hex3.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+ return false;
+ }
+ function validateWCAG2Parms(parms) {
+ // return valid WCAG2 parms for isReadable.
+ // If input parms are invalid, return {"level":"AA", "size":"small"}
+ var level, size;
+ parms = parms || {
+ level: "AA",
+ size: "small"
+ };
+ level = (parms.level || "AA").toUpperCase();
+ size = (parms.size || "small").toLowerCase();
+ if (level !== "AA" && level !== "AAA") {
+ level = "AA";
+ }
+ if (size !== "small" && size !== "large") {
+ size = "small";
+ }
+ return {
+ level: level,
+ size: size
+ };
+ }
+
+ return tinycolor;
+
+}));
diff --git a/vendor/assets/javascripts/tinycolor/test.js b/vendor/assets/javascripts/tinycolor/test.js
new file mode 100644
index 000000000..d60034282
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/test.js
@@ -0,0 +1,2174 @@
+import {
+ assert,
+ assertEquals,
+ assertThrows,
+} from "https://deno.land/std@0.168.0/testing/asserts.ts";
+import tinycolor from "./mod.js";
+
+// The following comment is used by build.js to copy tests to cjs:
+// TEST_BEGINS_HERE
+
+Deno.test("TinyColor initialization", function () {
+ assert(
+ typeof tinycolor != "undefined",
+ "tinycolor is initialized on the page"
+ );
+ assert(
+ typeof tinycolor("red") == "object",
+ "tinycolor is able to be instantiated"
+ );
+
+ var r = tinycolor("red");
+ assert(
+ tinycolor(r) === r,
+ "when given a tinycolor instance, tinycolor() returns it"
+ );
+ assert(
+ new tinycolor(r) === r,
+ "when given a tinycolor instance, new tinycolor() returns it"
+ );
+ assertEquals(
+ tinycolor("red", { format: "hex" }).toString(),
+ "#ff0000",
+ "tinycolor options are being parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0 }, { format: "hex" }).toString(),
+ "#ff0000",
+ "tinycolor options are being parsed"
+ );
+
+ var obj = { h: 180, s: 0.5, l: 0.5 };
+ var color = tinycolor(obj);
+ assert(
+ obj.s === 0.5,
+ "when given an object, the original object is not modified"
+ );
+});
+
+Deno.test("Original input", function () {
+ var colorRgbUp = "RGB(39, 39, 39)";
+ var colorRgbLow = "rgb(39, 39, 39)";
+ var colorRgbMix = "RgB(39, 39, 39)";
+ var tinycolorObj = tinycolor(colorRgbMix);
+ var inputObj = { r: 100, g: 100, b: 100 };
+ var r = tinycolor("red");
+
+ assert(
+ tinycolor(colorRgbLow).getOriginalInput() === colorRgbLow,
+ "original lowercase input is returned"
+ );
+ assert(
+ tinycolor(colorRgbUp).getOriginalInput() === colorRgbUp,
+ "original uppercase input is returned"
+ );
+ assert(
+ tinycolor(colorRgbMix).getOriginalInput() === colorRgbMix,
+ "original mixed input is returned"
+ );
+ assert(
+ tinycolor(tinycolorObj).getOriginalInput() === colorRgbMix,
+ "when given a tinycolor instance, the color string is returned"
+ );
+ assert(
+ tinycolor(inputObj).getOriginalInput() === inputObj,
+ "when given an object, the object is returned"
+ );
+ assert(
+ new tinycolor("").getOriginalInput() === "",
+ "when given an empty string, an empty string is returned"
+ );
+ assert(
+ new tinycolor(null).getOriginalInput() === "",
+ "when given a null value, an empty string is returned"
+ );
+});
+
+Deno.test("Cloning color", function () {
+ var originalColor = tinycolor("red");
+ var originalColorRgbString = originalColor.toRgbString();
+
+ var clonedColor = originalColor.clone();
+ assert(
+ clonedColor.toRgbString() === originalColor.toRgbString(),
+ "cloned color is identical"
+ );
+
+ clonedColor.setAlpha(0.5);
+ assert(
+ clonedColor.toRgbString() !== originalColor.toRgbString(),
+ "cloned color is changing independently from original color"
+ );
+ assert(
+ originalColorRgbString === originalColor.toRgbString(),
+ "original color was not changed by cloned color change"
+ );
+});
+Deno.test("Random color", function () {
+ var randomColor = tinycolor.random();
+ assertEquals(randomColor.getAlpha(), 1);
+ assertEquals(randomColor.getFormat(), "prgb");
+
+ randomColor.setAlpha(0.5);
+ assertEquals(randomColor.toHex8String().slice(-2), "80");
+});
+
+// Taken from convertWikipediaColors.html
+var conversions = [
+ {
+ hex: "#FFFFFF",
+ hex8: "#FFFFFFFF",
+ rgb: { r: "100.0%", g: "100.0%", b: "100.0%" },
+ hsv: { h: "0", s: "0.000", v: "1.000" },
+ hsl: { h: "0", s: "0.000", l: "1.000" },
+ },
+ {
+ hex: "#808080",
+ hex8: "#808080FF",
+ rgb: { r: "050.0%", g: "050.0%", b: "050.0%" },
+ hsv: { h: "0", s: "0.000", v: "0.500" },
+ hsl: { h: "0", s: "0.000", l: "0.500" },
+ },
+ {
+ hex: "#000000",
+ hex8: "#000000FF",
+ rgb: { r: "000.0%", g: "000.0%", b: "000.0%" },
+ hsv: { h: "0", s: "0.000", v: "0.000" },
+ hsl: { h: "0", s: "0.000", l: "0.000" },
+ },
+ {
+ hex: "#FF0000",
+ hex8: "#FF0000FF",
+ rgb: { r: "100.0%", g: "000.0%", b: "000.0%" },
+ hsv: { h: "0.0", s: "1.000", v: "1.000" },
+ hsl: { h: "0.0", s: "1.000", l: "0.500" },
+ },
+ {
+ hex: "#BFBF00",
+ hex8: "#BFBF00FF",
+ rgb: { r: "075.0%", g: "075.0%", b: "000.0%" },
+ hsv: { h: "60.0", s: "1.000", v: "0.750" },
+ hsl: { h: "60.0", s: "1.000", l: "0.375" },
+ },
+ {
+ hex: "#008000",
+ hex8: "#008000FF",
+ rgb: { r: "000.0%", g: "050.0%", b: "000.0%" },
+ hsv: { h: "120.0", s: "1.000", v: "0.500" },
+ hsl: { h: "120.0", s: "1.000", l: "0.250" },
+ },
+ {
+ hex: "#80FFFF",
+ hex8: "#80FFFFFF",
+ rgb: { r: "050.0%", g: "100.0%", b: "100.0%" },
+ hsv: { h: "180.0", s: "0.500", v: "1.000" },
+ hsl: { h: "180.0", s: "1.000", l: "0.750" },
+ },
+ {
+ hex: "#8080FF",
+ hex8: "#8080FFFF",
+ rgb: { r: "050.0%", g: "050.0%", b: "100.0%" },
+ hsv: { h: "240.0", s: "0.500", v: "1.000" },
+ hsl: { h: "240.0", s: "1.000", l: "0.750" },
+ },
+ {
+ hex: "#BF40BF",
+ hex8: "#BF40BFFF",
+ rgb: { r: "075.0%", g: "025.0%", b: "075.0%" },
+ hsv: { h: "300.0", s: "0.667", v: "0.750" },
+ hsl: { h: "300.0", s: "0.500", l: "0.500" },
+ },
+ {
+ hex: "#A0A424",
+ hex8: "#A0A424FF",
+ rgb: { r: "062.8%", g: "064.3%", b: "014.2%" },
+ hsv: { h: "61.8", s: "0.779", v: "0.643" },
+ hsl: { h: "61.8", s: "0.638", l: "0.393" },
+ },
+ {
+ hex: "#1EAC41",
+ hex8: "#1EAC41FF",
+ rgb: { r: "011.6%", g: "067.5%", b: "025.5%" },
+ hsv: { h: "134.9", s: "0.828", v: "0.675" },
+ hsl: { h: "134.9", s: "0.707", l: "0.396" },
+ },
+ {
+ hex: "#B430E5",
+ hex8: "#B430E5FF",
+ rgb: { r: "070.4%", g: "018.7%", b: "089.7%" },
+ hsv: { h: "283.7", s: "0.792", v: "0.897" },
+ hsl: { h: "283.7", s: "0.775", l: "0.542" },
+ },
+ {
+ hex: "#FEF888",
+ hex8: "#FEF888FF",
+ rgb: { r: "099.8%", g: "097.4%", b: "053.2%" },
+ hsv: { h: "56.9", s: "0.467", v: "0.998" },
+ hsl: { h: "56.9", s: "0.991", l: "0.765" },
+ },
+ {
+ hex: "#19CB97",
+ hex8: "#19CB97FF",
+ rgb: { r: "009.9%", g: "079.5%", b: "059.1%" },
+ hsv: { h: "162.4", s: "0.875", v: "0.795" },
+ hsl: { h: "162.4", s: "0.779", l: "0.447" },
+ },
+ {
+ hex: "#362698",
+ hex8: "#362698FF",
+ rgb: { r: "021.1%", g: "014.9%", b: "059.7%" },
+ hsv: { h: "248.3", s: "0.750", v: "0.597" },
+ hsl: { h: "248.3", s: "0.601", l: "0.373" },
+ },
+ {
+ hex: "#7E7EB8",
+ hex8: "#7E7EB8FF",
+ rgb: { r: "049.5%", g: "049.3%", b: "072.1%" },
+ hsv: { h: "240.5", s: "0.316", v: "0.721" },
+ hsl: { h: "240.5", s: "0.290", l: "0.607" },
+ },
+];
+
+Deno.test("Color Equality", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+
+ assert(true, tiny.isValid());
+ assert(
+ true,
+ "Testing " +
+ c.hex +
+ ": " +
+ tiny.toRgbString() +
+ " " +
+ tiny.toPercentageRgbString() +
+ " " +
+ tiny.toHsvString() +
+ " " +
+ tiny.toHslString() +
+ " " +
+ tiny.toHexString() +
+ "Original: " +
+ JSON.stringify(c.rgb) +
+ " " +
+ JSON.stringify(c.hsv) +
+ " " +
+ JSON.stringify(c.hsl)
+ );
+ assert(tinycolor.equals(c.rgb, c.hex), "RGB equals hex " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.hex8), "RGB equals hex " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.hsl), "RGB equals HSL " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.hsv), "RGB equals HSV " + c.hex);
+ assert(tinycolor.equals(c.rgb, c.rgb), "RGB equals RGB " + c.hex);
+
+ assert(tinycolor.equals(c.hex, c.hex), "hex equals hex " + c.hex);
+ assert(tinycolor.equals(c.hex, c.hex8), "hex equals hex8 " + c.hex);
+ assert(tinycolor.equals(c.hex, c.hsl), "hex equals HSL " + c.hex);
+ assert(tinycolor.equals(c.hex, c.hsv), "hex equals HSV " + c.hex);
+
+ assert(tinycolor.equals(c.hsl, c.hsv), "HSL equals HSV " + c.hex);
+ }
+});
+
+Deno.test("With Ratio", function () {
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 1, b: 1 }).toHexString(),
+ "#ffffff",
+ "white"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 0.5 }).toRgbString(),
+ "rgba(255, 0, 0, 0.5)",
+ "alpha works when ratio is parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 1 }).toRgbString(),
+ "rgb(255, 0, 0)",
+ "alpha = 1 works when ratio is parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 10 }).toRgbString(),
+ "rgb(255, 0, 0)",
+ "alpha > 1 works when ratio is parsed"
+ );
+ assertEquals(
+ tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: -1 }).toRgbString(),
+ "rgb(255, 0, 0)",
+ "alpha < 1 works when ratio is parsed"
+ );
+});
+
+Deno.test("Without Ratio", function () {
+ assertEquals(
+ tinycolor({ r: 1, g: 1, b: 1 }).toHexString(),
+ "#010101",
+ "010101"
+ );
+ assertEquals(
+ tinycolor({ r: 0.1, g: 0.1, b: 0.1 }).toHexString(),
+ "#000000",
+ "000000"
+ );
+ assertEquals(tinycolor("rgb .1 .1 .1").toHexString(), "#000000", "000000");
+});
+
+Deno.test("RGB Text Parsing", function () {
+ assertEquals(
+ tinycolor("rgb 255 0 0").toHexString(),
+ "#ff0000",
+ "spaced input"
+ );
+ assertEquals(
+ tinycolor("rgb(255, 0, 0)").toHexString(),
+ "#ff0000",
+ "parenthesized input"
+ );
+ assertEquals(
+ tinycolor("rgb (255, 0, 0)").toHexString(),
+ "#ff0000",
+ "parenthesized spaced input"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 0, b: 0 }).toHexString(),
+ "#ff0000",
+ "object input"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 0, b: 0 }).toRgb(),
+ {
+ r: 255,
+ g: 0,
+ b: 0,
+ a: 1,
+ },
+ "object input and compare"
+ );
+
+ assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb(200, 100, 0)"));
+ assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb 200 100 0"));
+ assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb 200 100 0"));
+ assert(
+ tinycolor.equals({ r: 200, g: 100, b: 0, a: 0.4 }, "rgba 200 100 0 .4")
+ );
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgba 200 100 0 1"));
+
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb(200, 100, 0)"));
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb 200 100 0"));
+ assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb 200 100 0"));
+
+ assert(
+ tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb(200, 100, 0)")
+ );
+ assert(
+ tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb 200 100 0")
+ );
+ assert(
+ tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb 200 100 0")
+ );
+});
+
+Deno.test("Percentage RGB Text Parsing", function () {
+ assertEquals(
+ tinycolor("rgb 100% 0% 0%").toHexString(),
+ "#ff0000",
+ "spaced input"
+ );
+ assertEquals(
+ tinycolor("rgb(100%, 0%, 0%)").toHexString(),
+ "#ff0000",
+ "parenthesized input"
+ );
+ assertEquals(
+ tinycolor("rgb (100%, 0%, 0%)").toHexString(),
+ "#ff0000",
+ "parenthesized spaced input"
+ );
+ assertEquals(
+ tinycolor({ r: "100%", g: "0%", b: "0%" }).toHexString(),
+ "#ff0000",
+ "object input"
+ );
+ assertEquals(
+ tinycolor({ r: "100%", g: "0%", b: "0%" }).toRgb(),
+ {
+ r: 255,
+ g: 0,
+ b: 0,
+ a: 1,
+ },
+ "object input and compare"
+ );
+
+ assert(
+ tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb(90%, 45%, 0%)")
+ );
+ assert(tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+ assert(tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+ assert(
+ tinycolor.equals(
+ { r: "90%", g: "45%", b: "0%", a: 0.4 },
+ "rgba 90% 45% 0% .4"
+ )
+ );
+ assert(
+ !tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgba 90% 45% 0% 1")
+ );
+
+ assert(
+ !tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb(90%, 45%, 0%)")
+ );
+ assert(!tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+ assert(!tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb 90% 45% 0%"));
+
+ assert(
+ tinycolor.equals(
+ tinycolor({ r: "90%", g: "45%", b: "0%" }),
+ "rgb(90%, 45%, 0%)"
+ )
+ );
+ assert(
+ tinycolor.equals(
+ tinycolor({ r: "90%", g: "45%", b: "0%" }),
+ "rgb 90% 45% 0%"
+ )
+ );
+ assert(
+ tinycolor.equals(
+ tinycolor({ r: "90%", g: "45%", b: "0%" }),
+ "rgb 90% 45% 0%"
+ )
+ );
+});
+
+Deno.test("HSL parsing", function () {
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38 }).toHexString(),
+ "#2400c2",
+ "to hex"
+ );
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38 }).toRgbString(),
+ "rgb(36, 0, 194)",
+ "to rgb"
+ );
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38 }).toHslString(),
+ "hsl(251, 100%, 38%)",
+ "to hsl"
+ );
+ assertEquals(
+ tinycolor({ h: 251, s: 100, l: 0.38, a: 0.5 }).toHslString(),
+ "hsla(251, 100%, 38%, 0.5)",
+ "to hsla"
+ );
+ assertEquals(
+ tinycolor("hsl(251, 100, 38)").toHexString(),
+ "#2400c2",
+ "to hex"
+ );
+ assertEquals(
+ tinycolor("hsl(251, 100%, 38%)").toRgbString(),
+ "rgb(36, 0, 194)",
+ "to rgb"
+ );
+ assertEquals(
+ tinycolor("hsl(251, 100%, 38%)").toHslString(),
+ "hsl(251, 100%, 38%)",
+ "to hsl"
+ );
+ assertEquals(
+ tinycolor("hsl 100 20 10").toHslString(),
+ "hsl(100, 20%, 10%)",
+ "problematic hsl"
+ );
+});
+
+Deno.test("Hex Parsing", function () {
+ assertEquals(tinycolor("rgb 255 0 0").toHexString(), "#ff0000");
+ assertEquals(tinycolor("rgb 255 0 0").toHexString(true), "#f00");
+
+ assertEquals(tinycolor("rgba 255 0 0 0.5").toHex8String(), "#ff000080");
+ assertEquals(tinycolor("rgba 255 0 0 0").toHex8String(), "#ff000000");
+ assertEquals(tinycolor("rgba 255 0 0 1").toHex8String(), "#ff0000ff");
+ assertEquals(tinycolor("rgba 255 0 0 1").toHex8String(true), "#f00f");
+
+ assertEquals(tinycolor("rgb 255 0 0").toHex(), "ff0000");
+ assertEquals(tinycolor("rgb 255 0 0").toHex(true), "f00");
+ assertEquals(tinycolor("rgba 255 0 0 0.5").toHex8(), "ff000080");
+});
+
+Deno.test("HSV Parsing", function () {
+ assertEquals(
+ tinycolor("hsv 251.1 0.887 .918").toHsvString(),
+ "hsv(251, 89%, 92%)"
+ );
+ assertEquals(
+ tinycolor("hsv 251.1 0.887 0.918").toHsvString(),
+ "hsv(251, 89%, 92%)"
+ );
+ assertEquals(
+ tinycolor("hsva 251.1 0.887 0.918 0.5").toHsvString(),
+ "hsva(251, 89%, 92%, 0.5)"
+ );
+});
+
+Deno.test("Invalid Parsing", function () {
+ var invalidColor = tinycolor("this is not a color");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor("#red");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor(" #red");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor("##123456");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor(" ##123456");
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor({ r: "invalid", g: "invalid", b: "invalid" });
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor({ h: "invalid", s: "invalid", l: "invalid" });
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+
+ invalidColor = tinycolor({ h: "invalid", s: "invalid", v: "invalid" });
+ assertEquals(invalidColor.toHexString(), "#000000");
+ assertEquals(false, invalidColor.isValid());
+});
+
+Deno.test("Named colors", function () {
+ assertEquals(tinycolor("aliceblue").toHex(), "f0f8ff");
+ assertEquals(tinycolor("antiquewhite").toHex(), "faebd7");
+ assertEquals(tinycolor("aqua").toHex(), "00ffff");
+ assertEquals(tinycolor("aquamarine").toHex(), "7fffd4");
+ assertEquals(tinycolor("azure").toHex(), "f0ffff");
+ assertEquals(tinycolor("beige").toHex(), "f5f5dc");
+ assertEquals(tinycolor("bisque").toHex(), "ffe4c4");
+ assertEquals(tinycolor("black").toHex(), "000000");
+ assertEquals(tinycolor("blanchedalmond").toHex(), "ffebcd");
+ assertEquals(tinycolor("blue").toHex(), "0000ff");
+ assertEquals(tinycolor("blueviolet").toHex(), "8a2be2");
+ assertEquals(tinycolor("brown").toHex(), "a52a2a");
+ assertEquals(tinycolor("burlywood").toHex(), "deb887");
+ assertEquals(tinycolor("cadetblue").toHex(), "5f9ea0");
+ assertEquals(tinycolor("chartreuse").toHex(), "7fff00");
+ assertEquals(tinycolor("chocolate").toHex(), "d2691e");
+ assertEquals(tinycolor("coral").toHex(), "ff7f50");
+ assertEquals(tinycolor("cornflowerblue").toHex(), "6495ed");
+ assertEquals(tinycolor("cornsilk").toHex(), "fff8dc");
+ assertEquals(tinycolor("crimson").toHex(), "dc143c");
+ assertEquals(tinycolor("cyan").toHex(), "00ffff");
+ assertEquals(tinycolor("darkblue").toHex(), "00008b");
+ assertEquals(tinycolor("darkcyan").toHex(), "008b8b");
+ assertEquals(tinycolor("darkgoldenrod").toHex(), "b8860b");
+ assertEquals(tinycolor("darkgray").toHex(), "a9a9a9");
+ assertEquals(tinycolor("darkgreen").toHex(), "006400");
+ assertEquals(tinycolor("darkkhaki").toHex(), "bdb76b");
+ assertEquals(tinycolor("darkmagenta").toHex(), "8b008b");
+ assertEquals(tinycolor("darkolivegreen").toHex(), "556b2f");
+ assertEquals(tinycolor("darkorange").toHex(), "ff8c00");
+ assertEquals(tinycolor("darkorchid").toHex(), "9932cc");
+ assertEquals(tinycolor("darkred").toHex(), "8b0000");
+ assertEquals(tinycolor("darksalmon").toHex(), "e9967a");
+ assertEquals(tinycolor("darkseagreen").toHex(), "8fbc8f");
+ assertEquals(tinycolor("darkslateblue").toHex(), "483d8b");
+ assertEquals(tinycolor("darkslategray").toHex(), "2f4f4f");
+ assertEquals(tinycolor("darkturquoise").toHex(), "00ced1");
+ assertEquals(tinycolor("darkviolet").toHex(), "9400d3");
+ assertEquals(tinycolor("deeppink").toHex(), "ff1493");
+ assertEquals(tinycolor("deepskyblue").toHex(), "00bfff");
+ assertEquals(tinycolor("dimgray").toHex(), "696969");
+ assertEquals(tinycolor("dodgerblue").toHex(), "1e90ff");
+ assertEquals(tinycolor("firebrick").toHex(), "b22222");
+ assertEquals(tinycolor("floralwhite").toHex(), "fffaf0");
+ assertEquals(tinycolor("forestgreen").toHex(), "228b22");
+ assertEquals(tinycolor("fuchsia").toHex(), "ff00ff");
+ assertEquals(tinycolor("gainsboro").toHex(), "dcdcdc");
+ assertEquals(tinycolor("ghostwhite").toHex(), "f8f8ff");
+ assertEquals(tinycolor("gold").toHex(), "ffd700");
+ assertEquals(tinycolor("goldenrod").toHex(), "daa520");
+ assertEquals(tinycolor("gray").toHex(), "808080");
+ assertEquals(tinycolor("grey").toHex(), "808080");
+ assertEquals(tinycolor("green").toHex(), "008000");
+ assertEquals(tinycolor("greenyellow").toHex(), "adff2f");
+ assertEquals(tinycolor("honeydew").toHex(), "f0fff0");
+ assertEquals(tinycolor("hotpink").toHex(), "ff69b4");
+ assertEquals(tinycolor("indianred ").toHex(), "cd5c5c");
+ assertEquals(tinycolor("indigo ").toHex(), "4b0082");
+ assertEquals(tinycolor("ivory").toHex(), "fffff0");
+ assertEquals(tinycolor("khaki").toHex(), "f0e68c");
+ assertEquals(tinycolor("lavender").toHex(), "e6e6fa");
+ assertEquals(tinycolor("lavenderblush").toHex(), "fff0f5");
+ assertEquals(tinycolor("lawngreen").toHex(), "7cfc00");
+ assertEquals(tinycolor("lemonchiffon").toHex(), "fffacd");
+ assertEquals(tinycolor("lightblue").toHex(), "add8e6");
+ assertEquals(tinycolor("lightcoral").toHex(), "f08080");
+ assertEquals(tinycolor("lightcyan").toHex(), "e0ffff");
+ assertEquals(tinycolor("lightgoldenrodyellow").toHex(), "fafad2");
+ assertEquals(tinycolor("lightgrey").toHex(), "d3d3d3");
+ assertEquals(tinycolor("lightgreen").toHex(), "90ee90");
+ assertEquals(tinycolor("lightpink").toHex(), "ffb6c1");
+ assertEquals(tinycolor("lightsalmon").toHex(), "ffa07a");
+ assertEquals(tinycolor("lightseagreen").toHex(), "20b2aa");
+ assertEquals(tinycolor("lightskyblue").toHex(), "87cefa");
+ assertEquals(tinycolor("lightslategray").toHex(), "778899");
+ assertEquals(tinycolor("lightsteelblue").toHex(), "b0c4de");
+ assertEquals(tinycolor("lightyellow").toHex(), "ffffe0");
+ assertEquals(tinycolor("lime").toHex(), "00ff00");
+ assertEquals(tinycolor("limegreen").toHex(), "32cd32");
+ assertEquals(tinycolor("linen").toHex(), "faf0e6");
+ assertEquals(tinycolor("magenta").toHex(), "ff00ff");
+ assertEquals(tinycolor("maroon").toHex(), "800000");
+ assertEquals(tinycolor("mediumaquamarine").toHex(), "66cdaa");
+ assertEquals(tinycolor("mediumblue").toHex(), "0000cd");
+ assertEquals(tinycolor("mediumorchid").toHex(), "ba55d3");
+ assertEquals(tinycolor("mediumpurple").toHex(), "9370db");
+ assertEquals(tinycolor("mediumseagreen").toHex(), "3cb371");
+ assertEquals(tinycolor("mediumslateblue").toHex(), "7b68ee");
+ assertEquals(tinycolor("mediumspringgreen").toHex(), "00fa9a");
+ assertEquals(tinycolor("mediumturquoise").toHex(), "48d1cc");
+ assertEquals(tinycolor("mediumvioletred").toHex(), "c71585");
+ assertEquals(tinycolor("midnightblue").toHex(), "191970");
+ assertEquals(tinycolor("mintcream").toHex(), "f5fffa");
+ assertEquals(tinycolor("mistyrose").toHex(), "ffe4e1");
+ assertEquals(tinycolor("moccasin").toHex(), "ffe4b5");
+ assertEquals(tinycolor("navajowhite").toHex(), "ffdead");
+ assertEquals(tinycolor("navy").toHex(), "000080");
+ assertEquals(tinycolor("oldlace").toHex(), "fdf5e6");
+ assertEquals(tinycolor("olive").toHex(), "808000");
+ assertEquals(tinycolor("olivedrab").toHex(), "6b8e23");
+ assertEquals(tinycolor("orange").toHex(), "ffa500");
+ assertEquals(tinycolor("orangered").toHex(), "ff4500");
+ assertEquals(tinycolor("orchid").toHex(), "da70d6");
+ assertEquals(tinycolor("palegoldenrod").toHex(), "eee8aa");
+ assertEquals(tinycolor("palegreen").toHex(), "98fb98");
+ assertEquals(tinycolor("paleturquoise").toHex(), "afeeee");
+ assertEquals(tinycolor("palevioletred").toHex(), "db7093");
+ assertEquals(tinycolor("papayawhip").toHex(), "ffefd5");
+ assertEquals(tinycolor("peachpuff").toHex(), "ffdab9");
+ assertEquals(tinycolor("peru").toHex(), "cd853f");
+ assertEquals(tinycolor("pink").toHex(), "ffc0cb");
+ assertEquals(tinycolor("plum").toHex(), "dda0dd");
+ assertEquals(tinycolor("powderblue").toHex(), "b0e0e6");
+ assertEquals(tinycolor("purple").toHex(), "800080");
+ assertEquals(tinycolor("rebeccapurple").toHex(), "663399");
+ assertEquals(tinycolor("red").toHex(), "ff0000");
+ assertEquals(tinycolor("rosybrown").toHex(), "bc8f8f");
+ assertEquals(tinycolor("royalblue").toHex(), "4169e1");
+ assertEquals(tinycolor("saddlebrown").toHex(), "8b4513");
+ assertEquals(tinycolor("salmon").toHex(), "fa8072");
+ assertEquals(tinycolor("sandybrown").toHex(), "f4a460");
+ assertEquals(tinycolor("seagreen").toHex(), "2e8b57");
+ assertEquals(tinycolor("seashell").toHex(), "fff5ee");
+ assertEquals(tinycolor("sienna").toHex(), "a0522d");
+ assertEquals(tinycolor("silver").toHex(), "c0c0c0");
+ assertEquals(tinycolor("skyblue").toHex(), "87ceeb");
+ assertEquals(tinycolor("slateblue").toHex(), "6a5acd");
+ assertEquals(tinycolor("slategray").toHex(), "708090");
+ assertEquals(tinycolor("snow").toHex(), "fffafa");
+ assertEquals(tinycolor("springgreen").toHex(), "00ff7f");
+ assertEquals(tinycolor("steelblue").toHex(), "4682b4");
+ assertEquals(tinycolor("tan").toHex(), "d2b48c");
+ assertEquals(tinycolor("teal").toHex(), "008080");
+ assertEquals(tinycolor("thistle").toHex(), "d8bfd8");
+ assertEquals(tinycolor("tomato").toHex(), "ff6347");
+ assertEquals(tinycolor("turquoise").toHex(), "40e0d0");
+ assertEquals(tinycolor("violet").toHex(), "ee82ee");
+ assertEquals(tinycolor("wheat").toHex(), "f5deb3");
+ assertEquals(tinycolor("white").toHex(), "ffffff");
+ assertEquals(tinycolor("whitesmoke").toHex(), "f5f5f5");
+ assertEquals(tinycolor("yellow").toHex(), "ffff00");
+ assertEquals(tinycolor("yellowgreen").toHex(), "9acd32");
+
+ assertEquals(tinycolor("#f00").toName(), "red");
+ assertEquals(tinycolor("#fa0a0a").toName(), false);
+});
+
+Deno.test("Invalid alpha should normalize to 1", function () {
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: -1 }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "Negative value"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: -0 }).toRgbString(),
+ "rgba(255, 20, 10, 0)",
+ "Negative 0"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 0 }).toRgbString(),
+ "rgba(255, 20, 10, 0)",
+ "0"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 0.5 }).toRgbString(),
+ "rgba(255, 20, 10, 0.5)",
+ ".5"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 1 }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "1"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 100 }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "Greater than 1"
+ );
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: "asdfasd" }).toRgbString(),
+ "rgb(255, 20, 10)",
+ "Non Numeric"
+ );
+
+ assertEquals(
+ tinycolor("#fff").toRgbString(),
+ "rgb(255, 255, 255)",
+ "Hex should be 1"
+ );
+ assertEquals(
+ tinycolor("rgba 255 0 0 100").toRgbString(),
+ "rgb(255, 0, 0)",
+ "Greater than 1 in string parsing"
+ );
+});
+
+Deno.test("toString() with alpha set", function () {
+ var redNamed = tinycolor.fromRatio(
+ { r: 255, g: 0, b: 0, a: 0.6 },
+ {
+ format: "name",
+ }
+ );
+ var transparentNamed = tinycolor.fromRatio(
+ { r: 255, g: 0, b: 0, a: 0 },
+ {
+ format: "name",
+ }
+ );
+ var redHex = tinycolor.fromRatio(
+ { r: 255, g: 0, b: 0, a: 0.4 },
+ {
+ format: "hex",
+ }
+ );
+
+ assertEquals(redNamed.getFormat(), "name", "getFormat() is correct");
+ assertEquals(redHex.getFormat(), "hex", "getFormat() is correct");
+
+ assertEquals(
+ redNamed.toString(),
+ "rgba(255, 0, 0, 0.6)",
+ "Names should default to rgba if alpha is < 1"
+ );
+ assertEquals(
+ redHex.toString(),
+ "rgba(255, 0, 0, 0.4)",
+ "Hex should default to rgba if alpha is < 1"
+ );
+
+ assertEquals(
+ redNamed.toString("hex"),
+ "#ff0000",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex6"),
+ "#ff0000",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex3"),
+ "#f00",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex8"),
+ "#ff000099",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("hex4"),
+ "#f009",
+ "Names should not be returned as rgba if format is specified"
+ );
+ assertEquals(
+ redNamed.toString("name"),
+ "#ff0000",
+ "Semi transparent names should return hex in toString() if name format is specified"
+ );
+
+ assertEquals(
+ redNamed.toName(),
+ false,
+ "Semi transparent names should be false in toName()"
+ );
+
+ assertEquals(
+ redHex.toString(),
+ "rgba(255, 0, 0, 0.4)",
+ "Hex should default to rgba if alpha is < 1"
+ );
+ assertEquals(
+ transparentNamed.toString(),
+ "transparent",
+ "Named color should equal transparent if alpha == 0"
+ );
+
+ redHex.setAlpha(0);
+ assertEquals(
+ redHex.toString(),
+ "rgba(255, 0, 0, 0)",
+ "Hex should default to rgba if alpha is = 0"
+ );
+});
+
+Deno.test("setting alpha", function () {
+ var hexSetter = tinycolor("rgba(255, 0, 0, 1)");
+ assertEquals(hexSetter.getAlpha(), 1, "Alpha should start as 1");
+ var returnedFromSetAlpha = hexSetter.setAlpha(0.9);
+ assertEquals(
+ returnedFromSetAlpha,
+ hexSetter,
+ "setAlpha return value should be the color."
+ );
+ assertEquals(hexSetter.getAlpha(), 0.9, "setAlpha should change alpha value");
+ hexSetter.setAlpha(0.5);
+ assertEquals(hexSetter.getAlpha(), 0.5, "setAlpha should change alpha value");
+ hexSetter.setAlpha(0);
+ assertEquals(hexSetter.getAlpha(), 0, "setAlpha should change alpha value");
+ hexSetter.setAlpha(-1);
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with value < 0 should be bound to 1"
+ );
+ hexSetter.setAlpha(2);
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with value > 1 should be bound to 1"
+ );
+ hexSetter.setAlpha();
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with invalid value should be bound to 1"
+ );
+ hexSetter.setAlpha(null);
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with invalid value should be bound to 1"
+ );
+ hexSetter.setAlpha("test");
+ assertEquals(
+ hexSetter.getAlpha(),
+ 1,
+ "setAlpha with invalid value should be bound to 1"
+ );
+});
+
+Deno.test("Alpha = 0 should act differently on toName()", function () {
+ assertEquals(
+ tinycolor({ r: 255, g: 20, b: 10, a: 0 }).toName(),
+ "transparent",
+ "0"
+ );
+ assertEquals(
+ tinycolor("transparent").toString(),
+ "transparent",
+ "toString when passed"
+ );
+ assertEquals(tinycolor("transparent").toHex(), "000000", "toHex");
+});
+
+Deno.test("getBrightness", function () {
+ assertEquals(tinycolor("#000").getBrightness(), 0, "returns 0 for #000");
+ assertEquals(tinycolor("#fff").getBrightness(), 255, "returns 255 for #fff");
+});
+
+Deno.test("getLuminance", function () {
+ assertEquals(tinycolor("#000").getLuminance(), 0, "returns 0 for #000");
+ assertEquals(tinycolor("#fff").getLuminance(), 1, "returns 1 for #fff");
+});
+
+Deno.test("isDark returns true/false for dark/light colors", function () {
+ assertEquals(tinycolor("#000").isDark(), true, "#000 is dark");
+ assertEquals(tinycolor("#111").isDark(), true, "#111 is dark");
+ assertEquals(tinycolor("#222").isDark(), true, "#222 is dark");
+ assertEquals(tinycolor("#333").isDark(), true, "#333 is dark");
+ assertEquals(tinycolor("#444").isDark(), true, "#444 is dark");
+ assertEquals(tinycolor("#555").isDark(), true, "#555 is dark");
+ assertEquals(tinycolor("#666").isDark(), true, "#666 is dark");
+ assertEquals(tinycolor("#777").isDark(), true, "#777 is dark");
+ assertEquals(tinycolor("#888").isDark(), false, "#888 is not dark");
+ assertEquals(tinycolor("#999").isDark(), false, "#999 is not dark");
+ assertEquals(tinycolor("#aaa").isDark(), false, "#aaa is not dark");
+ assertEquals(tinycolor("#bbb").isDark(), false, "#bbb is not dark");
+ assertEquals(tinycolor("#ccc").isDark(), false, "#ccc is not dark");
+ assertEquals(tinycolor("#ddd").isDark(), false, "#ddd is not dark");
+ assertEquals(tinycolor("#eee").isDark(), false, "#eee is not dark");
+ assertEquals(tinycolor("#fff").isDark(), false, "#fff is not dark");
+});
+
+Deno.test("isLight returns true/false for light/dark colors", function () {
+ assertEquals(tinycolor("#000").isLight(), false, "#000 is not light");
+ assertEquals(tinycolor("#111").isLight(), false, "#111 is not light");
+ assertEquals(tinycolor("#222").isLight(), false, "#222 is not light");
+ assertEquals(tinycolor("#333").isLight(), false, "#333 is not light");
+ assertEquals(tinycolor("#444").isLight(), false, "#444 is not light");
+ assertEquals(tinycolor("#555").isLight(), false, "#555 is not light");
+ assertEquals(tinycolor("#666").isLight(), false, "#666 is not light");
+ assertEquals(tinycolor("#777").isLight(), false, "#777 is not light");
+ assertEquals(tinycolor("#888").isLight(), true, "#888 is light");
+ assertEquals(tinycolor("#999").isLight(), true, "#999 is light");
+ assertEquals(tinycolor("#aaa").isLight(), true, "#aaa is light");
+ assertEquals(tinycolor("#bbb").isLight(), true, "#bbb is light");
+ assertEquals(tinycolor("#ccc").isLight(), true, "#ccc is light");
+ assertEquals(tinycolor("#ddd").isLight(), true, "#ddd is light");
+ assertEquals(tinycolor("#eee").isLight(), true, "#eee is light");
+ assertEquals(tinycolor("#fff").isLight(), true, "#fff is light");
+});
+
+Deno.test("HSL Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toHsl()).toHexString(),
+ "HSL Object"
+ );
+ }
+});
+
+Deno.test("HSL String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toHslString()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "toHslString red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "toHslString green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "toHslString blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("HSV String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toHsvString()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "toHsvString red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "toHsvString green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "toHsvString blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("HSV Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toHsv()).toHexString(),
+ "HSV Object"
+ );
+ }
+});
+
+Deno.test("RGB Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toRgb()).toHexString(),
+ "RGB Object"
+ );
+ }
+});
+
+Deno.test("RGB String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(
+ tiny.toHexString(),
+ tinycolor(tiny.toRgbString()).toHexString(),
+ "RGB String"
+ );
+ }
+});
+
+Deno.test("PRGB Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toPercentageRgb()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "Red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "Green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "Blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("PRGB String", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ var input = tiny.toRgb();
+ var output = tinycolor(tiny.toPercentageRgbString()).toRgb();
+ var maxDiff = 2;
+
+ assertEquals(
+ Math.abs(input.r - output.r) <= maxDiff,
+ true,
+ "Red value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.g - output.g) <= maxDiff,
+ true,
+ "Green value difference <= " + maxDiff
+ );
+ assertEquals(
+ Math.abs(input.b - output.b) <= maxDiff,
+ true,
+ "Blue value difference <= " + maxDiff
+ );
+ }
+});
+
+Deno.test("Object", function () {
+ for (var i = 0; i < conversions.length; i++) {
+ var c = conversions[i];
+ var tiny = tinycolor(c.hex);
+ assertEquals(tiny.toHexString(), tinycolor(tiny).toHexString(), "Object");
+ }
+});
+
+Deno.test("Color equality", function () {
+ assert(tinycolor.equals("#ff0000", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("#ff0000", "rgb(255, 0, 0)"), "Same alphas");
+ assert(
+ !tinycolor.equals("#ff0000", "rgba(255, 0, 0, .1)"),
+ "Different alphas"
+ );
+ assert(tinycolor.equals("#ff000066", "rgba(255, 0, 0, .4)"), "Same alphas");
+ assert(tinycolor.equals("#f009", "rgba(255, 0, 0, .6)"), "Same alphas");
+ assert(tinycolor.equals("#336699CC", "369C"), "Same hex");
+ assert(tinycolor.equals("ff0000", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("#f00", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("#f00", "#ff0000"), "Same hex");
+ assert(tinycolor.equals("f00", "#ff0000"), "Same hex");
+ assertEquals(tinycolor("010101").toHexString(), "#010101");
+ assert(!tinycolor.equals("#ff0000", "#00ff00"), "Different hex");
+ assert(
+ tinycolor.equals("#ff8000", "rgb(100%, 50%, 0%)"),
+ "Percentage bounds checking"
+ );
+});
+
+Deno.test("isReadable", function () {
+ // "#ff0088", "#8822aa" (values used in old WCAG1 tests)
+ assert(
+ tinycolor.isReadable("#000000", "#ffffff", { level: "AA", size: "small" }),
+ "white/black is readable"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", {}),
+ "not readable - empty wcag2 object"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", { level: "AA", size: "small" }),
+ "not readable - AA small"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", { level: "AA", size: "large" }),
+ "not readable - AA large"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", {
+ level: "AAA",
+ size: "small",
+ }),
+ "not readable - AAA small"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#8822aa", {
+ level: "AAA",
+ size: "large",
+ }),
+ "not readable - AAA large"
+ );
+
+ // values derived from and validated using the calculators at http://www.dasplankton.de/ContrastA/
+ // and http://webaim.org/resources/contrastchecker/
+
+ // "#ff0088", "#5c1a72": contrast ratio 3.04
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", { level: "AA", size: "small" }),
+ "not readable - AA small"
+ );
+ assert(
+ tinycolor.isReadable("#ff0088", "#5c1a72", { level: "AA", size: "large" }),
+ "readable - AA large"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", {
+ level: "AAA",
+ size: "small",
+ }),
+ "not readable - AAA small"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#5c1a72", {
+ level: "AAA",
+ size: "large",
+ }),
+ "not readable - AAA large"
+ );
+
+ // "#ff0088", "#2e0c3a": contrast ratio 4.56
+ assert(
+ tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AA", size: "small" }),
+ "readable - AA small"
+ );
+ assert(
+ tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AA", size: "large" }),
+ "readable - AA large"
+ );
+ assert(
+ !tinycolor.isReadable("#ff0088", "#2e0c3a", {
+ level: "AAA",
+ size: "small",
+ }),
+ "not readable - AAA small"
+ );
+ assert(
+ tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AAA", size: "large" }),
+ "readable - AAA large"
+ );
+
+ // "#db91b8", "#2e0c3a": contrast ratio 7.12
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AA", size: "small" }),
+ "readable - AA small"
+ );
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AA", size: "large" }),
+ "readable - AA large"
+ );
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AAA", size: "small" }),
+ "readable - AAA small"
+ );
+ assert(
+ tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AAA", size: "large" }),
+ "readable - AAA large"
+ );
+});
+
+Deno.test("readability", function () {
+ // check return values from readability function. See isReadable above for standards tests.
+ assertEquals(
+ tinycolor.readability("#000", "#000"),
+ 1,
+ "Readability function test 0"
+ );
+ assertEquals(
+ tinycolor.readability("#000", "#111"),
+ 1.1121078324840545,
+ "Readability function test 1"
+ );
+ assertEquals(
+ tinycolor.readability("#000", "#fff"),
+ 21,
+ "Readability function test 2"
+ );
+});
+
+Deno.test("mostReadable", function () {
+ assertEquals(
+ tinycolor
+ .mostReadable("#000", ["#111", "#222", { wcag2: {} }])
+ .toHexString(),
+ "#222222",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#f00", ["#d00", "#0d0"], { wcag2: {} })
+ .toHexString(),
+ "#00dd00",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#fff", ["#fff", "#fff"], { wcag2: {} })
+ .toHexString(),
+ "#ffffff",
+ "no different color in list"
+ );
+ //includeFallbackColors
+ assertEquals(
+ tinycolor
+ .mostReadable("#fff", ["#fff", "#fff"], {
+ includeFallbackColors: true,
+ })
+ .toHexString(),
+ "#000000",
+ "no different color in list"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#123", ["#124", "#125"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#112255",
+ "no readable color in list"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#123", ["#000", "#fff"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#ffffff",
+ "verify assumption"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#123", ["#124", "#125"], {
+ includeFallbackColors: true,
+ })
+ .toHexString(),
+ "#ffffff",
+ "no readable color in list"
+ );
+
+ assertEquals(
+ tinycolor
+ .mostReadable("#ff0088", ["#000", "#fff"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#000000",
+ "verify assumption"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#ff0088", ["#2e0c3a"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "large",
+ })
+ .toHexString(),
+ "#2e0c3a",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#ff0088", ["#2e0c3a"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "small",
+ })
+ .toHexString(),
+ "#000000",
+ "no readable color in list"
+ );
+
+ assertEquals(
+ tinycolor
+ .mostReadable("#371b2c", ["#000", "#fff"], {
+ includeFallbackColors: false,
+ })
+ .toHexString(),
+ "#ffffff",
+ "verify assumption"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#371b2c", ["#a9acb6"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "large",
+ })
+ .toHexString(),
+ "#a9acb6",
+ "readable color present"
+ );
+ assertEquals(
+ tinycolor
+ .mostReadable("#371b2c", ["#a9acb6"], {
+ includeFallbackColors: true,
+ level: "AAA",
+ size: "small",
+ })
+ .toHexString(),
+ "#ffffff",
+ "no readable color in list"
+ );
+});
+
+Deno.test("Filters", function () {
+ assertEquals(
+ tinycolor("red").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)"
+ );
+ assertEquals(
+ tinycolor("red").toFilter("blue"),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ff0000ff)"
+ );
+
+ assertEquals(
+ tinycolor("transparent").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr=#00000000)"
+ );
+ assertEquals(
+ tinycolor("transparent").toFilter("red"),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr=#ffff0000)"
+ );
+
+ assertEquals(
+ tinycolor("#f0f0f0dd").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ddf0f0f0,endColorstr=#ddf0f0f0)"
+ );
+ assertEquals(
+ tinycolor("rgba(0, 0, 255, .5").toFilter(),
+ "progid:DXImageTransform.Microsoft.gradient(startColorstr=#800000ff,endColorstr=#800000ff)"
+ );
+});
+
+/* Originally generated with:
+var results = [];
+for (var i = 0; i <= 100; i++) results.push( tinycolor.saturate("red", i).toHex() )
+console.log(JSON.stringify(results))
+*/
+var DESATURATIONS = [
+ "ff0000",
+ "fe0101",
+ "fc0303",
+ "fb0404",
+ "fa0505",
+ "f90606",
+ "f70808",
+ "f60909",
+ "f50a0a",
+ "f40b0b",
+ "f20d0d",
+ "f10e0e",
+ "f00f0f",
+ "ee1111",
+ "ed1212",
+ "ec1313",
+ "eb1414",
+ "e91616",
+ "e81717",
+ "e71818",
+ "e61919",
+ "e41b1b",
+ "e31c1c",
+ "e21d1d",
+ "e01f1f",
+ "df2020",
+ "de2121",
+ "dd2222",
+ "db2424",
+ "da2525",
+ "d92626",
+ "d72828",
+ "d62929",
+ "d52a2a",
+ "d42b2b",
+ "d22d2d",
+ "d12e2e",
+ "d02f2f",
+ "cf3030",
+ "cd3232",
+ "cc3333",
+ "cb3434",
+ "c93636",
+ "c83737",
+ "c73838",
+ "c63939",
+ "c43b3b",
+ "c33c3c",
+ "c23d3d",
+ "c13e3e",
+ "bf4040",
+ "be4141",
+ "bd4242",
+ "bb4444",
+ "ba4545",
+ "b94646",
+ "b84747",
+ "b64949",
+ "b54a4a",
+ "b44b4b",
+ "b34d4d",
+ "b14e4e",
+ "b04f4f",
+ "af5050",
+ "ad5252",
+ "ac5353",
+ "ab5454",
+ "aa5555",
+ "a85757",
+ "a75858",
+ "a65959",
+ "a45b5b",
+ "a35c5c",
+ "a25d5d",
+ "a15e5e",
+ "9f6060",
+ "9e6161",
+ "9d6262",
+ "9c6363",
+ "9a6565",
+ "996666",
+ "986767",
+ "966969",
+ "956a6a",
+ "946b6b",
+ "936c6c",
+ "916e6e",
+ "906f6f",
+ "8f7070",
+ "8e7171",
+ "8c7373",
+ "8b7474",
+ "8a7575",
+ "887777",
+ "877878",
+ "867979",
+ "857a7a",
+ "837c7c",
+ "827d7d",
+ "817e7e",
+ "808080",
+];
+var SATURATIONS = [
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+ "ff0000",
+];
+var LIGHTENS = [
+ "ff0000",
+ "ff0505",
+ "ff0a0a",
+ "ff0f0f",
+ "ff1414",
+ "ff1a1a",
+ "ff1f1f",
+ "ff2424",
+ "ff2929",
+ "ff2e2e",
+ "ff3333",
+ "ff3838",
+ "ff3d3d",
+ "ff4242",
+ "ff4747",
+ "ff4d4d",
+ "ff5252",
+ "ff5757",
+ "ff5c5c",
+ "ff6161",
+ "ff6666",
+ "ff6b6b",
+ "ff7070",
+ "ff7575",
+ "ff7a7a",
+ "ff8080",
+ "ff8585",
+ "ff8a8a",
+ "ff8f8f",
+ "ff9494",
+ "ff9999",
+ "ff9e9e",
+ "ffa3a3",
+ "ffa8a8",
+ "ffadad",
+ "ffb3b3",
+ "ffb8b8",
+ "ffbdbd",
+ "ffc2c2",
+ "ffc7c7",
+ "ffcccc",
+ "ffd1d1",
+ "ffd6d6",
+ "ffdbdb",
+ "ffe0e0",
+ "ffe5e5",
+ "ffebeb",
+ "fff0f0",
+ "fff5f5",
+ "fffafa",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+ "ffffff",
+];
+var BRIGHTENS = [
+ "ff0000",
+ "ff0303",
+ "ff0505",
+ "ff0808",
+ "ff0a0a",
+ "ff0d0d",
+ "ff0f0f",
+ "ff1212",
+ "ff1414",
+ "ff1717",
+ "ff1919",
+ "ff1c1c",
+ "ff1f1f",
+ "ff2121",
+ "ff2424",
+ "ff2626",
+ "ff2929",
+ "ff2b2b",
+ "ff2e2e",
+ "ff3030",
+ "ff3333",
+ "ff3636",
+ "ff3838",
+ "ff3b3b",
+ "ff3d3d",
+ "ff4040",
+ "ff4242",
+ "ff4545",
+ "ff4747",
+ "ff4a4a",
+ "ff4c4c",
+ "ff4f4f",
+ "ff5252",
+ "ff5454",
+ "ff5757",
+ "ff5959",
+ "ff5c5c",
+ "ff5e5e",
+ "ff6161",
+ "ff6363",
+ "ff6666",
+ "ff6969",
+ "ff6b6b",
+ "ff6e6e",
+ "ff7070",
+ "ff7373",
+ "ff7575",
+ "ff7878",
+ "ff7a7a",
+ "ff7d7d",
+ "ff7f7f",
+ "ff8282",
+ "ff8585",
+ "ff8787",
+ "ff8a8a",
+ "ff8c8c",
+ "ff8f8f",
+ "ff9191",
+ "ff9494",
+ "ff9696",
+ "ff9999",
+ "ff9c9c",
+ "ff9e9e",
+ "ffa1a1",
+ "ffa3a3",
+ "ffa6a6",
+ "ffa8a8",
+ "ffabab",
+ "ffadad",
+ "ffb0b0",
+ "ffb2b2",
+ "ffb5b5",
+ "ffb8b8",
+ "ffbaba",
+ "ffbdbd",
+ "ffbfbf",
+ "ffc2c2",
+ "ffc4c4",
+ "ffc7c7",
+ "ffc9c9",
+ "ffcccc",
+ "ffcfcf",
+ "ffd1d1",
+ "ffd4d4",
+ "ffd6d6",
+ "ffd9d9",
+ "ffdbdb",
+ "ffdede",
+ "ffe0e0",
+ "ffe3e3",
+ "ffe5e5",
+ "ffe8e8",
+ "ffebeb",
+ "ffeded",
+ "fff0f0",
+ "fff2f2",
+ "fff5f5",
+ "fff7f7",
+ "fffafa",
+ "fffcfc",
+ "ffffff",
+];
+var DARKENS = [
+ "ff0000",
+ "fa0000",
+ "f50000",
+ "f00000",
+ "eb0000",
+ "e60000",
+ "e00000",
+ "db0000",
+ "d60000",
+ "d10000",
+ "cc0000",
+ "c70000",
+ "c20000",
+ "bd0000",
+ "b80000",
+ "b30000",
+ "ad0000",
+ "a80000",
+ "a30000",
+ "9e0000",
+ "990000",
+ "940000",
+ "8f0000",
+ "8a0000",
+ "850000",
+ "800000",
+ "7a0000",
+ "750000",
+ "700000",
+ "6b0000",
+ "660000",
+ "610000",
+ "5c0000",
+ "570000",
+ "520000",
+ "4d0000",
+ "470000",
+ "420000",
+ "3d0000",
+ "380000",
+ "330000",
+ "2e0000",
+ "290000",
+ "240000",
+ "1f0000",
+ "190000",
+ "140000",
+ "0f0000",
+ "0a0000",
+ "050000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+ "000000",
+];
+
+Deno.test("Modifications", function () {
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").desaturate(i).toHex(),
+ DESATURATIONS[i],
+ "Desaturation " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").saturate(i).toHex(),
+ SATURATIONS[i],
+ "Saturation " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").lighten(i).toHex(),
+ LIGHTENS[i],
+ "Lighten " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").brighten(i).toHex(),
+ BRIGHTENS[i],
+ "Brighter " + i + " works"
+ );
+ }
+ for (var i = 0; i <= 100; i++) {
+ assertEquals(
+ tinycolor("red").darken(i).toHex(),
+ DARKENS[i],
+ "Darken " + i + " works"
+ );
+ }
+
+ assertEquals(
+ tinycolor("red").greyscale().toHex(),
+ "808080",
+ "Greyscale works"
+ );
+});
+
+Deno.test("Spin", function () {
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(-1234).toHsl().h),
+ 206,
+ "Spinning -1234 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(-360).toHsl().h),
+ 0,
+ "Spinning -360 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(-120).toHsl().h),
+ 240,
+ "Spinning -120 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(0).toHsl().h),
+ 0,
+ "Spinning 0 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(10).toHsl().h),
+ 10,
+ "Spinning 10 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(360).toHsl().h),
+ 0,
+ "Spinning 360 works"
+ );
+ assertEquals(
+ Math.round(tinycolor("#f00").spin(2345).toHsl().h),
+ 185,
+ "Spinning 2345 works"
+ );
+
+ [-360, 0, 360].forEach(function (delta) {
+ Object.keys(tinycolor.names).forEach(function (name) {
+ assertEquals(
+ tinycolor(name).toHex(),
+ tinycolor(name).spin(delta).toHex(),
+ "Spinning " + delta.toString() + " has no effect"
+ );
+ });
+ });
+});
+
+Deno.test("Mix", function () {
+ // amount 0 or none
+ assertEquals(
+ tinycolor.mix("#000", "#fff").toHsl().l,
+ 0.5,
+ "Mixing without amount works"
+ );
+ assertEquals(
+ tinycolor.mix("#f00", "#000", 0).toHex(),
+ "ff0000",
+ "Mixing with 0 amount works"
+ );
+ // This case checks the the problem with floating point numbers (eg 255/90)
+ assertEquals(
+ tinycolor.mix("#fff", "#000", 90).toHex(),
+ "1a1a1a",
+ "Mixing with 90 amount works correctly"
+ );
+
+ // black and white
+ for (var i = 0; i < 100; i++) {
+ assertEquals(
+ Math.round(tinycolor.mix("#000", "#fff", i).toHsl().l * 100) / 100,
+ i / 100,
+ "Mixing black and white with " + i + " amount works"
+ );
+ }
+
+ // with colors
+ for (var i = 0; i < 100; i++) {
+ var new_hex = Math.round((255 * (100 - i)) / 100).toString(16);
+
+ if (new_hex.length === 1) {
+ new_hex = "0" + new_hex;
+ }
+
+ assertEquals(
+ tinycolor.mix("#f00", "#000", i).toHex(),
+ new_hex + "0000",
+ "Mixing " + i + " (red channel)"
+ );
+ assertEquals(
+ tinycolor.mix("#0f0", "#000", i).toHex(),
+ "00" + new_hex + "00",
+ "Mixing " + i + " (green channel)"
+ );
+ assertEquals(
+ tinycolor.mix("#00f", "#000", i).toHex(),
+ "0000" + new_hex,
+ "Mixing " + i + " (blue channel)"
+ );
+ assertEquals(
+ tinycolor.mix(tinycolor("transparent"), "#000", i).toRgb().a,
+ i / 100,
+ "Mixing " + i + " (alpha channel)"
+ );
+ }
+});
+
+// The combination tests need to be expanded furthe
+
+function colorsToHexString(colors) {
+ return colors
+ .map(function (c) {
+ return c.toHex();
+ })
+ .join(",");
+}
+
+Deno.test("complement", function () {
+ var complementDoesntModifyInstance = tinycolor("red");
+ assertEquals(
+ complementDoesntModifyInstance.complement().toHex(),
+ "00ffff",
+ "Complement works"
+ );
+ assertEquals(
+ complementDoesntModifyInstance.toHex(),
+ "ff0000",
+ "Complement did not modify this color"
+ );
+});
+
+Deno.test("analogous", function () {
+ var combination = tinycolor("red").analogous();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,ff0066,ff0033,ff0000,ff3300,ff6600",
+ "Correct Combination"
+ );
+});
+
+Deno.test("monochromatic", function () {
+ var combination = tinycolor("red").monochromatic();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,2a0000,550000,800000,aa0000,d40000",
+ "Correct Combination"
+ );
+});
+
+Deno.test("splitcomplement", function () {
+ var combination = tinycolor("red").splitcomplement();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,ccff00,0066ff",
+ "Correct Combination"
+ );
+});
+
+Deno.test("triad", function () {
+ var combination = tinycolor("red").triad();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,00ff00,0000ff",
+ "Correct Combination"
+ );
+});
+
+Deno.test("tetrad", function () {
+ var combination = tinycolor("red").tetrad();
+ assertEquals(
+ colorsToHexString(combination),
+ "ff0000,80ff00,00ffff,7f00ff",
+ "Correct Combination"
+ );
+});
+
+Deno.test({
+ name: "polyad",
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
+ ignore: true,
+ fn: function () {
+ assertThrows(() => {
+ tinycolor("red").polyad();
+ });
+ assertThrows(() => {
+ tinycolor("red").polyad(-1);
+ });
+ assertThrows(() => {
+ tinycolor("red").polyad("invalid");
+ });
+ assertEquals(colorsToHexString(tinycolor("red").polyad(1)), "ff0000");
+ assertEquals(colorsToHexString(tinycolor("red").polyad("1")), "ff0000");
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(2)),
+ "ff0000,00ffff"
+ );
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(3)),
+ "ff0000,00ff00,0000ff"
+ );
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(4)),
+ "ff0000,80ff00,00ffff,7f00ff"
+ );
+ assertEquals(
+ colorsToHexString(tinycolor("red").polyad(5)),
+ "ff0000,ccff00,00ff66,0066ff,cc00ff"
+ );
+ },
+});
diff --git a/vendor/assets/javascripts/tinycolor/tinycolor.js b/vendor/assets/javascripts/tinycolor/tinycolor.js
new file mode 100644
index 000000000..e52a3d55f
--- /dev/null
+++ b/vendor/assets/javascripts/tinycolor/tinycolor.js
@@ -0,0 +1,1187 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.tinycolor = factory());
+})(this, (function () { 'use strict';
+
+ function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
+ return typeof obj;
+ } : function (obj) {
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ }, _typeof(obj);
+ }
+
+ // https://github.com/bgrins/TinyColor
+ // Brian Grinstead, MIT License
+
+ var trimLeft = /^\s+/;
+ var trimRight = /\s+$/;
+ function tinycolor(color, opts) {
+ color = color ? color : "";
+ opts = opts || {};
+
+ // If input is already a tinycolor, return itself
+ if (color instanceof tinycolor) {
+ return color;
+ }
+ // If we are called as a function, call using new instead
+ if (!(this instanceof tinycolor)) {
+ return new tinycolor(color, opts);
+ }
+ var rgb = inputToRGB(color);
+ this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;
+ this._gradientType = opts.gradientType;
+
+ // Don't let the range of [0,255] come back in [0,1].
+ // Potentially lose a little bit of precision here, but will fix issues where
+ // .5 gets interpreted as half of the total, instead of half of 1
+ // If it was supposed to be 128, this was already taken care of by `inputToRgb`
+ if (this._r < 1) this._r = Math.round(this._r);
+ if (this._g < 1) this._g = Math.round(this._g);
+ if (this._b < 1) this._b = Math.round(this._b);
+ this._ok = rgb.ok;
+ }
+ tinycolor.prototype = {
+ isDark: function isDark() {
+ return this.getBrightness() < 128;
+ },
+ isLight: function isLight() {
+ return !this.isDark();
+ },
+ isValid: function isValid() {
+ return this._ok;
+ },
+ getOriginalInput: function getOriginalInput() {
+ return this._originalInput;
+ },
+ getFormat: function getFormat() {
+ return this._format;
+ },
+ getAlpha: function getAlpha() {
+ return this._a;
+ },
+ getBrightness: function getBrightness() {
+ //http://www.w3.org/TR/AERT#color-contrast
+ var rgb = this.toRgb();
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
+ },
+ getLuminance: function getLuminance() {
+ //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
+ var rgb = this.toRgb();
+ var RsRGB, GsRGB, BsRGB, R, G, B;
+ RsRGB = rgb.r / 255;
+ GsRGB = rgb.g / 255;
+ BsRGB = rgb.b / 255;
+ if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
+ if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
+ if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
+ return 0.2126 * R + 0.7152 * G + 0.0722 * B;
+ },
+ setAlpha: function setAlpha(value) {
+ this._a = boundAlpha(value);
+ this._roundA = Math.round(100 * this._a) / 100;
+ return this;
+ },
+ toHsv: function toHsv() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ return {
+ h: hsv.h * 360,
+ s: hsv.s,
+ v: hsv.v,
+ a: this._a
+ };
+ },
+ toHsvString: function toHsvString() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ var h = Math.round(hsv.h * 360),
+ s = Math.round(hsv.s * 100),
+ v = Math.round(hsv.v * 100);
+ return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
+ },
+ toHsl: function toHsl() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ return {
+ h: hsl.h * 360,
+ s: hsl.s,
+ l: hsl.l,
+ a: this._a
+ };
+ },
+ toHslString: function toHslString() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ var h = Math.round(hsl.h * 360),
+ s = Math.round(hsl.s * 100),
+ l = Math.round(hsl.l * 100);
+ return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
+ },
+ toHex: function toHex(allow3Char) {
+ return rgbToHex(this._r, this._g, this._b, allow3Char);
+ },
+ toHexString: function toHexString(allow3Char) {
+ return "#" + this.toHex(allow3Char);
+ },
+ toHex8: function toHex8(allow4Char) {
+ return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
+ },
+ toHex8String: function toHex8String(allow4Char) {
+ return "#" + this.toHex8(allow4Char);
+ },
+ toRgb: function toRgb() {
+ return {
+ r: Math.round(this._r),
+ g: Math.round(this._g),
+ b: Math.round(this._b),
+ a: this._a
+ };
+ },
+ toRgbString: function toRgbString() {
+ return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
+ },
+ toPercentageRgb: function toPercentageRgb() {
+ return {
+ r: Math.round(bound01(this._r, 255) * 100) + "%",
+ g: Math.round(bound01(this._g, 255) * 100) + "%",
+ b: Math.round(bound01(this._b, 255) * 100) + "%",
+ a: this._a
+ };
+ },
+ toPercentageRgbString: function toPercentageRgbString() {
+ return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
+ },
+ toName: function toName() {
+ if (this._a === 0) {
+ return "transparent";
+ }
+ if (this._a < 1) {
+ return false;
+ }
+ return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
+ },
+ toFilter: function toFilter(secondColor) {
+ var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
+ var secondHex8String = hex8String;
+ var gradientType = this._gradientType ? "GradientType = 1, " : "";
+ if (secondColor) {
+ var s = tinycolor(secondColor);
+ secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
+ }
+ return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
+ },
+ toString: function toString(format) {
+ var formatSet = !!format;
+ format = format || this._format;
+ var formattedString = false;
+ var hasAlpha = this._a < 1 && this._a >= 0;
+ var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
+ if (needsAlphaFormat) {
+ // Special case for "transparent", all other non-alpha formats
+ // will return rgba when there is transparency.
+ if (format === "name" && this._a === 0) {
+ return this.toName();
+ }
+ return this.toRgbString();
+ }
+ if (format === "rgb") {
+ formattedString = this.toRgbString();
+ }
+ if (format === "prgb") {
+ formattedString = this.toPercentageRgbString();
+ }
+ if (format === "hex" || format === "hex6") {
+ formattedString = this.toHexString();
+ }
+ if (format === "hex3") {
+ formattedString = this.toHexString(true);
+ }
+ if (format === "hex4") {
+ formattedString = this.toHex8String(true);
+ }
+ if (format === "hex8") {
+ formattedString = this.toHex8String();
+ }
+ if (format === "name") {
+ formattedString = this.toName();
+ }
+ if (format === "hsl") {
+ formattedString = this.toHslString();
+ }
+ if (format === "hsv") {
+ formattedString = this.toHsvString();
+ }
+ return formattedString || this.toHexString();
+ },
+ clone: function clone() {
+ return tinycolor(this.toString());
+ },
+ _applyModification: function _applyModification(fn, args) {
+ var color = fn.apply(null, [this].concat([].slice.call(args)));
+ this._r = color._r;
+ this._g = color._g;
+ this._b = color._b;
+ this.setAlpha(color._a);
+ return this;
+ },
+ lighten: function lighten() {
+ return this._applyModification(_lighten, arguments);
+ },
+ brighten: function brighten() {
+ return this._applyModification(_brighten, arguments);
+ },
+ darken: function darken() {
+ return this._applyModification(_darken, arguments);
+ },
+ desaturate: function desaturate() {
+ return this._applyModification(_desaturate, arguments);
+ },
+ saturate: function saturate() {
+ return this._applyModification(_saturate, arguments);
+ },
+ greyscale: function greyscale() {
+ return this._applyModification(_greyscale, arguments);
+ },
+ spin: function spin() {
+ return this._applyModification(_spin, arguments);
+ },
+ _applyCombination: function _applyCombination(fn, args) {
+ return fn.apply(null, [this].concat([].slice.call(args)));
+ },
+ analogous: function analogous() {
+ return this._applyCombination(_analogous, arguments);
+ },
+ complement: function complement() {
+ return this._applyCombination(_complement, arguments);
+ },
+ monochromatic: function monochromatic() {
+ return this._applyCombination(_monochromatic, arguments);
+ },
+ splitcomplement: function splitcomplement() {
+ return this._applyCombination(_splitcomplement, arguments);
+ },
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
+ // polyad: function (number) {
+ // return this._applyCombination(polyad, [number]);
+ // },
+ triad: function triad() {
+ return this._applyCombination(polyad, [3]);
+ },
+ tetrad: function tetrad() {
+ return this._applyCombination(polyad, [4]);
+ }
+ };
+
+ // If input is an object, force 1 into "1.0" to handle ratios properly
+ // String input requires "1.0" as input, so 1 will be treated as 1
+ tinycolor.fromRatio = function (color, opts) {
+ if (_typeof(color) == "object") {
+ var newColor = {};
+ for (var i in color) {
+ if (color.hasOwnProperty(i)) {
+ if (i === "a") {
+ newColor[i] = color[i];
+ } else {
+ newColor[i] = convertToPercentage(color[i]);
+ }
+ }
+ }
+ color = newColor;
+ }
+ return tinycolor(color, opts);
+ };
+
+ // Given a string or object, convert that input to RGB
+ // Possible string inputs:
+ //
+ // "red"
+ // "#f00" or "f00"
+ // "#ff0000" or "ff0000"
+ // "#ff000000" or "ff000000"
+ // "rgb 255 0 0" or "rgb (255, 0, 0)"
+ // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
+ // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
+ // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
+ // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
+ // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
+ // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
+ //
+ function inputToRGB(color) {
+ var rgb = {
+ r: 0,
+ g: 0,
+ b: 0
+ };
+ var a = 1;
+ var s = null;
+ var v = null;
+ var l = null;
+ var ok = false;
+ var format = false;
+ if (typeof color == "string") {
+ color = stringInputToObject(color);
+ }
+ if (_typeof(color) == "object") {
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
+ rgb = rgbToRgb(color.r, color.g, color.b);
+ ok = true;
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
+ s = convertToPercentage(color.s);
+ v = convertToPercentage(color.v);
+ rgb = hsvToRgb(color.h, s, v);
+ ok = true;
+ format = "hsv";
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
+ s = convertToPercentage(color.s);
+ l = convertToPercentage(color.l);
+ rgb = hslToRgb(color.h, s, l);
+ ok = true;
+ format = "hsl";
+ }
+ if (color.hasOwnProperty("a")) {
+ a = color.a;
+ }
+ }
+ a = boundAlpha(a);
+ return {
+ ok: ok,
+ format: color.format || format,
+ r: Math.min(255, Math.max(rgb.r, 0)),
+ g: Math.min(255, Math.max(rgb.g, 0)),
+ b: Math.min(255, Math.max(rgb.b, 0)),
+ a: a
+ };
+ }
+
+ // Conversion Functions
+ // --------------------
+
+ // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
+ //
+
+ // `rgbToRgb`
+ // Handle bounds / percentage checking to conform to CSS color spec
+ //
+ // *Assumes:* r, g, b in [0, 255] or [0, 1]
+ // *Returns:* { r, g, b } in [0, 255]
+ function rgbToRgb(r, g, b) {
+ return {
+ r: bound01(r, 255) * 255,
+ g: bound01(g, 255) * 255,
+ b: bound01(b, 255) * 255
+ };
+ }
+
+ // `rgbToHsl`
+ // Converts an RGB color value to HSL.
+ // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
+ // *Returns:* { h, s, l } in [0,1]
+ function rgbToHsl(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ l = (max + min) / 2;
+ if (max == min) {
+ h = s = 0; // achromatic
+ } else {
+ var d = max - min;
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+ h /= 6;
+ }
+ return {
+ h: h,
+ s: s,
+ l: l
+ };
+ }
+
+ // `hslToRgb`
+ // Converts an HSL color value to RGB.
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
+ // *Returns:* { r, g, b } in the set [0, 255]
+ function hslToRgb(h, s, l) {
+ var r, g, b;
+ h = bound01(h, 360);
+ s = bound01(s, 100);
+ l = bound01(l, 100);
+ function hue2rgb(p, q, t) {
+ if (t < 0) t += 1;
+ if (t > 1) t -= 1;
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
+ if (t < 1 / 2) return q;
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+ return p;
+ }
+ if (s === 0) {
+ r = g = b = l; // achromatic
+ } else {
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+ var p = 2 * l - q;
+ r = hue2rgb(p, q, h + 1 / 3);
+ g = hue2rgb(p, q, h);
+ b = hue2rgb(p, q, h - 1 / 3);
+ }
+ return {
+ r: r * 255,
+ g: g * 255,
+ b: b * 255
+ };
+ }
+
+ // `rgbToHsv`
+ // Converts an RGB color value to HSV
+ // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
+ // *Returns:* { h, s, v } in [0,1]
+ function rgbToHsv(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ v = max;
+ var d = max - min;
+ s = max === 0 ? 0 : d / max;
+ if (max == min) {
+ h = 0; // achromatic
+ } else {
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+ h /= 6;
+ }
+ return {
+ h: h,
+ s: s,
+ v: v
+ };
+ }
+
+ // `hsvToRgb`
+ // Converts an HSV color value to RGB.
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
+ // *Returns:* { r, g, b } in the set [0, 255]
+ function hsvToRgb(h, s, v) {
+ h = bound01(h, 360) * 6;
+ s = bound01(s, 100);
+ v = bound01(v, 100);
+ var i = Math.floor(h),
+ f = h - i,
+ p = v * (1 - s),
+ q = v * (1 - f * s),
+ t = v * (1 - (1 - f) * s),
+ mod = i % 6,
+ r = [v, q, p, p, t, v][mod],
+ g = [t, v, v, q, p, p][mod],
+ b = [p, p, t, v, v, q][mod];
+ return {
+ r: r * 255,
+ g: g * 255,
+ b: b * 255
+ };
+ }
+
+ // `rgbToHex`
+ // Converts an RGB color to hex
+ // Assumes r, g, and b are contained in the set [0, 255]
+ // Returns a 3 or 6 character hex
+ function rgbToHex(r, g, b, allow3Char) {
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
+
+ // Return a 3 character hex if possible
+ if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
+ }
+ return hex.join("");
+ }
+
+ // `rgbaToHex`
+ // Converts an RGBA color plus alpha transparency to hex
+ // Assumes r, g, b are contained in the set [0, 255] and
+ // a in [0, 1]. Returns a 4 or 8 character rgba hex
+ function rgbaToHex(r, g, b, a, allow4Char) {
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
+
+ // Return a 4 character hex if possible
+ if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
+ }
+ return hex.join("");
+ }
+
+ // `rgbaToArgbHex`
+ // Converts an RGBA color to an ARGB Hex8 string
+ // Rarely used, but required for "toFilter()"
+ function rgbaToArgbHex(r, g, b, a) {
+ var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
+ return hex.join("");
+ }
+
+ // `equals`
+ // Can be called with any tinycolor input
+ tinycolor.equals = function (color1, color2) {
+ if (!color1 || !color2) return false;
+ return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
+ };
+ tinycolor.random = function () {
+ return tinycolor.fromRatio({
+ r: Math.random(),
+ g: Math.random(),
+ b: Math.random()
+ });
+ };
+
+ // Modification Functions
+ // ----------------------
+ // Thanks to less.js for some of the basics here
+ //
+
+ function _desaturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s -= amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+ }
+ function _saturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s += amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+ }
+ function _greyscale(color) {
+ return tinycolor(color).desaturate(100);
+ }
+ function _lighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l += amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+ }
+ function _brighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var rgb = tinycolor(color).toRgb();
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
+ return tinycolor(rgb);
+ }
+ function _darken(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l -= amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+ }
+
+ // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
+ // Values outside of this range will be wrapped into this range.
+ function _spin(color, amount) {
+ var hsl = tinycolor(color).toHsl();
+ var hue = (hsl.h + amount) % 360;
+ hsl.h = hue < 0 ? 360 + hue : hue;
+ return tinycolor(hsl);
+ }
+
+ // Combination Functions
+ // ---------------------
+ // Thanks to jQuery xColor for some of the ideas behind these
+ //
+
+ function _complement(color) {
+ var hsl = tinycolor(color).toHsl();
+ hsl.h = (hsl.h + 180) % 360;
+ return tinycolor(hsl);
+ }
+ function polyad(color, number) {
+ if (isNaN(number) || number <= 0) {
+ throw new Error("Argument to polyad must be a positive number");
+ }
+ var hsl = tinycolor(color).toHsl();
+ var result = [tinycolor(color)];
+ var step = 360 / number;
+ for (var i = 1; i < number; i++) {
+ result.push(tinycolor({
+ h: (hsl.h + i * step) % 360,
+ s: hsl.s,
+ l: hsl.l
+ }));
+ }
+ return result;
+ }
+ function _splitcomplement(color) {
+ var hsl = tinycolor(color).toHsl();
+ var h = hsl.h;
+ return [tinycolor(color), tinycolor({
+ h: (h + 72) % 360,
+ s: hsl.s,
+ l: hsl.l
+ }), tinycolor({
+ h: (h + 216) % 360,
+ s: hsl.s,
+ l: hsl.l
+ })];
+ }
+ function _analogous(color, results, slices) {
+ results = results || 6;
+ slices = slices || 30;
+ var hsl = tinycolor(color).toHsl();
+ var part = 360 / slices;
+ var ret = [tinycolor(color)];
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
+ hsl.h = (hsl.h + part) % 360;
+ ret.push(tinycolor(hsl));
+ }
+ return ret;
+ }
+ function _monochromatic(color, results) {
+ results = results || 6;
+ var hsv = tinycolor(color).toHsv();
+ var h = hsv.h,
+ s = hsv.s,
+ v = hsv.v;
+ var ret = [];
+ var modification = 1 / results;
+ while (results--) {
+ ret.push(tinycolor({
+ h: h,
+ s: s,
+ v: v
+ }));
+ v = (v + modification) % 1;
+ }
+ return ret;
+ }
+
+ // Utility Functions
+ // ---------------------
+
+ tinycolor.mix = function (color1, color2, amount) {
+ amount = amount === 0 ? 0 : amount || 50;
+ var rgb1 = tinycolor(color1).toRgb();
+ var rgb2 = tinycolor(color2).toRgb();
+ var p = amount / 100;
+ var rgba = {
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
+ };
+ return tinycolor(rgba);
+ };
+
+ // Readability Functions
+ // ---------------------
+ // false
+ // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
+ tinycolor.isReadable = function (color1, color2, wcag2) {
+ var readability = tinycolor.readability(color1, color2);
+ var wcag2Parms, out;
+ out = false;
+ wcag2Parms = validateWCAG2Parms(wcag2);
+ switch (wcag2Parms.level + wcag2Parms.size) {
+ case "AAsmall":
+ case "AAAlarge":
+ out = readability >= 4.5;
+ break;
+ case "AAlarge":
+ out = readability >= 3;
+ break;
+ case "AAAsmall":
+ out = readability >= 7;
+ break;
+ }
+ return out;
+ };
+
+ // `mostReadable`
+ // Given a base color and a list of possible foreground or background
+ // colors for that base, returns the most readable color.
+ // Optionally returns Black or White if the most readable color is unreadable.
+ // *Example*
+ // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
+ // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
+ // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
+ // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
+ tinycolor.mostReadable = function (baseColor, colorList, args) {
+ var bestColor = null;
+ var bestScore = 0;
+ var readability;
+ var includeFallbackColors, level, size;
+ args = args || {};
+ includeFallbackColors = args.includeFallbackColors;
+ level = args.level;
+ size = args.size;
+ for (var i = 0; i < colorList.length; i++) {
+ readability = tinycolor.readability(baseColor, colorList[i]);
+ if (readability > bestScore) {
+ bestScore = readability;
+ bestColor = tinycolor(colorList[i]);
+ }
+ }
+ if (tinycolor.isReadable(baseColor, bestColor, {
+ level: level,
+ size: size
+ }) || !includeFallbackColors) {
+ return bestColor;
+ } else {
+ args.includeFallbackColors = false;
+ return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
+ }
+ };
+
+ // Big List of Colors
+ // ------------------
+ //
+ var names = tinycolor.names = {
+ aliceblue: "f0f8ff",
+ antiquewhite: "faebd7",
+ aqua: "0ff",
+ aquamarine: "7fffd4",
+ azure: "f0ffff",
+ beige: "f5f5dc",
+ bisque: "ffe4c4",
+ black: "000",
+ blanchedalmond: "ffebcd",
+ blue: "00f",
+ blueviolet: "8a2be2",
+ brown: "a52a2a",
+ burlywood: "deb887",
+ burntsienna: "ea7e5d",
+ cadetblue: "5f9ea0",
+ chartreuse: "7fff00",
+ chocolate: "d2691e",
+ coral: "ff7f50",
+ cornflowerblue: "6495ed",
+ cornsilk: "fff8dc",
+ crimson: "dc143c",
+ cyan: "0ff",
+ darkblue: "00008b",
+ darkcyan: "008b8b",
+ darkgoldenrod: "b8860b",
+ darkgray: "a9a9a9",
+ darkgreen: "006400",
+ darkgrey: "a9a9a9",
+ darkkhaki: "bdb76b",
+ darkmagenta: "8b008b",
+ darkolivegreen: "556b2f",
+ darkorange: "ff8c00",
+ darkorchid: "9932cc",
+ darkred: "8b0000",
+ darksalmon: "e9967a",
+ darkseagreen: "8fbc8f",
+ darkslateblue: "483d8b",
+ darkslategray: "2f4f4f",
+ darkslategrey: "2f4f4f",
+ darkturquoise: "00ced1",
+ darkviolet: "9400d3",
+ deeppink: "ff1493",
+ deepskyblue: "00bfff",
+ dimgray: "696969",
+ dimgrey: "696969",
+ dodgerblue: "1e90ff",
+ firebrick: "b22222",
+ floralwhite: "fffaf0",
+ forestgreen: "228b22",
+ fuchsia: "f0f",
+ gainsboro: "dcdcdc",
+ ghostwhite: "f8f8ff",
+ gold: "ffd700",
+ goldenrod: "daa520",
+ gray: "808080",
+ green: "008000",
+ greenyellow: "adff2f",
+ grey: "808080",
+ honeydew: "f0fff0",
+ hotpink: "ff69b4",
+ indianred: "cd5c5c",
+ indigo: "4b0082",
+ ivory: "fffff0",
+ khaki: "f0e68c",
+ lavender: "e6e6fa",
+ lavenderblush: "fff0f5",
+ lawngreen: "7cfc00",
+ lemonchiffon: "fffacd",
+ lightblue: "add8e6",
+ lightcoral: "f08080",
+ lightcyan: "e0ffff",
+ lightgoldenrodyellow: "fafad2",
+ lightgray: "d3d3d3",
+ lightgreen: "90ee90",
+ lightgrey: "d3d3d3",
+ lightpink: "ffb6c1",
+ lightsalmon: "ffa07a",
+ lightseagreen: "20b2aa",
+ lightskyblue: "87cefa",
+ lightslategray: "789",
+ lightslategrey: "789",
+ lightsteelblue: "b0c4de",
+ lightyellow: "ffffe0",
+ lime: "0f0",
+ limegreen: "32cd32",
+ linen: "faf0e6",
+ magenta: "f0f",
+ maroon: "800000",
+ mediumaquamarine: "66cdaa",
+ mediumblue: "0000cd",
+ mediumorchid: "ba55d3",
+ mediumpurple: "9370db",
+ mediumseagreen: "3cb371",
+ mediumslateblue: "7b68ee",
+ mediumspringgreen: "00fa9a",
+ mediumturquoise: "48d1cc",
+ mediumvioletred: "c71585",
+ midnightblue: "191970",
+ mintcream: "f5fffa",
+ mistyrose: "ffe4e1",
+ moccasin: "ffe4b5",
+ navajowhite: "ffdead",
+ navy: "000080",
+ oldlace: "fdf5e6",
+ olive: "808000",
+ olivedrab: "6b8e23",
+ orange: "ffa500",
+ orangered: "ff4500",
+ orchid: "da70d6",
+ palegoldenrod: "eee8aa",
+ palegreen: "98fb98",
+ paleturquoise: "afeeee",
+ palevioletred: "db7093",
+ papayawhip: "ffefd5",
+ peachpuff: "ffdab9",
+ peru: "cd853f",
+ pink: "ffc0cb",
+ plum: "dda0dd",
+ powderblue: "b0e0e6",
+ purple: "800080",
+ rebeccapurple: "663399",
+ red: "f00",
+ rosybrown: "bc8f8f",
+ royalblue: "4169e1",
+ saddlebrown: "8b4513",
+ salmon: "fa8072",
+ sandybrown: "f4a460",
+ seagreen: "2e8b57",
+ seashell: "fff5ee",
+ sienna: "a0522d",
+ silver: "c0c0c0",
+ skyblue: "87ceeb",
+ slateblue: "6a5acd",
+ slategray: "708090",
+ slategrey: "708090",
+ snow: "fffafa",
+ springgreen: "00ff7f",
+ steelblue: "4682b4",
+ tan: "d2b48c",
+ teal: "008080",
+ thistle: "d8bfd8",
+ tomato: "ff6347",
+ turquoise: "40e0d0",
+ violet: "ee82ee",
+ wheat: "f5deb3",
+ white: "fff",
+ whitesmoke: "f5f5f5",
+ yellow: "ff0",
+ yellowgreen: "9acd32"
+ };
+
+ // Make it easy to access colors via `hexNames[hex]`
+ var hexNames = tinycolor.hexNames = flip(names);
+
+ // Utilities
+ // ---------
+
+ // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
+ function flip(o) {
+ var flipped = {};
+ for (var i in o) {
+ if (o.hasOwnProperty(i)) {
+ flipped[o[i]] = i;
+ }
+ }
+ return flipped;
+ }
+
+ // Return a valid alpha value [0,1] with all invalid values being set to 1
+ function boundAlpha(a) {
+ a = parseFloat(a);
+ if (isNaN(a) || a < 0 || a > 1) {
+ a = 1;
+ }
+ return a;
+ }
+
+ // Take input from [0, n] and return it as [0, 1]
+ function bound01(n, max) {
+ if (isOnePointZero(n)) n = "100%";
+ var processPercent = isPercentage(n);
+ n = Math.min(max, Math.max(0, parseFloat(n)));
+
+ // Automatically convert percentage into number
+ if (processPercent) {
+ n = parseInt(n * max, 10) / 100;
+ }
+
+ // Handle floating point rounding errors
+ if (Math.abs(n - max) < 0.000001) {
+ return 1;
+ }
+
+ // Convert into [0, 1] range if it isn't already
+ return n % max / parseFloat(max);
+ }
+
+ // Force a number between 0 and 1
+ function clamp01(val) {
+ return Math.min(1, Math.max(0, val));
+ }
+
+ // Parse a base-16 hex value into a base-10 integer
+ function parseIntFromHex(val) {
+ return parseInt(val, 16);
+ }
+
+ // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
+ //
+ function isOnePointZero(n) {
+ return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
+ }
+
+ // Check to see if string passed in is a percentage
+ function isPercentage(n) {
+ return typeof n === "string" && n.indexOf("%") != -1;
+ }
+
+ // Force a hex value to have 2 characters
+ function pad2(c) {
+ return c.length == 1 ? "0" + c : "" + c;
+ }
+
+ // Replace a decimal with it's percentage value
+ function convertToPercentage(n) {
+ if (n <= 1) {
+ n = n * 100 + "%";
+ }
+ return n;
+ }
+
+ // Converts a decimal to a hex value
+ function convertDecimalToHex(d) {
+ return Math.round(parseFloat(d) * 255).toString(16);
+ }
+ // Converts a hex value to a decimal
+ function convertHexToDecimal(h) {
+ return parseIntFromHex(h) / 255;
+ }
+ var matchers = function () {
+ //
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
+
+ //
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
+
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
+
+ // Actual matching.
+ // Parentheses and commas are optional, but not required.
+ // Whitespace can take the place of commas or opening paren
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+ return {
+ CSS_UNIT: new RegExp(CSS_UNIT),
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
+ };
+ }();
+
+ // `isValidCSSUnit`
+ // Take in a single string / number and check to see if it looks like a CSS unit
+ // (see `matchers` above for definition).
+ function isValidCSSUnit(color) {
+ return !!matchers.CSS_UNIT.exec(color);
+ }
+
+ // `stringInputToObject`
+ // Permissive string parsing. Take in a number of formats, and output an object
+ // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
+ function stringInputToObject(color) {
+ color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
+ var named = false;
+ if (names[color]) {
+ color = names[color];
+ named = true;
+ } else if (color == "transparent") {
+ return {
+ r: 0,
+ g: 0,
+ b: 0,
+ a: 0,
+ format: "name"
+ };
+ }
+
+ // Try to match string input using regular expressions.
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
+ // Just return an object and let the conversion functions handle that.
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
+ var match;
+ if (match = matchers.rgb.exec(color)) {
+ return {
+ r: match[1],
+ g: match[2],
+ b: match[3]
+ };
+ }
+ if (match = matchers.rgba.exec(color)) {
+ return {
+ r: match[1],
+ g: match[2],
+ b: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hsl.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ l: match[3]
+ };
+ }
+ if (match = matchers.hsla.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ l: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hsv.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ v: match[3]
+ };
+ }
+ if (match = matchers.hsva.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ v: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hex8.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ a: convertHexToDecimal(match[4]),
+ format: named ? "name" : "hex8"
+ };
+ }
+ if (match = matchers.hex6.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+ if (match = matchers.hex4.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ a: convertHexToDecimal(match[4] + "" + match[4]),
+ format: named ? "name" : "hex8"
+ };
+ }
+ if (match = matchers.hex3.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+ return false;
+ }
+ function validateWCAG2Parms(parms) {
+ // return valid WCAG2 parms for isReadable.
+ // If input parms are invalid, return {"level":"AA", "size":"small"}
+ var level, size;
+ parms = parms || {
+ level: "AA",
+ size: "small"
+ };
+ level = (parms.level || "AA").toUpperCase();
+ size = (parms.size || "small").toLowerCase();
+ if (level !== "AA" && level !== "AAA") {
+ level = "AA";
+ }
+ if (size !== "small" && size !== "large") {
+ size = "small";
+ }
+ return {
+ level: level,
+ size: size
+ };
+ }
+
+ return tinycolor;
+
+}));
diff --git a/vendor/assets/javascripts/to-markdown.js b/vendor/assets/javascripts/to-markdown.js
new file mode 100644
index 000000000..c86668779
--- /dev/null
+++ b/vendor/assets/javascripts/to-markdown.js
@@ -0,0 +1 @@
+//= require to-markdown/to-markdown.js
diff --git a/vendor/assets/javascripts/to-markdown/to-markdown.js b/vendor/assets/javascripts/to-markdown/to-markdown.js
new file mode 100644
index 000000000..299ed5e6a
--- /dev/null
+++ b/vendor/assets/javascripts/to-markdown/to-markdown.js
@@ -0,0 +1,789 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.toMarkdown = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0) {
+ elem = inqueue.shift()
+ outqueue.push(elem)
+ children = elem.childNodes
+ for (i = 0; i < children.length; i++) {
+ if (children[i].nodeType === 1) inqueue.push(children[i])
+ }
+ }
+ outqueue.shift()
+ return outqueue
+}
+
+/*
+ * Contructs a Markdown string of replacement text for a given node
+ */
+
+function getContent (node) {
+ var text = ''
+ for (var i = 0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].nodeType === 1) {
+ text += node.childNodes[i]._replacement
+ } else if (node.childNodes[i].nodeType === 3) {
+ text += node.childNodes[i].data
+ } else continue
+ }
+ return text
+}
+
+/*
+ * Returns the HTML string of an element with its contents converted
+ */
+
+function outer (node, content) {
+ return node.cloneNode(false).outerHTML.replace('><', '>' + content + '<')
+}
+
+function canConvert (node, filter) {
+ if (typeof filter === 'string') {
+ return filter === node.nodeName.toLowerCase()
+ }
+ if (Array.isArray(filter)) {
+ return filter.indexOf(node.nodeName.toLowerCase()) !== -1
+ } else if (typeof filter === 'function') {
+ return filter.call(toMarkdown, node)
+ } else {
+ throw new TypeError('`filter` needs to be a string, array, or function')
+ }
+}
+
+function isFlankedByWhitespace (side, node) {
+ var sibling
+ var regExp
+ var isFlanked
+
+ if (side === 'left') {
+ sibling = node.previousSibling
+ regExp = / $/
+ } else {
+ sibling = node.nextSibling
+ regExp = /^ /
+ }
+
+ if (sibling) {
+ if (sibling.nodeType === 3) {
+ isFlanked = regExp.test(sibling.nodeValue)
+ } else if (sibling.nodeType === 1 && !isBlock(sibling)) {
+ isFlanked = regExp.test(sibling.textContent)
+ }
+ }
+ return isFlanked
+}
+
+function flankingWhitespace (node, content) {
+ var leading = ''
+ var trailing = ''
+
+ if (!isBlock(node)) {
+ var hasLeading = /^[ \r\n\t]/.test(content)
+ var hasTrailing = /[ \r\n\t]$/.test(content)
+
+ if (hasLeading && !isFlankedByWhitespace('left', node)) {
+ leading = ' '
+ }
+ if (hasTrailing && !isFlankedByWhitespace('right', node)) {
+ trailing = ' '
+ }
+ }
+
+ return { leading: leading, trailing: trailing }
+}
+
+/*
+ * Finds a Markdown converter, gets the replacement, and sets it on
+ * `_replacement`
+ */
+
+function process (node) {
+ var replacement
+ var content = getContent(node)
+
+ // Remove blank nodes
+ if (!isVoid(node) && !/A|TH|TD/.test(node.nodeName) && /^\s*$/i.test(content)) {
+ node._replacement = ''
+ return
+ }
+
+ for (var i = 0; i < converters.length; i++) {
+ var converter = converters[i]
+
+ if (canConvert(node, converter.filter)) {
+ if (typeof converter.replacement !== 'function') {
+ throw new TypeError(
+ '`replacement` needs to be a function that returns a string'
+ )
+ }
+
+ var whitespace = flankingWhitespace(node, content)
+
+ if (whitespace.leading || whitespace.trailing) {
+ content = content.trim()
+ }
+ replacement = whitespace.leading +
+ converter.replacement.call(toMarkdown, content, node) +
+ whitespace.trailing
+ break
+ }
+ }
+
+ node._replacement = replacement
+}
+
+toMarkdown = function (input, options) {
+ options = options || {}
+
+ if (typeof input !== 'string') {
+ throw new TypeError(input + ' is not a string')
+ }
+
+ if (input === '') {
+ return ''
+ }
+
+ // Escape potential ol triggers
+ input = input.replace(/(\d+)\. /g, '$1\\. ')
+
+ var clone = htmlToDom(input).body
+ var nodes = bfsOrder(clone)
+ var output
+
+ converters = mdConverters.slice(0)
+ if (options.gfm) {
+ converters = gfmConverters.concat(converters)
+ }
+
+ if (options.converters) {
+ converters = options.converters.concat(converters)
+ }
+
+ // Process through nodes in reverse (so deepest child elements are first).
+ for (var i = nodes.length - 1; i >= 0; i--) {
+ process(nodes[i])
+ }
+ output = getContent(clone)
+
+ return output.replace(/^[\t\r\n]+|[\t\r\n\s]+$/g, '')
+ .replace(/\n\s+\n/g, '\n\n')
+ .replace(/\n{3,}/g, '\n\n')
+}
+
+toMarkdown.isBlock = isBlock
+toMarkdown.isVoid = isVoid
+toMarkdown.outer = outer
+
+module.exports = toMarkdown
+
+},{"./lib/gfm-converters":2,"./lib/html-parser":3,"./lib/md-converters":4,"collapse-whitespace":7}],2:[function(require,module,exports){
+'use strict'
+
+function cell (content, node) {
+ var index = Array.prototype.indexOf.call(node.parentNode.childNodes, node)
+ var prefix = ' '
+ if (index === 0) prefix = '| '
+ return prefix + content + ' |'
+}
+
+var highlightRegEx = /highlight highlight-(\S+)/
+
+module.exports = [
+ {
+ filter: 'br',
+ replacement: function () {
+ return '\n'
+ }
+ },
+ {
+ filter: ['del', 's', 'strike'],
+ replacement: function (content) {
+ return '~~' + content + '~~'
+ }
+ },
+
+ {
+ filter: function (node) {
+ return node.type === 'checkbox' && node.parentNode.nodeName === 'LI'
+ },
+ replacement: function (content, node) {
+ return (node.checked ? '[x]' : '[ ]') + ' '
+ }
+ },
+
+ {
+ filter: ['th', 'td'],
+ replacement: function (content, node) {
+ return cell(content, node)
+ }
+ },
+
+ {
+ filter: 'tr',
+ replacement: function (content, node) {
+ var borderCells = ''
+ var alignMap = { left: ':--', right: '--:', center: ':-:' }
+
+ if (node.parentNode.nodeName === 'THEAD') {
+ for (var i = 0; i < node.childNodes.length; i++) {
+ var align = node.childNodes[i].attributes.align
+ var border = '---'
+
+ if (align) border = alignMap[align.value] || border
+
+ borderCells += cell(border, node.childNodes[i])
+ }
+ }
+ return '\n' + content + (borderCells ? '\n' + borderCells : '')
+ }
+ },
+
+ {
+ filter: 'table',
+ replacement: function (content) {
+ return '\n\n' + content + '\n\n'
+ }
+ },
+
+ {
+ filter: ['thead', 'tbody', 'tfoot'],
+ replacement: function (content) {
+ return content
+ }
+ },
+
+ // Fenced code blocks
+ {
+ filter: function (node) {
+ return node.nodeName === 'PRE' &&
+ node.firstChild &&
+ node.firstChild.nodeName === 'CODE'
+ },
+ replacement: function (content, node) {
+ return '\n\n```\n' + node.firstChild.textContent + '\n```\n\n'
+ }
+ },
+
+ // Syntax-highlighted code blocks
+ {
+ filter: function (node) {
+ return node.nodeName === 'PRE' &&
+ node.parentNode.nodeName === 'DIV' &&
+ highlightRegEx.test(node.parentNode.className)
+ },
+ replacement: function (content, node) {
+ var language = node.parentNode.className.match(highlightRegEx)[1]
+ return '\n\n```' + language + '\n' + node.textContent + '\n```\n\n'
+ }
+ },
+
+ {
+ filter: function (node) {
+ return node.nodeName === 'DIV' &&
+ highlightRegEx.test(node.className)
+ },
+ replacement: function (content) {
+ return '\n\n' + content + '\n\n'
+ }
+ }
+]
+
+},{}],3:[function(require,module,exports){
+/*
+ * Set up window for Node.js
+ */
+
+var _window = (typeof window !== 'undefined' ? window : this)
+
+/*
+ * Parsing HTML strings
+ */
+
+function canParseHtmlNatively () {
+ var Parser = _window.DOMParser
+ var canParse = false
+
+ // Adapted from https://gist.github.com/1129031
+ // Firefox/Opera/IE throw errors on unsupported types
+ try {
+ // WebKit returns null on unsupported types
+ if (new Parser().parseFromString('', 'text/html')) {
+ canParse = true
+ }
+ } catch (e) {}
+
+ return canParse
+}
+
+function createHtmlParser () {
+ var Parser = function () {}
+
+ // For Node.js environments
+ if (typeof document === 'undefined') {
+ var jsdom = require('jsdom')
+ Parser.prototype.parseFromString = function (string) {
+ return jsdom.jsdom(string, {
+ features: {
+ FetchExternalResources: [],
+ ProcessExternalResources: false
+ }
+ })
+ }
+ } else {
+ if (!shouldUseActiveX()) {
+ Parser.prototype.parseFromString = function (string) {
+ var doc = document.implementation.createHTMLDocument('')
+ doc.open()
+ doc.write(string)
+ doc.close()
+ return doc
+ }
+ } else {
+ Parser.prototype.parseFromString = function (string) {
+ var doc = new window.ActiveXObject('htmlfile')
+ doc.designMode = 'on' // disable on-page scripts
+ doc.open()
+ doc.write(string)
+ doc.close()
+ return doc
+ }
+ }
+ }
+ return Parser
+}
+
+function shouldUseActiveX () {
+ var useActiveX = false
+
+ try {
+ document.implementation.createHTMLDocument('').open()
+ } catch (e) {
+ if (window.ActiveXObject) useActiveX = true
+ }
+
+ return useActiveX
+}
+
+module.exports = canParseHtmlNatively() ? _window.DOMParser : createHtmlParser()
+
+},{"jsdom":6}],4:[function(require,module,exports){
+'use strict'
+
+module.exports = [
+ {
+ filter: 'p',
+ replacement: function (content) {
+ return '\n\n' + content + '\n\n'
+ }
+ },
+
+ {
+ filter: 'br',
+ replacement: function () {
+ return ' \n'
+ }
+ },
+
+ {
+ filter: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
+ replacement: function (content, node) {
+ var hLevel = node.nodeName.charAt(1)
+ var hPrefix = ''
+ for (var i = 0; i < hLevel; i++) {
+ hPrefix += '#'
+ }
+ return '\n\n' + hPrefix + ' ' + content + '\n\n'
+ }
+ },
+
+ {
+ filter: 'hr',
+ replacement: function () {
+ return '\n\n* * *\n\n'
+ }
+ },
+
+ {
+ filter: ['em', 'i'],
+ replacement: function (content) {
+ return '_' + content + '_'
+ }
+ },
+
+ {
+ filter: ['strong', 'b'],
+ replacement: function (content) {
+ return '**' + content + '**'
+ }
+ },
+
+ // Inline code
+ {
+ filter: function (node) {
+ var hasSiblings = node.previousSibling || node.nextSibling
+ var isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings
+
+ return node.nodeName === 'CODE' && !isCodeBlock
+ },
+ replacement: function (content) {
+ return '`' + content + '`'
+ }
+ },
+
+ {
+ filter: function (node) {
+ return node.nodeName === 'A' && node.getAttribute('href')
+ },
+ replacement: function (content, node) {
+ var titlePart = node.title ? ' "' + node.title + '"' : ''
+ return '[' + content + '](' + node.getAttribute('href') + titlePart + ')'
+ }
+ },
+
+ {
+ filter: 'img',
+ replacement: function (content, node) {
+ var alt = node.alt || ''
+ var src = node.getAttribute('src') || ''
+ var title = node.title || ''
+ var titlePart = title ? ' "' + title + '"' : ''
+ return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : ''
+ }
+ },
+
+ // Code blocks
+ {
+ filter: function (node) {
+ return node.nodeName === 'PRE' && node.firstChild.nodeName === 'CODE'
+ },
+ replacement: function (content, node) {
+ return '\n\n ' + node.firstChild.textContent.replace(/\n/g, '\n ') + '\n\n'
+ }
+ },
+
+ {
+ filter: 'blockquote',
+ replacement: function (content) {
+ content = content.trim()
+ content = content.replace(/\n{3,}/g, '\n\n')
+ content = content.replace(/^/gm, '> ')
+ return '\n\n' + content + '\n\n'
+ }
+ },
+
+ {
+ filter: 'li',
+ replacement: function (content, node) {
+ content = content.replace(/^\s+/, '').replace(/\n/gm, '\n ')
+ var prefix = '* '
+ var parent = node.parentNode
+ var index = Array.prototype.indexOf.call(parent.children, node) + 1
+
+ prefix = /ol/i.test(parent.nodeName) ? index + '. ' : '* '
+ return prefix + content
+ }
+ },
+
+ {
+ filter: ['ul', 'ol'],
+ replacement: function (content, node) {
+ var strings = []
+ for (var i = 0; i < node.childNodes.length; i++) {
+ strings.push(node.childNodes[i]._replacement)
+ }
+
+ if (/li/i.test(node.parentNode.nodeName)) {
+ return '\n' + strings.join('\n')
+ }
+ return '\n\n' + strings.join('\n') + '\n\n'
+ }
+ },
+
+ {
+ filter: function (node) {
+ return this.isBlock(node)
+ },
+ replacement: function (content, node) {
+ return '\n\n' + this.outer(node, content) + '\n\n'
+ }
+ },
+
+ // Anything else!
+ {
+ filter: function () {
+ return true
+ },
+ replacement: function (content, node) {
+ return this.outer(node, content)
+ }
+ }
+]
+
+},{}],5:[function(require,module,exports){
+/**
+ * This file automatically generated from `build.js`.
+ * Do not manually edit.
+ */
+
+module.exports = [
+ "address",
+ "article",
+ "aside",
+ "audio",
+ "blockquote",
+ "canvas",
+ "dd",
+ "div",
+ "dl",
+ "fieldset",
+ "figcaption",
+ "figure",
+ "footer",
+ "form",
+ "h1",
+ "h2",
+ "h3",
+ "h4",
+ "h5",
+ "h6",
+ "header",
+ "hgroup",
+ "hr",
+ "main",
+ "nav",
+ "noscript",
+ "ol",
+ "output",
+ "p",
+ "pre",
+ "section",
+ "table",
+ "tfoot",
+ "ul",
+ "video"
+];
+
+},{}],6:[function(require,module,exports){
+
+},{}],7:[function(require,module,exports){
+'use strict';
+
+var voidElements = require('void-elements');
+Object.keys(voidElements).forEach(function (name) {
+ voidElements[name.toUpperCase()] = 1;
+});
+
+var blockElements = {};
+require('block-elements').forEach(function (name) {
+ blockElements[name.toUpperCase()] = 1;
+});
+
+/**
+ * isBlockElem(node) determines if the given node is a block element.
+ *
+ * @param {Node} node
+ * @return {Boolean}
+ */
+function isBlockElem(node) {
+ return !!(node && blockElements[node.nodeName]);
+}
+
+/**
+ * isVoid(node) determines if the given node is a void element.
+ *
+ * @param {Node} node
+ * @return {Boolean}
+ */
+function isVoid(node) {
+ return !!(node && voidElements[node.nodeName]);
+}
+
+/**
+ * whitespace(elem [, isBlock]) removes extraneous whitespace from an
+ * the given element. The function isBlock may optionally be passed in
+ * to determine whether or not an element is a block element; if none
+ * is provided, defaults to using the list of block elements provided
+ * by the `block-elements` module.
+ *
+ * @param {Node} elem
+ * @param {Function} blockTest
+ */
+function collapseWhitespace(elem, isBlock) {
+ if (!elem.firstChild || elem.nodeName === 'PRE') return;
+
+ if (typeof isBlock !== 'function') {
+ isBlock = isBlockElem;
+ }
+
+ var prevText = null;
+ var prevVoid = false;
+
+ var prev = null;
+ var node = next(prev, elem);
+
+ while (node !== elem) {
+ if (node.nodeType === 3) {
+ // Node.TEXT_NODE
+ var text = node.data.replace(/[ \r\n\t]+/g, ' ');
+
+ if ((!prevText || / $/.test(prevText.data)) && !prevVoid && text[0] === ' ') {
+ text = text.substr(1);
+ }
+
+ // `text` might be empty at this point.
+ if (!text) {
+ node = remove(node);
+ continue;
+ }
+
+ node.data = text;
+ prevText = node;
+ } else if (node.nodeType === 1) {
+ // Node.ELEMENT_NODE
+ if (isBlock(node) || node.nodeName === 'BR') {
+ if (prevText) {
+ prevText.data = prevText.data.replace(/ $/, '');
+ }
+
+ prevText = null;
+ prevVoid = false;
+ } else if (isVoid(node)) {
+ // Avoid trimming space around non-block, non-BR void elements.
+ prevText = null;
+ prevVoid = true;
+ }
+ } else {
+ node = remove(node);
+ continue;
+ }
+
+ var nextNode = next(prev, node);
+ prev = node;
+ node = nextNode;
+ }
+
+ if (prevText) {
+ prevText.data = prevText.data.replace(/ $/, '');
+ if (!prevText.data) {
+ remove(prevText);
+ }
+ }
+}
+
+/**
+ * remove(node) removes the given node from the DOM and returns the
+ * next node in the sequence.
+ *
+ * @param {Node} node
+ * @return {Node} node
+ */
+function remove(node) {
+ var next = node.nextSibling || node.parentNode;
+
+ node.parentNode.removeChild(node);
+
+ return next;
+}
+
+/**
+ * next(prev, current) returns the next node in the sequence, given the
+ * current and previous nodes.
+ *
+ * @param {Node} prev
+ * @param {Node} current
+ * @return {Node}
+ */
+function next(prev, current) {
+ if (prev && prev.parentNode === current || current.nodeName === 'PRE') {
+ return current.nextSibling || current.parentNode;
+ }
+
+ return current.firstChild || current.nextSibling || current.parentNode;
+}
+
+module.exports = collapseWhitespace;
+
+},{"block-elements":5,"void-elements":8}],8:[function(require,module,exports){
+/**
+ * This file automatically generated from `pre-publish.js`.
+ * Do not manually edit.
+ */
+
+module.exports = {
+ "area": true,
+ "base": true,
+ "br": true,
+ "col": true,
+ "embed": true,
+ "hr": true,
+ "img": true,
+ "input": true,
+ "keygen": true,
+ "link": true,
+ "menuitem": true,
+ "meta": true,
+ "param": true,
+ "source": true,
+ "track": true,
+ "wbr": true
+};
+
+},{}]},{},[1])(1)
+});
\ No newline at end of file
diff --git a/vendor/assets/javascripts/trianglify.js b/vendor/assets/javascripts/trianglify.js
new file mode 100644
index 000000000..9f57101ac
--- /dev/null
+++ b/vendor/assets/javascripts/trianglify.js
@@ -0,0 +1 @@
+//= require trianglify/trianglify.min.js
diff --git a/vendor/assets/javascripts/trianglify/trianglify.min.js b/vendor/assets/javascripts/trianglify/trianglify.min.js
new file mode 100644
index 000000000..91fb1f1a8
--- /dev/null
+++ b/vendor/assets/javascripts/trianglify/trianglify.min.js
@@ -0,0 +1 @@
+(function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var d;d="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,d.Trianglify=e()}})(function(){var e,d=Math.max,f=Math.sqrt,a=Math.abs,n=Math.floor;return function d(c,e,t){function a(r,i){if(!e[r]){if(!c[r]){var o="function"==typeof require&&require;if(!i&&o)return o(r,!0);if(n)return n(r,!0);var s=new Error("Cannot find module '"+r+"'");throw s.code="MODULE_NOT_FOUND",s}var f=e[r]={exports:{}};c[r][0].call(f.exports,function(d){var e=c[r][1][d];return a(e?e:d)},f,f.exports,d,c,e,t)}return e[r].exports}for(var n="function"==typeof require&&require,f=0;fe.cell_size)throw new Error("Cell size must be greater than 2.");var h;if(e.color_function)h=function(d,a){return r(e.color_function(d,a))};else{var g=r.scale(e.x_colors).mode(e.color_space),u=r.scale(e.y_colors).mode(e.color_space);h=function(d,a){return r.interpolate(g(d),u(a),0.5,e.color_space)}}for(var p=e.width,m=e.height,y=n((p+4*e.cell_size)/e.cell_size),x=n((m+4*e.cell_size)/e.cell_size),_=(y*e.cell_size-p)/2,v=(x*e.cell_size-m)/2,w=e.cell_size*e.variance/2,j=function(e){return d(e,[-_,p+_],[0,1])},k=function(e){return d(e,[-v,m+v],[0,1])},z=e.points||l(p,m,_,v,e.cell_size,w,b),B=new f(z).triangles,S=[],G=function(e){return z[e]},P=0;P "):document;d.exports=function(d,t){function n(n){var r;if("object"==typeof a&&"object"==typeof a.versions&&"undefined"!=typeof a.versions.node)try{e("canvas")}catch(d){throw Error("The optional node-canvas dependency is needed for Trianglify to render using canvas in node.")}return n||(n=f.createElement("canvas")),n.setAttribute("width",t.width),n.setAttribute("height",t.height),r=n.getContext("2d"),r.canvas.width=t.width,r.canvas.height=t.height,d.forEach(function(e){r.fillStyle=r.strokeStyle=e[0],r.lineWidth=t.stroke_width,r.beginPath(),r.moveTo.apply(r,e[1][0]),r.lineTo.apply(r,e[1][1]),r.lineTo.apply(r,e[1][2]),r.fill(),r.stroke()}),n}return{polys:d,opts:t,svg:function(e){var a=f.createElementNS("http://www.w3.org/2000/svg","svg");return a.setAttribute("width",t.width),a.setAttribute("height",t.height),e&&e.includeNamespace&&a.setAttribute("xmlns","http://www.w3.org/2000/svg"),d.forEach(function(e){var d=f.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("d","M"+e[1].join("L")+"Z"),d.setAttribute("fill",e[0]),d.setAttribute("stroke",e[0]),d.setAttribute("stroke-width",t.stroke_width),a.appendChild(d)}),a},canvas:n,png:function(){return n().toDataURL("image/png")}}}}).call(this,e("_process"))},{_process:"/home/vagrant/dev/trianglify/node_modules/process/browser.js",canvas:"/home/vagrant/dev/trianglify/node_modules/browser-resolve/empty.js",jsdom:"/home/vagrant/dev/trianglify/node_modules/browser-resolve/empty.js"}],"/home/vagrant/dev/trianglify/lib/points.js":[function(e,d){d.exports=function(e,d,a,f,t,r,l){for(var o=0.5*t,s=2*r,c=-r,b=[],h=-a;hf?(a+0.05)/(f+0.05):(f+0.05)/(a+0.05)},y.luminance=function(e){return y(e).luminance()},y._Color=t,t=function(){function e(){var e,d,a,f,t,n,r,i,l,o,s,c,b,h,g,u;for(t=this,a=[],(o=0,s=arguments.length);od?i(e,o):i(o,t)},this._rgb=(t>d?i(new e("black"),this):i(this,new e("white"))).rgba(),this)},e.prototype.name=function(){var e,d;for(d in e=this.hex(),y.colors)if(e===y.colors[d])return d;return e},e.prototype.alpha=function(e){return arguments.length?(this._rgb[3]=e,this):this._rgb[3]},e.prototype.css=function(e){var d,a,f,t;return(null==e&&(e="rgb"),a=this,f=a._rgb,3===e.length&&1>f[3]&&(e+="a"),"rgb"===e)?e+"("+f.slice(0,3).map(Math.round).join(",")+")":"rgba"===e?e+"("+f.slice(0,3).map(Math.round).join(",")+","+f[3]+")":"hsl"===e||"hsla"===e?(d=a.hsl(),t=function(e){return $(100*e)/100},d[0]=t(d[0]),d[1]=t(100*d[1])+"%",d[2]=t(100*d[2])+"%",4===e.length&&(d[3]=f[3]),e+"("+d.join(",")+")"):void 0},e.prototype.interpolate=function(d,a,f){var t,n,r,i,l,o,s,c,b,h,g,u,p,m;if(c=this,null==f&&(f="rgb"),"string"===D(a)&&(a=new e(a)),"hsl"===f||"hsv"===f||"lch"===f||"hsi"===f)"hsl"===f?(p=c.hsl(),m=a.hsl()):"hsv"===f?(p=c.hsv(),m=a.hsv()):"hsi"===f?(p=c.hsi(),m=a.hsi()):"lch"===f&&(p=c.lch(),m=a.lch()),"h"===f.substr(0,1)?(r=p[0],g=p[1],o=p[2],i=m[0],u=m[1],s=m[2]):(o=p[0],g=p[1],r=p[2],s=m[0],u=m[1],i=m[2]),isNaN(r)||isNaN(i)?isNaN(r)?isNaN(i)?n=H:(n=i,(1===o||0===o)&&"hsv"!==f&&(h=u)):(n=r,(1===s||0===s)&&"hsv"!==f&&(h=g)):(t=i>r&&180d?(0>e[d]&&(e[d]=0),255e[d]&&(e[d]=0),1=n;a=++n)t[a]=+t[a];t[3]=1}else if(f=e.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(t=f.slice(1,5),a=r=0;3>=r;a=++r)t[a]=+t[a];else if(f=e.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(t=f.slice(1,4),a=i=0;2>=i;a=++i)t[a]=$(2.55*t[a]);t[3]=1}else if(f=e.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(t=f.slice(1,5),a=l=0;2>=l;a=++l)t[a]=$(2.55*t[a]);t[3]=+t[3]}else(f=e.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?(d=f.slice(1,4),d[1]*=0.01,d[2]*=0.01,t=j(d),t[3]=1):(f=e.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&(d=f.slice(1,4),d[1]*=0.01,d[2]*=0.01,t=j(d),t[3]=+f[4]);return t},v=function(e){var d,a,f,t,n,r;if(e.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return(4===e.length||7===e.length)&&(e=e.substr(1)),3===e.length&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),r=parseInt(e,16),t=r>>16,f=255&r>>8,a=255&r,[t,f,a,1];if(e.match(/^#?([A-Fa-f0-9]{8})$/))return 9===e.length&&(e=e.substr(1)),r=parseInt(e,16),t=255&r>>24,f=255&r>>16,a=255&r>>8,d=255&r,[t,f,a,d];if(n=_(e))return n;throw"unknown color: "+e},w=function(e,d,a){var f,t,n,r;return r=U(arguments),e=r[0],d=r[1],a=r[2],e/=360,e<1/3?(f=(1-d)/3,n=(1+d*x(c*e)/x(o-c*e))/3,t=1-(f+n)):e<2/3?(e-=1/3,n=(1-d)/3,t=(1+d*x(c*e)/x(o-c*e))/3,f=1-(n+t)):(e-=2/3,t=(1-d)/3,f=(1+d*x(c*e)/x(o-c*e))/3,n=1-(t+f)),n=R(3*(a*n)),t=R(3*(a*t)),f=R(3*(a*f)),[255*n,255*t,255*f]},j=function(){var e,d,a,f,t,n,i,r,l,o,s,c,b,h;if(b=U(arguments),f=b[0],r=b[1],n=b[2],0===r)i=a=e=255*n;else{for(s=[0,0,0],d=[0,0,0],o=0.5>n?n*(1+r):n+r-n*r,l=2*n-o,f/=360,s[0]=f+1/3,s[1]=f,s[2]=f-1/3,t=c=0;2>=c;t=++c)0>s[t]&&(s[t]+=1),16*s[t]?l+6*(o-l)*s[t]:1>2*s[t]?o:2>3*s[t]?l+6*((o-l)*(2/3-s[t])):l;h=[$(255*d[0]),$(255*d[1]),$(255*d[2])],i=h[0],a=h[1],e=h[2]}return[i,a,e]},k=function(){var e,d,a,f,l,i,o,c,r,s,t,b,h,g,u,p,m,y;return b=U(arguments),f=b[0],r=b[1],t=b[2],t*=255,0===r?c=a=e=t:(360===f&&(f=0),360f&&(f+=360),f/=60,l=n(f),d=f-l,i=t*(1-r),o=t*(1-r*d),s=t*(1-r*(1-d)),0===l?(h=[t,s,i],c=h[0],a=h[1],e=h[2]):1===l?(g=[o,t,i],c=g[0],a=g[1],e=g[2]):2===l?(u=[i,t,s],c=u[0],a=u[1],e=u[2]):3===l?(p=[i,o,t],c=p[0],a=p[1],e=p[2]):4===l?(m=[s,i,t],c=m[0],a=m[1],e=m[2]):5===l?(y=[t,i,o],c=y[0],a=y[1],e=y[2]):void 0),(c=$(c),a=$(a),e=$(e),[c,a,e])},l=18,s=0.95047,h=1,u=1.08883,z=function(){var e,d,a,t,n,r;return r=U(arguments),n=r[0],e=r[1],d=r[2],a=f(e*e+d*d),t=180*(Math.atan2(d,e)/Q),[n,a,t]},B=function(e,d,a){var f,t,n,r,i,l,o;return void 0!==e&&3===e.length&&(l=e,e=l[0],d=l[1],a=l[2]),void 0!==e&&3===e.length&&(o=e,e=o[0],d=o[1],a=o[2]),r=(e+16)/116,n=r+d/500,i=r-a/200,n=S(n)*s,r=S(r)*h,i=S(i)*u,t=M(3.2404542*n-1.5371385*r-0.4985314*i),f=M(-0.969266*n+1.8760108*r+0.041556*i),a=M(0.0556434*n-0.2040259*r+1.0572252*i),[R(t,0,255),R(f,0,255),R(a,0,255),1]},S=function(e){return 0.206893034=e?12.92*e:1.055*Z(e,1/2.4)-0.055))},G=function(){var e,d,a,f;return f=U(arguments),a=f[0],e=f[1],d=f[2],d=d*Q/180,[a,I(d)*e,Math.sin(d)*e]},P=function(e,d,f){var t,n,a,i,l,r,o;return r=G(e,d,f),t=r[0],n=r[1],a=r[2],o=B(t,n,a),l=o[0],i=o[1],a=o[2],[R(l,0,255),R(i,0,255),R(a,0,255)]},A=function(e,d,a){var f;return f=U(arguments),e=f[0],d=f[1],a=f[2],e=q(e),d=q(d),a=q(a),0.2126*e+0.7152*d+0.0722*a},q=function(e){return e/=255,0.03928>=e?e/12.92:Z((e+0.055)/1.055,2.4)},C=function(){var e,d,a,f,t,n;return n=U(arguments),a=n[0],d=n[1],e=n[2],t=a<<16|d<<8|e,f="000000"+t.toString(16),"#"+f.substr(f.length-6)},L=function(){var e,d,a,t,n,i,l,r,o;return o=U(arguments),l=o[0],a=o[1],d=o[2],e=2*Q,l/=255,a/=255,d/=255,i=F(l,a,d),n=(l+a+d)/3,r=1-i/n,0===r?t=0:(t=(l-a+(l-d))/2,t/=f((l-a)*(l-a)+(l-d)*(a-d)),t=Math.acos(t),d>a&&(t=e-t),t/=e),[360*t,r,n]},O=function(e,a,f){var t,n,r,i,l,o;return void 0!==e&&3<=e.length&&(o=e,e=o[0],a=o[1],f=o[2]),e/=255,a/=255,f/=255,i=F(e,a,f),r=d(e,a,f),n=(r+i)/2,r===i?(l=0,t=H):l=0.5>n?(r-i)/(r+i):(r-i)/(2-r-i),e===r?t=(a-f)/(r-i):a===r?t=2+(f-e)/(r-i):f===r&&(t=4+(e-a)/(r-i)),t*=60,0>t&&(t+=360),[t,l,n]},T=function(){var e,a,f,t,n,i,l,r,o,s;return s=U(arguments),l=s[0],f=s[1],e=s[2],i=F(l,f,e),n=d(l,f,e),a=n-i,o=n/255,0===n?(t=H,r=0):(r=a/n,l===n&&(t=(f-e)/a),f===n&&(t=2+(e-l)/a),e===n&&(t=4+(l-f)/a),t*=60,0>t&&(t+=360)),[t,r,o]},E=function(){var e,d,a,f,t,n,r;return r=U(arguments),a=r[0],d=r[1],e=r[2],a=N(a),d=N(d),e=N(e),f=K((0.4124564*a+0.3575761*d+0.1804375*e)/s),t=K((0.2126729*a+0.7151522*d+0.072175*e)/h),n=K((0.0193339*a+0.119192*d+0.9503041*e)/u),[116*t-16,500*(f-t),200*(t-n)]},N=function(e){return 0.04045>=(e/=255)?e/12.92:Z((e+0.055)/1.055,2.4)},K=function(e){return 0.008856=i;a=0<=i?++t:--t)f=e[a],"string"===D(f)&&(e[a]=y(f));if(null!=d)z=d;else for(z=[],a=n=0,l=e.length-1;0<=l?n<=l:n>=l;a=0<=l?++n:--n)z.push(a/(e.length-1))}return o(),g=e},c=function(e){return null==e&&(e=[]),m=e,_=e[0],x=e[e.length-1],o(),j=2===e.length?0:e.length-1},f=function(e){var d,a;if(null!=m){for(a=m.length-1,d=0;d=m[d];)d++;return d-1}return 0},b=function(e){return e},r=function(e){var d,a,t,r,n;return n=e,2=p;s=0<=p?++t:--t){if(c=z[s],u<=c){l=g[s];break}if(u>=c&&s===z.length-1){l=g[s];break}if(u>c&&uf,t=i(e,!0).lab()[0],r=d+(f-d)*e,n=t-r,s=0,c=1,l=20;0.01n?(s=e,e+=0.5*(c-e)):(c=e,e+=0.5*(s-e)),t=i(e,!0).lab()[0],n=t-r})();return e}:function(e){return e},l):u},l.colors=function(d){var a,f,t,n,r,i;if(null==d&&(d="hex"),e=[],f=[],2i;a=1<=i?++t:--t)f.push(0.5*(m[a-1]+m[a]));else f=m;for(n=0,r=f.length;nn.max&&(n.max=e),n.count+=1)},i=function(e,t){if(a(e,t))return null!=d&&"function"===D(d)?f(d(e)):null!=d&&"string"===D(d)||"number"===D(d)?f(e[d]):f(e)},"array"===D(e))for(l=0,o=e.length;l=K;b=1<=K?++q:--q)g.push(x+b/f*(u-x));g.push(u)}else if("l"===d.substr(0,1)){if(0>=x)throw"Logarithmic scales are only possible for values > 0";for(_=be*ce(x),m=be*ce(u),g.push(x),(b=C=1,$=f-1);1<=$?C<=$:C>=$;b=1<=$?++C:--C)g.push(Z(10,_+b/f*(m-_)));g.push(u)}else if("q"===d.substr(0,1)){for(g.push(x),b=L=1,J=f-1;1<=J?L<=J:L>=J;b=1<=J?++L:--L)z=A.length*b/f,p=n(z),p===z?g.push(A[p]):(B=z-p,g.push(A[p]*B+A[p+1]*(1-B)));g.push(u)}else if("k"===d.substr(0,1)){for(w=A.length,t=Array(w),s=Array(f),S=!0,j=0,l=null,l=[],l.push(x),(b=O=1,ee=f-1);1<=ee?O<=ee:O>=ee;b=1<=ee?++O:--O)l.push(x+b/f*(u-x));for(l.push(u);S;){for(i=T=0,de=f-1;0<=de?T<=de:T>=de;i=0<=de?++T:--T)s[i]=0;for(b=E=0,ae=w-1;0<=ae?E<=ae:E>=ae;b=0<=ae?++E:--E){for(R=A[b],v=V,(i=Y=0,fe=f-1);0<=fe?Y<=fe:Y>=fe;i=0<=fe?++Y:--Y)c=a(l[i]-R),c=te;i=0<=te?++N:--N)k[i]=null;for(b=X=0,ne=w-1;0<=ne?X<=ne:X>=ne;b=0<=ne?++X:--X)o=t[b],null===k[o]?k[o]=A[b]:k[o]+=A[b];for(i=U=0,M=f-1;0<=M?U<=M:U>=M;i=0<=M?++U:--U)k[i]*=1/s[i];for(S=!1,i=re=0,W=f-1;0<=W?re<=W:re>=W;i=0<=W?++re:--re)if(k[i]!==l[b]){S=!0;break}l=k,j++,200=F;i=0<=F?++ie:--ie)h[i]=[];for(b=le=0,I=w-1;0<=I?le<=I:le>=I;b=0<=I?++le:--le)o=t[b],h[o].push(A[b]);for(P=[],i=oe=0,Q=f-1;0<=Q?oe<=Q:oe>=Q;i=0<=Q?++oe:--oe)P.push(h[i][0]),P.push(h[i][h[i].length-1]);for(P=P.sort(function(e,d){return e-d}),g.push(P[0]),(b=se=1,H=P.length-1);se<=H;b=se+=2)isNaN(P[b])||g.push(P[b])}return g},y.brewer=g={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},y.colors=m={indigo:"#4b0082",gold:"#ffd700",hotpink:"#ff69b4",firebrick:"#b22222",indianred:"#cd5c5c",yellow:"#ffff00",mistyrose:"#ffe4e1",darkolivegreen:"#556b2f",olive:"#808000",darkseagreen:"#8fbc8f",pink:"#ffc0cb",tomato:"#ff6347",lightcoral:"#f08080",orangered:"#ff4500",navajowhite:"#ffdead",lime:"#00ff00",palegreen:"#98fb98",darkslategrey:"#2f4f4f",greenyellow:"#adff2f",burlywood:"#deb887",seashell:"#fff5ee",mediumspringgreen:"#00fa9a",fuchsia:"#ff00ff",papayawhip:"#ffefd5",blanchedalmond:"#ffebcd",chartreuse:"#7fff00",dimgray:"#696969",black:"#000000",peachpuff:"#ffdab9",springgreen:"#00ff7f",aquamarine:"#7fffd4",white:"#ffffff",orange:"#ffa500",lightsalmon:"#ffa07a",darkslategray:"#2f4f4f",brown:"#a52a2a",ivory:"#fffff0",dodgerblue:"#1e90ff",peru:"#cd853f",lawngreen:"#7cfc00",chocolate:"#d2691e",crimson:"#dc143c",forestgreen:"#228b22",darkgrey:"#a9a9a9",lightseagreen:"#20b2aa",cyan:"#00ffff",mintcream:"#f5fffa",silver:"#c0c0c0",antiquewhite:"#faebd7",mediumorchid:"#ba55d3",skyblue:"#87ceeb",gray:"#808080",darkturquoise:"#00ced1",goldenrod:"#daa520",darkgreen:"#006400",floralwhite:"#fffaf0",darkviolet:"#9400d3",darkgray:"#a9a9a9",moccasin:"#ffe4b5",saddlebrown:"#8b4513",grey:"#808080",darkslateblue:"#483d8b",lightskyblue:"#87cefa",lightpink:"#ffb6c1",mediumvioletred:"#c71585",slategrey:"#708090",red:"#ff0000",deeppink:"#ff1493",limegreen:"#32cd32",darkmagenta:"#8b008b",palegoldenrod:"#eee8aa",plum:"#dda0dd",turquoise:"#40e0d0",lightgrey:"#d3d3d3",lightgoldenrodyellow:"#fafad2",darkgoldenrod:"#b8860b",lavender:"#e6e6fa",maroon:"#800000",yellowgreen:"#9acd32",sandybrown:"#f4a460",thistle:"#d8bfd8",violet:"#ee82ee",navy:"#000080",magenta:"#ff00ff",dimgrey:"#696969",tan:"#d2b48c",rosybrown:"#bc8f8f",olivedrab:"#6b8e23",blue:"#0000ff",lightblue:"#add8e6",ghostwhite:"#f8f8ff",honeydew:"#f0fff0",cornflowerblue:"#6495ed",slateblue:"#6a5acd",linen:"#faf0e6",darkblue:"#00008b",powderblue:"#b0e0e6",seagreen:"#2e8b57",darkkhaki:"#bdb76b",snow:"#fffafa",sienna:"#a0522d",mediumblue:"#0000cd",royalblue:"#4169e1",lightcyan:"#e0ffff",green:"#008000",mediumpurple:"#9370db",midnightblue:"#191970",cornsilk:"#fff8dc",paleturquoise:"#afeeee",bisque:"#ffe4c4",slategray:"#708090",darkcyan:"#008b8b",khaki:"#f0e68c",wheat:"#f5deb3",teal:"#008080",darkorchid:"#9932cc",deepskyblue:"#00bfff",salmon:"#fa8072",darkred:"#8b0000",steelblue:"#4682b4",palevioletred:"#db7093",lightslategray:"#778899",aliceblue:"#f0f8ff",lightslategrey:"#778899",lightgreen:"#90ee90",orchid:"#da70d6",gainsboro:"#dcdcdc",mediumseagreen:"#3cb371",lightgray:"#d3d3d3",mediumturquoise:"#48d1cc",lemonchiffon:"#fffacd",cadetblue:"#5f9ea0",lightyellow:"#ffffe0",lavenderblush:"#fff0f5",coral:"#ff7f50",purple:"#800080",aqua:"#00ffff",whitesmoke:"#f5f5f5",mediumslateblue:"#7b68ee",darkorange:"#ff8c00",mediumaquamarine:"#66cdaa",darksalmon:"#e9967a",beige:"#f5f5dc",blueviolet:"#8a2be2",azure:"#f0ffff",lightsteelblue:"#b0c4de",oldlace:"#fdf5e6"},D=function(){var e,d,a,f,t;for(e={},t=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"],(a=0,f=t.length);aa&&(e=a),e},U=function(e){return 3<=e.length?e:e[0]},c=2*Q,o=Q/3,x=I,b=function(e){var d,a,f,t,n,r,l,o,i,s,c;return e=function(){var d,a,f;for(f=[],d=0,a=e.length;d=a;d=++a)f.push(n[d]+e*(r[d]-n[d]));return f}(),y.lab.apply(y,a)}):3===e.length?(s=function(){var d,a,f;for(f=[],d=0,a=e.length;d =a;d=++a)f.push((1-e)*(1-e)*n[d]+2*(1-e)*e*r[d]+e*e*l[d]);return f}(),y.lab.apply(y,a)}):4===e.length?(c=function(){var d,a,f;for(f=[],d=0,a=e.length;d =a;d=++a)f.push((1-e)*(1-e)*(1-e)*n[d]+3*(1-e)*(1-e)*e*r[d]+3*(1-e)*e*e*l[d]+e*e*e*o[d]);return f}(),y.lab.apply(y,a)}):5===e.length&&(a=b(e.slice(0,3)),f=b(e.slice(2,5)),d=function(e){return 0.5>e?a(2*e):f(2*(e-0.5))}),d},y.interpolate.bezier=b}).call(this)},{}],"/home/vagrant/dev/trianglify/node_modules/delaunator/index.js":[function(e,d){"use strict";function t(a,n,g){n||(n=m),g||(g=_);for(var u=Infinity,v=Infinity,w=-Infinity,j=-Infinity,z=this.coords=[],B=this.ids=new Uint32Array(a.length),S=0;S w&&(w=p),x>j&&(j=x)}var y,G,P,R=(u+w)/2,A=(v+j)/2,C=Infinity;for(S=0;Sl(z[2*y],z[2*y+1],z[2*G],z[2*G+1],z[2*P],z[2*P+1])){var T=G;G=P,P=T}var E=z[2*y],Y=z[2*y+1],N=z[2*G],X=z[2*G+1],D=z[2*P],U=z[2*P+1],K=s(E,Y,N,X,D,U);for(this._cx=K.x,this._cy=K.y,h(B,z,0,B.length-1,K.x,K.y),this._hashSize=Math.ceil(f(a.length)),this._hash=[],S=0;Sl(p,x,t.x,t.y,t.next.x,t.next.y);)J=this._addTriangle(t.i,S,t.next.i,t.prev.t,-1,t.t),t.prev.t=this._legalize(J+2),this.hull=b(t),t=t.next;if($)for(t=M.prev;0>l(p,x,t.prev.x,t.prev.y,t.x,t.y);)J=this._addTriangle(t.prev.i,S,t.i,-1,t.t,t.prev.t),this._legalize(J+2),t.prev.t=J,this.hull=b(t),t=t.prev;this._hashEdge(M),this._hashEdge(M.prev)}this.triangles=W.subarray(0,this.trianglesLen),this.halfedges=V.subarray(0,this.trianglesLen)}function r(e,d,a,f){var t=e-a,n=d-f;return t*t+n*n}function l(e,d,a,f,t,n){return(f-d)*(t-a)-(a-e)*(n-f)}function i(e,d,a,f,t,n,r,i){e-=r,d-=i,a-=r,f-=i,t-=r,n-=i;var l=e*e+d*d,o=a*a+f*f,s=t*t+n*n;return 0>e*(f*s-o*n)-d*(a*s-o*t)+l*(a*n-f*t)}function o(e,a,f,t,n,r){f-=e,t-=a,n-=e,r-=a;var i=f*f+t*t,l=n*n+r*r;if(0==i||0==l)return Infinity;var o=f*r-t*n;if(0==o)return Infinity;var d=0.5*(r*i-t*l)/o,s=0.5*(f*l-n*i)/o;return d*d+s*s}function s(e,a,f,t,n,r){f-=e,t-=a,n-=e,r-=a;var i=f*f+t*t,l=n*n+r*r,o=f*r-t*n,d=0.5*(r*i-t*l)/o,s=0.5*(f*l-n*i)/o;return{x:e+d,y:a+s}}function c(e,d,a){var f={i:d,x:e[2*d],y:e[2*d+1],t:0,prev:null,next:null,removed:!1};return a?(f.next=a.next,f.prev=a,a.next.prev=f,a.next=f):(f.prev=f,f.next=f),f}function b(e){return e.prev.next=e.next,e.next.prev=e.prev,e.removed=!0,e.prev}function h(e,d,a,f,t,n){var r,i,l;if(20>=f-a)for(r=a+1;r<=f;r++){for(l=e[r],i=r-1;i>=a&&0>1,r),0g(d,e[r],l,t,n));do i--;while(0=i-a?(h(e,d,r,f,t,n),h(e,d,a,i-1,t,n)):(h(e,d,a,i-1,t,n),h(e,d,r,f,t,n))}}function g(e,d,a,f,t){var n=r(e[2*d],e[2*d+1],f,t),i=r(e[2*a],e[2*a+1],f,t);return n-i||e[2*d]-e[2*a]||e[2*d+1]-e[2*a+1]}function u(e,d,a){var f=e[d];e[d]=e[a],e[a]=f}function m(e){return e[0]}function _(e){return e[1]}d.exports=t,t.prototype={_hashEdge:function(d){this._hash[this._hashKey(d.x,d.y)]=d},_hashKey:function(e,d){var f=e-this._cx,t=d-this._cy,r=1-f/(a(f)+a(t));return n((2+(0>t?-r:r))/4*this._hashSize)},_legalize:function(e){var d=this.triangles,a=this.coords,f=this.halfedges,t=f[e],n=e-e%3,r=t-t%3,l=n+(e+2)%3,o=r+(t+2)%3,s=d[l],c=d[e],b=d[n+(e+1)%3],h=d[o],g=i(a[2*s],a[2*s+1],a[2*c],a[2*c+1],a[2*b],a[2*b+1],a[2*h],a[2*h+1]);return g?(d[e]=h,d[t]=s,this._link(e,f[o]),this._link(t,f[l]),this._link(l,o),this._legalize(e),this._legalize(r+(t+1)%3)):l},_link:function(e,d){this.halfedges[e]=d,-1!==d&&(this.halfedges[d]=e)},_addTriangle:function(e,d,f,n,a,r){var i=this.trianglesLen;return this.triangles[i]=e,this.triangles[i+1]=d,this.triangles[i+2]=f,this._link(i,n),this._link(i+1,a),this._link(i+2,r),this.trianglesLen+=3,i}}},{}],"/home/vagrant/dev/trianglify/node_modules/process/browser.js":[function(e,d){function a(){if(!r){r=!0;for(var e,d=n.length;d;){e=n,n=[];for(var a=-1;++ad.s0&&(d.s0+=1),d.s1-=a(e),0>d.s1&&(d.s1+=1),d.s2-=a(e),0>d.s2&&(d.s2+=1),a=null}function t(e,d){return d.c=e.c,d.s0=e.s0,d.s1=e.s1,d.s2=e.s2,d}function n(e,d){var a=new f(e),n=d&&d.state,r=a.next;return r.int32=function(){return 0|4294967296*a.next()},r.double=function(){return r()+1.1102230246251565e-16*(0|2097152*r())},r.quick=r,n&&("object"==typeof n&&t(n,a),r.state=function(){return t(a,{})}),r}function r(){var e=4022871197;return function(d){d=d.toString();for(var a=0;a>>0,f-=e,f*=e,e=f>>>0,f-=e,e+=4294967296*f}return 2.3283064365386963e-10*(e>>>0)}}d&&d.exports?d.exports=n:a&&a.amd?a(function(){return n}):this.alea=n})(this,"object"==typeof a&&a,"function"==typeof e&&e)},{}],"/home/vagrant/dev/trianglify/node_modules/seedrandom/lib/tychei.js":[function(d,a){(function(e,d,a){function f(e){var f=this,d="";f.next=function(){var e=f.b,t=f.c,n=f.d,d=f.a;return e=e<<25^e>>>7^t,t=0|t-n,n=n<<24^n>>>8^d,d=0|d-e,f.b=e=e<<20^e>>>12^t,f.c=t=0|t-n,f.d=n<<16^t>>>16^d,f.a=0|d-e},f.a=0,f.b=0,f.c=-1640531527,f.d=1367130551,e===n(e)?(f.a=0|e/4294967296,f.b=0|e):d+=e;for(var a=0;a>>0)/4294967296};return r.double=function(){do var e=a.next()>>>11,d=(a.next()>>>0)/4294967296,f=(e+d)/2097152;while(0===f);return f},r.int32=a.next,r.quick=r,n&&("object"==typeof n&&t(n,a),r.state=function(){return t(a,{})}),r}d&&d.exports?d.exports=r:a&&a.amd?a(function(){return r}):this.tychei=r})(this,"object"==typeof a&&a,"function"==typeof e&&e)},{}],"/home/vagrant/dev/trianglify/node_modules/seedrandom/lib/xor128.js":[function(d,a){(function(e,d,a){function f(e){var d=this,a="";d.x=0,d.y=0,d.z=0,d.w=0,d.next=function(){var e=d.x^d.x<<11;return d.x=d.y,d.y=d.z,d.z=d.w,d.w^=d.w>>>19^e^e>>>8},e===(0|e)?d.x=e:a+=e;for(var f=0;f>>0)/4294967296};return r.double=function(){do var e=a.next()>>>11,d=(a.next()>>>0)/4294967296,f=(e+d)/2097152;while(0===f);return f},r.int32=a.next,r.quick=r,n&&("object"==typeof n&&t(n,a),r.state=function(){return t(a,{})}),r}d&&d.exports?d.exports=n:a&&a.amd?a(function(){return n}):this.xor128=n})(this,"object"==typeof a&&a,"function"==typeof e&&e)},{}],"/home/vagrant/dev/trianglify/node_modules/seedrandom/lib/xor4096.js":[function(a,f){(function(e,a,f){function t(e){var a=this;a.next=function(){var e,d,f=a.w,t=a.X,n=a.i;return a.w=f=0|f+1640531527,d=t[127&n+34],e=t[n=127&n+1],d^=d<<13,e^=e<<17,d^=d>>>15,e^=e>>>12,d=t[n]=d^e,a.i=n,0|d+(f^f>>>16)},function(e,a){var f,t,n,r,i,l=[],o=128;for(a===(0|a)?(t=a,a=null):(a+="\0",t=0,o=d(o,a.length)),n=0,r=-32;r>>15,t^=t<<4,t^=t>>>13,0<=r&&(i=0|i+1640531527,f=l[127&r]^=t+i,n=0==f?n+1:0);for(128<=n&&(l[127&(a&&a.length||0)]=-1),n=127,r=512;0>>15,f^=f>>>12,l[n]=t^f;e.w=i,e.X=l,e.i=n}(a,e)}function n(e,d){return d.i=e.i,d.w=e.w,d.X=e.X.slice(),d}function r(e,d){null==e&&(e=+new Date);var a=new t(e),f=d&&d.state,r=function(){return(a.next()>>>0)/4294967296};return r.double=function(){do var e=a.next()>>>11,d=(a.next()>>>0)/4294967296,f=(e+d)/2097152;while(0===f);return f},r.int32=a.next,r.quick=r,f&&(f.X&&n(f,a),r.state=function(){return n(a,{})}),r}a&&a.exports?a.exports=r:f&&f.amd?f(function(){return r}):this.xor4096=r})(this,"object"==typeof f&&f,"function"==typeof e&&e)},{}],"/home/vagrant/dev/trianglify/node_modules/seedrandom/lib/xorshift7.js":[function(d,a){(function(e,d,a){function f(e){var d=this;d.next=function(){var e,a,f=d.x,t=d.i;return e=f[t],e^=e>>>7,a=e^e<<24,e=f[7&t+1],a^=e^e>>>10,e=f[7&t+3],a^=e^e>>>3,e=f[7&t+4],a^=e^e<<7,e=f[7&t+7],e^=e<<13,a^=e^e<<9,f[t]=a,d.i=7&t+1,a},function(e,d){var a,f,t=[];if(d===(0|d))f=t[0]=d;else for(d=""+d,a=0;at.length;)t.push(0);for(a=0;8>a&&0===t[a];++a);for(f=8==a?t[7]=-1:t[a],e.x=t,e.i=0,a=256;0>>0)/4294967296};return r.double=function(){do var e=a.next()>>>11,d=(a.next()>>>0)/4294967296,f=(e+d)/2097152;while(0===f);return f},r.int32=a.next,r.quick=r,n&&(n.x&&t(n,a),r.state=function(){return t(a,{})}),r}d&&d.exports?d.exports=n:a&&a.amd?a(function(){return n}):this.xorshift7=n})(this,"object"==typeof a&&a,"function"==typeof e&&e)},{}],"/home/vagrant/dev/trianglify/node_modules/seedrandom/lib/xorwow.js":[function(d,a){(function(e,d,a){function f(e){var d=this,a="";d.next=function(){var e=d.x^d.x>>>2;return d.x=d.y,d.y=d.z,d.z=d.w,d.w=d.v,0|(d.d=0|d.d+362437)+(d.v=d.v^d.v<<4^(e^e<<1))},d.x=0,d.y=0,d.z=0,d.w=0,d.v=0,e===(0|e)?d.x=e:a+=e;for(var f=0;f >>4),d.next()}function t(e,d){return d.x=e.x,d.y=e.y,d.z=e.z,d.w=e.w,d.v=e.v,d.d=e.d,d}function n(e,d){var a=new f(e),n=d&&d.state,r=function(){return(a.next()>>>0)/4294967296};return r.double=function(){do var e=a.next()>>>11,d=(a.next()>>>0)/4294967296,f=(e+d)/2097152;while(0===f);return f},r.int32=a.next,r.quick=r,n&&("object"==typeof n&&t(n,a),r.state=function(){return t(a,{})}),r}d&&d.exports?d.exports=n:a&&a.amd?a(function(){return n}):this.xorwow=n})(this,"object"==typeof a&&a,"function"==typeof e&&e)},{}],"/home/vagrant/dev/trianglify/node_modules/seedrandom/seedrandom.js":[function(d,a){(function(f,t){function n(e,d,a){var n=[];d=!0==d?{entropy:!0}:d||{};var b=o(l(d.entropy?[e,c(f)]:null==e?s():e,3),n),h=new r(n),x=function(){for(var e=h.g(u),a=m,d=0;e=_;)e/=2,a/=2,d>>>=1;return(e+d)/a};return x.int32=function(){return 0|h.g(4)},x.quick=function(){return h.g(4)/4294967296},x.double=x,o(c(h.S),f),(d.pass||a||function(e,d,a,f){return f&&(f.S&&i(f,h),e.state=function(){return i(h,{})}),a?(t[p]=e,d):e})(x,b,"global"in d?d.global:this==t,d.state)}function r(e){var d,a=e.length,f=this,t=0,n=f.i=f.j=0,r=f.S=[];for(a||(e=[a++]);t axis.oldScroll
+ var direction = isForward ? axis.forward : axis.backward
+
+ for (var waypointKey in this.waypoints[axisKey]) {
+ var waypoint = this.waypoints[axisKey][waypointKey]
+ var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint
+ var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint
+ var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint
+ var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint
+ if (crossedForward || crossedBackward) {
+ waypoint.queueTrigger(direction)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ }
+ }
+
+ for (var groupKey in triggeredGroups) {
+ triggeredGroups[groupKey].flushTriggers()
+ }
+
+ this.oldScroll = {
+ x: axes.horizontal.newScroll,
+ y: axes.vertical.newScroll
+ }
+ }
+
+ /* Private */
+ Context.prototype.innerHeight = function() {
+ /*eslint-disable eqeqeq */
+ if (this.element == this.element.window) {
+ return Waypoint.viewportHeight()
+ }
+ /*eslint-enable eqeqeq */
+ return this.adapter.innerHeight()
+ }
+
+ /* Private */
+ Context.prototype.remove = function(waypoint) {
+ delete this.waypoints[waypoint.axis][waypoint.key]
+ this.checkEmpty()
+ }
+
+ /* Private */
+ Context.prototype.innerWidth = function() {
+ /*eslint-disable eqeqeq */
+ if (this.element == this.element.window) {
+ return Waypoint.viewportWidth()
+ }
+ /*eslint-enable eqeqeq */
+ return this.adapter.innerWidth()
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/context-destroy */
+ Context.prototype.destroy = function() {
+ var allWaypoints = []
+ for (var axis in this.waypoints) {
+ for (var waypointKey in this.waypoints[axis]) {
+ allWaypoints.push(this.waypoints[axis][waypointKey])
+ }
+ }
+ for (var i = 0, end = allWaypoints.length; i < end; i++) {
+ allWaypoints[i].destroy()
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/context-refresh */
+ Context.prototype.refresh = function() {
+ /*eslint-disable eqeqeq */
+ var isWindow = this.element == this.element.window
+ /*eslint-enable eqeqeq */
+ var contextOffset = isWindow ? undefined : this.adapter.offset()
+ var triggeredGroups = {}
+ var axes
+
+ this.handleScroll()
+ axes = {
+ horizontal: {
+ contextOffset: isWindow ? 0 : contextOffset.left,
+ contextScroll: isWindow ? 0 : this.oldScroll.x,
+ contextDimension: this.innerWidth(),
+ oldScroll: this.oldScroll.x,
+ forward: 'right',
+ backward: 'left',
+ offsetProp: 'left'
+ },
+ vertical: {
+ contextOffset: isWindow ? 0 : contextOffset.top,
+ contextScroll: isWindow ? 0 : this.oldScroll.y,
+ contextDimension: this.innerHeight(),
+ oldScroll: this.oldScroll.y,
+ forward: 'down',
+ backward: 'up',
+ offsetProp: 'top'
+ }
+ }
+
+ for (var axisKey in axes) {
+ var axis = axes[axisKey]
+ for (var waypointKey in this.waypoints[axisKey]) {
+ var waypoint = this.waypoints[axisKey][waypointKey]
+ var adjustment = waypoint.options.offset
+ var oldTriggerPoint = waypoint.triggerPoint
+ var elementOffset = 0
+ var freshWaypoint = oldTriggerPoint == null
+ var contextModifier, wasBeforeScroll, nowAfterScroll
+ var triggeredBackward, triggeredForward
+
+ if (waypoint.element !== waypoint.element.window) {
+ elementOffset = waypoint.adapter.offset()[axis.offsetProp]
+ }
+
+ if (typeof adjustment === 'function') {
+ adjustment = adjustment.apply(waypoint)
+ }
+ else if (typeof adjustment === 'string') {
+ adjustment = parseFloat(adjustment)
+ if (waypoint.options.offset.indexOf('%') > - 1) {
+ adjustment = Math.ceil(axis.contextDimension * adjustment / 100)
+ }
+ }
+
+ contextModifier = axis.contextScroll - axis.contextOffset
+ waypoint.triggerPoint = elementOffset + contextModifier - adjustment
+ wasBeforeScroll = oldTriggerPoint < axis.oldScroll
+ nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll
+ triggeredBackward = wasBeforeScroll && nowAfterScroll
+ triggeredForward = !wasBeforeScroll && !nowAfterScroll
+
+ if (!freshWaypoint && triggeredBackward) {
+ waypoint.queueTrigger(axis.backward)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ else if (!freshWaypoint && triggeredForward) {
+ waypoint.queueTrigger(axis.forward)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) {
+ waypoint.queueTrigger(axis.forward)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ }
+ }
+
+ Waypoint.requestAnimationFrame(function() {
+ for (var groupKey in triggeredGroups) {
+ triggeredGroups[groupKey].flushTriggers()
+ }
+ })
+
+ return this
+ }
+
+ /* Private */
+ Context.findOrCreateByElement = function(element) {
+ return Context.findByElement(element) || new Context(element)
+ }
+
+ /* Private */
+ Context.refreshAll = function() {
+ for (var contextId in contexts) {
+ contexts[contextId].refresh()
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/context-find-by-element */
+ Context.findByElement = function(element) {
+ return contexts[element.waypointContextKey]
+ }
+
+ window.onload = function() {
+ if (oldWindowLoad) {
+ oldWindowLoad()
+ }
+ Context.refreshAll()
+ }
+
+ Waypoint.requestAnimationFrame = function(callback) {
+ var requestFn = window.requestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ window.webkitRequestAnimationFrame ||
+ requestAnimationFrameShim
+ requestFn.call(window, callback)
+ }
+ Waypoint.Context = Context
+}())
+;(function() {
+ 'use strict'
+
+ function byTriggerPoint(a, b) {
+ return a.triggerPoint - b.triggerPoint
+ }
+
+ function byReverseTriggerPoint(a, b) {
+ return b.triggerPoint - a.triggerPoint
+ }
+
+ var groups = {
+ vertical: {},
+ horizontal: {}
+ }
+ var Waypoint = window.Waypoint
+
+ /* http://imakewebthings.com/waypoints/api/group */
+ function Group(options) {
+ this.name = options.name
+ this.axis = options.axis
+ this.id = this.name + '-' + this.axis
+ this.waypoints = []
+ this.clearTriggerQueues()
+ groups[this.axis][this.name] = this
+ }
+
+ /* Private */
+ Group.prototype.add = function(waypoint) {
+ this.waypoints.push(waypoint)
+ }
+
+ /* Private */
+ Group.prototype.clearTriggerQueues = function() {
+ this.triggerQueues = {
+ up: [],
+ down: [],
+ left: [],
+ right: []
+ }
+ }
+
+ /* Private */
+ Group.prototype.flushTriggers = function() {
+ for (var direction in this.triggerQueues) {
+ var waypoints = this.triggerQueues[direction]
+ var reverse = direction === 'up' || direction === 'left'
+ waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint)
+ for (var i = 0, end = waypoints.length; i < end; i += 1) {
+ var waypoint = waypoints[i]
+ if (waypoint.options.continuous || i === waypoints.length - 1) {
+ waypoint.trigger([direction])
+ }
+ }
+ }
+ this.clearTriggerQueues()
+ }
+
+ /* Private */
+ Group.prototype.next = function(waypoint) {
+ this.waypoints.sort(byTriggerPoint)
+ var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
+ var isLast = index === this.waypoints.length - 1
+ return isLast ? null : this.waypoints[index + 1]
+ }
+
+ /* Private */
+ Group.prototype.previous = function(waypoint) {
+ this.waypoints.sort(byTriggerPoint)
+ var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
+ return index ? this.waypoints[index - 1] : null
+ }
+
+ /* Private */
+ Group.prototype.queueTrigger = function(waypoint, direction) {
+ this.triggerQueues[direction].push(waypoint)
+ }
+
+ /* Private */
+ Group.prototype.remove = function(waypoint) {
+ var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
+ if (index > -1) {
+ this.waypoints.splice(index, 1)
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/first */
+ Group.prototype.first = function() {
+ return this.waypoints[0]
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/last */
+ Group.prototype.last = function() {
+ return this.waypoints[this.waypoints.length - 1]
+ }
+
+ /* Private */
+ Group.findOrCreate = function(options) {
+ return groups[options.axis][options.name] || new Group(options)
+ }
+
+ Waypoint.Group = Group
+}())
+;(function() {
+ 'use strict'
+
+ var $ = window.jQuery
+ var Waypoint = window.Waypoint
+
+ function JQueryAdapter(element) {
+ this.$element = $(element)
+ }
+
+ $.each([
+ 'innerHeight',
+ 'innerWidth',
+ 'off',
+ 'offset',
+ 'on',
+ 'outerHeight',
+ 'outerWidth',
+ 'scrollLeft',
+ 'scrollTop'
+ ], function(i, method) {
+ JQueryAdapter.prototype[method] = function() {
+ var args = Array.prototype.slice.call(arguments)
+ return this.$element[method].apply(this.$element, args)
+ }
+ })
+
+ $.each([
+ 'extend',
+ 'inArray',
+ 'isEmptyObject'
+ ], function(i, method) {
+ JQueryAdapter[method] = $[method]
+ })
+
+ Waypoint.adapters.push({
+ name: 'jquery',
+ Adapter: JQueryAdapter
+ })
+ Waypoint.Adapter = JQueryAdapter
+}())
+;(function() {
+ 'use strict'
+
+ var Waypoint = window.Waypoint
+
+ function createExtension(framework) {
+ return function() {
+ var waypoints = []
+ var overrides = arguments[0]
+
+ if (framework.isFunction(arguments[0])) {
+ overrides = framework.extend({}, arguments[1])
+ overrides.handler = arguments[0]
+ }
+
+ this.each(function() {
+ var options = framework.extend({}, overrides, {
+ element: this
+ })
+ if (typeof options.context === 'string') {
+ options.context = framework(this).closest(options.context)[0]
+ }
+ waypoints.push(new Waypoint(options))
+ })
+
+ return waypoints
+ }
+ }
+
+ if (window.jQuery) {
+ window.jQuery.fn.waypoint = createExtension(window.jQuery)
+ }
+ if (window.Zepto) {
+ window.Zepto.fn.waypoint = createExtension(window.Zepto)
+ }
+}())
+;
\ No newline at end of file
diff --git a/vendor/assets/javascripts/waypoints/noframework.waypoints.js b/vendor/assets/javascripts/waypoints/noframework.waypoints.js
new file mode 100644
index 000000000..2de1c3c51
--- /dev/null
+++ b/vendor/assets/javascripts/waypoints/noframework.waypoints.js
@@ -0,0 +1,745 @@
+/*!
+Waypoints - 4.0.0
+Copyright © 2011-2015 Caleb Troughton
+Licensed under the MIT license.
+https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
+*/
+(function() {
+ 'use strict'
+
+ var keyCounter = 0
+ var allWaypoints = {}
+
+ /* http://imakewebthings.com/waypoints/api/waypoint */
+ function Waypoint(options) {
+ if (!options) {
+ throw new Error('No options passed to Waypoint constructor')
+ }
+ if (!options.element) {
+ throw new Error('No element option passed to Waypoint constructor')
+ }
+ if (!options.handler) {
+ throw new Error('No handler option passed to Waypoint constructor')
+ }
+
+ this.key = 'waypoint-' + keyCounter
+ this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options)
+ this.element = this.options.element
+ this.adapter = new Waypoint.Adapter(this.element)
+ this.callback = options.handler
+ this.axis = this.options.horizontal ? 'horizontal' : 'vertical'
+ this.enabled = this.options.enabled
+ this.triggerPoint = null
+ this.group = Waypoint.Group.findOrCreate({
+ name: this.options.group,
+ axis: this.axis
+ })
+ this.context = Waypoint.Context.findOrCreateByElement(this.options.context)
+
+ if (Waypoint.offsetAliases[this.options.offset]) {
+ this.options.offset = Waypoint.offsetAliases[this.options.offset]
+ }
+ this.group.add(this)
+ this.context.add(this)
+ allWaypoints[this.key] = this
+ keyCounter += 1
+ }
+
+ /* Private */
+ Waypoint.prototype.queueTrigger = function(direction) {
+ this.group.queueTrigger(this, direction)
+ }
+
+ /* Private */
+ Waypoint.prototype.trigger = function(args) {
+ if (!this.enabled) {
+ return
+ }
+ if (this.callback) {
+ this.callback.apply(this, args)
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/destroy */
+ Waypoint.prototype.destroy = function() {
+ this.context.remove(this)
+ this.group.remove(this)
+ delete allWaypoints[this.key]
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/disable */
+ Waypoint.prototype.disable = function() {
+ this.enabled = false
+ return this
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/enable */
+ Waypoint.prototype.enable = function() {
+ this.context.refresh()
+ this.enabled = true
+ return this
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/next */
+ Waypoint.prototype.next = function() {
+ return this.group.next(this)
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/previous */
+ Waypoint.prototype.previous = function() {
+ return this.group.previous(this)
+ }
+
+ /* Private */
+ Waypoint.invokeAll = function(method) {
+ var allWaypointsArray = []
+ for (var waypointKey in allWaypoints) {
+ allWaypointsArray.push(allWaypoints[waypointKey])
+ }
+ for (var i = 0, end = allWaypointsArray.length; i < end; i++) {
+ allWaypointsArray[i][method]()
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/destroy-all */
+ Waypoint.destroyAll = function() {
+ Waypoint.invokeAll('destroy')
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/disable-all */
+ Waypoint.disableAll = function() {
+ Waypoint.invokeAll('disable')
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/enable-all */
+ Waypoint.enableAll = function() {
+ Waypoint.invokeAll('enable')
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/refresh-all */
+ Waypoint.refreshAll = function() {
+ Waypoint.Context.refreshAll()
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/viewport-height */
+ Waypoint.viewportHeight = function() {
+ return window.innerHeight || document.documentElement.clientHeight
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/viewport-width */
+ Waypoint.viewportWidth = function() {
+ return document.documentElement.clientWidth
+ }
+
+ Waypoint.adapters = []
+
+ Waypoint.defaults = {
+ context: window,
+ continuous: true,
+ enabled: true,
+ group: 'default',
+ horizontal: false,
+ offset: 0
+ }
+
+ Waypoint.offsetAliases = {
+ 'bottom-in-view': function() {
+ return this.context.innerHeight() - this.adapter.outerHeight()
+ },
+ 'right-in-view': function() {
+ return this.context.innerWidth() - this.adapter.outerWidth()
+ }
+ }
+
+ window.Waypoint = Waypoint
+}())
+;(function() {
+ 'use strict'
+
+ function requestAnimationFrameShim(callback) {
+ window.setTimeout(callback, 1000 / 60)
+ }
+
+ var keyCounter = 0
+ var contexts = {}
+ var Waypoint = window.Waypoint
+ var oldWindowLoad = window.onload
+
+ /* http://imakewebthings.com/waypoints/api/context */
+ function Context(element) {
+ this.element = element
+ this.Adapter = Waypoint.Adapter
+ this.adapter = new this.Adapter(element)
+ this.key = 'waypoint-context-' + keyCounter
+ this.didScroll = false
+ this.didResize = false
+ this.oldScroll = {
+ x: this.adapter.scrollLeft(),
+ y: this.adapter.scrollTop()
+ }
+ this.waypoints = {
+ vertical: {},
+ horizontal: {}
+ }
+
+ element.waypointContextKey = this.key
+ contexts[element.waypointContextKey] = this
+ keyCounter += 1
+
+ this.createThrottledScrollHandler()
+ this.createThrottledResizeHandler()
+ }
+
+ /* Private */
+ Context.prototype.add = function(waypoint) {
+ var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical'
+ this.waypoints[axis][waypoint.key] = waypoint
+ this.refresh()
+ }
+
+ /* Private */
+ Context.prototype.checkEmpty = function() {
+ var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal)
+ var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical)
+ if (horizontalEmpty && verticalEmpty) {
+ this.adapter.off('.waypoints')
+ delete contexts[this.key]
+ }
+ }
+
+ /* Private */
+ Context.prototype.createThrottledResizeHandler = function() {
+ var self = this
+
+ function resizeHandler() {
+ self.handleResize()
+ self.didResize = false
+ }
+
+ this.adapter.on('resize.waypoints', function() {
+ if (!self.didResize) {
+ self.didResize = true
+ Waypoint.requestAnimationFrame(resizeHandler)
+ }
+ })
+ }
+
+ /* Private */
+ Context.prototype.createThrottledScrollHandler = function() {
+ var self = this
+ function scrollHandler() {
+ self.handleScroll()
+ self.didScroll = false
+ }
+
+ this.adapter.on('scroll.waypoints', function() {
+ if (!self.didScroll || Waypoint.isTouch) {
+ self.didScroll = true
+ Waypoint.requestAnimationFrame(scrollHandler)
+ }
+ })
+ }
+
+ /* Private */
+ Context.prototype.handleResize = function() {
+ Waypoint.Context.refreshAll()
+ }
+
+ /* Private */
+ Context.prototype.handleScroll = function() {
+ var triggeredGroups = {}
+ var axes = {
+ horizontal: {
+ newScroll: this.adapter.scrollLeft(),
+ oldScroll: this.oldScroll.x,
+ forward: 'right',
+ backward: 'left'
+ },
+ vertical: {
+ newScroll: this.adapter.scrollTop(),
+ oldScroll: this.oldScroll.y,
+ forward: 'down',
+ backward: 'up'
+ }
+ }
+
+ for (var axisKey in axes) {
+ var axis = axes[axisKey]
+ var isForward = axis.newScroll > axis.oldScroll
+ var direction = isForward ? axis.forward : axis.backward
+
+ for (var waypointKey in this.waypoints[axisKey]) {
+ var waypoint = this.waypoints[axisKey][waypointKey]
+ var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint
+ var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint
+ var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint
+ var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint
+ if (crossedForward || crossedBackward) {
+ waypoint.queueTrigger(direction)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ }
+ }
+
+ for (var groupKey in triggeredGroups) {
+ triggeredGroups[groupKey].flushTriggers()
+ }
+
+ this.oldScroll = {
+ x: axes.horizontal.newScroll,
+ y: axes.vertical.newScroll
+ }
+ }
+
+ /* Private */
+ Context.prototype.innerHeight = function() {
+ /*eslint-disable eqeqeq */
+ if (this.element == this.element.window) {
+ return Waypoint.viewportHeight()
+ }
+ /*eslint-enable eqeqeq */
+ return this.adapter.innerHeight()
+ }
+
+ /* Private */
+ Context.prototype.remove = function(waypoint) {
+ delete this.waypoints[waypoint.axis][waypoint.key]
+ this.checkEmpty()
+ }
+
+ /* Private */
+ Context.prototype.innerWidth = function() {
+ /*eslint-disable eqeqeq */
+ if (this.element == this.element.window) {
+ return Waypoint.viewportWidth()
+ }
+ /*eslint-enable eqeqeq */
+ return this.adapter.innerWidth()
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/context-destroy */
+ Context.prototype.destroy = function() {
+ var allWaypoints = []
+ for (var axis in this.waypoints) {
+ for (var waypointKey in this.waypoints[axis]) {
+ allWaypoints.push(this.waypoints[axis][waypointKey])
+ }
+ }
+ for (var i = 0, end = allWaypoints.length; i < end; i++) {
+ allWaypoints[i].destroy()
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/context-refresh */
+ Context.prototype.refresh = function() {
+ /*eslint-disable eqeqeq */
+ var isWindow = this.element == this.element.window
+ /*eslint-enable eqeqeq */
+ var contextOffset = isWindow ? undefined : this.adapter.offset()
+ var triggeredGroups = {}
+ var axes
+
+ this.handleScroll()
+ axes = {
+ horizontal: {
+ contextOffset: isWindow ? 0 : contextOffset.left,
+ contextScroll: isWindow ? 0 : this.oldScroll.x,
+ contextDimension: this.innerWidth(),
+ oldScroll: this.oldScroll.x,
+ forward: 'right',
+ backward: 'left',
+ offsetProp: 'left'
+ },
+ vertical: {
+ contextOffset: isWindow ? 0 : contextOffset.top,
+ contextScroll: isWindow ? 0 : this.oldScroll.y,
+ contextDimension: this.innerHeight(),
+ oldScroll: this.oldScroll.y,
+ forward: 'down',
+ backward: 'up',
+ offsetProp: 'top'
+ }
+ }
+
+ for (var axisKey in axes) {
+ var axis = axes[axisKey]
+ for (var waypointKey in this.waypoints[axisKey]) {
+ var waypoint = this.waypoints[axisKey][waypointKey]
+ var adjustment = waypoint.options.offset
+ var oldTriggerPoint = waypoint.triggerPoint
+ var elementOffset = 0
+ var freshWaypoint = oldTriggerPoint == null
+ var contextModifier, wasBeforeScroll, nowAfterScroll
+ var triggeredBackward, triggeredForward
+
+ if (waypoint.element !== waypoint.element.window) {
+ elementOffset = waypoint.adapter.offset()[axis.offsetProp]
+ }
+
+ if (typeof adjustment === 'function') {
+ adjustment = adjustment.apply(waypoint)
+ }
+ else if (typeof adjustment === 'string') {
+ adjustment = parseFloat(adjustment)
+ if (waypoint.options.offset.indexOf('%') > - 1) {
+ adjustment = Math.ceil(axis.contextDimension * adjustment / 100)
+ }
+ }
+
+ contextModifier = axis.contextScroll - axis.contextOffset
+ waypoint.triggerPoint = elementOffset + contextModifier - adjustment
+ wasBeforeScroll = oldTriggerPoint < axis.oldScroll
+ nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll
+ triggeredBackward = wasBeforeScroll && nowAfterScroll
+ triggeredForward = !wasBeforeScroll && !nowAfterScroll
+
+ if (!freshWaypoint && triggeredBackward) {
+ waypoint.queueTrigger(axis.backward)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ else if (!freshWaypoint && triggeredForward) {
+ waypoint.queueTrigger(axis.forward)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) {
+ waypoint.queueTrigger(axis.forward)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ }
+ }
+
+ Waypoint.requestAnimationFrame(function() {
+ for (var groupKey in triggeredGroups) {
+ triggeredGroups[groupKey].flushTriggers()
+ }
+ })
+
+ return this
+ }
+
+ /* Private */
+ Context.findOrCreateByElement = function(element) {
+ return Context.findByElement(element) || new Context(element)
+ }
+
+ /* Private */
+ Context.refreshAll = function() {
+ for (var contextId in contexts) {
+ contexts[contextId].refresh()
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/context-find-by-element */
+ Context.findByElement = function(element) {
+ return contexts[element.waypointContextKey]
+ }
+
+ window.onload = function() {
+ if (oldWindowLoad) {
+ oldWindowLoad()
+ }
+ Context.refreshAll()
+ }
+
+ Waypoint.requestAnimationFrame = function(callback) {
+ var requestFn = window.requestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ window.webkitRequestAnimationFrame ||
+ requestAnimationFrameShim
+ requestFn.call(window, callback)
+ }
+ Waypoint.Context = Context
+}())
+;(function() {
+ 'use strict'
+
+ function byTriggerPoint(a, b) {
+ return a.triggerPoint - b.triggerPoint
+ }
+
+ function byReverseTriggerPoint(a, b) {
+ return b.triggerPoint - a.triggerPoint
+ }
+
+ var groups = {
+ vertical: {},
+ horizontal: {}
+ }
+ var Waypoint = window.Waypoint
+
+ /* http://imakewebthings.com/waypoints/api/group */
+ function Group(options) {
+ this.name = options.name
+ this.axis = options.axis
+ this.id = this.name + '-' + this.axis
+ this.waypoints = []
+ this.clearTriggerQueues()
+ groups[this.axis][this.name] = this
+ }
+
+ /* Private */
+ Group.prototype.add = function(waypoint) {
+ this.waypoints.push(waypoint)
+ }
+
+ /* Private */
+ Group.prototype.clearTriggerQueues = function() {
+ this.triggerQueues = {
+ up: [],
+ down: [],
+ left: [],
+ right: []
+ }
+ }
+
+ /* Private */
+ Group.prototype.flushTriggers = function() {
+ for (var direction in this.triggerQueues) {
+ var waypoints = this.triggerQueues[direction]
+ var reverse = direction === 'up' || direction === 'left'
+ waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint)
+ for (var i = 0, end = waypoints.length; i < end; i += 1) {
+ var waypoint = waypoints[i]
+ if (waypoint.options.continuous || i === waypoints.length - 1) {
+ waypoint.trigger([direction])
+ }
+ }
+ }
+ this.clearTriggerQueues()
+ }
+
+ /* Private */
+ Group.prototype.next = function(waypoint) {
+ this.waypoints.sort(byTriggerPoint)
+ var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
+ var isLast = index === this.waypoints.length - 1
+ return isLast ? null : this.waypoints[index + 1]
+ }
+
+ /* Private */
+ Group.prototype.previous = function(waypoint) {
+ this.waypoints.sort(byTriggerPoint)
+ var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
+ return index ? this.waypoints[index - 1] : null
+ }
+
+ /* Private */
+ Group.prototype.queueTrigger = function(waypoint, direction) {
+ this.triggerQueues[direction].push(waypoint)
+ }
+
+ /* Private */
+ Group.prototype.remove = function(waypoint) {
+ var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
+ if (index > -1) {
+ this.waypoints.splice(index, 1)
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/first */
+ Group.prototype.first = function() {
+ return this.waypoints[0]
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/last */
+ Group.prototype.last = function() {
+ return this.waypoints[this.waypoints.length - 1]
+ }
+
+ /* Private */
+ Group.findOrCreate = function(options) {
+ return groups[options.axis][options.name] || new Group(options)
+ }
+
+ Waypoint.Group = Group
+}())
+;(function() {
+ 'use strict'
+
+ var Waypoint = window.Waypoint
+
+ function isWindow(element) {
+ return element === element.window
+ }
+
+ function getWindow(element) {
+ if (isWindow(element)) {
+ return element
+ }
+ return element.defaultView
+ }
+
+ function NoFrameworkAdapter(element) {
+ this.element = element
+ this.handlers = {}
+ }
+
+ NoFrameworkAdapter.prototype.innerHeight = function() {
+ var isWin = isWindow(this.element)
+ return isWin ? this.element.innerHeight : this.element.clientHeight
+ }
+
+ NoFrameworkAdapter.prototype.innerWidth = function() {
+ var isWin = isWindow(this.element)
+ return isWin ? this.element.innerWidth : this.element.clientWidth
+ }
+
+ NoFrameworkAdapter.prototype.off = function(event, handler) {
+ function removeListeners(element, listeners, handler) {
+ for (var i = 0, end = listeners.length - 1; i < end; i++) {
+ var listener = listeners[i]
+ if (!handler || handler === listener) {
+ element.removeEventListener(listener)
+ }
+ }
+ }
+
+ var eventParts = event.split('.')
+ var eventType = eventParts[0]
+ var namespace = eventParts[1]
+ var element = this.element
+
+ if (namespace && this.handlers[namespace] && eventType) {
+ removeListeners(element, this.handlers[namespace][eventType], handler)
+ this.handlers[namespace][eventType] = []
+ }
+ else if (eventType) {
+ for (var ns in this.handlers) {
+ removeListeners(element, this.handlers[ns][eventType] || [], handler)
+ this.handlers[ns][eventType] = []
+ }
+ }
+ else if (namespace && this.handlers[namespace]) {
+ for (var type in this.handlers[namespace]) {
+ removeListeners(element, this.handlers[namespace][type], handler)
+ }
+ this.handlers[namespace] = {}
+ }
+ }
+
+ /* Adapted from jQuery 1.x offset() */
+ NoFrameworkAdapter.prototype.offset = function() {
+ if (!this.element.ownerDocument) {
+ return null
+ }
+
+ var documentElement = this.element.ownerDocument.documentElement
+ var win = getWindow(this.element.ownerDocument)
+ var rect = {
+ top: 0,
+ left: 0
+ }
+
+ if (this.element.getBoundingClientRect) {
+ rect = this.element.getBoundingClientRect()
+ }
+
+ return {
+ top: rect.top + win.pageYOffset - documentElement.clientTop,
+ left: rect.left + win.pageXOffset - documentElement.clientLeft
+ }
+ }
+
+ NoFrameworkAdapter.prototype.on = function(event, handler) {
+ var eventParts = event.split('.')
+ var eventType = eventParts[0]
+ var namespace = eventParts[1] || '__default'
+ var nsHandlers = this.handlers[namespace] = this.handlers[namespace] || {}
+ var nsTypeList = nsHandlers[eventType] = nsHandlers[eventType] || []
+
+ nsTypeList.push(handler)
+ this.element.addEventListener(eventType, handler)
+ }
+
+ NoFrameworkAdapter.prototype.outerHeight = function(includeMargin) {
+ var height = this.innerHeight()
+ var computedStyle
+
+ if (includeMargin && !isWindow(this.element)) {
+ computedStyle = window.getComputedStyle(this.element)
+ height += parseInt(computedStyle.marginTop, 10)
+ height += parseInt(computedStyle.marginBottom, 10)
+ }
+
+ return height
+ }
+
+ NoFrameworkAdapter.prototype.outerWidth = function(includeMargin) {
+ var width = this.innerWidth()
+ var computedStyle
+
+ if (includeMargin && !isWindow(this.element)) {
+ computedStyle = window.getComputedStyle(this.element)
+ width += parseInt(computedStyle.marginLeft, 10)
+ width += parseInt(computedStyle.marginRight, 10)
+ }
+
+ return width
+ }
+
+ NoFrameworkAdapter.prototype.scrollLeft = function() {
+ var win = getWindow(this.element)
+ return win ? win.pageXOffset : this.element.scrollLeft
+ }
+
+ NoFrameworkAdapter.prototype.scrollTop = function() {
+ var win = getWindow(this.element)
+ return win ? win.pageYOffset : this.element.scrollTop
+ }
+
+ NoFrameworkAdapter.extend = function() {
+ var args = Array.prototype.slice.call(arguments)
+
+ function merge(target, obj) {
+ if (typeof target === 'object' && typeof obj === 'object') {
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ target[key] = obj[key]
+ }
+ }
+ }
+
+ return target
+ }
+
+ for (var i = 1, end = args.length; i < end; i++) {
+ merge(args[0], args[i])
+ }
+ return args[0]
+ }
+
+ NoFrameworkAdapter.inArray = function(element, array, i) {
+ return array == null ? -1 : array.indexOf(element, i)
+ }
+
+ NoFrameworkAdapter.isEmptyObject = function(obj) {
+ /* eslint no-unused-vars: 0 */
+ for (var name in obj) {
+ return false
+ }
+ return true
+ }
+
+ Waypoint.adapters.push({
+ name: 'noframework',
+ Adapter: NoFrameworkAdapter
+ })
+ Waypoint.Adapter = NoFrameworkAdapter
+}())
+;
\ No newline at end of file
diff --git a/vendor/assets/javascripts/waypoints/shortcuts/infinite.js b/vendor/assets/javascripts/waypoints/shortcuts/infinite.js
new file mode 100644
index 000000000..eec5dacba
--- /dev/null
+++ b/vendor/assets/javascripts/waypoints/shortcuts/infinite.js
@@ -0,0 +1,84 @@
+/*!
+Waypoints Infinite Scroll Shortcut - 4.0.0
+Copyright © 2011-2015 Caleb Troughton
+Licensed under the MIT license.
+https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
+*/
+(function() {
+ 'use strict'
+
+ var $ = window.jQuery
+ var Waypoint = window.Waypoint
+
+ /* http://imakewebthings.com/waypoints/shortcuts/infinite-scroll */
+ function Infinite(options) {
+ this.options = $.extend({}, Infinite.defaults, options)
+ this.container = this.options.element
+ if (this.options.container !== 'auto') {
+ this.container = this.options.container
+ }
+ this.$container = $(this.container)
+ this.$more = $(this.options.more)
+
+ if (this.$more.length) {
+ this.setupHandler()
+ this.waypoint = new Waypoint(this.options)
+ }
+ }
+
+ /* Private */
+ Infinite.prototype.setupHandler = function() {
+ this.options.handler = $.proxy(function() {
+ this.options.onBeforePageLoad()
+ this.destroy()
+ this.$container.addClass(this.options.loadingClass)
+
+ $.get($(this.options.more).attr('href'), $.proxy(function(data) {
+ var $data = $($.parseHTML(data))
+ var $newMore = $data.find(this.options.more)
+
+ var $items = $data.find(this.options.items)
+ if (!$items.length) {
+ $items = $data.filter(this.options.items)
+ }
+
+ this.$container.append($items)
+ this.$container.removeClass(this.options.loadingClass)
+
+ if (!$newMore.length) {
+ $newMore = $data.filter(this.options.more)
+ }
+ if ($newMore.length) {
+ this.$more.replaceWith($newMore)
+ this.$more = $newMore
+ this.waypoint = new Waypoint(this.options)
+ }
+ else {
+ this.$more.remove()
+ }
+
+ this.options.onAfterPageLoad($items)
+ }, this))
+ }, this)
+ }
+
+ /* Public */
+ Infinite.prototype.destroy = function() {
+ if (this.waypoint) {
+ this.waypoint.destroy()
+ }
+ }
+
+ Infinite.defaults = {
+ container: 'auto',
+ items: '.infinite-item',
+ more: '.infinite-more-link',
+ offset: 'bottom-in-view',
+ loadingClass: 'infinite-loading',
+ onBeforePageLoad: $.noop,
+ onAfterPageLoad: $.noop
+ }
+
+ Waypoint.Infinite = Infinite
+}())
+;
\ No newline at end of file
diff --git a/vendor/assets/javascripts/waypoints/shortcuts/inview.js b/vendor/assets/javascripts/waypoints/shortcuts/inview.js
new file mode 100644
index 000000000..acec502a5
--- /dev/null
+++ b/vendor/assets/javascripts/waypoints/shortcuts/inview.js
@@ -0,0 +1,120 @@
+/*!
+Waypoints Inview Shortcut - 4.0.0
+Copyright © 2011-2015 Caleb Troughton
+Licensed under the MIT license.
+https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
+*/
+(function() {
+ 'use strict'
+
+ function noop() {}
+
+ var Waypoint = window.Waypoint
+
+ /* http://imakewebthings.com/waypoints/shortcuts/inview */
+ function Inview(options) {
+ this.options = Waypoint.Adapter.extend({}, Inview.defaults, options)
+ this.axis = this.options.horizontal ? 'horizontal' : 'vertical'
+ this.waypoints = []
+ this.element = this.options.element
+ this.createWaypoints()
+ }
+
+ /* Private */
+ Inview.prototype.createWaypoints = function() {
+ var configs = {
+ vertical: [{
+ down: 'enter',
+ up: 'exited',
+ offset: '100%'
+ }, {
+ down: 'entered',
+ up: 'exit',
+ offset: 'bottom-in-view'
+ }, {
+ down: 'exit',
+ up: 'entered',
+ offset: 0
+ }, {
+ down: 'exited',
+ up: 'enter',
+ offset: function() {
+ return -this.adapter.outerHeight()
+ }
+ }],
+ horizontal: [{
+ right: 'enter',
+ left: 'exited',
+ offset: '100%'
+ }, {
+ right: 'entered',
+ left: 'exit',
+ offset: 'right-in-view'
+ }, {
+ right: 'exit',
+ left: 'entered',
+ offset: 0
+ }, {
+ right: 'exited',
+ left: 'enter',
+ offset: function() {
+ return -this.adapter.outerWidth()
+ }
+ }]
+ }
+
+ for (var i = 0, end = configs[this.axis].length; i < end; i++) {
+ var config = configs[this.axis][i]
+ this.createWaypoint(config)
+ }
+ }
+
+ /* Private */
+ Inview.prototype.createWaypoint = function(config) {
+ var self = this
+ this.waypoints.push(new Waypoint({
+ context: this.options.context,
+ element: this.options.element,
+ enabled: this.options.enabled,
+ handler: (function(config) {
+ return function(direction) {
+ self.options[config[direction]].call(self, direction)
+ }
+ }(config)),
+ offset: config.offset,
+ horizontal: this.options.horizontal
+ }))
+ }
+
+ /* Public */
+ Inview.prototype.destroy = function() {
+ for (var i = 0, end = this.waypoints.length; i < end; i++) {
+ this.waypoints[i].destroy()
+ }
+ this.waypoints = []
+ }
+
+ Inview.prototype.disable = function() {
+ for (var i = 0, end = this.waypoints.length; i < end; i++) {
+ this.waypoints[i].disable()
+ }
+ }
+
+ Inview.prototype.enable = function() {
+ for (var i = 0, end = this.waypoints.length; i < end; i++) {
+ this.waypoints[i].enable()
+ }
+ }
+
+ Inview.defaults = {
+ context: window,
+ enabled: true,
+ enter: noop,
+ entered: noop,
+ exit: noop,
+ exited: noop
+ }
+
+ Waypoint.Inview = Inview
+}())
+;
\ No newline at end of file
diff --git a/vendor/assets/javascripts/waypoints/shortcuts/sticky.js b/vendor/assets/javascripts/waypoints/shortcuts/sticky.js
new file mode 100644
index 000000000..b609b84a4
--- /dev/null
+++ b/vendor/assets/javascripts/waypoints/shortcuts/sticky.js
@@ -0,0 +1,70 @@
+/*!
+Waypoints Sticky Element Shortcut - 4.0.0
+Copyright © 2011-2015 Caleb Troughton
+Licensed under the MIT license.
+https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
+*/
+(function() {
+ 'use strict'
+
+ var $ = window.jQuery
+ var Waypoint = window.Waypoint
+
+ /* http://imakewebthings.com/waypoints/shortcuts/sticky-elements */
+ function Sticky(options) {
+ this.options = $.extend({}, Waypoint.defaults, Sticky.defaults, options)
+ this.element = this.options.element
+ this.$element = $(this.element)
+ this.createWrapper()
+ this.createWaypoint()
+ }
+
+ /* Private */
+ Sticky.prototype.createWaypoint = function() {
+ var originalHandler = this.options.handler
+
+ this.waypoint = new Waypoint($.extend({}, this.options, {
+ element: this.wrapper,
+ handler: $.proxy(function(direction) {
+ var shouldBeStuck = this.options.direction.indexOf(direction) > -1
+ var wrapperHeight = shouldBeStuck ? this.$element.outerHeight(true) : ''
+
+ this.$wrapper.height(wrapperHeight)
+ this.$element.toggleClass(this.options.stuckClass, shouldBeStuck)
+
+ if (originalHandler) {
+ originalHandler.call(this, direction)
+ }
+ }, this)
+ }))
+ }
+
+ /* Private */
+ Sticky.prototype.createWrapper = function() {
+ if (this.options.wrapper) {
+ this.$element.wrap(this.options.wrapper)
+ }
+ this.$wrapper = this.$element.parent()
+ this.wrapper = this.$wrapper[0]
+ }
+
+ /* Public */
+ Sticky.prototype.destroy = function() {
+ if (this.$element.parent()[0] === this.wrapper) {
+ this.waypoint.destroy()
+ this.$element.removeClass(this.options.stuckClass)
+ if (this.options.wrapper) {
+ this.$element.unwrap()
+ }
+ }
+ }
+
+ Sticky.defaults = {
+ wrapper: '
',
+ stuckClass: 'stuck',
+ direction: 'down right'
+ }
+
+ Waypoint.Sticky = Sticky
+}())
+;
\ No newline at end of file
diff --git a/vendor/assets/javascripts/waypoints/waypoints.debug.js b/vendor/assets/javascripts/waypoints/waypoints.debug.js
new file mode 100644
index 000000000..49601e381
--- /dev/null
+++ b/vendor/assets/javascripts/waypoints/waypoints.debug.js
@@ -0,0 +1,46 @@
+/*!
+Waypoints Debug - 4.0.0
+Copyright © 2011-2015 Caleb Troughton
+Licensed under the MIT license.
+https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
+*/
+(function() {
+ 'use strict'
+
+ var displayNoneMessage = [
+ 'You have a Waypoint element with display none. For more information on ',
+ 'why this is a bad idea read ',
+ 'http://imakewebthings.com/waypoints/guides/debugging/#display-none'
+ ].join('')
+ var fixedMessage = [
+ 'You have a Waypoint element with fixed positioning. For more ',
+ 'information on why this is a bad idea read ',
+ 'http://imakewebthings.com/waypoints/guides/debugging/#fixed-position'
+ ].join('')
+
+ function checkWaypointStyles() {
+ var originalRefresh = window.Waypoint.Context.prototype.refresh
+
+ window.Waypoint.Context.prototype.refresh = function() {
+ for (var axis in this.waypoints) {
+ for (var key in this.waypoints[axis]) {
+ var waypoint = this.waypoints[axis][key]
+ var style = window.getComputedStyle(waypoint.element)
+ if (!waypoint.enabled) {
+ continue
+ }
+ if (style && style.display === 'none') {
+ console.error(displayNoneMessage)
+ }
+ if (style && style.position === 'fixed') {
+ console.error(fixedMessage)
+ }
+ }
+ }
+ return originalRefresh.call(this)
+ }
+ }
+
+ checkWaypointStyles()
+}())
+;
\ No newline at end of file
diff --git a/vendor/assets/javascripts/waypoints/zepto.waypoints.js b/vendor/assets/javascripts/waypoints/zepto.waypoints.js
new file mode 100644
index 000000000..70f497010
--- /dev/null
+++ b/vendor/assets/javascripts/waypoints/zepto.waypoints.js
@@ -0,0 +1,692 @@
+/*!
+Waypoints - 4.0.0
+Copyright © 2011-2015 Caleb Troughton
+Licensed under the MIT license.
+https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
+*/
+(function() {
+ 'use strict'
+
+ var keyCounter = 0
+ var allWaypoints = {}
+
+ /* http://imakewebthings.com/waypoints/api/waypoint */
+ function Waypoint(options) {
+ if (!options) {
+ throw new Error('No options passed to Waypoint constructor')
+ }
+ if (!options.element) {
+ throw new Error('No element option passed to Waypoint constructor')
+ }
+ if (!options.handler) {
+ throw new Error('No handler option passed to Waypoint constructor')
+ }
+
+ this.key = 'waypoint-' + keyCounter
+ this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options)
+ this.element = this.options.element
+ this.adapter = new Waypoint.Adapter(this.element)
+ this.callback = options.handler
+ this.axis = this.options.horizontal ? 'horizontal' : 'vertical'
+ this.enabled = this.options.enabled
+ this.triggerPoint = null
+ this.group = Waypoint.Group.findOrCreate({
+ name: this.options.group,
+ axis: this.axis
+ })
+ this.context = Waypoint.Context.findOrCreateByElement(this.options.context)
+
+ if (Waypoint.offsetAliases[this.options.offset]) {
+ this.options.offset = Waypoint.offsetAliases[this.options.offset]
+ }
+ this.group.add(this)
+ this.context.add(this)
+ allWaypoints[this.key] = this
+ keyCounter += 1
+ }
+
+ /* Private */
+ Waypoint.prototype.queueTrigger = function(direction) {
+ this.group.queueTrigger(this, direction)
+ }
+
+ /* Private */
+ Waypoint.prototype.trigger = function(args) {
+ if (!this.enabled) {
+ return
+ }
+ if (this.callback) {
+ this.callback.apply(this, args)
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/destroy */
+ Waypoint.prototype.destroy = function() {
+ this.context.remove(this)
+ this.group.remove(this)
+ delete allWaypoints[this.key]
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/disable */
+ Waypoint.prototype.disable = function() {
+ this.enabled = false
+ return this
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/enable */
+ Waypoint.prototype.enable = function() {
+ this.context.refresh()
+ this.enabled = true
+ return this
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/next */
+ Waypoint.prototype.next = function() {
+ return this.group.next(this)
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/previous */
+ Waypoint.prototype.previous = function() {
+ return this.group.previous(this)
+ }
+
+ /* Private */
+ Waypoint.invokeAll = function(method) {
+ var allWaypointsArray = []
+ for (var waypointKey in allWaypoints) {
+ allWaypointsArray.push(allWaypoints[waypointKey])
+ }
+ for (var i = 0, end = allWaypointsArray.length; i < end; i++) {
+ allWaypointsArray[i][method]()
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/destroy-all */
+ Waypoint.destroyAll = function() {
+ Waypoint.invokeAll('destroy')
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/disable-all */
+ Waypoint.disableAll = function() {
+ Waypoint.invokeAll('disable')
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/enable-all */
+ Waypoint.enableAll = function() {
+ Waypoint.invokeAll('enable')
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/refresh-all */
+ Waypoint.refreshAll = function() {
+ Waypoint.Context.refreshAll()
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/viewport-height */
+ Waypoint.viewportHeight = function() {
+ return window.innerHeight || document.documentElement.clientHeight
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/viewport-width */
+ Waypoint.viewportWidth = function() {
+ return document.documentElement.clientWidth
+ }
+
+ Waypoint.adapters = []
+
+ Waypoint.defaults = {
+ context: window,
+ continuous: true,
+ enabled: true,
+ group: 'default',
+ horizontal: false,
+ offset: 0
+ }
+
+ Waypoint.offsetAliases = {
+ 'bottom-in-view': function() {
+ return this.context.innerHeight() - this.adapter.outerHeight()
+ },
+ 'right-in-view': function() {
+ return this.context.innerWidth() - this.adapter.outerWidth()
+ }
+ }
+
+ window.Waypoint = Waypoint
+}())
+;(function() {
+ 'use strict'
+
+ function requestAnimationFrameShim(callback) {
+ window.setTimeout(callback, 1000 / 60)
+ }
+
+ var keyCounter = 0
+ var contexts = {}
+ var Waypoint = window.Waypoint
+ var oldWindowLoad = window.onload
+
+ /* http://imakewebthings.com/waypoints/api/context */
+ function Context(element) {
+ this.element = element
+ this.Adapter = Waypoint.Adapter
+ this.adapter = new this.Adapter(element)
+ this.key = 'waypoint-context-' + keyCounter
+ this.didScroll = false
+ this.didResize = false
+ this.oldScroll = {
+ x: this.adapter.scrollLeft(),
+ y: this.adapter.scrollTop()
+ }
+ this.waypoints = {
+ vertical: {},
+ horizontal: {}
+ }
+
+ element.waypointContextKey = this.key
+ contexts[element.waypointContextKey] = this
+ keyCounter += 1
+
+ this.createThrottledScrollHandler()
+ this.createThrottledResizeHandler()
+ }
+
+ /* Private */
+ Context.prototype.add = function(waypoint) {
+ var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical'
+ this.waypoints[axis][waypoint.key] = waypoint
+ this.refresh()
+ }
+
+ /* Private */
+ Context.prototype.checkEmpty = function() {
+ var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal)
+ var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical)
+ if (horizontalEmpty && verticalEmpty) {
+ this.adapter.off('.waypoints')
+ delete contexts[this.key]
+ }
+ }
+
+ /* Private */
+ Context.prototype.createThrottledResizeHandler = function() {
+ var self = this
+
+ function resizeHandler() {
+ self.handleResize()
+ self.didResize = false
+ }
+
+ this.adapter.on('resize.waypoints', function() {
+ if (!self.didResize) {
+ self.didResize = true
+ Waypoint.requestAnimationFrame(resizeHandler)
+ }
+ })
+ }
+
+ /* Private */
+ Context.prototype.createThrottledScrollHandler = function() {
+ var self = this
+ function scrollHandler() {
+ self.handleScroll()
+ self.didScroll = false
+ }
+
+ this.adapter.on('scroll.waypoints', function() {
+ if (!self.didScroll || Waypoint.isTouch) {
+ self.didScroll = true
+ Waypoint.requestAnimationFrame(scrollHandler)
+ }
+ })
+ }
+
+ /* Private */
+ Context.prototype.handleResize = function() {
+ Waypoint.Context.refreshAll()
+ }
+
+ /* Private */
+ Context.prototype.handleScroll = function() {
+ var triggeredGroups = {}
+ var axes = {
+ horizontal: {
+ newScroll: this.adapter.scrollLeft(),
+ oldScroll: this.oldScroll.x,
+ forward: 'right',
+ backward: 'left'
+ },
+ vertical: {
+ newScroll: this.adapter.scrollTop(),
+ oldScroll: this.oldScroll.y,
+ forward: 'down',
+ backward: 'up'
+ }
+ }
+
+ for (var axisKey in axes) {
+ var axis = axes[axisKey]
+ var isForward = axis.newScroll > axis.oldScroll
+ var direction = isForward ? axis.forward : axis.backward
+
+ for (var waypointKey in this.waypoints[axisKey]) {
+ var waypoint = this.waypoints[axisKey][waypointKey]
+ var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint
+ var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint
+ var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint
+ var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint
+ if (crossedForward || crossedBackward) {
+ waypoint.queueTrigger(direction)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ }
+ }
+
+ for (var groupKey in triggeredGroups) {
+ triggeredGroups[groupKey].flushTriggers()
+ }
+
+ this.oldScroll = {
+ x: axes.horizontal.newScroll,
+ y: axes.vertical.newScroll
+ }
+ }
+
+ /* Private */
+ Context.prototype.innerHeight = function() {
+ /*eslint-disable eqeqeq */
+ if (this.element == this.element.window) {
+ return Waypoint.viewportHeight()
+ }
+ /*eslint-enable eqeqeq */
+ return this.adapter.innerHeight()
+ }
+
+ /* Private */
+ Context.prototype.remove = function(waypoint) {
+ delete this.waypoints[waypoint.axis][waypoint.key]
+ this.checkEmpty()
+ }
+
+ /* Private */
+ Context.prototype.innerWidth = function() {
+ /*eslint-disable eqeqeq */
+ if (this.element == this.element.window) {
+ return Waypoint.viewportWidth()
+ }
+ /*eslint-enable eqeqeq */
+ return this.adapter.innerWidth()
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/context-destroy */
+ Context.prototype.destroy = function() {
+ var allWaypoints = []
+ for (var axis in this.waypoints) {
+ for (var waypointKey in this.waypoints[axis]) {
+ allWaypoints.push(this.waypoints[axis][waypointKey])
+ }
+ }
+ for (var i = 0, end = allWaypoints.length; i < end; i++) {
+ allWaypoints[i].destroy()
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/context-refresh */
+ Context.prototype.refresh = function() {
+ /*eslint-disable eqeqeq */
+ var isWindow = this.element == this.element.window
+ /*eslint-enable eqeqeq */
+ var contextOffset = isWindow ? undefined : this.adapter.offset()
+ var triggeredGroups = {}
+ var axes
+
+ this.handleScroll()
+ axes = {
+ horizontal: {
+ contextOffset: isWindow ? 0 : contextOffset.left,
+ contextScroll: isWindow ? 0 : this.oldScroll.x,
+ contextDimension: this.innerWidth(),
+ oldScroll: this.oldScroll.x,
+ forward: 'right',
+ backward: 'left',
+ offsetProp: 'left'
+ },
+ vertical: {
+ contextOffset: isWindow ? 0 : contextOffset.top,
+ contextScroll: isWindow ? 0 : this.oldScroll.y,
+ contextDimension: this.innerHeight(),
+ oldScroll: this.oldScroll.y,
+ forward: 'down',
+ backward: 'up',
+ offsetProp: 'top'
+ }
+ }
+
+ for (var axisKey in axes) {
+ var axis = axes[axisKey]
+ for (var waypointKey in this.waypoints[axisKey]) {
+ var waypoint = this.waypoints[axisKey][waypointKey]
+ var adjustment = waypoint.options.offset
+ var oldTriggerPoint = waypoint.triggerPoint
+ var elementOffset = 0
+ var freshWaypoint = oldTriggerPoint == null
+ var contextModifier, wasBeforeScroll, nowAfterScroll
+ var triggeredBackward, triggeredForward
+
+ if (waypoint.element !== waypoint.element.window) {
+ elementOffset = waypoint.adapter.offset()[axis.offsetProp]
+ }
+
+ if (typeof adjustment === 'function') {
+ adjustment = adjustment.apply(waypoint)
+ }
+ else if (typeof adjustment === 'string') {
+ adjustment = parseFloat(adjustment)
+ if (waypoint.options.offset.indexOf('%') > - 1) {
+ adjustment = Math.ceil(axis.contextDimension * adjustment / 100)
+ }
+ }
+
+ contextModifier = axis.contextScroll - axis.contextOffset
+ waypoint.triggerPoint = elementOffset + contextModifier - adjustment
+ wasBeforeScroll = oldTriggerPoint < axis.oldScroll
+ nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll
+ triggeredBackward = wasBeforeScroll && nowAfterScroll
+ triggeredForward = !wasBeforeScroll && !nowAfterScroll
+
+ if (!freshWaypoint && triggeredBackward) {
+ waypoint.queueTrigger(axis.backward)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ else if (!freshWaypoint && triggeredForward) {
+ waypoint.queueTrigger(axis.forward)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) {
+ waypoint.queueTrigger(axis.forward)
+ triggeredGroups[waypoint.group.id] = waypoint.group
+ }
+ }
+ }
+
+ Waypoint.requestAnimationFrame(function() {
+ for (var groupKey in triggeredGroups) {
+ triggeredGroups[groupKey].flushTriggers()
+ }
+ })
+
+ return this
+ }
+
+ /* Private */
+ Context.findOrCreateByElement = function(element) {
+ return Context.findByElement(element) || new Context(element)
+ }
+
+ /* Private */
+ Context.refreshAll = function() {
+ for (var contextId in contexts) {
+ contexts[contextId].refresh()
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/context-find-by-element */
+ Context.findByElement = function(element) {
+ return contexts[element.waypointContextKey]
+ }
+
+ window.onload = function() {
+ if (oldWindowLoad) {
+ oldWindowLoad()
+ }
+ Context.refreshAll()
+ }
+
+ Waypoint.requestAnimationFrame = function(callback) {
+ var requestFn = window.requestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ window.webkitRequestAnimationFrame ||
+ requestAnimationFrameShim
+ requestFn.call(window, callback)
+ }
+ Waypoint.Context = Context
+}())
+;(function() {
+ 'use strict'
+
+ function byTriggerPoint(a, b) {
+ return a.triggerPoint - b.triggerPoint
+ }
+
+ function byReverseTriggerPoint(a, b) {
+ return b.triggerPoint - a.triggerPoint
+ }
+
+ var groups = {
+ vertical: {},
+ horizontal: {}
+ }
+ var Waypoint = window.Waypoint
+
+ /* http://imakewebthings.com/waypoints/api/group */
+ function Group(options) {
+ this.name = options.name
+ this.axis = options.axis
+ this.id = this.name + '-' + this.axis
+ this.waypoints = []
+ this.clearTriggerQueues()
+ groups[this.axis][this.name] = this
+ }
+
+ /* Private */
+ Group.prototype.add = function(waypoint) {
+ this.waypoints.push(waypoint)
+ }
+
+ /* Private */
+ Group.prototype.clearTriggerQueues = function() {
+ this.triggerQueues = {
+ up: [],
+ down: [],
+ left: [],
+ right: []
+ }
+ }
+
+ /* Private */
+ Group.prototype.flushTriggers = function() {
+ for (var direction in this.triggerQueues) {
+ var waypoints = this.triggerQueues[direction]
+ var reverse = direction === 'up' || direction === 'left'
+ waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint)
+ for (var i = 0, end = waypoints.length; i < end; i += 1) {
+ var waypoint = waypoints[i]
+ if (waypoint.options.continuous || i === waypoints.length - 1) {
+ waypoint.trigger([direction])
+ }
+ }
+ }
+ this.clearTriggerQueues()
+ }
+
+ /* Private */
+ Group.prototype.next = function(waypoint) {
+ this.waypoints.sort(byTriggerPoint)
+ var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
+ var isLast = index === this.waypoints.length - 1
+ return isLast ? null : this.waypoints[index + 1]
+ }
+
+ /* Private */
+ Group.prototype.previous = function(waypoint) {
+ this.waypoints.sort(byTriggerPoint)
+ var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
+ return index ? this.waypoints[index - 1] : null
+ }
+
+ /* Private */
+ Group.prototype.queueTrigger = function(waypoint, direction) {
+ this.triggerQueues[direction].push(waypoint)
+ }
+
+ /* Private */
+ Group.prototype.remove = function(waypoint) {
+ var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
+ if (index > -1) {
+ this.waypoints.splice(index, 1)
+ }
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/first */
+ Group.prototype.first = function() {
+ return this.waypoints[0]
+ }
+
+ /* Public */
+ /* http://imakewebthings.com/waypoints/api/last */
+ Group.prototype.last = function() {
+ return this.waypoints[this.waypoints.length - 1]
+ }
+
+ /* Private */
+ Group.findOrCreate = function(options) {
+ return groups[options.axis][options.name] || new Group(options)
+ }
+
+ Waypoint.Group = Group
+}())
+;(function() {
+ 'use strict'
+
+ var $ = window.Zepto
+ var Waypoint = window.Waypoint
+
+ function ZeptoAdapter(element) {
+ this.element = element
+ this.$element = $(element)
+ }
+
+ $.each([
+ 'off',
+ 'on',
+ 'scrollLeft',
+ 'scrollTop'
+ ], function(i, method) {
+ ZeptoAdapter.prototype[method] = function() {
+ var args = Array.prototype.slice.call(arguments)
+ return this.$element[method].apply(this.$element, args)
+ }
+ })
+
+ ZeptoAdapter.prototype.offset = function() {
+ if (this.element !== this.element.window) {
+ return this.$element.offset()
+ }
+ }
+
+ // Adapted from https://gist.github.com/wheresrhys/5823198
+ $.each([
+ 'width',
+ 'height'
+ ], function(i, dimension) {
+ function createDimensionMethod($element, includeBorder) {
+ return function(includeMargin) {
+ var $element = this.$element
+ var size = $element[dimension]()
+ var sides = {
+ width: ['left', 'right'],
+ height: ['top', 'bottom']
+ }
+
+ $.each(sides[dimension], function(i, side) {
+ size += parseInt($element.css('padding-' + side), 10)
+ if (includeBorder) {
+ size += parseInt($element.css('border-' + side + '-width'), 10)
+ }
+ if (includeMargin) {
+ size += parseInt($element.css('margin-' + side), 10)
+ }
+ })
+ return size
+ }
+ }
+
+ var innerMethod = $.camelCase('inner-' + dimension)
+ var outerMethod = $.camelCase('outer-' + dimension)
+
+ ZeptoAdapter.prototype[innerMethod] = createDimensionMethod(false)
+ ZeptoAdapter.prototype[outerMethod] = createDimensionMethod(true)
+ })
+
+ $.each([
+ 'extend',
+ 'inArray'
+ ], function(i, method) {
+ ZeptoAdapter[method] = $[method]
+ })
+
+ ZeptoAdapter.isEmptyObject = function(obj) {
+ /* eslint no-unused-vars: 0 */
+ for (var name in obj) {
+ return false
+ }
+ return true
+ }
+
+ Waypoint.adapters.push({
+ name: 'zepto',
+ Adapter: ZeptoAdapter
+ })
+ Waypoint.Adapter = ZeptoAdapter
+}())
+;(function() {
+ 'use strict'
+
+ var Waypoint = window.Waypoint
+
+ function createExtension(framework) {
+ return function() {
+ var waypoints = []
+ var overrides = arguments[0]
+
+ if (framework.isFunction(arguments[0])) {
+ overrides = framework.extend({}, arguments[1])
+ overrides.handler = arguments[0]
+ }
+
+ this.each(function() {
+ var options = framework.extend({}, overrides, {
+ element: this
+ })
+ if (typeof options.context === 'string') {
+ options.context = framework(this).closest(options.context)[0]
+ }
+ waypoints.push(new Waypoint(options))
+ })
+
+ return waypoints
+ }
+ }
+
+ if (window.jQuery) {
+ window.jQuery.fn.waypoint = createExtension(window.jQuery)
+ }
+ if (window.Zepto) {
+ window.Zepto.fn.waypoint = createExtension(window.Zepto)
+ }
+}())
+;
\ No newline at end of file
diff --git a/vendor/assets/stylesheets/bootstrap-markdown.scss b/vendor/assets/stylesheets/bootstrap-markdown.scss
new file mode 100644
index 000000000..cda02a842
--- /dev/null
+++ b/vendor/assets/stylesheets/bootstrap-markdown.scss
@@ -0,0 +1 @@
+@import 'bootstrap-markdown/bootstrap-markdown.min.scss';
diff --git a/vendor/assets/stylesheets/bootstrap-markdown/bootstrap-markdown.min.scss b/vendor/assets/stylesheets/bootstrap-markdown/bootstrap-markdown.min.scss
new file mode 100644
index 000000000..388b2f5f6
--- /dev/null
+++ b/vendor/assets/stylesheets/bootstrap-markdown/bootstrap-markdown.min.scss
@@ -0,0 +1 @@
+.md-editor{display:block;border:1px solid #ddd}.md-editor .md-footer,.md-editor>.md-header{display:block;padding:6px 4px;background:#f5f5f5}.md-editor>.md-header{margin:0}.md-editor>.md-preview{background:#fff;border-top:1px dashed #ddd;border-bottom:1px dashed #ddd;min-height:10px;overflow:auto}.md-editor>textarea{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:14px;outline:0;margin:0;display:block;padding:0;width:100%;border:0;border-top:1px dashed #ddd;border-bottom:1px dashed #ddd;border-radius:0;box-shadow:none;background:#eee}.md-editor>textarea:focus{box-shadow:none;background:#fff}.md-editor.active{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.md-editor .md-controls{float:right;padding:3px}.md-editor .md-controls .md-control{right:5px;color:#bebebe;padding:3px 3px 3px 10px}.md-editor .md-controls .md-control:hover{color:#333}.md-editor.md-fullscreen-mode{width:100%;height:100%;position:fixed;top:0;left:0;z-index:99999;padding:60px 30px 15px;background:#fff!important;border:0!important}.md-editor.md-fullscreen-mode .md-footer{display:none}.md-editor.md-fullscreen-mode .md-input,.md-editor.md-fullscreen-mode .md-preview{margin:0 auto!important;height:100%!important;font-size:20px!important;padding:20px!important;color:#999;line-height:1.6em!important;resize:none!important;box-shadow:none!important;background:#fff!important;border:0!important}.md-editor.md-fullscreen-mode .md-preview{color:#333;overflow:auto}.md-editor.md-fullscreen-mode .md-input:focus,.md-editor.md-fullscreen-mode .md-input:hover{color:#333;background:#fff!important}.md-editor.md-fullscreen-mode .md-header{background:0 0;text-align:center;position:fixed;width:100%;top:20px}.md-editor.md-fullscreen-mode .btn-group{float:none}.md-editor.md-fullscreen-mode .btn{border:0;background:0 0;color:#b3b3b3}.md-editor.md-fullscreen-mode .btn.active,.md-editor.md-fullscreen-mode .btn:active,.md-editor.md-fullscreen-mode .btn:focus,.md-editor.md-fullscreen-mode .btn:hover{box-shadow:none;color:#333}.md-editor.md-fullscreen-mode .md-fullscreen-controls{position:absolute;top:20px;right:20px;text-align:right;z-index:1002;display:block}.md-editor.md-fullscreen-mode .md-fullscreen-controls a{color:#b3b3b3;clear:right;margin:10px;width:30px;height:30px;text-align:center}.md-editor.md-fullscreen-mode .md-fullscreen-controls a:hover{color:#333;text-decoration:none}.md-editor.md-fullscreen-mode .md-editor{height:100%!important;position:relative}.md-editor .md-fullscreen-controls{display:none}.md-nooverflow{overflow:hidden;position:fixed;width:100%}
\ No newline at end of file
diff --git a/vendor/assets/stylesheets/bootstrap-select.scss b/vendor/assets/stylesheets/bootstrap-select.scss
new file mode 100644
index 000000000..6095412d1
--- /dev/null
+++ b/vendor/assets/stylesheets/bootstrap-select.scss
@@ -0,0 +1 @@
+@import 'bootstrap-select/bootstrap-select.scss';
diff --git a/vendor/assets/stylesheets/bootstrap-select/bootstrap-select.scss b/vendor/assets/stylesheets/bootstrap-select/bootstrap-select.scss
new file mode 100644
index 000000000..436c4deba
--- /dev/null
+++ b/vendor/assets/stylesheets/bootstrap-select/bootstrap-select.scss
@@ -0,0 +1,428 @@
+/*!
+ * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
+ *
+ * Copyright 2012-2019 SnapAppointments, LLC
+ * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
+ */
+
+select.bs-select-hidden,
+.bootstrap-select > select.bs-select-hidden,
+select.selectpicker {
+ display: none !important;
+}
+.bootstrap-select {
+ width: 220px \0;
+ /*IE9 and below*/
+ vertical-align: middle;
+}
+.bootstrap-select > .dropdown-toggle {
+ position: relative;
+ width: 100%;
+ text-align: right;
+ white-space: nowrap;
+ display: -webkit-inline-box;
+ display: -webkit-inline-flex;
+ display: -ms-inline-flexbox;
+ display: inline-flex;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: justify;
+ -webkit-justify-content: space-between;
+ -ms-flex-pack: justify;
+ justify-content: space-between;
+}
+.bootstrap-select > .dropdown-toggle:after {
+ margin-top: -1px;
+}
+.bootstrap-select > .dropdown-toggle.bs-placeholder,
+.bootstrap-select > .dropdown-toggle.bs-placeholder:hover,
+.bootstrap-select > .dropdown-toggle.bs-placeholder:focus,
+.bootstrap-select > .dropdown-toggle.bs-placeholder:active {
+ color: #999;
+}
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:hover,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:hover,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:hover,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:hover,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:hover,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:hover,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:focus,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:focus,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:focus,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:focus,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:focus,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:focus,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:active,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:active,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:active,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:active,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:active,
+.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:active {
+ color: rgba(255, 255, 255, 0.5);
+}
+.bootstrap-select > select {
+ position: absolute !important;
+ bottom: 0;
+ left: 50%;
+ display: block !important;
+ width: 0.5px !important;
+ height: 100% !important;
+ padding: 0 !important;
+ opacity: 0 !important;
+ border: none;
+ z-index: 0 !important;
+}
+.bootstrap-select > select.mobile-device {
+ top: 0;
+ left: 0;
+ display: block !important;
+ width: 100% !important;
+ z-index: 2 !important;
+}
+.has-error .bootstrap-select .dropdown-toggle,
+.error .bootstrap-select .dropdown-toggle,
+.bootstrap-select.is-invalid .dropdown-toggle,
+.was-validated .bootstrap-select .selectpicker:invalid + .dropdown-toggle {
+ border-color: #b94a48;
+}
+.bootstrap-select.is-valid .dropdown-toggle,
+.was-validated .bootstrap-select .selectpicker:valid + .dropdown-toggle {
+ border-color: #28a745;
+}
+.bootstrap-select.fit-width {
+ width: auto !important;
+}
+.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
+ width: 220px;
+}
+.bootstrap-select > select.mobile-device:focus + .dropdown-toggle,
+.bootstrap-select .dropdown-toggle:focus {
+ outline: thin dotted #333333 !important;
+ outline: 5px auto -webkit-focus-ring-color !important;
+ outline-offset: -2px;
+}
+.bootstrap-select.form-control {
+ margin-bottom: 0;
+ padding: 0;
+ border: none;
+ height: auto;
+}
+:not(.input-group) > .bootstrap-select.form-control:not([class*="col-"]) {
+ width: 100%;
+}
+.bootstrap-select.form-control.input-group-btn {
+ float: none;
+ z-index: auto;
+}
+.form-inline .bootstrap-select,
+.form-inline .bootstrap-select.form-control:not([class*="col-"]) {
+ width: auto;
+}
+.bootstrap-select:not(.input-group-btn),
+.bootstrap-select[class*="col-"] {
+ float: none;
+ display: inline-block;
+ margin-left: 0;
+}
+.bootstrap-select.dropdown-menu-right,
+.bootstrap-select[class*="col-"].dropdown-menu-right,
+.row .bootstrap-select[class*="col-"].dropdown-menu-right {
+ float: right;
+}
+.form-inline .bootstrap-select,
+.form-horizontal .bootstrap-select,
+.form-group .bootstrap-select {
+ margin-bottom: 0;
+}
+.form-group-lg .bootstrap-select.form-control,
+.form-group-sm .bootstrap-select.form-control {
+ padding: 0;
+}
+.form-group-lg .bootstrap-select.form-control .dropdown-toggle,
+.form-group-sm .bootstrap-select.form-control .dropdown-toggle {
+ height: 100%;
+ font-size: inherit;
+ line-height: inherit;
+ border-radius: inherit;
+}
+.bootstrap-select.form-control-sm .dropdown-toggle,
+.bootstrap-select.form-control-lg .dropdown-toggle {
+ font-size: inherit;
+ line-height: inherit;
+ border-radius: inherit;
+}
+.bootstrap-select.form-control-sm .dropdown-toggle {
+ padding: 0.25rem 0.5rem;
+}
+.bootstrap-select.form-control-lg .dropdown-toggle {
+ padding: 0.5rem 1rem;
+}
+.form-inline .bootstrap-select .form-control {
+ width: 100%;
+}
+.bootstrap-select.disabled,
+.bootstrap-select > .disabled {
+ cursor: not-allowed;
+}
+.bootstrap-select.disabled:focus,
+.bootstrap-select > .disabled:focus {
+ outline: none !important;
+}
+.bootstrap-select.bs-container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 0 !important;
+ padding: 0 !important;
+}
+.bootstrap-select.bs-container .dropdown-menu {
+ z-index: 1060;
+}
+.bootstrap-select .dropdown-toggle .filter-option {
+ position: static;
+ top: 0;
+ left: 0;
+ float: left;
+ height: 100%;
+ width: 100%;
+ text-align: left;
+ overflow: hidden;
+ -webkit-box-flex: 0;
+ -webkit-flex: 0 1 auto;
+ -ms-flex: 0 1 auto;
+ flex: 0 1 auto;
+}
+.bs3.bootstrap-select .dropdown-toggle .filter-option {
+ padding-right: inherit;
+}
+.input-group .bs3-has-addon.bootstrap-select .dropdown-toggle .filter-option {
+ position: absolute;
+ padding-top: inherit;
+ padding-bottom: inherit;
+ padding-left: inherit;
+ float: none;
+}
+.input-group .bs3-has-addon.bootstrap-select .dropdown-toggle .filter-option .filter-option-inner {
+ padding-right: inherit;
+}
+.bootstrap-select .dropdown-toggle .filter-option-inner-inner {
+ overflow: hidden;
+}
+.bootstrap-select .dropdown-toggle .filter-expand {
+ width: 0 !important;
+ float: left;
+ opacity: 0 !important;
+ overflow: hidden;
+}
+.bootstrap-select .dropdown-toggle .caret {
+ position: absolute;
+ top: 50%;
+ right: 12px;
+ margin-top: -2px;
+ vertical-align: middle;
+}
+.input-group .bootstrap-select.form-control .dropdown-toggle {
+ border-radius: inherit;
+}
+.bootstrap-select[class*="col-"] .dropdown-toggle {
+ width: 100%;
+}
+.bootstrap-select .dropdown-menu {
+ min-width: 100%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.bootstrap-select .dropdown-menu > .inner:focus {
+ outline: none !important;
+}
+.bootstrap-select .dropdown-menu.inner {
+ position: static;
+ float: none;
+ border: 0;
+ padding: 0;
+ margin: 0;
+ border-radius: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.bootstrap-select .dropdown-menu li {
+ position: relative;
+}
+.bootstrap-select .dropdown-menu li.active small {
+ color: rgba(255, 255, 255, 0.5) !important;
+}
+.bootstrap-select .dropdown-menu li.disabled a {
+ cursor: not-allowed;
+}
+.bootstrap-select .dropdown-menu li a {
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.bootstrap-select .dropdown-menu li a.opt {
+ position: relative;
+ padding-left: 2.25em;
+}
+.bootstrap-select .dropdown-menu li a span.check-mark {
+ display: none;
+}
+.bootstrap-select .dropdown-menu li a span.text {
+ display: inline-block;
+}
+.bootstrap-select .dropdown-menu li small {
+ padding-left: 0.5em;
+}
+.bootstrap-select .dropdown-menu .notify {
+ position: absolute;
+ bottom: 5px;
+ width: 96%;
+ margin: 0 2%;
+ min-height: 26px;
+ padding: 3px 5px;
+ background: #f5f5f5;
+ border: 1px solid #e3e3e3;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ pointer-events: none;
+ opacity: 0.9;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.bootstrap-select .no-results {
+ padding: 3px;
+ background: #f5f5f5;
+ margin: 0 5px;
+ white-space: nowrap;
+}
+.bootstrap-select.fit-width .dropdown-toggle .filter-option {
+ position: static;
+ display: inline;
+ padding: 0;
+}
+.bootstrap-select.fit-width .dropdown-toggle .filter-option-inner,
+.bootstrap-select.fit-width .dropdown-toggle .filter-option-inner-inner {
+ display: inline;
+}
+.bootstrap-select.fit-width .dropdown-toggle .bs-caret:before {
+ content: '\00a0';
+}
+.bootstrap-select.fit-width .dropdown-toggle .caret {
+ position: static;
+ top: auto;
+ margin-top: -1px;
+}
+.bootstrap-select.show-tick .dropdown-menu .selected span.check-mark {
+ position: absolute;
+ display: inline-block;
+ right: 15px;
+ top: 5px;
+}
+.bootstrap-select.show-tick .dropdown-menu li a span.text {
+ margin-right: 34px;
+}
+.bootstrap-select .bs-ok-default:after {
+ content: '';
+ display: block;
+ width: 0.5em;
+ height: 1em;
+ border-style: solid;
+ border-width: 0 0.26em 0.26em 0;
+ -webkit-transform: rotate(45deg);
+ -ms-transform: rotate(45deg);
+ -o-transform: rotate(45deg);
+ transform: rotate(45deg);
+}
+.bootstrap-select.show-menu-arrow.open > .dropdown-toggle,
+.bootstrap-select.show-menu-arrow.show > .dropdown-toggle {
+ z-index: 1061;
+}
+.bootstrap-select.show-menu-arrow .dropdown-toggle .filter-option:before {
+ content: '';
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid rgba(204, 204, 204, 0.2);
+ position: absolute;
+ bottom: -4px;
+ left: 9px;
+ display: none;
+}
+.bootstrap-select.show-menu-arrow .dropdown-toggle .filter-option:after {
+ content: '';
+ border-left: 6px solid transparent;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid white;
+ position: absolute;
+ bottom: -4px;
+ left: 10px;
+ display: none;
+}
+.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle .filter-option:before {
+ bottom: auto;
+ top: -4px;
+ border-top: 7px solid rgba(204, 204, 204, 0.2);
+ border-bottom: 0;
+}
+.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle .filter-option:after {
+ bottom: auto;
+ top: -4px;
+ border-top: 6px solid white;
+ border-bottom: 0;
+}
+.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle .filter-option:before {
+ right: 12px;
+ left: auto;
+}
+.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle .filter-option:after {
+ right: 13px;
+ left: auto;
+}
+.bootstrap-select.show-menu-arrow.open > .dropdown-toggle .filter-option:before,
+.bootstrap-select.show-menu-arrow.show > .dropdown-toggle .filter-option:before,
+.bootstrap-select.show-menu-arrow.open > .dropdown-toggle .filter-option:after,
+.bootstrap-select.show-menu-arrow.show > .dropdown-toggle .filter-option:after {
+ display: block;
+}
+.bs-searchbox,
+.bs-actionsbox,
+.bs-donebutton {
+ padding: 4px 8px;
+}
+.bs-actionsbox {
+ width: 100%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.bs-actionsbox .btn-group button {
+ width: 50%;
+}
+.bs-donebutton {
+ float: left;
+ width: 100%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.bs-donebutton .btn-group button {
+ width: 100%;
+}
+.bs-searchbox + .bs-actionsbox {
+ padding: 0 8px 4px;
+}
+.bs-searchbox .form-control {
+ margin-bottom: 0;
+ width: 100%;
+ float: none;
+}
diff --git a/vendor/assets/stylesheets/spectrum.scss b/vendor/assets/stylesheets/spectrum.scss
new file mode 100644
index 000000000..c8cd462f8
--- /dev/null
+++ b/vendor/assets/stylesheets/spectrum.scss
@@ -0,0 +1 @@
+@import 'spectrum/spectrum.scss';
diff --git a/vendor/assets/stylesheets/spectrum/spectrum.scss b/vendor/assets/stylesheets/spectrum/spectrum.scss
new file mode 100644
index 000000000..a8ad9e4f8
--- /dev/null
+++ b/vendor/assets/stylesheets/spectrum/spectrum.scss
@@ -0,0 +1,507 @@
+/***
+Spectrum Colorpicker v1.8.0
+https://github.com/bgrins/spectrum
+Author: Brian Grinstead
+License: MIT
+***/
+
+.sp-container {
+ position:absolute;
+ top:0;
+ left:0;
+ display:inline-block;
+ *display: inline;
+ *zoom: 1;
+ /* https://github.com/bgrins/spectrum/issues/40 */
+ z-index: 9999994;
+ overflow: hidden;
+}
+.sp-container.sp-flat {
+ position: relative;
+}
+
+/* Fix for * { box-sizing: border-box; } */
+.sp-container,
+.sp-container * {
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+
+/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */
+.sp-top {
+ position:relative;
+ width: 100%;
+ display:inline-block;
+}
+.sp-top-inner {
+ position:absolute;
+ top:0;
+ left:0;
+ bottom:0;
+ right:0;
+}
+.sp-color {
+ position: absolute;
+ top:0;
+ left:0;
+ bottom:0;
+ right:20%;
+}
+.sp-hue {
+ position: absolute;
+ top:0;
+ right:0;
+ bottom:0;
+ left:84%;
+ height: 100%;
+}
+
+.sp-clear-enabled .sp-hue {
+ top:33px;
+ height: 77.5%;
+}
+
+.sp-fill {
+ padding-top: 80%;
+}
+.sp-sat, .sp-val {
+ position: absolute;
+ top:0;
+ left:0;
+ right:0;
+ bottom:0;
+}
+
+.sp-alpha-enabled .sp-top {
+ margin-bottom: 18px;
+}
+.sp-alpha-enabled .sp-alpha {
+ display: block;
+}
+.sp-alpha-handle {
+ position:absolute;
+ top:-4px;
+ bottom: -4px;
+ width: 6px;
+ left: 50%;
+ cursor: pointer;
+ border: 1px solid black;
+ background: white;
+ opacity: .8;
+}
+.sp-alpha {
+ display: none;
+ position: absolute;
+ bottom: -14px;
+ right: 0;
+ left: 0;
+ height: 8px;
+}
+.sp-alpha-inner {
+ border: solid 1px #333;
+}
+
+.sp-clear {
+ display: none;
+}
+
+.sp-clear.sp-clear-display {
+ background-position: center;
+}
+
+.sp-clear-enabled .sp-clear {
+ display: block;
+ position:absolute;
+ top:0px;
+ right:0;
+ bottom:0;
+ left:84%;
+ height: 28px;
+}
+
+/* Don't allow text selection */
+.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button {
+ -webkit-user-select:none;
+ -moz-user-select: -moz-none;
+ -o-user-select:none;
+ user-select: none;
+}
+
+.sp-container.sp-input-disabled .sp-input-container {
+ display: none;
+}
+.sp-container.sp-buttons-disabled .sp-button-container {
+ display: none;
+}
+.sp-container.sp-palette-buttons-disabled .sp-palette-button-container {
+ display: none;
+}
+.sp-palette-only .sp-picker-container {
+ display: none;
+}
+.sp-palette-disabled .sp-palette-container {
+ display: none;
+}
+
+.sp-initial-disabled .sp-initial {
+ display: none;
+}
+
+
+/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */
+.sp-sat {
+ background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));
+ background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));
+ background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
+ background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
+ background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
+ background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";
+ filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');
+}
+.sp-val {
+ background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));
+ background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));
+ background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
+ background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
+ background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
+ background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";
+ filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');
+}
+
+.sp-hue {
+ background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
+ background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
+ background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
+ background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));
+ background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
+ background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
+}
+
+/* IE filters do not support multiple color stops.
+ Generate 6 divs, line them up, and do two color gradients for each.
+ Yes, really.
+ */
+.sp-1 {
+ height:17%;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');
+}
+.sp-2 {
+ height:16%;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00');
+}
+.sp-3 {
+ height:17%;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff');
+}
+.sp-4 {
+ height:17%;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff');
+}
+.sp-5 {
+ height:16%;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff');
+}
+.sp-6 {
+ height:17%;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000');
+}
+
+.sp-hidden {
+ display: none !important;
+}
+
+/* Clearfix hack */
+.sp-cf:before, .sp-cf:after { content: ""; display: table; }
+.sp-cf:after { clear: both; }
+.sp-cf { *zoom: 1; }
+
+/* Mobile devices, make hue slider bigger so it is easier to slide */
+@media (max-device-width: 480px) {
+ .sp-color { right: 40%; }
+ .sp-hue { left: 63%; }
+ .sp-fill { padding-top: 60%; }
+}
+.sp-dragger {
+ border-radius: 5px;
+ height: 5px;
+ width: 5px;
+ border: 1px solid #fff;
+ background: #000;
+ cursor: pointer;
+ position:absolute;
+ top:0;
+ left: 0;
+}
+.sp-slider {
+ position: absolute;
+ top:0;
+ cursor:pointer;
+ height: 3px;
+ left: -1px;
+ right: -1px;
+ border: 1px solid #000;
+ background: white;
+ opacity: .8;
+}
+
+/*
+Theme authors:
+Here are the basic themeable display options (colors, fonts, global widths).
+See http://bgrins.github.io/spectrum/themes/ for instructions.
+*/
+
+.sp-container {
+ border-radius: 0;
+ background-color: #ECECEC;
+ border: solid 1px #f0c49B;
+ padding: 0;
+}
+.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear {
+ font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.sp-top {
+ margin-bottom: 3px;
+}
+.sp-color, .sp-hue, .sp-clear {
+ border: solid 1px #666;
+}
+
+/* Input */
+.sp-input-container {
+ float:right;
+ width: 100px;
+ margin-bottom: 4px;
+}
+.sp-initial-disabled .sp-input-container {
+ width: 100%;
+}
+.sp-input {
+ font-size: 12px !important;
+ border: 1px inset;
+ padding: 4px 5px;
+ margin: 0;
+ width: 100%;
+ background:transparent;
+ border-radius: 3px;
+ color: #222;
+}
+.sp-input:focus {
+ border: 1px solid orange;
+}
+.sp-input.sp-validation-error {
+ border: 1px solid red;
+ background: #fdd;
+}
+.sp-picker-container , .sp-palette-container {
+ float:left;
+ position: relative;
+ padding: 10px;
+ padding-bottom: 300px;
+ margin-bottom: -290px;
+}
+.sp-picker-container {
+ width: 172px;
+ border-left: solid 1px #fff;
+}
+
+/* Palettes */
+.sp-palette-container {
+ border-right: solid 1px #ccc;
+}
+
+.sp-palette-only .sp-palette-container {
+ border: 0;
+}
+
+.sp-palette .sp-thumb-el {
+ display: block;
+ position:relative;
+ float:left;
+ width: 24px;
+ height: 15px;
+ margin: 3px;
+ cursor: pointer;
+ border:solid 2px transparent;
+}
+.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active {
+ border-color: orange;
+}
+.sp-thumb-el {
+ position:relative;
+}
+
+/* Initial */
+.sp-initial {
+ float: left;
+ border: solid 1px #333;
+}
+.sp-initial span {
+ width: 30px;
+ height: 25px;
+ border:none;
+ display:block;
+ float:left;
+ margin:0;
+}
+
+.sp-initial .sp-clear-display {
+ background-position: center;
+}
+
+/* Buttons */
+.sp-palette-button-container,
+.sp-button-container {
+ float: right;
+}
+
+/* Replacer (the little preview div that shows up instead of the ) */
+.sp-replacer {
+ margin:0;
+ overflow:hidden;
+ cursor:pointer;
+ padding: 4px;
+ display:inline-block;
+ *zoom: 1;
+ *display: inline;
+ border: solid 1px #91765d;
+ background: #eee;
+ color: #333;
+ vertical-align: middle;
+}
+.sp-replacer:hover, .sp-replacer.sp-active {
+ border-color: #F0C49B;
+ color: #111;
+}
+.sp-replacer.sp-disabled {
+ cursor:default;
+ border-color: silver;
+ color: silver;
+}
+.sp-dd {
+ padding: 2px 0;
+ height: 16px;
+ line-height: 16px;
+ float:left;
+ font-size:10px;
+}
+.sp-preview {
+ position:relative;
+ width:25px;
+ height: 20px;
+ border: solid 1px #222;
+ margin-right: 5px;
+ float:left;
+ z-index: 0;
+}
+
+.sp-palette {
+ *width: 220px;
+ max-width: 220px;
+}
+.sp-palette .sp-thumb-el {
+ width:16px;
+ height: 16px;
+ margin:2px 1px;
+ border: solid 1px #d0d0d0;
+}
+
+.sp-container {
+ padding-bottom:0;
+}
+
+
+/* Buttons: http://hellohappy.org/css3-buttons/ */
+.sp-container button {
+ background-color: #eeeeee;
+ background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
+ border: 1px solid #ccc;
+ border-bottom: 1px solid #bbb;
+ border-radius: 3px;
+ color: #333;
+ font-size: 14px;
+ line-height: 1;
+ padding: 5px 4px;
+ text-align: center;
+ text-shadow: 0 1px 0 #eee;
+ vertical-align: middle;
+}
+.sp-container button:hover {
+ background-color: #dddddd;
+ background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
+ background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
+ background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
+ background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
+ background-image: linear-gradient(to bottom, #dddddd, #bbbbbb);
+ border: 1px solid #bbb;
+ border-bottom: 1px solid #999;
+ cursor: pointer;
+ text-shadow: 0 1px 0 #ddd;
+}
+.sp-container button:active {
+ border: 1px solid #aaa;
+ border-bottom: 1px solid #888;
+ -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
+ -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
+ -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
+ -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
+ box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
+}
+.sp-cancel {
+ font-size: 11px;
+ color: #d93f3f !important;
+ margin:0;
+ padding:2px;
+ margin-right: 5px;
+ vertical-align: middle;
+ text-decoration:none;
+
+}
+.sp-cancel:hover {
+ color: #d93f3f !important;
+ text-decoration: underline;
+}
+
+
+.sp-palette span:hover, .sp-palette span.sp-thumb-active {
+ border-color: #000;
+}
+
+.sp-preview, .sp-alpha, .sp-thumb-el {
+ position:relative;
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
+}
+.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner {
+ display:block;
+ position:absolute;
+ top:0;left:0;bottom:0;right:0;
+}
+
+.sp-palette .sp-thumb-inner {
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
+}
+
+.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=);
+}
+
+.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=);
+}
+
+.sp-clear-display {
+ background-repeat:no-repeat;
+ background-position: center;
+ background-image: url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==);
+}
diff --git a/vendor/assets/stylesheets/spectrum/themes/sp-dark.scss b/vendor/assets/stylesheets/spectrum/themes/sp-dark.scss
new file mode 100644
index 000000000..4acbc7d02
--- /dev/null
+++ b/vendor/assets/stylesheets/spectrum/themes/sp-dark.scss
@@ -0,0 +1,128 @@
+/* Container */
+.sp-dark.sp-container {
+ background-color: #333;
+ border: solid 1px #555;
+}
+
+/* Replacer (the little preview div that shows up instead of the ) */
+.sp-dark.sp-replacer {
+ border: solid 1px #fff;
+ background: #333;
+ color: #eee;
+ vertical-align: middle;
+}
+.sp-replacer:hover, .sp-replacer.sp-active {
+ border-color: #F0C49B;
+ color: #fff;
+}
+.sp-replacer.sp-disabled {
+ border-color: silver;
+ color: silver;
+}
+.sp-dark .sp-preview {
+ border: solid 1px #999;
+}
+.sp-dark .sp-cancel {
+ color: #f99f9f !important;
+}
+
+.sp-dark, .sp-dark button, .sp-dark input, .sp-color, .sp-hue {
+
+}
+
+/* Input */
+.sp-dark .sp-input-container {
+
+}
+.sp-dark .sp-initial-disabled .sp-input-container {
+
+}
+.sp-dark .sp-input {
+
+}
+.sp-dark .sp-input:focus {
+
+}
+.sp-dark .sp-input.sp-validation-error {
+
+}
+
+.sp-dark .sp-picker-container , .sp-dark .sp-palette-container {
+
+}
+.sp-dark .sp-picker-container {
+
+}
+
+/* Palettes */
+.sp-dark .sp-palette-container {
+
+}
+
+.sp-dark .sp-palette .sp-thumb-el {
+
+}
+.sp-dark .sp-palette .sp-thumb-el:hover, .sp-dark .sp-palette .sp-thumb-el.sp-thumb-active {
+
+}
+.sp-dark .sp-thumb-el {
+}
+
+/* Initial */
+.sp-dark .sp-initial {
+
+}
+.sp-dark .sp-initial span {
+
+}
+
+/* Buttons */
+.sp-dark .sp-button-container {
+
+}
+
+/* Replacer (the little preview div that shows up instead of the ) */
+.sp-dark.sp-replacer {
+
+}
+.sp-dark.sp-replacer:hover, .sp-dark.sp-replacer.sp-active {
+ border-color: #F0C49B;
+ color: #111;
+}
+.sp-dark.sp-replacer.sp-disabled {
+
+}
+.sp-dark .sp-dd {
+
+}
+
+
+
+.sp-dark .sp-preview {
+
+}
+.sp-dark .sp-palette {
+
+}
+.sp-dark .sp-palette .sp-thumb-el {
+
+}
+
+.sp-dark button {
+
+}
+.sp-dark button:hover {
+
+}
+.sp-dark button:active {
+
+}
+.sp-dark .sp-cancel {
+
+}
+.sp-dark .sp-cancel:hover {
+
+}
+.sp-dark .sp-palette span:hover, .sp-dark .sp-palette span.sp-thumb-active {
+
+}