uploadcare-rails 1.2.0.pre.alpha → 1.2.0.pre.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +5 -5
  2. data/lib/uploadcare-rails.rb +9 -2
  3. data/lib/uploadcare/rails/version.rb +1 -1
  4. data/spec/cassettes/Uploadcare_Rails_File/should_load_itself.yml +263 -0
  5. data/spec/cassettes/Uploadcare_Rails_Group/group_should_stay_loaded.yml +263 -0
  6. data/spec/cassettes/Uploadcare_Rails_Group/rails_cache_should_updates_after_load_call.yml +263 -0
  7. data/spec/cassettes/group_cahsing_file_load.yml +263 -0
  8. data/spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/deletes_file_after_destroy.yml +1763 -0
  9. data/spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/stores_file_after_save.yml +543 -0
  10. data/spec/cassettes/has_uploadcare_group/object_attachment/contains_files_inside.yml +679 -0
  11. data/spec/cassettes/has_uploadcare_group_save.yml +705 -0
  12. data/spec/cassettes/load_group.yml +263 -0
  13. data/spec/dummy/db/test.sqlite3 +0 -0
  14. data/spec/dummy/log/development.log +0 -0
  15. data/spec/dummy/log/test.log +3276 -0
  16. data/spec/dummy/tmp/cache/293/091/https%3A%2F%2Fucarecdn.com%2F19073296-2315-4726-817b-46398b2c7431%7E2%2F +0 -0
  17. data/spec/dummy/tmp/cache/2AF/761/https%3A%2F%2Fucarecdn.com%2F595319d0-a113-459f-91bd-b29c7183467b%2F +0 -0
  18. data/spec/dummy/tmp/cache/301/D41/https%3A%2F%2Fucarecdn.com%2F81332043-fa2c-452f-936b-737d87ab2ae2%2F +0 -0
  19. data/spec/dummy/tmp/cache/30A/7C1/https%3A%2F%2Fucarecdn.com%2F39b34128-a001-46fd-9773-1b6ad46e6b9e%2F +0 -0
  20. data/spec/dummy/tmp/cache/340/A41/https%3A%2F%2Fucarecdn.com%2F090bcb5f-6d19-456c-b4a3-d753e690926f%2F +0 -0
  21. data/spec/dummy/tmp/cache/3AB/5A1/https%3A%2F%2Fucarecdn.com%2F7eb0161b-cebe-4316-946b-694de6f77ef9%2F +0 -0
  22. data/spec/dummy/tmp/cache/3FC/5C1/https%3A%2F%2Fucarecdn.com%2Fc3f0464b-ce9a-4281-8eaa-5c55783ccedf%2F +0 -0
  23. data/spec/dummy/tmp/cache/431/5C1/https%3A%2F%2Fucarecdn.com%2Fa1b1bb40-bd89-4f9c-b809-e84920f24a01%7E2%2F +0 -0
  24. data/spec/dummy/tmp/cache/44B/7A1/https%3A%2F%2Fucarecdn.com%2Fd6c785a8-9761-4602-88de-65ddb04ddc6a%7E2%2F +0 -0
  25. data/spec/dummy/tmp/cache/45B/F31/https%3A%2F%2Fucarecdn.com%2F73e3cdbc-6495-4cf2-bbd1-413e6cb70004%7E2%2F +0 -0
  26. data/spec/dummy/tmp/cache/461/AA1/https%3A%2F%2Fucarecdn.com%2Fc50e9a53-0b95-48ac-a4a9-6744052dbdab%7E2%2F +0 -0
  27. data/spec/tmp/config/uploadcare.yml +71 -0
  28. data/spec/uploadcare_rails_settings_spec.rb +8 -2
  29. metadata +130 -83
  30. data/spec/dummy/app/assets/javascripts/uploadcare-1.5.5.min.js +0 -16
@@ -0,0 +1,71 @@
1
+ defaults: &defaults
2
+ public_key: "demopublickey" # replace it with your public key
3
+ private_key: "demoprivatekey" # replace it with your private key
4
+
5
+ # instances of widget initialized for you on page load
6
+ live: true
7
+
8
+ # cache files json dumps to prevent calling to server if it posible
9
+ cache_files: true
10
+
11
+ # cache groups json dumps to prevent calling to server if it posible
12
+ cache_groups: true
13
+
14
+ # store file or group after model is created or updated
15
+ store_after_save: true
16
+
17
+ # deletes file or group after model object is deleted
18
+ delete_after_destroy: true
19
+
20
+ # Avaliable options are listed at https://uploadcare.com/documentation/widget/#advanced-configuration
21
+ # please note, that for options marker as Global: N/A - there is no practical meaning
22
+ # of putting this option here, as it will not have any effect.
23
+ # But it also will not break anything.
24
+
25
+ # for preview step use:
26
+ # preview_step: false # true or false
27
+
28
+ # for clearable option (allows user to remove uploaded file from widget) use:
29
+ # clearable: false # true or false
30
+
31
+ # for setting tabs use tabs option:
32
+ # tabs: "url file facebook" # etc
33
+ # read more here: https://uploadcare.com/documentation/widget/#tabs
34
+ #
35
+ # Full list of tabs:
36
+ # |----------------------------------------|
37
+ # | Code | File Source | Default |
38
+ # |------------|-----------------|---------|
39
+ # | url | Any URL | On |
40
+ # | file | Local disk | On |
41
+ # | facebook | Facebook | On |
42
+ # | dropbox | Dropbox | Off |
43
+ # | gdrive | Google Drive | On |
44
+ # | box | Box | On |
45
+ # | skydrive | SkyDrive | On |
46
+ # | instagram | Instagram | On |
47
+ # | evernote | Evernote | On |
48
+ # | vk | VK | Off |
49
+ # |________________________________________|
50
+
51
+ # for locale option use:
52
+ # locale: "en"
53
+
54
+ # for autostore option use:
55
+ # autostore: true #true or false
56
+
57
+ # for manual start (which means you will need to initialize uploaders yourself) use:
58
+ # manual_start: false # true or false
59
+
60
+ # for path value use:
61
+ # path_value: true # true or false
62
+ # (important for input values - see https://uploadcare.com/documentation/widget/#input-value)
63
+
64
+ development:
65
+ <<: *defaults
66
+
67
+ test:
68
+ <<: *defaults
69
+
70
+ production:
71
+ <<: *defaults
@@ -22,7 +22,7 @@ describe Uploadcare::Rails do
22
22
  UPLOADCARE_SETTINGS.public_key.should be_kind_of(String)
23
23
 
24
24
  UPLOADCARE_SETTINGS.private_key.should_not be_empty
25
- UPLOADCARE_SETTINGS.public_key.should_not be_empty
25
+ UPLOADCARE_SETTINGS.public_key.should_not be_empty
26
26
  end
27
27
 
28
28
  it "pub and private keys should be loaded from config file" do
@@ -47,4 +47,10 @@ describe Uploadcare::Rails do
47
47
  UPLOADCARE_SETTINGS.widget_settings.should be_a_kind_of(Hash)
48
48
  UPLOADCARE_SETTINGS.widget_settings.should_not be_empty
49
49
  end
50
- end
50
+
51
+ it 'should include user agent environment config' do
52
+ expect(UPLOADCARE_SETTINGS.user_agent_environment.keys).to include(
53
+ :framework_name, :framework_version, :extension_name, :extension_version
54
+ )
55
+ end
56
+ end
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uploadcare-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.pre.alpha
4
+ version: 1.2.0.pre.alpha3
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@rastyagaev (Vadim Rastyagaev)"
8
8
  - "@dimituri (Dimitry Solovyov)"
9
9
  - "@romanonthego (Roman Dubinin)"
10
+ - "@vizvamitra (Dmitrii Krasnov)"
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2018-04-19 00:00:00.000000000 Z
14
+ date: 2018-05-30 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: rails
@@ -38,14 +39,14 @@ dependencies:
38
39
  requirements:
39
40
  - - "~>"
40
41
  - !ruby/object:Gem::Version
41
- version: '1.0'
42
+ version: '1.2'
42
43
  type: :runtime
43
44
  prerelease: false
44
45
  version_requirements: !ruby/object:Gem::Requirement
45
46
  requirements:
46
47
  - - "~>"
47
48
  - !ruby/object:Gem::Version
48
- version: '1.0'
49
+ version: '1.2'
49
50
  - !ruby/object:Gem::Dependency
50
51
  name: bundler
51
52
  requirement: !ruby/object:Gem::Requirement
@@ -273,13 +274,21 @@ files:
273
274
  - lib/uploadcare/rails/version.rb
274
275
  - spec/caching/file_caching_spec.rb
275
276
  - spec/caching/group_caching_spec.rb
277
+ - spec/cassettes/Uploadcare_Rails_File/should_load_itself.yml
278
+ - spec/cassettes/Uploadcare_Rails_Group/group_should_stay_loaded.yml
279
+ - spec/cassettes/Uploadcare_Rails_Group/rails_cache_should_updates_after_load_call.yml
280
+ - spec/cassettes/group_cahsing_file_load.yml
281
+ - spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/deletes_file_after_destroy.yml
282
+ - spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/stores_file_after_save.yml
283
+ - spec/cassettes/has_uploadcare_group/object_attachment/contains_files_inside.yml
284
+ - spec/cassettes/has_uploadcare_group_save.yml
285
+ - spec/cassettes/load_group.yml
276
286
  - spec/dummy/README.rdoc
277
287
  - spec/dummy/Rakefile
278
288
  - spec/dummy/app/assets/javascripts/application.js
279
289
  - spec/dummy/app/assets/javascripts/post_with_collections.js
280
290
  - spec/dummy/app/assets/javascripts/posts.js
281
291
  - spec/dummy/app/assets/javascripts/posts_with_collection_and_files.js
282
- - spec/dummy/app/assets/javascripts/uploadcare-1.5.5.min.js
283
292
  - spec/dummy/app/assets/stylesheets/application.css
284
293
  - spec/dummy/app/assets/stylesheets/post_with_collections.css
285
294
  - spec/dummy/app/assets/stylesheets/posts.css
@@ -341,11 +350,25 @@ files:
341
350
  - spec/dummy/config/uploadcare.yml
342
351
  - spec/dummy/db/migrate/20171012001801_create_tables.rb
343
352
  - spec/dummy/db/schema.rb
353
+ - spec/dummy/db/test.sqlite3
344
354
  - spec/dummy/lib/templates/erb/scaffold/_form.html.erb
355
+ - spec/dummy/log/development.log
356
+ - spec/dummy/log/test.log
345
357
  - spec/dummy/public/404.html
346
358
  - spec/dummy/public/422.html
347
359
  - spec/dummy/public/500.html
348
360
  - spec/dummy/public/favicon.ico
361
+ - spec/dummy/tmp/cache/293/091/https%3A%2F%2Fucarecdn.com%2F19073296-2315-4726-817b-46398b2c7431%7E2%2F
362
+ - spec/dummy/tmp/cache/2AF/761/https%3A%2F%2Fucarecdn.com%2F595319d0-a113-459f-91bd-b29c7183467b%2F
363
+ - spec/dummy/tmp/cache/301/D41/https%3A%2F%2Fucarecdn.com%2F81332043-fa2c-452f-936b-737d87ab2ae2%2F
364
+ - spec/dummy/tmp/cache/30A/7C1/https%3A%2F%2Fucarecdn.com%2F39b34128-a001-46fd-9773-1b6ad46e6b9e%2F
365
+ - spec/dummy/tmp/cache/340/A41/https%3A%2F%2Fucarecdn.com%2F090bcb5f-6d19-456c-b4a3-d753e690926f%2F
366
+ - spec/dummy/tmp/cache/3AB/5A1/https%3A%2F%2Fucarecdn.com%2F7eb0161b-cebe-4316-946b-694de6f77ef9%2F
367
+ - spec/dummy/tmp/cache/3FC/5C1/https%3A%2F%2Fucarecdn.com%2Fc3f0464b-ce9a-4281-8eaa-5c55783ccedf%2F
368
+ - spec/dummy/tmp/cache/431/5C1/https%3A%2F%2Fucarecdn.com%2Fa1b1bb40-bd89-4f9c-b809-e84920f24a01%7E2%2F
369
+ - spec/dummy/tmp/cache/44B/7A1/https%3A%2F%2Fucarecdn.com%2Fd6c785a8-9761-4602-88de-65ddb04ddc6a%7E2%2F
370
+ - spec/dummy/tmp/cache/45B/F31/https%3A%2F%2Fucarecdn.com%2F73e3cdbc-6495-4cf2-bbd1-413e6cb70004%7E2%2F
371
+ - spec/dummy/tmp/cache/461/AA1/https%3A%2F%2Fucarecdn.com%2Fc50e9a53-0b95-48ac-a4a9-6744052dbdab%7E2%2F
349
372
  - spec/generators/uploadcare_config_generator_spec.rb
350
373
  - spec/helpers/form_helpers_has_file_spec.rb
351
374
  - spec/helpers/form_helpers_has_group_spec.rb
@@ -362,6 +385,7 @@ files:
362
385
  - spec/operations_spec.rb
363
386
  - spec/spec_helper.rb
364
387
  - spec/support/generators.rb
388
+ - spec/tmp/config/uploadcare.yml
365
389
  - spec/uploadcare/rails/settings_spec.rb
366
390
  - spec/uploadcare_rails_settings_spec.rb
367
391
  - spec/view.png
@@ -388,103 +412,126 @@ required_rubygems_version: !ruby/object:Gem::Requirement
388
412
  version: 1.3.1
389
413
  requirements: []
390
414
  rubyforge_project:
391
- rubygems_version: 2.5.2
415
+ rubygems_version: 2.7.7
392
416
  signing_key:
393
417
  specification_version: 4
394
418
  summary: Rails gem for Uploadcare
395
419
  test_files:
396
- - spec/spec_helper.rb
397
- - spec/dummy/app/models/posts_with_collection_and_file.rb
398
- - spec/dummy/app/models/post_with_collection.rb
399
- - spec/dummy/app/models/post.rb
400
- - spec/dummy/app/controllers/application_controller.rb
401
- - spec/dummy/app/controllers/post_with_collections_controller.rb
402
- - spec/dummy/app/controllers/posts_with_collection_and_files_controller.rb
403
- - spec/dummy/app/controllers/posts_controller.rb
404
- - spec/dummy/app/views/posts/index.html.erb
405
- - spec/dummy/app/views/posts/post.json.builder
406
- - spec/dummy/app/views/posts/edit.html.erb
420
+ - spec/helpers/simple_form_spec.rb
421
+ - spec/helpers/form_helpers_has_group_spec.rb
422
+ - spec/helpers/include_tags_spec.rb
423
+ - spec/helpers/uploader_tags_spec.rb
424
+ - spec/helpers/form_helpers_spec.rb
425
+ - spec/helpers/form_helpers_has_file_spec.rb
426
+ - spec/helpers/formtastic_spec.rb
427
+ - spec/cassettes/has_uploadcare_group/object_attachment/contains_files_inside.yml
428
+ - spec/cassettes/has_uploadcare_group_save.yml
429
+ - spec/cassettes/group_cahsing_file_load.yml
430
+ - spec/cassettes/Uploadcare_Rails_File/should_load_itself.yml
431
+ - spec/cassettes/load_group.yml
432
+ - spec/cassettes/Uploadcare_Rails_Group/group_should_stay_loaded.yml
433
+ - spec/cassettes/Uploadcare_Rails_Group/rails_cache_should_updates_after_load_call.yml
434
+ - spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/stores_file_after_save.yml
435
+ - spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/deletes_file_after_destroy.yml
436
+ - spec/objects/file_spec.rb
437
+ - spec/objects/group_spec.rb
438
+ - spec/uploadcare/rails/settings_spec.rb
439
+ - spec/dummy/log/test.log
440
+ - spec/dummy/log/development.log
441
+ - spec/dummy/public/404.html
442
+ - spec/dummy/public/422.html
443
+ - spec/dummy/public/favicon.ico
444
+ - spec/dummy/public/500.html
445
+ - spec/dummy/config/routes.rb
446
+ - spec/dummy/config/initializers/wrap_parameters.rb
447
+ - spec/dummy/config/initializers/formtastic.rb
448
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
449
+ - spec/dummy/config/initializers/session_store.rb
450
+ - spec/dummy/config/initializers/backtrace_silencers.rb
451
+ - spec/dummy/config/initializers/simple_form.rb
452
+ - spec/dummy/config/initializers/inflections.rb
453
+ - spec/dummy/config/initializers/secret_token.rb
454
+ - spec/dummy/config/initializers/mime_types.rb
455
+ - spec/dummy/config/uploadcare.yml
456
+ - spec/dummy/config/environment.rb
457
+ - spec/dummy/config/application.rb
458
+ - spec/dummy/config/database.yml
459
+ - spec/dummy/config/locales/en.yml
460
+ - spec/dummy/config/locales/simple_form.en.yml
461
+ - spec/dummy/config/environments/test.rb
462
+ - spec/dummy/config/environments/development.rb
463
+ - spec/dummy/config/environments/production.rb
464
+ - spec/dummy/config/boot.rb
465
+ - spec/dummy/app/views/layouts/application.html.erb
466
+ - spec/dummy/app/views/posts/new.html.erb
407
467
  - spec/dummy/app/views/posts/show.html.erb
468
+ - spec/dummy/app/views/posts/edit.html.erb
408
469
  - spec/dummy/app/views/posts/_form.html.erb
409
- - spec/dummy/app/views/posts/new.html.erb
410
- - spec/dummy/app/views/posts_with_collection_and_files/index.html.erb
411
- - spec/dummy/app/views/posts_with_collection_and_files/show.json.jbuilder
412
- - spec/dummy/app/views/posts_with_collection_and_files/edit.html.erb
413
- - spec/dummy/app/views/posts_with_collection_and_files/show.html.erb
414
- - spec/dummy/app/views/posts_with_collection_and_files/_form.html.erb
415
- - spec/dummy/app/views/posts_with_collection_and_files/new.html.erb
416
- - spec/dummy/app/views/post_with_collections/index.html.erb
417
- - spec/dummy/app/views/post_with_collections/show.json.jbuilder
418
- - spec/dummy/app/views/post_with_collections/edit.html.erb
470
+ - spec/dummy/app/views/posts/index.html.erb
471
+ - spec/dummy/app/views/posts/post.json.builder
472
+ - spec/dummy/app/views/post_with_collections/new.html.erb
419
473
  - spec/dummy/app/views/post_with_collections/show.html.erb
474
+ - spec/dummy/app/views/post_with_collections/edit.html.erb
420
475
  - spec/dummy/app/views/post_with_collections/_form.html.erb
421
- - spec/dummy/app/views/post_with_collections/new.html.erb
422
- - spec/dummy/app/views/layouts/application.html.erb
476
+ - spec/dummy/app/views/post_with_collections/index.html.erb
477
+ - spec/dummy/app/views/post_with_collections/show.json.jbuilder
478
+ - spec/dummy/app/views/posts_with_collection_and_files/new.html.erb
479
+ - spec/dummy/app/views/posts_with_collection_and_files/show.html.erb
480
+ - spec/dummy/app/views/posts_with_collection_and_files/edit.html.erb
481
+ - spec/dummy/app/views/posts_with_collection_and_files/_form.html.erb
482
+ - spec/dummy/app/views/posts_with_collection_and_files/index.html.erb
483
+ - spec/dummy/app/views/posts_with_collection_and_files/show.json.jbuilder
484
+ - spec/dummy/app/helpers/posts_helper.rb
485
+ - spec/dummy/app/helpers/application_helper.rb
486
+ - spec/dummy/app/helpers/post_with_collections_helper.rb
487
+ - spec/dummy/app/helpers/posts_with_collection_and_files_helper.rb
488
+ - spec/dummy/app/assets/javascripts/application.js
423
489
  - spec/dummy/app/assets/javascripts/post_with_collections.js
424
- - spec/dummy/app/assets/javascripts/posts.js
425
- - spec/dummy/app/assets/javascripts/uploadcare-1.5.5.min.js
426
490
  - spec/dummy/app/assets/javascripts/posts_with_collection_and_files.js
427
- - spec/dummy/app/assets/javascripts/application.js
428
- - spec/dummy/app/assets/stylesheets/posts_with_collection_and_files.css
429
- - spec/dummy/app/assets/stylesheets/application.css
491
+ - spec/dummy/app/assets/javascripts/posts.js
492
+ - spec/dummy/app/assets/stylesheets/posts.css
430
493
  - spec/dummy/app/assets/stylesheets/scaffold.css
431
494
  - spec/dummy/app/assets/stylesheets/post_with_collections.css
432
- - spec/dummy/app/assets/stylesheets/posts.css
433
- - spec/dummy/app/helpers/posts_with_collection_and_files_helper.rb
434
- - spec/dummy/app/helpers/posts_helper.rb
435
- - spec/dummy/app/helpers/post_with_collections_helper.rb
436
- - spec/dummy/app/helpers/application_helper.rb
437
- - spec/dummy/bin/rake
438
- - spec/dummy/bin/bundle
439
- - spec/dummy/bin/rails
440
- - spec/dummy/config/uploadcare.yml
441
- - spec/dummy/config/routes.rb
442
- - spec/dummy/config/locales/en.yml
443
- - spec/dummy/config/locales/simple_form.en.yml
444
- - spec/dummy/config/environments/production.rb
445
- - spec/dummy/config/environments/development.rb
446
- - spec/dummy/config/environments/test.rb
447
- - spec/dummy/config/environment.rb
448
- - spec/dummy/config/application.rb
449
- - spec/dummy/config/database.yml
450
- - spec/dummy/config/boot.rb
451
- - spec/dummy/config/initializers/backtrace_silencers.rb
452
- - spec/dummy/config/initializers/mime_types.rb
453
- - spec/dummy/config/initializers/filter_parameter_logging.rb
454
- - spec/dummy/config/initializers/session_store.rb
455
- - spec/dummy/config/initializers/wrap_parameters.rb
456
- - spec/dummy/config/initializers/simple_form.rb
457
- - spec/dummy/config/initializers/formtastic.rb
458
- - spec/dummy/config/initializers/secret_token.rb
459
- - spec/dummy/config/initializers/inflections.rb
495
+ - spec/dummy/app/assets/stylesheets/posts_with_collection_and_files.css
496
+ - spec/dummy/app/assets/stylesheets/application.css
497
+ - spec/dummy/app/models/post.rb
498
+ - spec/dummy/app/models/post_with_collection.rb
499
+ - spec/dummy/app/models/posts_with_collection_and_file.rb
500
+ - spec/dummy/app/controllers/posts_controller.rb
501
+ - spec/dummy/app/controllers/post_with_collections_controller.rb
502
+ - spec/dummy/app/controllers/posts_with_collection_and_files_controller.rb
503
+ - spec/dummy/app/controllers/application_controller.rb
504
+ - spec/dummy/README.rdoc
505
+ - spec/dummy/tmp/cache/3FC/5C1/https%3A%2F%2Fucarecdn.com%2Fc3f0464b-ce9a-4281-8eaa-5c55783ccedf%2F
506
+ - spec/dummy/tmp/cache/30A/7C1/https%3A%2F%2Fucarecdn.com%2F39b34128-a001-46fd-9773-1b6ad46e6b9e%2F
507
+ - spec/dummy/tmp/cache/461/AA1/https%3A%2F%2Fucarecdn.com%2Fc50e9a53-0b95-48ac-a4a9-6744052dbdab%7E2%2F
508
+ - spec/dummy/tmp/cache/340/A41/https%3A%2F%2Fucarecdn.com%2F090bcb5f-6d19-456c-b4a3-d753e690926f%2F
509
+ - spec/dummy/tmp/cache/293/091/https%3A%2F%2Fucarecdn.com%2F19073296-2315-4726-817b-46398b2c7431%7E2%2F
510
+ - spec/dummy/tmp/cache/431/5C1/https%3A%2F%2Fucarecdn.com%2Fa1b1bb40-bd89-4f9c-b809-e84920f24a01%7E2%2F
511
+ - spec/dummy/tmp/cache/44B/7A1/https%3A%2F%2Fucarecdn.com%2Fd6c785a8-9761-4602-88de-65ddb04ddc6a%7E2%2F
512
+ - spec/dummy/tmp/cache/301/D41/https%3A%2F%2Fucarecdn.com%2F81332043-fa2c-452f-936b-737d87ab2ae2%2F
513
+ - spec/dummy/tmp/cache/45B/F31/https%3A%2F%2Fucarecdn.com%2F73e3cdbc-6495-4cf2-bbd1-413e6cb70004%7E2%2F
514
+ - spec/dummy/tmp/cache/3AB/5A1/https%3A%2F%2Fucarecdn.com%2F7eb0161b-cebe-4316-946b-694de6f77ef9%2F
515
+ - spec/dummy/tmp/cache/2AF/761/https%3A%2F%2Fucarecdn.com%2F595319d0-a113-459f-91bd-b29c7183467b%2F
460
516
  - spec/dummy/config.ru
461
- - spec/dummy/Rakefile
462
- - spec/dummy/public/favicon.ico
463
- - spec/dummy/public/422.html
464
- - spec/dummy/public/500.html
465
- - spec/dummy/public/404.html
466
517
  - spec/dummy/lib/templates/erb/scaffold/_form.html.erb
467
- - spec/dummy/db/schema.rb
518
+ - spec/dummy/Rakefile
468
519
  - spec/dummy/db/migrate/20171012001801_create_tables.rb
469
- - spec/dummy/README.rdoc
470
- - spec/operations_spec.rb
471
- - spec/view2.jpg
472
- - spec/objects/file_spec.rb
473
- - spec/objects/group_spec.rb
474
- - spec/models/has_file_spec.rb
520
+ - spec/dummy/db/test.sqlite3
521
+ - spec/dummy/db/schema.rb
522
+ - spec/dummy/bin/bundle
523
+ - spec/dummy/bin/rake
524
+ - spec/dummy/bin/rails
475
525
  - spec/models/has_group_spec.rb
476
526
  - spec/models/has_both_file_and_group_spec.rb
527
+ - spec/models/has_file_spec.rb
528
+ - spec/operations_spec.rb
529
+ - spec/generators/uploadcare_config_generator_spec.rb
530
+ - spec/spec_helper.rb
531
+ - spec/view2.jpg
532
+ - spec/tmp/config/uploadcare.yml
477
533
  - spec/support/generators.rb
478
534
  - spec/view.png
479
535
  - spec/uploadcare_rails_settings_spec.rb
480
- - spec/generators/uploadcare_config_generator_spec.rb
481
536
  - spec/caching/group_caching_spec.rb
482
537
  - spec/caching/file_caching_spec.rb
483
- - spec/helpers/uploader_tags_spec.rb
484
- - spec/helpers/formtastic_spec.rb
485
- - spec/helpers/form_helpers_has_file_spec.rb
486
- - spec/helpers/include_tags_spec.rb
487
- - spec/helpers/form_helpers_has_group_spec.rb
488
- - spec/helpers/form_helpers_spec.rb
489
- - spec/helpers/simple_form_spec.rb
490
- - spec/uploadcare/rails/settings_spec.rb
@@ -1,16 +0,0 @@
1
- /*
2
- * Uploadcare (1.5.5)
3
- * Date: 2015-01-28 18:02:48 +0300
4
- * Rev: 7b97d8c7f3
5
- */
6
- (function(uploadcare,SCRIPT_BASE){
7
- /*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
8
- !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document){throw new Error("jQuery requires a window with a document")}return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++){if(null!=(e=arguments[h])){for(d in e){a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c))}}}return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return !m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a){return !1}return !0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a)){return !1}try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf")){return !1}}catch(c){return !1}if(k.ownLast){for(b in a){return j.call(a,b)}}for(b in a){}return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++){if(d=b.apply(a[e],c),d===!1){break}}}else{for(e in a){if(d=b.apply(a[e],c),d===!1){break}}}}else{if(g){for(;f>e;e++){if(d=b.call(a[e],e,a[e]),d===!1){break}}}else{for(e in a){if(d=b.call(a[e],e,a[e]),d===!1){break}}}}return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g){return g.call(b,a,c)}for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++){if(c in b&&b[c]===a){return c}}}return -1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d){a[e++]=b[d++]}if(c!==c){while(void 0!==b[d]){a[e++]=b[d++]}}return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++){d=!b(a[f],f),d!==h&&e.push(a[f])}return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h){for(;g>f;f++){d=b(a[f],f,c),null!=d&&i.push(d)}}else{for(f in a){d=b(a[f],f,c),null!=d&&i.push(d)}}return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return +new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++){if(this[b]===a){return b}}return -1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]){}a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a){return d}if(1!==(k=b.nodeType)&&9!==k){return[]}if(p&&!e){if(f=_.exec(a)){if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode){return d}if(h.id===j){return d.push(h),d}}else{if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j){return d.push(h),d}}}else{if(f[2]){return I.apply(d,b.getElementsByTagName(a)),d}if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName){return I.apply(d,b.getElementsByClassName(j)),d}}}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--){o[l]=s+qb(o[l])}w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x){try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return !!a(b)}catch(c){return !1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--){d.attrHandle[c[e]]=b}}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d){return d}if(c){while(c=c.nextSibling){if(c===b){return -1}}}return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--){c[e=f[g]]&&(c[e]=!(d[e]=c[e]))}})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++]){1===c.nodeType&&d.push(c)}return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return !0}}}return !1},B=b?function(a,b){if(a===b){return l=!0,0}var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b){return l=!0,0}var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g){return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0}if(f===g){return kb(a,b)}c=a;while(c=c.parentNode){h.unshift(c)}c=b;while(c=c.parentNode){i.unshift(c)}while(h[d]===i[d]){d++}return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b))){try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType){return d}}catch(e){}}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++]){b===a[f]&&(e=d.push(f))}while(e--){a.splice(d[e],1)}}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent){return a.textContent}for(a=a.firstChild;a;a=a.nextSibling){c+=e(a)}}else{if(3===f||4===f){return a.nodeValue}}}else{while(b=a[d++]){c+=e(b)}}return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return !0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return !!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p]){if(h?l.nodeName.toLowerCase()===r:1===l.nodeType){return !1}}o=p="only"===a&&!o&&"nextSibling"}return !0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}}else{if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w){m=j[1]}else{while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b)){break}}}}return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--){d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--){(f=g[h])&&(a[h]=!(b[h]=f))}}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do{if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang")){return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-")}}while((b=b.parentNode)&&1===b.nodeType);return !1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling){if(a.nodeType<6){return !1}}return !0},parent:function(a){return !d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2){a.push(c)}return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2){a.push(c)}return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;){a.push(d)}return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;){a.push(d)}return a})}},d.pseudos.nth=d.pseudos.eq;for(b in {radio:!0,checkbox:!0,file:!0,password:!0,image:!0}){d.pseudos[b]=lb(b)}for(b in {submit:!0,reset:!0}){d.pseudos[b]=mb(b)}function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k){return b?0:k.slice(0)}h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter){!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length))}if(!c){break}}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++){d+=a[b].value}return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d]){if(1===b.nodeType||e){return a(b,c,f)}}}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d]){if((1===b.nodeType||e)&&a(b,c,g)){return !0}}}else{while(b=b[d]){if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f){return j[2]=h[2]}if(i[d]=j,j[2]=a(b,c,g)){return !0}}}}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--){if(!a[e](b,c,d)){return !1}}return !0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++){fb(a,b[d],c)}return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++){(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h))}return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--){(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}}if(f){if(e||a){if(e){j=[],k=r.length;while(k--){(l=r[k])&&j.push(q[k]=l)}e(null,r=[],j,i)}k=r.length;while(k--){(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}}else{r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)}})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return !g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++){if(c=d.relative[a[i].type]){m=[rb(sb(m),c)]}else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++){if(d.relative[a[e].type]){break}}return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||0.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++]){if(o(l,g,h)){i.push(l);break}}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++]){o(r,s,g,h)}if(f){if(p>0){while(q--){r[q]||s[q]||(s[q]=G.call(i))}}s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--){f=wb(b[c]),f[u]?d.push(f):e.push(f)}f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b){return e}n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type]){break}if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a){return I.apply(e,f),e}break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b)){return m.grep(a,function(a,d){return !!b.call(a,d,a)!==c})}if(b.nodeType){return m.grep(a,function(a){return a===b!==c})}if("string"==typeof b){if(v.test(b)){return m.filter(b,a,c)}b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a){return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++){if(m.contains(d[b],this)){return !0}}}))}for(b=0;e>b;b++){m.find(a,d[b],c)}return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return !!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a){return this}if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b){return !b||b.jquery?(b||x).find(a):this.constructor(b).find(a)}if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b)){for(c in b){m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c])}}return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2]){return x.find(a)}this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c))){1===e.nodeType&&d.push(e),e=e[b]}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling){1===a.nodeType&&a!==b&&c.push(a)}return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++){if(m.contains(this,c[b])){return !0}}})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++){for(c=this[d];c&&c!==b;c=c.parentNode){if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}}}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do{a=a[b]}while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++){if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1){h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return !h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return !i},fireWith:function(a,c){return !h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return !!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1){for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++){c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f}}return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body){return setTimeout(m.ready)}m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H){if(H=m.Deferred(),"complete"===y.readyState){setTimeout(m.ready)}else{if(y.addEventListener){y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1)}else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}}}return H.promise(b)};var K="undefined",L;for(L in m(k)){break}k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else{c=void 0}}return c}function P(a){var b;for(b in a){if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b){return !1}}return !0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b){return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--){delete d[b[e]]}if(c?!P(d):!m.isEmptyObject(d)){return}}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--){g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])))}m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--){c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h))}return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c){m.access(a,b,h,c[h],!0,f,g)}}else{if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b)){for(;i>h;h++){b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)))}}}return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in {submit:!0,change:!0,focusin:!0}){c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1)}d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return !0}function bb(){return !1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--){f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0)}a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--){if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--){g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g))}i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else{for(o in k){m.event.remove(a,o+b[j],c,d,!0)}}}m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode){o.push(h),l=h}l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped()){b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault())}if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped()){(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type)){for(;i!=this;i=i.parentNode||this){if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++){d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d)}e.length&&g.push({elem:i,handlers:e})}}}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando]){return a}var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--){c=d[b],a[c]=f[c]}return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus){try{return this.focus(),!1}catch(a){}}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void (this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a){this.on(f,b,c,a[f],e)}return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1){d=bb}else{if(!d){return this}}return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj){return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this}if("object"==typeof a){for(e in a){this.off(e,b,a[e])}return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement){while(b.length){c.createElement(b.pop())}}return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f){for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++){!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b))}}return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++){m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h){for(d=0,e=h[c].length;e>d;d++){m.event.add(b,c,h[c][d])}}}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events){m.removeEvent(b,d,e.handle)}b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a))){for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g){d[g]&&Bb(e,d[g])}}if(b){if(c){for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++){Ab(e,d[g])}}else{Ab(a,f)}}return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++){if(f=a[q],f||0===f){if("object"===m.type(f)){m.merge(p,f.nodeType?[f]:f)}else{if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--){h=h.lastChild}if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--){m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild){h.removeChild(h.firstChild)}h=o.lastChild}else{p.push(b.createTextNode(f))}}}}h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++]){if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++]){ob.test(f.type||"")&&c.push(f)}}}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++){if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events){for(e in g.events){n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle)}}j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++){b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c))}return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild){a.removeChild(a.firstChild)}a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a){return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0}if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++){b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a)}b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p)){return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)})}if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++){d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j)}if(f){for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++){d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")))}}i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++){c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get())}return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a){return a}a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c){return c?void delete this.get:(this.get=b).apply(this,arguments)}}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b){g[f]=a.style[f],a.style[f]=b[f]}e=c.apply(a,d||[]);for(f in b){a.style[f]=g[f]}return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a){return b}var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--){if(b=Tb[e]+c,b in a){return b}}return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++){d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))))}for(g=0;h>g;g++){d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"))}return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2){"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)))}return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e)){return e}d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c){return g&&"get" in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]}if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set" in g&&void 0===(c=g.set(a,c,d))))){try{i[b]=c}catch(j){}}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get" in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?0.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++){e[a+T[d]+b]=f[d]||f[d-2]||f[0]}return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++){f[b[g]]=m.css(a,b[g],!1,d)}return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return 0.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do{h=h||".5",g/=h,m.style(c.elem,a,g+f)}while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b){c=T[e],d["margin"+c]=d["padding"+c]=a}return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++){if(d=e[f].call(c,b,a)){return d}}}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height" in b||"width" in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b){if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d]){continue}q=!0}o[d]=r&&r[d]||m.style(a,d)}else{j=void 0}}if(m.isEmptyObject(o)){"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j)}else{r?"hidden" in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o){m.style(a,b,o[b])}});for(d in o){g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}}function jc(a,b){var c,d,e,f,g;for(c in a){if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand" in g){f=g.expand(f),delete a[d];for(c in f){c in a||(a[c]=f[c],b[c]=e)}}else{b[d]=e}}}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e){return !1}for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++){j.tweens[g].run(f)}return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e){return this}for(e=!0;d>c;c++){j.tweens[c].run(1)}return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++){if(d=dc[f].call(j,a,k,j.opts)){return d}}return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++){c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)}},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e){g[e]&&g[e].stop&&d(g[e])}else{for(e in g){g[e]&&g[e].stop&&cc.test(e)&&d(g[e])}}for(e=f.length;e--;){f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1))}(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;){f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1))}for(b=0;g>b;b++){d[b]&&d[b].finish&&d[b].finish.call(this)}delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++){a=b[c],a()||b[c]!==a||b.splice(c--,1)}b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];if(arguments.length){return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set" in b&&void 0!==b.set(this,e,"value")||(this.value=e))})}if(e){return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get" in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++){if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f){return b}g.push(b)}}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--){if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0){try{d.selected=c=!0}catch(h){d.scrollHeight}}else{d.selected=!1}}return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f){return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get" in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set" in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType){while(c=f[e++]){d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)}}},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void (a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g){return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set" in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get" in e&&null!==(d=e.get(a,b))?d:a[b]}},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a)){return this.each(function(b){m(this).addClass(a.call(this,b,this.className))})}if(j){for(b=(a||"").match(E)||[];i>h;h++){if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++]){d.indexOf(" "+e+" ")<0&&(d+=e+" ")}g=m.trim(d),c.className!==g&&(c.className=g)}}}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a)){return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))})}if(j){for(b=(a||"").match(E)||[];i>h;h++){if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++]){while(d.indexOf(" "+e+" ")>=0){d=d.replace(" "+e+" "," ")}}g=a?m.trim(d):"",c.className!==g&&(c.className=g)}}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++]){e.hasClass(b)?e.removeClass(b):e.addClass(b)}}else{(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")}})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++){if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0){return !0}}return !1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse){return a.JSON.parse(b+"")}var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b){return null}try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c)){while(d=f[e++]){"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b){void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d])}return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0]){i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"))}if(e){for(g in h){if(h[g]&&h[g].test(e)){i.unshift(g);break}}}if(i[0] in c){f=i[0]}else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1]){for(g in a.converters){j[g.toLowerCase()]=a.converters[g]}}f=k.shift();while(f){if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift()){if("*"===f){f=i}else{if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g){for(e in j){if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}}}if(g!==!0){if(g&&a["throws"]){b=g(b)}else{try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}}}}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f)){j[b[1].toLowerCase()]=b[2]}}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a){if(2>t){for(b in a){q[b]=[q[b],a[b]]}}else{v.always(a[v.status])}}return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t){return v}h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers){v.setRequestHeader(d,k.headers[d])}if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t)){return v.abort()}u="abort";for(d in {success:1,error:1,complete:1}){v[d](k[d])}if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t)){throw w}x(-1,w)}}else{x(-1,"No Transport")}function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a)){return this.each(function(b){m(this).wrapAll(a.call(this,b))})}if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType){a=a.firstChild}return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return !m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b)){m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)})}else{if(c||"object"!==m.type(b)){d(a,b)}else{for(e in b){Vc(a+"["+e+"]",b[e],c,d)}}}}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a)){m.each(a,function(){e(this.name,this.value)})}else{for(c in a){Vc(c,a[c],b,e)}}return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return !this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc){Xc[a](void 0,!0)}}),k.cors=!!Yc&&"withCredentials" in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields){for(e in a.xhrFields){f[e]=a.xhrFields[e]}}a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c){void 0!==c[e]&&f.setRequestHeader(e,c[e]+"")}f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState)){if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e){4!==f.readyState&&f.abort()}else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a){return null}"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd){return bd.apply(this,arguments)}var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using" in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length){return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)})}var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f){return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d}},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position")){a=a.offsetParent}return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void (f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});(function(){window.uploadcare||(window.uploadcare={});uploadcare.namespace=function(path,fn){var first,part,parts,rest,target,_i,_len;parts=path.split(".");first=parts[0];rest=parts.slice(1);if(first==="uploadcare"){target=uploadcare}else{window[first]||(window[first]={});target=window[first]}for(_i=0,_len=rest.length;_i<_len;_i++){part=rest[_i];target[part]||(target[part]={});target=target[part]}return fn(target)};uploadcare.expose=function(key,value){var last,part,parts,source,target,_i,_len;parts=key.split(".");last=parts.pop();target=window.uploadcare;source=uploadcare;for(_i=0,_len=parts.length;_i<_len;_i++){part=parts[_i];target[part]||(target[part]={});target=target[part];source=source!=null?source[part]:void 0}return target[last]=value||source[last]}}).call(this);!function($){function rewriteSelector(context,name,argPos){var original=context[name];if(!original){return}context[name]=function(){arguments[argPos]=arguments[argPos].replace(/@([\w\u00c0-\uFFFF\-]+)/g,'[role~="$1"]');return original.apply(context,arguments)};$.extend(context[name],original)}rewriteSelector($,"find",0);rewriteSelector($,"multiFilter",0);rewriteSelector($.find,"matchesSelector",1);rewriteSelector($.find,"matches",0);function parse(roleString,without){var role,result=[],roles=$.trim(roleString).split(/\s+/);for(var i=0;i<roles.length;i++){role=roles[i];if(!~$.inArray(role,result)&&(!without||!~$.inArray(role,without))){result.push(role)}}return result}$.extend($.fn,{roles:function(){return parse(this.attr("role"))},hasRole:function(roleName){var roles=parse(roleName);for(var i=0;i<roles.length;i++){if(!this.is("@"+roles[i])){return false}}return true},addRole:function(roleName){if(this.hasRole(roleName)){return this}return this.each(function(_,element){var $el=$(element);$el.attr("role",parse($el.attr("role")+" "+roleName).join(" "))})},removeRole:function(roleName){if(!this.hasRole(roleName)){return this}return this.each(function(_,element){var $el=$(element);$el.attr("role",parse($el.attr("role"),parse(roleName)).join(" "))})},toggleRole:function(roleName){var roles=parse(roleName);for(var i=0;i<roles.length;i++){this[this.hasRole(roles[i])?"removeRole":"addRole"].call(this,roles[i])}return this}})}(jQuery);if(window.XDomainRequest){jQuery.ajaxTransport(function(s){if(s.crossDomain&&s.async){if(s.timeout){s.xdrTimeout=s.timeout;delete s.timeout}var xdr;return{send:function(_,complete){function callback(status,statusText,responses,responseHeaders){xdr.onload=xdr.onerror=xdr.ontimeout=function(){};xdr=undefined;complete(status,statusText,responses,responseHeaders)}xdr=new XDomainRequest();xdr.onload=function(){callback(200,"OK",{text:xdr.responseText},"Content-Type: "+xdr.contentType)};xdr.onerror=function(){callback(404,"Not Found")};xdr.onprogress=function(){};xdr.ontimeout=function(){callback(0,"timeout")};xdr.timeout=s.xdrTimeout||Number.MAX_VALUE;xdr.open(s.type,s.url.replace(/^https?:/,""));xdr.send((s.hasContent&&s.data)||null)},abort:function(){if(xdr){xdr.onerror=function(){};xdr.abort()}}}}})}(function($){function nearestFinder(targets){this.targets=targets;this.last=null;this.update()}nearestFinder.prototype={update:function(){var rows={};this.targets.each(function(i){var offset=$(this).offset();if(!(offset.top in rows)){rows[offset.top]=[]}rows[offset.top].push([offset.left+this.offsetWidth/2,this])});this.rows=rows},find:function(x,y){var minDistance=Infinity;var rows=this.rows;var nearestRow,top,nearest;for(top in rows){var distance=Math.abs(top-y);if(distance<minDistance){minDistance=distance;nearestRow=rows[top]}}minDistance=Math.abs(nearestRow[0][0]-x);nearest=nearestRow[0][1];for(var i=1;i<nearestRow.length;i++){var distance=Math.abs(nearestRow[i][0]-x);if(distance<minDistance){minDistance=distance;nearest=nearestRow[i][1]}}return nearest},findNotLast:function(x,y){var nearest=this.find(x,y);if(this.last&&nearest&&this.last==nearest){return null}return this.last=nearest}};$.fn.extend({moveable:function(o){o=$.extend({distance:4,anyButton:false,axis:false,zIndex:1000,start:$.noop,move:$.noop,finish:$.noop,items:null,keepFake:false,touch:true},o);function fixTouch(e){if(!o.touch){return}var touch,s;s=e.originalEvent.touches;if(s&&s.length){touch=s[0]}else{s=e.originalEvent.changedTouches;if(s&&s.length){touch=s[0]}else{return}}e.pageX=touch.pageX;e.pageY=touch.pageY;e.which=1}this.on("mousedown.moveable touchstart.movable",o.items,null,function(eDown){fixTouch(eDown);if(!o.anyButton&&eDown.which!=1){return}eDown.preventDefault();var dragged=false;var $dragged=$(this);var $fake=false;var originalPos=$dragged.position();originalPos.top+=$dragged.offsetParent().scrollTop();originalPos.left+=$dragged.offsetParent().scrollLeft();$(document).on("mousemove.moveable touchmove.movable",function(eMove){fixTouch(eMove);if(!dragged&&(Math.abs(eMove.pageX-eDown.pageX)>o.distance||Math.abs(eMove.pageY-eDown.pageY)>o.distance)){dragged=true;$fake=$dragged.clone().css({position:"absolute",zIndex:o.zIndex,width:$dragged.width()}).appendTo($dragged.offsetParent());o.start({event:eMove,dragged:$dragged,fake:$fake})}if(!dragged){return}eMove.preventDefault();var dx=o.axis=="y"?0:eMove.pageX-eDown.pageX;var dy=o.axis=="x"?0:eMove.pageY-eDown.pageY;$fake.css({left:dx+originalPos.left,top:dy+originalPos.top});o.move({event:eMove,dragged:$dragged,fake:$fake,dx:dx,dy:dy})});$(document).on("mouseup.moveable touchend.movable touchcancel.movable touchleave.movable",function(eUp){fixTouch(eUp);$(document).off("mousemove.moveable touchmove.movable");$(document).off("mouseup.moveable touchend.movable touchcancel.movable touchleave.movable");if(!dragged){return}eUp.preventDefault();var dx=eUp.pageX-eDown.pageX;var dy=eUp.pageY-eDown.pageY;dragged=false;o.finish({event:eUp,dragged:$dragged,fake:$fake,dx:dx,dy:dy});if(!o.keepFake){$fake.remove()}})})},sortable:function(o){var oMovable=$.extend({items:">*"},o);var o=$.extend({checkBounds:function(){return true},start:$.noop,attach:$.noop,move:$.noop,finish:$.noop},o);var finder;var initialNext=false;var parent=this;oMovable.start=function(info){o.start(info);finder=new nearestFinder(parent.find(oMovable.items));initialNext=info.dragged.next()};oMovable.move=function(info){info.nearest=null;if(o.checkBounds(info)){var offset=info.fake.offset();var nearest=finder.findNotLast(offset.left+info.dragged.width()/2,offset.top);info.nearest=$(nearest);if(nearest&&nearest!=info.dragged[0]){if(info.dragged.nextAll().filter(nearest).length>0){info.dragged.insertAfter(nearest)}else{info.dragged.insertBefore(nearest)}o.attach(info);finder.last=null;finder.update()}}else{if(finder.last!==null){finder.last=null;if(initialNext.length){info.dragged.insertBefore(initialNext)}else{info.dragged.parent().append(info.dragged)}o.attach(info);finder.update()}}o.move(info)};oMovable.finish=function(info){var offset=info.fake.offset();info.nearest=null;if(o.checkBounds(info)){info.nearest=$(finder.find(offset.left+info.dragged.width()/2,offset.top))}o.finish(info);finder=null};return this.moveable(oMovable)}})})(jQuery);(function(){uploadcare.jQuery=jQuery}).call(this);
9
- /*!
10
- * Pusher JavaScript Library v1.12.2
11
- * http://pusherapp.com/
12
- *
13
- * Copyright 2011, Pusher
14
- * Released under the MIT licence.
15
- */
16
- (function(){var Pusher,_require;(function(){if(Function.prototype.scopedTo===undefined){Function.prototype.scopedTo=function(context,args){var f=this;return function(){return f.apply(context,Array.prototype.slice.call(args||[]).concat(Array.prototype.slice.call(arguments)))}}}Pusher=function(app_key,options){this.options=options||{};this.key=app_key;this.channels=new Pusher.Channels();this.global_emitter=new Pusher.EventsDispatcher();var self=this;this.checkAppKey();this.connection=new Pusher.Connection(this.key,this.options);this.connection.bind("connected",function(){self.subscribeAll()}).bind("message",function(params){var internal=(params.event.indexOf("pusher_internal:")===0);if(params.channel){var channel;if(channel=self.channel(params.channel)){channel.emit(params.event,params.data)}}if(!internal){self.global_emitter.emit(params.event,params.data)}}).bind("disconnected",function(){self.channels.disconnect()}).bind("error",function(err){Pusher.warn("Error",err)});Pusher.instances.push(this);if(Pusher.isReady){self.connect()}};Pusher.instances=[];Pusher.prototype={channel:function(name){return this.channels.find(name)},connect:function(){this.connection.connect()},disconnect:function(){this.connection.disconnect()},bind:function(event_name,callback){this.global_emitter.bind(event_name,callback);return this},bind_all:function(callback){this.global_emitter.bind_all(callback);return this},subscribeAll:function(){var channel;for(channelName in this.channels.channels){if(this.channels.channels.hasOwnProperty(channelName)){this.subscribe(channelName)}}},subscribe:function(channel_name){var self=this;var channel=this.channels.add(channel_name,this);if(this.connection.state==="connected"){channel.authorize(this.connection.socket_id,this.options,function(err,data){if(err){channel.emit("pusher:subscription_error",data)}else{self.send_event("pusher:subscribe",{channel:channel_name,auth:data.auth,channel_data:data.channel_data})}})}return channel},unsubscribe:function(channel_name){this.channels.remove(channel_name);if(this.connection.state==="connected"){this.send_event("pusher:unsubscribe",{channel:channel_name})}},send_event:function(event_name,data,channel){return this.connection.send_event(event_name,data,channel)},checkAppKey:function(){if(this.key===null||this.key===undefined){Pusher.warn("Warning","You must pass your app key when you instantiate Pusher.")}}};Pusher.Util={extend:function extend(target,extensions){for(var property in extensions){if(extensions[property]&&extensions[property].constructor&&extensions[property].constructor===Object){target[property]=extend(target[property]||{},extensions[property])}else{target[property]=extensions[property]}}return target},stringify:function stringify(){var m=["Pusher"];for(var i=0;i<arguments.length;i++){if(typeof arguments[i]==="string"){m.push(arguments[i])}else{if(window.JSON==undefined){m.push(arguments[i].toString())}else{m.push(JSON.stringify(arguments[i]))}}}return m.join(" : ")},arrayIndexOf:function(array,item){var nativeIndexOf=Array.prototype.indexOf;if(array==null){return -1}if(nativeIndexOf&&array.indexOf===nativeIndexOf){return array.indexOf(item)}for(i=0,l=array.length;i<l;i++){if(array[i]===item){return i}}return -1}};Pusher.debug=function(){if(!Pusher.log){return}Pusher.log(Pusher.Util.stringify.apply(this,arguments))};Pusher.warn=function(){if(window.console&&window.console.warn){window.console.warn(Pusher.Util.stringify.apply(this,arguments))}else{if(!Pusher.log){return}Pusher.log(Pusher.Util.stringify.apply(this,arguments))}};Pusher.VERSION="1.12.2";Pusher.host="ws.pusherapp.com";Pusher.ws_port=80;Pusher.wss_port=443;Pusher.channel_auth_endpoint="/pusher/auth";Pusher.cdn_http="http://js.pusher.com/";Pusher.cdn_https="https://d3dy5gmtp8yhk7.cloudfront.net/";Pusher.dependency_suffix=".min";Pusher.channel_auth_transport="ajax";Pusher.activity_timeout=120000;Pusher.pong_timeout=30000;Pusher.isReady=false;Pusher.ready=function(){Pusher.isReady=true;for(var i=0,l=Pusher.instances.length;i<l;i++){Pusher.instances[i].connect()}}})();(function(){function CallbackRegistry(){this._callbacks={}}CallbackRegistry.prototype.get=function(eventName){return this._callbacks[this._prefix(eventName)]};CallbackRegistry.prototype.add=function(eventName,callback){var prefixedEventName=this._prefix(eventName);this._callbacks[prefixedEventName]=this._callbacks[prefixedEventName]||[];this._callbacks[prefixedEventName].push(callback)};CallbackRegistry.prototype.remove=function(eventName,callback){if(this.get(eventName)){var index=Pusher.Util.arrayIndexOf(this.get(eventName),callback);this._callbacks[this._prefix(eventName)].splice(index,1)}};CallbackRegistry.prototype._prefix=function(eventName){return"_"+eventName};function EventsDispatcher(failThrough){this.callbacks=new CallbackRegistry();this.global_callbacks=[];this.failThrough=failThrough}EventsDispatcher.prototype.bind=function(eventName,callback){this.callbacks.add(eventName,callback);return this};EventsDispatcher.prototype.unbind=function(eventName,callback){this.callbacks.remove(eventName,callback);return this};EventsDispatcher.prototype.emit=function(eventName,data){for(var i=0;i<this.global_callbacks.length;i++){this.global_callbacks[i](eventName,data)}var callbacks=this.callbacks.get(eventName);if(callbacks){for(var i=0;i<callbacks.length;i++){callbacks[i](data)}}else{if(this.failThrough){this.failThrough(eventName,data)}}return this};EventsDispatcher.prototype.bind_all=function(callback){this.global_callbacks.push(callback);return this};Pusher.EventsDispatcher=EventsDispatcher})();(function(){function capitalize(str){return str.substr(0,1).toUpperCase()+str.substr(1)}function safeCall(method,obj,data){if(obj[method]!==undefined){obj[method](data)}}function Machine(initialState,transitions,stateActions){Pusher.EventsDispatcher.call(this);this.state=undefined;this.errors=[];this.stateActions=stateActions;this.transitions=transitions;this.transition(initialState)}Machine.prototype.transition=function(nextState,data){var prevState=this.state;var stateCallbacks=this.stateActions;if(prevState&&(Pusher.Util.arrayIndexOf(this.transitions[prevState],nextState)==-1)){this.emit("invalid_transition_attempt",{oldState:prevState,newState:nextState});throw new Error("Invalid transition ["+prevState+" to "+nextState+"]")}safeCall(prevState+"Exit",stateCallbacks,data);safeCall(prevState+"To"+capitalize(nextState),stateCallbacks,data);safeCall(nextState+"Pre",stateCallbacks,data);this.state=nextState;this.emit("state_change",{oldState:prevState,newState:nextState});safeCall(nextState+"Post",stateCallbacks,data)};Machine.prototype.is=function(state){return this.state===state};Machine.prototype.isNot=function(state){return this.state!==state};Pusher.Util.extend(Machine.prototype,Pusher.EventsDispatcher.prototype);Pusher.Machine=Machine})();(function(){var NetInfo=function(){var self=this;Pusher.EventsDispatcher.call(this);if(window.addEventListener!==undefined){window.addEventListener("online",function(){self.emit("online",null)},false);window.addEventListener("offline",function(){self.emit("offline",null)},false)}};NetInfo.prototype.isOnLine=function(){if(window.navigator.onLine===undefined){return true}else{return window.navigator.onLine}};Pusher.Util.extend(NetInfo.prototype,Pusher.EventsDispatcher.prototype);Pusher.NetInfo=NetInfo})();(function(){var machineTransitions={initialized:["waiting","failed"],waiting:["connecting","permanentlyClosed"],connecting:["open","permanentlyClosing","impermanentlyClosing","waiting"],open:["connected","permanentlyClosing","impermanentlyClosing","waiting"],connected:["permanentlyClosing","waiting"],impermanentlyClosing:["waiting","permanentlyClosing"],permanentlyClosing:["permanentlyClosed"],permanentlyClosed:["waiting","failed"],failed:["permanentlyClosed"]};var UNSUCCESSFUL_CONNECTION_ATTEMPT_ADDITIONAL_WAIT=2000;var UNSUCCESSFUL_OPEN_ATTEMPT_ADDITIONAL_TIMEOUT=2000;var UNSUCCESSFUL_CONNECTED_ATTEMPT_ADDITIONAL_TIMEOUT=2000;var MAX_CONNECTION_ATTEMPT_WAIT=5*UNSUCCESSFUL_CONNECTION_ATTEMPT_ADDITIONAL_WAIT;var MAX_OPEN_ATTEMPT_TIMEOUT=5*UNSUCCESSFUL_OPEN_ATTEMPT_ADDITIONAL_TIMEOUT;var MAX_CONNECTED_ATTEMPT_TIMEOUT=5*UNSUCCESSFUL_CONNECTED_ATTEMPT_ADDITIONAL_TIMEOUT;function resetConnectionParameters(connection){connection.connectionWait=0;if(Pusher.TransportType==="flash"){connection.openTimeout=5000}else{connection.openTimeout=2000}connection.connectedTimeout=2000;connection.connectionSecure=connection.compulsorySecure;connection.connectionAttempts=0}function Connection(key,options){var self=this;Pusher.EventsDispatcher.call(this);this.options=Pusher.Util.extend({encrypted:false},options);this.netInfo=new Pusher.NetInfo();this.netInfo.bind("online",function(){if(self._machine.is("waiting")){self._machine.transition("connecting");updateState("connecting")}});this.netInfo.bind("offline",function(){if(self._machine.is("connected")){self.socket.onclose=undefined;self.socket.onmessage=undefined;self.socket.onerror=undefined;self.socket.onopen=undefined;self.socket.close();self.socket=undefined;self._machine.transition("waiting")}});this._machine=new Pusher.Machine("initialized",machineTransitions,{initializedPre:function(){self.compulsorySecure=self.options.encrypted;self.key=key;self.socket=null;self.socket_id=null;self.state="initialized"},waitingPre:function(){if(self.connectionWait>0){self.emit("connecting_in",self.connectionWait)}if(self.netInfo.isOnLine()&&self.connectionAttempts<=4){updateState("connecting")}else{updateState("unavailable")}if(self.netInfo.isOnLine()){self._waitingTimer=setTimeout(function(){self._machine.transition("connecting")},connectionDelay())}},waitingExit:function(){clearTimeout(self._waitingTimer)},connectingPre:function(){if(self.netInfo.isOnLine()===false){self._machine.transition("waiting");updateState("unavailable");return}var url=formatURL(self.key,self.connectionSecure);Pusher.debug("Connecting",url);self.socket=new Pusher.Transport(url);self.socket.onopen=ws_onopen;self.socket.onclose=transitionToWaiting;self.socket.onerror=ws_onError;self._connectingTimer=setTimeout(TransitionToImpermanentlyClosing,self.openTimeout)},connectingExit:function(){clearTimeout(self._connectingTimer);self.socket.onopen=undefined},connectingToWaiting:function(){updateConnectionParameters()},connectingToImpermanentlyClosing:function(){updateConnectionParameters()},openPre:function(){self.socket.onmessage=ws_onMessageOpen;self.socket.onerror=ws_onError;self.socket.onclose=transitionToWaiting;self._openTimer=setTimeout(TransitionToImpermanentlyClosing,self.connectedTimeout)},openExit:function(){clearTimeout(self._openTimer);self.socket.onmessage=undefined},openToWaiting:function(){updateConnectionParameters()},openToImpermanentlyClosing:function(){updateConnectionParameters()},connectedPre:function(socket_id){self.socket_id=socket_id;self.socket.onmessage=ws_onMessageConnected;self.socket.onerror=ws_onError;self.socket.onclose=transitionToWaiting;resetConnectionParameters(self);self.connectedAt=new Date().getTime();resetActivityCheck()},connectedPost:function(){updateState("connected")},connectedExit:function(){stopActivityCheck();updateState("disconnected")},impermanentlyClosingPost:function(){if(self.socket){self.socket.onclose=transitionToWaiting;self.socket.close()}},permanentlyClosingPost:function(){if(self.socket){self.socket.onclose=function(){resetConnectionParameters(self);self._machine.transition("permanentlyClosed")};self.socket.close()}else{resetConnectionParameters(self);self._machine.transition("permanentlyClosed")}},failedPre:function(){updateState("failed");Pusher.debug("WebSockets are not available in this browser.")},permanentlyClosedPost:function(){updateState("disconnected")}});function updateConnectionParameters(){if(self.connectionWait<MAX_CONNECTION_ATTEMPT_WAIT){self.connectionWait+=UNSUCCESSFUL_CONNECTION_ATTEMPT_ADDITIONAL_WAIT}if(self.openTimeout<MAX_OPEN_ATTEMPT_TIMEOUT){self.openTimeout+=UNSUCCESSFUL_OPEN_ATTEMPT_ADDITIONAL_TIMEOUT}if(self.connectedTimeout<MAX_CONNECTED_ATTEMPT_TIMEOUT){self.connectedTimeout+=UNSUCCESSFUL_CONNECTED_ATTEMPT_ADDITIONAL_TIMEOUT}if(self.compulsorySecure!==true){self.connectionSecure=!self.connectionSecure}self.connectionAttempts++}function formatURL(key,isSecure){var port=Pusher.ws_port;var protocol="ws://";if(isSecure||document.location.protocol==="https:"){port=Pusher.wss_port;protocol="wss://"}var flash=(Pusher.TransportType==="flash")?"true":"false";return protocol+Pusher.host+":"+port+"/app/"+key+"?protocol=5&client=js&version="+Pusher.VERSION+"&flash="+flash}function TransitionToImpermanentlyClosing(){self._machine.transition("impermanentlyClosing")}function resetActivityCheck(){if(self._activityTimer){clearTimeout(self._activityTimer)}self._activityTimer=setTimeout(function(){self.send_event("pusher:ping",{});self._activityTimer=setTimeout(function(){self.socket.close()},(self.options.pong_timeout||Pusher.pong_timeout))},(self.options.activity_timeout||Pusher.activity_timeout))}function stopActivityCheck(){if(self._activityTimer){clearTimeout(self._activityTimer)}}function connectionDelay(){var delay=self.connectionWait;if(delay===0){if(self.connectedAt){var t=1000;var connectedFor=new Date().getTime()-self.connectedAt;if(connectedFor<t){delay=t-connectedFor}}}return delay}function ws_onopen(){self._machine.transition("open")}function handleCloseCode(code,message){self.emit("error",{type:"PusherError",data:{code:code,message:message}});if(code===4000){self.compulsorySecure=true;self.connectionSecure=true;self.options.encrypted=true;TransitionToImpermanentlyClosing()}else{if(code<4100){self._machine.transition("permanentlyClosing")}else{if(code<4200){self.connectionWait=1000;self._machine.transition("waiting")}else{if(code<4300){TransitionToImpermanentlyClosing()}else{self._machine.transition("permanentlyClosing")}}}}}function ws_onMessageOpen(event){var params=parseWebSocketEvent(event);if(params!==undefined){if(params.event==="pusher:connection_established"){self._machine.transition("connected",params.data.socket_id)}else{if(params.event==="pusher:error"){handleCloseCode(params.data.code,params.data.message)}}}}function ws_onMessageConnected(event){resetActivityCheck();var params=parseWebSocketEvent(event);if(params!==undefined){Pusher.debug("Event recd",params);switch(params.event){case"pusher:error":self.emit("error",{type:"PusherError",data:params.data});break;case"pusher:ping":self.send_event("pusher:pong",{});break}self.emit("message",params)}}function parseWebSocketEvent(event){try{var params=JSON.parse(event.data);if(typeof params.data==="string"){try{params.data=JSON.parse(params.data)}catch(e){if(!(e instanceof SyntaxError)){throw e}}}return params}catch(e){self.emit("error",{type:"MessageParseError",error:e,data:event.data})}}function transitionToWaiting(){self._machine.transition("waiting")}function ws_onError(error){self.emit("error",{type:"WebSocketError",error:error})}function updateState(newState,data){var prevState=self.state;self.state=newState;if(prevState!==newState){Pusher.debug("State changed",prevState+" -> "+newState);self.emit("state_change",{previous:prevState,current:newState});self.emit(newState,data)}}}Connection.prototype.connect=function(){if(!this._machine.is("failed")&&!Pusher.Transport){this._machine.transition("failed")}else{if(this._machine.is("initialized")){resetConnectionParameters(this);this._machine.transition("waiting")}else{if(this._machine.is("waiting")&&this.netInfo.isOnLine()===true){this._machine.transition("connecting")}else{if(this._machine.is("permanentlyClosed")){resetConnectionParameters(this);this._machine.transition("waiting")}}}}};Connection.prototype.send=function(data){if(this._machine.is("connected")){var self=this;setTimeout(function(){self.socket.send(data)},0);return true}else{return false}};Connection.prototype.send_event=function(event_name,data,channel){var payload={event:event_name,data:data};if(channel){payload.channel=channel}Pusher.debug("Event sent",payload);return this.send(JSON.stringify(payload))};Connection.prototype.disconnect=function(){if(this._machine.is("permanentlyClosed")){return}if(this._machine.is("waiting")||this._machine.is("failed")){this._machine.transition("permanentlyClosed")}else{this._machine.transition("permanentlyClosing")}};Pusher.Util.extend(Connection.prototype,Pusher.EventsDispatcher.prototype);Pusher.Connection=Connection})();(function(){Pusher.Channels=function(){this.channels={}};Pusher.Channels.prototype={add:function(channel_name,pusher){var existing_channel=this.find(channel_name);if(!existing_channel){var channel=Pusher.Channel.factory(channel_name,pusher);this.channels[channel_name]=channel;return channel}else{return existing_channel}},find:function(channel_name){return this.channels[channel_name]},remove:function(channel_name){delete this.channels[channel_name]},disconnect:function(){for(var channel_name in this.channels){this.channels[channel_name].disconnect()}}};Pusher.Channel=function(channel_name,pusher){var self=this;Pusher.EventsDispatcher.call(this,function(event_name,event_data){Pusher.debug("No callbacks on "+channel_name+" for "+event_name)});this.pusher=pusher;this.name=channel_name;this.subscribed=false;this.bind("pusher_internal:subscription_succeeded",function(data){self.onSubscriptionSucceeded(data)})};Pusher.Channel.prototype={init:function(){},disconnect:function(){this.subscribed=false;this.emit("pusher_internal:disconnected")},onSubscriptionSucceeded:function(data){this.subscribed=true;this.emit("pusher:subscription_succeeded")},authorize:function(socketId,options,callback){return callback(false,{})},trigger:function(event,data){return this.pusher.send_event(event,data,this.name)}};Pusher.Util.extend(Pusher.Channel.prototype,Pusher.EventsDispatcher.prototype);Pusher.Channel.PrivateChannel={authorize:function(socketId,options,callback){var self=this;var authorizer=new Pusher.Channel.Authorizer(this,Pusher.channel_auth_transport,options);return authorizer.authorize(socketId,function(err,authData){if(!err){self.emit("pusher_internal:authorized",authData)}callback(err,authData)})}};Pusher.Channel.PresenceChannel={init:function(){this.members=new Members(this)},onSubscriptionSucceeded:function(data){this.subscribed=true}};var Members=function(channel){var self=this;var reset=function(){this._members_map={};this.count=0;this.me=null};reset.call(this);channel.bind("pusher_internal:authorized",function(authorizedData){var channelData=JSON.parse(authorizedData.channel_data);channel.bind("pusher_internal:subscription_succeeded",function(subscriptionData){self._members_map=subscriptionData.presence.hash;self.count=subscriptionData.presence.count;self.me=self.get(channelData.user_id);channel.emit("pusher:subscription_succeeded",self)})});channel.bind("pusher_internal:member_added",function(data){if(self.get(data.user_id)===null){self.count++}self._members_map[data.user_id]=data.user_info;channel.emit("pusher:member_added",self.get(data.user_id))});channel.bind("pusher_internal:member_removed",function(data){var member=self.get(data.user_id);if(member){delete self._members_map[data.user_id];self.count--;channel.emit("pusher:member_removed",member)}});channel.bind("pusher_internal:disconnected",function(){reset.call(self)})};Members.prototype={each:function(callback){for(var i in this._members_map){callback(this.get(i))}},get:function(user_id){if(this._members_map.hasOwnProperty(user_id)){return{id:user_id,info:this._members_map[user_id]}}else{return null}}};Pusher.Channel.factory=function(channel_name,pusher){var channel=new Pusher.Channel(channel_name,pusher);if(channel_name.indexOf("private-")===0){Pusher.Util.extend(channel,Pusher.Channel.PrivateChannel)}else{if(channel_name.indexOf("presence-")===0){Pusher.Util.extend(channel,Pusher.Channel.PrivateChannel);Pusher.Util.extend(channel,Pusher.Channel.PresenceChannel)}}channel.init();return channel}})();(function(){Pusher.Channel.Authorizer=function(channel,type,options){this.channel=channel;this.type=type;this.authOptions=(options||{}).auth||{}};Pusher.Channel.Authorizer.prototype={composeQuery:function(socketId){var query="&socket_id="+encodeURIComponent(socketId)+"&channel_name="+encodeURIComponent(this.channel.name);for(var i in this.authOptions.params){query+="&"+encodeURIComponent(i)+"="+encodeURIComponent(this.authOptions.params[i])}return query},authorize:function(socketId,callback){return Pusher.authorizers[this.type].call(this,socketId,callback)}};Pusher.auth_callbacks={};Pusher.authorizers={ajax:function(socketId,callback){var self=this,xhr;if(Pusher.XHR){xhr=new Pusher.XHR()}else{xhr=(window.XMLHttpRequest?new window.XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP"))}xhr.open("POST",Pusher.channel_auth_endpoint,true);xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var headerName in this.authOptions.headers){xhr.setRequestHeader(headerName,this.authOptions.headers[headerName])}xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){var data,parsed=false;try{data=JSON.parse(xhr.responseText);parsed=true}catch(e){callback(true,"JSON returned from webapp was invalid, yet status code was 200. Data was: "+xhr.responseText)}if(parsed){callback(false,data)}}else{Pusher.warn("Couldn't get auth info from your webapp",xhr.status);callback(true,xhr.status)}}};xhr.send(this.composeQuery(socketId));return xhr},jsonp:function(socketId,callback){if(this.authOptions.headers!==undefined){Pusher.warn("Warn","To send headers with the auth request, you must use AJAX, rather than JSONP.")}var script=document.createElement("script");Pusher.auth_callbacks[this.channel.name]=function(data){callback(false,data)};var callback_name="Pusher.auth_callbacks['"+this.channel.name+"']";script.src=Pusher.channel_auth_endpoint+"?callback="+encodeURIComponent(callback_name)+this.composeQuery(socketId);var head=document.getElementsByTagName("head")[0]||document.documentElement;head.insertBefore(script,head.firstChild)}}})();var _require=(function(){function handleScriptLoaded(elem,callback){if(document.addEventListener){elem.addEventListener("load",callback,false)}else{elem.attachEvent("onreadystatechange",function(){if(elem.readyState=="loaded"||elem.readyState=="complete"){callback()}})}}function addScript(src,callback){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.setAttribute("src",src);script.setAttribute("type","text/javascript");script.setAttribute("async",true);handleScriptLoaded(script,function(){callback()});head.appendChild(script)}return function(deps,callback){var deps_loaded=0;for(var i=0;i<deps.length;i++){addScript(deps[i],function(){if(deps.length==++deps_loaded){setTimeout(callback,0)}})}}})();(function(){if(!window.WebSocket&&window.MozWebSocket){window.WebSocket=window.MozWebSocket}if(window.WebSocket){Pusher.Transport=window.WebSocket;Pusher.TransportType="native"}var cdn=(document.location.protocol=="http:")?Pusher.cdn_http:Pusher.cdn_https;var root=cdn+Pusher.VERSION;var deps=[];if(!window.JSON){deps.push(root+"/json2"+Pusher.dependency_suffix+".js")}if(!window.WebSocket){window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION=true;deps.push(root+"/flashfallback"+Pusher.dependency_suffix+".js")}var initialize=function(){if(window.WebSocket){return function(){Pusher.ready()}}else{return function(){if(window.WebSocket){Pusher.Transport=window.WebSocket;Pusher.TransportType="flash";window.WEB_SOCKET_SWF_LOCATION="https://s3.amazonaws.com/uploadcare-static/WebSocketMainInsecure.swf";WebSocket.__addTask(function(){Pusher.ready()});WebSocket.__initialize()}else{Pusher.Transport=null;Pusher.TransportType="none";Pusher.ready()}}}}();var ondocumentbody=function(callback){var load_body=function(){document.body?callback():setTimeout(load_body,0)};load_body()};var initializeOnDocumentBody=function(){ondocumentbody(initialize)};if(deps.length>0){_require(deps,initializeOnDocumentBody)}else{initializeOnDocumentBody()}})();this.Pusher=Pusher}).call(uploadcare);(function(){}).call(this);(function(){uploadcare.namespace("uploadcare.utils.abilities",function(ns){ns.fileAPI=!!(window.File&&window.FileList&&window.FileReader);ns.sendFileAPI=!!(window.FormData&&ns.fileAPI);ns.blob=(function(){try{return !!new Blob}catch(_error){return false}})();ns.dragAndDrop=(function(){var el;el=document.createElement("div");return("draggable" in el)||("ondragstart" in el&&"ondrop" in el)})();ns.canvas=(function(){var el;el=document.createElement("canvas");return !!(el.getContext&&el.getContext("2d"))})();return ns.fileDragAndDrop=ns.fileAPI&&ns.dragAndDrop})}).call(this);(function(){uploadcare.namespace("uploadcare.utils.pusher",function(ns){var hasOwners,pusherInstance,pusherWrapped,pushers,releasePusher,updateConnection;pushers={};ns.getPusher=function(key,owner){if(!(key in pushers)){pushers[key]={instance:null,owners:{}}}if(!pushers[key].owners[owner]){pushers[key].owners[owner]=true}updateConnection(key);return pusherWrapped(key,owner)};releasePusher=function(key,owner){if(!pushers[key].owners[owner]){return}pushers[key].owners[owner]=false;return updateConnection(key)};hasOwners=function(key){var owner;return((function(){var _results;_results=[];for(owner in pushers[key].owners){if(pushers[key].owners[owner]){_results.push(owner)}}return _results})()).length>0};updateConnection=function(key){var instance;instance=pusherInstance(key);if(hasOwners(key)){return instance.connect()}else{return setTimeout((function(){if(!hasOwners(key)){return instance.disconnect()}}),5000)}};pusherInstance=function(key){var _ref;if(((_ref=pushers[key])!=null?_ref.instance:void 0)!=null){return pushers[key].instance}return pushers[key].instance=new uploadcare.Pusher(key)};return pusherWrapped=function(key,owner){var Wrapped;Wrapped=function(){this.owner=owner;this.release=function(){return releasePusher(key,owner)};return this};Wrapped.prototype=pusherInstance(key);return new Wrapped()}})}).call(this);(function(){var $,namespace,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child},__indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++){if(i in this&&this[i]===item){return i}}return -1},__slice=[].slice;namespace=uploadcare.namespace,$=uploadcare.jQuery;namespace("uploadcare.utils",function(utils){var _ref;utils.Collection=(function(){function Collection(items){var item,_i,_len;if(items==null){items=[]}this.onAdd=$.Callbacks();this.onRemove=$.Callbacks();this.onReplaced=$.Callbacks();this.onSorted=$.Callbacks();this.__items=[];for(_i=0,_len=items.length;_i<_len;_i++){item=items[_i];this.add(item)}}Collection.prototype.add=function(item){this.__items.push(item);return this.onAdd.fire(item)};Collection.prototype.remove=function(item){if(utils.remove(this.__items,item)){return this.onRemove.fire(item)}};Collection.prototype.clear=function(){var item,_i,_len,_ref,_results;_ref=this.get();_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){item=_ref[_i];_results.push(this.remove(item))}return _results};Collection.prototype.replace=function(oldItem,newItem){var i,item,_i,_len,_ref,_results;if(oldItem!==newItem){_ref=this.__items;_results=[];for(i=_i=0,_len=_ref.length;_i<_len;i=++_i){item=_ref[i];if(item===oldItem){_results.push(this.__replace(oldItem,newItem,i))}else{_results.push(void 0)}}return _results}};Collection.prototype.__replace=function(oldItem,newItem,i){this.__items[i]=newItem;return this.onReplaced.fire(oldItem,newItem,i)};Collection.prototype.sort=function(comparator){this.__items.sort(comparator);return this.onSorted.fire()};Collection.prototype.get=function(index){if(index!=null){return this.__items[index]}else{return this.__items.slice(0)}};Collection.prototype.length=function(){return this.__items.length};return Collection})();utils.UniqCollection=(function(_super){__extends(UniqCollection,_super);function UniqCollection(){_ref=UniqCollection.__super__.constructor.apply(this,arguments);return _ref}UniqCollection.prototype.add=function(item){if(__indexOf.call(this.__items,item)>=0){return}return UniqCollection.__super__.add.apply(this,arguments)};UniqCollection.prototype.__replace=function(oldItem,newItem,i){if(__indexOf.call(this.__items,newItem)>=0){return this.remove(oldItem)}else{return UniqCollection.__super__.__replace.apply(this,arguments)}};return UniqCollection})(utils.Collection);return utils.CollectionOfPromises=(function(_super){__extends(CollectionOfPromises,_super);function CollectionOfPromises(){this.onAnyDone=$.Callbacks();this.onAnyFail=$.Callbacks();this.onAnyProgress=$.Callbacks();this.onAnyProgress.add(function(item,firstArgument){return $(item).data("lastProgress",firstArgument)});CollectionOfPromises.__super__.constructor.apply(this,arguments)}CollectionOfPromises.prototype.lastProgresses=function(){var item,_i,_len,_ref1,_results;_ref1=this.__items;_results=[];for(_i=0,_len=_ref1.length;_i<_len;_i++){item=_ref1[_i];_results.push($(item).data("lastProgress"))}return _results};CollectionOfPromises.prototype.add=function(item){if(!(item&&item.done&&item.fail&&item.then)){return}CollectionOfPromises.__super__.add.apply(this,arguments);return this.__watchItem(item)};CollectionOfPromises.prototype.__watchItem=function(item){var handler,_this=this;handler=function(callbacks){return function(){var args;args=1<=arguments.length?__slice.call(arguments,0):[];if(__indexOf.call(_this.__items,item)>=0){args.unshift(item);return callbacks.fire.apply(callbacks,args)}}};return item.then(handler(this.onAnyDone),handler(this.onAnyFail),handler(this.onAnyProgress))};CollectionOfPromises.prototype.__replace=function(oldItem,newItem,i){if(!(newItem&&newItem.done&&newItem.fail&&newItem.then)){return this.remove(oldItem)}else{CollectionOfPromises.__super__.__replace.apply(this,arguments);return this.__watchItem(newItem)}};return CollectionOfPromises})(utils.UniqCollection)})}).call(this);(function(){var namespace;namespace=uploadcare.namespace;namespace("uploadcare.utils",function(ns){var common,messages;ns.log=function(msg){if(window.console&&console.log){return console.log(msg)}else{}};ns.warn=function(msg){if(window.console&&console.warn){return console.warn(msg)}else{return ns.log("Warning: "+msg)}};messages={};ns.warnOnce=function(msg){if(messages[msg]==null){messages[msg]=true;return ns.warn(msg)}};common={autostore:"You have enabled autostore in the widget, but not on the server.\nTo use autostore, make sure it's enabled in project settings.\n\nhttps://uploadcare.com/accounts/settings/",publicKey:"Global public key not set. Uploads may not work!\nAdd this to the <head> tag to set your key:\n\n<script>\nUPLOADCARE_PUBLIC_KEY = 'your_public_key';\n<\/script>"};return ns.commonWarning=function(name){if(common[name]!=null){return ns.warnOnce(common[name])}}})}).call(this);(function(){var $,namespace,__indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++){if(i in this&&this[i]===item){return i}}return -1};namespace=uploadcare.namespace,$=uploadcare.jQuery;namespace("uploadcare.utils",function(ns){ns.unique=function(arr){var item,result,_i,_len;result=[];for(_i=0,_len=arr.length;_i<_len;_i++){item=arr[_i];if(__indexOf.call(result,item)<0){result.push(item)}}return result};ns.imageLoader=function(src){var def;def=$.Deferred();$(new Image).on("load",def.resolve).on("error",def.reject).attr("src",src);return def.promise()};ns.defer=function(fn){return setTimeout(fn,0)};ns.gcd=function(a,b){var c;while(b){c=a%b;a=b;b=c}return a};ns.once=function(fn){var called,result;called=false;result=null;return function(){if(!called){result=fn.apply(this,arguments);called=true}return result}};ns.wrapToPromise=function(value){return $.Deferred().resolve(value).promise()};ns.remove=function(array,item){var index;index=$.inArray(item,array);if(index!==-1){array.splice(index,1);return true}else{return false}};ns.then=function(pr,doneFilter,failFilter,progressFilter){var compose,df;df=$.Deferred();compose=function(fn1,fn2){if(fn1&&fn2){return function(){return fn2.call(this,fn1.apply(this,arguments))}}else{return fn1||fn2}};pr.then(compose(doneFilter,df.resolve),compose(failFilter,df.reject),compose(progressFilter,df.notify));return df.promise()};ns.bindAll=function(source,methods){var target;target={};$.each(methods,function(i,method){var fn;fn=source[method];if($.isFunction(fn)){return target[method]=function(){var result;result=fn.apply(source,arguments);if(result===source){return target}else{return result}}}else{return target[method]=fn}});return target};ns.upperCase=function(s){return s.replace(/-/g,"_").toUpperCase()};ns.publicCallbacks=function(callbacks){var result;result=callbacks.add;result.add=callbacks.add;result.remove=callbacks.remove;return result};ns.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r,v;r=Math.random()*16|0;v=c==="x"?r:r&3|8;return v.toString(16)})};ns.splitUrlRegex=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?\#]*))?([^?\#]*)\??([^\#]*)\#?(.*)$/;ns.uuidRegex=/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/i;ns.groupIdRegex=new RegExp(""+ns.uuidRegex.source+"~[0-9]+","i");ns.cdnUrlRegex=new RegExp("^/?("+ns.uuidRegex.source+")(?:/(-/(?:[^/]+/)+)?([^/]*))?$","i");ns.splitCdnUrl=function(url){return ns.cdnUrlRegex.exec(ns.splitUrlRegex.exec(url)[3])};ns.escapeRegExp=function(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")};ns.globRegexp=function(str,flags){var parts;if(flags==null){flags="i"}parts=$.map(str.split("*"),ns.escapeRegExp);return new RegExp("^"+parts.join(".+")+"$",flags)};ns.normalizeUrl=function(url){var parts,scheme;scheme=document.location.protocol;if(scheme!=="http:"){scheme="https:"}parts=url.match(/^([^:/?#]+:)?\/?(\/)?/);if(!parts[1]){if(parts[2]){url=""+scheme+url}else{if(!parts[0]){url=""+scheme+"//"+url}}}return url.replace(/\/+$/,"")};ns.fitText=function(text,max){var head,tail;if(text.length>max){head=Math.ceil((max-3)/2);tail=Math.floor((max-3)/2);return text.slice(0,head)+"..."+text.slice(-tail)}else{return text}};ns.fitSizeInCdnLimit=function(objSize){return ns.fitSize(objSize,[2048,2048])};ns.fitSize=function(objSize,boxSize,upscale){var heightRation,widthRatio;if(objSize[0]>boxSize[0]||objSize[1]>boxSize[1]||upscale){widthRatio=boxSize[0]/objSize[0];heightRation=boxSize[1]/objSize[1];if(!boxSize[0]||(boxSize[1]&&widthRatio>heightRation)){return[Math.round(heightRation*objSize[0]),boxSize[1]]}else{return[boxSize[0],Math.round(widthRatio*objSize[1])]}}else{return objSize.slice()}};ns.fileInput=function(container,settings,fn){var accept,input,run;input=null;accept=settings.inputAcceptTypes;if(accept===""){accept=settings.imagesOnly?"image/*":null}(run=function(){input=(settings.multiple?$('<input type="file" multiple>'):$('<input type="file">')).attr("accept",accept).css({position:"absolute",top:0,opacity:0,margin:0,padding:0,width:"auto",height:"auto",cursor:container.css("cursor")}).on("change",function(){fn(this);$(this).hide();return run()});return container.append(input)})();return container.css({position:"relative",overflow:"hidden"}).mousemove(function(e){var left,top,width,_ref;_ref=$(this).offset(),left=_ref.left,top=_ref.top;width=input.width();return input.css({left:e.pageX-left-width+10,top:e.pageY-top-10})})};ns.fileSelectDialog=function(container,settings,fn){var accept;accept=settings.inputAcceptTypes;if(accept===""){accept=settings.imagesOnly?"image/*":null}return(settings.multiple?$('<input type="file" multiple>'):$('<input type="file">')).attr("accept",accept).css({position:"fixed",bottom:0,opacity:0}).on("change",function(){fn(this);return $(this).remove()}).appendTo(container).focus().click().hide()};ns.fileSizeLabels="B KB MB GB TB PB EB ZB YB".split(" ");ns.readableFileSize=function(value,onNaN,prefix,postfix){var digits,fixedTo,i,threshold;if(onNaN==null){onNaN=""}if(prefix==null){prefix=""}if(postfix==null){postfix=""}value=parseInt(value,10);if(isNaN(value)){return onNaN}digits=2;i=0;threshold=1000-5*Math.pow(10,2-Math.max(digits,3));while(value>threshold&&i<ns.fileSizeLabels.length-1){i++;value/=1024}value+=1e-15;fixedTo=Math.max(0,digits-Math.floor(value).toFixed(0).length);value=Number(value.toFixed(fixedTo));return""+prefix+value+" "+ns.fileSizeLabels[i]+postfix};ns.imagePath=function(name){return uploadcare.settings.common().scriptBase+"/images/"+name};ns.ajaxDefaults={dataType:"json",crossDomain:true,cache:false};ns.jsonp=function(url,type,data){if($.isPlainObject(type)){data=type;type="GET"}return $.ajax($.extend({url:url,type:type,data:data},ns.ajaxDefaults)).then(function(data){var text;if(data.error){text=data.error.content||data.error;ns.warn("JSONP error: "+text+" while loading "+url);return $.Deferred().reject(text)}else{return data}},function(_,textStatus,errorThrown){var text;text=""+textStatus+" ("+errorThrown+")";ns.warn("JSONP unexpected error: "+text+" while loading "+url);return text})};ns.plugin=function(fn){return fn(uploadcare)};return ns.canvasToBlob=function(canvas,type,quality,callback){var arr,binStr,dataURL,i,_i,_ref;if(HTMLCanvasElement.prototype.toBlob){return canvas.toBlob(callback,type,quality)}dataURL=canvas.toDataURL(type,quality);dataURL=dataURL.split(",");binStr=atob(dataURL[1]);arr=new Uint8Array(binStr.length);for(i=_i=0,_ref=binStr.length;_i<_ref;i=_i+=1){arr[i]=binStr.charCodeAt(i)}return callback(new Blob([arr],{type:/:(.+\/.+);/.exec(dataURL[0])[1]}))}})}).call(this);(function(){var $,expose,namespace,utils,__hasProp={}.hasOwnProperty,__indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++){if(i in this&&this[i]===item){return i}}return -1};expose=uploadcare.expose,namespace=uploadcare.namespace,utils=uploadcare.utils,$=uploadcare.jQuery;namespace("uploadcare.settings",function(ns){var arrayOptions,defaults,flagOptions,intOptions,key,normalize,parseCrop,presets,publicDefaults,str2arr,urlOptions,value,waitForSettingsCb;defaults={live:true,"manual-start":false,locale:null,"locale-pluralize":null,"locale-translations":null,"system-dialog":false,crop:"disabled","preview-step":false,"images-only":false,clearable:false,multiple:false,"multiple-max":0,"multiple-min":1,"path-value":false,tabs:"file camera url facebook gdrive dropbox instagram evernote flickr skydrive","preferred-types":"","input-accept-types":"",autostore:false,"public-key":null,"pusher-key":"79ae88bd931ea68464d9","cdn-base":"http://www.ucarecdn.com","url-base":"https://upload.uploadcare.com","social-base":"https://social.uploadcare.com","script-base":typeof SCRIPT_BASE!=="undefined"&&SCRIPT_BASE!==null?SCRIPT_BASE:""};presets={tabs:{all:"file camera url facebook gdrive dropbox instagram evernote flickr skydrive box vk huddle","default":defaults.tabs}};str2arr=function(value){if(!$.isArray(value)){value=$.trim(value);value=value?value.split(" "):[]}return value};arrayOptions=function(settings,keys){var item,key,source,value,_i,_j,_len,_len1;for(_i=0,_len=keys.length;_i<_len;_i++){key=keys[_i];value=source=str2arr(settings[key]);if(presets.hasOwnProperty(key)){value=[];for(_j=0,_len1=source.length;_j<_len1;_j++){item=source[_j];if(presets[key].hasOwnProperty(item)){value=value.concat(str2arr(presets[key][item]))}else{value.push(item)}}}settings[key]=utils.unique(value)}return settings};urlOptions=function(settings,keys){var key,_i,_len;for(_i=0,_len=keys.length;_i<_len;_i++){key=keys[_i];if(settings[key]!=null){settings[key]=utils.normalizeUrl(settings[key])}}return settings};flagOptions=function(settings,keys){var key,value,_i,_len;for(_i=0,_len=keys.length;_i<_len;_i++){key=keys[_i];if(!(settings[key]!=null)){continue}value=settings[key];if($.type(value)==="string"){value=$.trim(value).toLowerCase();settings[key]=!(value==="false"||value==="disabled")}else{settings[key]=!!value}}return settings};intOptions=function(settings,keys){var key,_i,_len;for(_i=0,_len=keys.length;_i<_len;_i++){key=keys[_i];if(settings[key]!=null){settings[key]=parseInt(settings[key])}}return settings};parseCrop=function(val){var ratio,reRatio;reRatio=/^([0-9]+)([x:])([0-9]+)\s*(|upscale|minimum)$/i;ratio=reRatio.exec($.trim(val.toLowerCase()))||[];return{downscale:ratio[2]==="x",upscale:!!ratio[4],notLess:ratio[4]==="minimum",preferedSize:ratio.length?[+ratio[1],+ratio[3]]:void 0}};normalize=function(settings){arrayOptions(settings,["tabs","preferredTypes"]);urlOptions(settings,["cdnBase","socialBase","urlBase","scriptBase"]);flagOptions(settings,["autostore","imagesOnly","multiple","clearable","pathValue","previewStep","systemDialog"]);intOptions(settings,["multipleMax","multipleMin"]);if(!$.isArray(settings.crop)){if(/^(disabled?|false|null)$/i.test(settings.crop)||settings.multiple){settings.crop=false}else{if($.isPlainObject(settings.crop)){settings.crop=[settings.crop]}else{settings.crop=$.map(settings.crop.split(","),parseCrop)}}}if(settings.crop||settings.multiple){settings.previewStep=true}if(settings.crop){settings.pathValue=true}if(!utils.abilities.sendFileAPI){settings.systemDialog=false}if(settings.validators){settings.validators=settings.validators.slice()}return settings};publicDefaults={allTabs:presets.tabs.all};for(key in defaults){if(!__hasProp.call(defaults,key)){continue}value=defaults[key];publicDefaults[$.camelCase(key)]=value}expose("defaults",publicDefaults);ns.globals=utils.once(function(){var fallback,values;values={};for(key in defaults){if(!__hasProp.call(defaults,key)){continue}fallback=defaults[key];value=window["UPLOADCARE_"+(utils.upperCase(key))];values[$.camelCase(key)]=value!==void 0?value:fallback}if(!values.publicKey){utils.commonWarning("publicKey")}return normalize(values)});ns.common=utils.once(function(settings){var result;result=normalize($.extend({},ns.globals(),settings||{}));waitForSettingsCb.fire(result);return result});ns.build=function(settings){return normalize($.extend({},ns.common(),settings||{}))};waitForSettingsCb=$.Callbacks("once memory");ns.waitForSettings=function(settings,fn){return waitForSettingsCb.add(function(common){return fn(normalize($.extend({},common,settings||{})))})};ns.CssCollector=(function(){function CssCollector(){this.urls=[];this.styles=[]}CssCollector.prototype.addUrl=function(url){if(!/^https?:\/\//i.test(url)){throw new Error("Embedded urls should be absolute. "+url)}if(__indexOf.call(this.urls,url)<0){return this.urls.push(url)}};CssCollector.prototype.addStyle=function(style){return this.styles.push(style)};return CssCollector})();return uploadcare.tabsCss=new ns.CssCollector})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.ar={uploading:"الرجاء الإنتظار.... يتم الرفع",loadingInfo:"...تحميل المعلومات",errors:{"default":"خطأ",baddata:"قيمة غير صحيحة",size:"ملف كبير جدا",upload:"لا يمكن تحميل",user:" إلغاء التحميل",info:"لا يمكن تحميل معلومات",image:"مسموح بالصور فقط",createGroup:"لا يمكن إنشاء مجموعة ملفات",deleted:"تم حذف ملف"},draghere:"إفلت الملف هنا",file:{zero:"%1 ملفات",one:"%1 ملف",two:"%1 ملفات",few:"%1 ملفات",many:"%1 ملفات",other:"%1 ملفات"},buttons:{cancel:"إلغاء",remove:"إزالة",choose:{files:{one:"اختر ملف",other:"اختر ملفات"},images:{one:"اختر صورة",other:"اختر صور"}}},dialog:{done:"منجز",showFiles:"إظهار الملفات",tabs:{names:{preview:"معاينة",file:"الملفات المحلية",url:"روابط التعسفية",camera:"كاميرا"},file:{drag:"إفلات الملف هنا",nodrop:"تحميل الملفات من جهاز الكمبيوتر الخاص بك",cloudsTip:"المخازن السحابية<br>والخدمات الاجتماعية",or:"أو",button:"اختر ملف محلي",also:"يمكنك أيضا اختيار من"},url:{title:"الملفات من الويب",line1:"اختر على أي ملف من الويب",line2:"قم بتقديم الارتباط",input:"الصق الرابط الخاص بك هنا ...",button:"تحميل"},camera:{capture:"إلتقط صورة",mirror:"مرآة",retry:"إعادة طلب الأذونات",pleaseAllow:{title:"الرجاء السماح بتشغيل كميرتك ",text:"لقد تم السماح للكاميرا بالوصول لهذا الموقع. لكي تلتقط الصور بكاميرتك، يجب السماح لهذا الطلب "},notFound:{title:"لم يتم العثور على كاميرا ",text:"يبدو أنه لا يوجد كاميرا موصولة بهذا الجهاز"}},preview:{unknownName:"غير معروف",change:"إلغاء",back:"العودة",done:"إضافة",unknown:{title:"جاري التحميل .. الرجاء الانتظار للمعاينة.",done:"تخطي المعاينة، واقبل"},regular:{title:"إضافة هذا الملف؟",line1:"أنت على وشك إضافة الملف أعلاه.",line2:"يرجى تأكيد."},image:{title:"إضافة هذه الصورة؟",change:"إلغاء"},crop:{title:"قص وإضافة هذه الصورة",done:"تم",free:"حرر"},error:{"default":{title:"عفوا!",text:"حدث خطأ أثناء تحميل.",back:"يرجى المحاولة مرة أخرى"},image:{title:"فقط ملفات الصور مقبولة.",text:"يرجى المحاولة مرة أخرى مع ملف آخر.",back:"اختيار صورة"},size:{title:"الملف الذي حددته يتجاوز الحد.",text:"يرجى المحاولة مرة أخرى مع ملف آخر."},loadImage:{title:"خطأ",text:"لا يمكن تحميل صورة"}},multiple:{title:"لقد أخترت %files%",question:"هل ترغب في إضافة كل من هذه الملفات?",tooManyFiles:"لقد اخترت العديد من الملفات. %max% is الحد الأقصى.",tooFewFiles:"لقد أخترت %files%. على الأقل %min% مطلوب.",clear:"إزالة جميع",done:"تم"}}},footer:{text:" تحميل وتخزين ومعالجة الملفات بوساطة"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.ar=function(n){var mod;if(n===0){return"zero"}if(n===1){return"one"}if(n===2){return"two"}mod=n%100;if((3<=mod&&mod<=10)){return"few"}if((11<=mod&&mod<=99)){return"many"}return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.da={uploading:"Uploader... Vent venligst.",loadingInfo:"Henter information...",errors:{"default":"Fejl",baddata:"Forkert værdi",size:"Filen er for stor",upload:"Kan ikke uploade / sende fil",user:"Upload fortrudt",info:"Kan ikke hente information",image:"Kun billeder er tilladt",createGroup:"Kan ikke oprette fil gruppe",deleted:"Filen blev slettet"},draghere:"Drop en fil her",file:{one:"%1 fil",other:"%1 filer"},buttons:{cancel:"Annuller",remove:"Fjern",choose:{files:{one:"Vælg en fil",other:"Vælg filer"},images:{one:"Vælg et billede",other:"Vælg billeder"}}},dialog:{done:"Færdig",showFiles:"Vis filer",tabs:{names:{preview:"Vis",file:"Komputer",gdrive:"Google Drev",url:"Direkte link"},file:{drag:"Drop en fil her",nodrop:"Hent filer fra din komputer",or:"eller",button:"Hent fil fra din komputer",also:"Du kan også hente fra"},url:{title:"Filer fra en Web adresse",line1:"Vælg en fil fra en web adresse.",line2:"Skriv bare linket til filen.",input:"Indsæt link her...",button:"Upload / Send"},preview:{unknownName:"ukendt",change:"Annuller",back:"Tilbage",done:"Fortsæt",unknown:{title:"Uploader / sender... Vent for at se mere.",done:"Fortsæt uden at vente på resultat"},regular:{title:"Tilføje fil?",line1:"Du er ved at tilføje filen ovenfor.",line2:"Venligst accepter."},image:{title:"Tilføj billede?",change:"Annuller"},crop:{title:"Beskær og tilføj dette billede",done:"Udfør"},error:{"default":{title:"Hov!",text:"Noget gik galt under upload.",back:"Venligst prøv igen"},image:{title:"Du kan kun vælge billeder.",text:"Prøv igen med en billedfil.",back:"Vælg billede"},size:{title:"Den fil du valgte, er desværre større end tilladt.",text:"Venligst prøv med en mindre fil."},loadImage:{title:"Fejl",text:"Kan ikke åbne billede"}},multiple:{title:"Du har valgt %files% filer",question:"Vil du tilføje alle disse filer?",tooManyFiles:"Du har valgt for mange filer. %max% er maximum.",tooFewFiles:"Du har valgt %files% filer. Men du skal vælge mindst %min%.",clear:"Fjern alle",done:"Fortsæt"}}},footer:{text:"Uploader gemmer og behandler filer ved hjælp af"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.da=function(n){if(n===1){return"one"}return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.de={uploading:"Hochladen... Bitte warten.",loadingInfo:"Laden der Informationen...",errors:{"default":"Error",baddata:"Falscher Wert",size:"Datei zu groß",upload:"Kann nicht hochgeladen werden",user:"Hochladen abgebrochen",info:"Informationen können nicht geladen werden",image:"Nur Bilder sind erlaubt",createGroup:"Datei-Gruppe kann nicht erstellt werden",deleted:"Datei wurde gelöscht"},draghere:"Ziehen Sie eine Datei hier hinein",file:{one:"%1 Datei",other:"%1 Dateien"},buttons:{cancel:"Abbrechen",remove:"Löschen",choose:{files:{one:"Wählen Sie eine Datei",other:"Wählen Sie die Dateien"},images:{one:"Wählen Sie ein Bild",other:"Wählen Sie Bilder"}}},dialog:{done:"Fertig",showFiles:"Dateien anzeigen",tabs:{names:{preview:"Vorschau",file:"Lokale Dateien",url:"Web-Links"},file:{drag:"Ziehen Sie eine Datei hier hinein",nodrop:"Laden Sie Dateien von Ihrem PC hoch",cloudsTip:"Cloud Speicher<br>und soziale Dienste",or:"oder",button:"Wählen Sie eine lokale Datei",also:"Sie köhnen es auch wählen von"},url:{title:"Dateien vom Web",line1:"Holen Sie sich irgendeine Datei vom Web.",line2:"Geben Sie einfach den Link an.",input:"Bitte geben Sie den Link hier an...",button:"Hochladen"},preview:{unknownName:"nicht bekannt",change:"Abbrechen",back:"Zurück",done:"Hinzufügen",unknown:{title:"Hochladen... Bitte warten Sie auf die Vorschau.",done:"Vorschau überspringen und Datei annehmen"},regular:{title:"Diese Datei hinzufügen?",line1:"Diese Datei wird nun hinzugefügt.",line2:"Bitte bestätigen Sie."},image:{title:"Dieses Bild hinzufügen?",change:"Abbrechen"},crop:{title:"Dieses Bild beschneiden und hinzufügen",done:"Fertig",free:"frei"},error:{"default":{title:"Oops!",text:"Etwas ist während dem Hochladen schief gelaufen.",back:"Bitte versuchen Sie es erneut"},image:{title:"Nur Bilder sind akzeptiert.",text:"Bitte veruschen Sie es erneut mit einer anderen Datei.",back:"Bild wählen"},size:{title:"Die gewählte Datei überschreitet das Limit.",text:"Bitte veruschen Sie es erneut mit einer anderen Datei."},loadImage:{title:"Fehler",text:"Das Bild kann nicht geladen werden"}},multiple:{title:"Sie haben %files% Dateien gewählt",question:"Möchten Sie all diese Datein hinzufügen?",tooManyFiles:"Sie haben zu viele Dateien gewählt. %max% ist das Maximum.",tooFewFiles:"Sie haben %files% Dateien. Es sind mindestens %min% nötig.",clear:"Alle löschen",done:"Fertig"}}},footer:{text:"Hochladen, Speichern und Verarbeitung der Dateien durch"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.de=function(n){if(n===1){return"one"}return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.en={uploading:"Uploading... Please wait.",loadingInfo:"Loading info...",errors:{"default":"Error",baddata:"Incorrect value",size:"File too big",upload:"Can’t upload",user:"Upload canceled",info:"Can’t load info",image:"Only images allowed",createGroup:"Can’t create file group",deleted:"File was deleted"},draghere:"Drop a file here",file:{one:"%1 file",other:"%1 files"},buttons:{cancel:"Cancel",remove:"Remove",choose:{files:{one:"Choose a file",other:"Choose files"},images:{one:"Choose an image",other:"Choose images"}}},dialog:{done:"Done",showFiles:"Show files",tabs:{names:{preview:"Preview",file:"Local Files",url:"Arbitrary Links",camera:"Camera",facebook:"Facebook",dropbox:"Dropbox",gdrive:"Google Drive",instagram:"Instagram",vk:"VK",evernote:"Evernote",box:"Box",skydrive:"OneDrive",flickr:"Flickr",huddle:"Huddle"},file:{drag:"Drop a file here",nodrop:"Upload files from your computer",cloudsTip:"Cloud storages<br>and social services",or:"or",button:"Choose a local file",also:"You can also choose it from"},url:{title:"Files from the Web",line1:"Grab any file off the web.",line2:"Just provide the link.",input:"Paste your link here...",button:"Upload"},camera:{capture:"Take a photo",mirror:"Mirror",retry:"Request permissions again",pleaseAllow:{title:"Please allow access to your camera",text:"You have been prompted to allow camera access from this site. In order to take pictures with your camera you must approve this request."},notFound:{title:"No camera detected",text:"Looks like you have no camera connected to this device."}},preview:{unknownName:"unknown",change:"Cancel",back:"Back",done:"Add",unknown:{title:"Uploading... Please wait for a preview.",done:"Skip preview and accept"},regular:{title:"Add this file?",line1:"You are about to add the file above.",line2:"Please confirm."},image:{title:"Add this image?",change:"Cancel"},crop:{title:"Crop and add this image",done:"Done",free:"free"},error:{"default":{title:"Oops!",text:"Something went wrong during the upload.",back:"Please try again"},image:{title:"Only image files are accepted.",text:"Please try again with another file.",back:"Choose image"},size:{title:"The file you selected exceeds the limit.",text:"Please try again with another file."},loadImage:{title:"Error",text:"Can’t load image"}},multiple:{title:"You’ve chosen %files%",question:"Do you want to add all of these files?",tooManyFiles:"You’ve chosen too many files. %max% is maximum.",tooFewFiles:"You’ve chosen %files%. At least %min% required.",clear:"Remove all",done:"Done"}}},footer:{text:"Uploading, storing and processing files by",link:"Uploadcare.com"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.en=function(n){if(n===1){return"one"}return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.es={uploading:"Subiendo... Por favor espere.",loadingInfo:"Cargando Información...",errors:{"default":"Error",baddata:"Valor incorrecto",size:"Demasiado grande",upload:"No se ha podido subir",user:"Subida cancelada",info:"No se pudo cargar la información",image:"Sólo se permiten imagenes"},draghere:"Arrastra los archivos hasta aquí",file:{one:"%1 archivo",other:"%1 archivos"},buttons:{cancel:"Cancelar",remove:"Eliminar"},dialog:{tabs:{names:{preview:"Avance",file:"Computadora",url:"Una dirección cualquiera"},file:{drag:"Arrastra una archivo aquí",nodrop:"Sube fotos desde tu computadora",or:"o",button:"Elige un archivo desde tu computadora",also:"Tambien puedes seleccionarlo de"},url:{title:"Archivos de la web",line1:"Selecciona cualquier archivo de la web.",line2:"Sólo danos el link.",input:"Copia tu link aquí...",button:"Subir"},preview:{unknownName:"desconocido",change:"Cancelar",back:"Atras",done:"Subir",unknown:{title:"Subiendo. Por favor espera para una vista previa.",done:"Saltar vista previa y aceptar"},regular:{title:"¿Quieres subir este archivo?",line1:"Estás por subir el archivo de arriba.",line2:"Confirma por favor."},image:{title:"¿Quieres subir esta imagen?",change:"Cancelar"},crop:{title:"Cortar y subir esta imagen",done:"Listo"},error:{"default":{title:"La subida falló",line1:"Algo salio mal durante la subida.",line2:"Por favor, trata de nuevo."},image:{title:"Sólo imagenes",line1:"Sólo se aceptan archivos de imagenes.",line2:"Por favor, trata de nuevo con otro archivo."},size:{title:"Límite de tamaño",line1:"El archivo que has seleccinado sobrepasa el límite de los 100MB.",line2:"Por favor trata de nuevo con otro archivo."},loadImage:{title:"Error",text:"No se pudo cargar la imangen"}}}},footer:{text:"Los archivos ha sido subidos, gestionados y procesados por"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.es=function(n){if(n===1){return"one"}return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.fr={uploading:"Envoi en cours... Merci de patientier.",loadingInfo:"Chargement des informations...",errors:{"default":"Erreur",baddata:"Valeur incorrecte",size:"Fichier trop volumineux",upload:"Envoi impossible",user:"Envoi annulé",info:"Impossible de charger les informations",image:"Seules les images sont autorisées",createGroup:"Création d'1 groupe impossible",deleted:"Le fichier a été supprimé"},draghere:"Glissez-déposez un fichier ici",file:{one:"%1 fichier",other:"%1 fichiers"},buttons:{cancel:"Annuler",remove:"Supprimer",choose:{files:{one:"Sélectionner un fichier",other:"Sélectionner des fichiers"},images:{one:"Sélectionner une image",other:"Sélectionner des images"}}},dialog:{done:"Terminer",showFiles:"Voir les fichiers",tabs:{names:{preview:"Avant-première",file:"Fichier en local",url:"Une adresse web"},file:{drag:"Glissez-déposez un fichier ici",nodrop:"Envoyez des fichiers depuis votre ordinateur",cloudsTip:"Stockage sur le cloud<br>et réseaux sociaux",or:"ou",button:"Choisir un fichier local",also:"Vous pouvez également le sélectionner depuis"},url:{title:"Fichiers depuis le Web",line1:"Prenez n'importe quel fichier depuis un site web.",line2:"Saisissez simplement son adresse.",input:"Collez le lien ici...",button:"Envoi"},preview:{unknownName:"inconnu",change:"Annuler",back:"Retour",done:"Ajouter",unknown:{title:"Envoi en cours... Merci de patientier pour prévisualiser.",done:"Passer la prévisualisation et accepter"},regular:{title:"Ajouter ce fichier ?",line1:"Vous êtes sur le point d'ajouter le fichier ci-dessus.",line2:"Merci de confirmer."},image:{title:"Ajouter cette image ?",change:"Annuler"},crop:{title:"Recadrer et ajouter cette image",done:"Terminer",free:"libre"},error:{"default":{title:"Oups!",text:"Quelque chose n'a pas fonctionné pendant l'envoi.",back:"Merci de bien vouloir recommencer"},image:{title:"Seules les images sont acceptées.",text:"Merci de bien vouloir recommencer avec un autre fichier.",back:"Choisir une image"},size:{title:"Le fichier sélectionné est trop volumineux.",text:"Merci de bien vouloir recommencer avec un autre fichier."},loadImage:{title:"Erreur",text:"Impossible de charger l'image"}},multiple:{title:"Vous avez choisi %files%",question:"Voulez vous ajouter tous ces fichiers ?",clear:"Tout retirer",done:"Terminer"}}},footer:{text:"Envoi, stockage et traitement des fichiers par"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.fr=function(n){if(n===1){return"one"}return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.he={uploading:"טוען... אנא המתן.",loadingInfo:"טוען מידע...",errors:{"default":"שגיאה",baddata:"ערך שגוי",size:"קובץ גדול מידי",upload:"לא ניתן להעלות",user:"העלאה בוטלה",info:"לא ניתן לטעון מידע",image:"ניתן להעלות רק תמונות",createGroup:"לא ניתן ליצור קבוצה",deleted:"הקובץ נמחק"},draghere:"שחרר כאן קובץ",file:{one:"קובץ %1",other:"%1 קבצים"},buttons:{cancel:"ביטול",remove:"הסר",choose:{files:{one:"בחר קובץ",other:"בחר קבצים"},images:{one:"בחר תמונה",other:"בחר תמונות"}}},dialog:{done:"סיום",showFiles:"הצג קבצים",tabs:{names:{facebook:"פייסבוק",dropbox:"דרופבוקס",gdrive:"כונן גוגל",instagram:"אינסטגרם",url:"לינק מהאינטרנט"},file:{drag:"שחרר כאן קובץ",nodrop:"העלה קבצים מהמחשב",or:"או",button:"בחר קובץ מהמחשב",also:"ניתן לבחור גם מ"},url:{title:"קובץ מהאינטרנט",line1:"גרור קובץ מהאינטרנט",line2:"ספק את כתובת הקובץ",input:"הדבק את כתובת הקובץ...",button:"העלה"},preview:{unknownName:"לא ידוע",change:"ביטול",back:"חזרה",done:"הוסף",unknown:{title:"מעלה... נא המתן לתצוגה מקדימה.",done:"דלג על תצוגה מקדימה"},regular:{title:"להוסיף קובץ זה?",line1:"קובץ זה יועלה",line2:"נא אשר."},image:{title:"להוסיף תמונה זו?",change:"ביטול"},crop:{title:"חתוך והוסף תמונה זו",done:"סיום"},error:{"default":{title:"אופס!",text:"משהו השתבש בזמן ההעלאה.",back:"נא נסה שוב"},image:{title:"ניתן לקבל רק קבצי תמונות.",text:"נא נסה שוב עם קובץ אחר.",back:"בחר תמונה"},size:{title:"הקובץ שבחרת חורג מהגבול.",text:"נא נסה שוב עם קובץ אחר."},loadImage:{title:"שגיאה",text:"טעינת התמונה נכשלה"}},multiple:{title:"בחרת %files%",question:"אתה מעוניין להוסיף את כל הקבצים האלו?",tooManyFiles:"בחרת יותר מידי קבצים. יש לבחור מקסימום %max% קבצים.",tooFewFiles:"בחרת %files%. יש לבחור לפחות %min%.",clear:"הסר הכל",done:"סיום"}}},footer:{text:"העלאה, מיון ועיבוד קבצים על ידי"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.he=function(n){if(n===1){return"one"}return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.ja={uploading:"アップロードしています… 完了までお待ち下さい。",loadingInfo:"読み込み中…",errors:{"default":"エラー",baddata:"間違った値",size:"ファイルが大きすぎます",upload:"アップロードできませんでした",user:"アップロードがキャンセルされました",info:"読み込みに失敗しました",image:"アップロードできるのは画像ファイルのみです",createGroup:"グループの作成に失敗しました",deleted:"削除されたファイルです"},draghere:"ここにファイルをドロップ",file:{other:"%1ファイル"},buttons:{cancel:"キャンセル",remove:"削除",choose:{files:{one:"ファイルを選択",other:"ファイルを選択"},images:{one:"画像を選択",other:"画像を選択"}}},dialog:{done:"完了",showFiles:"ファイルを表示",tabs:{names:{preview:"プレビュー",file:"ローカルファイル",url:"URLを直接入力"},file:{drag:"ここにファイルをドロップ",nodrop:"ファイルを選択してアップロード",cloudsTip:"クラウドストレージ<br>およびソーシャルサービス",or:"もしくは",button:"ローカルのファイルを選択",also:"次からも選択可能です:"},url:{title:"ウェブ上のファイル",line1:"ウェブ上からファイルを取得します。",line2:"URLを入力してください。",input:"ここにURLを貼り付けしてください…",button:"アップロード"},preview:{unknownName:"不明なファイル",change:"キャンセル",back:"戻る",done:"追加",unknown:{title:"アップロードしています… プレビューの表示をお待ちください。",done:"プレビューの確認をスキップして完了"},regular:{title:"このファイルを追加しますか?",line1:"こちらのファイルを追加しようとしています。",line2:"確認してください。"},image:{title:"この画像を追加しますか?",change:"キャンセル"},crop:{title:"画像の切り取りと追加",done:"完了",free:"リセット"},error:{"default":{title:"失敗しました",text:"アップロード中に不明なエラーが発生しました。",back:"もう一度お試し下さい"},image:{title:"画像ファイルのみ許可されています",text:"他のファイルで再度お試し下さい。",back:"画像を選択"},size:{title:"ファイルサイズが大きすぎます。",text:"他のファイルで再度お試し下さい。"},loadImage:{title:"エラー",text:"画像のロードに失敗しました。"}},multiple:{title:"%files%つのファイルを選択中",question:"これら全てのファイルを追加しますか?",tooManyFiles:"選択ファイルが多すぎます。%max%つ以下にしてください。",tooFewFiles:"選択ファイルが少なすぎます。%files%つ選択中です。少なくとも%min%つ選択してください。",clear:"全て削除",done:"完了"}}},footer:{text:"画像のアップロード、保存および加工の提供:"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.ja=function(n){return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.lv={uploading:"Augšupielādē... Lūdzu, gaidiet.",errors:{"default":"Kļūda",image:"Atļauti tikai attēli"},draghere:"Velciet failus šeit",file:{zero:"%1 failu",one:"%1 fails",other:"%1 faili"},buttons:{cancel:"Atcelt",remove:"Dzēst"},dialog:{title:"Ielādēt jebko no jebkurienes",poweredby:"Darbināts ar",support:{images:"Attēli",audio:"Audio",video:"Video",documents:"Dokumenti"},tabs:{file:{title:"Mans dators",line1:"Paņemiet jebkuru failu no jūsu datora.",line2:"Izvēlēties ar dialogu vai ievelciet iekšā.",button:"Meklēt failus"},url:{title:"Faili no tīmekļa",line1:"Paņemiet jebkuru failu no tīmekļa.",line2:"Tikai uzrādiet linku.",input:"Ielīmējiet linku šeit...",button:"Ielādēt"}}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.lv=function(n){if(n===0){return"zero"}if((n%10===1)&&(n%100!==11)){return"one"}return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.nb={uploading:"Laster opp... Vennligst vent.",loadingInfo:"Laster inn info...",errors:{"default":"Feil",baddata:"Ugyldig verdi",size:"Filen er for stor",upload:"Kan ikke laste opp",user:"Opplasting avbrutt",info:"Kan ikke laste inn info",image:"Kun bilder er tillatt",createGroup:"Kan ikke opprette filgruppe",deleted:"Filen er slettet"},draghere:"Dra en fil hit",file:{one:"%1 fil",other:"%1 filer"},buttons:{cancel:"Avbryt",remove:"Fjern",choose:{files:{one:"Velg en fil",other:"Velg filer"},images:{one:"Velg et bilde",other:"Velg bilder"}}},dialog:{done:"Ferdig",showFiles:"Vis filer",tabs:{names:{preview:"Forhåndsvising",file:"Lokale filer",url:"Direktelink"},file:{drag:"Dra og slipp en fil her",nodrop:"Last opp filer fra datamaskinen",cloudsTip:"Skylagring<br>og sosiale tjenester",or:"eller",button:"Velg en lokal fil",also:"Du kan også velge det fra"},url:{title:"Filer fra internett",line1:"Velg hvilken som helst fil fra internett.",line2:"Bare gi oss linken.",input:"Lim inn linken her...",button:"Last opp"},preview:{unknownName:"ukjent",change:"Avbryt",back:"Tilbake",done:"Legg til",unknown:{title:"Laster opp... Vennligst vent på forhåndsvisning.",done:"Hopp over forhåndsvisning og godkjenn"},regular:{title:"Legge til denne filen?",line1:"Filen legges nå til.",line2:"Vennligst bekreft."},image:{title:"Legge til dette bildet?",change:"Avbryt"},crop:{title:"Kutt og legg til dette bildet",done:"Ferdig",free:"frigjør"},error:{"default":{title:"Ops!",text:"Noe gikk galt under opplastingen.",back:"Vennligst prøv igjen"},image:{title:"Kun bilder er akseptert.",text:"Prøv igjen med en annen fil.",back:"Velg bilde"},size:{title:"Den valgte filen overskrider tilatt størrelse.",text:"Vennligst prøv igjen med en annen fil."},loadImage:{title:"Feil",text:"Kan ikke laste bildet"}},multiple:{title:"Du har valgt %files%",question:"Ønsker du å legge til alle filene?",tooManyFiles:"Du har valgt for mange filer. %max% er maksimum.",tooFewFiles:"Du har valgt %files%. Minimum %min% er påkrevd.",clear:"Fjern alle",done:"Ferdig"}}},footer:{text:"Laster opp, lagrer og prosesserer filer med"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.nb=function(n){if(n===1){return"one"}return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.nl={uploading:"Uploaden... Even geduld.",loadingInfo:"Laden informatie...",errors:{"default":"Fout",baddata:"Ongeldige waarde",size:"Bestand is te groot",upload:"Kan niet uploaden",user:"Upload geannulleerd",info:"Kan informatie niet laden",image:"Alleen afbeeldingen toegestaan",createGroup:"Kan bestandsgroep niet maken",deleted:"Bestand is verwijderd"},draghere:"Drop hier een bestand",file:{one:"%1 bestand",other:"%1 bestanden"},buttons:{cancel:"Annuleren",remove:"Verwijderen",choose:{files:{one:"Kies een bestand",other:"Kies bestanden"},images:{one:"Kies een afbeelding",other:"Kies afbeeldingen"}}},dialog:{done:"Klaar",showFiles:"Toon bestanden",tabs:{names:{preview:"Voorvertoning",file:"Computer",url:"Directe links"},file:{drag:"Drop hier een bestand",nodrop:"Upload bestanden van je computer",or:"of",button:"Selecteer een bestand van je computer",also:"Je kan ook selecteren van"},url:{title:"Bestanden van het web",line1:"Selecteer een bestand van het web.",line2:"Voer de link in.",input:"Plak de link hier...",button:"Upload"},preview:{unknownName:"onbekend",change:"Annuleren",back:"Terug",done:"Toevoegen",unknown:{title:"Uploaden... Wacht op de voorvertoning.",done:"Voorvertoning overslaan an accepteren"},regular:{title:"Dit bestand toevoegen?",line1:"Je staat op het punt bovenstaand bestand toe te voegen.",line2:"Bevestig."},image:{title:"Voeg deze afbeelding toe?",change:"Annuleren"},crop:{title:"Afbeelding bijknippen en toevoegen",done:"Klaar"},error:{"default":{title:"Oeps!",text:"Er is een fout opgetreden tijdens het uploaden.",back:"Probeer het nog eens"},image:{title:"Alleen afbeeldingen worden geaccepteerd.",text:"Probeer het nog eens met een andere bestand.",back:"Selecteer afbeelding"},size:{title:"Het geselecteerd bestand is groter dan de limiet.",text:"Probeer het nog eens met een andere bestand."},loadImage:{title:"Fout",text:"Kan afbeelding niet laden"}},multiple:{title:"Je hebt de volgende bestanden geselecteerd %files%",question:"Wil je al deze bestanden toevoegen?",tooManyFiles:"Je hebt teveel bestanden geselecteerd. %max% is het maximum.",tooFewFiles:"Je hebt de volgende bestanden geselecteerd %files%. Minimaal %min% is verplicht.",clear:"Verwijder alle bestanden",done:"Klaar"}}},footer:{text:"Uploaden, opslaan en verwerken bestanden door"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.nl=function(n){if(n===1){return"one"}return"other"}})}).call(this);(function(){var __indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++){if(i in this&&this[i]===item){return i}}return -1};uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.pl={uploading:"Przesyłanie... Proszę czekać.",errors:{"default":"Błąd"},draghere:"Upuść plik tutaj",buttons:{cancel:"Anuluj",remove:"Usuń"},dialog:{tabs:{file:{title:"Mój komputer"},url:{title:"Pliki z sieci"}}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.pl=function(n){var _ref,_ref1,_ref2,_ref3;if(n===1){return"one"}if((_ref=n%10,__indexOf.call([2,3,4],_ref)>=0)&&(_ref1=n%100,__indexOf.call([12,13,14],_ref1)<0)){return"few"}if((n!==1)&&((_ref2=n%10,__indexOf.call([2,3,4],_ref2)<0)||(_ref3=n%100,__indexOf.call([12,13,14],_ref3)>=0))){return"many"}return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.pt={uploading:"Fazendo upload... Aguarde.",loadingInfo:"Carregando informações...",errors:{"default":"Erro",baddata:"Valor incorreto",size:"Arquivo muito grande",upload:"Não foi possível fazer o upload",user:"Upload cancelado",info:"Não foi possível carregar as informações",image:"Apenas imagens são permitidas",createGroup:"Não foi possível criar o grupo de arquivos",deleted:"O arquivo foi excluído"},draghere:"Arraste um arquivo para cá",file:{one:"%1 arquivo",other:"%1 arquivos"},buttons:{cancel:"Cancelar",remove:"Excluir",choose:{files:{one:"Escolha um arquivo",other:"Escolha arquivos"},images:{one:"Escolha um imagem",other:"Escolha imagens"}}},dialog:{done:"OK",showFiles:"Mostrar arquivos",tabs:{names:{preview:"Pré-estréia",file:"Computador",url:"Link da web"},file:{drag:"Arraste um arquivo para cá",nodrop:"Faça upload de arquivos do seu computador",or:"ou",button:"Escolha um arquivo do computador",also:"Você também pode escolher arquivos de"},url:{title:"Arquivos da web",line1:"Faça upload de qualquer arquivo da web.",line2:"Apenas informe o link.",input:"Cole seu link aqui...",button:"Upload"},preview:{unknownName:"desconhecido",change:"Cancelar",back:"Voltar",done:"Adicionar",unknown:{title:"Fazendo upload... Aguarde o preview.",done:"Pular preview e aceitar"},regular:{title:"Adicionar esse arquivo?",line1:"Você está prestes a adicionar o arquivo acima.",line2:"Por favor, confirme."},image:{title:"Adicionar essa imagem?",change:"Cancelar"},crop:{title:"Cortar e adicionar essa imagem",done:"OK",free:"livre"},error:{"default":{title:"Oops!",text:"Alguma coisa deu errado durante o upload.",back:"Por favor, tente novamente"},image:{title:"Apenas arquivos de imagem são aceitos.",text:"Por favor, tente novamente com outro arquivo.",back:"Escolher a imagem"},size:{title:"O arquivo que você escolheu excede o limite.",text:"Por favor, tente novamente com outro arquivo."},loadImage:{title:"Erro",text:"Não foi possível carregar a imagem"}},multiple:{title:"Você escolheu",question:"Você quer adicionar todos esses arquivos?",clear:"Excluir todos",done:"OK"}}},footer:{text:"Upload, armazenamento e processamento dos arquivos feito por"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.pt=function(n){if(n===1){return"one"}return"other"}})}).call(this);(function(){var __indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++){if(i in this&&this[i]===item){return i}}return -1};uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.ru={uploading:"Идет загрузка",loadingInfo:"Загрузка информации...",errors:{"default":"Ошибка",baddata:"Некорректные данные",size:"Слишком большой файл",upload:"Ошибка при загрузке",user:"Загрузка прервана",info:"Ошибка при загрузке информации",image:"Разрешены только изображения",createGroup:"Не удалось создать группу файлов",deleted:"Файл удалён"},draghere:"Перетащите файл сюда",file:{one:"%1 файл",few:"%1 файла",many:"%1 файлов",other:"%1 файла"},buttons:{cancel:"Отмена",remove:"Удалить",choose:{files:{one:"Выбрать файл",other:"Выбрать файлы"},images:{one:"Выбрать изображение",other:"Выбрать изображения"}}},dialog:{done:"Готово",showFiles:"Показать файлы",tabs:{names:{preview:"Предпросмотр",file:"Локальные файлы",vk:"ВКонтакте",url:"Произвольная ссылка",camera:"Камера"},file:{drag:"Перетащите файл сюда",nodrop:"Загрузка файлов с вашего компьютера",cloudsTip:"Облачные хранилища<br>и социальные сервисы",or:"или",button:"Выберите локальный файл",also:"Вы также можете загрузить файлы, используя:"},url:{title:"Файлы с других сайтов",line1:"Загрузите любой файл из сети.",line2:"",input:"Укажите здесь ссылку...",button:"Загрузить"},camera:{capture:"Сделать снимок",mirror:"Отразить",retry:"Повторно запросить разрешение",pleaseAllow:{title:"Пожалуйста, разрешите доступ к камере",text:"Для того, чтобы сделать снимок, мы запросили разрешение на доступ к камере с этого сайта."},notFound:{title:"Камера не найдена",text:"Скорее всего камера не подключена или не настроена."}},preview:{unknownName:"неизвестно",change:"Отмена",back:"Назад",done:"Добавить",unknown:{title:"Загрузка... Пожалуйста подождите.",done:"Пропустить предварительный просмотр"},regular:{title:"Загрузить этот файл?",line1:"Вы собираетесь добавить этот файл:",line2:"Пожалуйста, подтвердите."},image:{title:"Добавить это изображение?",change:"Отмена"},crop:{title:"Обрезать и добавить это изображение",done:"Готово",free:"произв."},error:{"default":{title:"Ой!",text:"Что-то пошло не так во время загрузки.",back:"Пожалуйста, попробуйте ещё раз"},image:{title:"Можно загружать только изображения.",text:"Попробуйте загрузить другой файл.",back:"Выберите изображение"},size:{title:"Размер выбранного файла превышает лимит.",text:"Попробуйте загрузить другой файл."},loadImage:{title:"Ошибка",text:"Изображение не удалось загрузить"}},multiple:{title:"Вы выбрали %files%",question:"Вы хотите добавить все эти файлы?",tooManyFiles:"Вы выбрали слишком много файлов. %max% максимум.",tooFewFiles:"Вы выбрали %files%. Нужно не меньше %min%.",clear:"Удалить все",done:"Готово"}}},footer:{text:"Для загрузки, хранения и обработки файлов используется"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.ru=function(n){var _ref,_ref1,_ref2,_ref3;if((n%10===1)&&(n%100!==11)){return"one"}if((_ref=n%10,__indexOf.call([2,3,4],_ref)>=0)&&(_ref1=n%100,__indexOf.call([12,13,14],_ref1)<0)){return"few"}if((n%10===0)||(_ref2=n%10,__indexOf.call([5,6,7,8,9],_ref2)>=0)||(_ref3=n%100,__indexOf.call([11,12,13,14],_ref3)>=0)){return"many"}return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.tr={uploading:"Yükleniyor... Lütfen bekleyin.",loadingInfo:"Bilgiler yükleniyor...",errors:{"default":"Hata",baddata:"Geçersiz değer",size:"Dosya çok büyük",upload:"Yüklenemedi",user:"Yükleme iptal edildi",info:"Bilgiler getirilemedi",image:"Sadece resim dosyası yüklenebilir",createGroup:"Dosya grubu yaratılamıyor",deleted:"Dosya silinmiş"},draghere:"Buraya bir dosya bırakın",file:{other:"%1 dosya"},buttons:{cancel:"İptal",remove:"Kaldır",choose:{files:{one:"Dosya Seçin",other:"Dosya Seçin"},images:{one:"Resim Dosyası Seçin",other:"Resim Dosyası Seçin"}}},dialog:{done:"Bitti",showFiles:"Dosyaları Göster",tabs:{names:{preview:"Önizleme",file:"Bilgisayar",url:"Dış Bağlantılar"},file:{drag:"Braya bir dosya bakın",nodrop:"Bilgisayarınızdan dosya yükleyin",or:"or",button:"Bilgisayardan bir dosya seç",also:"Diğer yükleme seçenekleri"},url:{title:"Webden dosyalar",line1:"Webden herhangi bir dosya seçin.",line2:"Dosya bağlantısını sağlayın.",input:"Bağlantınızı buraya yapıştırın...",button:"Yükle"},preview:{unknownName:"bilinmeyen",change:"İptal",back:"Geri",done:"Ekle",unknown:{title:"Yükleniyor... Önizleme için lütfen bekleyin.",done:"Önizlemeyi geç ve kabul et"},regular:{title:"Bu dosya eklensin mi?",line1:"Yukarıdaki dosyayı eklemek üzeresiniz.",line2:"Lütfen onaylayın."},image:{title:"Bu görsel eklensin mi?",change:"İptal"},crop:{title:"Bu görseli kes ve ekle",done:"Bitti"},error:{"default":{title:"Aman!",text:"Yükleme sırasında bir hata oluştu.",back:"Lütfen tekrar deneyin."},image:{title:"Sadece resim dosyaları kabul edilmektedir.",text:"Lütfen başka bir dosya ile tekrar deneyin.",back:"Resim dosyası seç"},size:{title:"Seçtiğiniz dosya limitleri aşıyor.",text:"Lütfen başka bir dosya ile tekrar deneyin."},loadImage:{title:"Hata",text:"Resim dosyası yüklenemedi"}},multiple:{title:"%files% dosya seçtiniz",question:"Bu dosyaların hepsini eklemek istiyor musunuz?",tooManyFiles:"Fazla sayıda dosya seçtiniz, en fazla %max% dosya olabilir.",tooFewFiles:"%files% dosya seçtiniz, en az %min% dosya olmalıdır.",clear:"Hepsini kaldır",done:"Bitti"}}},footer:{text:"Dosya yükleme, saklama ve işleme servisi"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.tr=function(n){return"other"}})}).call(this);(function(){uploadcare.namespace("uploadcare.locale.translations",function(ns){return ns.zh={uploading:"上传中...请等待",loadingInfo:"正在读取信息...",errors:{"default":"错误",baddata:"错误数据",size:"文件太大",upload:"无法上传",user:"上传被取消",info:"无法读取信息",image:"只允许图形文件",createGroup:"无法建立文件组",deleted:"文件已被删除"},draghere:"拖放文件到这里",file:{other:"%1 个文件"},buttons:{cancel:"取消",remove:"删除"},dialog:{done:"完成",showFiles:"显示文件",tabs:{names:{url:"任意图片链接"},file:{drag:"拖放文件到这里",nodrop:"从你的电脑中上传",or:"或者",button:"从电脑中选取文件",also:"你也可以选自"},url:{title:"来自互联网的文件",line1:"从互联网选取文件",line2:"只需提供链接",input:"将链接拷贝至此...",button:"上传"},preview:{unknownName:"未知",change:"取消",back:"返回",done:"添加",unknown:{title:"上传中...请等待预览",done:"跳过预览,直接接受"},regular:{title:"添加这个文件?",line1:"你将添加上面的文件。",line2:"请确认。"},image:{title:"添加这个图片?",change:"取消"},crop:{title:"剪裁并添加这个图片",done:"完成"},error:{"default":{title:"错误!",text:"上传过程中出错。",back:"请重试"},image:{title:"只允许上传图片文件。",text:"请选择其他文件重新上传。",back:"选择图片"},size:{title:"你选取的文件超过了100MB的上限",text:"请用另一个文件再试一次。"},loadImage:{title:"错误",text:"无法读取图片"}},multiple:{title:"你已经选择 %files%",question:"你要添加所有文件吗?",tooManyFiles:"你选了太多的文件. 最多可选择%max%. 请删除一些。",clear:"清空",done:"完成"}}},footer:{text:"为您提供文件上传、存储和编辑功能。 Copyright ©"}}}});uploadcare.namespace("uploadcare.locale.pluralize",function(ns){return ns.zh=function(){return"other"}})}).call(this);(function(){var $,namespace,s,utils;namespace=uploadcare.namespace,utils=uploadcare.utils,s=uploadcare.settings,$=uploadcare.jQuery;namespace("uploadcare.locale",function(ns){var build,defaultLang,defaults,translate,_build;defaultLang="en";defaults={lang:defaultLang,translations:ns.translations[defaultLang],pluralize:ns.pluralize[defaultLang]};_build=function(settings){var lang,pluralize,translations;lang=settings.locale||defaults.lang;translations=$.extend(true,{},ns.translations[lang],settings.localeTranslations);pluralize=$.isFunction(settings.localePluralize)?settings.localePluralize:ns.pluralize[lang];return{lang:lang,translations:translations,pluralize:pluralize}};build=utils.once(function(){return _build(s.build())});ns.rebuild=function(settings){var result;result=_build(s.build(settings));return build=function(){return result}};translate=function(key,node){var path,subkey,_i,_len;path=key.split(".");for(_i=0,_len=path.length;_i<_len;_i++){subkey=path[_i];if(node==null){return null}node=node[subkey]}return node};return ns.t=function(key,n){var locale,value,_ref;locale=build();value=translate(key,locale.translations);if((value==null)&&locale.lang!==defaults.lang){locale=defaults;value=translate(key,locale.translations)}if(n!=null){if(locale.pluralize!=null){value=((_ref=value[locale.pluralize(n)])!=null?_ref.replace("%1",n):void 0)||n}else{value=""}}return value||""}})}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/circle-text"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-widget-circle-back">\n <div class="uploadcare-widget-circle-text" role="uploadcare-circle-text"></div>\n</div>\n')}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/dialog"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-dialog uploadcare-responsive-panel"><!--\n--><div class="uploadcare-dialog-inner-wrap">\n <div class="uploadcare-dialog-close">×</div>\n <div class="uploadcare-dialog-placeholder"></div>\n </div>\n</div>\n')}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/panel"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-dialog-panel">\n <div class="uploadcare-dialog-tabs"></div>\n</div>\n<div class="uploadcare-dialog-footer">\n ',(""+t("dialog.footer.text")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n <a href="https://uploadcare.com/" target="_blank">',(""+t("dialog.footer.link")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"</a>\n</div>\n")}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/source-tab-base"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div \n class="uploadcare-dialog-source-base-wrap" \n role="uploadcare-dialog-source-base-wrap"\n></div>\n\n<div class="uploadcare-dialog-inner-footer uploadcare-dialog-source-base-footer">\n <div class="uploadcare-dialog-button"\n role="uploadcare-dialog-source-base-show-files">\n ',(""+t("dialog.showFiles")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n <div class="uploadcare-dialog-source-base-counter"></div>\n </div>\n <div\n class="uploadcare-dialog-button-success" \n role="uploadcare-dialog-source-base-done">',(""+t("dialog.done")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'</div>\n <div \n class="uploadcare-dialog-inner-footer-text"\n role="uploadcare-dialog-source-base-footer-text"\n ></div>\n</div>\n')}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/styles"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('\n\n\n\n\n\n\n.uploadcare-dialog-tab:before,.uploadcare-dialog-tab:hover:before,.uploadcare-dialog-disabled-tab:hover:before{background-image:url("',utils.imagePath("tab-icons.png"),'");background-size:50px}.uploadcare-dialog-tab_current:before,.uploadcare-dialog-tab_current:hover:before{background-image:url("',utils.imagePath("tab-icons-active.png"),'");background-size:50px}.uploadcare-crop-widget .jcrop-vline,.uploadcare-crop-widget .jcrop-hline{background-image:url(data:image/gif;base64,R0lGODlhCAAIAPABAAAAAKqqqiH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAACAAIAAACDYQRGadrzVRMB9FZ5SwAIfkECQoAAQAsAAAAAAgACAAAAg8MDqGYaudeW9ChyOyltQAAIfkECQoAAQAsAAAAAAgACAAAAg9MgGCXm+rQYtC0WGl9oQAAIfkECQoAAQAsAAAAAAgACAAAAg+MgWCRernaYmjCWLF7qAAAIfkECQoAAQAsAAAAAAgACAAAAg2MAwmna81UTAfRWeUsACH5BAkKAAEALAAAAAAIAAgAAAIPRB6gmGrnXlvQocjspbUAACH5BAkKAAEALAAAAAAIAAgAAAIPBIJhl5vq0GLQtFhpfaAAACH5BAUKAAEALAAAAAAIAAgAAAIPhINhkHq52mJowlixe6gAADs=)}.uploadcare-dialog-file-sources:before{background-image:url("',utils.imagePath("arrow.png"),'")}.uploadcare-dpm-file-remove{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAQAAAAngNWGAAABM0lEQVQoz5VTvW7CMBC2kHivQsjrZGRjaB6lXWCJbWScIT8PYN0GQ7s6FUUKL8CA2suR2C4FlfqkyL77cuf7/B1jbp3GdmIW1VIVKq9ezMI+ncbs92omNeeQgYQ1msQdh5o30x+g82ibCAysr4yDgG1yHjngLhkyXVuXeZcMRSNJMI4mAwinGl2siaiFWncOAW/QgO4vwCGHD/QI2tca27LxEDrAF7QE5fg94ungfrMxM89ZXyqnYAsbtG53RM/lKhmYlJUr6XrUPbQlmHY8SChXTBUhHRsCXfKGdKmCKe2PApQDKmokAJavD5b2zei+hTvNDPQI+HR5PD3C0+MJf4c95vCE79ETEI5POPvzCWf/EwXJbH5XZvNAZqSh6U3hRjc0jqMQmxRHoVRltTSpjcNR+AZwwvykEau0BgAAAABJRU5ErkJggg==)}.uploadcare-dpm-file-error:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABIklEQVR42q3Vv2rCUBTHcaEQH825TdLl9hl0FsFdV7s5uXSpb+DoEziV6JCgATdR02D9E09/R64KF3NPbQx84BJOvgRyuSktK5VbHHiFDwhhCwl86Xu+nimZbsWeYQIkmMCLLfgELaA7tfSzRlCISVEz6AEV5J2DDszyBtNGg7L5/CSt123BGBwOKqA8WRzT+cqmU+kt3zj4aQ0myTW4WEjBPgcj29B+NLoE98OhFIw4+GMb2vR6l+Cm25WCWw6ubUPftRrR8XiSVKt/CgZADxKJH2XlurQbDBivxY8ibpu02SR98VrcNuLGXitFh/GYDkHAa2ljlznIfKCCfPNwaBeItfOOr84/Yu/m8WVy7zhgPfHE1hxQ0IcQdlqo76m8X8Avwkyxg4iIuCEAAAAASUVORK5CYII=)}.uploadcare-dpm-file-preview{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAQAAAAngNWGAAABD0lEQVQoFQXBPa5OARQF0LXPvfKS9wo/hegMQUzEJESiUIpOoxOlRKJDIgqVUZiNqPGdba0AAPLj48Mn/8ApgEcPOAGArx/uPVvrEFVRA04A+PTu+vk1BlSwLuAE4Pubvy+vHGAFxABOgC+v/ryO24oYUVUDGODzi+PtjfuuXBBUxG8XASd8e3rz/o5rY60YwVjXKAj8/HXrblDFIAKCehxOOHcxCggWUTHghJYqIqIigoqCEyCKEcXFgAjghCAWi1EDIlgwABWxoIhYaxUMsIo4BEHBRR1ggMMogoqq4jCAgVo1VhGMgFjACQUjCKIqIigYqKiLILiogFULBkbUWhSDqKpYMFAFwaJGUVUH+A8ToG9OM8KqQQAAAABJRU5ErkJggg==)}.uploadcare-dialog-error-tab-illustration{background-image:url("',utils.imagePath("error-default.png"),'")}.uploadcare-dialog-camera-holder .uploadcare-dialog-error-tab-illustration,.uploadcare-dialog-error-tab-image .uploadcare-dialog-error-tab-illustration{background-image:url("',utils.imagePath("error-image.png"),'")}.uploadcare-dialog{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQIHWMw/AQAAVcBJCiBozgAAAAASUVORK5CYII=);background:rgba(48,48,48,0.7)}@media(-webkit-min-device-pixel-ratio:1.5),(min-resolution:144dpi){.uploadcare-dialog-tab:before,.uploadcare-dialog-tab:hover:before,.uploadcare-dialog-disabled-tab:hover:before{background-image:url("',utils.imagePath("tab-icons@2x.png"),'")}.uploadcare-dialog-tab_current:before,.uploadcare-dialog-tab_current:hover:before{background-image:url("',utils.imagePath("tab-icons-active@2x.png"),"\")}}html.uploadcare-dialog-opened{overflow:hidden}.uploadcare-dialog{font-family:\"Helvetica Neue\",Helvetica,Arial,\"Lucida Grande\",sans-serif;position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;overflow:auto;white-space:nowrap;text-align:center}.uploadcare-dialog:before{display:inline-block;vertical-align:middle;content:'';height:100%;position:static;width:0}.uploadcare-dialog *{margin:0;padding:0}.uploadcare-dialog .uploadcare-dialog-panel{border-radius:8px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.35);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.35);box-shadow:0 1px 2px rgba(0,0,0,0.35)}.uploadcare-dialog{-webkit-transition:opacity .25s cubic-bezier(0.05,0.7,0.25,1);-moz-transition:opacity .25s cubic-bezier(0.05,0.7,0.25,1);transition:opacity .25s cubic-bezier(0.05,0.7,0.25,1);opacity:0}.uploadcare-dialog .uploadcare-dialog-inner-wrap{-webkit-transition:-webkit-transform .25s cubic-bezier(0.05,0.7,0.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0.05,0.7,0.25,1);transition:transform .25s cubic-bezier(0.05,0.7,0.25,1);-webkit-transform:scale(0.8);-moz-transform:scale(0.8);transform:scale(0.8);-webkit-transform-origin:50% 100%;-moz-transform-origin:50% 100%;transform-origin:50% 100%}.uploadcare-dialog.uploadcare-active{opacity:1}.uploadcare-dialog.uploadcare-active .uploadcare-dialog-inner-wrap{-webkit-transform:none;-moz-transform:none;transform:none}.uploadcare-dialog-inner-wrap{display:inline-block;vertical-align:middle;white-space:normal;text-align:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;width:100%;min-width:760px;max-width:944px;padding:0 33px 0 11px}.uploadcare-dialog-close{width:33px;height:33px;line-height:33px;font-size:29.7px;font-weight:bold;color:#fff;cursor:pointer;position:absolute;text-align:center;right:0}.uploadcare-dialog-panel{overflow:hidden;position:relative;background:#efefef;font-weight:normal}.uploadcare-dialog-tabs{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:75px;height:616px;float:left;background:#dee0e1;border-right:1px solid #c5cace}.uploadcare-dialog-tab{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;height:56px;position:relative;border-bottom:1px solid #c5cace;cursor:pointer}.uploadcare-dialog-tab .uploadcare-dialog-icon,.uploadcare-dialog-tab:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;top:50%;left:50%;display:inline-block;width:50px;height:50px;margin:-25px;opacity:.66}.uploadcare-dialog-tab:before{content:''}.uploadcare-dialog-tab:hover{background-color:#e5e7e8}.uploadcare-dialog-tab:hover .uploadcare-dialog-icon{opacity:1}.uploadcare-dialog-tab:hover:before{opacity:1}.uploadcare-dialog-tab_current{margin-right:-1px;border-right:1px solid #efefef}.uploadcare-dialog-tab_current,.uploadcare-dialog-tab_current:hover{background-color:#efefef}.uploadcare-dialog-tab_current .uploadcare-dialog-icon{opacity:1}.uploadcare-dialog-tab_current:before{opacity:1}.uploadcare-dialog-tab_hidden{display:none!important}.uploadcare-dialog-disabled-tab{cursor:default}.uploadcare-dialog-disabled-tab:hover{background-color:#dee0e1}.uploadcare-dialog-tab-preview .uploadcare-widget-circle{padding:10px}.uploadcare-dialog-tab-preview .uploadcare-widget-circle--canvas{color:#828689;border-color:#bfbfbf}.uploadcare-dialog-tab-preview.uploadcare-dialog-tab_current .uploadcare-widget-circle--canvas{color:#d0bf26;border-color:#e1e5e7}.uploadcare-dialog-tab-preview:before{display:none}.uploadcare-dialog-tab-file:before{background-position:0 -50px}.uploadcare-dialog-tab-url:before{background-position:0 -100px}.uploadcare-dialog-tab-facebook:before{background-position:0 -150px}.uploadcare-dialog-tab-dropbox:before{background-position:0 -200px}.uploadcare-dialog-tab-gdrive:before{background-position:0 -250px}.uploadcare-dialog-tab-instagram:before{background-position:0 -300px}.uploadcare-dialog-tab-vk:before{background-position:0 -350px}.uploadcare-dialog-tab-evernote:before{background-position:0 -400px}.uploadcare-dialog-tab-box:before{background-position:0 -450px}.uploadcare-dialog-tab-skydrive:before{background-position:0 -500px}.uploadcare-dialog-tab-flickr:before{background-position:0 -550px}.uploadcare-dialog-tab-camera:before{background-position:0 -600px}.uploadcare-dialog-tab-huddle:before{background-position:0 -650px}.uploadcare-dialog-tabs-panel{position:relative;display:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-left:75px;height:616px;line-height:22px;font-size:16px;color:#000}.uploadcare-dialog-tabs-panel .uploadcare-dialog-input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;height:44px;margin-bottom:22px;padding:11px 12.5px;font-family:inherit;font-size:16px;border:1px solid #c5cace;background:#fff;color:#000}.uploadcare-dialog-tabs-panel_current{display:block}.uploadcare-pre{white-space:pre;font-family:monospace;margin:22px auto;padding:22px 25px;background-color:#fff;border:1px solid #c5cace;border-radius:3px;text-align:left;font-size:15px;line-height:22px}.uploadcare-dialog-footer{font-size:13px;line-height:1.4em;text-align:center;color:#ddd;margin:15px}.uploadcare-dialog .uploadcare-dialog-footer a{color:#c2c2c2;text-decoration:none}.uploadcare-dialog .uploadcare-dialog-footer a:hover{text-decoration:underline}.uploadcare-dialog-title{font-size:22px;line-height:1;margin-bottom:22px}.uploadcare-dialog-title.uploadcare-error{color:red}.uploadcare-dialog-title2{font-size:20px;line-height:1;padding-bottom:11px}.uploadcare-dialog-big-title{font-size:40px;font-weight:bold;line-height:1em;margin-bottom:50px}.uploadcare-dialog-label{font-size:15px;line-height:25px;margin-bottom:12.5px;word-wrap:break-word}.uploadcare-dialog-large-text{font-size:20px;font-weight:normal;line-height:1.5em}.uploadcare-dialog-large-text .uploadcare-pre{display:inline-block;font-size:18px}.uploadcare-dialog-section{margin-bottom:22px}.uploadcare-dialog-normal-text{font-size:13px;color:#545454}.uploadcare-dialog-button{display:inline-block;font-size:13px;line-height:30px;padding:0 12.5px;margin-right:.5em;border:solid 1px;border-radius:3px;cursor:pointer;color:#444}.uploadcare-dialog-button,.uploadcare-dialog-button[disabled]:active,.uploadcare-dialog-button.uploadcare-disabled-el:active,.uploadcare-dialog-button[disabled]:hover,.uploadcare-dialog-button.uploadcare-disabled-el:hover{background:#f3f3f3;background:-webkit-linear-gradient(#f5f5f5,#f1f1f1);background:-moz-linear-gradient(#f5f5f5,#f1f1f1);background:linear-gradient(#f5f5f5,#f1f1f1);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-color:#dcdcdc}.uploadcare-dialog-button:hover{background:#f8f8f8;background:-webkit-linear-gradient(#fbfbfb,#f6f6f6);background:-moz-linear-gradient(#fbfbfb,#f6f6f6);background:linear-gradient(#fbfbfb,#f6f6f6);-webkit-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05)}.uploadcare-dialog-button:active{background:#f3f3f3;background:-webkit-linear-gradient(#f5f5f5,#f1f1f1);background:-moz-linear-gradient(#f5f5f5,#f1f1f1);background:linear-gradient(#f5f5f5,#f1f1f1);-webkit-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 2px rgba(0,0,0,0.05)}.uploadcare-dialog-button[disabled],.uploadcare-dialog-button.uploadcare-disabled-el{cursor:default;opacity:.6}.uploadcare-dialog-button:active,.uploadcare-dialog-button:hover{border-color:#cbcbcb}.uploadcare-dialog-button-success{display:inline-block;font-size:13px;line-height:30px;padding:0 12.5px;margin-right:.5em;border:solid 1px;border-radius:3px;cursor:pointer;color:#fff}.uploadcare-dialog-button-success,.uploadcare-dialog-button-success[disabled]:active,.uploadcare-dialog-button-success.uploadcare-disabled-el:active,.uploadcare-dialog-button-success[disabled]:hover,.uploadcare-dialog-button-success.uploadcare-disabled-el:hover{background:#3786eb;background:-webkit-linear-gradient(#3b8df7,#347fdf);background:-moz-linear-gradient(#3b8df7,#347fdf);background:linear-gradient(#3b8df7,#347fdf);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-color:#266fcb}.uploadcare-dialog-button-success:hover{background:#3279d6;background:-webkit-linear-gradient(#3986ea,#2c6dc2);background:-moz-linear-gradient(#3986ea,#2c6dc2);background:linear-gradient(#3986ea,#2c6dc2);-webkit-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05)}.uploadcare-dialog-button-success:active{background:#3177d3;background:-webkit-linear-gradient(#3680e1,#2c6fc5);background:-moz-linear-gradient(#3680e1,#2c6fc5);background:linear-gradient(#3680e1,#2c6fc5);-webkit-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 2px rgba(0,0,0,0.05)}.uploadcare-dialog-button-success[disabled],.uploadcare-dialog-button-success.uploadcare-disabled-el{cursor:default;opacity:.6}.uploadcare-dialog-button-success:active,.uploadcare-dialog-button-success:hover{border-color:#266eca #1f62b7 #1753a1}.uploadcare-dialog-button-success:hover{-webkit-box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5);-moz-box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5);box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5)}.uploadcare-dialog-button-success:active{-webkit-box-shadow:inset 0 1px 3px rgba(22,82,160,0.4);-moz-box-shadow:inset 0 1px 3px rgba(22,82,160,0.4);box-shadow:inset 0 1px 3px rgba(22,82,160,0.4)}.uploadcare-dialog-big-button{border-radius:100px;font-size:20px;font-weight:normal;letter-spacing:1px;color:white;line-height:33px;border:solid 1px #276fcb;text-shadow:0 -1px #2a7ce5;display:inline-block;padding:16.5px 2em;cursor:pointer;-webkit-box-shadow:inset 0 -2px #1f66c1;-moz-box-shadow:inset 0 -2px #1f66c1;box-shadow:inset 0 -2px #1f66c1;background:#458dee;background:-webkit-linear-gradient(#4892f6,#4289e6);background:-moz-linear-gradient(#4892f6,#4289e6);background:linear-gradient(#4892f6,#4289e6)}.uploadcare-dialog-big-button:hover{-webkit-box-shadow:inset 0 -2px #1652a0;-moz-box-shadow:inset 0 -2px #1652a0;box-shadow:inset 0 -2px #1652a0;background:#3279d6;background:-webkit-linear-gradient(#3986eb,#2c6dc2);background:-moz-linear-gradient(#3986eb,#2c6dc2);background:linear-gradient(#3986eb,#2c6dc2)}.uploadcare-dialog-big-button:active{-webkit-box-shadow:inset 0 2px #2561b9;-moz-box-shadow:inset 0 2px #2561b9;box-shadow:inset 0 2px #2561b9;background:#2c6ec3;background:-webkit-linear-gradient(#2c6ec3,#2c6ec3);background:-moz-linear-gradient(#2c6ec3,#2c6ec3);background:linear-gradient(#2c6ec3,#2c6ec3)}.uploadcare-dialog-preview-image-wrap{white-space:nowrap;text-align:center;width:100%;height:462px}.uploadcare-dialog-preview-image-wrap:before{display:inline-block;vertical-align:middle;content:'';height:100%;position:static;width:0}.uploadcare-dialog-preview-image{display:inline-block;vertical-align:middle;white-space:normal;max-width:100%;max-height:100%}.uploadcare-dialog-preview--with-sizes .uploadcare-dialog-preview-image-wrap{height:422px}.uploadcare-dialog-inner-footer{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff3be;border-top:1px solid #efe2a9;height:66px;padding:17px 25px 0}.uploadcare-dialog-inner-footer .uploadcare-dialog-button-success{float:right}.uploadcare-dialog-inner-footer .uploadcare-dialog-button{float:left}.uploadcare-dialog-inner-footer .uploadcare-dialog-button-success,.uploadcare-dialog-inner-footer .uploadcare-dialog-button{min-width:100px;text-align:center;margin-right:0}.uploadcare-dialog-inner-footer .uploadcare-error{color:red}.uploadcare-dialog-inner-footer-text{text-align:center;color:#85732c;font-size:15px;line-height:32px}.uploadcare-dialog-message-center{text-align:center;padding-top:110px}.uploadcare-dialog-preview-center{text-align:center;padding-top:176px}.uploadcare-dialog-preview-circle{width:66px;height:66px;display:inline-block;margin-bottom:22px}.uploadcare-dialog-error-tab-wrap{height:100%;text-align:center;white-space:nowrap}.uploadcare-dialog-error-tab-wrap:before{display:inline-block;vertical-align:middle;content:'';height:100%;position:static;width:0}.uploadcare-dialog-error-tab-wrap .uploadcare-dialog-title{margin-bottom:12px}.uploadcare-dialog-error-tab-wrap .uploadcare-dialog-normal-text{margin-bottom:38px}.uploadcare-dialog-error-tab-wrap .uploadcare-dialog-button-success{margin:0}.uploadcare-dialog-error-tab-wrap2{display:inline-block;vertical-align:middle;white-space:normal;margin-top:-22px}.uploadcare-dialog-error-tab-illustration{display:inline-block;width:170px;height:120px;background-position:center;background-repeat:no-repeat;margin-bottom:38px}.uploadcare-if-draganddrop{display:none}.uploadcare-draganddrop .uploadcare-if-no-draganddrop{display:none}.uploadcare-draganddrop .uploadcare-if-draganddrop{display:block}.uploadcare-draganddrop .uploadcare-dialog-file-drop-area{border:dashed 3px #c5cacd;background:rgba(255,255,255,0.64)}.uploadcare-draganddrop .uploadcare-dialog-file-title{color:#dee0e1;text-shadow:0 1px white;margin-top:0}.uploadcare-dialog-file-drop-area{width:100%;height:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:none;text-align:center;border-radius:3px;padding-top:70px}.uploadcare-dialog-file-drop-area .uploadcare-dialog-big-button{margin-top:11px;margin-bottom:55px}.uploadcare-dialog-file-title{font-size:40px;line-height:1;color:black;font-weight:bold;margin:66px 0}.uploadcare-dialog-file-or{font-size:13px;color:#8f9498;margin-bottom:33px}.uploadcare-dialog-file-sources{position:relative;display:inline-block;padding:0 80px 0 100px;line-height:2em}.uploadcare-dialog-file-sources:before{background-repeat:no-repeat;content:'';display:block;position:absolute;width:67px;height:44px;padding:0;top:-30px;left:10px}.uploadcare-dialog-file-source{display:inline;font-size:15px;margin-right:.2em;cursor:pointer;font-weight:300;white-space:nowrap}.uploadcare-dialog-file-source:after{content:'\\00B7';color:#b7babc;margin-left:.5em}.uploadcare-dialog-file-source:last-child:after{display:none}.uploadcare-dragging .uploadcare-dialog-file-or,.uploadcare-dragging .uploadcare-dialog-file-sources,.uploadcare-dragging .uploadcare-dialog-file-drop-area .uploadcare-dialog-big-button{display:none}.uploadcare-dragging .uploadcare-dialog-file-drop-area{background-color:#f0f0f0;border-color:#b3b5b6;padding-top:264px}.uploadcare-dragging .uploadcare-dialog-file-title{color:#707478}.uploadcare-dragging.uploadcare-dialog-file-drop-area{background-color:#f2f7fe;border-color:#438ae7}.uploadcare-dragging.uploadcare-dialog-file-drop-area .uploadcare-dialog-file-title{color:#438ae7}.uploadcare-dialog-camera-holder{white-space:nowrap;text-align:center;height:528px}.uploadcare-dialog-camera-holder:before{display:inline-block;vertical-align:middle;content:'';height:100%;position:static;width:0}.uploadcare-dialog-camera-holder .uploadcare-dialog-normal-text{margin-bottom:38px}.uploadcare-dialog-multiple .uploadcare-dialog-camera-holder{height:462px}.uploadcare-dialog-camera-video{display:inline-block;vertical-align:middle;white-space:normal;display:none;max-width:100%;max-height:528px;transition:transform .8s cubic-bezier(0.23,1,0.32,1);-webkit-transition:-webkit-transform .8s cubic-bezier(0.23,1,0.32,1)}.uploadcare-dialog-multiple .uploadcare-dialog-camera-video{max-height:462px}.uploadcare-dialog-camera--mirrored{transform:scale(-1,1);-webkit-transform:scale(-1,1)}.uploadcare-dialog-camera-message{display:inline-block;vertical-align:middle;white-space:normal;display:none;max-width:450px}.uploadcare-dialog-camera-controls{margin-top:17px;text-align:center}.uploadcare-dialog-camera-mirror{position:absolute;margin-right:0;right:25px}.uploadcare-dialog-camera-capture,.uploadcare-dialog-camera-retry,.uploadcare-dialog-camera-mirror{display:none}.uploadcare-dialog-camera-requested .uploadcare-dialog-camera-message{display:inline-block}.uploadcare-dialog-camera-not-found{display:none}.uploadcare-dialog-camera-not-founded .uploadcare-dialog-camera-please-allow{display:none}.uploadcare-dialog-camera-not-founded .uploadcare-dialog-camera-not-found{display:block}.uploadcare-dialog-camera-denied .uploadcare-dialog-camera-retry{display:inline-block}.uploadcare-dialog-camera-ready .uploadcare-dialog-camera-video,.uploadcare-dialog-camera-ready .uploadcare-dialog-camera-capture,.uploadcare-dialog-camera-ready .uploadcare-dialog-camera-mirror{display:inline-block}.uploadcare-dpm-file-list{height:484px;overflow:auto;margin:0 -25px -22px 0}.uploadcare-dpm-file-item{border-top:1px solid #e3e3e3;border-bottom:1px solid #e3e3e3;margin-bottom:-1px;display:table;table-layout:fixed;width:100%;padding:10px 0;min-height:20px;font-size:13px;line-height:1.2}.uploadcare-dpm-file-item>*{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;vertical-align:middle;padding-right:20px}.uploadcare-dpm-file-item:last-child{margin-bottom:0}.uploadcare-dpm-file-item:hover{background:#ececec}.uploadcare-dpm-file-item:hover .uploadcare-dpm-file-remove{display:inline-block}.uploadcare-dpm-uploaded .uploadcare-dpm-file-progressbar-wrap{display:none}.uploadcare-dpm-error .uploadcare-dpm-file-error{display:table-cell}.uploadcare-dpm-error .uploadcare-dpm-file-size,.uploadcare-dpm-error .uploadcare-dpm-file-progressbar-wrap{display:none}.uploadcare-dpm-file-preview,.uploadcare-dpm-file-error:before{content:'';display:inline-block;width:20px;height:20px;margin:-3.5px .7em -3.5px 0}.uploadcare-dpm-file-preview-wrap{width:45px;display:table-cell;text-align:center;line-height:0;padding-right:10px}.uploadcare-dpm-file-preview{margin:0}.uploadcare-dpm-file-name{width:100%;word-wrap:break-word}.uploadcare-dpm-file-size{width:3.5em;text-align:left}.uploadcare-dpm-file-progressbar-wrap{width:80px}.uploadcare-dpm-file-progressbar{width:100%;height:8px;background:#e0e0e0;border-radius:100px}.uploadcare-dpm-file-progressbar-value{height:100%;background:#d6b849;border-radius:100px}.uploadcare-dpm-file-error{width:200px;display:none;color:#f5444b}.uploadcare-dpm-file-remove-wrap{width:20px;text-align:right;line-height:0}.uploadcare-dpm-file-remove{display:none;width:20px;height:20px;cursor:pointer}.uploadcare-dialog-source-base-wrap{height:616px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.uploadcare-dialog-multiple .uploadcare-dialog-source-base-wrap{height:550px}.uploadcare-dialog-padding{padding:22px 25px}.uploadcare-dialog-remote-iframe-wrap{overflow:auto;-webkit-overflow-scrolling:touch}.uploadcare-dialog-remote-iframe{display:block;width:100%;height:100%;border:0;opacity:0}.uploadcare-dialog-source-base-footer{display:none}.uploadcare-dialog-multiple .uploadcare-dialog-source-base-footer{display:block}.uploadcare-dialog-source-base-counter{display:none}.uploadcare-if-mobile{display:none}@media screen and (max-width:600px){.uploadcare-dialog-opened{overflow:visible!important;position:static!important;width:auto!important;height:auto!important;min-width:0!important;background:#efefef!important}body.uploadcare-dialog-opened>:not(.uploadcare-dialog){display:none!important}.uploadcare-if-mobile{display:block}.uploadcare-if-no-mobile{display:none}.uploadcare-dialog{position:absolute;overflow:visible;-webkit-text-size-adjust:100%}.uploadcare-dialog:before{display:none}.uploadcare-dialog-inner-wrap{padding:0;min-width:310px;height:100%}.uploadcare-dialog-close{position:fixed;z-index:2;color:#000;width:50px;height:50px;line-height:45px}.uploadcare-dialog-footer{display:none}.uploadcare-responsive-panel .uploadcare-dialog-panel{overflow:visible;height:100%;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.uploadcare-responsive-panel .uploadcare-dialog-tabs-panel{padding:50px 0 0;margin:0;height:100%}.uploadcare-responsive-panel .uploadcare-dialog-source-base-wrap{height:auto}.uploadcare-responsive-panel .uploadcare-dialog-remote-iframe-wrap{overflow:visible;height:100%}.uploadcare-responsive-panel .uploadcare-dialog-padding{padding:22px 15px}.uploadcare-responsive-panel .uploadcare-dialog-preview-image-wrap{height:auto;padding-bottom:50px}.uploadcare-responsive-panel .uploadcare-dialog-preview-image{max-height:450px}.uploadcare-responsive-panel .uploadcare-dpm-file-list{height:auto;margin:0 -15px 0 0}.uploadcare-responsive-panel .uploadcare-dpm-file-item>*{padding-right:10px}.uploadcare-responsive-panel .uploadcare-dpm-file-progressbar-wrap{width:40px}.uploadcare-responsive-panel .uploadcare-dpm-file-remove{display:inline-block}.uploadcare-responsive-panel .uploadcare-dialog-file-sources,.uploadcare-responsive-panel .uploadcare-dialog-file-or{display:none}.uploadcare-responsive-panel .uploadcare-dialog-file-title{display:none}.uploadcare-responsive-panel .uploadcare-dialog-file-drop-area{padding-top:0;border:0;background:transparent}.uploadcare-responsive-panel .uploadcare-dialog-big-button{margin:110px 0 0}.uploadcare-responsive-panel .uploadcare-clouds-tip{color:#909498;font-size:.75em;line-height:1.4;text-align:left;padding:10px 0 0 50px}.uploadcare-responsive-panel .uploadcare-clouds-tip:before{background-image:url(\"",utils.imagePath("arrow.png"),"\");background-repeat:no-repeat;background-size:51px 33px;content:'';position:absolute;margin:-20px -36px;display:block;width:28px;height:30px}.uploadcare-responsive-panel .uploadcare-dialog-camera-holder{height:auto}.uploadcare-responsive-panel .uploadcare-dialog-camera-mirror{right:15px}.uploadcare-responsive-panel .uploadcare-dialog-inner-footer{position:fixed;left:0;bottom:0;width:100%;min-width:310px;height:50px;padding:9px 15px 0;background:rgba(255,243,190,0.95)}.uploadcare-responsive-panel .uploadcare-dialog-inner-footer-text{display:none}.uploadcare-responsive-panel .uploadcare-dialog-source-base-counter{display:inline}.uploadcare-responsive-panel .uploadcare-dialog-multiple .uploadcare-dialog-remote-iframe-wrap:after{content:'';display:block;height:50px}.uploadcare-responsive-panel .uploadcare-dialog-multiple .uploadcare-dialog-source-base-wrap{padding-bottom:50px}.uploadcare-responsive-panel .uploadcare-dialog-multiple .uploadcare-dialog-padding{padding-bottom:72px}.uploadcare-responsive-panel .uploadcare-dialog-tabs{position:fixed;top:0;left:0;width:100%;min-width:310px;height:auto;float:none;z-index:1;background:transparent}.uploadcare-responsive-panel .uploadcare-dialog-tab{display:none;height:50px;white-space:nowrap;background:#dee0e1}.uploadcare-responsive-panel .uploadcare-dialog-tab .uploadcare-dialog-icon,.uploadcare-responsive-panel .uploadcare-dialog-tab:before{position:static;margin:0 6px;vertical-align:middle;opacity:1}.uploadcare-responsive-panel .uploadcare-dialog-tab_current{display:block;background:rgba(239,239,239,0.95)}.uploadcare-responsive-panel .uploadcare-dialog-tab:after{content:attr(title);font-size:20px;vertical-align:middle}.uploadcare-responsive-panel .uploadcare-dialog-opened-tabs .uploadcare-dialog-tabs-panel_current{display:none}.uploadcare-responsive-panel .uploadcare-dialog-opened-tabs .uploadcare-dialog-tabs{position:relative;z-index:3}.uploadcare-responsive-panel .uploadcare-dialog-opened-tabs .uploadcare-dialog-tab{display:block}.uploadcare-responsive-panel .uploadcare-dialog-opened-tabs .uploadcare-dialog-tab_current{background:#efefef}.uploadcare-responsive-panel .uploadcare-dialog-panel:not(.uploadcare-dialog-opened-tabs) .uploadcare-dialog-tab_current{text-align:center}.uploadcare-responsive-panel .uploadcare-dialog-panel:not(.uploadcare-dialog-opened-tabs) .uploadcare-dialog-tab_current:after{content:'';position:absolute;top:16px;left:14px;display:block;width:22px;height:18px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAOCAQAAAD+6Ta3AAAARklEQVR4Ae3SsRFEIQhAwW1IR2s3s6zTGUN+AxdK5tucAIBmOuKSY2pQbHHZVhgiweAnEixW1uC0VdSU41Xo19+te73+9AGOg1FzTMH13gAAAABJRU5ErkJggg==);background-size:22px}.uploadcare-responsive-panel .uploadcare-crop-sizes{top:-50px;margin-top:15px}.uploadcare-responsive-panel .uploadcare-crop-size{margin:0 10px}}.uploadcare-crop-widget.jcrop-holder{direction:ltr;text-align:left;z-index:0}.uploadcare-crop-widget .jcrop-vline,.uploadcare-crop-widget .jcrop-hline{background-color:white;background-position:top left;background-repeat:repeat;font-size:0;position:absolute}.uploadcare-crop-widget .jcrop-vline{height:100%;width:1px!important}.uploadcare-crop-widget .jcrop-hline{height:1px!important;width:100%}.uploadcare-crop-widget .jcrop-vline.right{right:0}.uploadcare-crop-widget .jcrop-hline.bottom{bottom:0}.uploadcare-crop-widget .jcrop-handle{background-color:#333;border:1px #eee solid;font-size:1px}.uploadcare-crop-widget .jcrop-tracker{height:100%;width:100%;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none}.uploadcare-crop-widget .jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0}.uploadcare-crop-widget .jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px}.uploadcare-crop-widget .jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%}.uploadcare-crop-widget .jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%}.uploadcare-crop-widget .jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0}.uploadcare-crop-widget .jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0}.uploadcare-crop-widget .jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0}.uploadcare-crop-widget .jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px}.uploadcare-crop-widget .jcrop-dragbar.ord-n,.uploadcare-crop-widget .jcrop-dragbar.ord-s{height:7px;width:100%}.uploadcare-crop-widget .jcrop-dragbar.ord-e,.uploadcare-crop-widget .jcrop-dragbar.ord-w{height:100%;width:7px}.uploadcare-crop-widget .jcrop-dragbar.ord-n{margin-top:-4px}.uploadcare-crop-widget .jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px}.uploadcare-crop-widget .jcrop-dragbar.ord-e{margin-right:-4px;right:0}.uploadcare-crop-widget .jcrop-dragbar.ord-w{margin-left:-4px}.uploadcare-crop-widget .jcrop-light .jcrop-vline,.uploadcare-crop-widget .jcrop-light .jcrop-hline{background:#FFF;filter:Alpha(opacity=70)!important;opacity:.7!important}.uploadcare-crop-widget .jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px}.uploadcare-crop-widget .jcrop-dark .jcrop-vline,.uploadcare-crop-widget .jcrop-dark .jcrop-hline{background:#000;filter:Alpha(opacity=70)!important;opacity:.7!important}.uploadcare-crop-widget .jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px}.uploadcare-crop-widget.jcrop-holder img,.uploadcare-crop-widget img.jcrop-preview{max-width:none}.uploadcare-crop-widget{display:inline-block;vertical-align:middle;white-space:normal}.uploadcare-crop-widget .jcrop-handle:before{content:'';display:block;width:26px;height:26px;margin:-9px}.uploadcare-crop-widget>div:first-child{-webkit-transform:translateZ(0)}.uploadcare-crop-widget>img{filter:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='grayscale'><feColorMatrix type='saturate' values='.5'/></filter></svg>#grayscale\");-webkit-filter:grayscale(50%)}.uploadcare-crop-sizes{display:none;visibility:hidden;position:relative;top:11px;text-align:center}.uploadcare-dialog-preview--with-sizes .uploadcare-crop-sizes{display:block}.uploadcare-dialog-preview--loaded .uploadcare-crop-sizes{visibility:visible}.uploadcare-crop-size{position:relative;display:inline-block;width:40px;height:40px;line-height:40px;margin:0 20px;font-size:.55em;cursor:pointer;color:#444}.uploadcare-crop-size div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:40px;height:30px;display:inline-block;vertical-align:middle;border:1px solid #ccc}.uploadcare-crop-size:after{content:attr(data-caption);position:absolute;top:1px;left:0;width:100%;text-align:center;margin:0}.uploadcare-crop-size--current div{background:white}.uploadcare-widget{position:relative;display:inline-block;vertical-align:baseline;line-height:2;white-space:nowrap}.uploadcare-widget-status-ready .uploadcare-widget-button-open,.uploadcare-widget-status-started .uploadcare-widget-status,.uploadcare-widget-status-started .uploadcare-widget-text,.uploadcare-widget-status-started .uploadcare-widget-button-cancel,.uploadcare-widget-status-loaded .uploadcare-widget-text,.uploadcare-widget-status-loaded .uploadcare-widget-button-remove,.uploadcare-widget-status-error .uploadcare-widget-text,.uploadcare-widget-status-error .uploadcare-widget-button-open{display:inline-block!important}.uploadcare-widget-status{display:none!important;width:1.8em;height:1.8em;margin:-1em 0;margin-right:1ex;line-height:0;vertical-align:middle}.uploadcare-widget-circle--text .uploadcare-widget-circle-back{width:100%;height:100%;display:table;white-space:normal}.uploadcare-widget-circle--text .uploadcare-widget-circle-text{display:table-cell;vertical-align:middle;text-align:center;font-size:60%;line-height:1}.uploadcare-widget-circle--canvas{color:#d0bf26;border-color:#e1e5e7}.uploadcare-widget-circle--canvas canvas{width:100%;height:100%}.uploadcare-widget-text{display:none!important;margin-right:1ex}.uploadcare-widget-file-name{display:inline}.uploadcare-link,.uploadcare-link:link,.uploadcare-link:visited{cursor:pointer;color:#1a85ad;text-decoration:none;border-bottom:1px dotted #1a85ad;border-color:-moz-initial;border-color:initial}.uploadcare-link:hover,.uploadcare-link:active{color:#176e8f}.uploadcare-widget-button{display:none!important;color:white;padding:.4em .6em;line-height:1;margin:-1em 0;margin-right:.5ex;border-radius:.25em;background:#c3c3c3;cursor:default}.uploadcare-widget-button:hover{background:#b3b3b3}.uploadcare-widget-button-open{padding:.5em .8em;background:#18a5d0}.uploadcare-widget-button-open:hover{background:#0094c0}.uploadcare-widget-dragndrop-area{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:none;position:absolute;top:50%;margin-top:-1.3em;left:-1em;padding:0 1em;line-height:2.6;min-width:100%;text-align:center;background-color:#f0f0f0;color:#707478;border:1px dashed #b3b5b6;border-radius:100px}.uploadcare-widget.uploadcare-dragging .uploadcare-widget-dragndrop-area{background-color:#f2f7fe;border-color:#438ae7;color:#438ae7}.uploadcare-dragging .uploadcare-widget-dragndrop-area{display:block}.uploadcare-dialog-opened .uploadcare-widget-dragndrop-area{display:none}\n")}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/tab-camera"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-dialog-camera-holder"><!--\n --><video class="uploadcare-dialog-camera-video uploadcare-dialog-camera--mirrored"></video><!--\n --><div class="uploadcare-dialog-camera-message">\n <div class="uploadcare-dialog-error-tab-illustration"></div>\n\n <div class="uploadcare-dialog-title uploadcare-dialog-camera-please-allow">\n ',(""+t("dialog.tabs.camera.pleaseAllow.title")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n <div class="uploadcare-dialog-normal-text uploadcare-dialog-camera-please-allow">\n ',(""+t("dialog.tabs.camera.pleaseAllow.text")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n\n <div class="uploadcare-dialog-title uploadcare-dialog-camera-not-found">\n ',(""+t("dialog.tabs.camera.notFound.title")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n <div class="uploadcare-dialog-normal-text uploadcare-dialog-camera-not-found">\n ',(""+t("dialog.tabs.camera.notFound.text")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n\n <div class="uploadcare-dialog-camera-retry uploadcare-dialog-button">\n ',(""+t("dialog.tabs.camera.retry")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n </div><!--\n--></div>\n<div class="uploadcare-dialog-camera-controls">\n <div class="uploadcare-dialog-camera-mirror uploadcare-dialog-button">\n ',(""+t("dialog.tabs.camera.mirror")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n <div class="uploadcare-dialog-camera-capture uploadcare-dialog-button-success">\n ',(""+t("dialog.tabs.camera.capture")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"\n </div>\n</div>\n")}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/tab-file"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-dialog-file-drop-area" role="uploadcare-drop-area">\n <div class="uploadcare-dialog-file-title uploadcare-if-draganddrop">\n ',(""+t("dialog.tabs.file.drag")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n <div class="uploadcare-dialog-file-title uploadcare-if-no-draganddrop">\n ',(""+t("dialog.tabs.file.nodrop")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n <div class="uploadcare-dialog-file-or uploadcare-if-draganddrop">\n ',(""+t("dialog.tabs.file.or")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n <div class="uploadcare-clouds-tip uploadcare-if-mobile">\n ',t("dialog.tabs.file.cloudsTip"),'\n </div>\n <div class="uploadcare-dialog-big-button" role="uploadcare-dialog-browse-file">\n ',(""+t("dialog.tabs.file.button")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"\n </div>\n ");if(tabs.length>1){__p.push('\n <div class="uploadcare-dialog-file-or">\n ',(""+t("dialog.tabs.file.also")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n <div class="uploadcare-dialog-file-sources">\n ');for(var i=0;i<tabs.length;i++){var tab=tabs[i];if(tab=="file"){continue}__p.push('\n <div\n class="uploadcare-dialog-file-source"\n role="uploadcare-dialog-switch-tab"\n data-tab="',(""+tab).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'"\n >',(""+t("dialog.tabs.names."+tab)).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"</div>\n ")}__p.push("\n </div>\n ")}__p.push("\n</div>\n")}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/tab-preview-error"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-dialog-error-tab-wrap uloadcare-dialog-error-tab-',(""+error).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'"><!--\n --><div class="uploadcare-dialog-error-tab-wrap2">\n\n <div class="uploadcare-dialog-error-tab-illustration"></div>\n\n <div class="uploadcare-dialog-title">',(""+t("dialog.tabs.preview.error."+error+".title")||t("dialog.tabs.preview.error.default.title")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'</div>\n\n <div class="uploadcare-dialog-normal-text">',(""+t("dialog.tabs.preview.error."+error+".text")||t("dialog.tabs.preview.error.default.text")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'</div>\n\n <div class="uploadcare-dialog-button-success" \n role="uploadcare-dialog-preview-back">',(""+t("dialog.tabs.preview.error."+error+".back")||t("dialog.tabs.preview.error.default.back")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"</div>\n\n </div>\n</div>\n")}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/tab-preview-image"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-dialog-padding" role="uploadcare-dialog-preview-root">\n <div class="uploadcare-dialog-title" role="uploadcare-dialog-preview-title">\n ',(""+t("dialog.tabs.preview.image.title")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n\n <div class="uploadcare-dialog-preview-image-wrap"><!--\n 1162x684 is 1.5 size of conteiner\n --><img\n src="',(""+file.originalUrl).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'-/preview/1162x684/-/setfill/efefef/-/format/jpeg/-/progressive/yes/"\n title="',(""+(file.name||"")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'"\n alt="',(""+(file.name||"")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'"\n role="uploadcare-dialog-preview-image"\n class="uploadcare-dialog-preview-image"\n />\n </div>\n\n <div class="uploadcare-crop-sizes" role="uploadcare-dialog-preview-crop-sizes">\n <div class="uploadcare-crop-size" data-caption="free"><div></div></div>\n </div>\n</div>\n\n<div class="uploadcare-dialog-inner-footer">\n <div \n class="uploadcare-dialog-button" \n role="uploadcare-dialog-preview-back">',(""+t("dialog.tabs.preview.image.change")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'</div>\n <div \n class="uploadcare-dialog-button-success"\n role="uploadcare-dialog-preview-done">',(""+t("dialog.tabs.preview.done")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"</div>\n</div>\n")}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/tab-preview-multiple-file"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div role="uploadcare-dpm-file-item" class="uploadcare-dpm-file-item">\n <div class="uploadcare-dpm-file-preview-wrap" role="uploadcare-dpm-file-preview-wrap">\n <div class="uploadcare-dpm-file-preview"></div>\n </div>\n <div role="uploadcare-dpm-file-name" class="uploadcare-dpm-file-name">\n ',(""+t("dialog.tabs.preview.unknownName")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n <div class="uploadcare-dpm-file-progressbar-wrap">\n <div class="uploadcare-dpm-file-progressbar">\n <div\n role="uploadcare-dpm-file-progressbar-value"\n class="uploadcare-dpm-file-progressbar-value"\n ></div>\n </div>\n </div>\n <div role="uploadcare-dpm-file-size" class="uploadcare-dpm-file-size"></div>\n <div role="uploadcare-dpm-file-error" class="uploadcare-dpm-file-error"></div>\n <div class="uploadcare-dpm-file-remove-wrap">\n <div role="uploadcare-dpm-file-remove" class="uploadcare-dpm-file-remove"></div>\n </div>\n</div>\n')}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/tab-preview-multiple"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-dialog-padding">\n <div class="uploadcare-dialog-title uploadcare-if-no-mobile" role="uploadcare-dpm-title"></div>\n <div class="uploadcare-dialog-title uploadcare-if-mobile" role="uploadcare-dpm-mobile-title"></div>\n\n <div role="uploadcare-dpm-file-list" class="uploadcare-dpm-file-list"></div>\n</div>\n\n<div class="uploadcare-dialog-inner-footer">\n <div \n class="uploadcare-dialog-button" \n role="uploadcare-dialog-preview-back">',(""+t("dialog.tabs.preview.multiple.clear")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'</div>\n <div \n class="uploadcare-dialog-button-success" \n role="uploadcare-dialog-preview-done">',(""+t("dialog.tabs.preview.multiple.done")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'</div>\n <div class="uploadcare-dialog-inner-footer-text" role="uploadcare-dpm-footer-text"></div>\n</div>\n')}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/tab-preview-regular"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-dialog-padding">\n <div class="uploadcare-dialog-title">',(""+t("dialog.tabs.preview.regular.title")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'</div>\n\n <div class="uploadcare-dialog-label">\n ',(""+(file.name||t("dialog.tabs.preview.unknownName"))).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"",(""+utils.readableFileSize(file.size,"",", ")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n\n <div class="uploadcare-dialog-section uploadcare-dialog-normal-text">\n ',(""+t("dialog.tabs.preview.regular.line1")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"<br/>\n ",(""+t("dialog.tabs.preview.regular.line2")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n\n <div\n class="uploadcare-dialog-button-success"\n role="uploadcare-dialog-preview-done">',(""+t("dialog.tabs.preview.done")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'</div>\n <div\n class="uploadcare-dialog-button"\n role="uploadcare-dialog-preview-back">',(""+t("dialog.tabs.preview.change")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"</div>\n</div>\n")}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/tab-preview-unknown"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-dialog-padding">\n\n <div class="uploadcare-dialog-title">',(""+t("dialog.tabs.preview.unknown.title")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'</div>\n\n <div class="uploadcare-dialog-label">\n ',(""+(file.name||"")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"",(""+utils.readableFileSize(file.size,"",", ")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div>\n\n <div\n class="uploadcare-dialog-button-success"\n role="uploadcare-dialog-preview-done">',(""+t("dialog.tabs.preview.unknown.done")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"</div>\n</div>\n")}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/tab-url"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-dialog-title">',(""+t("dialog.tabs.url.title")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'</div>\n<div class="uploadcare-dialog-section uploadcare-dialog-normal-text">\n <div>',(""+t("dialog.tabs.url.line1")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"</div>\n <div>",(""+t("dialog.tabs.url.line2")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'</div>\n</div>\n<form role="uploadcare-dialog-url-form">\n <input type="text" class="uploadcare-dialog-input" role="uploadcare-dialog-url-input" placeholder="',(""+t("dialog.tabs.url.input")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'">\n <button class="uploadcare-dialog-button" type="submit" role="uploadcare-dialog-url-submit">',(""+t("dialog.tabs.url.button")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"</button>\n</form>\n")}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/tab-welcome"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-dialog-message-center">\n <div class="uploadcare-dialog-big-title">Hello!</div>\n <div class="uploadcare-dialog-large-text">\n <div>Your <a class="uploadcare-link" href="https://uploadcare.com/dashboard/">public key</a> is not set.</div>\n <div>Add this to the &lt;head&gt; tag to start uploading files:</div>\n <div class="uploadcare-pre">&lt;script&gt;\nUPLOADCARE_PUBLIC_KEY = \'your_public_key\';\n&lt;/script&gt;</div>\n </div>\n</div>\n')}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/widget-button"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div\n class="uploadcare-widget-button uploadcare-widget-button-',name,'"\n>',(""+caption).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"</div>\n")}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/widget-file-name"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div\n role="uploadcare-widget-file-name"\n class="uploadcare-widget-file-name uploadcare-link">',(""+utils.fitText(name,20)).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"</div>,\n",(""+utils.readableFileSize(size)).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),"\n")}return __p.join("")}}).call(this);(function(){this.JST||(this.JST={});this.JST["uploadcare/templates/widget"]=function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments)};with(obj||{}){__p.push('<div class="uploadcare-widget">\n <div class="uploadcare-widget-dragndrop-area" role="uploadcare-drop-area">\n ',(""+t("draghere")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),'\n </div><div role="uploadcare-widget-status" class="uploadcare-widget-status">\n </div><div role="uploadcare-widget-text" class="uploadcare-widget-text">\n</div></div>\n')}return __p.join("")}}).call(this);(function(){var $,locale,namespace,utils;namespace=uploadcare.namespace,locale=uploadcare.locale,utils=uploadcare.utils,$=uploadcare.jQuery;namespace("uploadcare.templates",function(ns){return ns.tpl=function(key,ctx){var fn;if(ctx==null){ctx={}}fn=JST["uploadcare/templates/"+key];if(fn!=null){return fn($.extend({t:locale.t,utils:utils},ctx))}else{return""}}})}).call(this);(function(){var $,tpl;$=uploadcare.jQuery;tpl=uploadcare.templates.tpl;uploadcare.settings.waitForSettings(null,function(){var css,style;css=tpl("styles");style=document.createElement("style");style.setAttribute("type","text/css");if(style.styleSheet!=null){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}return $("head").prepend(style)})}).call(this);(function($){$.Jcrop=function(obj,opt){var options=$.extend({},$.Jcrop.defaults),docOffset,lastcurs;function px(n){return Math.round(n)+"px"}function cssClass(cl){return options.baseClass+"-"+cl}function supportsColorFade(){return $.fx.step.hasOwnProperty("backgroundColor")}function getPos(obj){var pos=$(obj).offset();return[pos.left,pos.top]}function mouseAbs(e){return[(e.pageX-docOffset[0]),(e.pageY-docOffset[1])]}function setOptions(opt){if(typeof(opt)!=="object"){opt={}}options=$.extend(options,opt);$.each(["onChange","onSelect","onRelease","onDblClick"],function(i,e){if(typeof(options[e])!=="function"){options[e]=function(){}}})}function startDragMode(mode,pos){docOffset=getPos($img);Tracker.setCursor(mode==="move"?mode:mode+"-resize");if(mode==="move"){return Tracker.activateHandlers(createMover(pos),doneSelect)}var fc=Coords.getFixed();var opp=oppLockCorner(mode);var opc=Coords.getCorner(oppLockCorner(opp));Coords.setPressed(Coords.getCorner(opp));Coords.setCurrent(opc);Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect)}function dragmodeHandler(mode,f){return function(pos){if(!options.aspectRatio){switch(mode){case"e":pos[1]=f.y2;break;case"w":pos[1]=f.y2;break;case"n":pos[0]=f.x2;break;case"s":pos[0]=f.x2;break}}else{switch(mode){case"e":pos[1]=f.y+1;break;case"w":pos[1]=f.y+1;break;case"n":pos[0]=f.x+1;break;case"s":pos[0]=f.x+1;break}}Coords.setCurrent(pos);Selection.update()}}function createMover(pos){var lloc=pos;KeyManager.watchKeys();return function(pos){Coords.moveOffset([pos[0]-lloc[0],pos[1]-lloc[1]]);lloc=pos;Selection.update()}}function oppLockCorner(ord){switch(ord){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function createDragger(ord){return function(e){if(options.disabled){return false}if((ord==="move")&&!options.allowMove){return false}docOffset=getPos($img);btndown=true;startDragMode(ord,mouseAbs(e));e.stopPropagation();e.preventDefault();return false}}function presize($obj,w,h){var nw=$obj.width(),nh=$obj.height();if((nw>w)&&w>0){nw=w;nh=(w/$obj.width())*$obj.height()}if((nh>h)&&h>0){nh=h;nw=(h/$obj.height())*$obj.width()}xscale=$obj.width()/nw;yscale=$obj.height()/nh;$obj.width(nw).height(nh)}function unscale(c){return{x:c.x*xscale,y:c.y*yscale,x2:c.x2*xscale,y2:c.y2*yscale,w:c.w*xscale,h:c.h*yscale}}function doneSelect(pos){var c=Coords.getFixed();if((c.w>options.minSelect[0])&&(c.h>options.minSelect[1])){Selection.enableHandles();Selection.done()}else{Selection.release()}}function selectDrag(pos){Coords.setCurrent(pos);Selection.update()}function newTracker(){var trk=$("<div></div>").addClass(cssClass("tracker"));trk.css({opacity:0,backgroundColor:"white"});return trk}if(typeof(obj)!=="object"){obj=$(obj)[0]}if(typeof(opt)!=="object"){opt={}}setOptions(opt);var img_css={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0};var $origimg=$(obj),img_mode=true;if(obj.tagName=="IMG"){if($origimg[0].width!=0&&$origimg[0].height!=0){$origimg.width($origimg[0].width);$origimg.height($origimg[0].height)}else{var tempImage=new Image();tempImage.src=$origimg[0].src;$origimg.width(tempImage.width);$origimg.height(tempImage.height)}var $img=$origimg.clone().removeAttr("id").css(img_css).show();$img.width($origimg.width());$img.height($origimg.height());$origimg.after($img).hide()}else{$img=$origimg.css(img_css).show();img_mode=false;if(options.shade===null){options.shade=true}}presize($img,options.boxWidth,options.boxHeight);var boundx=$img.width(),boundy=$img.height(),$div=$("<div />").width(boundx).height(boundy).addClass(cssClass("holder")).css({position:"relative",backgroundColor:options.bgColor}).insertAfter($origimg).append($img);if(options.addClass){$div.addClass(options.addClass)}var $img2=$("<div />"),$img_holder=$("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),$hdl_holder=$("<div />").width("100%").height("100%").css("zIndex",320),$sel=$("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var c=Coords.getFixed();options.onDblClick.call(api,c)}).insertBefore($img).append($img_holder,$hdl_holder);if(img_mode){$img2=$("<img />").attr("src",$img.attr("src")).css(img_css).width(boundx).height(boundy),$img_holder.append($img2)}var bound=options.boundary;var $trk=newTracker().width(boundx+(bound*2)).height(boundy+(bound*2)).css({position:"absolute",top:px(-bound),left:px(-bound),zIndex:290});var bgcolor=options.bgColor,bgopacity=options.bgOpacity,xlimit,ylimit,xmin,ymin,xscale,yscale,enabled=true,btndown,animating,shift_down;docOffset=getPos($img);var Touch=(function(){function hasTouchSupport(){var support={},events=["touchstart","touchmove","touchend"],el=document.createElement("div"),i;try{for(i=0;i<events.length;i++){var eventName=events[i];eventName="on"+eventName;var isSupported=(eventName in el);if(!isSupported){el.setAttribute(eventName,"return;");isSupported=typeof el[eventName]=="function"}support[events[i]]=isSupported}return support.touchstart&&support.touchend&&support.touchmove}catch(err){return false}}function detectSupport(){if((options.touchSupport===true)||(options.touchSupport===false)){return options.touchSupport}else{return hasTouchSupport()}}return{createDragger:function(ord){return function(e){e.pageX=e.originalEvent.changedTouches[0].pageX;e.pageY=e.originalEvent.changedTouches[0].pageY;if(options.disabled){return false}if((ord==="move")&&!options.allowMove){return false}btndown=true;startDragMode(ord,mouseAbs(e));e.stopPropagation();e.preventDefault();return false}},isSupported:hasTouchSupport,support:detectSupport()}}());var Coords=(function(){var x1=0,y1=0,x2=0,y2=0,ox,oy;function setPressed(pos){pos=rebound(pos);x2=x1=pos[0];y2=y1=pos[1]}function setCurrent(pos){pos=rebound(pos);ox=pos[0]-x2;oy=pos[1]-y2;x2=pos[0];y2=pos[1]}function getOffset(){return[ox,oy]}function moveOffset(offset){var ox=offset[0],oy=offset[1];if(0>x1+ox){ox-=ox+x1}if(0>y1+oy){oy-=oy+y1}if(boundy<y2+oy){oy+=boundy-(y2+oy)}if(boundx<x2+ox){ox+=boundx-(x2+ox)}x1+=ox;x2+=ox;y1+=oy;y2+=oy}function getCorner(ord){var c=getFixed();switch(ord){case"ne":return[c.x2,c.y];case"nw":return[c.x,c.y];case"se":return[c.x2,c.y2];case"sw":return[c.x,c.y2]}}function getFixed(){if(!options.aspectRatio){return getRect()}var aspect=options.aspectRatio,min_x=options.minSize[0]/xscale,max_x=options.maxSize[0]/xscale,max_y=options.maxSize[1]/yscale,rw=x2-x1,rh=y2-y1,rwa=Math.abs(rw),rha=Math.abs(rh),real_ratio=rwa/rha,xx,yy,w,h;if(max_x===0){max_x=boundx*10}if(max_y===0){max_y=boundy*10}if(real_ratio<aspect){yy=y2;w=rha*aspect;xx=rw<0?x1-w:w+x1;if(xx<0){xx=0;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1}else{if(xx>boundx){xx=boundx;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1}}}else{xx=x2;h=rwa/aspect;yy=rh<0?y1-h:y1+h;if(yy<0){yy=0;w=Math.abs((yy-y1)*aspect);xx=rw<0?x1-w:w+x1}else{if(yy>boundy){yy=boundy;w=Math.abs(yy-y1)*aspect;xx=rw<0?x1-w:w+x1}}}if(xx>x1){if(xx-x1<min_x){xx=x1+min_x}else{if(xx-x1>max_x){xx=x1+max_x}}if(yy>y1){yy=y1+(xx-x1)/aspect}else{yy=y1-(xx-x1)/aspect}}else{if(xx<x1){if(x1-xx<min_x){xx=x1-min_x}else{if(x1-xx>max_x){xx=x1-max_x}}if(yy>y1){yy=y1+(x1-xx)/aspect}else{yy=y1-(x1-xx)/aspect}}}if(xx<0){x1-=xx;xx=0}else{if(xx>boundx){x1-=xx-boundx;xx=boundx}}if(yy<0){y1-=yy;yy=0}else{if(yy>boundy){y1-=yy-boundy;yy=boundy}}return makeObj(flipCoords(x1,y1,xx,yy))}function rebound(p){if(p[0]<0){p[0]=0}if(p[1]<0){p[1]=0}if(p[0]>boundx){p[0]=boundx}if(p[1]>boundy){p[1]=boundy}return[p[0],p[1]]}function flipCoords(x1,y1,x2,y2){var xa=x1,xb=x2,ya=y1,yb=y2;if(x2<x1){xa=x2;xb=x1}if(y2<y1){ya=y2;yb=y1}return[xa,ya,xb,yb]}function getRect(){var xsize=x2-x1,ysize=y2-y1,delta;if(xlimit&&(Math.abs(xsize)>xlimit)){x2=(xsize>0)?(x1+xlimit):(x1-xlimit)}if(ylimit&&(Math.abs(ysize)>ylimit)){y2=(ysize>0)?(y1+ylimit):(y1-ylimit)}if(ymin/yscale&&(Math.abs(ysize)<ymin/yscale)){y2=(ysize>0)?(y1+ymin/yscale):(y1-ymin/yscale)}if(xmin/xscale&&(Math.abs(xsize)<xmin/xscale)){x2=(xsize>0)?(x1+xmin/xscale):(x1-xmin/xscale)}if(x1<0){x2-=x1;x1-=x1}if(y1<0){y2-=y1;y1-=y1}if(x2<0){x1-=x2;x2-=x2}if(y2<0){y1-=y2;y2-=y2}if(x2>boundx){delta=x2-boundx;x1-=delta;x2-=delta}if(y2>boundy){delta=y2-boundy;y1-=delta;y2-=delta}if(x1>boundx){delta=x1-boundy;y2-=delta;y1-=delta}if(y1>boundy){delta=y1-boundy;y2-=delta;y1-=delta}return makeObj(flipCoords(x1,y1,x2,y2))}function makeObj(a){return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]}}return{flipCoords:flipCoords,setPressed:setPressed,setCurrent:setCurrent,getOffset:getOffset,moveOffset:moveOffset,getCorner:getCorner,getFixed:getFixed}}());var Shade=(function(){var enabled=false,holder=$("<div />").css({position:"absolute",zIndex:240,opacity:0}),shades={top:createShade(),left:createShade().height(boundy),right:createShade().height(boundy),bottom:createShade()};function resizeShades(w,h){shades.left.css({height:px(h)});shades.right.css({height:px(h)})}function updateAuto(){return updateShade(Coords.getFixed())}function updateShade(c){shades.top.css({left:px(c.x),width:px(c.w),height:px(c.y)});shades.bottom.css({top:px(c.y2),left:px(c.x),width:px(c.w),height:px(boundy-c.y2)});shades.right.css({left:px(c.x2),width:px(boundx-c.x2)});shades.left.css({width:px(c.x)})}function createShade(){return $("<div />").css({position:"absolute",backgroundColor:options.shadeColor||options.bgColor}).appendTo(holder)}function enableShade(){if(!enabled){enabled=true;holder.insertBefore($img);updateAuto();Selection.setBgOpacity(1,0,1);$img2.hide();setBgColor(options.shadeColor||options.bgColor,1);if(Selection.isAwake()){setOpacity(options.bgOpacity,1)}else{setOpacity(1,1)}}}function setBgColor(color,now){colorChangeMacro(getShades(),color,now)}function disableShade(){if(enabled){holder.remove();$img2.show();enabled=false;if(Selection.isAwake()){Selection.setBgOpacity(options.bgOpacity,1,1)}else{Selection.setBgOpacity(1,1,1);Selection.disableHandles()}colorChangeMacro($div,0,1)}}function setOpacity(opacity,now){if(enabled){if(options.bgFade&&!now){holder.animate({opacity:1-opacity},{queue:false,duration:options.fadeTime})}else{holder.css({opacity:1-opacity})}}}function refreshAll(){options.shade?enableShade():disableShade();if(Selection.isAwake()){setOpacity(options.bgOpacity)}}function getShades(){return holder.children()}return{update:updateAuto,updateRaw:updateShade,getShades:getShades,setBgColor:setBgColor,enable:enableShade,disable:disableShade,resize:resizeShades,refresh:refreshAll,opacity:setOpacity}}());var Selection=(function(){var awake,hdep=370,borders={},handle={},dragbar={},seehandles=false;function insertBorder(type){var jq=$("<div />").css({position:"absolute",opacity:options.borderOpacity}).addClass(cssClass(type));$img_holder.append(jq);return jq}function dragDiv(ord,zi){var jq=$("<div />").mousedown(createDragger(ord)).css({cursor:ord+"-resize",position:"absolute",zIndex:zi}).addClass("ord-"+ord);if(Touch.support){jq.bind("touchstart.jcrop",Touch.createDragger(ord))}$hdl_holder.append(jq);return jq}function insertHandle(ord){var hs=options.handleSize;return dragDiv(ord,hdep++).css({opacity:options.handleOpacity}).width(hs).height(hs).addClass(cssClass("handle"))}function insertDragbar(ord){return dragDiv(ord,hdep++).addClass("jcrop-dragbar")}function createDragbars(li){var i;for(i=0;i<li.length;i++){dragbar[li[i]]=insertDragbar(li[i])}}function createBorders(li){var cl,i;for(i=0;i<li.length;i++){switch(li[i]){case"n":cl="hline";break;case"s":cl="hline bottom";break;case"e":cl="vline right";break;case"w":cl="vline";break}borders[li[i]]=insertBorder(cl)}}function createHandles(li){var i;for(i=0;i<li.length;i++){handle[li[i]]=insertHandle(li[i])}}function moveto(x,y){if(!options.shade){$img2.css({top:px(-y),left:px(-x)})}$sel.css({top:px(y),left:px(x)})}function resize(w,h){$sel.width(Math.round(w)).height(Math.round(h))}function refresh(){var c=Coords.getFixed();Coords.setPressed([c.x,c.y]);Coords.setCurrent([c.x2,c.y2]);updateVisible()}function updateVisible(select){if(awake){return update(select)}}function update(select){var c=Coords.getFixed();resize(c.w,c.h);moveto(c.x,c.y);if(options.shade){Shade.updateRaw(c)}awake||show();if(select){options.onSelect.call(api,unscale(c))}else{options.onChange.call(api,unscale(c))}}function setBgOpacity(opacity,force,now){if(!awake&&!force){return}if(options.bgFade&&!now){$img.animate({opacity:opacity},{queue:false,duration:options.fadeTime})}else{$img.css("opacity",opacity)}}function show(){$sel.show();if(options.shade){Shade.opacity(bgopacity)}else{setBgOpacity(bgopacity,true)}awake=true}function release(){disableHandles();$sel.hide();if(options.shade){Shade.opacity(1)}else{setBgOpacity(1)}awake=false;options.onRelease.call(api)}function showHandles(){if(seehandles){$hdl_holder.show()}}function enableHandles(){seehandles=true;if(options.allowResize){$hdl_holder.show();return true}}function disableHandles(){seehandles=false;$hdl_holder.hide()}function animMode(v){if(v){animating=true;disableHandles()}else{animating=false;enableHandles()}}function done(){animMode(false);refresh()}if(options.dragEdges&&$.isArray(options.createDragbars)){createDragbars(options.createDragbars)}if($.isArray(options.createHandles)){createHandles(options.createHandles)}if(options.drawBorders&&$.isArray(options.createBorders)){createBorders(options.createBorders)}$(document).bind("touchstart.jcrop-ios",function(e){if($(e.currentTarget).hasClass("jcrop-tracker")){e.stopPropagation()}});var $track=newTracker().mousedown(createDragger("move")).css({cursor:"move",position:"absolute",zIndex:360});if(Touch.support){$track.bind("touchstart.jcrop",Touch.createDragger("move"))}$img_holder.append($track);disableHandles();return{updateVisible:updateVisible,update:update,release:release,refresh:refresh,isAwake:function(){return awake},setCursor:function(cursor){$track.css("cursor",cursor)},enableHandles:enableHandles,enableOnly:function(){seehandles=true},showHandles:showHandles,disableHandles:disableHandles,animMode:animMode,setBgOpacity:setBgOpacity,done:done}}());var Tracker=(function(){var onMove=function(){},onDone=function(){},trackDoc=options.trackDocument;function toFront(){$trk.css({zIndex:450});if(Touch.support){$(document).bind("touchmove.jcrop",trackTouchMove).bind("touchend.jcrop",trackTouchEnd)}if(trackDoc){$(document).bind("mousemove.jcrop",trackMove).bind("mouseup.jcrop",trackUp)}}function toBack(){$trk.css({zIndex:290});$(document).unbind(".jcrop")}function trackMove(e){onMove(mouseAbs(e));return false}function trackUp(e){e.preventDefault();e.stopPropagation();if(btndown){btndown=false;onDone(mouseAbs(e));if(Selection.isAwake()){options.onSelect.call(api,unscale(Coords.getFixed()))}toBack();onMove=function(){};onDone=function(){}}return false}function activateHandlers(move,done){btndown=true;onMove=move;onDone=done;toFront();return false}function trackTouchMove(e){e.pageX=e.originalEvent.changedTouches[0].pageX;e.pageY=e.originalEvent.changedTouches[0].pageY;return trackMove(e)}function trackTouchEnd(e){e.pageX=e.originalEvent.changedTouches[0].pageX;e.pageY=e.originalEvent.changedTouches[0].pageY;return trackUp(e)}function setCursor(t){$trk.css("cursor",t)}if(!trackDoc){$trk.mousemove(trackMove).mouseup(trackUp).mouseout(trackUp)}$img.before($trk);return{activateHandlers:activateHandlers,setCursor:setCursor}}());var KeyManager=(function(){var $keymgr=$('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),$keywrap=$("<div />").css({position:"absolute",overflow:"hidden"}).append($keymgr);function watchKeys(){if(options.keySupport){$keymgr.show();$keymgr.focus()}}function onBlur(e){$keymgr.hide()}function doNudge(e,x,y){if(options.allowMove){Coords.moveOffset([x,y]);Selection.updateVisible(true)}e.preventDefault();e.stopPropagation()}function parseKey(e){if(e.ctrlKey||e.metaKey){return true}shift_down=e.shiftKey?true:false;var nudge=shift_down?10:1;switch(e.keyCode){case 37:doNudge(e,-nudge,0);break;case 39:doNudge(e,nudge,0);break;case 38:doNudge(e,0,-nudge);break;case 40:doNudge(e,0,nudge);break;case 9:return true}return false}if(options.keySupport){$keymgr.keydown(parseKey).blur(onBlur);$keymgr.css({position:"absolute",left:"-20px"});$keywrap.append($keymgr).insertBefore($img)}return{watchKeys:watchKeys}}());function setClass(cname){$div.removeClass().addClass(cssClass("holder")).addClass(cname)}function setSelect(rect){setSelectRaw([rect[0]/xscale,rect[1]/yscale,rect[2]/xscale,rect[3]/yscale]);options.onSelect.call(api,unscale(Coords.getFixed()));Selection.enableHandles()}function setSelectRaw(l){Coords.setPressed([l[0],l[1]]);Coords.setCurrent([l[2],l[3]]);Selection.update()}function tellSelect(){return unscale(Coords.getFixed())}function tellScaled(){return Coords.getFixed()}function setOptionsNew(opt){setOptions(opt);interfaceUpdate()}function disableCrop(){options.disabled=true;Selection.disableHandles();Selection.setCursor("default");Tracker.setCursor("default")}function enableCrop(){options.disabled=false;interfaceUpdate()}function cancelCrop(){Selection.done();Tracker.activateHandlers(null,null)}function destroy(){$div.remove();$origimg.show();$origimg.css("visibility","visible");$(obj).removeData("Jcrop")}function colorChangeMacro($obj,color,now){var mycolor=color||options.bgColor;if(options.bgFade&&supportsColorFade()&&options.fadeTime&&!now){$obj.animate({backgroundColor:mycolor},{queue:false,duration:options.fadeTime})}else{$obj.css("backgroundColor",mycolor)}}function interfaceUpdate(alt){if(options.allowResize){if(alt){Selection.enableOnly()}else{Selection.enableHandles()}}else{Selection.disableHandles()}Selection.setCursor(options.allowMove?"move":"default");if(options.hasOwnProperty("trueSize")){xscale=options.trueSize[0]/boundx;yscale=options.trueSize[1]/boundy}if(options.hasOwnProperty("setSelect")){setSelect(options.setSelect);Selection.done();delete (options.setSelect)}Shade.refresh();if(options.bgColor!=bgcolor){colorChangeMacro(options.shade?Shade.getShades():$div,options.shade?(options.shadeColor||options.bgColor):options.bgColor);bgcolor=options.bgColor}if(bgopacity!=options.bgOpacity){bgopacity=options.bgOpacity;if(options.shade){Shade.refresh()}else{Selection.setBgOpacity(bgopacity)}}xlimit=options.maxSize[0]||0;ylimit=options.maxSize[1]||0;xmin=options.minSize[0]||0;ymin=options.minSize[1]||0;if(options.hasOwnProperty("outerImage")){$img.attr("src",options.outerImage);delete (options.outerImage)}Selection.refresh()}$hdl_holder.hide();interfaceUpdate(true);var api={setSelect:setSelect,setOptions:setOptionsNew,tellSelect:tellSelect,tellScaled:tellScaled,setClass:setClass,disable:disableCrop,enable:enableCrop,cancel:cancelCrop,release:Selection.release,destroy:destroy,focus:KeyManager.watchKeys,getBounds:function(){return[boundx*xscale,boundy*yscale]},getWidgetSize:function(){return[boundx,boundy]},getScaleFactor:function(){return[xscale,yscale]},getOptions:function(){return options},ui:{holder:$div,selection:$sel}};$origimg.data("Jcrop",api);return api};$.fn.Jcrop=function(options,callback){var api;this.each(function(){if($(this).data("Jcrop")){if(options==="api"){return $(this).data("Jcrop")}else{$(this).data("Jcrop").setOptions(options)}}else{if(this.tagName=="IMG"){$.Jcrop.Loader(this,function(){$(this).css({display:"block",visibility:"hidden"});api=$.Jcrop(this,options);if($.isFunction(callback)){callback.call(api)}})}else{$(this).css({display:"block",visibility:"hidden"});api=$.Jcrop(this,options);if($.isFunction(callback)){callback.call(api)}}}});return this};$.Jcrop.Loader=function(imgobj,success,error){var $img=$(imgobj),img=$img[0];function completeCheck(){if(img.complete){$img.unbind(".jcloader");if($.isFunction(success)){success.call(img)}}else{window.setTimeout(completeCheck,50)}}$img.bind("load.jcloader",completeCheck).bind("error.jcloader",function(e){$img.unbind(".jcloader");if($.isFunction(error)){error.call(img)}});if(img.complete&&$.isFunction(success)){$img.unbind(".jcloader");success.call(img)}};$.Jcrop.defaults={allowMove:true,allowResize:true,trackDocument:true,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:0.6,bgFade:false,borderOpacity:0.4,handleOpacity:0.5,handleSize:7,aspectRatio:0,keySupport:true,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:true,dragEdges:true,fixedSupport:true,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(uploadcare.jQuery));(function(){var $,namespace,tpl,utils,_ref;namespace=uploadcare.namespace,$=uploadcare.jQuery,(_ref=uploadcare.templates,tpl=_ref.tpl),utils=uploadcare.utils;namespace("uploadcare.crop",function(ns){return ns.CropWidget=(function(){var cropModifierRegExp;function CropWidget(element,originalSize,crop){this.element=element;this.originalSize=originalSize;if(crop==null){crop={}}this.__api=$.Jcrop(this.element[0],{handleSize:10,trueSize:this.originalSize,addClass:"uploadcare-crop-widget",createDragbars:[],bgColor:"transparent",bgOpacity:0.8});this.setCrop(crop);this.setSelection()}CropWidget.prototype.setCrop=function(crop){this.crop=crop;return this.__api.setOptions({aspectRatio:crop.preferedSize?crop.preferedSize[0]/crop.preferedSize[1]:0,minSize:crop.notLess?utils.fitSize(crop.preferedSize,this.originalSize):[0,0]})};CropWidget.prototype.setSelection=function(selection){var center,left,size,top;if(selection){center=selection.center;size=[selection.width,selection.height]}else{center=true;size=this.originalSize}if(this.crop.preferedSize){size=utils.fitSize(this.crop.preferedSize,size,true)}if(center){left=(this.originalSize[0]-size[0])/2;top=(this.originalSize[1]-size[1])/2}else{left=selection.left||0;top=selection.top||0}return this.__api.setSelect([left,top,size[0]+left,size[1]+top])};cropModifierRegExp=/-\/crop\/([0-9]+)x([0-9]+)(\/(center|([0-9]+),([0-9]+)))?\//i;CropWidget.prototype.__parseModifiers=function(modifiers){var raw;if(raw=modifiers!=null?modifiers.match(cropModifierRegExp):void 0){return{width:parseInt(raw[1],10),height:parseInt(raw[2],10),center:raw[4]==="center",left:parseInt(raw[5],10)||void 0,top:parseInt(raw[6],10)||void 0}}};CropWidget.prototype.setSelectionFromModifiers=function(modifiers){return this.setSelection(this.__parseModifiers(modifiers))};CropWidget.prototype.getSelection=function(){var coords,left,top;coords=this.__api.tellSelect();left=Math.round(Math.max(0,coords.x));top=Math.round(Math.max(0,coords.y));return{left:left,top:top,width:Math.round(Math.min(this.originalSize[0],coords.x2))-left,height:Math.round(Math.min(this.originalSize[1],coords.y2))-top}};CropWidget.prototype.getSelectionWithModifiers=function(){var coords,downscale,h,modifiers,prefered,upscale,w,wholeImage;coords=this.getSelection();w=coords.width,h=coords.height;prefered=this.crop.preferedSize;modifiers="";wholeImage=w===this.originalSize[0]&&h===this.originalSize[1];if(!wholeImage){modifiers+="-/crop/"+w+"x"+h+"/"+coords.left+","+coords.top+"/"}downscale=this.crop.downscale&&(w>prefered[0]||h>prefered[1]);upscale=this.crop.upscale&&(w<prefered[0]||h<prefered[1]);if(downscale||upscale){coords.sw=prefered[0],coords.sh=prefered[1];modifiers+="-/resize/"+(prefered.join("x"))+"/"}else{if(!wholeImage){modifiers+="-/preview/"}}return{crop:coords,modifiers:modifiers}};return CropWidget})()})}).call(this);(function(){var $,namespace,s,utils,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}};namespace=uploadcare.namespace,s=uploadcare.settings,$=uploadcare.jQuery,utils=uploadcare.utils;namespace("uploadcare.files",function(ns){return ns.BaseFile=(function(){function BaseFile(settings){this.settings=settings;this.__resolveApi=__bind(this.__resolveApi,this);this.__rejectApi=__bind(this.__rejectApi,this);this.__extendApi=__bind(this.__extendApi,this);this.__runValidators=__bind(this.__runValidators,this);this.__cancel=__bind(this.__cancel,this);this.__fileInfo=__bind(this.__fileInfo,this);this.__updateInfo=__bind(this.__updateInfo,this);this.__handleFileData=__bind(this.__handleFileData,this);this.__completeUpload=__bind(this.__completeUpload,this);this.fileId=null;this.fileName=null;this.fileSize=null;this.isStored=null;this.cdnUrlModifiers=null;this.isImage=null;this.imageInfo=null;this.onInfoReady=$.Callbacks("once memory");this.__setupValidation();this.__initApi()}BaseFile.prototype.__startUpload=function(){throw new Error("not implemented")};BaseFile.prototype.__completeUpload=function(){var check,timeout,_this=this;timeout=100;return(check=function(){if(_this.apiPromise.state()==="pending"){return _this.__updateInfo().done(function(){setTimeout(check,timeout);return timeout+=50})}})()};BaseFile.prototype.__handleFileData=function(data){this.fileName=data.original_filename;this.fileSize=data.size;this.isImage=data.is_image;this.imageInfo=data.image_info;this.isStored=data.is_stored;if(!this.onInfoReady.fired()){this.onInfoReady.fire(this.__fileInfo())}if(data.is_ready){return this.__resolveApi()}};BaseFile.prototype.__updateInfo=function(){var _this=this;return utils.jsonp(""+this.settings.urlBase+"/info/",{file_id:this.fileId,pub_key:this.settings.publicKey}).fail(function(){return _this.__rejectApi("info")}).done(this.__handleFileData)};BaseFile.prototype.__progressInfo=function(){var _ref;return{state:this.__progressState,uploadProgress:this.__progress,progress:(_ref=this.__progressState)==="ready"||_ref==="error"?1:this.__progress*0.9,incompleteFileInfo:this.__fileInfo()}};BaseFile.prototype.__fileInfo=function(){return{uuid:this.fileId,name:this.fileName,size:this.fileSize,isStored:this.isStored,isImage:this.isImage,originalImageInfo:this.imageInfo,originalUrl:this.fileId?""+this.settings.cdnBase+"/"+this.fileId+"/":null,cdnUrl:this.fileId?""+this.settings.cdnBase+"/"+this.fileId+"/"+(this.cdnUrlModifiers||""):null,cdnUrlModifiers:this.cdnUrlModifiers}};BaseFile.prototype.__cancel=function(){this.__rejectApi("user");return this.__uploadDf.reject()};BaseFile.prototype.__setupValidation=function(){this.validators=this.settings.validators||this.settings.__validators||[];if(this.settings.imagesOnly){this.validators.push(function(info){if(info.isImage===false){throw new Error("image")}})}return this.onInfoReady.add(this.__runValidators)};BaseFile.prototype.__runValidators=function(info){var err,v,_i,_len,_ref,_results;try{_ref=this.validators;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){v=_ref[_i];_results.push(v(info))}return _results}catch(_error){err=_error;return this.__rejectApi(err.message)}};BaseFile.prototype.__extendApi=function(api){var __then,_this=this;api.cancel=this.__cancel;__then=api.then;api.pipe=api.then=function(){return _this.__extendApi(__then.apply(api,arguments))};return api};BaseFile.prototype.__notifyApi=function(){return this.apiDeferred.notify(this.__progressInfo())};BaseFile.prototype.__rejectApi=function(err){this.__progressState="error";this.__notifyApi();return this.apiDeferred.reject(err,this.__fileInfo())};BaseFile.prototype.__resolveApi=function(){this.__progressState="ready";this.__notifyApi();return this.apiDeferred.resolve(this.__fileInfo())};BaseFile.prototype.__initApi=function(){var _this=this;this.apiDeferred=$.Deferred();this.apiPromise=this.__extendApi(this.apiDeferred.promise());this.__progressState="uploading";this.__progress=0;this.__notifyApi();return this.__uploadDf=$.Deferred().done(this.__completeUpload).done(function(){_this.__progressState="uploaded";_this.__progress=1;return _this.__notifyApi()}).progress(function(progress){if(progress>_this.__progress){_this.__progress=progress;return _this.__notifyApi()}}).fail(function(){return _this.__rejectApi("upload")})};BaseFile.prototype.promise=function(){if(!this.__uploadStarted){this.__uploadStarted=true;this.__runValidators(this.__fileInfo());if(this.apiPromise.state()==="pending"){this.__startUpload()}}return this.apiPromise};return BaseFile})()});namespace("uploadcare.utils",function(utils){utils.isFile=function(obj){return obj&&obj.done&&obj.fail&&obj.cancel};return utils.valueToFile=function(value,settings){if(value&&!utils.isFile(value)){value=uploadcare.fileFrom("uploaded",value,settings)}return value}})}).call(this);(function(){var $,namespace,utils,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,$=uploadcare.jQuery,utils=uploadcare.utils;namespace("uploadcare.files",function(ns){return ns.ObjectFile=(function(_super){__extends(ObjectFile,_super);ObjectFile.prototype.MP_MIN_SIZE=25*1024*1024;ObjectFile.prototype.MP_PART_SIZE=5*1024*1024;ObjectFile.prototype.MP_MIN_LAST_PART_SIZE=1*1024*1024;ObjectFile.prototype.MP_CONCURRENCY=4;ObjectFile.prototype.MP_MAX_ATTEMPTS=3;function ObjectFile(settings,__file){this.__file=__file;ObjectFile.__super__.constructor.apply(this,arguments);this.fileSize=this.__file.size;this.fileName=this.__file.name||"original";this.fileType=this.__file.type||"application/octet-stream";this.__notifyApi()}ObjectFile.prototype.__startUpload=function(){if(this.fileSize>=this.MP_MIN_SIZE&&utils.abilities.blob){return this.multipartUpload()}else{return this.directUpload()}};ObjectFile.prototype.__autoAbort=function(xhr){this.__uploadDf.always(xhr.abort);return xhr};ObjectFile.prototype.directUpload=function(){var formData,_this=this;if(this.fileSize>100*1024*1024){this.__rejectApi("size");return}formData=new FormData();formData.append("UPLOADCARE_PUB_KEY",this.settings.publicKey);if(this.settings.autostore){formData.append("UPLOADCARE_STORE","1")}formData.append("file",this.__file,this.fileName);formData.append("file_name",this.fileName);return this.__autoAbort($.ajax({xhr:function(){var xhr;xhr=$.ajaxSettings.xhr();if(xhr.upload){xhr.upload.addEventListener("progress",function(e){return _this.__uploadDf.notify(e.loaded/e.total)},false)}return xhr},crossDomain:true,type:"POST",url:""+this.settings.urlBase+"/base/?jsonerrors=1",xhrFields:{withCredentials:true},headers:{"X-PINGOTHER":"pingpong"},contentType:false,processData:false,data:formData,dataType:"json",error:this.__uploadDf.reject,success:function(data){if(data!=null?data.file:void 0){_this.fileId=data.file;return _this.__uploadDf.resolve()}else{if(_this.settings.autostore&&/autostore/i.test(data.error.content)){utils.commonWarning("autostore")}return _this.__uploadDf.reject()}}}))};ObjectFile.prototype.multipartUpload=function(){var _this=this;if(this.settings.imagesOnly){this.__rejectApi("image");return}return this.multipartStart().done(function(data){return _this.uploadParts(data.parts).done(function(){return _this.multipartComplete(data.uuid).done(function(data){_this.fileId=data.uuid;_this.__handleFileData(data);return _this.__completeUpload()}).fail(_this.__uploadDf.reject)}).fail(_this.__uploadDf.reject)}).fail(this.__uploadDf.reject)};ObjectFile.prototype.multipartStart=function(){var data;data={UPLOADCARE_PUB_KEY:this.settings.publicKey,filename:this.fileName,size:this.fileSize,content_type:this.fileType};if(this.settings.autostore){data.UPLOADCARE_STORE="1"}return this.__autoAbort(utils.jsonp(""+this.settings.urlBase+"/multipart/start/?jsonerrors=1","POST",data))};ObjectFile.prototype.uploadParts=function(parts){var df,i,inProgress,lastUpdate,progress,submit,submittedBytes,submittedParts,updateProgress,_i,_ref,_this=this;progress=[];lastUpdate=$.now();updateProgress=function(i,loaded){var total,_i,_len;progress[i]=loaded;if($.now()-lastUpdate<250){return}lastUpdate=$.now();total=0;for(_i=0,_len=progress.length;_i<_len;_i++){loaded=progress[_i];total+=loaded}return _this.__uploadDf.notify(total/_this.fileSize)};df=$.Deferred();inProgress=0;submittedParts=0;submittedBytes=0;submit=function(){var attempts,blob,bytesToSubmit,partNo,retry;if(submittedBytes>=_this.fileSize){return}bytesToSubmit=submittedBytes+_this.MP_PART_SIZE;if(_this.fileSize<bytesToSubmit+_this.MP_MIN_LAST_PART_SIZE){bytesToSubmit=_this.fileSize}blob=_this.__file.slice(submittedBytes,bytesToSubmit);submittedBytes=bytesToSubmit;partNo=submittedParts;inProgress+=1;submittedParts+=1;attempts=0;return(retry=function(){if(_this.__uploadDf.state()!=="pending"){return}attempts+=1;if(attempts>_this.MP_MAX_ATTEMPTS){df.reject();return}progress[partNo]=0;return _this.__autoAbort($.ajax({xhr:function(){var xhr;xhr=$.ajaxSettings.xhr();if(xhr.upload){xhr.upload.addEventListener("progress",function(e){return updateProgress(partNo,e.loaded)},false)}return xhr},url:parts[partNo],crossDomain:true,type:"PUT",processData:false,contentType:_this.fileType,data:blob,error:retry,success:function(){inProgress-=1;submit();if(!inProgress){return df.resolve()}}}))})()};for(i=_i=0,_ref=this.MP_CONCURRENCY;0<=_ref?_i<_ref:_i>_ref;i=0<=_ref?++_i:--_i){submit()}return df};ObjectFile.prototype.multipartComplete=function(uuid){var data;data={UPLOADCARE_PUB_KEY:this.settings.publicKey,uuid:uuid};return this.__autoAbort(utils.jsonp(""+this.settings.urlBase+"/multipart/complete/?jsonerrors=1","POST",data))};return ObjectFile})(ns.BaseFile)})}).call(this);(function(){var $,namespace,utils,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,$=uploadcare.jQuery,utils=uploadcare.utils;namespace("uploadcare.files",function(ns){return ns.InputFile=(function(_super){__extends(InputFile,_super);function InputFile(settings,__input){this.__input=__input;InputFile.__super__.constructor.apply(this,arguments);this.fileId=utils.uuid();this.fileName=$(this.__input).val().split("\\").pop();this.__notifyApi()}InputFile.prototype.__startUpload=function(){var formParam,iframeId,targetUrl,_this=this;targetUrl=""+this.settings.urlBase+"/iframe/";this.__uploadDf.always(function(){return _this.__cleanUp()});iframeId="uploadcare-iframe-"+this.fileId;this.__iframe=$("<iframe>").attr({id:iframeId,name:iframeId}).css("display","none").appendTo("body").on("load",this.__uploadDf.resolve).on("error",this.__uploadDf.reject);formParam=function(name,value){return $("<input/>",{type:"hidden",name:name,value:value})};$(this.__input).attr("name","file");return this.__iframeForm=$("<form>").attr({method:"POST",action:targetUrl,enctype:"multipart/form-data",target:iframeId}).append(formParam("UPLOADCARE_PUB_KEY",this.settings.publicKey)).append(formParam("UPLOADCARE_FILE_ID",this.fileId)).append(this.settings.autostore?formParam("UPLOADCARE_STORE",1):void 0).append(this.__input).css("display","none").appendTo("body").submit()};InputFile.prototype.__cleanUp=function(){var _ref,_ref1;if((_ref=this.__iframe)!=null){_ref.off("load error").remove()}if((_ref1=this.__iframeForm)!=null){_ref1.remove()}this.__iframe=null;return this.__iframeForm=null};return InputFile})(ns.BaseFile)})}).call(this);(function(){var $,namespace,pusher,utils,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,$=uploadcare.jQuery,utils=uploadcare.utils;pusher=uploadcare.utils.pusher;namespace("uploadcare.files",function(ns){var PollWatcher,PusherWatcher;ns.UrlFile=(function(_super){__extends(UrlFile,_super);UrlFile.prototype.allEvents="progress success error fail";function UrlFile(settings,__url){var err,filename;this.__url=__url;this.__listenWatcher=__bind(this.__listenWatcher,this);UrlFile.__super__.constructor.apply(this,arguments);filename=utils.splitUrlRegex.exec(this.__url)[3].split("/").pop();if(filename){try{this.fileName=decodeURIComponent(filename)}catch(_error){err=_error;this.fileName=filename}}this.__notifyApi()}UrlFile.prototype.setName=function(name){this.__realFileName=name;this.fileName=name;return this.__notifyApi()};UrlFile.prototype.setIsImage=function(isImage){this.isImage=isImage;return this.__notifyApi()};UrlFile.prototype.__startUpload=function(){var data,pollWatcher,pusherWatcher,_this=this;pusherWatcher=new PusherWatcher(this.settings.pusherKey);pollWatcher=new PollWatcher(""+this.settings.urlBase+"/status/");this.__listenWatcher($([pusherWatcher,pollWatcher]));$(pusherWatcher).one(this.allEvents,function(){return pollWatcher.stopWatching()});data={pub_key:this.settings.publicKey,source_url:this.__url,filename:this.__realFileName||""};if(this.settings.autostore){data.store=1}utils.jsonp(""+this.settings.urlBase+"/from_url/",data).fail(function(error){if(_this.settings.autostore&&/autostore/i.test(error)){utils.commonWarning("autostore")}return _this.__uploadDf.reject()}).done(function(data){pusherWatcher.watch(data.token);return pollWatcher.watch(data.token)});return this.__uploadDf.always(function(){$([pusherWatcher,pollWatcher]).off(_this.allEvents);pusherWatcher.stopWatching();return pollWatcher.stopWatching()})};UrlFile.prototype.__listenWatcher=function(watcher){var _this=this;return watcher.on("progress",function(e,data){_this.fileSize=data.total;return _this.__uploadDf.notify(data.done/data.total)}).on("success",function(e,data){$(e.target).trigger("progress",data);_this.fileId=data.uuid;_this.fileName=data.original_filename;return _this.__uploadDf.resolve()}).on("error fail",this.__uploadDf.reject)};return UrlFile})(ns.BaseFile);PusherWatcher=(function(){function PusherWatcher(pusherKey){this.pusher=pusher.getPusher(pusherKey,"url-upload")}PusherWatcher.prototype.watch=function(token){var channel,_this=this;channel=this.pusher.subscribe("task-status-"+token);return channel.bind_all(function(ev,data){return $(_this).trigger(ev,data)})};PusherWatcher.prototype.stopWatching=function(){return this.pusher.release()};return PusherWatcher})();return PollWatcher=(function(){function PollWatcher(poolUrl){this.poolUrl=poolUrl}PollWatcher.prototype.watch=function(token){var bind,_this=this;this.token=token;bind=function(){return _this.__updateStatus().done(function(){if(_this.interval){return _this.interval=setTimeout(bind,250)}})};return this.interval=setTimeout(bind,0)};PollWatcher.prototype.stopWatching=function(){if(this.interval){clearTimeout(this.interval)}return this.interval=null};PollWatcher.prototype.__updateStatus=function(){var _this=this;return utils.jsonp(this.poolUrl,{token:this.token}).fail(function(error){_this.stopWatching();return $(_this).trigger("error")}).done(function(data){return $(_this).trigger(data.status,data)})};return PollWatcher})()})}).call(this);(function(){var $,namespace,utils,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,$=uploadcare.jQuery,utils=uploadcare.utils;namespace("uploadcare.files",function(ns){ns.UploadedFile=(function(_super){__extends(UploadedFile,_super);function UploadedFile(settings,fileIdOrUrl){var cdnUrl;UploadedFile.__super__.constructor.apply(this,arguments);cdnUrl=utils.splitCdnUrl(fileIdOrUrl);if(cdnUrl){this.fileId=cdnUrl[1];if(cdnUrl[2]){this.cdnUrlModifiers=cdnUrl[2]}}else{this.__rejectApi("baddata")}}UploadedFile.prototype.__startUpload=function(){return this.__uploadDf.resolve()};return UploadedFile})(ns.BaseFile);return ns.ReadyFile=(function(_super){__extends(ReadyFile,_super);function ReadyFile(settings,data){ReadyFile.__super__.constructor.apply(this,arguments);if(!data){this.__rejectApi("deleted")}else{this.fileId=data.uuid;this.__handleFileData(data)}}ReadyFile.prototype.__startUpload=function(){return this.__uploadDf.resolve()};return ReadyFile})(ns.BaseFile)})}).call(this);(function(){var $,namespace,s,t,utils,_ref,__slice=[].slice,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,$=uploadcare.jQuery,utils=uploadcare.utils,(_ref=uploadcare.locale,t=_ref.t),s=uploadcare.settings;namespace("uploadcare.files",function(ns){ns.FileGroup=(function(){function FileGroup(files,settings){var _this=this;this.settings=s.build(settings);this.__fileColl=new utils.CollectionOfPromises(files);this.__allFilesDf=$.when.apply($,this.files());this.__fileInfosDf=(function(){var file;files=(function(){var _i,_len,_ref1,_results;_ref1=this.files();_results=[];for(_i=0,_len=_ref1.length;_i<_len;_i++){file=_ref1[_i];_results.push(file.then(null,function(err,info){return $.when(info)}))}return _results}).call(_this);return $.when.apply($,files)})();this.__createGroupDf=$.Deferred();this.__initApiDeferred()}FileGroup.prototype.files=function(){return this.__fileColl.get()};FileGroup.prototype.__save=function(){var _this=this;if(!this.__saved){this.__saved=true;return this.__allFilesDf.done(function(){return _this.__createGroup().done(function(groupInfo){_this.__uuid=groupInfo.id;return _this.__buildInfo(function(info){if(_this.settings.imagesOnly&&!info.isImage){return _this.__createGroupDf.reject("image",info)}else{return _this.__createGroupDf.resolve(info)}})}).fail(function(){return _this.__createGroupDf.reject("createGroup")})})}};FileGroup.prototype.promise=function(){this.__save();return this.__apiDf.promise()};FileGroup.prototype.__initApiDeferred=function(){var notify,reject,resolve,_this=this;this.__apiDf=$.Deferred();this.__progressState="uploading";reject=function(err){return _this.__buildInfo(function(info){return _this.__apiDf.reject(err,info)})};resolve=function(info){return _this.__apiDf.resolve(info)};notify=function(){return _this.__apiDf.notify(_this.__progressInfo())};notify();this.__fileColl.onAnyProgress.add(notify);this.__allFilesDf.done(function(){_this.__progressState="uploaded";return notify()}).fail(reject);return this.__createGroupDf.done(function(info){_this.__progressState="ready";notify();return resolve(info)}).fail(reject)};FileGroup.prototype.__progressInfo=function(){var progress,progressInfo,progressInfos,_i,_len;progress=0;progressInfos=this.__fileColl.lastProgresses();for(_i=0,_len=progressInfos.length;_i<_len;_i++){progressInfo=progressInfos[_i];progress+=((progressInfo!=null?progressInfo.progress:void 0)||0)/progressInfos.length}return{state:this.__progressState,uploadProgress:progress,progress:this.__progressState==="ready"?1:progress*0.9}};FileGroup.prototype.__buildInfo=function(cb){var info;info={uuid:this.__uuid,cdnUrl:""+this.settings.cdnBase+"/"+this.__uuid+"/",name:t("file",this.__fileColl.length()),count:this.__fileColl.length(),size:0,isImage:true,isStored:true};return this.__fileInfosDf.done(function(){var infos,_i,_info,_len;infos=1<=arguments.length?__slice.call(arguments,0):[];for(_i=0,_len=infos.length;_i<_len;_i++){_info=infos[_i];info.size+=_info.size;if(!_info.isImage){info.isImage=false}if(!_info.isStored){info.isStored=false}}return cb(info)})};FileGroup.prototype.__createGroup=function(){var df,_this=this;df=$.Deferred();if(this.__fileColl.length()){this.__fileInfosDf.done(function(){var info,infos;infos=1<=arguments.length?__slice.call(arguments,0):[];return utils.jsonp(""+_this.settings.urlBase+"/group/","POST",{pub_key:_this.settings.publicKey,files:(function(){var _i,_len,_results;_results=[];for(_i=0,_len=infos.length;_i<_len;_i++){info=infos[_i];_results.push("/"+info.uuid+"/"+(info.cdnUrlModifiers||""))}return _results})()}).fail(df.reject).done(df.resolve)})}else{df.reject()}return df.promise()};FileGroup.prototype.api=function(){if(!this.__api){this.__api=utils.bindAll(this,["promise","files"])}return this.__api};return FileGroup})();return ns.SavedFileGroup=(function(_super){__extends(SavedFileGroup,_super);function SavedFileGroup(__data,settings){var files;this.__data=__data;files=uploadcare.filesFrom("ready",this.__data.files,settings);SavedFileGroup.__super__.constructor.call(this,files,settings)}SavedFileGroup.prototype.__createGroup=function(){return utils.wrapToPromise(this.__data)};return SavedFileGroup})(ns.FileGroup)});namespace("uploadcare",function(ns){ns.FileGroup=function(filesAndGroups,settings){var file,files,item,_i,_j,_len,_len1,_ref1;if(filesAndGroups==null){filesAndGroups=[]}files=[];for(_i=0,_len=filesAndGroups.length;_i<_len;_i++){item=filesAndGroups[_i];if(utils.isFile(item)){files.push(item)}else{if(utils.isFileGroup(item)){_ref1=item.files();for(_j=0,_len1=_ref1.length;_j<_len1;_j++){file=_ref1[_j];files.push(file)}}}}return new uploadcare.files.FileGroup(files,settings).api()};return ns.loadFileGroup=function(groupIdOrUrl,settings){var df,id;settings=s.build(settings);df=$.Deferred();id=utils.groupIdRegex.exec(groupIdOrUrl);if(id){utils.jsonp(""+settings.urlBase+"/group/info/",{pub_key:settings.publicKey,group_id:id[0]}).fail(df.reject).done(function(data){return df.resolve(new uploadcare.files.SavedFileGroup(data,settings).api())})}else{df.reject()}return df.promise()}});namespace("uploadcare.utils",function(utils){utils.isFileGroup=function(obj){return obj&&obj.files&&obj.promise};utils.valueToGroup=function(value,settings){var files,item;if(value){if($.isArray(value)){files=(function(){var _i,_len,_results;_results=[];for(_i=0,_len=value.length;_i<_len;_i++){item=value[_i];_results.push(utils.valueToFile(item,settings))}return _results})();value=uploadcare.FileGroup(files,settings)}else{if(!utils.isFileGroup(value)){return uploadcare.loadFileGroup(value,settings)}}}return utils.wrapToPromise(value)};return utils.isFileGroupsEqual=function(group1,group2){var file,files1,files2,i,mismatches;if(group1===group2){return true}else{if(utils.isFileGroup(group1)&&utils.isFileGroup(group2)){files1=group1.files();files2=group2.files();if(files1.length!==files2.length){return false}else{mismatches=(function(){var _i,_len,_results;_results=[];for(i=_i=0,_len=files1.length;_i<_len;i=++_i){file=files1[i];if(file!==files2[i]){_results.push(1)}}return _results})();if(mismatches.length){return false}else{return true}}}else{return false}}}})}).call(this);(function(){var $,f,namespace,settings,utils;namespace=uploadcare.namespace,utils=uploadcare.utils,$=uploadcare.jQuery,f=uploadcare.files,settings=uploadcare.settings;namespace("uploadcare",function(ns){var converters;ns.fileFrom=function(type,data,s){return ns.filesFrom(type,[data],s)[0]};ns.filesFrom=function(type,data,s){var part,_i,_len,_results;s=settings.build(s||{});_results=[];for(_i=0,_len=data.length;_i<_len;_i++){part=data[_i];_results.push(new converters[type](s,part).promise())}return _results};return converters={object:f.ObjectFile,input:f.InputFile,url:f.UrlFile,uploaded:f.UploadedFile,ready:f.ReadyFile}})}).call(this);(function(){var $,namespace,s,utils;namespace=uploadcare.namespace,utils=uploadcare.utils,s=uploadcare.settings,$=uploadcare.jQuery;namespace("uploadcare.dragdrop",function(ns){ns.support=utils.abilities.fileDragAndDrop;ns.uploadDrop=function(el,callback,settings){settings=s.build(settings);return ns.receiveDrop(el,function(type,data){return callback(settings.multiple?uploadcare.filesFrom(type,data,settings):uploadcare.fileFrom(type,data[0],settings))})};if(!ns.support){return ns.receiveDrop=function(){}}else{ns.receiveDrop=function(el,callback){ns.watchDragging(el);return $(el).on({dragover:function(e){e.preventDefault();return e.originalEvent.dataTransfer.dropEffect="copy"},drop:function(e){var dt,uri,uris,_i,_len,_ref;e.preventDefault();dt=e.originalEvent.dataTransfer;if(!dt){return}if(dt.files.length){return callback("object",dt.files)}else{uris=[];_ref=dt.getData("text/uri-list").split();for(_i=0,_len=_ref.length;_i<_len;_i++){uri=_ref[_i];uri=$.trim(uri);if(uri&&uri[0]!=="#"){uris.push(uri)}}if(uris){return callback("url",uris)}}}})};ns.watchDragging=function(el,receiver){var active,changeState,delayedEnter;delayedEnter=false;active=false;changeState=function(newActive){if(active!==newActive){return $(el).toggleClass("uploadcare-dragging",active=newActive)}};return $(receiver||el).on({dragenter:function(){return delayedEnter=utils.defer(function(){delayedEnter=false;return changeState(true)})},dragleave:function(){if(!delayedEnter){return changeState(false)}},"drop mouseenter":function(){if(delayedEnter){clearTimeout(delayedEnter)}return utils.defer(function(){return changeState(false)})}})};return ns.watchDragging("body",document)}})}).call(this);(function(){var $,abilities,files,namespace,tpl,_ref,_ref1,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,files=uploadcare.files,$=uploadcare.jQuery,(_ref=uploadcare.utils,abilities=_ref.abilities),(_ref1=uploadcare.templates,tpl=_ref1.tpl);namespace("uploadcare.ui.progress",function(ns){ns.Circle=(function(){function Circle(element){this.update=__bind(this.update,this);if(abilities.canvas){this.renderer=new ns.CanvasRenderer(element)}else{this.renderer=new ns.TextRenderer(element)}this.observed=null}Circle.prototype.listen=function(file,selector){var selectorFn,_this=this;if(selector==null){selector="uploadProgress"}this.reset();selectorFn=selector!=null?function(info){return info[selector]}:function(x){return x};this.observed=file;if(this.observed.state()==="resolved"){this.renderer.setValue(1,true)}else{this.observed.progress(function(progress){if(file===_this.observed){return _this.renderer.setValue(selectorFn(progress))}}).always(function(uploadedFile){if(file===_this.observed){return _this.renderer.setValue(1,false)}})}return this};Circle.prototype.reset=function(filled){if(filled==null){filled=false}this.observed=null;return this.renderer.setValue((filled?1:0),true)};Circle.prototype.update=function(){return this.renderer.update()};return Circle})();ns.BaseRenderer=(function(){function BaseRenderer(el){this.element=$(el);this.element.data("uploadcare-progress-renderer",this);this.element.addClass("uploadcare-widget-circle")}BaseRenderer.prototype.update=function(){};return BaseRenderer})();ns.TextRenderer=(function(_super){__extends(TextRenderer,_super);function TextRenderer(){TextRenderer.__super__.constructor.apply(this,arguments);this.element.addClass("uploadcare-widget-circle--text");this.element.html(tpl("circle-text"));this.text=this.element.find("@uploadcare-circle-text")}TextRenderer.prototype.setValue=function(val){val=Math.round(val*100);return this.text.html(""+val+" %")};return TextRenderer})(ns.BaseRenderer);return ns.CanvasRenderer=(function(_super){__extends(CanvasRenderer,_super);function CanvasRenderer(){CanvasRenderer.__super__.constructor.apply(this,arguments);this.canvasEl=$("<canvas>").get(0);this.element.addClass("uploadcare-widget-circle--canvas");this.element.html(this.canvasEl);this.setValue(0,true)}CanvasRenderer.prototype.update=function(){var arc,ctx,half,size;half=Math.floor(Math.min(this.element.width(),this.element.height()));size=half*2;if(half){if(this.canvasEl.width!==size||this.canvasEl.height!==size){this.canvasEl.width=size;this.canvasEl.height=size}ctx=this.canvasEl.getContext("2d");arc=function(radius,val){var offset;offset=-Math.PI/2;ctx.beginPath();ctx.moveTo(half,half);ctx.arc(half,half,radius,offset,offset+2*Math.PI*val,false);return ctx.fill()};ctx.clearRect(0,0,size,size);ctx.globalCompositeOperation="source-over";ctx.fillStyle=this.element.css("border-left-color");arc(half-0.5,1);ctx.fillStyle=this.element.css("color");arc(half,this.val);ctx.globalCompositeOperation="destination-out";return arc(half/7,1)}};CanvasRenderer.prototype.__animateValue=function(target){var speed,start,val,_this=this;val=this.val;start=new Date();speed=target>val?2:-2;return this.__animIntervalId=setInterval(function(){var current;current=val+(new Date()-start)/1000*speed;current=(speed>0?Math.min:Math.max)(current,target);if(current===target){_this.__stopAnimation()}return _this.__setValue(current)},15)};CanvasRenderer.prototype.__stopAnimation=function(){if(this.__animIntervalId){clearInterval(this.__animIntervalId);return this.__animIntervalId=null}};CanvasRenderer.prototype.__setValue=function(val){this.val=val;return this.update()};CanvasRenderer.prototype.setValue=function(val,instant){if(instant==null){instant=false}this.__stopAnimation();if(instant){return this.__setValue(val)}else{return this.__animateValue(val)}};return CanvasRenderer})(ns.BaseRenderer)})}).call(this);(function(){var $,namespace,progress,t,tpl,utils,_ref,_ref1,_ref2;namespace=uploadcare.namespace,$=uploadcare.jQuery,utils=uploadcare.utils,(_ref=uploadcare.ui,progress=_ref.progress),(_ref1=uploadcare.locale,t=_ref1.t),(_ref2=uploadcare.templates,tpl=_ref2.tpl);namespace("uploadcare.widget",function(ns){return ns.Template=(function(){function Template(settings,element){this.settings=settings;this.element=element;this.content=$(tpl("widget"));this.element.after(this.content);this.circle=new progress.Circle(this.content.find("@uploadcare-widget-status"));this.statusText=this.content.find("@uploadcare-widget-text")}Template.prototype.addButton=function(name,caption){if(caption==null){caption=""}return $(tpl("widget-button",{name:name,caption:caption})).appendTo(this.content)};Template.prototype.setStatus=function(status){var form,prefix;prefix="uploadcare-widget-status-";this.content.removeClass(prefix+this.content.attr("data-status"));this.content.attr("data-status",status);this.content.addClass(prefix+status);form=this.element.closest("@uploadcare-upload-form");return form.trigger(""+status+".uploadcare")};Template.prototype.reset=function(){this.circle.reset();this.setStatus("ready");return this.__file=null};Template.prototype.loaded=function(){this.setStatus("loaded");return this.circle.reset(true)};Template.prototype.listen=function(file){var _this=this;this.__file=file;this.circle.listen(file);this.setStatus("started");return file.progress(function(info){if(file===_this.__file){switch(info.state){case"uploading":return _this.statusText.text(t("uploading"));case"uploaded":return _this.statusText.text(t("loadingInfo"))}}})};Template.prototype.error=function(type){this.statusText.text(t("errors."+(type||"default")));return this.setStatus("error")};Template.prototype.setFileInfo=function(info){return this.statusText.html(tpl("widget-file-name",info))};return Template})()})}).call(this);(function(){var $,namespace,t,tpl,_ref,_ref1;namespace=uploadcare.namespace,$=uploadcare.jQuery,(_ref=uploadcare.templates,tpl=_ref.tpl),(_ref1=uploadcare.locale,t=_ref1.t);namespace("uploadcare.widget.tabs",function(ns){return ns.BaseSourceTab=(function(){var CLASS_PREFIX,ROLE_PREFIX;CLASS_PREFIX="uploadcare-dialog-source-base-";ROLE_PREFIX="@"+CLASS_PREFIX;function BaseSourceTab(container,tabButton,dialogApi,settings){var notDisabled,updateFooter,_this=this;this.container=container;this.tabButton=tabButton;this.dialogApi=dialogApi;this.settings=settings;this.container.append(tpl("source-tab-base"));this.wrap=this.container.find(ROLE_PREFIX+"wrap");notDisabled=":not(.uploadcare-disabled-el)";this.container.on("click",ROLE_PREFIX+"show-files"+notDisabled,function(){return _this.dialogApi.switchTab("preview")});this.container.on("click",ROLE_PREFIX+"done"+notDisabled,this.dialogApi.done);updateFooter=function(){var files,footer,tooFewFiles,tooManyFiles;files=_this.dialogApi.fileColl.length();tooManyFiles=_this.settings.multipleMax!==0&&files>_this.settings.multipleMax;tooFewFiles=files<_this.settings.multipleMin;_this.container.find(ROLE_PREFIX+"done").toggleClass("uploadcare-disabled-el",tooManyFiles||tooFewFiles);_this.container.find(ROLE_PREFIX+"show-files").toggleClass("uploadcare-disabled-el",files===0);footer=tooManyFiles?t("dialog.tabs.preview.multiple.tooManyFiles").replace("%max%",_this.settings.multipleMax):files&&tooFewFiles?t("dialog.tabs.preview.multiple.tooFewFiles").replace("%min%",_this.settings.multipleMin):t("dialog.tabs.preview.multiple.title");_this.container.find(ROLE_PREFIX+"footer-text").toggleClass("uploadcare-error",tooManyFiles).text(footer.replace("%files%",t("file",files)));return _this.container.find("."+CLASS_PREFIX+"counter").toggleClass("uploadcare-error",tooManyFiles).text(files?"("+files+")":"")};updateFooter();this.dialogApi.fileColl.onAdd.add(updateFooter);this.dialogApi.fileColl.onRemove.add(updateFooter)}return BaseSourceTab})()})}).call(this);(function(){var $,dragdrop,namespace,tpl,utils,_ref,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,utils=uploadcare.utils,dragdrop=uploadcare.dragdrop,$=uploadcare.jQuery,(_ref=uploadcare.templates,tpl=_ref.tpl);namespace("uploadcare.widget.tabs",function(ns){return ns.FileTab=(function(_super){__extends(FileTab,_super);function FileTab(){var _this=this;FileTab.__super__.constructor.apply(this,arguments);this.wrap.append(tpl("tab-file",{tabs:this.settings.tabs}));this.wrap.addClass("uploadcare-dialog-padding");this.wrap.on("click","@uploadcare-dialog-switch-tab",function(e){return _this.dialogApi.switchTab($(e.target).data("tab"))});this.__setupFileButton();this.__initDragNDrop()}FileTab.prototype.__initDragNDrop=function(){var dropArea,_this=this;dropArea=this.wrap.find("@uploadcare-drop-area");if(utils.abilities.fileDragAndDrop){dragdrop.receiveDrop(dropArea,function(type,data){_this.dialogApi.addFiles(type,data);return _this.dialogApi.switchTab("preview")});return this.wrap.addClass("uploadcare-draganddrop")}};FileTab.prototype.__setupFileButton=function(){var fileButton,_this=this;fileButton=this.wrap.find("@uploadcare-dialog-browse-file");return utils.fileInput(fileButton,this.settings,function(input){if(utils.abilities.sendFileAPI){_this.dialogApi.addFiles("object",input.files)}else{_this.dialogApi.addFiles("input",[input])}return _this.dialogApi.switchTab("preview")})};return FileTab})(ns.BaseSourceTab)})}).call(this);(function(){var $,namespace,t,tpl,_ref,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,$=uploadcare.jQuery,(_ref=uploadcare.templates,tpl=_ref.tpl);t=uploadcare.locale.t;namespace("uploadcare.widget.tabs",function(ns){return ns.UrlTab=(function(_super){var fixUrl,urlRegexp;__extends(UrlTab,_super);urlRegexp=/^[a-z][a-z0-9+\-.]*:?\/\//;fixUrl=function(url){url=$.trim(url);if(urlRegexp.test(url)){return url}else{return"http://"+url}};function UrlTab(){var button,input,_this=this;UrlTab.__super__.constructor.apply(this,arguments);this.wrap.append(tpl("tab-url"));this.wrap.addClass("uploadcare-dialog-padding");input=this.wrap.find("@uploadcare-dialog-url-input");input.on("change keyup input",function(){return button.prop("disabled",!$.trim(this.value))});button=this.wrap.find("@uploadcare-dialog-url-submit").prop("disabled",true);this.wrap.find("@uploadcare-dialog-url-form").on("submit",function(){var url;if(url=fixUrl(input.val())){_this.dialogApi.addFiles("url",[url]);input.val("")}return false})}return UrlTab})(ns.BaseSourceTab)})}).call(this);(function(){var $,namespace,tpl,utils,_ref,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,utils=uploadcare.utils,$=uploadcare.jQuery,(_ref=uploadcare.templates,tpl=_ref.tpl);namespace("uploadcare.widget.tabs",function(ns){return ns.CameraTab=(function(_super){__extends(CameraTab,_super);function CameraTab(){this.__capture=__bind(this.__capture,this);this.__mirror=__bind(this.__mirror,this);this.__requestCamera=__bind(this.__requestCamera,this);var _this=this;CameraTab.__super__.constructor.apply(this,arguments);if(!this.__checkCompatibility()){this.wrap.hide();this.tabButton.hide();return}this.__loaded=false;this.mirrored=true;this.wrap.append(tpl("tab-camera"));this.wrap.addClass("uploadcare-dialog-padding uploadcare-dialog-camera-requested");this.wrap.find(".uploadcare-dialog-camera-capture").on("click",this.__capture);this.wrap.find(".uploadcare-dialog-camera-mirror").on("click",this.__mirror);this.wrap.find(".uploadcare-dialog-camera-retry").on("click",this.__requestCamera);this.video=this.wrap.find("video");this.video.on("loadeddata",function(){return this.play()});this.dialogApi.onSwitched.add(function(_,switchedToMe){if(switchedToMe&&!_this.__loaded){return _this.__requestCamera()}});this.dialogApi.dialog.always(function(){var _ref1,_ref2;if((_ref1=_this.URL)!=null){_ref1.revokeObjectURL(_this.video.prop("src"))}return(_ref2=_this.__stream)!=null?typeof _ref2.stop==="function"?_ref2.stop():void 0:void 0})}CameraTab.prototype.__checkCompatibility=function(){this.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;this.URL=window.URL||window.webkitURL;return !!this.getUserMedia&&Uint8Array};CameraTab.prototype.__requestCamera=function(){var _this=this;this.__loaded=true;return this.getUserMedia.call(navigator,{video:{optional:[{minWidth:320},{minWidth:640},{minWidth:1024},{minWidth:1280},{minWidth:1920}]}},function(stream){_this.wrap.removeClass("uploadcare-dialog-camera-requested").removeClass("uploadcare-dialog-camera-denied").addClass("uploadcare-dialog-camera-ready");_this.__stream=stream;if(_this.URL){_this.video.prop("src",_this.URL.createObjectURL(stream))}else{_this.video.prop("src",stream)}return _this.video[0].play()},function(error){if(error==="NO_DEVICES_FOUND"||error.name==="DevicesNotFoundError"){_this.wrap.addClass("uploadcare-dialog-camera-not-founded")}else{_this.wrap.addClass("uploadcare-dialog-camera-denied")}return _this.__loaded=false})};CameraTab.prototype.__mirror=function(){this.mirrored=!this.mirrored;return this.video.toggleClass("uploadcare-dialog-camera--mirrored",this.mirrored)};CameraTab.prototype.__capture=function(){var canvas,ctx,h,video,w,_this=this;video=this.video[0];w=video.videoWidth;h=video.videoHeight;canvas=document.createElement("canvas");canvas.width=w;canvas.height=h;ctx=canvas.getContext("2d");if(this.mirrored){ctx.translate(w,0);ctx.scale(-1,1)}ctx.drawImage(video,0,0,w,h);return utils.canvasToBlob(canvas,"image/jpeg",0.9,function(blob){blob.name="camera.jpg";_this.dialogApi.addFiles("object",[blob]);return _this.dialogApi.switchTab("preview")})};return CameraTab})(ns.BaseSourceTab)})}).call(this);(function(){var $,files,locale,namespace,t,tabsCss,utils,_ref,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,locale=uploadcare.locale,utils=uploadcare.utils,tabsCss=uploadcare.tabsCss,$=uploadcare.jQuery,(_ref=uploadcare.locale,t=_ref.t),files=uploadcare.files;namespace("uploadcare.widget.tabs",function(ns){return ns.RemoteTabFor=function(service){var RemoteTab;return RemoteTab=(function(_super){__extends(RemoteTab,_super);function RemoteTab(){this.__createIframe=__bind(this.__createIframe,this);var _this=this;RemoteTab.__super__.constructor.apply(this,arguments);this.wrap.addClass("uploadcare-dialog-remote-iframe-wrap");this.dialogApi.onSwitched.add(function(_,switchedToMe){if(switchedToMe){_this.__createIframe()}return _this.__sendMessage({type:"visibility-changed",visible:switchedToMe})})}RemoteTab.prototype.remoteUrl=function(){return(""+this.settings.socialBase+"/window/"+service+"?")+$.param({lang:this.settings.locale,public_key:this.settings.publicKey,widget_version:uploadcare.version,images_only:this.settings.imagesOnly})};RemoteTab.prototype.__sendMessage=function(messageObj){var _ref1;return(_ref1=this.iframe)!=null?_ref1[0].contentWindow.postMessage(JSON.stringify(messageObj),"*"):void 0};RemoteTab.prototype.__createIframe=function(){var _this=this;if(this.iframe){return}this.iframe=$("<iframe>",{src:this.remoteUrl(),marginheight:0,marginwidth:0,frameborder:0,allowTransparency:"true"}).addClass("uploadcare-dialog-remote-iframe").appendTo(this.wrap).on("load",function(){var style,url,_i,_j,_len,_len1,_ref1,_ref2;_this.iframe.css("opacity","1");_ref1=tabsCss.urls;for(_i=0,_len=_ref1.length;_i<_len;_i++){url=_ref1[_i];_this.__sendMessage({type:"embed-css",url:url})}_ref2=tabsCss.styles;for(_j=0,_len1=_ref2.length;_j<_len1;_j++){style=_ref2[_j];_this.__sendMessage({type:"embed-css",style:style})}});return $(window).on("message",function(_arg){var e,file,message,url;e=_arg.originalEvent;if(e.source!==_this.iframe[0].contentWindow){return}try{message=JSON.parse(e.data)}catch(_error){return}if(message.type==="file-selected"){url=(function(){var key,type,_i,_len,_ref1;if(message.alternatives){_ref1=_this.settings.preferredTypes;for(_i=0,_len=_ref1.length;_i<_len;_i++){type=_ref1[_i];type=utils.globRegexp(type);for(key in message.alternatives){if(type.test(key)){return message.alternatives[key]}}}}return message.url})();file=new files.UrlFile(_this.settings,url);if(message.filename){file.setName(message.filename)}if(message.is_image!=null){file.setIsImage(message.is_image)}return _this.dialogApi.addFiles([file.promise()])}})};return RemoteTab})(ns.BaseSourceTab)}})}).call(this);(function(){var $,Circle,namespace,_ref,_ref1;namespace=uploadcare.namespace,(_ref=uploadcare.ui,(_ref1=_ref.progress,Circle=_ref1.Circle)),$=uploadcare.jQuery;namespace("uploadcare.widget.tabs",function(ns){return ns.BasePreviewTab=(function(){var PREFIX;PREFIX="@uploadcare-dialog-preview-";function BasePreviewTab(container,tabButton,dialogApi,settings){var notDisabled,_this=this;this.container=container;this.tabButton=tabButton;this.dialogApi=dialogApi;this.settings=settings;this.__initTabButtonCircle();notDisabled=":not(.uploadcare-disabled-el)";this.container.on("click",PREFIX+"back"+notDisabled,function(){return _this.dialogApi.fileColl.clear()});this.container.on("click",PREFIX+"done"+notDisabled,this.dialogApi.done)}BasePreviewTab.prototype.__initTabButtonCircle=function(){var circle,circleDf,circleEl,update,_this=this;circleEl=$('<div class="uploadcare-dialog-icon">').appendTo(this.tabButton);circleDf=$.Deferred();update=function(){var infos,progress,progressInfo,_i,_len;infos=_this.dialogApi.fileColl.lastProgresses();progress=0;for(_i=0,_len=infos.length;_i<_len;_i++){progressInfo=infos[_i];progress+=((progressInfo!=null?progressInfo.progress:void 0)||0)/infos.length}return circleDf.notify({progress:progress})};this.dialogApi.fileColl.onAnyProgress.add(update);this.dialogApi.fileColl.onAdd.add(update);this.dialogApi.fileColl.onRemove.add(update);update();circle=new Circle(circleEl).listen(circleDf.promise(),"progress");return this.dialogApi.onSwitched.add(circle.update)};return BasePreviewTab})()})}).call(this);(function(){var $,CropWidget,namespace,progress,t,tpl,utils,_ref,_ref1,_ref2,_ref3,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,utils=uploadcare.utils,(_ref=uploadcare.ui,progress=_ref.progress),(_ref1=uploadcare.templates,tpl=_ref1.tpl),$=uploadcare.jQuery,(_ref2=uploadcare.crop,CropWidget=_ref2.CropWidget),(_ref3=uploadcare.locale,t=_ref3.t);namespace("uploadcare.widget.tabs",function(ns){return ns.PreviewTab=(function(_super){__extends(PreviewTab,_super);function PreviewTab(){this.__setFile=__bind(this.__setFile,this);var _this=this;PreviewTab.__super__.constructor.apply(this,arguments);$.each(this.dialogApi.fileColl.get(),function(i,file){return _this.__setFile(file)});this.dialogApi.fileColl.onAdd.add(this.__setFile);this.widget=null}PreviewTab.prototype.__setFile=function(file){var ifCur,_this=this;this.file=file;ifCur=function(fn){return function(){if(file===_this.file){return fn.apply(null,arguments)}}};this.file.progress(ifCur(utils.once(function(info){return _this.__setState("unknown",{file:info.incompleteFileInfo})})));this.file.done(ifCur(function(file){var state;state=file.isImage?"image":"regular";return _this.__setState(state,{file:file})}));return this.file.fail(ifCur(function(error,file){return _this.__setState("error",{error:error,file:file})}))};PreviewTab.prototype.element=function(name){return this.container.find("@uploadcare-dialog-preview-"+name)};PreviewTab.prototype.__setState=function(state,data){this.container.empty().append(tpl("tab-preview-"+state,data));if(state==="unknown"&&this.settings.crop){this.element("done").hide()}if(state==="image"){return this.initImage(data.file)}};PreviewTab.prototype.initImage=function(info){var done,img,imgLoader,imgSize,startCrop,_this=this;img=this.element("image");done=this.element("done");imgSize=[info.originalImageInfo.width,info.originalImageInfo.height];imgLoader=utils.imageLoader(img.attr("src")).done(function(){return _this.element("root").addClass("uploadcare-dialog-preview--loaded")}).fail(function(){_this.file=null;return _this.__setState("error",{error:"loadImage"})});startCrop=function(){done.removeClass("uploadcare-disabled-el");_this.widget=new CropWidget(img,imgSize,_this.settings.crop[0]);_this.widget.setSelectionFromModifiers(info.cdnUrlModifiers);return done.click(function(){var opts;opts=_this.widget.getSelectionWithModifiers();return _this.dialogApi.fileColl.replace(_this.file,_this.file.then(function(info){info.cdnUrlModifiers=opts.modifiers;info.cdnUrl=""+info.originalUrl+(opts.modifiers||"");info.crop=opts.crop;return info}))})};if(this.settings.crop){this.element("title").text(t("dialog.tabs.preview.crop.title"));done.addClass("uploadcare-disabled-el");done.text(t("dialog.tabs.preview.crop.done"));this.populateCropSizes();return imgLoader.done(function(){return utils.defer(startCrop)})}};PreviewTab.prototype.populateCropSizes=function(){var control,currentClass,template,_this=this;if(this.settings.crop.length<=1){return}this.element("root").addClass("uploadcare-dialog-preview--with-sizes");control=this.element("crop-sizes");template=control.children();currentClass="uploadcare-crop-size--current";$.each(this.settings.crop,function(i,crop){var caption,gcd,item,prefered,size;prefered=crop.preferedSize;if(prefered){gcd=utils.gcd(prefered[0],prefered[1]);caption=""+(prefered[0]/gcd)+":"+(prefered[1]/gcd)}else{caption=t("dialog.tabs.preview.crop.free")}item=template.clone().appendTo(control).attr("data-caption",caption).on("click",function(e){if(_this.widget){_this.widget.setCrop(crop);control.find(">*").removeClass(currentClass);return item.addClass(currentClass)}});if(prefered){size=utils.fitSize(prefered,[40,40],true);return item.children().css({width:Math.max(20,size[0]),height:Math.max(12,size[1])})}});template.remove();return control.find(">*").eq(0).addClass(currentClass)};return PreviewTab})(ns.BasePreviewTab)})}).call(this);(function(){var $,namespace,progress,t,tpl,utils,_ref,_ref1,_ref2,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,utils=uploadcare.utils,(_ref=uploadcare.ui,progress=_ref.progress),(_ref1=uploadcare.templates,tpl=_ref1.tpl),$=uploadcare.jQuery,(_ref2=uploadcare.locale,t=_ref2.t);namespace("uploadcare.widget.tabs",function(ns){return ns.PreviewTabMultiple=(function(_super){var CLASS_PREFIX,ROLE_PREFIX;__extends(PreviewTabMultiple,_super);CLASS_PREFIX="uploadcare-dpm-";ROLE_PREFIX="@"+CLASS_PREFIX;function PreviewTabMultiple(){this.__fileRemoved=__bind(this.__fileRemoved,this);this.__fileAdded=__bind(this.__fileAdded,this);this.__fileFailed=__bind(this.__fileFailed,this);this.__fileDone=__bind(this.__fileDone,this);this.__fileProgress=__bind(this.__fileProgress,this);this.__updateContainerView=__bind(this.__updateContainerView,this);var _this=this;PreviewTabMultiple.__super__.constructor.apply(this,arguments);this.container.append(tpl("tab-preview-multiple"));this.__fileTpl=$(tpl("tab-preview-multiple-file"));this.fileListEl=this.__find("file-list");this.titleEl=this.__find("title");this.mobileTitleEl=this.__find("mobile-title");this.footerTextEl=this.__find("footer-text");this.doneBtnEl=this.container.find("@uploadcare-dialog-preview-done");$.each(this.dialogApi.fileColl.get(),function(i,file){_this.__fileAdded(file);return file.then(function(info){return _this.__fileDone(file,info)},function(info){return _this.__fileFailed(file,info)},function(info){return _this.__fileProgress(file,info)})});this.__updateContainerView();this.dialogApi.fileColl.onAdd.add([this.__fileAdded,this.__updateContainerView]);this.dialogApi.fileColl.onRemove.add([this.__fileRemoved,this.__updateContainerView]);this.dialogApi.fileColl.onAnyDone.add(this.__fileDone);this.dialogApi.fileColl.onAnyFail.add(this.__fileFailed);this.dialogApi.fileColl.onAnyProgress.add(this.__fileProgress);this.__setupSorting()}PreviewTabMultiple.prototype.__setupSorting=function(){var _this=this;return this.fileListEl.sortable({touch:false,axis:"y",start:function(info){return info.dragged.css("visibility","hidden")},finish:function(info){var elements,index;info.dragged.css("visibility","visible");elements=_this.__find("file-item");index=function(file){return elements.index(_this.__fileToEl(file))};return _this.dialogApi.fileColl.sort(function(a,b){return index(a)-index(b)})}})};PreviewTabMultiple.prototype.__find=function(s,context){if(context==null){context=this.container}return $(ROLE_PREFIX+s,context)};PreviewTabMultiple.prototype.__updateContainerView=function(){var files,footer,title,tooFewFiles,tooManyFiles;files=this.dialogApi.fileColl.length();tooManyFiles=this.settings.multipleMax!==0&&files>this.settings.multipleMax;tooFewFiles=files<this.settings.multipleMin;this.doneBtnEl.toggleClass("uploadcare-disabled-el",tooManyFiles||tooFewFiles);title=t("dialog.tabs.preview.multiple.title").replace("%files%",t("file",files));this.titleEl.text(title);footer=tooManyFiles?t("dialog.tabs.preview.multiple.tooManyFiles").replace("%max%",this.settings.multipleMax):files&&tooFewFiles?t("dialog.tabs.preview.multiple.tooFewFiles").replace("%min%",this.settings.multipleMin).replace("%files%",t("file",files)):t("dialog.tabs.preview.multiple.question");this.footerTextEl.toggleClass("uploadcare-error",tooManyFiles||tooFewFiles).text(footer);return this.mobileTitleEl.toggleClass("uploadcare-error",tooManyFiles||tooFewFiles).text(tooManyFiles||tooFewFiles?footer:title)};PreviewTabMultiple.prototype.__updateFileInfo=function(fileEl,info){this.__find("file-name",fileEl).text(info.name||t("dialog.tabs.preview.unknownName"));return this.__find("file-size",fileEl).text(utils.readableFileSize(info.size,"–"))};PreviewTabMultiple.prototype.__fileProgress=function(file,progressInfo){var fileEl;fileEl=this.__fileToEl(file);this.__find("file-progressbar-value",fileEl).css("width",Math.round(progressInfo.progress*100)+"%");return this.__updateFileInfo(fileEl,progressInfo.incompleteFileInfo)};PreviewTabMultiple.prototype.__fileDone=function(file,info){var fileEl;fileEl=this.__fileToEl(file);fileEl.addClass(CLASS_PREFIX+"uploaded");this.__find("file-progressbar-value",fileEl).css("width","100%");this.__updateFileInfo(fileEl,info);if(info.isImage){return this.__find("file-preview-wrap",fileEl).html($("<img>").attr({src:""+info.originalUrl+"-/scale_crop/90x90/center/"}).css({width:"auto",height:45}))}};PreviewTabMultiple.prototype.__fileFailed=function(file,error,info){var fileEl;fileEl=this.__fileToEl(file);fileEl.addClass(CLASS_PREFIX+"error");return this.__find("file-error",fileEl).text(t("errors."+error))};PreviewTabMultiple.prototype.__fileAdded=function(file){return $(file).data("dmp-el",this.__createFileEl(file))};PreviewTabMultiple.prototype.__fileRemoved=function(file){return this.__fileToEl(file).remove()};PreviewTabMultiple.prototype.__fileToEl=function(file){return $(file).data("dmp-el")};PreviewTabMultiple.prototype.__createFileEl=function(file){var _this=this;return this.__fileTpl.clone().appendTo(this.fileListEl).on("click",ROLE_PREFIX+"file-remove",function(){return _this.dialogApi.fileColl.remove(file)})};return PreviewTabMultiple})(ns.BasePreviewTab)})}).call(this);(function(){var namespace,tpl,_ref;namespace=uploadcare.namespace,(_ref=uploadcare.templates,tpl=_ref.tpl);namespace("uploadcare.widget.tabs",function(ns){return ns.StaticTabWith=function(tplName){var StaticTab;return StaticTab=(function(){function StaticTab(container){this.container=container;this.container.append(tpl("tab-"+tplName))}return StaticTab})()}})}).call(this);(function(){var $,Circle,files,namespace,s,t,tabs,tpl,utils,_ref,_ref1,_ref2,_ref3,_ref4,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}};namespace=uploadcare.namespace,utils=uploadcare.utils,(_ref=uploadcare.locale,t=_ref.t),(_ref1=uploadcare.templates,tpl=_ref1.tpl),(_ref2=uploadcare.ui,(_ref3=_ref2.progress,Circle=_ref3.Circle)),files=uploadcare.files,(_ref4=uploadcare.widget,tabs=_ref4.tabs),s=uploadcare.settings,$=uploadcare.jQuery;namespace("uploadcare",function(ns){var Panel,currentDialogPr,lockScroll,openedClass,registeredTabs,_this=this;lockScroll=function(el,toTop){var left,top;top=el.scrollTop();left=el.scrollLeft();if(toTop){el.scrollTop(0).scrollLeft(0)}return function(){return el.scrollTop(top).scrollLeft(left)}};$(window).on("keydown",function(e){if(ns.isDialogOpened()){if(e.which===27){e.stopImmediatePropagation();return ns.closeDialog()}}});currentDialogPr=null;openedClass="uploadcare-dialog-opened";ns.isDialogOpened=function(){return currentDialogPr!==null};ns.closeDialog=function(){return currentDialogPr!=null?currentDialogPr.reject():void 0};ns.openDialog=function(files,tab,settings){var cancelLock,dialog;ns.closeDialog();dialog=$(tpl("dialog")).appendTo("body");dialog.on("click",".uploadcare-dialog-close",ns.closeDialog);dialog.on("dblclick",function(e){var showStoppers;if(!$.contains(document.documentElement,e.target)){return}showStoppers=".uploadcare-dialog-panel, a";if($(e.target).is(showStoppers)||$(e.target).parents(showStoppers).length){return}return ns.closeDialog()});currentDialogPr=ns.openPanel(dialog.find(".uploadcare-dialog-placeholder"),files,tab,settings);dialog.addClass("uploadcare-active");cancelLock=lockScroll($(window),dialog.css("position")==="absolute");$("html, body").addClass(openedClass);return currentDialogPr.always(function(){$("html, body").removeClass(openedClass);currentDialogPr=null;dialog.remove();return cancelLock()})};ns.openPanel=function(placeholder,files,tab,settings){var filter,panel,promise;if($.isPlainObject(tab)){settings=tab;tab=null}if(!files){files=[]}else{if(utils.isFileGroup(files)){files=files.files()}else{if(!$.isArray(files)){files=[files]}}}settings=s.build(settings);panel=new Panel(settings,placeholder,files,tab).publicPromise();filter=function(files){if(settings.multiple){return uploadcare.FileGroup(files,settings)}else{return files[0]}};promise=utils.then(panel,filter,filter);promise.reject=panel.reject;return promise};registeredTabs={};ns.registerTab=function(tabName,constructor){return registeredTabs[tabName]=constructor};ns.registerTab("file",tabs.FileTab);ns.registerTab("url",tabs.UrlTab);ns.registerTab("camera",tabs.CameraTab);ns.registerTab("facebook",tabs.RemoteTabFor("facebook"));ns.registerTab("dropbox",tabs.RemoteTabFor("dropbox"));ns.registerTab("gdrive",tabs.RemoteTabFor("gdrive"));ns.registerTab("instagram",tabs.RemoteTabFor("instagram"));ns.registerTab("flickr",tabs.RemoteTabFor("flickr"));ns.registerTab("vk",tabs.RemoteTabFor("vk"));ns.registerTab("evernote",tabs.RemoteTabFor("evernote"));ns.registerTab("box",tabs.RemoteTabFor("box"));ns.registerTab("skydrive",tabs.RemoteTabFor("skydrive"));ns.registerTab("huddle",tabs.RemoteTabFor("huddle"));ns.registerTab("welcome",tabs.StaticTabWith("welcome"));ns.registerTab("preview",function(tabPanel,tabButton,apiForTab,settings){var tabCls;tabCls=settings.multiple?tabs.PreviewTabMultiple:tabs.PreviewTab;return new tabCls(tabPanel,tabButton,apiForTab,settings)});return Panel=(function(){function Panel(settings,placeholder,files,tab){var sel,_this=this;this.settings=settings;this.switchTab=__bind(this.switchTab,this);this.__closePanel=__bind(this.__closePanel,this);this.__reject=__bind(this.__reject,this);this.__resolve=__bind(this.__resolve,this);this.addFiles=__bind(this.addFiles,this);this.dfd=$.Deferred();this.dfd.always(this.__closePanel);sel=".uploadcare-dialog-panel";this.content=$(tpl("panel"));this.panel=this.content.find(sel).add(this.content.filter(sel));this.placeholder=$(placeholder);this.placeholder.replaceWith(this.content);if(this.settings.multiple){this.panel.addClass("uploadcare-dialog-multiple")}this.files=new utils.CollectionOfPromises(files);this.files.onRemove.add(function(){if(_this.files.length()===0){return _this.__hideTab("preview")}});this.tabs={};if(this.settings.publicKey){this.__prepareTabs(tab)}else{this.__welcome()}}Panel.prototype.publicPromise=function(){var promise;promise=this.dfd.promise();promise.reject=this.__reject;return promise};Panel.prototype.addFiles=function(files,data){var file,_i,_len;if(data){files=ns.filesFrom(files,data,this.settings)}if(!this.settings.multiple){this.files.clear()}for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];this.files.add(file)}if(this.settings.previewStep){this.__showTab("preview");if(!this.settings.multiple){return this.switchTab("preview")}}else{return this.__resolve()}};Panel.prototype.apiForTab=function(tabName){var onSwitched;onSwitched=$.Callbacks();this.dfd.progress(function(name){return onSwitched.fire(name,name===tabName)});return{fileColl:this.files,onSwitched:onSwitched,addFiles:this.addFiles,done:this.__resolve,switchTab:this.switchTab,dialog:this.dfd.promise()}};Panel.prototype.__resolve=function(){return this.dfd.resolve(this.files.get())};Panel.prototype.__reject=function(){return this.dfd.reject(this.files.get())};Panel.prototype.__prepareTabs=function(tab){var tabName,_i,_len,_ref5;this.addTab("preview");_ref5=this.settings.tabs;for(_i=0,_len=_ref5.length;_i<_len;_i++){tabName=_ref5[_i];this.addTab(tabName)}if(this.files.length()){this.__showTab("preview");return this.switchTab("preview")}else{this.__hideTab("preview");return this.switchTab(tab||this.settings.tabs[0])}};Panel.prototype.__closePanel=function(){this.panel.replaceWith(this.placeholder);return this.content.remove()};Panel.prototype.addTab=function(name){var TabCls,tabButton,tabPanel,_this=this;if(name in this.tabs){return}TabCls=registeredTabs[name];if(!TabCls){throw new Error("No such tab: "+name)}tabPanel=$("<div>").addClass("uploadcare-dialog-tabs-panel").addClass("uploadcare-dialog-tabs-panel-"+name).appendTo(this.panel);tabButton=$("<div>").addClass("uploadcare-dialog-tab").addClass("uploadcare-dialog-tab-"+name).attr("title",t("dialog.tabs.names."+name)).on("click",function(){if(name===_this.currentTab){return _this.panel.toggleClass("uploadcare-dialog-opened-tabs")}else{return _this.switchTab(name)}}).appendTo(this.panel.find(".uploadcare-dialog-tabs"));return this.tabs[name]=new TabCls(tabPanel,tabButton,this.apiForTab(name),this.settings)};Panel.prototype.__addFakeTab=function(name){return $("<div>").addClass("uploadcare-dialog-tab uploadcare-dialog-tab-"+name).addClass("uploadcare-dialog-disabled-tab").attr("title",t("tabs."+name+".title")).appendTo(this.panel.find(".uploadcare-dialog-tabs"))};Panel.prototype.switchTab=function(currentTab){var className;this.currentTab=currentTab;this.panel.removeClass("uploadcare-dialog-opened-tabs");className="uploadcare-dialog-tab";this.panel.find("."+className).removeClass(""+className+"_current").filter("."+className+"-"+this.currentTab).addClass(""+className+"_current");className="uploadcare-dialog-tabs-panel";this.panel.find("."+className).removeClass(""+className+"_current").filter("."+className+"-"+this.currentTab).addClass(""+className+"_current");return this.dfd.notify(this.currentTab)};Panel.prototype.__showTab=function(tab){var className;className="uploadcare-dialog-tab";return this.panel.find("."+className+"-"+tab).removeClass(""+className+"_hidden")};Panel.prototype.__hideTab=function(tab){var className;if(this.currentTab===tab){this.switchTab(this.settings.tabs[0])}className="uploadcare-dialog-tab";return this.panel.find("."+className+"-"+tab).addClass(""+className+"_hidden")};Panel.prototype.__welcome=function(){var tabName,_i,_len,_ref5;this.addTab("welcome");_ref5=this.settings.tabs;for(_i=0,_len=_ref5.length;_i<_len;_i++){tabName=_ref5[_i];this.__addFakeTab(tabName)}return this.switchTab("welcome")};return Panel})()})}).call(this);(function(){var $,dragdrop,namespace,s,t,utils,_ref,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}};namespace=uploadcare.namespace,utils=uploadcare.utils,s=uploadcare.settings,$=uploadcare.jQuery,dragdrop=uploadcare.dragdrop,(_ref=uploadcare.locale,t=_ref.t);namespace("uploadcare.widget",function(ns){return ns.BaseWidget=(function(){function BaseWidget(element){this.reloadInfo=__bind(this.reloadInfo,this);this.__setObject=__bind(this.__setObject,this);this.__reset=__bind(this.__reset,this);var _this=this;this.element=$(element);this.settings=s.build(this.element.data());this.validators=this.settings.validators=[];this.currentObject=null;this.__onUploadComplete=$.Callbacks();this.__onChange=$.Callbacks().add(function(object){return object!=null?object.promise().done(function(info){return _this.__onUploadComplete.fire(info)}):void 0});this.__setupWidget();this.element.on("change.uploadcare",this.reloadInfo);this.__hasValue=false;setTimeout(function(){if(!_this.__hasValue){return _this.reloadInfo()}},0)}BaseWidget.prototype.__setupWidget=function(){var path,_this=this;this.template=new ns.Template(this.settings,this.element);path=["buttons.choose"];path.push(this.settings.imagesOnly?"images":"files");path.push(this.settings.multiple?"other":"one");this.template.addButton("open",t(path.join("."))).on("click",function(){return _this.openDialog()});this.template.addButton("cancel",t("buttons.cancel")).on("click",function(){return _this.__setObject(null)});if(this.settings.clearable){this.template.addButton("remove",t("buttons.remove")).on("click",function(){return _this.__setObject(null)})}this.template.content.on("click","@uploadcare-widget-file-name",function(){return _this.openDialog()});dragdrop.receiveDrop(this.template.content,this.__handleDirectSelection);return this.template.reset()};BaseWidget.prototype.__infoToValue=function(info){if(info.cdnUrlModifiers||this.settings.pathValue){return info.cdnUrl}else{return info.uuid}};BaseWidget.prototype.__reset=function(){var object;object=this.currentObject;this.currentObject=null;if(object!=null){if(typeof object.cancel==="function"){object.cancel()}}this.template.reset();return this.element.val("")};BaseWidget.prototype.__setObject=function(newFile){if(newFile!==this.currentObject){this.__reset();if(newFile){this.currentObject=newFile;this.__watchCurrentObject()}return this.__onChange.fire(this.currentObject)}};BaseWidget.prototype.__watchCurrentObject=function(){var object,_this=this;object=this.__currentFile();if(object){this.template.listen(object);return object.done(function(info){if(object===_this.__currentFile()){return _this.__onUploadingDone(info)}}).fail(function(error){if(object===_this.__currentFile()){return _this.__onUploadingFailed(error)}})}};BaseWidget.prototype.__onUploadingDone=function(info){this.element.val(this.__infoToValue(info));this.template.setFileInfo(info);return this.template.loaded()};BaseWidget.prototype.__onUploadingFailed=function(error){this.__setObject(null);return this.template.error(error)};BaseWidget.prototype.__setExternalValue=function(value){return this.__setObject(utils.valueToFile(value,this.settings))};BaseWidget.prototype.value=function(value){if(value!==void 0){this.__hasValue=true;this.__setExternalValue(value);return this}else{return this.currentObject}};BaseWidget.prototype.reloadInfo=function(){return this.value(this.element.val())};BaseWidget.prototype.openDialog=function(tab){var _this=this;if(this.settings.systemDialog){return utils.fileSelectDialog(this.template.content,this.settings,function(input){return _this.__handleDirectSelection("object",input.files)})}else{return uploadcare.openDialog(this.currentObject,tab,this.settings).done(this.__setObject)}};BaseWidget.prototype.api=function(){if(!this.__api){this.__api=utils.bindAll(this,["openDialog","reloadInfo","value","validators"]);this.__api.onChange=utils.publicCallbacks(this.__onChange);this.__api.onUploadComplete=utils.publicCallbacks(this.__onUploadComplete);this.__api.inputElement=this.element.get(0)}return this.__api};return BaseWidget})()})}).call(this);(function(){var $,files,namespace,utils,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,utils=uploadcare.utils,files=uploadcare.files,$=uploadcare.jQuery;namespace("uploadcare.widget",function(ns){var _ref;return ns.Widget=(function(_super){__extends(Widget,_super);function Widget(){this.__handleDirectSelection=__bind(this.__handleDirectSelection,this);_ref=Widget.__super__.constructor.apply(this,arguments);return _ref}Widget.prototype.__currentFile=function(){return this.currentObject};Widget.prototype.__handleDirectSelection=function(type,data){var file;file=uploadcare.fileFrom(type,data[0],this.settings);if(this.settings.systemDialog||!this.settings.previewStep){return this.__setObject(file)}else{return uploadcare.openDialog(file,this.settings).done(this.__setObject)}};return Widget})(ns.BaseWidget)})}).call(this);(function(){var $,namespace,t,utils,_ref,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key)){child[key]=parent[key]}}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};namespace=uploadcare.namespace,utils=uploadcare.utils,$=uploadcare.jQuery,(_ref=uploadcare.locale,t=_ref.t);namespace("uploadcare.widget",function(ns){var _ref1;return ns.MultipleWidget=(function(_super){__extends(MultipleWidget,_super);function MultipleWidget(){this.__handleDirectSelection=__bind(this.__handleDirectSelection,this);this.__setObject=__bind(this.__setObject,this);_ref1=MultipleWidget.__super__.constructor.apply(this,arguments);return _ref1}MultipleWidget.prototype.__currentFile=function(){var _ref2;return(_ref2=this.currentObject)!=null?_ref2.promise():void 0};MultipleWidget.prototype.__setObject=function(group){if(!utils.isFileGroupsEqual(this.currentObject,group)){return MultipleWidget.__super__.__setObject.apply(this,arguments)}};MultipleWidget.prototype.__setExternalValue=function(value){var groupPr,_this=this;this.__lastGroupPr=groupPr=utils.valueToGroup(value,this.settings);this.__reset();this.template.setStatus("started");this.template.statusText.text(t("loadingInfo"));return groupPr.done(function(group){if(_this.__lastGroupPr===groupPr){return _this.__setObject(group)}}).fail(function(){if(_this.__lastGroupPr===groupPr){return _this.template.error("createGroup")}})};MultipleWidget.prototype.__onUploadingFailed=function(error){if(error==="createGroup"){this.__setObject(null)}return this.template.error(error)};MultipleWidget.prototype.__handleDirectSelection=function(type,data){var files;files=uploadcare.filesFrom(type,data,this.settings);if(this.settings.systemDialog){return this.__setObject(uploadcare.FileGroup(files,this.settings))}else{return uploadcare.openDialog(files,this.settings).done(this.__setObject)}};return MultipleWidget})(ns.BaseWidget)})}).call(this);(function(){var $,namespace,s,utils;utils=uploadcare.utils,namespace=uploadcare.namespace,s=uploadcare.settings,$=uploadcare.jQuery;namespace("uploadcare",function(ns){var cleanup,dataAttr,getSettings,initialize,initializeWidget;dataAttr="uploadcareWidget";ns.initialize=function(container){if(container==null){container="body"}return initialize($(container).find("@uploadcare-uploader"))};getSettings=function(el){return s.build($(el).data())};initialize=function(targets){var target,widget,widgetClass,_i,_len,_results;_results=[];for(_i=0,_len=targets.length;_i<_len;_i++){target=targets[_i];widget=$(target).data(dataAttr);if(widget&&target===widget.element[0]){continue}widgetClass=getSettings(target).multiple?ns.widget.MultipleWidget:ns.widget.Widget;_results.push(initializeWidget($(target),widgetClass))}return _results};ns.Widget=function(target){var el;el=$(target).eq(0);if(!getSettings(el).multiple){return initializeWidget(el,ns.widget.Widget)}else{throw new Error("This element should be processed using MultipleWidget")}};ns.MultipleWidget=function(target){var el;el=$(target).eq(0);if(getSettings(el).multiple){return initializeWidget(el,ns.widget.MultipleWidget)}else{throw new Error("This element should be processed using Widget")}};initializeWidget=function(el,Widget){var widget;widget=el.data(dataAttr);if(!widget||el[0]!==widget.element[0]){cleanup(el);widget=new Widget(el);el.data(dataAttr,widget);widget.template.content.data(dataAttr,widget.template)}return widget.api()};cleanup=function(el){var template;el.off(".uploadcare");el=el.next(".uploadcare-widget");template=el.data(dataAttr);if(el.length&&(!template||el[0]!==template.content[0])){return el.remove()}};ns.start=function(settings){var live;live=function(){return initialize($("@uploadcare-uploader"))};if(s.common(settings).live){return setInterval(live,100)}else{return live()}};return $(function(){if(!s.globals().manualStart){return ns.start()}})})}).call(this);(function(){var $,canSubmit,cancelEvents,submitPreventionState,submittedForm;$=uploadcare.jQuery;canSubmit=function(form){var notSubmittable;notSubmittable="[data-status=started], [data-status=error]";return !form.find(".uploadcare-widget").is(notSubmittable)};submitPreventionState=function(form,prevent){form.attr("data-uploadcare-submitted",prevent);return form.find(":submit").attr("disabled",prevent)};$(document).on("submit","@uploadcare-upload-form",function(){var form;form=$(this);if(canSubmit(form)){return true}else{submitPreventionState(form,true);return false}});submittedForm="@uploadcare-upload-form[data-uploadcare-submitted]";$(document).on("loaded.uploadcare",submittedForm,function(){return $(this).submit()});cancelEvents="ready.uploadcare error.uploadcare";$(document).on(cancelEvents,submittedForm,function(){var form;form=$(this);if(canSubmit(form)){return submitPreventionState(form,false)}})}).call(this);(function(){var expose,key,__hasProp={}.hasOwnProperty;uploadcare.version="1.5.5";expose=uploadcare.expose;expose("version");expose("jQuery");expose("globals",uploadcare.settings.globals);expose("start");expose("initialize");expose("fileFrom");expose("filesFrom");expose("FileGroup");expose("loadFileGroup");expose("locales",(function(){var _ref,_results;_ref=uploadcare.locale.translations;_results=[];for(key in _ref){if(!__hasProp.call(_ref,key)){continue}_results.push(key)}return _results})());expose("openDialog");expose("closeDialog");expose("openPanel");expose("registerTab");expose("Circle",uploadcare.ui.progress.Circle);expose("Widget");expose("MultipleWidget");expose("plugin",uploadcare.utils.plugin);expose("tabsCss");expose("dragdrop.support");expose("dragdrop.receiveDrop");expose("dragdrop.uploadDrop");expose("whenReady",function(fn){return fn()})}).call(this);(function(){jQuery.noConflict(true)}).call(this)}({},"//ucarecdn.com/widget/1.5.5/uploadcare/"));