pdfjs 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +39 -2
- data/Rakefile +2 -0
- data/app/assets/images/pdfjs/annotation-check.svg +11 -0
- data/app/assets/images/pdfjs/annotation-comment.svg +16 -0
- data/app/assets/images/pdfjs/annotation-help.svg +26 -0
- data/app/assets/images/pdfjs/annotation-insert.svg +10 -0
- data/app/assets/images/pdfjs/annotation-key.svg +11 -0
- data/app/assets/images/pdfjs/annotation-newparagraph.svg +11 -0
- data/app/assets/images/pdfjs/annotation-noicon.svg +7 -0
- data/app/assets/images/pdfjs/annotation-note.svg +42 -0
- data/app/assets/images/pdfjs/annotation-paragraph.svg +16 -0
- data/app/assets/images/pdfjs/findbarButton-next-rtl.png +0 -0
- data/app/assets/images/pdfjs/findbarButton-next-rtl@2x.png +0 -0
- data/app/assets/images/pdfjs/findbarButton-next.png +0 -0
- data/app/assets/images/pdfjs/findbarButton-next@2x.png +0 -0
- data/app/assets/images/pdfjs/findbarButton-previous-rtl.png +0 -0
- data/app/assets/images/pdfjs/findbarButton-previous-rtl@2x.png +0 -0
- data/app/assets/images/pdfjs/findbarButton-previous.png +0 -0
- data/app/assets/images/pdfjs/findbarButton-previous@2x.png +0 -0
- data/app/assets/images/pdfjs/grab.cur +0 -0
- data/app/assets/images/pdfjs/grabbing.cur +0 -0
- data/app/assets/images/pdfjs/loading-icon.gif +0 -0
- data/app/assets/images/pdfjs/loading-small.png +0 -0
- data/app/assets/images/pdfjs/loading-small@2x.png +0 -0
- data/app/assets/images/pdfjs/loading.gif +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-documentProperties.png +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-documentProperties@2x.png +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-firstPage.png +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-firstPage@2x.png +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-handTool.png +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-handTool@2x.png +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-lastPage.png +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-lastPage@2x.png +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-rotateCcw.png +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-rotateCcw@2x.png +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-rotateCw.png +0 -0
- data/app/assets/images/pdfjs/secondaryToolbarButton-rotateCw@2x.png +0 -0
- data/app/assets/images/pdfjs/shadow.png +0 -0
- data/app/assets/images/pdfjs/texture.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-bookmark.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-bookmark@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-download.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-download@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-menuArrows.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-menuArrows@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-openFile.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-openFile@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-pageDown-rtl.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-pageDown-rtl@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-pageDown.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-pageDown@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-pageUp-rtl.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-pageUp-rtl@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-pageUp.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-pageUp@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-presentationMode.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-presentationMode@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-print.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-print@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-search.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-search@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-secondaryToolbarToggle-rtl.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-secondaryToolbarToggle-rtl@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-secondaryToolbarToggle.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-secondaryToolbarToggle@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-sidebarToggle-rtl.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-sidebarToggle-rtl@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-sidebarToggle.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-sidebarToggle@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-viewAttachments.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-viewAttachments@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-viewOutline-rtl.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-viewOutline-rtl@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-viewOutline.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-viewOutline@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-viewThumbnail.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-viewThumbnail@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-zoomIn.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-zoomIn@2x.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-zoomOut.png +0 -0
- data/app/assets/images/pdfjs/toolbarButton-zoomOut@2x.png +0 -0
- data/app/assets/javascripts/pdfjs.js +5 -0
- data/app/assets/javascripts/pdfjs/compatibility.js +574 -0
- data/app/assets/javascripts/pdfjs/debugger.js +620 -0
- data/app/assets/javascripts/pdfjs/l10n.js +1004 -0
- data/app/assets/javascripts/pdfjs/pdf.js +7793 -0
- data/app/assets/javascripts/pdfjs/pdf.worker.js +38661 -0
- data/app/assets/javascripts/pdfjs/viewer.js.erb +6912 -0
- data/app/assets/stylesheets/pdfjs.scss +3 -0
- data/app/assets/stylesheets/pdfjs/viewer.css.erb +1989 -0
- data/app/controllers/pdfjs/application_controller.rb +4 -0
- data/app/controllers/pdfjs/pdfjs_controller.rb +4 -0
- data/app/helpers/pdfjs/application_helper.rb +4 -0
- data/app/views/layouts/pdfjs/application.html.erb +396 -0
- data/config/routes.rb +2 -0
- data/lib/pdfjs.rb +2 -1
- data/lib/pdfjs/engine.rb +9 -0
- data/lib/pdfjs/version.rb +1 -1
- data/test/controllers/pdfjs_controller_test.rb +7 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/pdfjs/annotation-check.svg +11 -0
- data/test/dummy/app/assets/images/pdfjs/annotation-comment.svg +16 -0
- data/test/dummy/app/assets/images/pdfjs/annotation-help.svg +26 -0
- data/test/dummy/app/assets/images/pdfjs/annotation-insert.svg +10 -0
- data/test/dummy/app/assets/images/pdfjs/annotation-key.svg +11 -0
- data/test/dummy/app/assets/images/pdfjs/annotation-newparagraph.svg +11 -0
- data/test/dummy/app/assets/images/pdfjs/annotation-noicon.svg +7 -0
- data/test/dummy/app/assets/images/pdfjs/annotation-note.svg +42 -0
- data/test/dummy/app/assets/images/pdfjs/annotation-paragraph.svg +16 -0
- data/test/dummy/app/assets/images/pdfjs/findbarButton-next-rtl.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/findbarButton-next-rtl@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/findbarButton-next.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/findbarButton-next@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/findbarButton-previous-rtl.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/findbarButton-previous-rtl@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/findbarButton-previous.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/findbarButton-previous@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/grab.cur +0 -0
- data/test/dummy/app/assets/images/pdfjs/grabbing.cur +0 -0
- data/test/dummy/app/assets/images/pdfjs/loading-icon.gif +0 -0
- data/test/dummy/app/assets/images/pdfjs/loading-small.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/loading-small@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/loading.gif +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-documentProperties.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-documentProperties@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-firstPage.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-firstPage@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-handTool.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-handTool@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-lastPage.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-lastPage@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-rotateCcw.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-rotateCcw@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-rotateCw.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/secondaryToolbarButton-rotateCw@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/shadow.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/texture.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-bookmark.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-bookmark@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-download.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-download@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-menuArrows.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-menuArrows@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-openFile.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-openFile@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-pageDown-rtl.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-pageDown-rtl@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-pageDown.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-pageDown@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-pageUp-rtl.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-pageUp-rtl@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-pageUp.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-pageUp@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-presentationMode.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-presentationMode@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-print.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-print@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-search.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-search@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-secondaryToolbarToggle-rtl.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-secondaryToolbarToggle-rtl@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-secondaryToolbarToggle.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-secondaryToolbarToggle@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-sidebarToggle-rtl.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-sidebarToggle-rtl@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-sidebarToggle.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-sidebarToggle@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-viewAttachments.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-viewAttachments@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-viewOutline-rtl.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-viewOutline-rtl@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-viewOutline.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-viewOutline@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-viewThumbnail.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-viewThumbnail@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-zoomIn.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-zoomIn@2x.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-zoomOut.png +0 -0
- data/test/dummy/app/assets/images/pdfjs/toolbarButton-zoomOut@2x.png +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/javascripts/pdfjs.js +5 -0
- data/test/dummy/app/assets/javascripts/pdfjs/compatibility.js +574 -0
- data/test/dummy/app/assets/javascripts/pdfjs/debugger.js +620 -0
- data/test/dummy/app/assets/javascripts/pdfjs/l10n.js +1004 -0
- data/test/dummy/app/assets/javascripts/pdfjs/pdf.js +7793 -0
- data/test/dummy/app/assets/javascripts/pdfjs/pdf.worker.js +38661 -0
- data/test/dummy/app/assets/javascripts/pdfjs/viewer.js.erb +6912 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/assets/stylesheets/pdfjs.scss +3 -0
- data/test/dummy/app/assets/stylesheets/pdfjs/viewer.css.erb +1989 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/pdfjs/application_controller.rb +4 -0
- data/test/dummy/app/controllers/pdfjs/pdfjs_controller.rb +4 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/pdfjs/application_helper.rb +4 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/pdfjs/application.html.erb +396 -0
- data/test/dummy/app/views/pdfjs/pdfjs/show.html.erb +5 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +78 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +8 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +60 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/test_helper.rb +4 -2
- metadata +362 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2765b889452a98d546c75917afe21fcad707d788
|
4
|
+
data.tar.gz: efe7bd7e443475b241e7cd15ea80efcaf414b066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc138b08705ea194c53688dc76a02b79a2ff6e477d9545dad8e12b2e16acf7bb068e5b96c9e662e703f44c2dcae84c5868db5d5e3c8379c67768a41dbbf7be4e
|
7
|
+
data.tar.gz: 67318c83c9a8bbdd3ab097e34d6eb3e497ae68ca82e7f610eaf3649b5a46ff8e8268b1b204e4c64fef840ca4b9b7c4f43ca0fdac3b497c373f5dd683535998ec
|
data/README.rdoc
CHANGED
@@ -1,3 +1,40 @@
|
|
1
|
-
=
|
1
|
+
[![Build Status](https://travis-ci.org/mohanraj-ramanujam/pdfjs.svg?branch=master)](https://travis-ci.org/mohanraj-ramanujam/pdfjs)
|
2
2
|
|
3
|
-
|
3
|
+
### PDFJS Information
|
4
|
+
|
5
|
+
PDFJS is a RAILS ENGINE plugin for integrating the PDFJS into the RAILS applications.
|
6
|
+
|
7
|
+
* Is a RAILS ENGINE;
|
8
|
+
* Is composing of PDFJS images, javascripts and stylesheets;
|
9
|
+
* Is contains PDFJS HTML layout;
|
10
|
+
|
11
|
+
### How To Integrate with RAILS application
|
12
|
+
|
13
|
+
* Create a separate controller inherited from Pdfjs::PdfjsController
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
class PDFController < PdfjsController
|
17
|
+
end
|
18
|
+
```
|
19
|
+
* Define your action. EX: show.
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
class PDFController < PdfjsController
|
23
|
+
def show
|
24
|
+
@pdfjs_file = 'http://yoursite.com/pdfjs.pdf'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
```
|
28
|
+
* Create the show template and set the PDF file path
|
29
|
+
|
30
|
+
```html
|
31
|
+
<%= content_for :pdfjs do %>
|
32
|
+
<%= javascript_tag do %>
|
33
|
+
window.DEFAULT_URL = '<%= @pdfjs_file.html_safe %>';
|
34
|
+
<% end %>
|
35
|
+
<% end %>
|
36
|
+
```
|
37
|
+
|
38
|
+
### Example applications
|
39
|
+
|
40
|
+
* https://github.com/mohanraj-ramanujam/pdfjs
|
data/Rakefile
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
4
|
+
width="40"
|
5
|
+
height="40"
|
6
|
+
viewBox="0 0 40 40">
|
7
|
+
<path
|
8
|
+
d="M 1.5006714,23.536225 6.8925879,18.994244 14.585721,26.037937 34.019683,4.5410479 38.499329,9.2235032 14.585721,35.458952 z"
|
9
|
+
id="path4"
|
10
|
+
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:1.25402856;stroke-opacity:1" />
|
11
|
+
</svg>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
4
|
+
height="40"
|
5
|
+
width="40"
|
6
|
+
viewBox="0 0 40 40">
|
7
|
+
<rect
|
8
|
+
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
9
|
+
width="33.76017"
|
10
|
+
height="33.76017"
|
11
|
+
x="3.119915"
|
12
|
+
y="3.119915" />
|
13
|
+
<path
|
14
|
+
d="m 20.677967,8.54499 c -7.342801,0 -13.295293,4.954293 -13.295293,11.065751 0,2.088793 0.3647173,3.484376 1.575539,5.150563 L 6.0267418,31.45501 13.560595,29.011117 c 2.221262,1.387962 4.125932,1.665377 7.117372,1.665377 7.3428,0 13.295291,-4.954295 13.295291,-11.065753 0,-6.111458 -5.952491,-11.065751 -13.295291,-11.065751 z"
|
15
|
+
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.93031836;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
16
|
+
</svg>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
4
|
+
width="40"
|
5
|
+
height="40"
|
6
|
+
viewBox="0 0 40 40">
|
7
|
+
<g
|
8
|
+
transform="translate(0,-60)"
|
9
|
+
id="layer1">
|
10
|
+
<rect
|
11
|
+
width="36.460953"
|
12
|
+
height="34.805603"
|
13
|
+
x="1.7695236"
|
14
|
+
y="62.597198"
|
15
|
+
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.30826771;stroke-opacity:1" />
|
16
|
+
<g
|
17
|
+
transform="matrix(0.88763677,0,0,0.88763677,2.2472646,8.9890584)">
|
18
|
+
<path
|
19
|
+
d="M 20,64.526342 C 11.454135,64.526342 4.5263421,71.454135 4.5263421,80 4.5263421,88.545865 11.454135,95.473658 20,95.473658 28.545865,95.473658 35.473658,88.545865 35.473658,80 35.473658,71.454135 28.545865,64.526342 20,64.526342 z m -0.408738,9.488564 c 3.527079,0 6.393832,2.84061 6.393832,6.335441 0,3.494831 -2.866753,6.335441 -6.393832,6.335441 -3.527079,0 -6.393832,-2.84061 -6.393832,-6.335441 0,-3.494831 2.866753,-6.335441 6.393832,-6.335441 z"
|
20
|
+
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.02768445;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
21
|
+
<path
|
22
|
+
d="m 7.2335209,71.819938 4.9702591,4.161823 c -1.679956,2.581606 -1.443939,6.069592 0.159325,8.677725 l -5.1263071,3.424463 c 0.67516,1.231452 3.0166401,3.547686 4.2331971,4.194757 l 3.907728,-4.567277 c 2.541952,1.45975 5.730694,1.392161 8.438683,-0.12614 l 3.469517,6.108336 c 1.129779,-0.44367 4.742234,-3.449633 5.416358,-5.003859 l -5.46204,-4.415541 c 1.44319,-2.424098 1.651175,-5.267515 0.557303,-7.748623 l 5.903195,-3.833951 C 33.14257,71.704996 30.616217,69.018606 29.02952,67.99296 l -4.118813,4.981678 C 22.411934,71.205099 18.900853,70.937534 16.041319,72.32916 l -3.595408,-5.322091 c -1.345962,0.579488 -4.1293881,2.921233 -5.2123901,4.812869 z m 8.1010311,3.426672 c 2.75284,-2.446266 6.769149,-2.144694 9.048998,0.420874 2.279848,2.56557 2.113919,6.596919 -0.638924,9.043185 -2.752841,2.446267 -6.775754,2.13726 -9.055604,-0.428308 -2.279851,-2.565568 -2.107313,-6.589485 0.64553,-9.035751 z"
|
23
|
+
style="fill:#000000;fill-opacity:1;stroke:none" />
|
24
|
+
</g>
|
25
|
+
</g>
|
26
|
+
</svg>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
4
|
+
width="64"
|
5
|
+
height="64"
|
6
|
+
viewBox="0 0 64 64">
|
7
|
+
<path
|
8
|
+
d="M 32.003143,1.4044602 57.432701,62.632577 6.5672991,62.627924 z"
|
9
|
+
style="fill:#ffff00;fill-opacity:0.94117647;fill-rule:nonzero;stroke:#000000;stroke-width:1.00493038;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
10
|
+
</svg>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
4
|
+
width="64"
|
5
|
+
height="64"
|
6
|
+
viewBox="0 0 64 64">
|
7
|
+
<path
|
8
|
+
d="M 25.470843,9.4933766 C 25.30219,12.141818 30.139101,14.445969 34.704831,13.529144 40.62635,12.541995 41.398833,7.3856498 35.97505,5.777863 31.400921,4.1549155 25.157674,6.5445892 25.470843,9.4933766 z M 4.5246282,17.652051 C 4.068249,11.832873 9.2742983,5.9270407 18.437379,3.0977088 29.751911,-0.87185184 45.495663,1.4008022 53.603953,7.1104009 c 9.275765,6.1889221 7.158128,16.2079421 -3.171076,21.5939521 -1.784316,1.635815 -6.380222,1.21421 -7.068351,3.186186 -1.04003,0.972427 -1.288046,2.050158 -1.232864,3.168203 1.015111,2.000108 -3.831548,1.633216 -3.270553,3.759574 0.589477,5.264544 -0.179276,10.53738 -0.362842,15.806257 -0.492006,2.184998 1.163456,4.574232 -0.734888,6.610642 -2.482919,2.325184 -7.30604,2.189143 -9.193497,-0.274767 -2.733688,-1.740626 -8.254447,-3.615254 -6.104247,-6.339626 3.468112,-1.708686 -2.116197,-3.449897 0.431242,-5.080274 5.058402,-1.39256 -2.393215,-2.304318 -0.146889,-4.334645 3.069198,-0.977415 2.056986,-2.518352 -0.219121,-3.540397 1.876567,-1.807151 1.484149,-4.868919 -2.565455,-5.942205 0.150866,-1.805474 2.905737,-4.136876 -1.679967,-5.20493 C 10.260902,27.882167 4.6872697,22.95045 4.5245945,17.652051 z"
|
9
|
+
id="path604"
|
10
|
+
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:1.72665179;stroke-opacity:1" />
|
11
|
+
</svg>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
4
|
+
width="64"
|
5
|
+
height="64"
|
6
|
+
viewBox="0 0 64 64">
|
7
|
+
<path
|
8
|
+
d="M 32.003143,10.913072 57.432701,53.086929 6.567299,53.083723 z"
|
9
|
+
id="path2985"
|
10
|
+
style="fill:#ffff00;fill-opacity:0.94117647;fill-rule:nonzero;stroke:#000000;stroke-width:0.83403099;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
11
|
+
</svg>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
4
|
+
width="40"
|
5
|
+
height="40"
|
6
|
+
viewBox="0 0 40 40">
|
7
|
+
<rect
|
8
|
+
width="36.075428"
|
9
|
+
height="31.096582"
|
10
|
+
x="1.962286"
|
11
|
+
y="4.4517088"
|
12
|
+
id="rect4"
|
13
|
+
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.23004246;stroke-opacity:1" />
|
14
|
+
<rect
|
15
|
+
width="27.96859"
|
16
|
+
height="1.5012145"
|
17
|
+
x="6.0157046"
|
18
|
+
y="10.285"
|
19
|
+
id="rect6"
|
20
|
+
style="fill:#000000;fill-opacity:1;stroke:none" />
|
21
|
+
<rect
|
22
|
+
width="27.96859"
|
23
|
+
height="0.85783684"
|
24
|
+
x="6.0157056"
|
25
|
+
y="23.21689"
|
26
|
+
id="rect8"
|
27
|
+
style="fill:#000000;fill-opacity:1;stroke:none" />
|
28
|
+
<rect
|
29
|
+
width="27.96859"
|
30
|
+
height="0.85783684"
|
31
|
+
x="5.8130345"
|
32
|
+
y="28.964394"
|
33
|
+
id="rect10"
|
34
|
+
style="fill:#000000;fill-opacity:1;stroke:none" />
|
35
|
+
<rect
|
36
|
+
width="27.96859"
|
37
|
+
height="0.85783684"
|
38
|
+
x="6.0157046"
|
39
|
+
y="17.426493"
|
40
|
+
id="rect12"
|
41
|
+
style="fill:#000000;fill-opacity:1;stroke:none" />
|
42
|
+
</svg>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
4
|
+
width="40"
|
5
|
+
height="40"
|
6
|
+
viewBox="0 0 40 40">
|
7
|
+
<rect
|
8
|
+
width="33.76017"
|
9
|
+
height="33.76017"
|
10
|
+
x="3.119915"
|
11
|
+
y="3.119915"
|
12
|
+
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
13
|
+
<path
|
14
|
+
d="m 17.692678,34.50206 0,-16.182224 c -1.930515,-0.103225 -3.455824,-0.730383 -4.57593,-1.881473 -1.12011,-1.151067 -1.680164,-2.619596 -1.680164,-4.405591 0,-1.992435 0.621995,-3.5796849 1.865988,-4.7617553 1.243989,-1.1820288 3.06352,-1.7730536 5.458598,-1.7730764 l 9.802246,0 0,2.6789711 -2.229895,0 0,26.3251486 -2.632515,0 0,-26.3251486 -3.45324,0 0,26.3251486 z"
|
15
|
+
style="font-size:29.42051125px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.07795751;stroke-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" />
|
16
|
+
</svg>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,574 @@
|
|
1
|
+
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2
|
+
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
3
|
+
/* Copyright 2012 Mozilla Foundation
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*/
|
17
|
+
/* globals VBArray, PDFJS */
|
18
|
+
|
19
|
+
'use strict';
|
20
|
+
|
21
|
+
// Initializing PDFJS global object here, it case if we need to change/disable
|
22
|
+
// some PDF.js features, e.g. range requests
|
23
|
+
if (typeof PDFJS === 'undefined') {
|
24
|
+
(typeof window !== 'undefined' ? window : this).PDFJS = {};
|
25
|
+
}
|
26
|
+
|
27
|
+
// Checking if the typed arrays are supported
|
28
|
+
// Support: iOS<6.0 (subarray), IE<10, Android<4.0
|
29
|
+
(function checkTypedArrayCompatibility() {
|
30
|
+
if (typeof Uint8Array !== 'undefined') {
|
31
|
+
// Support: iOS<6.0
|
32
|
+
if (typeof Uint8Array.prototype.subarray === 'undefined') {
|
33
|
+
Uint8Array.prototype.subarray = function subarray(start, end) {
|
34
|
+
return new Uint8Array(this.slice(start, end));
|
35
|
+
};
|
36
|
+
Float32Array.prototype.subarray = function subarray(start, end) {
|
37
|
+
return new Float32Array(this.slice(start, end));
|
38
|
+
};
|
39
|
+
}
|
40
|
+
|
41
|
+
// Support: Android<4.1
|
42
|
+
if (typeof Float64Array === 'undefined') {
|
43
|
+
window.Float64Array = Float32Array;
|
44
|
+
}
|
45
|
+
return;
|
46
|
+
}
|
47
|
+
|
48
|
+
function subarray(start, end) {
|
49
|
+
return new TypedArray(this.slice(start, end));
|
50
|
+
}
|
51
|
+
|
52
|
+
function setArrayOffset(array, offset) {
|
53
|
+
if (arguments.length < 2) {
|
54
|
+
offset = 0;
|
55
|
+
}
|
56
|
+
for (var i = 0, n = array.length; i < n; ++i, ++offset) {
|
57
|
+
this[offset] = array[i] & 0xFF;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
function TypedArray(arg1) {
|
62
|
+
var result, i, n;
|
63
|
+
if (typeof arg1 === 'number') {
|
64
|
+
result = [];
|
65
|
+
for (i = 0; i < arg1; ++i) {
|
66
|
+
result[i] = 0;
|
67
|
+
}
|
68
|
+
} else if ('slice' in arg1) {
|
69
|
+
result = arg1.slice(0);
|
70
|
+
} else {
|
71
|
+
result = [];
|
72
|
+
for (i = 0, n = arg1.length; i < n; ++i) {
|
73
|
+
result[i] = arg1[i];
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
result.subarray = subarray;
|
78
|
+
result.buffer = result;
|
79
|
+
result.byteLength = result.length;
|
80
|
+
result.set = setArrayOffset;
|
81
|
+
|
82
|
+
if (typeof arg1 === 'object' && arg1.buffer) {
|
83
|
+
result.buffer = arg1.buffer;
|
84
|
+
}
|
85
|
+
return result;
|
86
|
+
}
|
87
|
+
|
88
|
+
window.Uint8Array = TypedArray;
|
89
|
+
window.Int8Array = TypedArray;
|
90
|
+
|
91
|
+
// we don't need support for set, byteLength for 32-bit array
|
92
|
+
// so we can use the TypedArray as well
|
93
|
+
window.Uint32Array = TypedArray;
|
94
|
+
window.Int32Array = TypedArray;
|
95
|
+
window.Uint16Array = TypedArray;
|
96
|
+
window.Float32Array = TypedArray;
|
97
|
+
window.Float64Array = TypedArray;
|
98
|
+
})();
|
99
|
+
|
100
|
+
// URL = URL || webkitURL
|
101
|
+
// Support: Safari<7, Android 4.2+
|
102
|
+
(function normalizeURLObject() {
|
103
|
+
if (!window.URL) {
|
104
|
+
window.URL = window.webkitURL;
|
105
|
+
}
|
106
|
+
})();
|
107
|
+
|
108
|
+
// Object.defineProperty()?
|
109
|
+
// Support: Android<4.0, Safari<5.1
|
110
|
+
(function checkObjectDefinePropertyCompatibility() {
|
111
|
+
if (typeof Object.defineProperty !== 'undefined') {
|
112
|
+
var definePropertyPossible = true;
|
113
|
+
try {
|
114
|
+
// some browsers (e.g. safari) cannot use defineProperty() on DOM objects
|
115
|
+
// and thus the native version is not sufficient
|
116
|
+
Object.defineProperty(new Image(), 'id', { value: 'test' });
|
117
|
+
// ... another test for android gb browser for non-DOM objects
|
118
|
+
var Test = function Test() {};
|
119
|
+
Test.prototype = { get id() { } };
|
120
|
+
Object.defineProperty(new Test(), 'id',
|
121
|
+
{ value: '', configurable: true, enumerable: true, writable: false });
|
122
|
+
} catch (e) {
|
123
|
+
definePropertyPossible = false;
|
124
|
+
}
|
125
|
+
if (definePropertyPossible) {
|
126
|
+
return;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
|
130
|
+
Object.defineProperty = function objectDefineProperty(obj, name, def) {
|
131
|
+
delete obj[name];
|
132
|
+
if ('get' in def) {
|
133
|
+
obj.__defineGetter__(name, def['get']);
|
134
|
+
}
|
135
|
+
if ('set' in def) {
|
136
|
+
obj.__defineSetter__(name, def['set']);
|
137
|
+
}
|
138
|
+
if ('value' in def) {
|
139
|
+
obj.__defineSetter__(name, function objectDefinePropertySetter(value) {
|
140
|
+
this.__defineGetter__(name, function objectDefinePropertyGetter() {
|
141
|
+
return value;
|
142
|
+
});
|
143
|
+
return value;
|
144
|
+
});
|
145
|
+
obj[name] = def.value;
|
146
|
+
}
|
147
|
+
};
|
148
|
+
})();
|
149
|
+
|
150
|
+
|
151
|
+
// No XMLHttpRequest#response?
|
152
|
+
// Support: IE<11, Android <4.0
|
153
|
+
(function checkXMLHttpRequestResponseCompatibility() {
|
154
|
+
var xhrPrototype = XMLHttpRequest.prototype;
|
155
|
+
var xhr = new XMLHttpRequest();
|
156
|
+
if (!('overrideMimeType' in xhr)) {
|
157
|
+
// IE10 might have response, but not overrideMimeType
|
158
|
+
// Support: IE10
|
159
|
+
Object.defineProperty(xhrPrototype, 'overrideMimeType', {
|
160
|
+
value: function xmlHttpRequestOverrideMimeType(mimeType) {}
|
161
|
+
});
|
162
|
+
}
|
163
|
+
if ('responseType' in xhr) {
|
164
|
+
return;
|
165
|
+
}
|
166
|
+
|
167
|
+
// The worker will be using XHR, so we can save time and disable worker.
|
168
|
+
PDFJS.disableWorker = true;
|
169
|
+
|
170
|
+
Object.defineProperty(xhrPrototype, 'responseType', {
|
171
|
+
get: function xmlHttpRequestGetResponseType() {
|
172
|
+
return this._responseType || 'text';
|
173
|
+
},
|
174
|
+
set: function xmlHttpRequestSetResponseType(value) {
|
175
|
+
if (value === 'text' || value === 'arraybuffer') {
|
176
|
+
this._responseType = value;
|
177
|
+
if (value === 'arraybuffer' &&
|
178
|
+
typeof this.overrideMimeType === 'function') {
|
179
|
+
this.overrideMimeType('text/plain; charset=x-user-defined');
|
180
|
+
}
|
181
|
+
}
|
182
|
+
}
|
183
|
+
});
|
184
|
+
|
185
|
+
// Support: IE9
|
186
|
+
if (typeof VBArray !== 'undefined') {
|
187
|
+
Object.defineProperty(xhrPrototype, 'response', {
|
188
|
+
get: function xmlHttpRequestResponseGet() {
|
189
|
+
if (this.responseType === 'arraybuffer') {
|
190
|
+
return new Uint8Array(new VBArray(this.responseBody).toArray());
|
191
|
+
} else {
|
192
|
+
return this.responseText;
|
193
|
+
}
|
194
|
+
}
|
195
|
+
});
|
196
|
+
return;
|
197
|
+
}
|
198
|
+
|
199
|
+
Object.defineProperty(xhrPrototype, 'response', {
|
200
|
+
get: function xmlHttpRequestResponseGet() {
|
201
|
+
if (this.responseType !== 'arraybuffer') {
|
202
|
+
return this.responseText;
|
203
|
+
}
|
204
|
+
var text = this.responseText;
|
205
|
+
var i, n = text.length;
|
206
|
+
var result = new Uint8Array(n);
|
207
|
+
for (i = 0; i < n; ++i) {
|
208
|
+
result[i] = text.charCodeAt(i) & 0xFF;
|
209
|
+
}
|
210
|
+
return result.buffer;
|
211
|
+
}
|
212
|
+
});
|
213
|
+
})();
|
214
|
+
|
215
|
+
// window.btoa (base64 encode function) ?
|
216
|
+
// Support: IE<10
|
217
|
+
(function checkWindowBtoaCompatibility() {
|
218
|
+
if ('btoa' in window) {
|
219
|
+
return;
|
220
|
+
}
|
221
|
+
|
222
|
+
var digits =
|
223
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
224
|
+
|
225
|
+
window.btoa = function windowBtoa(chars) {
|
226
|
+
var buffer = '';
|
227
|
+
var i, n;
|
228
|
+
for (i = 0, n = chars.length; i < n; i += 3) {
|
229
|
+
var b1 = chars.charCodeAt(i) & 0xFF;
|
230
|
+
var b2 = chars.charCodeAt(i + 1) & 0xFF;
|
231
|
+
var b3 = chars.charCodeAt(i + 2) & 0xFF;
|
232
|
+
var d1 = b1 >> 2, d2 = ((b1 & 3) << 4) | (b2 >> 4);
|
233
|
+
var d3 = i + 1 < n ? ((b2 & 0xF) << 2) | (b3 >> 6) : 64;
|
234
|
+
var d4 = i + 2 < n ? (b3 & 0x3F) : 64;
|
235
|
+
buffer += (digits.charAt(d1) + digits.charAt(d2) +
|
236
|
+
digits.charAt(d3) + digits.charAt(d4));
|
237
|
+
}
|
238
|
+
return buffer;
|
239
|
+
};
|
240
|
+
})();
|
241
|
+
|
242
|
+
// window.atob (base64 encode function)?
|
243
|
+
// Support: IE<10
|
244
|
+
(function checkWindowAtobCompatibility() {
|
245
|
+
if ('atob' in window) {
|
246
|
+
return;
|
247
|
+
}
|
248
|
+
|
249
|
+
// https://github.com/davidchambers/Base64.js
|
250
|
+
var digits =
|
251
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
252
|
+
window.atob = function (input) {
|
253
|
+
input = input.replace(/=+$/, '');
|
254
|
+
if (input.length % 4 === 1) {
|
255
|
+
throw new Error('bad atob input');
|
256
|
+
}
|
257
|
+
for (
|
258
|
+
// initialize result and counters
|
259
|
+
var bc = 0, bs, buffer, idx = 0, output = '';
|
260
|
+
// get next character
|
261
|
+
buffer = input.charAt(idx++);
|
262
|
+
// character found in table?
|
263
|
+
// initialize bit storage and add its ascii value
|
264
|
+
~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,
|
265
|
+
// and if not first of each 4 characters,
|
266
|
+
// convert the first 8 bits to one ascii character
|
267
|
+
bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0
|
268
|
+
) {
|
269
|
+
// try to find character in table (0-63, not found => -1)
|
270
|
+
buffer = digits.indexOf(buffer);
|
271
|
+
}
|
272
|
+
return output;
|
273
|
+
};
|
274
|
+
})();
|
275
|
+
|
276
|
+
// Function.prototype.bind?
|
277
|
+
// Support: Android<4.0, iOS<6.0
|
278
|
+
(function checkFunctionPrototypeBindCompatibility() {
|
279
|
+
if (typeof Function.prototype.bind !== 'undefined') {
|
280
|
+
return;
|
281
|
+
}
|
282
|
+
|
283
|
+
Function.prototype.bind = function functionPrototypeBind(obj) {
|
284
|
+
var fn = this, headArgs = Array.prototype.slice.call(arguments, 1);
|
285
|
+
var bound = function functionPrototypeBindBound() {
|
286
|
+
var args = headArgs.concat(Array.prototype.slice.call(arguments));
|
287
|
+
return fn.apply(obj, args);
|
288
|
+
};
|
289
|
+
return bound;
|
290
|
+
};
|
291
|
+
})();
|
292
|
+
|
293
|
+
// HTMLElement dataset property
|
294
|
+
// Support: IE<11, Safari<5.1, Android<4.0
|
295
|
+
(function checkDatasetProperty() {
|
296
|
+
var div = document.createElement('div');
|
297
|
+
if ('dataset' in div) {
|
298
|
+
return; // dataset property exists
|
299
|
+
}
|
300
|
+
|
301
|
+
Object.defineProperty(HTMLElement.prototype, 'dataset', {
|
302
|
+
get: function() {
|
303
|
+
if (this._dataset) {
|
304
|
+
return this._dataset;
|
305
|
+
}
|
306
|
+
|
307
|
+
var dataset = {};
|
308
|
+
for (var j = 0, jj = this.attributes.length; j < jj; j++) {
|
309
|
+
var attribute = this.attributes[j];
|
310
|
+
if (attribute.name.substring(0, 5) !== 'data-') {
|
311
|
+
continue;
|
312
|
+
}
|
313
|
+
var key = attribute.name.substring(5).replace(/\-([a-z])/g,
|
314
|
+
function(all, ch) {
|
315
|
+
return ch.toUpperCase();
|
316
|
+
});
|
317
|
+
dataset[key] = attribute.value;
|
318
|
+
}
|
319
|
+
|
320
|
+
Object.defineProperty(this, '_dataset', {
|
321
|
+
value: dataset,
|
322
|
+
writable: false,
|
323
|
+
enumerable: false
|
324
|
+
});
|
325
|
+
return dataset;
|
326
|
+
},
|
327
|
+
enumerable: true
|
328
|
+
});
|
329
|
+
})();
|
330
|
+
|
331
|
+
// HTMLElement classList property
|
332
|
+
// Support: IE<10, Android<4.0, iOS<5.0
|
333
|
+
(function checkClassListProperty() {
|
334
|
+
var div = document.createElement('div');
|
335
|
+
if ('classList' in div) {
|
336
|
+
return; // classList property exists
|
337
|
+
}
|
338
|
+
|
339
|
+
function changeList(element, itemName, add, remove) {
|
340
|
+
var s = element.className || '';
|
341
|
+
var list = s.split(/\s+/g);
|
342
|
+
if (list[0] === '') {
|
343
|
+
list.shift();
|
344
|
+
}
|
345
|
+
var index = list.indexOf(itemName);
|
346
|
+
if (index < 0 && add) {
|
347
|
+
list.push(itemName);
|
348
|
+
}
|
349
|
+
if (index >= 0 && remove) {
|
350
|
+
list.splice(index, 1);
|
351
|
+
}
|
352
|
+
element.className = list.join(' ');
|
353
|
+
return (index >= 0);
|
354
|
+
}
|
355
|
+
|
356
|
+
var classListPrototype = {
|
357
|
+
add: function(name) {
|
358
|
+
changeList(this.element, name, true, false);
|
359
|
+
},
|
360
|
+
contains: function(name) {
|
361
|
+
return changeList(this.element, name, false, false);
|
362
|
+
},
|
363
|
+
remove: function(name) {
|
364
|
+
changeList(this.element, name, false, true);
|
365
|
+
},
|
366
|
+
toggle: function(name) {
|
367
|
+
changeList(this.element, name, true, true);
|
368
|
+
}
|
369
|
+
};
|
370
|
+
|
371
|
+
Object.defineProperty(HTMLElement.prototype, 'classList', {
|
372
|
+
get: function() {
|
373
|
+
if (this._classList) {
|
374
|
+
return this._classList;
|
375
|
+
}
|
376
|
+
|
377
|
+
var classList = Object.create(classListPrototype, {
|
378
|
+
element: {
|
379
|
+
value: this,
|
380
|
+
writable: false,
|
381
|
+
enumerable: true
|
382
|
+
}
|
383
|
+
});
|
384
|
+
Object.defineProperty(this, '_classList', {
|
385
|
+
value: classList,
|
386
|
+
writable: false,
|
387
|
+
enumerable: false
|
388
|
+
});
|
389
|
+
return classList;
|
390
|
+
},
|
391
|
+
enumerable: true
|
392
|
+
});
|
393
|
+
})();
|
394
|
+
|
395
|
+
// Check console compatibility
|
396
|
+
// In older IE versions the console object is not available
|
397
|
+
// unless console is open.
|
398
|
+
// Support: IE<10
|
399
|
+
(function checkConsoleCompatibility() {
|
400
|
+
if (!('console' in window)) {
|
401
|
+
window.console = {
|
402
|
+
log: function() {},
|
403
|
+
error: function() {},
|
404
|
+
warn: function() {}
|
405
|
+
};
|
406
|
+
} else if (!('bind' in console.log)) {
|
407
|
+
// native functions in IE9 might not have bind
|
408
|
+
console.log = (function(fn) {
|
409
|
+
return function(msg) { return fn(msg); };
|
410
|
+
})(console.log);
|
411
|
+
console.error = (function(fn) {
|
412
|
+
return function(msg) { return fn(msg); };
|
413
|
+
})(console.error);
|
414
|
+
console.warn = (function(fn) {
|
415
|
+
return function(msg) { return fn(msg); };
|
416
|
+
})(console.warn);
|
417
|
+
}
|
418
|
+
})();
|
419
|
+
|
420
|
+
// Check onclick compatibility in Opera
|
421
|
+
// Support: Opera<15
|
422
|
+
(function checkOnClickCompatibility() {
|
423
|
+
// workaround for reported Opera bug DSK-354448:
|
424
|
+
// onclick fires on disabled buttons with opaque content
|
425
|
+
function ignoreIfTargetDisabled(event) {
|
426
|
+
if (isDisabled(event.target)) {
|
427
|
+
event.stopPropagation();
|
428
|
+
}
|
429
|
+
}
|
430
|
+
function isDisabled(node) {
|
431
|
+
return node.disabled || (node.parentNode && isDisabled(node.parentNode));
|
432
|
+
}
|
433
|
+
if (navigator.userAgent.indexOf('Opera') !== -1) {
|
434
|
+
// use browser detection since we cannot feature-check this bug
|
435
|
+
document.addEventListener('click', ignoreIfTargetDisabled, true);
|
436
|
+
}
|
437
|
+
})();
|
438
|
+
|
439
|
+
// Checks if possible to use URL.createObjectURL()
|
440
|
+
// Support: IE
|
441
|
+
(function checkOnBlobSupport() {
|
442
|
+
// sometimes IE loosing the data created with createObjectURL(), see #3977
|
443
|
+
if (navigator.userAgent.indexOf('Trident') >= 0) {
|
444
|
+
PDFJS.disableCreateObjectURL = true;
|
445
|
+
}
|
446
|
+
})();
|
447
|
+
|
448
|
+
// Checks if navigator.language is supported
|
449
|
+
(function checkNavigatorLanguage() {
|
450
|
+
if ('language' in navigator &&
|
451
|
+
/^[a-z]+(-[A-Z]+)?$/.test(navigator.language)) {
|
452
|
+
return;
|
453
|
+
}
|
454
|
+
function formatLocale(locale) {
|
455
|
+
var split = locale.split(/[-_]/);
|
456
|
+
split[0] = split[0].toLowerCase();
|
457
|
+
if (split.length > 1) {
|
458
|
+
split[1] = split[1].toUpperCase();
|
459
|
+
}
|
460
|
+
return split.join('-');
|
461
|
+
}
|
462
|
+
var language = navigator.language || navigator.userLanguage || 'en-US';
|
463
|
+
PDFJS.locale = formatLocale(language);
|
464
|
+
})();
|
465
|
+
|
466
|
+
(function checkRangeRequests() {
|
467
|
+
// Safari has issues with cached range requests see:
|
468
|
+
// https://github.com/mozilla/pdf.js/issues/3260
|
469
|
+
// Last tested with version 6.0.4.
|
470
|
+
// Support: Safari 6.0+
|
471
|
+
var isSafari = Object.prototype.toString.call(
|
472
|
+
window.HTMLElement).indexOf('Constructor') > 0;
|
473
|
+
|
474
|
+
// Older versions of Android (pre 3.0) has issues with range requests, see:
|
475
|
+
// https://github.com/mozilla/pdf.js/issues/3381.
|
476
|
+
// Make sure that we only match webkit-based Android browsers,
|
477
|
+
// since Firefox/Fennec works as expected.
|
478
|
+
// Support: Android<3.0
|
479
|
+
var regex = /Android\s[0-2][^\d]/;
|
480
|
+
var isOldAndroid = regex.test(navigator.userAgent);
|
481
|
+
|
482
|
+
if (isSafari || isOldAndroid) {
|
483
|
+
PDFJS.disableRange = true;
|
484
|
+
PDFJS.disableStream = true;
|
485
|
+
}
|
486
|
+
})();
|
487
|
+
|
488
|
+
// Check if the browser supports manipulation of the history.
|
489
|
+
// Support: IE<10, Android<4.2
|
490
|
+
(function checkHistoryManipulation() {
|
491
|
+
// Android 2.x has so buggy pushState support that it was removed in
|
492
|
+
// Android 3.0 and restored as late as in Android 4.2.
|
493
|
+
// Support: Android 2.x
|
494
|
+
if (!history.pushState || navigator.userAgent.indexOf('Android 2.') >= 0) {
|
495
|
+
PDFJS.disableHistory = true;
|
496
|
+
}
|
497
|
+
})();
|
498
|
+
|
499
|
+
// Support: IE<11, Chrome<21, Android<4.4, Safari<6
|
500
|
+
(function checkSetPresenceInImageData() {
|
501
|
+
// IE < 11 will use window.CanvasPixelArray which lacks set function.
|
502
|
+
if (window.CanvasPixelArray) {
|
503
|
+
if (typeof window.CanvasPixelArray.prototype.set !== 'function') {
|
504
|
+
window.CanvasPixelArray.prototype.set = function(arr) {
|
505
|
+
for (var i = 0, ii = this.length; i < ii; i++) {
|
506
|
+
this[i] = arr[i];
|
507
|
+
}
|
508
|
+
};
|
509
|
+
}
|
510
|
+
} else {
|
511
|
+
// Old Chrome and Android use an inaccessible CanvasPixelArray prototype.
|
512
|
+
// Because we cannot feature detect it, we rely on user agent parsing.
|
513
|
+
var polyfill = false, versionMatch;
|
514
|
+
if (navigator.userAgent.indexOf('Chrom') >= 0) {
|
515
|
+
versionMatch = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
|
516
|
+
// Chrome < 21 lacks the set function.
|
517
|
+
polyfill = versionMatch && parseInt(versionMatch[2]) < 21;
|
518
|
+
} else if (navigator.userAgent.indexOf('Android') >= 0) {
|
519
|
+
// Android < 4.4 lacks the set function.
|
520
|
+
// Android >= 4.4 will contain Chrome in the user agent,
|
521
|
+
// thus pass the Chrome check above and not reach this block.
|
522
|
+
polyfill = /Android\s[0-4][^\d]/g.test(navigator.userAgent);
|
523
|
+
} else if (navigator.userAgent.indexOf('Safari') >= 0) {
|
524
|
+
versionMatch = navigator.userAgent.
|
525
|
+
match(/Version\/([0-9]+)\.([0-9]+)\.([0-9]+) Safari\//);
|
526
|
+
// Safari < 6 lacks the set function.
|
527
|
+
polyfill = versionMatch && parseInt(versionMatch[1]) < 6;
|
528
|
+
}
|
529
|
+
|
530
|
+
if (polyfill) {
|
531
|
+
var contextPrototype = window.CanvasRenderingContext2D.prototype;
|
532
|
+
contextPrototype._createImageData = contextPrototype.createImageData;
|
533
|
+
contextPrototype.createImageData = function(w, h) {
|
534
|
+
var imageData = this._createImageData(w, h);
|
535
|
+
imageData.data.set = function(arr) {
|
536
|
+
for (var i = 0, ii = this.length; i < ii; i++) {
|
537
|
+
this[i] = arr[i];
|
538
|
+
}
|
539
|
+
};
|
540
|
+
return imageData;
|
541
|
+
};
|
542
|
+
}
|
543
|
+
}
|
544
|
+
})();
|
545
|
+
|
546
|
+
// Support: IE<10, Android<4.0, iOS
|
547
|
+
(function checkRequestAnimationFrame() {
|
548
|
+
function fakeRequestAnimationFrame(callback) {
|
549
|
+
window.setTimeout(callback, 20);
|
550
|
+
}
|
551
|
+
|
552
|
+
var isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent);
|
553
|
+
if (isIOS) {
|
554
|
+
// requestAnimationFrame on iOS is broken, replacing with fake one.
|
555
|
+
window.requestAnimationFrame = fakeRequestAnimationFrame;
|
556
|
+
return;
|
557
|
+
}
|
558
|
+
if ('requestAnimationFrame' in window) {
|
559
|
+
return;
|
560
|
+
}
|
561
|
+
window.requestAnimationFrame =
|
562
|
+
window.mozRequestAnimationFrame ||
|
563
|
+
window.webkitRequestAnimationFrame ||
|
564
|
+
fakeRequestAnimationFrame;
|
565
|
+
})();
|
566
|
+
|
567
|
+
(function checkCanvasSizeLimitation() {
|
568
|
+
var isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent);
|
569
|
+
var isAndroid = /Android/g.test(navigator.userAgent);
|
570
|
+
if (isIOS || isAndroid) {
|
571
|
+
// 5MP
|
572
|
+
PDFJS.maxCanvasPixels = 5242880;
|
573
|
+
}
|
574
|
+
})();
|