pdfjs_viewer-rails 0.0.9 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +75 -3
- data/app/assets/javascripts/pdfjs_viewer/application.js +2 -3
- data/app/assets/javascripts/pdfjs_viewer/pdfjs/pdf.js +18538 -0
- data/app/assets/javascripts/pdfjs_viewer/viewer.js +9320 -6823
- data/app/assets/javascripts/pdfjs_viewer/viewer_configurations.js +3 -0
- data/app/assets/stylesheets/pdfjs_viewer/pdfjs/viewer.css +278 -115
- data/app/controllers/pdfjs_viewer/viewer_controller.rb +3 -0
- data/app/views/pdfjs_viewer/viewer/_extra_head.html.erb +1 -0
- data/app/views/pdfjs_viewer/viewer/_head.html.erb +14 -0
- data/app/views/pdfjs_viewer/viewer/_printcontainer.html.erb +79 -0
- data/app/views/pdfjs_viewer/viewer/_viewer.html.erb +83 -152
- data/lib/pdfjs_viewer-rails/helpers.rb +3 -2
- data/lib/pdfjs_viewer-rails/version.rb +1 -1
- data/public/pdfjs/pdf.js.map +1 -0
- data/public/pdfjs/web/images/secondaryToolbarButton-selectTool.png +0 -0
- data/public/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png +0 -0
- data/public/pdfjs/web/images/texture.png +0 -0
- data/public/pdfjs/web/images/toolbarButton-menuArrows.png +0 -0
- data/public/pdfjs/web/images/toolbarButton-viewAttachments@2x.png +0 -0
- data/public/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png +0 -0
- data/public/pdfjs/web/images/treeitem-collapsed-rtl.png +0 -0
- data/public/pdfjs/web/images/treeitem-collapsed-rtl@2x.png +0 -0
- data/public/pdfjs/web/locale/ach/viewer.properties +22 -16
- data/public/pdfjs/web/locale/af/viewer.properties +27 -16
- data/public/pdfjs/web/locale/ak/viewer.properties +11 -12
- data/public/pdfjs/web/locale/an/viewer.properties +25 -14
- data/public/pdfjs/web/locale/ar/viewer.properties +27 -16
- data/public/pdfjs/web/locale/as/viewer.properties +11 -16
- data/public/pdfjs/web/locale/ast/viewer.properties +174 -108
- data/public/pdfjs/web/locale/az/viewer.properties +26 -15
- data/public/pdfjs/web/locale/be/viewer.properties +184 -105
- data/public/pdfjs/web/locale/bg/viewer.properties +39 -28
- data/public/pdfjs/web/locale/bn-BD/viewer.properties +37 -26
- data/public/pdfjs/web/locale/bn-IN/viewer.properties +18 -14
- data/public/pdfjs/web/locale/br/viewer.properties +21 -14
- data/public/pdfjs/web/locale/bs/viewer.properties +25 -14
- data/public/pdfjs/web/locale/ca/viewer.properties +26 -15
- data/public/pdfjs/web/locale/cs/viewer.properties +43 -26
- data/public/pdfjs/web/locale/cy/viewer.properties +26 -15
- data/public/pdfjs/web/locale/da/viewer.properties +31 -14
- data/public/pdfjs/web/locale/de/viewer.properties +33 -16
- data/public/pdfjs/web/locale/el/viewer.properties +43 -24
- data/public/pdfjs/web/locale/en-GB/viewer.properties +31 -14
- data/public/pdfjs/web/locale/en-US/viewer.properties +25 -14
- data/public/pdfjs/web/locale/en-ZA/viewer.properties +13 -16
- data/public/pdfjs/web/locale/eo/viewer.properties +29 -18
- data/public/pdfjs/web/locale/es-AR/viewer.properties +33 -16
- data/public/pdfjs/web/locale/es-CL/viewer.properties +119 -65
- data/public/pdfjs/web/locale/es-ES/viewer.properties +17 -11
- data/public/pdfjs/web/locale/es-MX/viewer.properties +25 -14
- data/public/pdfjs/web/locale/et/viewer.properties +32 -15
- data/public/pdfjs/web/locale/eu/viewer.properties +25 -14
- data/public/pdfjs/web/locale/fa/viewer.properties +27 -16
- data/public/pdfjs/web/locale/ff/viewer.properties +25 -14
- data/public/pdfjs/web/locale/fi/viewer.properties +31 -14
- data/public/pdfjs/web/locale/fr/viewer.properties +58 -41
- data/public/pdfjs/web/locale/fy-NL/viewer.properties +40 -35
- data/public/pdfjs/web/locale/ga-IE/viewer.properties +31 -20
- data/public/pdfjs/web/locale/gd/viewer.properties +25 -14
- data/public/pdfjs/web/locale/gl/viewer.properties +9 -14
- data/public/pdfjs/web/locale/gu-IN/viewer.properties +31 -14
- data/public/pdfjs/web/locale/he/viewer.properties +25 -14
- data/public/pdfjs/web/locale/hi-IN/viewer.properties +31 -21
- data/public/pdfjs/web/locale/hr/viewer.properties +30 -19
- data/public/pdfjs/web/locale/hu/viewer.properties +25 -14
- data/public/pdfjs/web/locale/hy-AM/viewer.properties +26 -15
- data/public/pdfjs/web/locale/id/viewer.properties +25 -14
- data/public/pdfjs/web/locale/is/viewer.properties +25 -14
- data/public/pdfjs/web/locale/it/viewer.properties +19 -13
- data/public/pdfjs/web/locale/ja/viewer.properties +45 -28
- data/public/pdfjs/web/locale/ka/viewer.properties +113 -7
- data/public/pdfjs/web/locale/kk/viewer.properties +28 -17
- data/public/pdfjs/web/locale/km/viewer.properties +28 -17
- data/public/pdfjs/web/locale/kn/viewer.properties +23 -14
- data/public/pdfjs/web/locale/ko/viewer.properties +25 -14
- data/public/pdfjs/web/locale/ku/viewer.properties +11 -12
- data/public/pdfjs/web/locale/lg/viewer.properties +11 -10
- data/public/pdfjs/web/locale/lij/viewer.properties +165 -109
- data/public/pdfjs/web/locale/lt/viewer.properties +29 -18
- data/public/pdfjs/web/locale/lv/viewer.properties +25 -14
- data/public/pdfjs/web/locale/mai/viewer.properties +11 -16
- data/public/pdfjs/web/locale/mk/viewer.properties +68 -61
- data/public/pdfjs/web/locale/ml/viewer.properties +11 -16
- data/public/pdfjs/web/locale/mn/viewer.properties +9 -6
- data/public/pdfjs/web/locale/mr/viewer.properties +34 -23
- data/public/pdfjs/web/locale/ms/viewer.properties +41 -28
- data/public/pdfjs/web/locale/my/viewer.properties +23 -16
- data/public/pdfjs/web/locale/nb-NO/viewer.properties +32 -15
- data/public/pdfjs/web/locale/nl/viewer.properties +29 -18
- data/public/pdfjs/web/locale/nn-NO/viewer.properties +55 -38
- data/public/pdfjs/web/locale/nso/viewer.properties +10 -11
- data/public/pdfjs/web/locale/oc/viewer.properties +31 -18
- data/public/pdfjs/web/locale/or/viewer.properties +11 -16
- data/public/pdfjs/web/locale/pa-IN/viewer.properties +54 -51
- data/public/pdfjs/web/locale/pl/viewer.properties +20 -41
- data/public/pdfjs/web/locale/pt-BR/viewer.properties +46 -35
- data/public/pdfjs/web/locale/pt-PT/viewer.properties +35 -24
- data/public/pdfjs/web/locale/rm/viewer.properties +31 -14
- data/public/pdfjs/web/locale/ro/viewer.properties +40 -29
- data/public/pdfjs/web/locale/ru/viewer.properties +183 -110
- data/public/pdfjs/web/locale/rw/viewer.properties +9 -7
- data/public/pdfjs/web/locale/sah/viewer.properties +11 -16
- data/public/pdfjs/web/locale/si/viewer.properties +12 -14
- data/public/pdfjs/web/locale/sk/viewer.properties +25 -14
- data/public/pdfjs/web/locale/sl/viewer.properties +26 -15
- data/public/pdfjs/web/locale/son/viewer.properties +22 -15
- data/public/pdfjs/web/locale/sq/viewer.properties +66 -47
- data/public/pdfjs/web/locale/sr/viewer.properties +33 -16
- data/public/pdfjs/web/locale/sv-SE/viewer.properties +25 -14
- data/public/pdfjs/web/locale/sw/viewer.properties +10 -11
- data/public/pdfjs/web/locale/ta-LK/viewer.properties +9 -4
- data/public/pdfjs/web/locale/ta/viewer.properties +27 -16
- data/public/pdfjs/web/locale/te/viewer.properties +46 -36
- data/public/pdfjs/web/locale/th/viewer.properties +63 -52
- data/public/pdfjs/web/locale/tl/viewer.properties +27 -8
- data/public/pdfjs/web/locale/tn/viewer.properties +9 -9
- data/public/pdfjs/web/locale/tr/viewer.properties +31 -20
- data/public/pdfjs/web/locale/uk/viewer.properties +27 -16
- data/public/pdfjs/web/locale/ur/viewer.properties +19 -14
- data/public/pdfjs/web/locale/vi/viewer.properties +25 -14
- data/public/pdfjs/web/locale/wo/viewer.properties +12 -12
- data/public/pdfjs/web/locale/xh/viewer.properties +25 -14
- data/public/pdfjs/web/locale/zh-CN/viewer.properties +30 -19
- data/public/pdfjs/web/locale/zh-TW/viewer.properties +25 -15
- data/public/pdfjs/web/locale/zu/viewer.properties +11 -12
- data/public/pdfjs/web/pdf.worker.js +45507 -0
- data/public/pdfjs/web/pdf.worker.js.map +1 -0
- data/test/dummy/app/assets/config/manifest.js +5 -0
- data/test/dummy/app/views/pdfjs_viewer/viewer/_extra_head.html.erb +1 -0
- data/test/dummy/app/views/sample/helper.html.erb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +1770 -89
- data/test/dummy/public/sample.pdf +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/-l/-lmREjXar1FRJ-qvxQYIcElssqWObGgYoAF-eff-GSI.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/0X/0XaDr7BS6WD-1ZDWLs26li57iimlNOdbpYXu3COgsIA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/0b/0b2Yr0w8Kcv3H34YvS1k7ZIGpp3dh4_7WCmfi2uM0Bo.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1C/1CuVPLGkTRz3C8yksihFAA7r-PGExELVV95-nJujRgI.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1N/1NtVyTwC6gpkp4uPKks2i7XIDOc5xenKIwYbhYCPIZ0.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1V/1VFVQM3UvHZJeyfocqq1Ri1Ld4l_3VUA9f46XNQ5SqI.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1f/1fidLos4TsMC1Jzat66F4EuJMnvA4Ek4Yq3Wx_diqLA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/2R/2R98e2YVPrPua4mm1LnZJXzfgLbo7qgs7FDQSYqlwQY.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/2k/2k2QxmtA7SFZWB1zLj10t-ZpwXLD8vtXHmDOkSrZWOU.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3I/3IUZQGAalEE2P68Ob6-jgHDDlLjcHN9rDb6zdVLvKXA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/4Y/4YfA4FbKpPO73V3dWQbDlh1_hUGWCLH_rus1BKCbmq4.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/4h/4hGOMi8t9jA7rT-JyBz2wfIqmxxA6C-s63ulLteZmcA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/4t/4tVZLzuOFp3qqkNwJL6okWQg7SAt5WX8nirlPvL6v-Y.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/4u/4ulvtPKNTLNgCnb7PBjj37O4Y61UX9EwDS4cjf105sE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/51/514_xqQJY6nPLefyDto_IvNYRJAEktoJAOQ9t4l2SuI.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/5L/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/60/60rvu0XUvN93CtM3JpR9lkagXbYOOcP3XMAwArKf3iU.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/66/66rMsErvbsDZN8Aw7gwgmjTsUCaW1Q_le3MrGPPBSbc.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/7Q/7Q-pDkI2jygwa4-YpVs8LrHlGq76qvNF9cMKvIW19kw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/7u/7uViSjDgKF94AdY5eHIxebaJppkSsjIZUhJivtjlDV0.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/7x/7x0UflNmZiyLz6l0qXexSKA5vSGDWtPvVyjpqxc4HOA.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/8N/8NHrDFfbr9Dq5-k4ZEt4mrK9_S_WmayrkeAyR5gCsow.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/8l/8l2VGTx_PcamE4fcI80EAeYWfYFMUOr1ZIdScNNLbn4.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/9G/9GFNrvErbVcHyYoYCLPFVsaq6obi6zBXRfXRwlC_iig.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/9S/9S1o3C_oz3WJO3m3zzkza6Q9vKA5WA6eGOWQuGTRQ3k.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/AY/AYMLVwPVGVIAZH9JGKGImZOn2bjTqHUWwQDu9mdGzMw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Am/AmERsfodVKxkkJ64pEvTqgnVjUO_vl5XI0OyXH6A11w.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Aw/AwGJsPzwrFfQJdKyC6KqhULhmx-DsookR6bTgwFcIAs.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/B1/B1E4ZaLHU_KsfBquykVRKezQ-FRJl8v6--jX-yPGXnU.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/B5/B5MDyeqMIx4GXhYZalpYkG3p3tBawiXl8hnHa4MMAQs.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/C_/C_DAxUoLpJKozTFWURYaVNOWWQJe__0paQV8GWnSItE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Cx/CxaQbme5ko-wxsVAwK--ul806HSJN2MwOnoPc8P9xPM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Cx/cxKqQP5IZ0fdnsNxqjtovom-U8YKaaaAoLN0lkqlgmM.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/D3/D3NQOCRTjgeuT449sw9wZTYfLClDh2bSEH8SlgA-tnc.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Dq/DqsfG7gyEmHCLWJFw8KEKZQd6xoIOcO__5TkBzsx3jk.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/J7/J7_1-jGIsJgQtlfH0jw7bFkUHm4lYEMwsflGlbds724.cache → v4.0.0/Dr/Dr2MkEtw8xvNoHzZkeTsrW9x4V-ov29KwUXJ3Ytd7xA.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Dx/DxpORYhFQUee72PMFyH5hmyJ25-2cGjHoHfYDtlRcRs.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/EF/EFCvsRgX3BcuZljpVdflnRpsMV8wugWpLXgVRSNHd2U.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Ev/Evv_jSn6ri1cHbzt2LeJt7QbZQGPetcWZ_W_M74hvZ8.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/S7/S7Jl8rwFDyT5waxhH9H2R_iTja9kXUzDpjchUj6BMDM.cache → v4.0.0/F5/F5QVTdQWhxejC7Hh4dw12tC9h9oER-CVhmuJorL1qLc.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/FK/FKE8-r24UNUM3hMXxJG6O3FNfYvi3aNZNogc_cVE95U.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/GZ/GZE1uEJZ37lAijmeMj_1zMbwBjOgNlQFLqGEVRch0ac.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/HP/HPbcXagW7N26tDcMQgv9_r8t1zH7TtuGYrs3oodVwso.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/I2/I2ATvoFZ2TL3nPNvbfeqof0l4bhj3XggnJ3yQJ4Ayaw.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/Mz/Mz4WGIDdPycd4JOgDa4gtKMpO8H5MMhhNP_aSAivvlI.cache → v4.0.0/IE/IEHYsh5JtvYpOm4fKRK8i73Kld043YRGZx4UQKCrkLc.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Ip/IpdEGQFk3_1PDWVS-jNlVpp9mODQhRe0ANsVFB_SC8A.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Iz/Iz4ic4cBk0cakoJ6s54nUNCYi9cQY3LHcaPWOrYUEmA.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/JY/JYRKIfZvFeJJg7YXs4MW5cp8d__rZHrIJB4NRXM9wZU.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Jt/JtOEwyyV03hv8pbItClIEYBX_RCs54G24e0VPNOoWCI.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/71/71stgYwt4t69lIMueMKuSlCwQk1DL9R226Ee1prhseM.cache → v4.0.0/Kb/KbW87iTtZeGwhwOzqfuQx1FEkI4LPaXDomgyCNb62ws.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/LI/LIKFPcJ1se4iAGU3QiJja9o1ii6GWRK-v9lvq5y92pY.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/M4/M4qPB8ROhK-PyRz1Z3wJ-ygcJghC-dPRjgKwl3gh_8M.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/MD/MDkIPQSUBzWb_aUdhTkcU33TLvvnX50Ga64obHq4alA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/N0/N06_pjy6BGKJUTsqIxd5ae_OaZ5xhe5kRqaiiQNyb1o.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/N3/N3qPqUfUuosjcEmWyCsVrevQWtleH5a-j9KibYBOiAU.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/NB/NB4rmJl43C0j2sMk7rvV68zKk6LIwe8oSE202hsQIVE.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/NE/NERKHzfGRgUtxIaKk351O8At6hN3Z_WmOJWBHnyAgJU.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/T4/T4HdrzfDiTLFdSbO3SxncQtKzXUYU_21Na477K963-A.cache → v4.0.0/NF/NFgDH-U92odJCph94D_u3Vf1TQ9aE47diTENTVlErpQ.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/OI/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/OO/OOgLMDCLY8g9iAVOQIpMIAPXWa5ktKrhJjcRJEYohGs.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/OO/ooyoOnI5A5xJuh3z8Z-ci1RArvgJ9PCZpf2c-oup10E.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/OP/OPY7eBOtRZytk4yAS-_WSVaYBl6cH1b192gDGfjCfoQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/PC/PCeurKXRahIDlP9tRcOVatNTyM1CReaqhiQzE1wy_c8.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/PP/PPa0f6y1dPEk5k5nDnkYOHm-hNSyoHraUjkWH7-87Uo.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/uG/uGB8pQq7xPDYA5nByG0nWXGe9_8G6vjUD4YWdayZUBU.cache → v4.0.0/Pg/PgvHapfJ4XmTxEfkr0v-RLyS5JvuI_BQi8NjQQsjfkw.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Pg/pGA_JnDDQlLL9RgMEqNuMELYKZh4_8orr_daua34vXk.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Pu/PuF-erEO9Cmy9sQyFoLqivPBHUyrrwjgvB9l3aFz4C4.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Q3/Q3Q6MT0F4JMTVLlXw7c0xUmVyGDqCwOVowbwVD50K3s.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/QO/QOd41yOl9N2G7DxsuYjWPRC_Om1KmSdCDU2eZeilYIY.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/QX/QXEHkMzTT6JXQX314coHx1i3ke40DkSZn-zi085zeG8.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Qp/QpAgfQP6U5jcFY5doMrcWCffY03uflvWMbb03Osa6HY.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/RA/RAXAeC3kfxNZnXpmCwb-qn_FQJ341EsL4X2UMoNj0Uk.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/RI/RIxeN1uIBV1W2RgyoYXG3XW_kHO8azJufVzY8P6Gb7U.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/SM/SMgUxo_qOBvLvEK1EOWPVKg0frCoAEcbMz4ajX40CoQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/VP/VPqFDN_2SCNZqqhZ9YIYZJyXQyC8HPOSjBxLAXjJUTo.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/VP/VpmEcu3zJe0snpgnyXo28Y9CR_Z4gWOXuSF6bCqcNzc.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/Bi/BiBHyucnKyS4xGpxUaVGSzTEDSBLG38nAlOlD2fIcd8.cache → v4.0.0/W7/W7hh0dVpxEqTKdviyRDIHIsH1R9GT2hNdDzwdte3Nz0.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/WD/WDuw8twbXVN-_Gg9ZzK9u4DDNqn1TteRGlIuv_aa-QA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/XB/XBXQ4cCJlGbG0xFwpeDlDU4TQTcFWMYg7I9lAaWcEsM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/XR/XRQlMBopl7a7Jcgd10jZhV1EE0byt-9Oc8Je0UbaVCI.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Xo/XorZqUhm5Dx82vY0iLShsV82J44N9MWwymJ-xJqxjtE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/YC/YChE4yerh7h2ESkCvPWgHNmpvd-6Tlvu5dYC0vU50bg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/YC/ycYj6WSn9-Dtf8pbKj8cTWz78ic5RDhppNhTz0jnRw0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Ye/Yesdya1cJqbzEFlyZjSZNrrrKncP6A8wT60bM_gDSn0.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/_9/_9Df-Wg-hg1H3a4KC3w4D3L8gGHjynD3FEP7yR_CX7Y.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/a7/a7i7UP5U6Ov1wz57MtD7oIJwaEcZp8ZZBZ6gdG-bY58.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/as/asfo-X1cfhAI_4aPIjtILMT3E0o7WEYvVmC6Jaj2t38.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/ch/chtPVIfeMzwhXmacsO4PPqQjNhvQLmc7-zZx1Sg2Cno.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/jr/jrK6gITAaG-WCXCpnRQJzZIpw6kGVRdaX-k3sYE12nA.cache → v4.0.0/cl/clyISbC0KryDMhct-YGNbEEKSMwqOzQIhSarjF1P8r4.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/cz/czUK-RJBveMll9eYD8g6rTtGfl5VmA_QjnQ7Uf9Y2nA.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/dV/dViCI_zQMwNbS4OmSFMSSYYF_jEkTIUSMNUSR-P7PdE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/eG/eGsVuUaGsi7m8U8oe-Yun6LsMTZZwv2dAnkYXn_JVjw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/fO/fOMwhE_LoK6PBz43rr86imRHqStpfn-j0zKwNCEFA7A.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/fb/fbcj7itMSGt-kdSRxK6AB0nRdZVu-D9ydDjNtJymoZQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/fi/fiFKBYw__5HFRz1AJqpDR4zvuOTgL9UTdw4F4ZnqYSg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/p6/p63nGo7X2XlRl6QMB02rCfpb3CFcnBA2rCMd61FHvmk.cache → v4.0.0/g3/g3FImRt_WSdB3AJATqNrYTTpFhJ4_h0k0dJHg_igurQ.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/g8/g8CX16fkcOcyH0CF8sJ4Q-UQZgVT2qytd9wFxZfi6dw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/gR/gR8C9CncmLdDw-EocNZqJp_Aeh-ZLTECe5mc3pp_hp8.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/2u/2uyy2VveB6Rsc9JlymSEB0Qe6iSjYCpAw2PYwPb22YQ.cache → v4.0.0/hA/hAlBeenL7obXexZ8BV7y5txHHhKTTC3z_Ajnomo_ddg.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/hM/hMhbDjdHYVI7KihEY2_qoA2gCoSjNqVOO-AWp1TAQ7A.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/iK/iKbAfMeZFgsqghv6mlqoQfhQCGVYHmVRY8TVYwqItMw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/js/jszwJYIqGBs_vNgoYpTLBwYr-UkQcocQ0NBCGoEC1xI.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/KG/KGy1h2Np66_BWPyUYInRDn111Eo4u18iJz79A5Y_8OA.cache → v4.0.0/k1/k1ZZk_rc0Y2u6OVJFWmW2Oc5r4ry2slvl9FgAy1WDc4.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/kd/kd6nkjO5EQi4vBIYzbAKlNjrslJkJPnX_m8jH1EZD6Y.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/kh/khnQMYg4IPY6_sXYIFti4J_9yKQc3_b6GORtFVLrzOE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/bA/bAcEmOvSYU9DO7MT8-T7yHkggM32bUOyR-8TWntFS7E.cache → v4.0.0/lS/lSZn-CQCNgZ5F7OXc4mpcTnwFIzHpHtL0iPTyZL31v0.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/lT/lTxrEmTXm23GEk3ISi5qtEoYM1rqI9AYzkD26aoasQQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/lU/lUjp67U_YbE14_X7xnSTDcMwOVgiWF3-FHb_yif3kC4.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/le/lejIn_jlvyadKS3me0gOB49iI8SJUW1nLWlxOcgkO_k.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/mm/mmEQpQZ17TwXCS7-OihitWehDJKxvg9HXlo74g7YZ8g.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/zR/zRbdRb-o65vqEx7gHWM-P97_PjFwvomEwygExzhOHTs.cache → v4.0.0/ny/nySX9xY8GVjq8lxHLaokecbVQFri3H_pqQ5ytA2uXwo.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/p4/p4WHavXhUgY2ubVF6tXt_u-hX4ZS06FfjxcM_qsF9mI.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/pa/paq2b-coLJizAccytZuATQhfCSguqbBJdYXWc8Fyup8.cache +4 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/ph/ph-v3FvrMv6i8Y_KgPSvgMPIxYhaE1-UEDMVYFH1tDo.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/pl/plJ87vXodUAoRqG3i5un0gEpqnRKVvuneeLI9jWAaFM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/qv/qvLBTEMTkTqvpE01Wb-TBj5FS8zoHijnXT_HI7Aviog.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/9L/9LtRMVlN7YCDqIGfUJcjJseLSM2aDb3DoGHGErvlYpE.cache → v4.0.0/ro/roZHBpaLIO0Elw6MTQld9etf9K-nmCVBATN15NKZhh8.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/s6/s6qdBr2THGjUKtZptbwt51LqdUY45X1KUukE_MkldFo.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/s9/s922q4NrUcCBhaMaKRwUVY9uDnrvKbm2YlJmiaLvtAM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/sQ/sQ9kUYcYCVtzBgCr0dHtjWWwQXAUuDvcKE7viYEMGrc.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/sp/sp45zrfDq1U_O8efmQ2xUkP3ale5f4UgIV6ph-xYtRU.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/ss/ssidpjNHJeIRP1DArO58wY11cNzfnwLraPYUvt4ozkg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/t3/t3ax_k1a_nmiQ4zF2PalaCH7-7C3lZyN7wlKn_V-puc.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/-q/-q6NQgY81e7LDSsdY_XCGtLdDsXiy9ImIKCPBSmLRVY.cache → v4.0.0/u0/u0CiJwhveeWyr8l-amiVTzfLG2WM16zxcdKxTcw08Dw.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/uW/uWrE5jGykNTXzfomZWop-40evTv0HMarJ1cC6iF31jI.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/ua/uarMuxiCflV7mHH0LUV4CE171FFltKAASZPXHEWS9uI.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/vC/vC7hmqzbKAktMmLea8k4uIfpOBDVQghbOroENscRNBM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/As/AsjkHfKxFtug5RaXLjxS0tB_y-9vBMQecSlFe7cNmY8.cache → v4.0.0/vI/vIl3YhfXQycLKyCxR2lKK3G6I4nR9OwpJQDotA7g3A4.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/vR/vRmK6N2pk7V6jxrWMI_tWcRWthlUlf6lt-TZgnUvWw4.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/vZ/vZoRVNI4g3ZxhlM02nFtcEYVcwJ188tC8zi6AytXxBw.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/vo/voBUXzYnbfEh2q4iqAGN7csd6wfatR9k3DhU4fjE8f8.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/vs/vsQwdd7nb7UOkkBO5ba1tLA2j1WPbSIkc7JollidPMs.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/wA/wAOOSCxDmKhlbcT0Ldr7vt31sN6zbQu03xPRHdohX3k.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/xn/xnDw7D_Uk4g-rkmZl3T-Xm6emd0939hy0xI5pJdUWvM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/y3/y3lDac4K4bSpQHP88Fh7bls3-IZ24qN1pYlm119Mst4.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/yA/yABOMiKJLqLZOCOBLBJjeEwvd6DZlCnKjanSlymoFos.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/{v3.0/Lc/Lc6rpjP6oLsRJWScD4W3e6la4t9niKxd8YGT2bBh0MU.cache → v4.0.0/ym/ymTjP7xTnz0IsG8Erou0O7fYw_22ZuKREL7b8os154c.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/yo/yoJkscf27cCw03TsQRLprs2pxkGnDdAyYuhr380cwbA.cache +1 -0
- data/test/integration/viewer_test.rb +33 -2
- data/test/sandbox/full_viewer.png +0 -0
- data/test/sandbox/helper.png +0 -0
- data/test/sandbox/minimal_viewer.png +0 -0
- data/test/sandbox/reduced_viewer.png +0 -0
- data/test/test_helper.rb +2 -2
- metadata +342 -356
- data/app/assets/javascripts/pdfjs_viewer/pdfjs/compatibility.js +0 -593
- data/app/assets/javascripts/pdfjs_viewer/pdfjs/l10n.js +0 -1033
- data/app/assets/javascripts/pdfjs_viewer/pdfjs/pdf.combined.js +0 -47884
- data/public/pdfjs/web/compressed.tracemonkey-pldi-09.pdf +0 -0
- data/public/pdfjs/web/viewer.html +0 -411
- data/test/dummy/log/development.log +0 -259
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/-t/-t5GVzBWkde9ub5Dw01su_QUfCvcfq2n7qOU7Kpy20o.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/08/080G4FuPE7XFV1a1w2UPhtjxWHV1PqEDphm1BVU6bqk.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/0T/0T3vHG3AoM6H9-UUe2BPzwXDHSRwMWkdI_eYNLXIaV0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/1f/1fidLos4TsMC1Jzat66F4EuJMnvA4Ek4Yq3Wx_diqLA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/2H/2HU5q2HDLP-LB23hM72fUDoS_j5lPaJSI7IF01U7NDc.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/35/35zufUzA_pQC-5GZWRjDFnpQSnnRB7IZ11GOWUCrSuQ.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/41/41bbmlVTHFhKYgY3Mb5w8wRpzeBDAnvso4yeZfycmZw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/4f/4fdHLlIfLD3AKTlp44tZ9bJcfv1ckrqz884hSOBoJc0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/4z/4zaTuQNQ-f4VplXdAsrqxg9X3_jgn83bTKExkgyK1Dc.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5F/5FtUQmmePVDek5RfbRjG9-tEWQN9LmsMbMsUzxG0oXA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5H/5Htfw7H-9yCiEsKrcea6l5fKFCbTUr_Rer3KeOltfpQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5L/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/6U/6UPfT3oOX0Z5g_LVzD1fIrbBg2IF3E0Zs9ZcpPmEumY.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/6p/6pl5BgV5NUKa0M5z1JWmRyR7VMlmV_TnuXaIHa-a0tA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/6y/6yWCnWQZ4ibluEIW8EvyYOZqmrH0xhi0Db8smuj6t18.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/6z/6ztMTmnOacQTXs6Vnv6OfSLyvoHXkIqhKfs3ajnEyYs.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/79/79dZygZE-ACvSNiThevxriXuL0L2a5nzsG6smkijiIY.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/7l/7ln8dFl8yZOucQdjPjsGTORt3sOUzaF8GPUAJAiGukU.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/7y/7yNlixqTVXpTDGdxtRdPR3-Heab5x0aBdJdGJ8EHdgc.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/81/81292vRreJmEuLhLhV6HxALK7epFEwvRgw58uQLFAEs.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/8d/8dSdlbQtg7bAzL4WJW_v1LLaVQ-eVnAQQ5N6H4gwOsQ.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/9J/9JF1ActxnHWpo9QCp5ZUB7lpq5deaBf04E8tpwBaqIQ.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/9V/9VjE3x4J-o2hYYW_OmIQnAdFeDw-BWRJwMG8YpdQn84.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/9h/9hKDxRykvMd5d3ibRhzcS4EAMb9o3Fa_Ybl-m5wox18.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/A-/A-x6g1hcYwickErEJa4hv1Lggyfdd3j3Wab236wTgVY.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/AA/AAUMS8uXVgslBOoirrsLdY4Ag1ijItQ0spJjhta63h4.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/AY/AYWyTNfFrMFXNeXyr6qyeU5cU4VNBaRZ9GSH0A_FTG4.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/As/aSGbex_eb2YmMSeGCSJbfqr4raznNAQ-hLIQi1ELA08.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ax/AxGKs1wHRZDhTLT08ByVX0X7p3jxnzpFWvik33-2HGc.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Az/Azfd0siA6xNhvTYx1sIfH_68yT2lktwcv1iHV27Evus.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/BS/BSyrC2z_r77PQolC4IeFWphPsVuwm_IMzp4u70S6vDk.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Bb/BbyGO7nv2FMFnwC8jnxCXIfCZCpPItXqqIu2lTKvCsk.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Bc/BciIoQECZf_1y1NR9MwSpgeqNrT-rX20dmMv5fgF64g.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Bh/Bh1h2g7TPWnpDSPyssUWy3q55lN9l1LPhnlvaXlXCwA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/C-/C-rYxWqMLNU8YVQd2fJlnScQWjraLZGSVYNno8ZWwYE.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/DS/DSOLSc6A5RVSmvM415eEWAWG_AgOvZcLZOXQjsXyWQA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Di/DigdgIqS7bGlgBulDuFvQPpifrIXU4OL1BRq56BrNi8.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/EA/EA58tBohqYgVMAfTWbqYQMfhbZyQ7xOVE5nyFYQ4ILY.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ER/ERnhvKmzMsN4ne6bfo--b-C7Q-6QxfzACrKgE2vh1nE.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ek/EkAuJl_fpdrMEvoOocPF7T4XwQ6YaE3krHedVoQVAhc.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ep/Ep_qJLsM6Koq_xt0sRgrOu9kVjfZLxX6c1k9JgyyVzI.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ge/GeNnWyMrCVZcLQwvFIUxmeE5QnbBW0ooOwi9I_YF6NE.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ge/GefKNcQdME9gFg7x6Ubl10AKRWQOI8rpB84b1DwqMQA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Go/Go7suWCHlEDa8ucybgyeVgOLKNDOmYcnkky1s-9jQro.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/H8/H8_IGSoQCZ3LBxii2RZXH8KqYUx-WpJhM_7zJk-cw9Y.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/He/He8dbO9KB_qFzpPwv04NBqBfMYxlOE7vytxtEUT1FIg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Hp/HpkDNfjcvnQ3cWDf2DuhP3yDpOqDmhOs48DmtdNMTXs.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/I2/I2MZs_8sc534WdUN3-XnHBGP3A0LDtDmHbxu-dVGvr0.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/IE/IEUeuaZvKg2F4IEObI0zgU_SO60U02BcqA3YdjfYLhs.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/IE/IeEv80zxsBwBelFUt7XuhqyTzUX8u6ZlAASZcRQ1q8Y.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/IH/IHRC4-8LT7E2d69WoMd8mtCTcuHs9CHdx06qQOkqeb4.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/IR/IR0071WvcQcaWbeJdaVAHLTe8wRpr6E98_55rO51vJI.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ig/IgDY1CRIUs7PK8O0saLCPILkrVsWS-0EDdac2-vDwhA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/JP/JPrrUGF_3-GtB7jM_E_4HzYlkxJ5_4jj4mq6vXzVnN0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Jf/Jf_0BNbCJItwTH1g9AzYSV7cnq3GpFlcrZjODr5KUEY.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Jk/JkxqhdQnl29bTrWBKW_nGDe54MaTAFxUeVvG6fsEyDs.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/K7/K7S5z9d_3JC-gVOj-236ZBlw8ovV_jLRT1LSPNm5EBk.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ks/KsFAy16AhHBjV1q7vt82A6Y33NsSbqsFrv9BiKZMreg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Lb/LbpOkaxE_qd8m5Ckur4t_mqarROkdCQ-BHt07H-u6C0.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/M-/M-uK4ThehS1nk0YpPEwPu-F1jUTul8eBkyg1mBg0gvg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ma/MaVnsdU0tivsecHGXwf_n_3-yLSSuotq6spLQr-bs0c.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Mo/MogwKpf20as_2fJUDTrlUcDdMh20evxDffERAKk8QlA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Mz/mzI7pDy1zvv-w3xgMptsk1WhW985tn21VLDInMf5_as.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/OI/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/QP/QP_11qyTmflgTGiwcW0MSJenVgRiv-nJrIYdJlGoH3E.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/RH/RHvDByu5dX4Hsd19kB-lR6jbsWCtSUlEOuZn09W6yTg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/RP/RPm5aX4qNBojnmbdvw-kqHBZdKP8lgSYcfKMWBDWJEM.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Rz/RzY1cYjFXjcJbB6Xf0OLXcOsLIFR-fJygQbmDgn-I0U.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/SQ/SQAGM5ieWLt5zrjyMNz6CokZ4X8NB85kSPQeBlt0xNw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/SY/SYKIVw0JdXBkHnkRBwlVpuYz9ywvRpQDFDaZpjasz-g.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/TB/TBC4TQJ7eLxKqqxNVC92qwET2VtN6Pz4WLAJ8ZsD_eE.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/TL/TLiKl88xrJgr5wstIvihdZ6URJu0-uK_gwNGWA85w4o.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Tj/TjYsQV9h_b-PQ9mB812dFtYHJ4a4FrfZgqvGDl0ecLI.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/U8/U8lReX_PG7IIl0UT6e66lbpiKaHIVr35LVsCkFILG_E.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/UF/UFlw5aQDhyk_odf54MCShCKgL4tdOkYpvars0SojIec.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/UV/UVNBbRFrLJPMBVttqJhfB97xE7jwfcz8116f561SgMI.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ui/Ui6clyARo_JCQlsKG-ZLLtoK-VL2VZ-d5gwiayl3PBA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ul/UlZIs4zBOzazcKXNnGO5yi23YtGu39nz5k2lrMAH-fg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Uz/UzTxgkkJxu_yF_A4VqzZXaI8jHOo2uqg2jQzQlCGDio.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Uz/uzrz2VsOGZr8bImxBFHVyh_kZsyrJBbERoUKLbRr9wA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/VL/VLLs8UrNjV8bfd8uPyFHkkLb7Uq6wk-sSBHldEjIQWg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/VS/VSY-hml0wKkEILztFY2MRmrwdjaTw138yvlr_kdR5wA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/WL/WLjT_PqLYAab7ICYxacunvKK7x0J7CyIJsxi7bVph1Y.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Xp/XpHZvs8omFcn_aNkmaGBOj11vjlgis0GAIP3MKVcUyg.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/YJ/YJhpKq1vU8uVW9TP9DvaO4yjZBVYT2Gv5d_CW9Xjvgc.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/_H/_HDoShPSg9SdiXdQroUZtQd3S82RZaRlhw4n_BarXd4.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/_x/_xKbdjmcLyZhehb01ubXK_0Jw0QzOHeqwszrntGHhgA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/aT/aTt4wK2WIQvQRV2gAzjoymdBNfvgkNfAZthlIeu413M.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ak/akvJqh_CeKLt1fdEwDIV9zHTTT3AugzmeUHM8y57jKY.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ao/ao1pPYOFJ7wX29UdnX0Bjt1xqxPOLtYKeuys3Ax7UHY.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/b2/b28ZzBxW--4poZM3tMAMMk1RyB_6u-p1MsHeQowcKpc.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/cE/cEeKuWJlIZEoE6BdWqTI-t-E0N2LAeufboemcnI5Ltg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/cR/cRYLwr6_kGeZYZrNWP40U26TFX4f2QAbevRDC32I8zk.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/cW/cWKFgp1roz93Kd99ls1d6ayBMMRXc5z1nOnPJPOFBM0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ca/cazmkYR6tJ4f0DptT7Qr8mo-BZwfvM4EKpJ3yF-HQIs.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/d4/d4UJTJcZGylngswkFZgsStffrdVU8IysEAukleJHq_U.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/eg/eghgqLUKT9lADymq4Vk0hb5NYXIIFrpWDUqeHuEDt74.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/f5/f5SXLtaZpoKUrBhYyANene_B0pZh4Fs3q0qsnYI17Ss.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/fB/fBypaaSqpls1GcwwQ4HclPsG-XOKuoI2VyzNufjyfnU.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/fO/fOMwhE_LoK6PBz43rr86imRHqStpfn-j0zKwNCEFA7A.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/fq/fqzJZ9XDtHWdf_SrXg-T7l6O2NtlSoC1dgRq3w8nbqg.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/g-/g-MxLh6QZ8uqSQpzl71sOO6FhoLd-mPY9ytN3SHSd6s.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ga/gaONmV2vWDOfl6XOybIxlSMpcETo2PaZG3_ex6ZtSVc.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/gs/gs1fq9lqaJbqSHx_WnrLGo_rbzlZGfhkP8OGkuumHLk.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ja/jaQH1tnuMWObXXMX988ejVTiawMvE6L76842FrwIIS0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/js/js7jNKdNVyNNYQRxeDp0KoAh7sdYoveaQVNQkBuXDe8.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/k9/k9YO1Qb-Ja2eQJEc_LqqaYiR2Jk9c73e_1u85EyYEUw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/kO/kOJdTGjX5wCNUqYrGe6jxPS2lw1-T90j87elJ6HlVR0.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/kR/kRo_i8ixuzuziAXr-0X5Sv-pJtnyCokfgOS-jCbF9Wk.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/lD/lDZ1BHw5ItAbM7e0LAXXg3wMOJvdtj1ynrdiQ99qoko.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/lm/lmszFoPAF57gCrLseYD8wvbThDi_j0Ys3R-AygQjuhM.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/lw/lwMDtxzgforpVTNvcnw_xXMixHfXTfsgUIgFKltZutw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ly/lY6Xiq4wNrMhr1GiQOrtNKSaPhpnCMgjPNSi3ZN51mk.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ly/lyDeyCTO3D1TCcPpMAEsrpHgWH6AspQwFnGKOHzrH7Y.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/mD/mDLr1lrD6WgTt48gRX8tF51GnjLshUXG-Txvu-HoVsI.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/mS/mSj21XsZvaMOK22e6ov7GZ3-YZ9_UD_go_7lA-ey7vc.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/nR/nRXBZs1TbcYM5xyj5Qx1UBWrSNEHZVPP37R2yo2s1K8.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ne/nexQjB0awaxA5vRef-9hPWFgWrYosUCpVU_a0uEclmc.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/pC/pCMBdLnOAQOsMegdUF76NAgdZrY6EJKJoW0dE_QRLY0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/pk/pkkfBywe4K-JsW2OeLY2g8FVj1UmXnrSljtomau_rXw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/qT/qTJMU6xMxg--8mAi0aRjFEuf4EPvPrkg3zoxvurjmkM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/qd/qdQffu_fIz8BjDX9Qm06YvRis27trrnziWOTE3Yiq_w.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/qd/qdrmd8Ttm0KIVoULM8tCA5HpYmtgLqNAVkcJ2_a5Ckg.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/rR/rRp2gtP0SbjQbb9XGgLRhywKVIwYztgeAq0kCl4GEd8.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ro/ro_7q1G-1gCLv9Of5_G0fpt1qRpdeeE-C-kOpk7xZBI.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/s9/s9bOYlWBgcKy5os6sTFZRtrgGE5XcnF404zQra9HxmQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/sT/sTn4Un1H4aTfN5GuwdM5Di6DBocGF9fbHgAPgvJklDQ.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/sj/sjBcRn1DJs7jFTrYJPoOpLbCWPov_JYXS7uszBvJDM0.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/uB/uBld_x-EceyLitiqDaSne4Z47i9GDiaha9ZmP-AWYN8.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/w-/w-xtN1s7rcgQgiGPvMc0LNPFYj_lLBvsCJqtl50X0Xg.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/wm/wm9-Heugu7FpUNf32e_mJJPtHCm50eEJfomC-oWDDUs.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/xU/XuLQCLsgS3WU-zc1F9_WRJj1ldlUqRMWqd3o_o0TVEQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/xU/xU9JSYkEQI0cWQhhaxMThnNrqVnYZPI9pCNEdf96xNg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/xg/xghgUy4QUAcMUz3tekj_NeSYQG99DVqs02ElMYUg6LU.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/yz/yZ4rknNFFykgsDGpns_JhcT__AR_qbf4mGZEy8vSrtM.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/yz/yzg9_Tpun3ZssXl9nCyYEOEQmK9FHcYZlqPYlNwmEAc.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/z0/z0teEXFifx1LtInSms4WF41wGZ5nBI3ogYR7Acyip6w.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/z4/z47xsrpJjs8d1MIm1r57yADNit604olUHS2D0MYBrxs.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/zX/zXTZrbZQWUzxCxfLbWxzNflWnJHwvg9GD7VbAv4Rz_A.cache +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
<!-- Touch file app/views/pdfjs_viewer/viewer/_extra_head.html.erb to add extra head data. -->
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<meta name="pdfjs_viewer_verbosity" content="<%= ENV.fetch("PDFJS_VIEWER_VERBOSITY", "errors") %>">
|
2
|
+
<title><%= title %></title>
|
3
|
+
|
4
|
+
<%= stylesheet_link_tag "pdfjs_viewer/application", media: "all" %>
|
5
|
+
|
6
|
+
<!-- This snippet is used in production (included from viewer.html) -->
|
7
|
+
<link rel="resource" type="application/l10n" href="/pdfjs/web/locale/locale.properties"/>
|
8
|
+
|
9
|
+
<% if local_assigns[:pdf_url] %>
|
10
|
+
<script type="text/javascript">
|
11
|
+
window.resourceURL = "<%= pdf_url %>";
|
12
|
+
</script>
|
13
|
+
<% end %>
|
14
|
+
<%= javascript_include_tag "pdfjs_viewer/application" %>
|
@@ -0,0 +1,79 @@
|
|
1
|
+
<div id="mozPrintCallback-shim" hidden>
|
2
|
+
<style>
|
3
|
+
@media print {
|
4
|
+
#printContainer div {
|
5
|
+
page-break-after: always;
|
6
|
+
page-break-inside: avoid;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
</style>
|
10
|
+
<style scoped>
|
11
|
+
#mozPrintCallback-shim {
|
12
|
+
position: fixed;
|
13
|
+
top: 0;
|
14
|
+
left: 0;
|
15
|
+
height: 100%;
|
16
|
+
width: 100%;
|
17
|
+
z-index: 9999999;
|
18
|
+
|
19
|
+
display: block;
|
20
|
+
text-align: center;
|
21
|
+
background-color: rgba(0, 0, 0, 0.5);
|
22
|
+
}
|
23
|
+
#mozPrintCallback-shim[hidden] {
|
24
|
+
display: none;
|
25
|
+
}
|
26
|
+
@media print {
|
27
|
+
#mozPrintCallback-shim {
|
28
|
+
display: none;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
#mozPrintCallback-shim .mozPrintCallback-dialog-box {
|
33
|
+
display: inline-block;
|
34
|
+
margin: -50px auto 0;
|
35
|
+
position: relative;
|
36
|
+
top: 45%;
|
37
|
+
left: 0;
|
38
|
+
min-width: 220px;
|
39
|
+
max-width: 400px;
|
40
|
+
|
41
|
+
padding: 9px;
|
42
|
+
|
43
|
+
border: 1px solid hsla(0, 0%, 0%, .5);
|
44
|
+
border-radius: 2px;
|
45
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
46
|
+
|
47
|
+
background-color: #474747;
|
48
|
+
|
49
|
+
color: hsl(0, 0%, 85%);
|
50
|
+
font-size: 16px;
|
51
|
+
line-height: 20px;
|
52
|
+
}
|
53
|
+
#mozPrintCallback-shim .progress-row {
|
54
|
+
clear: both;
|
55
|
+
padding: 1em 0;
|
56
|
+
}
|
57
|
+
#mozPrintCallback-shim progress {
|
58
|
+
width: 100%;
|
59
|
+
}
|
60
|
+
#mozPrintCallback-shim .relative-progress {
|
61
|
+
clear: both;
|
62
|
+
float: right;
|
63
|
+
}
|
64
|
+
#mozPrintCallback-shim .progress-actions {
|
65
|
+
clear: both;
|
66
|
+
}
|
67
|
+
</style>
|
68
|
+
<div class="mozPrintCallback-dialog-box">
|
69
|
+
<!-- TODO: Localise the following strings -->
|
70
|
+
Preparing document for printing...
|
71
|
+
<div class="progress-row">
|
72
|
+
<progress value="0" max="100"></progress>
|
73
|
+
<span class="relative-progress">0%</span>
|
74
|
+
</div>
|
75
|
+
<div class="progress-actions">
|
76
|
+
<input type="button" value="Cancel" class="mozPrintCallback-cancel">
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
</div>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<% title = local_assigns[:title] || "PDF.js viewer" %>
|
2
|
+
<% pdf_url = local_assigns[:pdf_url] %>
|
2
3
|
|
3
4
|
<!DOCTYPE html>
|
4
5
|
<!--
|
@@ -28,20 +29,8 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|
28
29
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
29
30
|
<meta name="google" content="notranslate">
|
30
31
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<%= stylesheet_link_tag "pdfjs_viewer/application", media: "all" %>
|
35
|
-
|
36
|
-
<!-- This snippet is used in production (included from viewer.html) -->
|
37
|
-
<link rel="resource" type="application/l10n" href="/pdfjs/web/locale/locale.properties"/>
|
38
|
-
|
39
|
-
<% if local_assigns[:pdf_url] %>
|
40
|
-
<script type="text/javascript">
|
41
|
-
window.resourceURL = "<%= pdf_url %>";
|
42
|
-
</script>
|
43
|
-
<% end %>
|
44
|
-
<%= javascript_include_tag "pdfjs_viewer/application" %>
|
32
|
+
<%= render "pdfjs_viewer/viewer/head", title: title, pdf_url: pdf_url %>
|
33
|
+
<%= render "pdfjs_viewer/viewer/extra_head", local_assigns %>
|
45
34
|
</head>
|
46
35
|
|
47
36
|
<body tabindex="1" class="loadingInProgress" id="pdfjs_viewer-<%= style %>">
|
@@ -50,13 +39,13 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|
50
39
|
<div id="sidebarContainer">
|
51
40
|
<div id="toolbarSidebar">
|
52
41
|
<div class="splitToolbarButton toggled">
|
53
|
-
<button id="viewThumbnail" class="toolbarButton
|
42
|
+
<button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
|
54
43
|
<span data-l10n-id="thumbs_label">Thumbnails</span>
|
55
44
|
</button>
|
56
|
-
<button id="viewOutline" class="toolbarButton
|
57
|
-
<span data-l10n-id="
|
45
|
+
<button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline">
|
46
|
+
<span data-l10n-id="document_outline_label">Document Outline</span>
|
58
47
|
</button>
|
59
|
-
<button id="viewAttachments" class="toolbarButton
|
48
|
+
<button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
|
60
49
|
<span data-l10n-id="attachments_label">Attachments</span>
|
61
50
|
</button>
|
62
51
|
</div>
|
@@ -72,24 +61,31 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|
72
61
|
</div> <!-- sidebarContainer -->
|
73
62
|
|
74
63
|
<div id="mainContainer">
|
75
|
-
<div class="findbar hidden doorHanger
|
76
|
-
<
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
64
|
+
<div class="findbar hidden doorHanger" id="findbar">
|
65
|
+
<div id="findbarInputContainer">
|
66
|
+
<input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="find_input">
|
67
|
+
<div class="splitToolbarButton">
|
68
|
+
<button id="findPrevious" class="toolbarButton findPrevious" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="find_previous">
|
69
|
+
<span data-l10n-id="find_previous_label">Previous</span>
|
70
|
+
</button>
|
71
|
+
<div class="splitToolbarButtonSeparator"></div>
|
72
|
+
<button id="findNext" class="toolbarButton findNext" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="find_next">
|
73
|
+
<span data-l10n-id="find_next_label">Next</span>
|
74
|
+
</button>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
<div id="findbarOptionsContainer">
|
79
|
+
<input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
|
80
|
+
<label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight all</label>
|
81
|
+
<input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
|
82
|
+
<label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match case</label>
|
83
|
+
<span id="findResultsCount" class="toolbarLabel hidden"></span>
|
84
|
+
</div>
|
85
|
+
|
86
|
+
<div id="findbarMessageContainer">
|
87
|
+
<span id="findMsg" class="toolbarLabel"></span>
|
86
88
|
</div>
|
87
|
-
<input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
|
88
|
-
<label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight all</label>
|
89
|
-
<input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
|
90
|
-
<label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match case</label>
|
91
|
-
<span id="findResultsCount" class="toolbarLabel hidden"></span>
|
92
|
-
<span id="findMsg" class="toolbarLabel"></span>
|
93
89
|
</div> <!-- findbar -->
|
94
90
|
|
95
91
|
<div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
|
@@ -134,13 +130,16 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|
134
130
|
|
135
131
|
<div class="horizontalToolbarSeparator"></div>
|
136
132
|
|
137
|
-
<button id="
|
138
|
-
<span data-l10n-id="
|
133
|
+
<button id="cursorSelectTool" class="secondaryToolbarButton selectTool toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="cursor_text_select_tool">
|
134
|
+
<span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
|
135
|
+
</button>
|
136
|
+
<button id="cursorHandTool" class="secondaryToolbarButton handTool" title="Enable Hand Tool" tabindex="61" data-l10n-id="cursor_hand_tool">
|
137
|
+
<span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
|
139
138
|
</button>
|
140
139
|
|
141
140
|
<div class="horizontalToolbarSeparator"></div>
|
142
141
|
|
143
|
-
<button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="
|
142
|
+
<button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="62" data-l10n-id="document_properties">
|
144
143
|
<span data-l10n-id="document_properties_label">Document Properties…</span>
|
145
144
|
</button>
|
146
145
|
</div>
|
@@ -154,10 +153,10 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|
154
153
|
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
|
155
154
|
</button>
|
156
155
|
<div class="toolbarButtonSpacer"></div>
|
157
|
-
<button id="viewFind" class="toolbarButton
|
158
|
-
|
156
|
+
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar">
|
157
|
+
<span data-l10n-id="findbar_label">Find</span>
|
159
158
|
</button>
|
160
|
-
<div class="splitToolbarButton">
|
159
|
+
<div class="splitToolbarButton hiddenSmallView">
|
161
160
|
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
|
162
161
|
<span data-l10n-id="previous_label">Previous</span>
|
163
162
|
</button>
|
@@ -166,8 +165,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|
166
165
|
<span data-l10n-id="next_label">Next</span>
|
167
166
|
</button>
|
168
167
|
</div>
|
169
|
-
<
|
170
|
-
<input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1" tabindex="15">
|
168
|
+
<input type="number" id="pageNumber" class="toolbarField pageNumber" title="Page" value="1" size="4" min="1" tabindex="15" data-l10n-id="page">
|
171
169
|
<span id="numPages" class="toolbarLabel"></span>
|
172
170
|
</div>
|
173
171
|
<div id="toolbarViewerRight">
|
@@ -196,35 +194,33 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|
196
194
|
<span data-l10n-id="tools_label">Tools</span>
|
197
195
|
</button>
|
198
196
|
</div>
|
199
|
-
<div
|
200
|
-
<div class="
|
201
|
-
<
|
202
|
-
<
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
<
|
207
|
-
|
208
|
-
</button>
|
209
|
-
</div>
|
210
|
-
<span id="scaleSelectContainer" class="dropdownToolbarButton">
|
211
|
-
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
|
212
|
-
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
|
213
|
-
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
|
214
|
-
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Fit Page</option>
|
215
|
-
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Full Width</option>
|
216
|
-
<option id="customScaleOption" title="" value="custom"></option>
|
217
|
-
<option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
|
218
|
-
<option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
|
219
|
-
<option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
|
220
|
-
<option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
|
221
|
-
<option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
|
222
|
-
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
|
223
|
-
<option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
|
224
|
-
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
|
225
|
-
</select>
|
226
|
-
</span>
|
197
|
+
<div id="toolbarViewerMiddle">
|
198
|
+
<div class="splitToolbarButton">
|
199
|
+
<button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
|
200
|
+
<span data-l10n-id="zoom_out_label">Zoom Out</span>
|
201
|
+
</button>
|
202
|
+
<div class="splitToolbarButtonSeparator"></div>
|
203
|
+
<button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
|
204
|
+
<span data-l10n-id="zoom_in_label">Zoom In</span>
|
205
|
+
</button>
|
227
206
|
</div>
|
207
|
+
<span id="scaleSelectContainer" class="dropdownToolbarButton">
|
208
|
+
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
|
209
|
+
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
|
210
|
+
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
|
211
|
+
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Page Fit</option>
|
212
|
+
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Page Width</option>
|
213
|
+
<option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true"></option>
|
214
|
+
<option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
|
215
|
+
<option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
|
216
|
+
<option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
|
217
|
+
<option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
|
218
|
+
<option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
|
219
|
+
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
|
220
|
+
<option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
|
221
|
+
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
|
222
|
+
</select>
|
223
|
+
</span>
|
228
224
|
</div>
|
229
225
|
</div>
|
230
226
|
<div id="loadingBar">
|
@@ -278,7 +274,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|
278
274
|
<p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
|
279
275
|
</div>
|
280
276
|
<div class="row">
|
281
|
-
<input type="password" id="password" class="toolbarField"
|
277
|
+
<input type="password" id="password" class="toolbarField">
|
282
278
|
</div>
|
283
279
|
<div class="buttonRow">
|
284
280
|
<button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
|
@@ -331,89 +327,24 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|
331
327
|
</div>
|
332
328
|
</div>
|
333
329
|
</div>
|
330
|
+
<div id="printServiceOverlay" class="container hidden">
|
331
|
+
<div class="dialog">
|
332
|
+
<div class="row">
|
333
|
+
<span data-l10n-id="print_progress_message">Preparing document for printing…</span>
|
334
|
+
</div>
|
335
|
+
<div class="row">
|
336
|
+
<progress value="0" max="100"></progress>
|
337
|
+
<span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' class="relative-progress">0%</span>
|
338
|
+
</div>
|
339
|
+
<div class="buttonRow">
|
340
|
+
<button id="printCancel" class="overlayButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
|
341
|
+
</div>
|
342
|
+
</div>
|
343
|
+
</div>
|
334
344
|
</div> <!-- overlayContainer -->
|
335
345
|
|
336
346
|
</div> <!-- outerContainer -->
|
337
347
|
<div id="printContainer"></div>
|
338
|
-
|
339
|
-
<style>
|
340
|
-
@media print {
|
341
|
-
#printContainer div {
|
342
|
-
page-break-after: always;
|
343
|
-
page-break-inside: avoid;
|
344
|
-
}
|
345
|
-
}
|
346
|
-
</style>
|
347
|
-
<style scoped>
|
348
|
-
#mozPrintCallback-shim {
|
349
|
-
position: fixed;
|
350
|
-
top: 0;
|
351
|
-
left: 0;
|
352
|
-
height: 100%;
|
353
|
-
width: 100%;
|
354
|
-
z-index: 9999999;
|
355
|
-
|
356
|
-
display: block;
|
357
|
-
text-align: center;
|
358
|
-
background-color: rgba(0, 0, 0, 0.5);
|
359
|
-
}
|
360
|
-
#mozPrintCallback-shim[hidden] {
|
361
|
-
display: none;
|
362
|
-
}
|
363
|
-
@media print {
|
364
|
-
#mozPrintCallback-shim {
|
365
|
-
display: none;
|
366
|
-
}
|
367
|
-
}
|
368
|
-
|
369
|
-
#mozPrintCallback-shim .mozPrintCallback-dialog-box {
|
370
|
-
display: inline-block;
|
371
|
-
margin: -50px auto 0;
|
372
|
-
position: relative;
|
373
|
-
top: 45%;
|
374
|
-
left: 0;
|
375
|
-
min-width: 220px;
|
376
|
-
max-width: 400px;
|
377
|
-
|
378
|
-
padding: 9px;
|
379
|
-
|
380
|
-
border: 1px solid hsla(0, 0%, 0%, .5);
|
381
|
-
border-radius: 2px;
|
382
|
-
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
383
|
-
|
384
|
-
background-color: #474747;
|
385
|
-
|
386
|
-
color: hsl(0, 0%, 85%);
|
387
|
-
font-size: 16px;
|
388
|
-
line-height: 20px;
|
389
|
-
}
|
390
|
-
#mozPrintCallback-shim .progress-row {
|
391
|
-
clear: both;
|
392
|
-
padding: 1em 0;
|
393
|
-
}
|
394
|
-
#mozPrintCallback-shim progress {
|
395
|
-
width: 100%;
|
396
|
-
}
|
397
|
-
#mozPrintCallback-shim .relative-progress {
|
398
|
-
clear: both;
|
399
|
-
float: right;
|
400
|
-
}
|
401
|
-
#mozPrintCallback-shim .progress-actions {
|
402
|
-
clear: both;
|
403
|
-
}
|
404
|
-
</style>
|
405
|
-
<div class="mozPrintCallback-dialog-box">
|
406
|
-
<!-- TODO: Localise the following strings -->
|
407
|
-
Preparing document for printing...
|
408
|
-
<div class="progress-row">
|
409
|
-
<progress value="0" max="100"></progress>
|
410
|
-
<span class="relative-progress">0%</span>
|
411
|
-
</div>
|
412
|
-
<div class="progress-actions">
|
413
|
-
<input type="button" value="Cancel" class="mozPrintCallback-cancel">
|
414
|
-
</div>
|
415
|
-
</div>
|
416
|
-
</div>
|
417
|
-
|
348
|
+
<%= render "pdfjs_viewer/viewer/printcontainer" %>
|
418
349
|
</body>
|
419
350
|
</html>
|
@@ -1,8 +1,9 @@
|
|
1
1
|
module PdfjsViewer
|
2
2
|
module Rails
|
3
3
|
module ViewHelpers
|
4
|
-
def pdfjs_viewer(
|
5
|
-
|
4
|
+
def pdfjs_viewer(**kwargs)
|
5
|
+
raise ArgumentError, "style option is required." unless kwargs.key?(:style)
|
6
|
+
render "/pdfjs_viewer/viewer/viewer", **kwargs
|
6
7
|
end
|
7
8
|
end
|
8
9
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap c9be985464785b4e5413","webpack:///src/shared/util.js","webpack:///node_modules/core-js/modules/_global.js","webpack:///node_modules/core-js/modules/_is-object.js","webpack:///node_modules/core-js/modules/_wks.js","webpack:///node_modules/core-js/modules/_core.js","webpack:///node_modules/core-js/modules/_export.js","webpack:///node_modules/core-js/modules/_hide.js","webpack:///node_modules/core-js/modules/_an-object.js","webpack:///node_modules/core-js/modules/_descriptors.js","webpack:///node_modules/core-js/modules/_fails.js","webpack:///node_modules/core-js/modules/_has.js","webpack:///node_modules/core-js/modules/_ctx.js","webpack:///node_modules/core-js/modules/_to-length.js","webpack:///node_modules/core-js/modules/_object-dp.js","webpack:///node_modules/core-js/modules/_redefine.js","webpack:///src/display/dom_utils.js","webpack:///node_modules/core-js/modules/_uid.js","webpack:///node_modules/core-js/modules/_to-integer.js","webpack:///node_modules/core-js/modules/_to-object.js","webpack:///node_modules/core-js/modules/_iterators.js","webpack:///src/shared/global_scope.js","webpack:///node_modules/core-js/modules/_library.js","webpack:///node_modules/core-js/modules/_a-function.js","webpack:///node_modules/core-js/modules/_redefine-all.js","webpack:///node_modules/core-js/modules/_an-instance.js","webpack:///node_modules/core-js/modules/_cof.js","webpack:///node_modules/core-js/modules/_set-to-string-tag.js","webpack:///node_modules/core-js/modules/_property-desc.js","webpack:///node_modules/core-js/modules/_to-iobject.js","webpack:///node_modules/core-js/modules/_to-absolute-index.js","webpack:///node_modules/core-js/modules/_classof.js","webpack:///node_modules/core-js/modules/_for-of.js","webpack:///node_modules/core-js/modules/_dom-create.js","webpack:///node_modules/core-js/modules/_to-primitive.js","webpack:///node_modules/core-js/modules/_iobject.js","webpack:///node_modules/core-js/modules/_defined.js","webpack:///node_modules/core-js/modules/_shared-key.js","webpack:///node_modules/core-js/modules/_enum-bug-keys.js","webpack:///node_modules/core-js/modules/_object-keys.js","webpack:///node_modules/core-js/modules/_array-methods.js","webpack:///node_modules/core-js/modules/_species-constructor.js","webpack:///node_modules/core-js/modules/_iter-detect.js","webpack:///node_modules/core-js/modules/_new-promise-capability.js","webpack:///node_modules/core-js/modules/_meta.js","webpack:///src/display/network_utils.js","webpack:///node_modules/core-js/modules/_ie8-dom-define.js","webpack:///node_modules/core-js/modules/_typed.js","webpack:///node_modules/core-js/modules/_to-index.js","webpack:///node_modules/core-js/modules/_object-gopn.js","webpack:///node_modules/core-js/modules/_object-keys-internal.js","webpack:///node_modules/core-js/modules/_array-includes.js","webpack:///node_modules/core-js/modules/_shared.js","webpack:///node_modules/core-js/modules/_array-fill.js","webpack:///node_modules/core-js/modules/_is-array-iter.js","webpack:///node_modules/core-js/modules/_object-create.js","webpack:///node_modules/core-js/modules/_html.js","webpack:///node_modules/core-js/modules/_object-gpo.js","webpack:///node_modules/core-js/modules/core.get-iterator-method.js","webpack:///node_modules/core-js/modules/es6.array.iterator.js","webpack:///node_modules/core-js/modules/_iter-define.js","webpack:///node_modules/core-js/modules/_set-species.js","webpack:///node_modules/core-js/modules/_object-gopd.js","webpack:///node_modules/core-js/modules/_object-pie.js","webpack:///node_modules/core-js/modules/es6.object.to-string.js","webpack:///node_modules/core-js/modules/web.dom.iterable.js","webpack:///node_modules/core-js/modules/_task.js","webpack:///node_modules/core-js/modules/_perform.js","webpack:///node_modules/core-js/modules/_promise-resolve.js","webpack:///node_modules/core-js/modules/_validate-collection.js","webpack:///src/display/api.js","webpack:///src/display/webgl.js","webpack:///src/display/metadata.js","webpack:///src/display/annotation_layer.js","webpack:///src/display/text_layer.js","webpack:///src/display/svg.js","webpack:///src/pdf.js","webpack:///src/shared/compatibility.js","webpack:///node_modules/core-js/fn/typed/uint8-clamped-array.js","webpack:///node_modules/core-js/modules/es6.typed.uint8-clamped-array.js","webpack:///node_modules/core-js/modules/_typed-array.js","webpack:///node_modules/core-js/modules/_typed-buffer.js","webpack:///node_modules/core-js/modules/_object-dps.js","webpack:///node_modules/core-js/modules/_array-species-create.js","webpack:///node_modules/core-js/modules/_array-species-constructor.js","webpack:///node_modules/core-js/modules/_is-array.js","webpack:///node_modules/core-js/modules/_add-to-unscopables.js","webpack:///node_modules/core-js/modules/_iter-step.js","webpack:///node_modules/core-js/modules/_iter-create.js","webpack:///node_modules/core-js/modules/_array-copy-within.js","webpack:///node_modules/core-js/fn/number/is-nan.js","webpack:///node_modules/core-js/modules/es6.number.is-nan.js","webpack:///node_modules/core-js/fn/number/is-integer.js","webpack:///node_modules/core-js/modules/es6.number.is-integer.js","webpack:///node_modules/core-js/modules/_is-integer.js","webpack:///node_modules/core-js/fn/promise.js","webpack:///node_modules/core-js/modules/es6.string.iterator.js","webpack:///node_modules/core-js/modules/_string-at.js","webpack:///node_modules/core-js/modules/es6.promise.js","webpack:///node_modules/core-js/modules/_iter-call.js","webpack:///node_modules/core-js/modules/_invoke.js","webpack:///node_modules/core-js/modules/_microtask.js","webpack:///node_modules/core-js/modules/_user-agent.js","webpack:///node_modules/core-js/modules/es7.promise.finally.js","webpack:///node_modules/core-js/modules/es7.promise.try.js","webpack:///node_modules/core-js/fn/weak-map.js","webpack:///node_modules/core-js/modules/es6.weak-map.js","webpack:///node_modules/core-js/modules/_object-assign.js","webpack:///node_modules/core-js/modules/_object-gops.js","webpack:///node_modules/core-js/modules/_collection-weak.js","webpack:///node_modules/core-js/modules/_collection.js","webpack:///node_modules/core-js/modules/_inherit-if-required.js","webpack:///node_modules/core-js/modules/_set-proto.js","webpack:///node_modules/core-js/modules/es7.weak-map.of.js","webpack:///node_modules/core-js/modules/_set-collection-of.js","webpack:///node_modules/core-js/modules/es7.weak-map.from.js","webpack:///node_modules/core-js/modules/_set-collection-from.js","webpack:///src/shared/streams_polyfill.js","webpack:///external/streams/streams-lib.js","webpack:///src/display/global.js","webpack:///src/display/font_loader.js","webpack:///src/display/canvas.js","webpack:///src/display/pattern_helper.js","webpack:///src/display/xml_parser.js","webpack:///src/display/transport_stream.js","webpack:///src/display/node_stream.js","webpack:///src/display/fetch_stream.js","webpack:///src/display/network.js"],"names":["FONT_IDENTITY_MATRIX","NativeImageDecoding","NONE","DECODE","DISPLAY","TextRenderingMode","FILL","STROKE","FILL_STROKE","INVISIBLE","FILL_ADD_TO_PATH","STROKE_ADD_TO_PATH","FILL_STROKE_ADD_TO_PATH","ADD_TO_PATH","FILL_STROKE_MASK","ADD_TO_PATH_FLAG","ImageKind","GRAYSCALE_1BPP","RGB_24BPP","RGBA_32BPP","AnnotationType","TEXT","LINK","FREETEXT","LINE","SQUARE","CIRCLE","POLYGON","POLYLINE","HIGHLIGHT","UNDERLINE","SQUIGGLY","STRIKEOUT","STAMP","CARET","INK","POPUP","FILEATTACHMENT","SOUND","MOVIE","WIDGET","SCREEN","PRINTERMARK","TRAPNET","WATERMARK","THREED","REDACT","AnnotationFlag","HIDDEN","PRINT","NOZOOM","NOROTATE","NOVIEW","READONLY","LOCKED","TOGGLENOVIEW","LOCKEDCONTENTS","AnnotationFieldFlag","REQUIRED","NOEXPORT","MULTILINE","PASSWORD","NOTOGGLETOOFF","RADIO","PUSHBUTTON","COMBO","EDIT","SORT","FILESELECT","MULTISELECT","DONOTSPELLCHECK","DONOTSCROLL","COMB","RICHTEXT","RADIOSINUNISON","COMMITONSELCHANGE","AnnotationBorderStyleType","SOLID","DASHED","BEVELED","INSET","StreamType","UNKNOWN","FLATE","LZW","DCT","JPX","JBIG","A85","AHX","CCF","RL","FontType","TYPE1","TYPE1C","CIDFONTTYPE0","CIDFONTTYPE0C","TRUETYPE","CIDFONTTYPE2","TYPE3","OPENTYPE","TYPE0","MMTYPE1","VERBOSITY_LEVELS","errors","warnings","infos","CMapCompressionType","BINARY","STREAM","OPS","dependency","setLineWidth","setLineCap","setLineJoin","setMiterLimit","setDash","setRenderingIntent","setFlatness","setGState","save","restore","transform","moveTo","lineTo","curveTo","curveTo2","curveTo3","closePath","rectangle","stroke","closeStroke","fill","eoFill","fillStroke","eoFillStroke","closeFillStroke","closeEOFillStroke","endPath","clip","eoClip","beginText","endText","setCharSpacing","setWordSpacing","setHScale","setLeading","setFont","setTextRenderingMode","setTextRise","moveText","setLeadingMoveText","setTextMatrix","nextLine","showText","showSpacedText","nextLineShowText","nextLineSetSpacingShowText","setCharWidth","setCharWidthAndBounds","setStrokeColorSpace","setFillColorSpace","setStrokeColor","setStrokeColorN","setFillColor","setFillColorN","setStrokeGray","setFillGray","setStrokeRGBColor","setFillRGBColor","setStrokeCMYKColor","setFillCMYKColor","shadingFill","beginInlineImage","beginImageData","endInlineImage","paintXObject","markPoint","markPointProps","beginMarkedContent","beginMarkedContentProps","endMarkedContent","beginCompat","endCompat","paintFormXObjectBegin","paintFormXObjectEnd","beginGroup","endGroup","beginAnnotations","endAnnotations","beginAnnotation","endAnnotation","paintJpegXObject","paintImageMaskXObject","paintImageMaskXObjectGroup","paintImageXObject","paintInlineImageXObject","paintInlineImageXObjectGroup","paintImageXObjectRepeat","paintImageMaskXObjectRepeat","paintSolidColorImageMask","constructPath","verbosity","console","unreachable","UNSUPPORTED_FEATURES","unknown","forms","javaScript","smask","shadingPattern","font","base","other","url","absoluteUrl","baseUrl","isValidProtocol","Object","enumerable","configurable","writable","lookup","initializer","PasswordResponses","NEED_PASSWORD","INCORRECT_PASSWORD","PasswordException","UnknownErrorException","InvalidPDFException","MissingPDFException","UnexpectedResponseException","NotImplementedException","MissingDataException","XRefParseException","FormatError","AbortException","NullCharactersRegExp","warn","str","assert","bytes","length","MAX_ARGUMENT_COUNT","String","strBuf","i","chunkEnd","Math","chunk","arr","resultLength","ii","item","itemLength","arrayByteLength","pos","data","stringToBytes","value","n","x","offset","buffer8","view32","IDENTITY_MATRIX","Util","rgbBuf","m1","m2","xt","p","m","yt","d","p1","p2","r","p3","p4","v","transpose","a","b","c","first","second","sx","sy","rect","orderedX","rect1","rect2","orderedY","result","ROMAN_NUMBER_MAP","Number","number","romanBuf","romanStr","lowerCase","Array","obj1","obj2","dict","getArray","sub","prototype","script","document","loaded","PageViewport","centerX","viewBox","centerY","rotation","rotateA","rotateB","rotateC","rotateD","offsetCanvasX","offsetCanvasY","width","height","clone","args","scale","convertToViewportPoint","convertToViewportRectangle","tl","br","convertToPdfPoint","PDFStringTranslateTable","code","decodeURIComponent","escape","unescape","encodeURIComponent","ch","process","capability","StatTimer","time","name","Date","timeEnd","toString","times","out","longest","span","duration","rpad","createBlob","type","createObjectURL","digits","forceDataSchema","URL","blob","buffer","b1","b2","b3","d1","d2","d3","d4","thisArg","Promise","resolve","fn","reason","callbacksCapabilities","ah","event","callbackId","callback","wrapReason","action","sourceName","targetName","comObj","isReply","error","makeReasonSerializable","MessageHandler","on","send","message","sendWithPromise","sendWithStream","streamId","start","startCapability","startCall","isClosed","desiredSize","controller","pull","pullCapability","stream","cancel","cancelCapability","_createStreamSink","self","sendStreamRequest","streamSink","enqueue","size","lastDesiredSize","close","sinkCapability","onPull","onCancel","isCancelled","ready","resolveCall","success","_processStreamMessage","sendStreamResponse","deleteStreamController","finalize","resolveOrReject","postMessage","transfers","destroy","img","objs","global","module","window","Function","__g","it","store","require","uid","Symbol","USE_SYMBOL","$exports","core","version","__e","hide","redefine","ctx","PROTOTYPE","$export","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","target","exports","expProto","source","own","exp","dP","createDesc","object","isObject","TypeError","get","hasOwnProperty","aFunction","that","toInteger","min","anObject","IE8_DOM_DEFINE","toPrimitive","P","O","Attributes","has","SRC","TO_STRING","$toString","TPL","isFunction","DEFAULT_LINK_REL","SVG_NS","create","canvas","context","reset","canvasAndContext","constructor","isCompressed","fetch","request","XMLHttpRequest","cMapData","compressionType","reject","svg","createElement","CustomStyle","prefixes","_cache","arguments","element","style","uPropName","propName","l","prefixed","prop","RenderingCancelledException","LinkTarget","SELF","BLANK","PARENT","TOP","LinkTargetStringMap","params","link","removeNullCharacters","getDefaultSetting","rel","anchor","query","end","globalSettings","globalScope","externalLinkTarget","deprecated","allowRelative","createValidAbsoluteUrl","id","px","key","ceil","floor","isNaN","defined","src","forbiddenField","def","TAG","stat","IObject","max","index","cof","ARG","tryGet","call","isArrayIter","toLength","getIterFn","BREAK","RETURN","iterFn","f","entries","iterable","step","iterator","is","S","val","shared","$keys","enumBugKeys","toObject","asc","IS_MAP","TYPE","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","$create","res","SPECIES","C","ITERATOR","SAFE_CLOSING","riter","safe","iter","done","exec","META","setDesc","isExtensible","FREEZE","setMeta","w","fastKey","getWeak","onFreeze","meta","KEY","NEED","rangeChunkSize","returnValues","allowRangeRequests","suggestedLength","disableRange","getResponseHeader","contentEncoding","parseInt","status","TYPED","VIEW","ABV","CONSTR","TypedArrayConstructors","Typed","RangeError","hiddenKeys","toIObject","arrayIndexOf","IE_PROTO","names","toAbsoluteIndex","IS_INCLUDES","el","SHARED","mode","copyright","aLen","endPos","Iterators","ArrayProto","dPs","Empty","createDict","iframe","lt","gt","iframeDocument","Properties","ObjectProto","classof","addToUnscopables","kind","LIBRARY","$iterCreate","setToStringTag","getPrototypeOf","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","getMethod","proto","NAME","DEF_VALUES","DEFAULT","VALUES_BUG","Base","$native","$default","$entries","$anyNative","IteratorPrototype","methods","values","keys","IS_SET","DESCRIPTORS","pIE","gOPD","test","$iterators","getKeys","wks","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","collections","explicit","Collection","invoke","html","cel","setTask","clearTask","MessageChannel","Dispatch","counter","queue","ONREADYSTATECHANGE","run","listener","defer","channel","port","setTimeout","set","clear","e","newPromiseCapability","promiseCapability","DEFAULT_RANGE_CHUNK_SIZE","isWorkerDisabled","isPostMessageTransfersDisabled","pdfjsFilePath","fakeWorkerFilesLoader","useRequireEnsure","__non_webpack_require__","requirejs","workerSrc","dynamicLoaderSupported","worker","PDFNetworkStream","task","pdfDataRangeTransport","passwordCallback","progressCallback","isArrayBuffer","range","rangeTransport","CMapReaderFactory","pdfBytes","workerPort","PDFWorker","docId","networkStream","messageHandler","transport","apiVersion","password","disableAutoFetch","maxImageSize","disableFontFace","disableCreateObjectURL","postMessageTransfers","docBaseUrl","nativeImageDecoderSupport","ignoreErrors","isEvalSupported","PDFDocumentLoadingTask","nextDocumentId","transportDestroyed","then","PDFDataRangeTransport","addRangeListener","addProgressListener","addProgressiveReadListener","onDataRange","listeners","onDataProgress","onDataProgressiveRead","transportReady","requestDataRange","abort","PDFDocumentProxy","getPage","getPageIndex","getDestinations","getDestination","getPageLabels","getPageMode","getAttachments","getJavaScript","getOutline","getMetadata","getData","getDownloadInfo","getStats","cleanup","PDFPageProxy","getViewport","rotate","getAnnotations","intent","render","stats","renderingIntent","canvasFactory","intentState","fnArray","argsArray","lastChunk","pageIndex","renderInteractiveForms","complete","internalRenderTask","renderTask","getOperatorList","opListTask","streamTextContent","TEXT_CONTENT_CHUNK_SIZE","normalizeWhitespace","combineTextItems","highWaterMark","textContent","getTextContent","readableStream","reader","items","styles","_destroy","waitOn","renderCompleted","_tryCleanup","_startRenderPage","_renderPageChunk","operatorListChunk","cloned","transferable","desc","cloneValue","addEventListener","removeEventListener","nextFakeWorkerId","fakeWorkerFilesLoadedCapability","loader","wrapper","pdfWorkerPorts","_initializeFromPort","_initialize","isSameOrigin","createCDNWrapper","terminateEarly","onWorkerError","supportTypedArray","sendTest","testObj","info","_setupFakeWorker","setupFakeWorkerGlobal","isTypedArraysPresent","Uint8Array","workerHandler","WorkerMessageHandler","WorkerTransport","loadingTask","page","terminated","setupMessageHandler","evt","total","sink","headersCapability","fullReader","isStreamingSupported","isRangeSupported","contentLength","_rangeReader","pdfInfo","pdfDocument","updatePassword","exception","exportedData","exportedError","fontRegistry","registerFont","fontReady","pageProxy","imageData","loadJpegStream","MAX_IMAGE_SIZE_TO_STORE","featureId","_UnsupportedManager","imageUrl","components","rgbaLength","buf","tmpCanvas","tmpCtx","j","pageNumber","promise","results","metadata","startCleanup","PDFObjects","ensureObj","obj","resolved","isResolved","hasData","RenderTask","InternalRenderTask","canvasInRendering","initializeGraphics","viewport","background","operatorListChanged","_continue","_scheduleNext","_next","listen","notify","build","WebGLUtils","shader","gl","compiled","errorMsg","loadShader","program","shaders","linked","texture","currentCanvas","currentGL","premultipliedalpha","smaskVertexShaderCode","smaskFragmentShaderCode","smaskCache","vertexShader","createVertexShader","fragmentShader","createFragmentShader","cache","texCoordLocation","texLayerLocation","texMaskLocation","texCoordBuffer","layer","properties","createTexture","maskTexture","figuresVertexShaderCode","figuresFragmentShaderCode","figuresCache","count","figures","rows","coords","colors","coordsMap","colorsMap","pIndex","cIndex","figure","ps","cs","cols","row","col","jj","backgroundColor","coordsBuffer","colorsBuffer","enabled","shadow","parser","xmlDocument","_repair","chars","_parse","rdf","nodeName","children","entry","subtype","parameters","fieldType","isRenderable","ignoreBorder","_createContainer","container","horizontalRadius","verticalRadius","radius","_createPopup","trigger","popupElement","color","title","contents","hideWrapper","popup","addLinkAttributes","_bindLink","_bindNamedAction","image","JSON","TEXT_ALIGNMENT","fieldWidth","combWidth","_setTextStyle","fontFamily","fallbackName","selectElement","option","optionElement","IGNORE_TYPES","selector","parentElement","parentLeft","parseFloat","parentWidth","BACKGROUND_ENLIGHT","g","_formatContents","lines","line","pin","_show","unpin","_hide","borderWidth","square","circle","vertices","points","y","polyline","file","getFilenameFromUrl","stringToPDFString","filename","content","linkService","downloadManager","imageResourcesPath","svgFactory","renderTextLayer","MAX_TEXT_DIVS_TO_RENDER","NonWhitespaceRegexp","styleBuf","textDiv","textDivProperties","angle","canvasWidth","isWhitespace","originalTransform","paddingBottom","paddingLeft","paddingRight","paddingTop","isAllWhitespace","geom","tx","fontHeight","fontAscent","left","top","angleCos","angleSin","divWidth","divHeight","right","bottom","div","textDivs","textDivsLength","bounds","expanded","expandBounds","divProperties","s","ts","t","findPositiveMin","boxScale","x1","box","y1","x2","y2","x1New","x2New","expandBoundsLTR","boxes","fakeBoundary","horizon","boundary","maxXNew","q","horizonPart","affectedBoundary","xNew","changedHorizon","lastBoundary","useBoundary","used","k","textContentItemsStr","TextLayerRenderTask","clearTimeout","_processItems","len","appendText","_layoutText","textLayerFrag","fontSize","_render","styleCache","alpha","textItems","textStyles","pump","expandTextDivs","expand","padding","renderParameters","textContentStream","enhanceTextSelection","SVGGraphics","SVG_DEFAULTS","fontStyle","fontWeight","fillColor","convertImgDataToPng","PNG_HEADER","CHUNK_WRAPPER_SIZE","crcTable","h","crc","body","crc32","deflateSyncUncompressed","input","output","level","literals","maxBlockLength","deflateBlocks","idat","pi","adler","adler32","imgData","colorType","bitDepth","lineSize","offsetLiterals","offsetBytes","ihdr","deflateSync","pngLength","writePngChunk","encode","SVGExtraState","setCurrentPoint","opTree","tmp","opListLen","opList","pf","XML_NS","XLINK_NS","LINE_CAP_STYLES","LINE_JOIN_STYLES","clipCount","maskCount","old","group","loadDependencies","operatorList","fnArrayLen","deps","nn","common","transformMatrix","getSVG","svgElement","convertOpList","REVOPS","fnId","opListToTree","executeOpTree","opTreeLen","current","charSpacing","wordSpacing","fontDirection","textHScale","glyphsLength","glyphs","vertical","widthAdvanceScale","glyph","isNum","character","spacing","charWidth","textMatrix","pm","addFontStyle","fontObj","details","bold","italic","setStrokeAlpha","setFillAlpha","opLength","ops","xw","yh","clipId","clipPath","clipElement","prev","states","state","imgObj","imgEl","imgSrc","cliprect","mask","matrix","bbox","definitions","rootGroup","_ensureClipGroup","clipGroup","_ensureTransformGroup","pdfjsVersion","pdfjsBuild","pdfjsSharedUtil","pdfjsDisplayGlobal","pdfjsDisplayAPI","pdfjsDisplayTextLayer","pdfjsDisplayAnnotationLayer","pdfjsDisplayDOMUtils","pdfjsDisplaySVG","PDFNodeStream","Response","PDFFetchStream","PDFJS","userAgent","navigator","isAndroid","isAndroidPre3","isAndroidPre5","isChrome","isChromeWithRangeBug","isIOSChrome","isIE","isIOS","isOpera","isSafari","hasDOM","Float32Array","array","ensureUint32ArrayViewProps","Uint32ArrayView","uint32ArrayViewSetters","createUint32ArrayProp","arg1","TypedArray","cpaProto","definePropertyPossible","Test","xhrPrototype","xhr","text","bc","idx","bs","headArgs","bound","HTMLElement","dataset","attribute","list","classListPrototype","add","changeList","contains","remove","toggle","classList","consoleTimer","workerConsole","log","isDisabled","node","history","polyfill","versionMatch","contextPrototype","createImageData","scripts","inputProto","typeProperty","documentProto","readyStateProto","Element","hasWorkingUrl","u","relative","relativePathDotMapping","invalid","unicode","ALPHA","ALPHANUMERIC","stateOverride","cursor","seenAt","seenBracket","err","isRelativeScheme","percentEscape","nextC","nextNextC","cp","tempC","IDNAToASCII","temp","percentEscapeQuery","parse","JURL","authority","host","OriginalURL","init","fails","$typed","$buffer","anInstance","propertyDesc","redefineAll","toIndex","gOPN","createArrayMethod","createArrayIncludes","speciesConstructor","ArrayIterators","$iterDetect","setSpecies","arrayFill","arrayCopyWithin","$DP","$GOPD","ARRAY_BUFFER","SHARED_BUFFER","BYTES_PER_ELEMENT","$ArrayBuffer","$DataView","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayFind","arrayFindIndex","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","arrayReduce","arrayReduceRight","arrayJoin","arraySort","arraySlice","arrayToString","arrayToLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","WRONG_LENGTH","$map","allocate","LITTLE_ENDIAN","FORCED_SET","toOffset","validate","speciesFromList","fromList","addGetter","$from","mapfn","mapping","$of","TO_LOCALE_BUG","$toLocaleString","copyWithin","every","filter","find","findIndex","forEach","indexOf","includes","join","lastIndexOf","map","reduce","reduceRight","reverse","middle","some","sort","subarray","$begin","$slice","$set","isTAIndex","$getDesc","$setDesc","getOwnPropertyDescriptor","defineProperty","$TypedArrayPrototype$","slice","toLocaleString","CLAMPED","GETTER","SETTER","TAC","FORCED","TypedArrayPrototype","getter","setter","addElement","byteLength","klass","$len","$length","o","$offset","$nativeIterator","CORRECT_ITER_NAME","$iterator","from","of","DATA_VIEW","WRONG_INDEX","Infinity","BaseBuffer","abs","pow","LN2","BUFFER","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","eLen","nBytes","eMax","eBias","rt","mLen","nBits","packIEEE754","numIndex","intIndex","view","pack","isLittleEndian","conversion","bufferLength","getInt8","getUint8","getInt16","getUint16","getInt32","unpackI32","getUint32","getFloat32","unpackIEEE754","getFloat64","setInt8","setUint8","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","ArrayBufferProto","$setInt8","isArray","original","UNSCOPABLES","descriptor","Constructor","next","to","inc","isInteger","isFinite","$at","point","forOf","microtask","newPromiseCapabilityModule","perform","promiseResolve","PROMISE","versions","v8","$Promise","isNode","empty","newGenericPromiseCapability","USE_NATIVE","FakePromise","isThenable","chain","ok","handler","reaction","domain","onHandleUnhandled","exited","isReject","onUnhandled","unhandled","isUnhandled","$reject","$resolve","_w","_d","Internal","executor","OwnPromiseCapability","Wrapper","$$reject","all","remaining","$index","alreadyCalled","race","ret","un","macrotask","Observer","flush","parent","head","last","characterData","each","assign","weak","WEAK_MAP","uncaughtFrozenStore","$WeakMap","InternalMap","method","gOPS","$assign","A","B","K","T","getSymbols","isEnum","$has","UncaughtFrozenStore","findUncaughtFrozen","getConstructor","ufstore","inheritIfRequired","ADDER","fixMethod","IS_WEAK","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","setPrototypeOf","check","buggy","mapFn","cb","isReadableStreamSupported","installedModules","modules","__w_pdfjs_require__","_typeof","_require","elements","IsPropertyKey","Call","F","AssertionError","Error","rethrowAssertionErrorRejection","_createClass","props","defineProperties","InvokeOrNoop","PromiseInvokeOrNoop","ValidateAndNormalizeQueuingStrategy","typeIsObject","_require2","_require3","DequeueValue","EnqueueValueWithSize","PeekQueueValue","ResetQueue","WritableStream","underlyingSink","_ref","_ref$highWaterMark","_classCallCheck","IsWritableStream","streamBrandCheckException","IsWritableStreamLocked","WritableStreamAbort","AcquireWritableStreamDefaultWriter","WritableStreamDefaultControllerError","WritableStreamDefaultWriterCloseWithErrorPropagation","WritableStreamDefaultWriterRelease","WritableStreamDefaultWriterWrite","WritableStreamCloseQueuedOrInFlight","wasAlreadyErroring","_resolve","_reject","_reason","_wasAlreadyErroring","WritableStreamStartErroring","writeRequest","WritableStreamFinishErroring","writer","WritableStreamDefaultWriterEnsureReadyPromiseRejected","WritableStreamHasOperationMarkedInFlight","storedError","WritableStreamRejectCloseAndClosedPromiseIfNeeded","abortRequest","WritableStreamDealWithRejection","defaultWriterClosedPromiseResolve","defaultWriterClosedPromiseReject","backpressure","defaultWriterReadyPromiseReset","defaultWriterReadyPromiseResolve","WritableStreamDefaultWriter","defaultWriterReadyPromiseInitialize","defaultWriterReadyPromiseInitializeAsResolved","defaultWriterClosedPromiseInitialize","defaultWriterReadyPromiseInitializeAsRejected","defaultWriterClosedPromiseInitializeAsResolved","defaultWriterClosedPromiseInitializeAsRejected","IsWritableStreamDefaultWriter","defaultWriterBrandCheckException","defaultWriterLockException","WritableStreamDefaultWriterAbort","WritableStreamDefaultWriterClose","WritableStreamDefaultWriterGetDesiredSize","closeRequest","WritableStreamDefaultControllerClose","defaultWriterClosedPromiseResetToRejected","defaultWriterReadyPromiseReject","defaultWriterReadyPromiseResetToRejected","WritableStreamDefaultControllerGetDesiredSize","releasedError","WritableStreamDefaultWriterEnsureClosedPromiseRejected","chunkSize","WritableStreamDefaultControllerGetChunkSize","WritableStreamAddWriteRequest","WritableStreamDefaultControllerWrite","WritableStreamDefaultController","normalizedStrategy","WritableStreamDefaultControllerGetBackpressure","WritableStreamUpdateBackpressure","IsWritableStreamDefaultController","_this","startResult","WritableStreamDefaultControllerAdvanceQueueIfNeeded","strategySize","WritableStreamDefaultControllerErrorIfNeeded","writeRecord","WritableStreamDefaultControllerProcessClose","WritableStreamDefaultControllerProcessWrite","WritableStreamMarkCloseRequestInFlight","sinkClosePromise","WritableStreamFinishInFlightClose","WritableStreamFinishInFlightCloseWithError","WritableStreamMarkFirstWriteRequestInFlight","sinkWritePromise","WritableStreamFinishInFlightWrite","WritableStreamFinishInFlightWriteWithError","IsFiniteNonNegativeNumber","pair","ArrayBufferCopy","CreateIterResultObject","TransferArrayBuffer","ValidateAndNormalizeHighWaterMark","createArrayFromList","createDataProperty","_require4","_require5","ReadableStream","underlyingSource","typeString","IsReadableStream","IsReadableStreamLocked","ReadableStreamCancel","_ref2","AcquireReadableStreamDefaultReader","AcquireReadableStreamBYOBReader","_ref3","readable","ifIsObjectAndHasAPromiseIsHandledInternalSlotSetPromiseIsHandledToTrue","_ref4","preventClose","preventAbort","preventCancel","Boolean","shuttingDown","currentWrite","_ref5","isOrBecomesErrored","shutdownWithAction","shutdown","isOrBecomesClosed","dest","destClosed","pipeLoop","oldCurrentWrite","waitForWritesToFinish","ReadableStreamReaderGenericRelease","branches","ReadableStreamTee","IsReadableStreamDisturbed","ReadableStreamDefaultControllerClose","ReadableStreamDefaultControllerEnqueue","ReadableStreamDefaultControllerError","ReadableStreamDefaultControllerGetDesiredSize","teeState","closedOrErrored","canceled1","canceled2","reason1","reason2","cancel1","cancel2","underlyingSource1","branch1Stream","underlyingSource2","branch2Stream","branch1","branch2","value1","value2","compositeReason","cancelResult","IsReadableStreamBYOBReader","readIntoRequest","IsReadableStreamDefaultReader","readRequest","ReadableStreamClose","sourceCancelPromise","defaultReaderClosedPromiseResolve","_i","defaultReaderClosedPromiseReject","ReadableStreamDefaultReader","ReadableStreamReaderGenericInitialize","defaultReaderBrandCheckException","readerLockException","ReadableStreamReaderGenericCancel","ReadableStreamDefaultReaderRead","ReadableStreamBYOBReader","IsReadableByteStreamController","byobReaderBrandCheckException","ArrayBuffer","ReadableStreamBYOBReaderRead","defaultReaderClosedPromiseInitialize","defaultReaderClosedPromiseInitializeAsResolved","defaultReaderClosedPromiseInitializeAsRejected","defaultReaderClosedPromiseResetToRejected","ReadableByteStreamControllerPullInto","ReadableStreamDefaultController","ReadableStreamDefaultControllerCallPullIfNeeded","ReadableStreamDefaultControllerErrorIfNeeded","IsReadableStreamDefaultController","defaultControllerBrandCheckException","pendingPromise","ReadableStreamAddReadRequest","shouldPull","ReadableStreamDefaultControllerShouldCallPull","pullPromise","ReadableStreamGetNumReadRequests","ReadableStreamFulfillReadRequest","ReadableStreamError","ReadableStreamBYOBRequest","IsReadableStreamBYOBRequest","byobRequestBrandCheckException","ReadableByteStreamControllerRespond","ReadableByteStreamControllerRespondWithNewView","ReadableByteStreamController","ReadableByteStreamControllerClearPendingPullIntos","autoAllocateChunkSize","underlyingByteSource","ReadableByteStreamControllerCallPullIfNeeded","ReadableByteStreamControllerError","byteStreamControllerBrandCheckException","ReadableByteStreamControllerClose","ReadableByteStreamControllerEnqueue","firstDescriptor","ReadableStreamHasDefaultReader","ReadableByteStreamControllerHandleQueueDrain","pullIntoDescriptor","byteOffset","bytesFilled","elementSize","ctor","readerType","ReadableByteStreamControllerGetDesiredSize","ReadableByteStreamControllerShouldCallPull","ReadableByteStreamControllerInvalidateBYOBRequest","filledView","ReadableByteStreamControllerConvertPullIntoDescriptor","ReadableStreamFulfillReadIntoRequest","currentAlignedBytes","maxBytesToCopy","maxBytesFilled","maxAlignedBytes","totalBytesToCopyRemaining","headOfQueue","bytesToCopy","destStart","ReadableByteStreamControllerFillHeadPullIntoDescriptor","ReadableByteStreamControllerFillPullIntoDescriptorFromQueue","ReadableByteStreamControllerShiftPendingPullInto","ReadableByteStreamControllerCommitPullIntoDescriptor","ReadableStreamAddReadIntoRequest","emptyView","ReadableStreamHasBYOBReader","ReadableStreamGetNumReadIntoRequests","remainderSize","remainder","ReadableByteStreamControllerEnqueueChunkToQueue","ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue","bytesWritten","ReadableByteStreamControllerRespondInClosedState","ReadableByteStreamControllerRespondInReadableState","firstPendingPullInto","transferredBuffer","transferredView","ReadableByteStreamControllerRespondInternal","transformStream","writableStream","PromiseInvokeOrPerformFallback","TransformStreamCloseReadableInternal","TransformStreamErrorIfNeeded","maybeBackpressure","TransformStreamSetBackpressure","TransformStreamErrorInternal","resolution","transformStreamController","TransformStreamEnqueueToReadable","transformer","transformPromise","TransformStreamReadableReadyPromise","TransformStreamSink","TransformStreamTransform","flushPromise","TransformStreamSource","TransformStreamDefaultController","IsTransformStream","IsTransformStreamDefaultController","TransformStreamCloseReadable","TransformStreamError","readableController","TransformStream","readableStrategy","writableStrategy","startPromise_resolve","startPromise","setVerbosityLevel","savedOpenExternalLinksInNewWindow","requests","nextRequestId","FontLoader","insertRule","styleElement","styleSheet","getLoadTestFont","atob","rules","fontsToLoad","fontLoadPromises","getNativeFontPromise","nativeFontFace","isFontLoadingAPISupported","fonts","rule","otherRequest","requestId","started","chunk1","chunk2","called","isFontReady","loadTestFontId","COMMENT_OFFSET","spliceString","CFF_CHECKSUM_OFFSET","XXXX_VALUE","checksum","int32","string32","btoa","isSyncFontLoadingSupported","supported","IsEvalSupportedCached","FontFaceObject","translatedData","createNativeFontFace","createFontFaceRule","bytesToString","fontName","getPathGenerator","cmds","js","MIN_FONT_SIZE","MAX_FONT_SIZE","MAX_GROUP_SIZE","MIN_WIDTH_FACTOR","COMPILE_TYPE3_GLYPHS","MAX_SIZE_TO_COMPILE","FULL_CHUNK_HEIGHT","IsLittleEndianCached","ad_bc","bc_ad","cosValue","sinValue","CachedCanvases","getCanvas","canvasEntry","addContextCurrentTransform","POINT_TO_PROCESS_LIMIT","width1","POINT_TYPES","data0","elem","j0","sum","steps","outlines","p0","pp","drawOutline","CanvasExtraState","CanvasGraphics","EXECUTION_TIME","EXECUTION_STEPS","partialChunkHeight","fullChunks","totalChunks","chunkImgData","srcPos","srcLength","dest32","dest32DataLength","fullSrcDiff","white","black","thisChunkHeight","destPos","srcDiff","kEnd","kEndUnrolled","srcByte","elemsInThisChunk","property","sourceCtx","destCtx","alpha_","r0","g0","b0","maskData","transferMap","layerData","hasBackdrop","backdrop","composeFn","PIXELS_TO_PROCESS","chunkHeight","maskCtx","layerCtx","composeSMaskBackdrop","composed","genericComposeSMask","NORMAL_CLIP","EO_CLIP","beginDrawing","transparentCanvas","resetCtxToDefault","executeOperatorList","executionStartIdx","argsArrayLen","chunkOperations","endTime","commonObjs","stepper","depObjId","objsPool","endDrawing","beginSMaskGroup","activeSMask","drawnWidth","drawnHeight","cacheId","scratchCanvas","currentCtx","currentTransform","groupCtx","copyCtxState","suspendSMaskGroup","composeSMask","deltaTransform","resumeSMaskGroup","endSMaskGroup","consumePath","strokeColor","isPatternFill","needRestore","paths","path","typeface","browserFontSize","paintChar","textRenderingMode","fillStrokeMode","isAddToPathSet","addToPath","fontSizeScale","spacingDir","defaultVMetrics","simpleFillText","lineWidth","restoreNeeded","accent","vmetric","vx","vy","scaledX","scaledY","measuredWidth","characterScaleX","scaledAccentX","scaledAccentY","showType3Text","fontMatrix","isTextInvisible","spacingLength","transformed","urx","ury","getColorN_Pattern","IR","baseTransform","canvasGraphicsFactory","createCanvasGraphics","pattern","getShadingPatternFromIR","inv","bl","ul","ur","x0","y0","canvasBounds","offsetX","offsetY","scaleX","scaleY","startTransformInverse","domImage","position","maskCanvas","putBinaryImageMask","positions","images","widthScale","heightScale","imgToPaint","putBinaryImageData","paintWidth","paintHeight","tmpCanvasId","newWidth","newHeight","getSinglePixelWidth","inverse","getCanvasPosition","ShadingIRs","fromIR","raw","colorStops","r1","getPattern","grad","createMeshCanvas","rowSize","c1","c2","c3","x3","y3","c1r","c1g","c1b","c2r","c2g","c2b","c3r","c3g","c3b","minY","maxY","xa","car","cag","cab","xb","cbr","cbg","cbb","x1_","x2_","verticesPerRow","drawTriangle","EXPECTED_SCALE","MAX_PATTERN_SIZE","BORDER_SIZE","boundsWidth","boundsHeight","combinesScale","paddedWidth","paddedHeight","cachedCanvases","drawFigure","owner","matrixScale","temporaryPatternCanvas","shadingIR","TilingPattern","PaintType","COLORED","UNCOLORED","createPatternCanvas","xstep","ystep","paintType","tilingType","topLeft","botRight","curMatrixScale","combinedScale","graphics","tmpTranslate","setScale","transformToScale","tmpScale","scaleToContext","clipBbox","bboxWidth","bboxHeight","setFillAndStrokeStyleToContext","cssColor","XMLParserErrorCode","NoError","EndOfDocument","UnterminatedCdat","UnterminatedXmlDeclaration","UnterminatedDoctypeDeclaration","UnterminatedComment","MalformedElement","OutOfMemory","UnterminatedAttributeValue","UnterminatedElement","ElementNeverBegun","_resolveEntities","entity","_parseContent","attributes","attrName","attrValue","attrEndChar","attrEndIndex","parsed","_parseProcessingInstruction","attrStart","parseXml","ch2","q2","complexDoctype","doctypeContent","onResolveEntity","onPi","onComment","onCdata","onDoctype","onText","onBeginElement","onEndElement","onError","child","parseFromString","isWhitespaceString","lastElement","PDFDataTransportStream","initialData","_onReceiveData","found","rangeReader","_onProgress","firstReader","_removeRangeReader","getFullReader","queuedChunks","getRangeReader","cancelAllRequests","readers","PDFDataTransportStreamReader","_enqueue","requestCapability","read","PDFDataTransportStreamRangeReader","requestsCapability","fs","http","https","options","_error","_setReadableStream","protocol","auth","handleResponse","isHttp","createRequestOptions","decodeURI","credentials","withCredentials","redirect","createFetchOptions","validateResponseStatus","response","createResponseStatusError","rangeStr","begin","OK_RESPONSE","PARTIAL_CONTENT_RESPONSE","supportsMozChunked","NetworkManager","requestRange","requestFull","xhrId","pendingRequest","useMozChunkedLoading","onProgress","getArrayBuffer","onStateChange","xhrStatus","ok_response_on_range_request","rangeHeader","matches","hasPendingRequests","getRequestXhr","isStreamingRequest","isPendingRequest","isLoadedRequest","abortAllRequests","httpHeaders","_onRangeRequestReaderClosed","onHeadersReceived","onProgressiveData","onDone","manager","PDFNetworkStreamFullRequestReader","_onHeadersReceived","fullRequestXhrId","fullRequestXhr","networkManager","_onProgressiveData","_onDone","_onError","PDFNetworkStreamRangeRequestReader","_close"],"mappings":";;;;;;;;;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AAhB;AAFqE;AAvB5B;AA+B7C,6BAA2B;AACzB,WADyB,KACzB;AAhC2C;AAmC7C61C,QAAM,mDAAmD;AACvD,QAAI,sBAAJ,MAAgC;AAC9B,UAAI38D,QAAQ,KADkB,YAC9B;AACA,0BAF8B,IAE9B;AACA,aAAO,gBAAgB;AAAEU,eAAF;AAAgBuU,cAAhB;AAAA,OAAhB,CAAP;AAJqD;AAMvD,QAAI,KAAJ,OAAgB;AACd,aAAO,gBAAgB;AAAEvU,eAAF;AAAoBuU,cAApB;AAAA,OAAhB,CAAP;AAPqD;AASvD,QAAIynD,oBATmD,oCASvD;AACA,wBAVuD,iBAUvD;AACA,WAAOA,kBAXgD,OAWvD;AA9C2C;AAiD7CjzD,UAAQ,2DAA2D;AACjE,iBADiE,IACjE;AACA,2BAAuB,6BAA6B;AAClDizD,gCAA0B;AAAEh8D,eAAF;AAAoBuU,cAApB;AAAA,OAA1BynD;AAH+D,KAEjE;AAGA,qBALiE,EAKjE;AACA,QAAI,+BAA+B,KAAnC,UAAI,CAAJ,EAAqD;AACnD,iCAA2B,KADwB,UACnD;AAP+D;AASjE,SATiE,MASjE;AA1D2C;AAAA,CAA/C6D;QA8DA,gB,GAAA,gB;QAAA,c,GAAA,c","file":"pdf.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"pdfjs-dist/build/pdf\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"pdfjs-dist/build/pdf\"] = factory();\n\telse\n\t\troot[\"pdfjs-dist/build/pdf\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __w_pdfjs_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __w_pdfjs_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__w_pdfjs_require__.m = modules;\n\n \t// expose the module cache\n \t__w_pdfjs_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__w_pdfjs_require__.d = function(exports, name, getter) {\n \t\tif(!__w_pdfjs_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__w_pdfjs_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__w_pdfjs_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__w_pdfjs_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__w_pdfjs_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __w_pdfjs_require__(__w_pdfjs_require__.s = 75);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c9be985464785b4e5413","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport './compatibility';\nimport { ReadableStream } from './streams_polyfill';\n\nvar FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];\n\nconst NativeImageDecoding = {\n NONE: 'none',\n DECODE: 'decode',\n DISPLAY: 'display',\n};\n\nvar TextRenderingMode = {\n FILL: 0,\n STROKE: 1,\n FILL_STROKE: 2,\n INVISIBLE: 3,\n FILL_ADD_TO_PATH: 4,\n STROKE_ADD_TO_PATH: 5,\n FILL_STROKE_ADD_TO_PATH: 6,\n ADD_TO_PATH: 7,\n FILL_STROKE_MASK: 3,\n ADD_TO_PATH_FLAG: 4,\n};\n\nvar ImageKind = {\n GRAYSCALE_1BPP: 1,\n RGB_24BPP: 2,\n RGBA_32BPP: 3,\n};\n\nvar AnnotationType = {\n TEXT: 1,\n LINK: 2,\n FREETEXT: 3,\n LINE: 4,\n SQUARE: 5,\n CIRCLE: 6,\n POLYGON: 7,\n POLYLINE: 8,\n HIGHLIGHT: 9,\n UNDERLINE: 10,\n SQUIGGLY: 11,\n STRIKEOUT: 12,\n STAMP: 13,\n CARET: 14,\n INK: 15,\n POPUP: 16,\n FILEATTACHMENT: 17,\n SOUND: 18,\n MOVIE: 19,\n WIDGET: 20,\n SCREEN: 21,\n PRINTERMARK: 22,\n TRAPNET: 23,\n WATERMARK: 24,\n THREED: 25,\n REDACT: 26,\n};\n\nvar AnnotationFlag = {\n INVISIBLE: 0x01,\n HIDDEN: 0x02,\n PRINT: 0x04,\n NOZOOM: 0x08,\n NOROTATE: 0x10,\n NOVIEW: 0x20,\n READONLY: 0x40,\n LOCKED: 0x80,\n TOGGLENOVIEW: 0x100,\n LOCKEDCONTENTS: 0x200,\n};\n\nvar AnnotationFieldFlag = {\n READONLY: 0x0000001,\n REQUIRED: 0x0000002,\n NOEXPORT: 0x0000004,\n MULTILINE: 0x0001000,\n PASSWORD: 0x0002000,\n NOTOGGLETOOFF: 0x0004000,\n RADIO: 0x0008000,\n PUSHBUTTON: 0x0010000,\n COMBO: 0x0020000,\n EDIT: 0x0040000,\n SORT: 0x0080000,\n FILESELECT: 0x0100000,\n MULTISELECT: 0x0200000,\n DONOTSPELLCHECK: 0x0400000,\n DONOTSCROLL: 0x0800000,\n COMB: 0x1000000,\n RICHTEXT: 0x2000000,\n RADIOSINUNISON: 0x2000000,\n COMMITONSELCHANGE: 0x4000000,\n};\n\nvar AnnotationBorderStyleType = {\n SOLID: 1,\n DASHED: 2,\n BEVELED: 3,\n INSET: 4,\n UNDERLINE: 5,\n};\n\nvar StreamType = {\n UNKNOWN: 0,\n FLATE: 1,\n LZW: 2,\n DCT: 3,\n JPX: 4,\n JBIG: 5,\n A85: 6,\n AHX: 7,\n CCF: 8,\n RL: 9,\n};\n\nvar FontType = {\n UNKNOWN: 0,\n TYPE1: 1,\n TYPE1C: 2,\n CIDFONTTYPE0: 3,\n CIDFONTTYPE0C: 4,\n TRUETYPE: 5,\n CIDFONTTYPE2: 6,\n TYPE3: 7,\n OPENTYPE: 8,\n TYPE0: 9,\n MMTYPE1: 10,\n};\n\nvar VERBOSITY_LEVELS = {\n errors: 0,\n warnings: 1,\n infos: 5,\n};\n\nvar CMapCompressionType = {\n NONE: 0,\n BINARY: 1,\n STREAM: 2,\n};\n\n// All the possible operations for an operator list.\nvar OPS = {\n // Intentionally start from 1 so it is easy to spot bad operators that will be\n // 0's.\n dependency: 1,\n setLineWidth: 2,\n setLineCap: 3,\n setLineJoin: 4,\n setMiterLimit: 5,\n setDash: 6,\n setRenderingIntent: 7,\n setFlatness: 8,\n setGState: 9,\n save: 10,\n restore: 11,\n transform: 12,\n moveTo: 13,\n lineTo: 14,\n curveTo: 15,\n curveTo2: 16,\n curveTo3: 17,\n closePath: 18,\n rectangle: 19,\n stroke: 20,\n closeStroke: 21,\n fill: 22,\n eoFill: 23,\n fillStroke: 24,\n eoFillStroke: 25,\n closeFillStroke: 26,\n closeEOFillStroke: 27,\n endPath: 28,\n clip: 29,\n eoClip: 30,\n beginText: 31,\n endText: 32,\n setCharSpacing: 33,\n setWordSpacing: 34,\n setHScale: 35,\n setLeading: 36,\n setFont: 37,\n setTextRenderingMode: 38,\n setTextRise: 39,\n moveText: 40,\n setLeadingMoveText: 41,\n setTextMatrix: 42,\n nextLine: 43,\n showText: 44,\n showSpacedText: 45,\n nextLineShowText: 46,\n nextLineSetSpacingShowText: 47,\n setCharWidth: 48,\n setCharWidthAndBounds: 49,\n setStrokeColorSpace: 50,\n setFillColorSpace: 51,\n setStrokeColor: 52,\n setStrokeColorN: 53,\n setFillColor: 54,\n setFillColorN: 55,\n setStrokeGray: 56,\n setFillGray: 57,\n setStrokeRGBColor: 58,\n setFillRGBColor: 59,\n setStrokeCMYKColor: 60,\n setFillCMYKColor: 61,\n shadingFill: 62,\n beginInlineImage: 63,\n beginImageData: 64,\n endInlineImage: 65,\n paintXObject: 66,\n markPoint: 67,\n markPointProps: 68,\n beginMarkedContent: 69,\n beginMarkedContentProps: 70,\n endMarkedContent: 71,\n beginCompat: 72,\n endCompat: 73,\n paintFormXObjectBegin: 74,\n paintFormXObjectEnd: 75,\n beginGroup: 76,\n endGroup: 77,\n beginAnnotations: 78,\n endAnnotations: 79,\n beginAnnotation: 80,\n endAnnotation: 81,\n paintJpegXObject: 82,\n paintImageMaskXObject: 83,\n paintImageMaskXObjectGroup: 84,\n paintImageXObject: 85,\n paintInlineImageXObject: 86,\n paintInlineImageXObjectGroup: 87,\n paintImageXObjectRepeat: 88,\n paintImageMaskXObjectRepeat: 89,\n paintSolidColorImageMask: 90,\n constructPath: 91,\n};\n\nvar verbosity = VERBOSITY_LEVELS.warnings;\n\nfunction setVerbosityLevel(level) {\n verbosity = level;\n}\n\nfunction getVerbosityLevel() {\n return verbosity;\n}\n\n// A notice for devs. These are good for things that are helpful to devs, such\n// as warning that Workers were disabled, which is important to devs but not\n// end users.\nfunction info(msg) {\n if (verbosity >= VERBOSITY_LEVELS.infos) {\n console.log('Info: ' + msg);\n }\n}\n\n// Non-fatal warnings.\nfunction warn(msg) {\n if (verbosity >= VERBOSITY_LEVELS.warnings) {\n console.log('Warning: ' + msg);\n }\n}\n\n// Deprecated API function -- display regardless of the PDFJS.verbosity setting.\nfunction deprecated(details) {\n console.log('Deprecated API usage: ' + details);\n}\n\nfunction unreachable(msg) {\n throw new Error(msg);\n}\n\nfunction assert(cond, msg) {\n if (!cond) {\n unreachable(msg);\n }\n}\n\nvar UNSUPPORTED_FEATURES = {\n unknown: 'unknown',\n forms: 'forms',\n javaScript: 'javaScript',\n smask: 'smask',\n shadingPattern: 'shadingPattern',\n font: 'font',\n};\n\n// Checks if URLs have the same origin. For non-HTTP based URLs, returns false.\nfunction isSameOrigin(baseUrl, otherUrl) {\n try {\n var base = new URL(baseUrl);\n if (!base.origin || base.origin === 'null') {\n return false; // non-HTTP url\n }\n } catch (e) {\n return false;\n }\n\n var other = new URL(otherUrl, base);\n return base.origin === other.origin;\n}\n\n// Checks if URLs use one of the whitelisted protocols, e.g. to avoid XSS.\nfunction isValidProtocol(url) {\n if (!url) {\n return false;\n }\n switch (url.protocol) {\n case 'http:':\n case 'https:':\n case 'ftp:':\n case 'mailto:':\n case 'tel:':\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Attempts to create a valid absolute URL (utilizing `isValidProtocol`).\n * @param {URL|string} url - An absolute, or relative, URL.\n * @param {URL|string} baseUrl - An absolute URL.\n * @returns Either a valid {URL}, or `null` otherwise.\n */\nfunction createValidAbsoluteUrl(url, baseUrl) {\n if (!url) {\n return null;\n }\n try {\n var absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url);\n if (isValidProtocol(absoluteUrl)) {\n return absoluteUrl;\n }\n } catch (ex) { /* `new URL()` will throw on incorrect data. */ }\n return null;\n}\n\nfunction shadow(obj, prop, value) {\n Object.defineProperty(obj, prop, { value,\n enumerable: true,\n configurable: true,\n writable: false, });\n return value;\n}\n\nfunction getLookupTableFactory(initializer) {\n var lookup;\n return function () {\n if (initializer) {\n lookup = Object.create(null);\n initializer(lookup);\n initializer = null;\n }\n return lookup;\n };\n}\n\nvar PasswordResponses = {\n NEED_PASSWORD: 1,\n INCORRECT_PASSWORD: 2,\n};\n\nvar PasswordException = (function PasswordExceptionClosure() {\n function PasswordException(msg, code) {\n this.name = 'PasswordException';\n this.message = msg;\n this.code = code;\n }\n\n PasswordException.prototype = new Error();\n PasswordException.constructor = PasswordException;\n\n return PasswordException;\n})();\n\nvar UnknownErrorException = (function UnknownErrorExceptionClosure() {\n function UnknownErrorException(msg, details) {\n this.name = 'UnknownErrorException';\n this.message = msg;\n this.details = details;\n }\n\n UnknownErrorException.prototype = new Error();\n UnknownErrorException.constructor = UnknownErrorException;\n\n return UnknownErrorException;\n})();\n\nvar InvalidPDFException = (function InvalidPDFExceptionClosure() {\n function InvalidPDFException(msg) {\n this.name = 'InvalidPDFException';\n this.message = msg;\n }\n\n InvalidPDFException.prototype = new Error();\n InvalidPDFException.constructor = InvalidPDFException;\n\n return InvalidPDFException;\n})();\n\nvar MissingPDFException = (function MissingPDFExceptionClosure() {\n function MissingPDFException(msg) {\n this.name = 'MissingPDFException';\n this.message = msg;\n }\n\n MissingPDFException.prototype = new Error();\n MissingPDFException.constructor = MissingPDFException;\n\n return MissingPDFException;\n})();\n\nvar UnexpectedResponseException =\n (function UnexpectedResponseExceptionClosure() {\n function UnexpectedResponseException(msg, status) {\n this.name = 'UnexpectedResponseException';\n this.message = msg;\n this.status = status;\n }\n\n UnexpectedResponseException.prototype = new Error();\n UnexpectedResponseException.constructor = UnexpectedResponseException;\n\n return UnexpectedResponseException;\n})();\n\nvar NotImplementedException = (function NotImplementedExceptionClosure() {\n function NotImplementedException(msg) {\n this.message = msg;\n }\n\n NotImplementedException.prototype = new Error();\n NotImplementedException.prototype.name = 'NotImplementedException';\n NotImplementedException.constructor = NotImplementedException;\n\n return NotImplementedException;\n})();\n\nvar MissingDataException = (function MissingDataExceptionClosure() {\n function MissingDataException(begin, end) {\n this.begin = begin;\n this.end = end;\n this.message = 'Missing data [' + begin + ', ' + end + ')';\n }\n\n MissingDataException.prototype = new Error();\n MissingDataException.prototype.name = 'MissingDataException';\n MissingDataException.constructor = MissingDataException;\n\n return MissingDataException;\n})();\n\nvar XRefParseException = (function XRefParseExceptionClosure() {\n function XRefParseException(msg) {\n this.message = msg;\n }\n\n XRefParseException.prototype = new Error();\n XRefParseException.prototype.name = 'XRefParseException';\n XRefParseException.constructor = XRefParseException;\n\n return XRefParseException;\n})();\n\n/**\n * Error caused during parsing PDF data.\n */\nlet FormatError = (function FormatErrorClosure() {\n function FormatError(msg) {\n this.message = msg;\n }\n\n FormatError.prototype = new Error();\n FormatError.prototype.name = 'FormatError';\n FormatError.constructor = FormatError;\n\n return FormatError;\n})();\n\n/**\n * Error used to indicate task cancellation.\n */\nlet AbortException = (function AbortExceptionClosure() {\n function AbortException(msg) {\n this.name = 'AbortException';\n this.message = msg;\n }\n\n AbortException.prototype = new Error();\n AbortException.constructor = AbortException;\n\n return AbortException;\n})();\n\nvar NullCharactersRegExp = /\\x00/g;\n\nfunction removeNullCharacters(str) {\n if (typeof str !== 'string') {\n warn('The argument for removeNullCharacters must be a string.');\n return str;\n }\n return str.replace(NullCharactersRegExp, '');\n}\n\nfunction bytesToString(bytes) {\n assert(bytes !== null && typeof bytes === 'object' &&\n bytes.length !== undefined, 'Invalid argument for bytesToString');\n var length = bytes.length;\n var MAX_ARGUMENT_COUNT = 8192;\n if (length < MAX_ARGUMENT_COUNT) {\n return String.fromCharCode.apply(null, bytes);\n }\n var strBuf = [];\n for (var i = 0; i < length; i += MAX_ARGUMENT_COUNT) {\n var chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);\n var chunk = bytes.subarray(i, chunkEnd);\n strBuf.push(String.fromCharCode.apply(null, chunk));\n }\n return strBuf.join('');\n}\n\nfunction stringToBytes(str) {\n assert(typeof str === 'string', 'Invalid argument for stringToBytes');\n var length = str.length;\n var bytes = new Uint8Array(length);\n for (var i = 0; i < length; ++i) {\n bytes[i] = str.charCodeAt(i) & 0xFF;\n }\n return bytes;\n}\n\n/**\n * Gets length of the array (Array, Uint8Array, or string) in bytes.\n * @param {Array|Uint8Array|string} arr\n * @returns {number}\n */\nfunction arrayByteLength(arr) {\n if (arr.length !== undefined) {\n return arr.length;\n }\n assert(arr.byteLength !== undefined);\n return arr.byteLength;\n}\n\n/**\n * Combines array items (arrays) into single Uint8Array object.\n * @param {Array} arr - the array of the arrays (Array, Uint8Array, or string).\n * @returns {Uint8Array}\n */\nfunction arraysToBytes(arr) {\n // Shortcut: if first and only item is Uint8Array, return it.\n if (arr.length === 1 && (arr[0] instanceof Uint8Array)) {\n return arr[0];\n }\n var resultLength = 0;\n var i, ii = arr.length;\n var item, itemLength;\n for (i = 0; i < ii; i++) {\n item = arr[i];\n itemLength = arrayByteLength(item);\n resultLength += itemLength;\n }\n var pos = 0;\n var data = new Uint8Array(resultLength);\n for (i = 0; i < ii; i++) {\n item = arr[i];\n if (!(item instanceof Uint8Array)) {\n if (typeof item === 'string') {\n item = stringToBytes(item);\n } else {\n item = new Uint8Array(item);\n }\n }\n itemLength = item.byteLength;\n data.set(item, pos);\n pos += itemLength;\n }\n return data;\n}\n\nfunction string32(value) {\n return String.fromCharCode((value >> 24) & 0xff, (value >> 16) & 0xff,\n (value >> 8) & 0xff, value & 0xff);\n}\n\nfunction log2(x) {\n var n = 1, i = 0;\n while (x > n) {\n n <<= 1;\n i++;\n }\n return i;\n}\n\nfunction readInt8(data, start) {\n return (data[start] << 24) >> 24;\n}\n\nfunction readUint16(data, offset) {\n return (data[offset] << 8) | data[offset + 1];\n}\n\nfunction readUint32(data, offset) {\n return ((data[offset] << 24) | (data[offset + 1] << 16) |\n (data[offset + 2] << 8) | data[offset + 3]) >>> 0;\n}\n\n// Lazy test the endianness of the platform\n// NOTE: This will be 'true' for simulated TypedArrays\nfunction isLittleEndian() {\n var buffer8 = new Uint8Array(4);\n buffer8[0] = 1;\n var view32 = new Uint32Array(buffer8.buffer, 0, 1);\n return (view32[0] === 1);\n}\n\n// Checks if it's possible to eval JS expressions.\nfunction isEvalSupported() {\n try {\n new Function(''); // eslint-disable-line no-new, no-new-func\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];\n\nvar Util = (function UtilClosure() {\n function Util() {}\n\n var rgbBuf = ['rgb(', 0, ',', 0, ',', 0, ')'];\n\n // makeCssRgb() can be called thousands of times. Using |rgbBuf| avoids\n // creating many intermediate strings.\n Util.makeCssRgb = function Util_makeCssRgb(r, g, b) {\n rgbBuf[1] = r;\n rgbBuf[3] = g;\n rgbBuf[5] = b;\n return rgbBuf.join('');\n };\n\n // Concatenates two transformation matrices together and returns the result.\n Util.transform = function Util_transform(m1, m2) {\n return [\n m1[0] * m2[0] + m1[2] * m2[1],\n m1[1] * m2[0] + m1[3] * m2[1],\n m1[0] * m2[2] + m1[2] * m2[3],\n m1[1] * m2[2] + m1[3] * m2[3],\n m1[0] * m2[4] + m1[2] * m2[5] + m1[4],\n m1[1] * m2[4] + m1[3] * m2[5] + m1[5]\n ];\n };\n\n // For 2d affine transforms\n Util.applyTransform = function Util_applyTransform(p, m) {\n var xt = p[0] * m[0] + p[1] * m[2] + m[4];\n var yt = p[0] * m[1] + p[1] * m[3] + m[5];\n return [xt, yt];\n };\n\n Util.applyInverseTransform = function Util_applyInverseTransform(p, m) {\n var d = m[0] * m[3] - m[1] * m[2];\n var xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;\n var yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;\n return [xt, yt];\n };\n\n // Applies the transform to the rectangle and finds the minimum axially\n // aligned bounding box.\n Util.getAxialAlignedBoundingBox =\n function Util_getAxialAlignedBoundingBox(r, m) {\n\n var p1 = Util.applyTransform(r, m);\n var p2 = Util.applyTransform(r.slice(2, 4), m);\n var p3 = Util.applyTransform([r[0], r[3]], m);\n var p4 = Util.applyTransform([r[2], r[1]], m);\n return [\n Math.min(p1[0], p2[0], p3[0], p4[0]),\n Math.min(p1[1], p2[1], p3[1], p4[1]),\n Math.max(p1[0], p2[0], p3[0], p4[0]),\n Math.max(p1[1], p2[1], p3[1], p4[1])\n ];\n };\n\n Util.inverseTransform = function Util_inverseTransform(m) {\n var d = m[0] * m[3] - m[1] * m[2];\n return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d,\n (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d];\n };\n\n // Apply a generic 3d matrix M on a 3-vector v:\n // | a b c | | X |\n // | d e f | x | Y |\n // | g h i | | Z |\n // M is assumed to be serialized as [a,b,c,d,e,f,g,h,i],\n // with v as [X,Y,Z]\n Util.apply3dTransform = function Util_apply3dTransform(m, v) {\n return [\n m[0] * v[0] + m[1] * v[1] + m[2] * v[2],\n m[3] * v[0] + m[4] * v[1] + m[5] * v[2],\n m[6] * v[0] + m[7] * v[1] + m[8] * v[2]\n ];\n };\n\n // This calculation uses Singular Value Decomposition.\n // The SVD can be represented with formula A = USV. We are interested in the\n // matrix S here because it represents the scale values.\n Util.singularValueDecompose2dScale =\n function Util_singularValueDecompose2dScale(m) {\n\n var transpose = [m[0], m[2], m[1], m[3]];\n\n // Multiply matrix m with its transpose.\n var a = m[0] * transpose[0] + m[1] * transpose[2];\n var b = m[0] * transpose[1] + m[1] * transpose[3];\n var c = m[2] * transpose[0] + m[3] * transpose[2];\n var d = m[2] * transpose[1] + m[3] * transpose[3];\n\n // Solve the second degree polynomial to get roots.\n var first = (a + d) / 2;\n var second = Math.sqrt((a + d) * (a + d) - 4 * (a * d - c * b)) / 2;\n var sx = first + second || 1;\n var sy = first - second || 1;\n\n // Scale values are the square roots of the eigenvalues.\n return [Math.sqrt(sx), Math.sqrt(sy)];\n };\n\n // Normalize rectangle rect=[x1, y1, x2, y2] so that (x1,y1) < (x2,y2)\n // For coordinate systems whose origin lies in the bottom-left, this\n // means normalization to (BL,TR) ordering. For systems with origin in the\n // top-left, this means (TL,BR) ordering.\n Util.normalizeRect = function Util_normalizeRect(rect) {\n var r = rect.slice(0); // clone rect\n if (rect[0] > rect[2]) {\n r[0] = rect[2];\n r[2] = rect[0];\n }\n if (rect[1] > rect[3]) {\n r[1] = rect[3];\n r[3] = rect[1];\n }\n return r;\n };\n\n // Returns a rectangle [x1, y1, x2, y2] corresponding to the\n // intersection of rect1 and rect2. If no intersection, returns 'false'\n // The rectangle coordinates of rect1, rect2 should be [x1, y1, x2, y2]\n Util.intersect = function Util_intersect(rect1, rect2) {\n function compare(a, b) {\n return a - b;\n }\n\n // Order points along the axes\n var orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare),\n orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare),\n result = [];\n\n rect1 = Util.normalizeRect(rect1);\n rect2 = Util.normalizeRect(rect2);\n\n // X: first and second points belong to different rectangles?\n if ((orderedX[0] === rect1[0] && orderedX[1] === rect2[0]) ||\n (orderedX[0] === rect2[0] && orderedX[1] === rect1[0])) {\n // Intersection must be between second and third points\n result[0] = orderedX[1];\n result[2] = orderedX[2];\n } else {\n return false;\n }\n\n // Y: first and second points belong to different rectangles?\n if ((orderedY[0] === rect1[1] && orderedY[1] === rect2[1]) ||\n (orderedY[0] === rect2[1] && orderedY[1] === rect1[1])) {\n // Intersection must be between second and third points\n result[1] = orderedY[1];\n result[3] = orderedY[2];\n } else {\n return false;\n }\n\n return result;\n };\n\n var ROMAN_NUMBER_MAP = [\n '', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM',\n '', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC',\n '', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'\n ];\n /**\n * Converts positive integers to (upper case) Roman numerals.\n * @param {integer} number - The number that should be converted.\n * @param {boolean} lowerCase - Indicates if the result should be converted\n * to lower case letters. The default is false.\n * @return {string} The resulting Roman number.\n */\n Util.toRoman = function Util_toRoman(number, lowerCase) {\n assert(Number.isInteger(number) && number > 0,\n 'The number should be a positive integer.');\n var pos, romanBuf = [];\n // Thousands\n while (number >= 1000) {\n number -= 1000;\n romanBuf.push('M');\n }\n // Hundreds\n pos = (number / 100) | 0;\n number %= 100;\n romanBuf.push(ROMAN_NUMBER_MAP[pos]);\n // Tens\n pos = (number / 10) | 0;\n number %= 10;\n romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]);\n // Ones\n romanBuf.push(ROMAN_NUMBER_MAP[20 + number]);\n\n var romanStr = romanBuf.join('');\n return (lowerCase ? romanStr.toLowerCase() : romanStr);\n };\n\n Util.appendToArray = function Util_appendToArray(arr1, arr2) {\n Array.prototype.push.apply(arr1, arr2);\n };\n\n Util.prependToArray = function Util_prependToArray(arr1, arr2) {\n Array.prototype.unshift.apply(arr1, arr2);\n };\n\n Util.extendObj = function extendObj(obj1, obj2) {\n for (var key in obj2) {\n obj1[key] = obj2[key];\n }\n };\n\n Util.getInheritableProperty =\n function Util_getInheritableProperty(dict, name, getArray) {\n while (dict && !dict.has(name)) {\n dict = dict.get('Parent');\n }\n if (!dict) {\n return null;\n }\n return getArray ? dict.getArray(name) : dict.get(name);\n };\n\n Util.inherit = function Util_inherit(sub, base, prototype) {\n sub.prototype = Object.create(base.prototype);\n sub.prototype.constructor = sub;\n for (var prop in prototype) {\n sub.prototype[prop] = prototype[prop];\n }\n };\n\n Util.loadScript = function Util_loadScript(src, callback) {\n var script = document.createElement('script');\n var loaded = false;\n script.setAttribute('src', src);\n if (callback) {\n script.onload = function() {\n if (!loaded) {\n callback();\n }\n loaded = true;\n };\n }\n document.getElementsByTagName('head')[0].appendChild(script);\n };\n\n return Util;\n})();\n\n/**\n * PDF page viewport created based on scale, rotation and offset.\n * @class\n * @alias PageViewport\n */\nvar PageViewport = (function PageViewportClosure() {\n /**\n * @constructor\n * @private\n * @param viewBox {Array} xMin, yMin, xMax and yMax coordinates.\n * @param scale {number} scale of the viewport.\n * @param rotation {number} rotations of the viewport in degrees.\n * @param offsetX {number} offset X\n * @param offsetY {number} offset Y\n * @param dontFlip {boolean} if true, axis Y will not be flipped.\n */\n function PageViewport(viewBox, scale, rotation, offsetX, offsetY, dontFlip) {\n this.viewBox = viewBox;\n this.scale = scale;\n this.rotation = rotation;\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n // creating transform to convert pdf coordinate system to the normal\n // canvas like coordinates taking in account scale and rotation\n var centerX = (viewBox[2] + viewBox[0]) / 2;\n var centerY = (viewBox[3] + viewBox[1]) / 2;\n var rotateA, rotateB, rotateC, rotateD;\n rotation = rotation % 360;\n rotation = rotation < 0 ? rotation + 360 : rotation;\n switch (rotation) {\n case 180:\n rotateA = -1; rotateB = 0; rotateC = 0; rotateD = 1;\n break;\n case 90:\n rotateA = 0; rotateB = 1; rotateC = 1; rotateD = 0;\n break;\n case 270:\n rotateA = 0; rotateB = -1; rotateC = -1; rotateD = 0;\n break;\n // case 0:\n default:\n rotateA = 1; rotateB = 0; rotateC = 0; rotateD = -1;\n break;\n }\n\n if (dontFlip) {\n rotateC = -rotateC; rotateD = -rotateD;\n }\n\n var offsetCanvasX, offsetCanvasY;\n var width, height;\n if (rotateA === 0) {\n offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;\n offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;\n width = Math.abs(viewBox[3] - viewBox[1]) * scale;\n height = Math.abs(viewBox[2] - viewBox[0]) * scale;\n } else {\n offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;\n offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;\n width = Math.abs(viewBox[2] - viewBox[0]) * scale;\n height = Math.abs(viewBox[3] - viewBox[1]) * scale;\n }\n // creating transform for the following operations:\n // translate(-centerX, -centerY), rotate and flip vertically,\n // scale, and translate(offsetCanvasX, offsetCanvasY)\n this.transform = [\n rotateA * scale,\n rotateB * scale,\n rotateC * scale,\n rotateD * scale,\n offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY,\n offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY\n ];\n\n this.width = width;\n this.height = height;\n this.fontScale = scale;\n }\n PageViewport.prototype = /** @lends PageViewport.prototype */ {\n /**\n * Clones viewport with additional properties.\n * @param args {Object} (optional) If specified, may contain the 'scale' or\n * 'rotation' properties to override the corresponding properties in\n * the cloned viewport.\n * @returns {PageViewport} Cloned viewport.\n */\n clone: function PageViewPort_clone(args) {\n args = args || {};\n var scale = 'scale' in args ? args.scale : this.scale;\n var rotation = 'rotation' in args ? args.rotation : this.rotation;\n return new PageViewport(this.viewBox.slice(), scale, rotation,\n this.offsetX, this.offsetY, args.dontFlip);\n },\n /**\n * Converts PDF point to the viewport coordinates. For examples, useful for\n * converting PDF location into canvas pixel coordinates.\n * @param x {number} X coordinate.\n * @param y {number} Y coordinate.\n * @returns {Object} Object that contains 'x' and 'y' properties of the\n * point in the viewport coordinate space.\n * @see {@link convertToPdfPoint}\n * @see {@link convertToViewportRectangle}\n */\n convertToViewportPoint: function PageViewport_convertToViewportPoint(x, y) {\n return Util.applyTransform([x, y], this.transform);\n },\n /**\n * Converts PDF rectangle to the viewport coordinates.\n * @param rect {Array} xMin, yMin, xMax and yMax coordinates.\n * @returns {Array} Contains corresponding coordinates of the rectangle\n * in the viewport coordinate space.\n * @see {@link convertToViewportPoint}\n */\n convertToViewportRectangle:\n function PageViewport_convertToViewportRectangle(rect) {\n var tl = Util.applyTransform([rect[0], rect[1]], this.transform);\n var br = Util.applyTransform([rect[2], rect[3]], this.transform);\n return [tl[0], tl[1], br[0], br[1]];\n },\n /**\n * Converts viewport coordinates to the PDF location. For examples, useful\n * for converting canvas pixel location into PDF one.\n * @param x {number} X coordinate.\n * @param y {number} Y coordinate.\n * @returns {Object} Object that contains 'x' and 'y' properties of the\n * point in the PDF coordinate space.\n * @see {@link convertToViewportPoint}\n */\n convertToPdfPoint: function PageViewport_convertToPdfPoint(x, y) {\n return Util.applyInverseTransform([x, y], this.transform);\n },\n };\n return PageViewport;\n})();\n\nvar PDFStringTranslateTable = [\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014,\n 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C,\n 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160,\n 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC\n];\n\nfunction stringToPDFString(str) {\n var i, n = str.length, strBuf = [];\n if (str[0] === '\\xFE' && str[1] === '\\xFF') {\n // UTF16BE BOM\n for (i = 2; i < n; i += 2) {\n strBuf.push(String.fromCharCode(\n (str.charCodeAt(i) << 8) | str.charCodeAt(i + 1)));\n }\n } else {\n for (i = 0; i < n; ++i) {\n var code = PDFStringTranslateTable[str.charCodeAt(i)];\n strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));\n }\n }\n return strBuf.join('');\n}\n\nfunction stringToUTF8String(str) {\n return decodeURIComponent(escape(str));\n}\n\nfunction utf8StringToString(str) {\n return unescape(encodeURIComponent(str));\n}\n\nfunction isEmptyObj(obj) {\n for (var key in obj) {\n return false;\n }\n return true;\n}\n\nfunction isBool(v) {\n return typeof v === 'boolean';\n}\n\nfunction isNum(v) {\n return typeof v === 'number';\n}\n\nfunction isString(v) {\n return typeof v === 'string';\n}\n\nfunction isArrayBuffer(v) {\n return typeof v === 'object' && v !== null && v.byteLength !== undefined;\n}\n\n// Checks if ch is one of the following characters: SPACE, TAB, CR or LF.\nfunction isSpace(ch) {\n return (ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A);\n}\n\nfunction isNodeJS() {\n // eslint-disable-next-line no-undef\n return typeof process === 'object' && process + '' === '[object process]';\n}\n\n/**\n * Promise Capability object.\n *\n * @typedef {Object} PromiseCapability\n * @property {Promise} promise - A promise object.\n * @property {function} resolve - Fulfills the promise.\n * @property {function} reject - Rejects the promise.\n */\n\n/**\n * Creates a promise capability object.\n * @alias createPromiseCapability\n *\n * @return {PromiseCapability} A capability object contains:\n * - a Promise, resolve and reject methods.\n */\nfunction createPromiseCapability() {\n var capability = {};\n capability.promise = new Promise(function (resolve, reject) {\n capability.resolve = resolve;\n capability.reject = reject;\n });\n return capability;\n}\n\nvar StatTimer = (function StatTimerClosure() {\n function rpad(str, pad, length) {\n while (str.length < length) {\n str += pad;\n }\n return str;\n }\n function StatTimer() {\n this.started = Object.create(null);\n this.times = [];\n this.enabled = true;\n }\n StatTimer.prototype = {\n time: function StatTimer_time(name) {\n if (!this.enabled) {\n return;\n }\n if (name in this.started) {\n warn('Timer is already running for ' + name);\n }\n this.started[name] = Date.now();\n },\n timeEnd: function StatTimer_timeEnd(name) {\n if (!this.enabled) {\n return;\n }\n if (!(name in this.started)) {\n warn('Timer has not been started for ' + name);\n }\n this.times.push({\n 'name': name,\n 'start': this.started[name],\n 'end': Date.now(),\n });\n // Remove timer from started so it can be called again.\n delete this.started[name];\n },\n toString: function StatTimer_toString() {\n var i, ii;\n var times = this.times;\n var out = '';\n // Find the longest name for padding purposes.\n var longest = 0;\n for (i = 0, ii = times.length; i < ii; ++i) {\n var name = times[i]['name'];\n if (name.length > longest) {\n longest = name.length;\n }\n }\n for (i = 0, ii = times.length; i < ii; ++i) {\n var span = times[i];\n var duration = span.end - span.start;\n out += rpad(span['name'], ' ', longest) + ' ' + duration + 'ms\\n';\n }\n return out;\n },\n };\n return StatTimer;\n})();\n\nvar createBlob = function createBlob(data, contentType) {\n if (typeof Blob !== 'undefined') {\n return new Blob([data], { type: contentType, });\n }\n throw new Error('The \"Blob\" constructor is not supported.');\n};\n\nvar createObjectURL = (function createObjectURLClosure() {\n // Blob/createObjectURL is not available, falling back to data schema.\n var digits =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n return function createObjectURL(data, contentType, forceDataSchema = false) {\n if (!forceDataSchema && URL.createObjectURL) {\n var blob = createBlob(data, contentType);\n return URL.createObjectURL(blob);\n }\n\n var buffer = 'data:' + contentType + ';base64,';\n for (var i = 0, ii = data.length; i < ii; i += 3) {\n var b1 = data[i] & 0xFF;\n var b2 = data[i + 1] & 0xFF;\n var b3 = data[i + 2] & 0xFF;\n var d1 = b1 >> 2, d2 = ((b1 & 3) << 4) | (b2 >> 4);\n var d3 = i + 1 < ii ? ((b2 & 0xF) << 2) | (b3 >> 6) : 64;\n var d4 = i + 2 < ii ? (b3 & 0x3F) : 64;\n buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4];\n }\n return buffer;\n };\n})();\n\nfunction resolveCall(fn, args, thisArg = null) {\n if (!fn) {\n return Promise.resolve(undefined);\n }\n return new Promise((resolve, reject) => {\n resolve(fn.apply(thisArg, args));\n });\n}\n\nfunction wrapReason(reason) {\n if (typeof reason !== 'object') {\n return reason;\n }\n switch (reason.name) {\n case 'AbortException':\n return new AbortException(reason.message);\n case 'MissingPDFException':\n return new MissingPDFException(reason.message);\n case 'UnexpectedResponseException':\n return new UnexpectedResponseException(reason.message, reason.status);\n default:\n return new UnknownErrorException(reason.message, reason.details);\n }\n}\n\nfunction makeReasonSerializable(reason) {\n if (!(reason instanceof Error) ||\n reason instanceof AbortException ||\n reason instanceof MissingPDFException ||\n reason instanceof UnexpectedResponseException ||\n reason instanceof UnknownErrorException) {\n return reason;\n }\n return new UnknownErrorException(reason.message, reason.toString());\n}\n\nfunction resolveOrReject(capability, success, reason) {\n if (success) {\n capability.resolve();\n } else {\n capability.reject(reason);\n }\n}\n\nfunction finalize(promise) {\n return Promise.resolve(promise).catch(() => {});\n}\n\nfunction MessageHandler(sourceName, targetName, comObj) {\n this.sourceName = sourceName;\n this.targetName = targetName;\n this.comObj = comObj;\n this.callbackId = 1;\n this.streamId = 1;\n this.postMessageTransfers = true;\n this.streamSinks = Object.create(null);\n this.streamControllers = Object.create(null);\n let callbacksCapabilities = this.callbacksCapabilities = Object.create(null);\n let ah = this.actionHandler = Object.create(null);\n\n this._onComObjOnMessage = (event) => {\n let data = event.data;\n if (data.targetName !== this.sourceName) {\n return;\n }\n if (data.stream) {\n this._processStreamMessage(data);\n } else if (data.isReply) {\n let callbackId = data.callbackId;\n if (data.callbackId in callbacksCapabilities) {\n let callback = callbacksCapabilities[callbackId];\n delete callbacksCapabilities[callbackId];\n if ('error' in data) {\n callback.reject(wrapReason(data.error));\n } else {\n callback.resolve(data.data);\n }\n } else {\n throw new Error(`Cannot resolve callback ${callbackId}`);\n }\n } else if (data.action in ah) {\n let action = ah[data.action];\n if (data.callbackId) {\n let sourceName = this.sourceName;\n let targetName = data.sourceName;\n Promise.resolve().then(function () {\n return action[0].call(action[1], data.data);\n }).then((result) => {\n comObj.postMessage({\n sourceName,\n targetName,\n isReply: true,\n callbackId: data.callbackId,\n data: result,\n });\n }, (reason) => {\n comObj.postMessage({\n sourceName,\n targetName,\n isReply: true,\n callbackId: data.callbackId,\n error: makeReasonSerializable(reason),\n });\n });\n } else if (data.streamId) {\n this._createStreamSink(data);\n } else {\n action[0].call(action[1], data.data);\n }\n } else {\n throw new Error(`Unknown action from worker: ${data.action}`);\n }\n };\n comObj.addEventListener('message', this._onComObjOnMessage);\n}\n\nMessageHandler.prototype = {\n on(actionName, handler, scope) {\n var ah = this.actionHandler;\n if (ah[actionName]) {\n throw new Error(`There is already an actionName called \"${actionName}\"`);\n }\n ah[actionName] = [handler, scope];\n },\n /**\n * Sends a message to the comObj to invoke the action with the supplied data.\n * @param {String} actionName - Action to call.\n * @param {JSON} data - JSON data to send.\n * @param {Array} [transfers] - Optional list of transfers/ArrayBuffers\n */\n send(actionName, data, transfers) {\n var message = {\n sourceName: this.sourceName,\n targetName: this.targetName,\n action: actionName,\n data,\n };\n this.postMessage(message, transfers);\n },\n /**\n * Sends a message to the comObj to invoke the action with the supplied data.\n * Expects that the other side will callback with the response.\n * @param {String} actionName - Action to call.\n * @param {JSON} data - JSON data to send.\n * @param {Array} [transfers] - Optional list of transfers/ArrayBuffers.\n * @returns {Promise} Promise to be resolved with response data.\n */\n sendWithPromise(actionName, data, transfers) {\n var callbackId = this.callbackId++;\n var message = {\n sourceName: this.sourceName,\n targetName: this.targetName,\n action: actionName,\n data,\n callbackId,\n };\n var capability = createPromiseCapability();\n this.callbacksCapabilities[callbackId] = capability;\n try {\n this.postMessage(message, transfers);\n } catch (e) {\n capability.reject(e);\n }\n return capability.promise;\n },\n /**\n * Sends a message to the comObj to invoke the action with the supplied data.\n * Expect that the other side will callback to signal 'start_complete'.\n * @param {String} actionName - Action to call.\n * @param {JSON} data - JSON data to send.\n * @param {Object} queueingStrategy - strategy to signal backpressure based on\n * internal queue.\n * @param {Array} [transfers] - Optional list of transfers/ArrayBuffers.\n * @return {ReadableStream} ReadableStream to read data in chunks.\n */\n sendWithStream(actionName, data, queueingStrategy, transfers) {\n let streamId = this.streamId++;\n let sourceName = this.sourceName;\n let targetName = this.targetName;\n\n return new ReadableStream({\n start: (controller) => {\n let startCapability = createPromiseCapability();\n this.streamControllers[streamId] = {\n controller,\n startCall: startCapability,\n isClosed: false,\n };\n this.postMessage({\n sourceName,\n targetName,\n action: actionName,\n streamId,\n data,\n desiredSize: controller.desiredSize,\n });\n // Return Promise for Async process, to signal success/failure.\n return startCapability.promise;\n },\n\n pull: (controller) => {\n let pullCapability = createPromiseCapability();\n this.streamControllers[streamId].pullCall = pullCapability;\n this.postMessage({\n sourceName,\n targetName,\n stream: 'pull',\n streamId,\n desiredSize: controller.desiredSize,\n });\n // Returning Promise will not call \"pull\"\n // again until current pull is resolved.\n return pullCapability.promise;\n },\n\n cancel: (reason) => {\n let cancelCapability = createPromiseCapability();\n this.streamControllers[streamId].cancelCall = cancelCapability;\n this.streamControllers[streamId].isClosed = true;\n this.postMessage({\n sourceName,\n targetName,\n stream: 'cancel',\n reason,\n streamId,\n });\n // Return Promise to signal success or failure.\n return cancelCapability.promise;\n },\n }, queueingStrategy);\n },\n\n _createStreamSink(data) {\n let self = this;\n let action = this.actionHandler[data.action];\n let streamId = data.streamId;\n let desiredSize = data.desiredSize;\n let sourceName = this.sourceName;\n let targetName = data.sourceName;\n let capability = createPromiseCapability();\n\n let sendStreamRequest = ({ stream, chunk, transfers,\n success, reason, }) => {\n this.postMessage({ sourceName, targetName, stream, streamId,\n chunk, success, reason, }, transfers);\n };\n\n let streamSink = {\n enqueue(chunk, size = 1, transfers) {\n if (this.isCancelled) {\n return;\n }\n let lastDesiredSize = this.desiredSize;\n this.desiredSize -= size;\n // Enqueue decreases the desiredSize property of sink,\n // so when it changes from positive to negative,\n // set ready as unresolved promise.\n if (lastDesiredSize > 0 && this.desiredSize <= 0) {\n this.sinkCapability = createPromiseCapability();\n this.ready = this.sinkCapability.promise;\n }\n sendStreamRequest({ stream: 'enqueue', chunk, transfers, });\n },\n\n close() {\n if (this.isCancelled) {\n return;\n }\n this.isCancelled = true;\n sendStreamRequest({ stream: 'close', });\n delete self.streamSinks[streamId];\n },\n\n error(reason) {\n if (this.isCancelled) {\n return;\n }\n this.isCancelled = true;\n sendStreamRequest({ stream: 'error', reason, });\n },\n\n sinkCapability: capability,\n onPull: null,\n onCancel: null,\n isCancelled: false,\n desiredSize,\n ready: null,\n };\n\n streamSink.sinkCapability.resolve();\n streamSink.ready = streamSink.sinkCapability.promise;\n this.streamSinks[streamId] = streamSink;\n resolveCall(action[0], [data.data, streamSink], action[1]).then(() => {\n sendStreamRequest({ stream: 'start_complete', success: true, });\n }, (reason) => {\n sendStreamRequest({ stream: 'start_complete', success: false, reason, });\n });\n },\n\n _processStreamMessage(data) {\n let sourceName = this.sourceName;\n let targetName = data.sourceName;\n let streamId = data.streamId;\n\n let sendStreamResponse = ({ stream, success, reason, }) => {\n this.comObj.postMessage({ sourceName, targetName, stream,\n success, streamId, reason, });\n };\n\n let deleteStreamController = () => {\n // Delete streamController only when start, pull and\n // cancel callbacks are resolved, to avoid \"TypeError\".\n Promise.all([\n this.streamControllers[data.streamId].startCall,\n this.streamControllers[data.streamId].pullCall,\n this.streamControllers[data.streamId].cancelCall\n ].map(function(capability) {\n return capability && finalize(capability.promise);\n })).then(() => {\n delete this.streamControllers[data.streamId];\n });\n };\n\n switch (data.stream) {\n case 'start_complete':\n resolveOrReject(this.streamControllers[data.streamId].startCall,\n data.success, wrapReason(data.reason));\n break;\n case 'pull_complete':\n resolveOrReject(this.streamControllers[data.streamId].pullCall,\n data.success, wrapReason(data.reason));\n break;\n case 'pull':\n // Ignore any pull after close is called.\n if (!this.streamSinks[data.streamId]) {\n sendStreamResponse({ stream: 'pull_complete', success: true, });\n break;\n }\n // Pull increases the desiredSize property of sink,\n // so when it changes from negative to positive,\n // set ready property as resolved promise.\n if (this.streamSinks[data.streamId].desiredSize <= 0 &&\n data.desiredSize > 0) {\n this.streamSinks[data.streamId].sinkCapability.resolve();\n }\n // Reset desiredSize property of sink on every pull.\n this.streamSinks[data.streamId].desiredSize = data.desiredSize;\n resolveCall(this.streamSinks[data.streamId].onPull).then(() => {\n sendStreamResponse({ stream: 'pull_complete', success: true, });\n }, (reason) => {\n sendStreamResponse({ stream: 'pull_complete',\n success: false, reason, });\n });\n break;\n case 'enqueue':\n assert(this.streamControllers[data.streamId],\n 'enqueue should have stream controller');\n if (!this.streamControllers[data.streamId].isClosed) {\n this.streamControllers[data.streamId].controller.enqueue(data.chunk);\n }\n break;\n case 'close':\n assert(this.streamControllers[data.streamId],\n 'close should have stream controller');\n if (this.streamControllers[data.streamId].isClosed) {\n break;\n }\n this.streamControllers[data.streamId].isClosed = true;\n this.streamControllers[data.streamId].controller.close();\n deleteStreamController();\n break;\n case 'error':\n assert(this.streamControllers[data.streamId],\n 'error should have stream controller');\n this.streamControllers[data.streamId].controller.\n error(wrapReason(data.reason));\n deleteStreamController();\n break;\n case 'cancel_complete':\n resolveOrReject(this.streamControllers[data.streamId].cancelCall,\n data.success, wrapReason(data.reason));\n deleteStreamController();\n break;\n case 'cancel':\n if (!this.streamSinks[data.streamId]) {\n break;\n }\n resolveCall(this.streamSinks[data.streamId].onCancel,\n [wrapReason(data.reason)]).then(() => {\n sendStreamResponse({ stream: 'cancel_complete', success: true, });\n }, (reason) => {\n sendStreamResponse({ stream: 'cancel_complete',\n success: false, reason, });\n });\n this.streamSinks[data.streamId].sinkCapability.\n reject(wrapReason(data.reason));\n this.streamSinks[data.streamId].isCancelled = true;\n delete this.streamSinks[data.streamId];\n break;\n default:\n throw new Error('Unexpected stream case');\n }\n },\n\n /**\n * Sends raw message to the comObj.\n * @private\n * @param {Object} message - Raw message.\n * @param transfers List of transfers/ArrayBuffers, or undefined.\n */\n postMessage(message, transfers) {\n if (transfers && this.postMessageTransfers) {\n this.comObj.postMessage(message, transfers);\n } else {\n this.comObj.postMessage(message);\n }\n },\n\n destroy() {\n this.comObj.removeEventListener('message', this._onComObjOnMessage);\n },\n};\n\nfunction loadJpegStream(id, imageUrl, objs) {\n var img = new Image();\n img.onload = (function loadJpegStream_onloadClosure() {\n objs.resolve(id, img);\n });\n img.onerror = (function loadJpegStream_onerrorClosure() {\n objs.resolve(id, null);\n warn('Error during JPEG image loading');\n });\n img.src = imageUrl;\n}\n\nexport {\n FONT_IDENTITY_MATRIX,\n IDENTITY_MATRIX,\n OPS,\n VERBOSITY_LEVELS,\n UNSUPPORTED_FEATURES,\n AnnotationBorderStyleType,\n AnnotationFieldFlag,\n AnnotationFlag,\n AnnotationType,\n FontType,\n ImageKind,\n CMapCompressionType,\n AbortException,\n InvalidPDFException,\n MessageHandler,\n MissingDataException,\n MissingPDFException,\n NativeImageDecoding,\n NotImplementedException,\n PageViewport,\n PasswordException,\n PasswordResponses,\n StatTimer,\n StreamType,\n TextRenderingMode,\n UnexpectedResponseException,\n UnknownErrorException,\n Util,\n XRefParseException,\n FormatError,\n arrayByteLength,\n arraysToBytes,\n assert,\n bytesToString,\n createBlob,\n createPromiseCapability,\n createObjectURL,\n deprecated,\n getLookupTableFactory,\n getVerbosityLevel,\n info,\n isArrayBuffer,\n isBool,\n isEmptyObj,\n isNum,\n isString,\n isSpace,\n isNodeJS,\n isSameOrigin,\n createValidAbsoluteUrl,\n isLittleEndian,\n isEvalSupported,\n loadJpegStream,\n log2,\n readInt8,\n readUint16,\n readUint32,\n removeNullCharacters,\n ReadableStream,\n setVerbosityLevel,\n shadow,\n string32,\n stringToBytes,\n stringToPDFString,\n stringToUTF8String,\n utf8StringToString,\n warn,\n unreachable,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/shared/util.js","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_global.js","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_is-object.js","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_wks.js","var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_core.js","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_export.js","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_hide.js","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_an-object.js","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_descriptors.js","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_fails.js","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_has.js","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_ctx.js","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_to-length.js","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_object-dp.js","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_redefine.js","/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n assert, CMapCompressionType, createValidAbsoluteUrl, deprecated,\n removeNullCharacters, stringToBytes, warn\n} from '../shared/util';\nimport globalScope from '../shared/global_scope';\n\nconst DEFAULT_LINK_REL = 'noopener noreferrer nofollow';\nconst SVG_NS = 'http://www.w3.org/2000/svg';\n\nclass DOMCanvasFactory {\n create(width, height) {\n if (width <= 0 || height <= 0) {\n throw new Error('invalid canvas size');\n }\n let canvas = document.createElement('canvas');\n let context = canvas.getContext('2d');\n canvas.width = width;\n canvas.height = height;\n return {\n canvas,\n context,\n };\n }\n\n reset(canvasAndContext, width, height) {\n if (!canvasAndContext.canvas) {\n throw new Error('canvas is not specified');\n }\n if (width <= 0 || height <= 0) {\n throw new Error('invalid canvas size');\n }\n canvasAndContext.canvas.width = width;\n canvasAndContext.canvas.height = height;\n }\n\n destroy(canvasAndContext) {\n if (!canvasAndContext.canvas) {\n throw new Error('canvas is not specified');\n }\n // Zeroing the width and height cause Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n canvasAndContext.canvas.width = 0;\n canvasAndContext.canvas.height = 0;\n canvasAndContext.canvas = null;\n canvasAndContext.context = null;\n }\n}\n\nclass DOMCMapReaderFactory {\n constructor({ baseUrl = null, isCompressed = false, }) {\n this.baseUrl = baseUrl;\n this.isCompressed = isCompressed;\n }\n\n fetch({ name, }) {\n if (!this.baseUrl) {\n return Promise.reject(new Error('CMap baseUrl must be specified, ' +\n 'see \"PDFJS.cMapUrl\" (and also \"PDFJS.cMapPacked\").'));\n }\n if (!name) {\n return Promise.reject(new Error('CMap name must be specified.'));\n }\n return new Promise((resolve, reject) => {\n let url = this.baseUrl + name + (this.isCompressed ? '.bcmap' : '');\n\n let request = new XMLHttpRequest();\n request.open('GET', url, true);\n\n if (this.isCompressed) {\n request.responseType = 'arraybuffer';\n }\n request.onreadystatechange = () => {\n if (request.readyState !== XMLHttpRequest.DONE) {\n return;\n }\n if (request.status === 200 || request.status === 0) {\n let data;\n if (this.isCompressed && request.response) {\n data = new Uint8Array(request.response);\n } else if (!this.isCompressed && request.responseText) {\n data = stringToBytes(request.responseText);\n }\n if (data) {\n resolve({\n cMapData: data,\n compressionType: this.isCompressed ?\n CMapCompressionType.BINARY : CMapCompressionType.NONE,\n });\n return;\n }\n }\n reject(new Error('Unable to load ' +\n (this.isCompressed ? 'binary ' : '') +\n 'CMap at: ' + url));\n };\n\n request.send(null);\n });\n }\n}\n\nclass DOMSVGFactory {\n create(width, height) {\n assert(width > 0 && height > 0, 'Invalid SVG dimensions');\n\n let svg = document.createElementNS(SVG_NS, 'svg:svg');\n svg.setAttribute('version', '1.1');\n svg.setAttribute('width', width + 'px');\n svg.setAttribute('height', height + 'px');\n svg.setAttribute('preserveAspectRatio', 'none');\n svg.setAttribute('viewBox', '0 0 ' + width + ' ' + height);\n\n return svg;\n }\n\n createElement(type) {\n assert(typeof type === 'string', 'Invalid SVG element type');\n\n return document.createElementNS(SVG_NS, type);\n }\n}\n\n/**\n * Optimised CSS custom property getter/setter.\n * @class\n */\nvar CustomStyle = (function CustomStyleClosure() {\n\n // As noted on: http://www.zachstronaut.com/posts/2009/02/17/\n // animate-css-transforms-firefox-webkit.html\n // in some versions of IE9 it is critical that ms appear in this list\n // before Moz\n var prefixes = ['ms', 'Moz', 'Webkit', 'O'];\n var _cache = Object.create(null);\n\n function CustomStyle() {}\n\n CustomStyle.getProp = function get(propName, element) {\n // check cache only when no element is given\n if (arguments.length === 1 && typeof _cache[propName] === 'string') {\n return _cache[propName];\n }\n\n element = element || document.documentElement;\n var style = element.style, prefixed, uPropName;\n\n // test standard property first\n if (typeof style[propName] === 'string') {\n return (_cache[propName] = propName);\n }\n\n // capitalize\n uPropName = propName.charAt(0).toUpperCase() + propName.slice(1);\n\n // test vendor specific properties\n for (var i = 0, l = prefixes.length; i < l; i++) {\n prefixed = prefixes[i] + uPropName;\n if (typeof style[prefixed] === 'string') {\n return (_cache[propName] = prefixed);\n }\n }\n\n // If all fails then set to undefined.\n return (_cache[propName] = 'undefined');\n };\n\n CustomStyle.setProp = function set(propName, element, str) {\n var prop = this.getProp(propName);\n if (prop !== 'undefined') {\n element.style[prop] = str;\n }\n };\n\n return CustomStyle;\n})();\n\nvar RenderingCancelledException = (function RenderingCancelledException() {\n function RenderingCancelledException(msg, type) {\n this.message = msg;\n this.type = type;\n }\n\n RenderingCancelledException.prototype = new Error();\n RenderingCancelledException.prototype.name = 'RenderingCancelledException';\n RenderingCancelledException.constructor = RenderingCancelledException;\n\n return RenderingCancelledException;\n})();\n\nvar LinkTarget = {\n NONE: 0, // Default value.\n SELF: 1,\n BLANK: 2,\n PARENT: 3,\n TOP: 4,\n};\n\nvar LinkTargetStringMap = [\n '',\n '_self',\n '_blank',\n '_parent',\n '_top'\n];\n\n/**\n * @typedef ExternalLinkParameters\n * @typedef {Object} ExternalLinkParameters\n * @property {string} url - An absolute URL.\n * @property {LinkTarget} target - The link target.\n * @property {string} rel - The link relationship.\n */\n\n/**\n * Adds various attributes (href, title, target, rel) to hyperlinks.\n * @param {HTMLLinkElement} link - The link element.\n * @param {ExternalLinkParameters} params\n */\nfunction addLinkAttributes(link, params) {\n var url = params && params.url;\n link.href = link.title = (url ? removeNullCharacters(url) : '');\n\n if (url) {\n var target = params.target;\n if (typeof target === 'undefined') {\n target = getDefaultSetting('externalLinkTarget');\n }\n link.target = LinkTargetStringMap[target];\n\n var rel = params.rel;\n if (typeof rel === 'undefined') {\n rel = getDefaultSetting('externalLinkRel');\n }\n link.rel = rel;\n }\n}\n\n// Gets the file name from a given URL.\nfunction getFilenameFromUrl(url) {\n var anchor = url.indexOf('#');\n var query = url.indexOf('?');\n var end = Math.min(\n anchor > 0 ? anchor : url.length,\n query > 0 ? query : url.length);\n return url.substring(url.lastIndexOf('/', end) + 1, end);\n}\n\nfunction getDefaultSetting(id) {\n // The list of the settings and their default is maintained for backward\n // compatibility and shall not be extended or modified. See also global.js.\n var globalSettings = globalScope.PDFJS;\n switch (id) {\n case 'pdfBug':\n return globalSettings ? globalSettings.pdfBug : false;\n case 'disableAutoFetch':\n return globalSettings ? globalSettings.disableAutoFetch : false;\n case 'disableStream':\n return globalSettings ? globalSettings.disableStream : false;\n case 'disableRange':\n return globalSettings ? globalSettings.disableRange : false;\n case 'disableFontFace':\n return globalSettings ? globalSettings.disableFontFace : false;\n case 'disableCreateObjectURL':\n return globalSettings ? globalSettings.disableCreateObjectURL : false;\n case 'disableWebGL':\n return globalSettings ? globalSettings.disableWebGL : true;\n case 'cMapUrl':\n return globalSettings ? globalSettings.cMapUrl : null;\n case 'cMapPacked':\n return globalSettings ? globalSettings.cMapPacked : false;\n case 'postMessageTransfers':\n return globalSettings ? globalSettings.postMessageTransfers : true;\n case 'workerPort':\n return globalSettings ? globalSettings.workerPort : null;\n case 'workerSrc':\n return globalSettings ? globalSettings.workerSrc : null;\n case 'disableWorker':\n return globalSettings ? globalSettings.disableWorker : false;\n case 'maxImageSize':\n return globalSettings ? globalSettings.maxImageSize : -1;\n case 'imageResourcesPath':\n return globalSettings ? globalSettings.imageResourcesPath : '';\n case 'isEvalSupported':\n return globalSettings ? globalSettings.isEvalSupported : true;\n case 'externalLinkTarget':\n if (!globalSettings) {\n return LinkTarget.NONE;\n }\n switch (globalSettings.externalLinkTarget) {\n case LinkTarget.NONE:\n case LinkTarget.SELF:\n case LinkTarget.BLANK:\n case LinkTarget.PARENT:\n case LinkTarget.TOP:\n return globalSettings.externalLinkTarget;\n }\n warn('PDFJS.externalLinkTarget is invalid: ' +\n globalSettings.externalLinkTarget);\n // Reset the external link target, to suppress further warnings.\n globalSettings.externalLinkTarget = LinkTarget.NONE;\n return LinkTarget.NONE;\n case 'externalLinkRel':\n return globalSettings ? globalSettings.externalLinkRel : DEFAULT_LINK_REL;\n case 'enableStats':\n return !!(globalSettings && globalSettings.enableStats);\n case 'pdfjsNext':\n return !!(globalSettings && globalSettings.pdfjsNext);\n default:\n throw new Error('Unknown default setting: ' + id);\n }\n}\n\nfunction isExternalLinkTargetSet() {\n var externalLinkTarget = getDefaultSetting('externalLinkTarget');\n switch (externalLinkTarget) {\n case LinkTarget.NONE:\n return false;\n case LinkTarget.SELF:\n case LinkTarget.BLANK:\n case LinkTarget.PARENT:\n case LinkTarget.TOP:\n return true;\n }\n}\n\nfunction isValidUrl(url, allowRelative) {\n deprecated('isValidUrl(), please use createValidAbsoluteUrl() instead.');\n var baseUrl = allowRelative ? 'http://example.com' : null;\n return createValidAbsoluteUrl(url, baseUrl) !== null;\n}\n\nexport {\n CustomStyle,\n RenderingCancelledException,\n addLinkAttributes,\n isExternalLinkTargetSet,\n isValidUrl,\n getFilenameFromUrl,\n LinkTarget,\n getDefaultSetting,\n DEFAULT_LINK_REL,\n DOMCanvasFactory,\n DOMCMapReaderFactory,\n DOMSVGFactory,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/dom_utils.js","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_uid.js","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_to-integer.js","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_to-object.js","module.exports = {};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_iterators.js","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals module */\n\nmodule.exports =\n (typeof window !== 'undefined' && window.Math === Math) ? window :\n // eslint-disable-next-line no-undef\n (typeof global !== 'undefined' && global.Math === Math) ? global :\n (typeof self !== 'undefined' && self.Math === Math) ? self : {};\n\n\n\n// WEBPACK FOOTER //\n// src/shared/global_scope.js","module.exports = false;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_library.js","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_a-function.js","var redefine = require('./_redefine');\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_redefine-all.js","module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_an-instance.js","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_cof.js","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_set-to-string-tag.js","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_property-desc.js","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_to-iobject.js","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_to-absolute-index.js","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_classof.js","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_for-of.js","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_dom-create.js","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_to-primitive.js","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_iobject.js","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_defined.js","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_shared-key.js","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_enum-bug-keys.js","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_object-keys.js","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_array-methods.js","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_species-constructor.js","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_iter-detect.js","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_new-promise-capability.js","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_meta.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n assert, MissingPDFException, UnexpectedResponseException\n} from '../shared/util';\n\nfunction validateRangeRequestCapabilities({ getResponseHeader, isHttp,\n rangeChunkSize, disableRange, }) {\n assert(rangeChunkSize > 0);\n let returnValues = {\n allowRangeRequests: false,\n suggestedLength: undefined,\n };\n if (disableRange || !isHttp) {\n return returnValues;\n }\n if (getResponseHeader('Accept-Ranges') !== 'bytes') {\n return returnValues;\n }\n\n let contentEncoding = getResponseHeader('Content-Encoding') || 'identity';\n if (contentEncoding !== 'identity') {\n return returnValues;\n }\n\n let length = parseInt(getResponseHeader('Content-Length'), 10);\n if (!Number.isInteger(length)) {\n return returnValues;\n }\n\n returnValues.suggestedLength = length;\n if (length <= 2 * rangeChunkSize) {\n // The file size is smaller than the size of two chunks, so it does not\n // make any sense to abort the request and retry with a range request.\n return returnValues;\n }\n\n returnValues.allowRangeRequests = true;\n return returnValues;\n}\n\nfunction createResponseStatusError(status, url) {\n if (status === 404 || status === 0 && /^file:/.test(url)) {\n return new MissingPDFException('Missing PDF \"' + url + '\".');\n }\n return new UnexpectedResponseException(\n 'Unexpected server response (' + status +\n ') while retrieving PDF \"' + url + '\".', status);\n}\n\nfunction validateResponseStatus(status) {\n return status === 200 || status === 206;\n}\n\nexport {\n createResponseStatusError,\n validateRangeRequestCapabilities,\n validateResponseStatus,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/network_utils.js","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_ie8-dom-define.js","var global = require('./_global');\nvar hide = require('./_hide');\nvar uid = require('./_uid');\nvar TYPED = uid('typed_array');\nvar VIEW = uid('view');\nvar ABV = !!(global.ArrayBuffer && global.DataView);\nvar CONSTR = ABV;\nvar i = 0;\nvar l = 9;\nvar Typed;\n\nvar TypedArrayConstructors = (\n 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'\n).split(',');\n\nwhile (i < l) {\n if (Typed = global[TypedArrayConstructors[i++]]) {\n hide(Typed.prototype, TYPED, true);\n hide(Typed.prototype, VIEW, true);\n } else CONSTR = false;\n}\n\nmodule.exports = {\n ABV: ABV,\n CONSTR: CONSTR,\n TYPED: TYPED,\n VIEW: VIEW\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_typed.js","// https://tc39.github.io/ecma262/#sec-toindex\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length!');\n return length;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_to-index.js","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_object-gopn.js","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_object-keys-internal.js","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_array-includes.js","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2018 Denis Pushkarev (zloirock.ru)'\n});\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_shared.js","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\n'use strict';\nvar toObject = require('./_to-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var aLen = arguments.length;\n var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);\n var end = aLen > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_array-fill.js","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_is-array-iter.js","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_object-create.js","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_html.js","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_object-gpo.js","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/core.get-iterator-method.js","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es6.array.iterator.js","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_iter-define.js","'use strict';\nvar global = require('./_global');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_set-species.js","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_object-gopd.js","exports.f = {}.propertyIsEnumerable;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_object-pie.js","'use strict';\n// 19.1.3.6 Object.prototype.toString()\nvar classof = require('./_classof');\nvar test = {};\ntest[require('./_wks')('toStringTag')] = 'z';\nif (test + '' != '[object z]') {\n require('./_redefine')(Object.prototype, 'toString', function toString() {\n return '[object ' + classof(this) + ']';\n }, true);\n}\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es6.object.to-string.js","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/web.dom.iterable.js","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (require('./_cof')(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_task.js","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_perform.js","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_promise-resolve.js","var isObject = require('./_is-object');\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_validate-collection.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals requirejs, __non_webpack_require__ */\n\nimport {\n assert, createPromiseCapability, deprecated, getVerbosityLevel, info,\n InvalidPDFException, isArrayBuffer, isSameOrigin, loadJpegStream,\n MessageHandler, MissingPDFException, NativeImageDecoding, PageViewport,\n PasswordException, StatTimer, stringToBytes, UnexpectedResponseException,\n UnknownErrorException, Util, warn\n} from '../shared/util';\nimport {\n DOMCanvasFactory, DOMCMapReaderFactory, getDefaultSetting,\n RenderingCancelledException\n} from './dom_utils';\nimport { FontFaceObject, FontLoader } from './font_loader';\nimport { CanvasGraphics } from './canvas';\nimport globalScope from '../shared/global_scope';\nimport { Metadata } from './metadata';\nimport { PDFDataTransportStream } from './transport_stream';\n\nvar DEFAULT_RANGE_CHUNK_SIZE = 65536; // 2^16 = 65536\n\nvar isWorkerDisabled = false;\nvar workerSrc;\nvar isPostMessageTransfersDisabled = false;\n\nvar pdfjsFilePath =\n typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('PRODUCTION && !(MOZCENTRAL || FIREFOX)') &&\n typeof document !== 'undefined' && document.currentScript ?\n document.currentScript.src : null;\n\nvar fakeWorkerFilesLoader = null;\nvar useRequireEnsure = false;\nif (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('GENERIC && !SINGLE_FILE')) {\n // For GENERIC build we need add support of different fake file loaders\n // for different frameworks.\n if (typeof window === 'undefined') {\n // node.js - disable worker and set require.ensure.\n isWorkerDisabled = true;\n if (typeof __non_webpack_require__.ensure === 'undefined') {\n __non_webpack_require__.ensure = __non_webpack_require__('node-ensure');\n }\n useRequireEnsure = true;\n } else if (typeof __non_webpack_require__ !== 'undefined' &&\n typeof __non_webpack_require__.ensure === 'function') {\n useRequireEnsure = true;\n }\n if (typeof requirejs !== 'undefined' && requirejs.toUrl) {\n workerSrc = requirejs.toUrl('pdfjs-dist/build/pdf.worker.js');\n }\n var dynamicLoaderSupported =\n typeof requirejs !== 'undefined' && requirejs.load;\n fakeWorkerFilesLoader = useRequireEnsure ? (function (callback) {\n __non_webpack_require__.ensure([], function () {\n var worker;\n if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('LIB')) {\n worker = __non_webpack_require__('../pdf.worker.js');\n } else {\n worker = __non_webpack_require__('./pdf.worker.js');\n }\n callback(worker.WorkerMessageHandler);\n });\n }) : dynamicLoaderSupported ? (function (callback) {\n requirejs(['pdfjs-dist/build/pdf.worker'], function (worker) {\n callback(worker.WorkerMessageHandler);\n });\n }) : null;\n}\n\n/** @type IPDFStream */\nvar PDFNetworkStream;\n\n/**\n * Sets PDFNetworkStream class to be used as alternative PDF data transport.\n * @param {IPDFStream} cls - the PDF data transport.\n */\nfunction setPDFNetworkStreamClass(cls) {\n PDFNetworkStream = cls;\n}\n\n/**\n * Document initialization / loading parameters object.\n *\n * @typedef {Object} DocumentInitParameters\n * @property {string} url - The URL of the PDF.\n * @property {TypedArray|Array|string} data - Binary PDF data. Use typed arrays\n * (Uint8Array) to improve the memory usage. If PDF data is BASE64-encoded,\n * use atob() to convert it to a binary string first.\n * @property {Object} httpHeaders - Basic authentication headers.\n * @property {boolean} withCredentials - Indicates whether or not cross-site\n * Access-Control requests should be made using credentials such as cookies\n * or authorization headers. The default is false.\n * @property {string} password - For decrypting password-protected PDFs.\n * @property {TypedArray} initialData - A typed array with the first portion or\n * all of the pdf data. Used by the extension since some data is already\n * loaded before the switch to range requests.\n * @property {number} length - The PDF file length. It's used for progress\n * reports and range requests operations.\n * @property {PDFDataRangeTransport} range\n * @property {number} rangeChunkSize - Optional parameter to specify\n * maximum number of bytes fetched per range request. The default value is\n * 2^16 = 65536.\n * @property {PDFWorker} worker - The worker that will be used for the loading\n * and parsing of the PDF data.\n * @property {string} docBaseUrl - (optional) The base URL of the document,\n * used when attempting to recover valid absolute URLs for annotations, and\n * outline items, that (incorrectly) only specify relative URLs.\n * @property {boolean} disableNativeImageDecoder - (deprecated) Disable decoding\n * of certain (simple) JPEG images in the browser. This is useful for\n * environments without DOM image support, such as e.g. Node.js.\n * The default value is `false`.\n * @property {string} nativeImageDecoderSupport - (optional) Strategy for\n * decoding certain (simple) JPEG images in the browser. This is useful for\n * environments without DOM image and canvas support, such as e.g. Node.js.\n * Valid values are 'decode', 'display' or 'none'; where 'decode' is intended\n * for browsers with full image/canvas support, 'display' for environments\n * with limited image support through stubs (useful for SVG conversion),\n * and 'none' where JPEG images will be decoded entirely by PDF.js.\n * The default value is 'decode'.\n * @property {Object} CMapReaderFactory - (optional) The factory that will be\n * used when reading built-in CMap files. Providing a custom factory is useful\n * for environments without `XMLHttpRequest` support, such as e.g. Node.js.\n * The default value is {DOMCMapReaderFactory}.\n * @property {boolean} stopAtErrors - (optional) Reject certain promises, e.g.\n * `getOperatorList`, `getTextContent`, and `RenderTask`, when the associated\n * PDF data cannot be successfully parsed, instead of attempting to recover\n * whatever possible of the data. The default value is `false`.\n */\n\n/**\n * @typedef {Object} PDFDocumentStats\n * @property {Array} streamTypes - Used stream types in the document (an item\n * is set to true if specific stream ID was used in the document).\n * @property {Array} fontTypes - Used font type in the document (an item is set\n * to true if specific font ID was used in the document).\n */\n\n/**\n * This is the main entry point for loading a PDF and interacting with it.\n * NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR)\n * is used, which means it must follow the same origin rules that any XHR does\n * e.g. No cross domain requests without CORS.\n *\n * @param {string|TypedArray|DocumentInitParameters|PDFDataRangeTransport} src\n * Can be a url to where a PDF is located, a typed array (Uint8Array)\n * already populated with data or parameter object.\n *\n * @param {PDFDataRangeTransport} pdfDataRangeTransport (deprecated) It is used\n * if you want to manually serve range requests for data in the PDF.\n *\n * @param {function} passwordCallback (deprecated) It is used to request a\n * password if wrong or no password was provided. The callback receives two\n * parameters: function that needs to be called with new password and reason\n * (see {PasswordResponses}).\n *\n * @param {function} progressCallback (deprecated) It is used to be able to\n * monitor the loading progress of the PDF file (necessary to implement e.g.\n * a loading bar). The callback receives an {Object} with the properties:\n * {number} loaded and {number} total.\n *\n * @return {PDFDocumentLoadingTask}\n */\nfunction getDocument(src, pdfDataRangeTransport,\n passwordCallback, progressCallback) {\n var task = new PDFDocumentLoadingTask();\n\n // Support of the obsolete arguments (for compatibility with API v1.0)\n if (arguments.length > 1) {\n deprecated('getDocument is called with pdfDataRangeTransport, ' +\n 'passwordCallback or progressCallback argument');\n }\n if (pdfDataRangeTransport) {\n if (!(pdfDataRangeTransport instanceof PDFDataRangeTransport)) {\n // Not a PDFDataRangeTransport instance, trying to add missing properties.\n pdfDataRangeTransport = Object.create(pdfDataRangeTransport);\n pdfDataRangeTransport.length = src.length;\n pdfDataRangeTransport.initialData = src.initialData;\n if (!pdfDataRangeTransport.abort) {\n pdfDataRangeTransport.abort = function () {};\n }\n }\n src = Object.create(src);\n src.range = pdfDataRangeTransport;\n }\n task.onPassword = passwordCallback || null;\n task.onProgress = progressCallback || null;\n\n var source;\n if (typeof src === 'string') {\n source = { url: src, };\n } else if (isArrayBuffer(src)) {\n source = { data: src, };\n } else if (src instanceof PDFDataRangeTransport) {\n source = { range: src, };\n } else {\n if (typeof src !== 'object') {\n throw new Error('Invalid parameter in getDocument, ' +\n 'need either Uint8Array, string or a parameter object');\n }\n if (!src.url && !src.data && !src.range) {\n throw new Error(\n 'Invalid parameter object: need either .data, .range or .url');\n }\n\n source = src;\n }\n\n var params = {};\n var rangeTransport = null;\n var worker = null;\n var CMapReaderFactory = DOMCMapReaderFactory;\n\n for (var key in source) {\n if (key === 'url' && typeof window !== 'undefined') {\n // The full path is required in the 'url' field.\n params[key] = new URL(source[key], window.location).href;\n continue;\n } else if (key === 'range') {\n rangeTransport = source[key];\n continue;\n } else if (key === 'worker') {\n worker = source[key];\n continue;\n } else if (key === 'data' && !(source[key] instanceof Uint8Array)) {\n // Converting string or array-like data to Uint8Array.\n var pdfBytes = source[key];\n if (typeof pdfBytes === 'string') {\n params[key] = stringToBytes(pdfBytes);\n } else if (typeof pdfBytes === 'object' && pdfBytes !== null &&\n !isNaN(pdfBytes.length)) {\n params[key] = new Uint8Array(pdfBytes);\n } else if (isArrayBuffer(pdfBytes)) {\n params[key] = new Uint8Array(pdfBytes);\n } else {\n throw new Error('Invalid PDF binary data: either typed array, ' +\n 'string or array-like object is expected in the ' +\n 'data property.');\n }\n continue;\n } else if (key === 'CMapReaderFactory') {\n CMapReaderFactory = source[key];\n continue;\n }\n params[key] = source[key];\n }\n\n params.rangeChunkSize = params.rangeChunkSize || DEFAULT_RANGE_CHUNK_SIZE;\n params.ignoreErrors = params.stopAtErrors !== true;\n\n if (params.disableNativeImageDecoder !== undefined) {\n deprecated('parameter disableNativeImageDecoder, ' +\n 'use nativeImageDecoderSupport instead');\n }\n params.nativeImageDecoderSupport = params.nativeImageDecoderSupport ||\n (params.disableNativeImageDecoder === true ? NativeImageDecoding.NONE :\n NativeImageDecoding.DECODE);\n if (params.nativeImageDecoderSupport !== NativeImageDecoding.DECODE &&\n params.nativeImageDecoderSupport !== NativeImageDecoding.NONE &&\n params.nativeImageDecoderSupport !== NativeImageDecoding.DISPLAY) {\n warn('Invalid parameter nativeImageDecoderSupport: ' +\n 'need a state of enum {NativeImageDecoding}');\n params.nativeImageDecoderSupport = NativeImageDecoding.DECODE;\n }\n\n if (!worker) {\n // Worker was not provided -- creating and owning our own. If message port\n // is specified in global settings, using it.\n var workerPort = getDefaultSetting('workerPort');\n worker = workerPort ? PDFWorker.fromPort(workerPort) : new PDFWorker();\n task._worker = worker;\n }\n var docId = task.docId;\n worker.promise.then(function () {\n if (task.destroyed) {\n throw new Error('Loading aborted');\n }\n return _fetchDocument(worker, params, rangeTransport, docId).then(\n function (workerId) {\n if (task.destroyed) {\n throw new Error('Loading aborted');\n }\n\n let networkStream;\n if (rangeTransport) {\n networkStream = new PDFDataTransportStream(params, rangeTransport);\n } else if (!params.data) {\n networkStream = new PDFNetworkStream({\n source: params,\n disableRange: getDefaultSetting('disableRange'),\n });\n }\n\n var messageHandler = new MessageHandler(docId, workerId, worker.port);\n messageHandler.postMessageTransfers = worker.postMessageTransfers;\n var transport = new WorkerTransport(messageHandler, task, networkStream,\n CMapReaderFactory);\n task._transport = transport;\n messageHandler.send('Ready', null);\n });\n }).catch(task._capability.reject);\n\n return task;\n}\n\n/**\n * Starts fetching of specified PDF document/data.\n * @param {PDFWorker} worker\n * @param {Object} source\n * @param {PDFDataRangeTransport} pdfDataRangeTransport\n * @param {string} docId Unique document id, used as MessageHandler id.\n * @returns {Promise} The promise, which is resolved when worker id of\n * MessageHandler is known.\n * @private\n */\nfunction _fetchDocument(worker, source, pdfDataRangeTransport, docId) {\n if (worker.destroyed) {\n return Promise.reject(new Error('Worker was destroyed'));\n }\n let apiVersion =\n typeof PDFJSDev !== 'undefined' ? PDFJSDev.eval('BUNDLE_VERSION') : null;\n\n source.disableAutoFetch = getDefaultSetting('disableAutoFetch');\n source.disableStream = getDefaultSetting('disableStream');\n source.chunkedViewerLoading = !!pdfDataRangeTransport;\n if (pdfDataRangeTransport) {\n source.length = pdfDataRangeTransport.length;\n source.initialData = pdfDataRangeTransport.initialData;\n }\n return worker.messageHandler.sendWithPromise('GetDocRequest', {\n docId,\n apiVersion,\n source: {\n data: source.data,\n url: source.url,\n password: source.password,\n disableAutoFetch: source.disableAutoFetch,\n rangeChunkSize: source.rangeChunkSize,\n length: source.length,\n },\n maxImageSize: getDefaultSetting('maxImageSize'),\n disableFontFace: getDefaultSetting('disableFontFace'),\n disableCreateObjectURL: getDefaultSetting('disableCreateObjectURL'),\n postMessageTransfers: getDefaultSetting('postMessageTransfers') &&\n !isPostMessageTransfersDisabled,\n docBaseUrl: source.docBaseUrl,\n nativeImageDecoderSupport: source.nativeImageDecoderSupport,\n ignoreErrors: source.ignoreErrors,\n isEvalSupported: getDefaultSetting('isEvalSupported'),\n }).then(function (workerId) {\n if (worker.destroyed) {\n throw new Error('Worker was destroyed');\n }\n return workerId;\n });\n}\n\n/**\n * PDF document loading operation.\n * @class\n * @alias PDFDocumentLoadingTask\n */\nvar PDFDocumentLoadingTask = (function PDFDocumentLoadingTaskClosure() {\n var nextDocumentId = 0;\n\n /** @constructs PDFDocumentLoadingTask */\n function PDFDocumentLoadingTask() {\n this._capability = createPromiseCapability();\n this._transport = null;\n this._worker = null;\n\n /**\n * Unique document loading task id -- used in MessageHandlers.\n * @type {string}\n */\n this.docId = 'd' + (nextDocumentId++);\n\n /**\n * Shows if loading task is destroyed.\n * @type {boolean}\n */\n this.destroyed = false;\n\n /**\n * Callback to request a password if wrong or no password was provided.\n * The callback receives two parameters: function that needs to be called\n * with new password and reason (see {PasswordResponses}).\n */\n this.onPassword = null;\n\n /**\n * Callback to be able to monitor the loading progress of the PDF file\n * (necessary to implement e.g. a loading bar). The callback receives\n * an {Object} with the properties: {number} loaded and {number} total.\n */\n this.onProgress = null;\n\n /**\n * Callback to when unsupported feature is used. The callback receives\n * an {UNSUPPORTED_FEATURES} argument.\n */\n this.onUnsupportedFeature = null;\n }\n\n PDFDocumentLoadingTask.prototype =\n /** @lends PDFDocumentLoadingTask.prototype */ {\n /**\n * @return {Promise}\n */\n get promise() {\n return this._capability.promise;\n },\n\n /**\n * Aborts all network requests and destroys worker.\n * @return {Promise} A promise that is resolved after destruction activity\n * is completed.\n */\n destroy() {\n this.destroyed = true;\n\n var transportDestroyed = !this._transport ? Promise.resolve() :\n this._transport.destroy();\n return transportDestroyed.then(() => {\n this._transport = null;\n if (this._worker) {\n this._worker.destroy();\n this._worker = null;\n }\n });\n },\n\n /**\n * Registers callbacks to indicate the document loading completion.\n *\n * @param {function} onFulfilled The callback for the loading completion.\n * @param {function} onRejected The callback for the loading failure.\n * @return {Promise} A promise that is resolved after the onFulfilled or\n * onRejected callback.\n */\n then: function PDFDocumentLoadingTask_then(onFulfilled, onRejected) {\n return this.promise.then.apply(this.promise, arguments);\n },\n };\n\n return PDFDocumentLoadingTask;\n})();\n\n/**\n * Abstract class to support range requests file loading.\n * @class\n * @alias PDFDataRangeTransport\n * @param {number} length\n * @param {Uint8Array} initialData\n */\nvar PDFDataRangeTransport = (function pdfDataRangeTransportClosure() {\n function PDFDataRangeTransport(length, initialData) {\n this.length = length;\n this.initialData = initialData;\n\n this._rangeListeners = [];\n this._progressListeners = [];\n this._progressiveReadListeners = [];\n this._readyCapability = createPromiseCapability();\n }\n PDFDataRangeTransport.prototype =\n /** @lends PDFDataRangeTransport.prototype */ {\n addRangeListener:\n function PDFDataRangeTransport_addRangeListener(listener) {\n this._rangeListeners.push(listener);\n },\n\n addProgressListener:\n function PDFDataRangeTransport_addProgressListener(listener) {\n this._progressListeners.push(listener);\n },\n\n addProgressiveReadListener:\n function PDFDataRangeTransport_addProgressiveReadListener(listener) {\n this._progressiveReadListeners.push(listener);\n },\n\n onDataRange: function PDFDataRangeTransport_onDataRange(begin, chunk) {\n var listeners = this._rangeListeners;\n for (var i = 0, n = listeners.length; i < n; ++i) {\n listeners[i](begin, chunk);\n }\n },\n\n onDataProgress: function PDFDataRangeTransport_onDataProgress(loaded) {\n this._readyCapability.promise.then(() => {\n var listeners = this._progressListeners;\n for (var i = 0, n = listeners.length; i < n; ++i) {\n listeners[i](loaded);\n }\n });\n },\n\n onDataProgressiveRead:\n function PDFDataRangeTransport_onDataProgress(chunk) {\n this._readyCapability.promise.then(() => {\n var listeners = this._progressiveReadListeners;\n for (var i = 0, n = listeners.length; i < n; ++i) {\n listeners[i](chunk);\n }\n });\n },\n\n transportReady: function PDFDataRangeTransport_transportReady() {\n this._readyCapability.resolve();\n },\n\n requestDataRange:\n function PDFDataRangeTransport_requestDataRange(begin, end) {\n throw new Error('Abstract method PDFDataRangeTransport.requestDataRange');\n },\n\n abort: function PDFDataRangeTransport_abort() {\n },\n };\n return PDFDataRangeTransport;\n})();\n\n/**\n * Proxy to a PDFDocument in the worker thread. Also, contains commonly used\n * properties that can be read synchronously.\n * @class\n * @alias PDFDocumentProxy\n */\nvar PDFDocumentProxy = (function PDFDocumentProxyClosure() {\n function PDFDocumentProxy(pdfInfo, transport, loadingTask) {\n this.pdfInfo = pdfInfo;\n this.transport = transport;\n this.loadingTask = loadingTask;\n }\n PDFDocumentProxy.prototype = /** @lends PDFDocumentProxy.prototype */ {\n /**\n * @return {number} Total number of pages the PDF contains.\n */\n get numPages() {\n return this.pdfInfo.numPages;\n },\n /**\n * @return {string} A unique ID to identify a PDF. Not guaranteed to be\n * unique.\n */\n get fingerprint() {\n return this.pdfInfo.fingerprint;\n },\n /**\n * @param {number} pageNumber The page number to get. The first page is 1.\n * @return {Promise} A promise that is resolved with a {@link PDFPageProxy}\n * object.\n */\n getPage: function PDFDocumentProxy_getPage(pageNumber) {\n return this.transport.getPage(pageNumber);\n },\n /**\n * @param {{num: number, gen: number}} ref The page reference. Must have\n * the 'num' and 'gen' properties.\n * @return {Promise} A promise that is resolved with the page index that is\n * associated with the reference.\n */\n getPageIndex: function PDFDocumentProxy_getPageIndex(ref) {\n return this.transport.getPageIndex(ref);\n },\n /**\n * @return {Promise} A promise that is resolved with a lookup table for\n * mapping named destinations to reference numbers.\n *\n * This can be slow for large documents: use getDestination instead\n */\n getDestinations: function PDFDocumentProxy_getDestinations() {\n return this.transport.getDestinations();\n },\n /**\n * @param {string} id The named destination to get.\n * @return {Promise} A promise that is resolved with all information\n * of the given named destination.\n */\n getDestination: function PDFDocumentProxy_getDestination(id) {\n return this.transport.getDestination(id);\n },\n /**\n * @return {Promise} A promise that is resolved with:\n * an Array containing the pageLabels that correspond to the pageIndexes,\n * or `null` when no pageLabels are present in the PDF file.\n */\n getPageLabels: function PDFDocumentProxy_getPageLabels() {\n return this.transport.getPageLabels();\n },\n /**\n * @return {Promise} A promise that is resolved with a {string} containing\n * the PageMode name.\n */\n getPageMode() {\n return this.transport.getPageMode();\n },\n /**\n * @return {Promise} A promise that is resolved with a lookup table for\n * mapping named attachments to their content.\n */\n getAttachments: function PDFDocumentProxy_getAttachments() {\n return this.transport.getAttachments();\n },\n /**\n * @return {Promise} A promise that is resolved with an array of all the\n * JavaScript strings in the name tree.\n */\n getJavaScript: function PDFDocumentProxy_getJavaScript() {\n return this.transport.getJavaScript();\n },\n /**\n * @return {Promise} A promise that is resolved with an {Array} that is a\n * tree outline (if it has one) of the PDF. The tree is in the format of:\n * [\n * {\n * title: string,\n * bold: boolean,\n * italic: boolean,\n * color: rgb Uint8Array,\n * dest: dest obj,\n * url: string,\n * items: array of more items like this\n * },\n * ...\n * ].\n */\n getOutline: function PDFDocumentProxy_getOutline() {\n return this.transport.getOutline();\n },\n /**\n * @return {Promise} A promise that is resolved with an {Object} that has\n * info and metadata properties. Info is an {Object} filled with anything\n * available in the information dictionary and similarly metadata is a\n * {Metadata} object with information from the metadata section of the PDF.\n */\n getMetadata: function PDFDocumentProxy_getMetadata() {\n return this.transport.getMetadata();\n },\n /**\n * @return {Promise} A promise that is resolved with a TypedArray that has\n * the raw data from the PDF.\n */\n getData: function PDFDocumentProxy_getData() {\n return this.transport.getData();\n },\n /**\n * @return {Promise} A promise that is resolved when the document's data\n * is loaded. It is resolved with an {Object} that contains the length\n * property that indicates size of the PDF data in bytes.\n */\n getDownloadInfo: function PDFDocumentProxy_getDownloadInfo() {\n return this.transport.downloadInfoCapability.promise;\n },\n /**\n * @return {Promise} A promise this is resolved with current stats about\n * document structures (see {@link PDFDocumentStats}).\n */\n getStats: function PDFDocumentProxy_getStats() {\n return this.transport.getStats();\n },\n /**\n * Cleans up resources allocated by the document, e.g. created @font-face.\n */\n cleanup: function PDFDocumentProxy_cleanup() {\n this.transport.startCleanup();\n },\n /**\n * Destroys current document instance and terminates worker.\n */\n destroy: function PDFDocumentProxy_destroy() {\n return this.loadingTask.destroy();\n },\n };\n return PDFDocumentProxy;\n})();\n\n/**\n * Page getTextContent parameters.\n *\n * @typedef {Object} getTextContentParameters\n * @property {boolean} normalizeWhitespace - replaces all occurrences of\n * whitespace with standard spaces (0x20). The default value is `false`.\n * @property {boolean} disableCombineTextItems - do not attempt to combine\n * same line {@link TextItem}'s. The default value is `false`.\n */\n\n/**\n * Page text content.\n *\n * @typedef {Object} TextContent\n * @property {array} items - array of {@link TextItem}\n * @property {Object} styles - {@link TextStyles} objects, indexed by font name.\n */\n\n/**\n * Page text content part.\n *\n * @typedef {Object} TextItem\n * @property {string} str - text content.\n * @property {string} dir - text direction: 'ttb', 'ltr' or 'rtl'.\n * @property {array} transform - transformation matrix.\n * @property {number} width - width in device space.\n * @property {number} height - height in device space.\n * @property {string} fontName - font name used by pdf.js for converted font.\n */\n\n/**\n * Text style.\n *\n * @typedef {Object} TextStyle\n * @property {number} ascent - font ascent.\n * @property {number} descent - font descent.\n * @property {boolean} vertical - text is in vertical mode.\n * @property {string} fontFamily - possible font family\n */\n\n/**\n * Page annotation parameters.\n *\n * @typedef {Object} GetAnnotationsParameters\n * @property {string} intent - Determines the annotations that will be fetched,\n * can be either 'display' (viewable annotations) or 'print'\n * (printable annotations).\n * If the parameter is omitted, all annotations are fetched.\n */\n\n/**\n * Page render parameters.\n *\n * @typedef {Object} RenderParameters\n * @property {Object} canvasContext - A 2D context of a DOM Canvas object.\n * @property {PageViewport} viewport - Rendering viewport obtained by\n * calling of PDFPage.getViewport method.\n * @property {string} intent - Rendering intent, can be 'display' or 'print'\n * (default value is 'display').\n * @property {boolean} renderInteractiveForms - (optional) Whether or not\n * interactive form elements are rendered in the display\n * layer. If so, we do not render them on canvas as well.\n * @property {Array} transform - (optional) Additional transform, applied\n * just before viewport transform.\n * @property {Object} imageLayer - (optional) An object that has beginLayout,\n * endLayout and appendImage functions.\n * @property {function} continueCallback - (deprecated) A function that will be\n * called each time the rendering is paused. To continue\n * rendering call the function that is the first argument\n * to the callback.\n * @property {Object} canvasFactory - (optional) The factory that will be used\n * when creating canvases. The default value is\n * {DOMCanvasFactory}.\n * @property {Object} background - (optional) Background to use for the canvas.\n * Can use any valid canvas.fillStyle: A DOMString parsed as\n * CSS <color> value, a CanvasGradient object (a linear or\n * radial gradient) or a CanvasPattern object (a repetitive\n * image). The default value is 'rgb(255,255,255)'.\n */\n\n/**\n * PDF page operator list.\n *\n * @typedef {Object} PDFOperatorList\n * @property {Array} fnArray - Array containing the operator functions.\n * @property {Array} argsArray - Array containing the arguments of the\n * functions.\n */\n\n/**\n * Proxy to a PDFPage in the worker thread.\n * @class\n * @alias PDFPageProxy\n */\nvar PDFPageProxy = (function PDFPageProxyClosure() {\n function PDFPageProxy(pageIndex, pageInfo, transport) {\n this.pageIndex = pageIndex;\n this.pageInfo = pageInfo;\n this.transport = transport;\n this.stats = new StatTimer();\n this.stats.enabled = getDefaultSetting('enableStats');\n this.commonObjs = transport.commonObjs;\n this.objs = new PDFObjects();\n this.cleanupAfterRender = false;\n this.pendingCleanup = false;\n this.intentStates = Object.create(null);\n this.destroyed = false;\n }\n PDFPageProxy.prototype = /** @lends PDFPageProxy.prototype */ {\n /**\n * @return {number} Page number of the page. First page is 1.\n */\n get pageNumber() {\n return this.pageIndex + 1;\n },\n /**\n * @return {number} The number of degrees the page is rotated clockwise.\n */\n get rotate() {\n return this.pageInfo.rotate;\n },\n /**\n * @return {Object} The reference that points to this page. It has 'num' and\n * 'gen' properties.\n */\n get ref() {\n return this.pageInfo.ref;\n },\n /**\n * @return {number} The default size of units in 1/72nds of an inch.\n */\n get userUnit() {\n return this.pageInfo.userUnit;\n },\n /**\n * @return {Array} An array of the visible portion of the PDF page in the\n * user space units - [x1, y1, x2, y2].\n */\n get view() {\n return this.pageInfo.view;\n },\n /**\n * @param {number} scale The desired scale of the viewport.\n * @param {number} rotate Degrees to rotate the viewport. If omitted this\n * defaults to the page rotation.\n * @return {PageViewport} Contains 'width' and 'height' properties\n * along with transforms required for rendering.\n */\n getViewport: function PDFPageProxy_getViewport(scale, rotate) {\n if (arguments.length < 2) {\n rotate = this.rotate;\n }\n return new PageViewport(this.view, scale, rotate, 0, 0);\n },\n /**\n * @param {GetAnnotationsParameters} params - Annotation parameters.\n * @return {Promise} A promise that is resolved with an {Array} of the\n * annotation objects.\n */\n getAnnotations: function PDFPageProxy_getAnnotations(params) {\n var intent = (params && params.intent) || null;\n\n if (!this.annotationsPromise || this.annotationsIntent !== intent) {\n this.annotationsPromise = this.transport.getAnnotations(this.pageIndex,\n intent);\n this.annotationsIntent = intent;\n }\n return this.annotationsPromise;\n },\n /**\n * Begins the process of rendering a page to the desired context.\n * @param {RenderParameters} params Page render parameters.\n * @return {RenderTask} An object that contains the promise, which\n * is resolved when the page finishes rendering.\n */\n render: function PDFPageProxy_render(params) {\n var stats = this.stats;\n stats.time('Overall');\n\n // If there was a pending destroy cancel it so no cleanup happens during\n // this call to render.\n this.pendingCleanup = false;\n\n var renderingIntent = (params.intent === 'print' ? 'print' : 'display');\n var canvasFactory = params.canvasFactory || new DOMCanvasFactory();\n\n if (!this.intentStates[renderingIntent]) {\n this.intentStates[renderingIntent] = Object.create(null);\n }\n var intentState = this.intentStates[renderingIntent];\n\n // If there's no displayReadyCapability yet, then the operatorList\n // was never requested before. Make the request and create the promise.\n if (!intentState.displayReadyCapability) {\n intentState.receivingOperatorList = true;\n intentState.displayReadyCapability = createPromiseCapability();\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false,\n };\n\n this.stats.time('Page Request');\n this.transport.messageHandler.send('RenderPageRequest', {\n pageIndex: this.pageNumber - 1,\n intent: renderingIntent,\n renderInteractiveForms: (params.renderInteractiveForms === true),\n });\n }\n\n var complete = (error) => {\n var i = intentState.renderTasks.indexOf(internalRenderTask);\n if (i >= 0) {\n intentState.renderTasks.splice(i, 1);\n }\n\n if (this.cleanupAfterRender) {\n this.pendingCleanup = true;\n }\n this._tryCleanup();\n\n if (error) {\n internalRenderTask.capability.reject(error);\n } else {\n internalRenderTask.capability.resolve();\n }\n stats.timeEnd('Rendering');\n stats.timeEnd('Overall');\n };\n\n var internalRenderTask = new InternalRenderTask(complete, params,\n this.objs,\n this.commonObjs,\n intentState.operatorList,\n this.pageNumber,\n canvasFactory);\n internalRenderTask.useRequestAnimationFrame = renderingIntent !== 'print';\n if (!intentState.renderTasks) {\n intentState.renderTasks = [];\n }\n intentState.renderTasks.push(internalRenderTask);\n var renderTask = internalRenderTask.task;\n\n // Obsolete parameter support\n if (params.continueCallback) {\n deprecated('render is used with continueCallback parameter');\n renderTask.onContinue = params.continueCallback;\n }\n\n intentState.displayReadyCapability.promise.then((transparency) => {\n if (this.pendingCleanup) {\n complete();\n return;\n }\n stats.time('Rendering');\n internalRenderTask.initializeGraphics(transparency);\n internalRenderTask.operatorListChanged();\n }).catch(complete);\n\n return renderTask;\n },\n\n /**\n * @return {Promise} A promise resolved with an {@link PDFOperatorList}\n * object that represents page's operator list.\n */\n getOperatorList: function PDFPageProxy_getOperatorList() {\n function operatorListChanged() {\n if (intentState.operatorList.lastChunk) {\n intentState.opListReadCapability.resolve(intentState.operatorList);\n\n var i = intentState.renderTasks.indexOf(opListTask);\n if (i >= 0) {\n intentState.renderTasks.splice(i, 1);\n }\n }\n }\n\n var renderingIntent = 'oplist';\n if (!this.intentStates[renderingIntent]) {\n this.intentStates[renderingIntent] = Object.create(null);\n }\n var intentState = this.intentStates[renderingIntent];\n var opListTask;\n\n if (!intentState.opListReadCapability) {\n opListTask = {};\n opListTask.operatorListChanged = operatorListChanged;\n intentState.receivingOperatorList = true;\n intentState.opListReadCapability = createPromiseCapability();\n intentState.renderTasks = [];\n intentState.renderTasks.push(opListTask);\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false,\n };\n\n this.transport.messageHandler.send('RenderPageRequest', {\n pageIndex: this.pageIndex,\n intent: renderingIntent,\n });\n }\n return intentState.opListReadCapability.promise;\n },\n\n /**\n * @param {getTextContentParameters} params - getTextContent parameters.\n * @return {ReadableStream} ReadableStream to read textContent chunks.\n */\n streamTextContent(params = {}) {\n const TEXT_CONTENT_CHUNK_SIZE = 100;\n return this.transport.messageHandler.sendWithStream('GetTextContent', {\n pageIndex: this.pageNumber - 1,\n normalizeWhitespace: (params.normalizeWhitespace === true),\n combineTextItems: (params.disableCombineTextItems !== true),\n }, {\n highWaterMark: TEXT_CONTENT_CHUNK_SIZE,\n size(textContent) {\n return textContent.items.length;\n },\n });\n },\n\n /**\n * @param {getTextContentParameters} params - getTextContent parameters.\n * @return {Promise} That is resolved a {@link TextContent}\n * object that represent the page text content.\n */\n getTextContent: function PDFPageProxy_getTextContent(params) {\n params = params || {};\n let readableStream = this.streamTextContent(params);\n\n return new Promise(function(resolve, reject) {\n function pump() {\n reader.read().then(function({ value, done, }) {\n if (done) {\n resolve(textContent);\n return;\n }\n Util.extendObj(textContent.styles, value.styles);\n Util.appendToArray(textContent.items, value.items);\n pump();\n }, reject);\n }\n\n let reader = readableStream.getReader();\n let textContent = {\n items: [],\n styles: Object.create(null),\n };\n\n pump();\n });\n },\n\n /**\n * Destroys page object.\n */\n _destroy: function PDFPageProxy_destroy() {\n this.destroyed = true;\n this.transport.pageCache[this.pageIndex] = null;\n\n var waitOn = [];\n Object.keys(this.intentStates).forEach(function(intent) {\n if (intent === 'oplist') {\n // Avoid errors below, since the renderTasks are just stubs.\n return;\n }\n var intentState = this.intentStates[intent];\n intentState.renderTasks.forEach(function(renderTask) {\n var renderCompleted = renderTask.capability.promise.\n catch(function () {}); // ignoring failures\n waitOn.push(renderCompleted);\n renderTask.cancel();\n });\n }, this);\n this.objs.clear();\n this.annotationsPromise = null;\n this.pendingCleanup = false;\n return Promise.all(waitOn);\n },\n\n /**\n * Cleans up resources allocated by the page. (deprecated)\n */\n destroy() {\n deprecated('page destroy method, use cleanup() instead');\n this.cleanup();\n },\n\n /**\n * Cleans up resources allocated by the page.\n */\n cleanup: function PDFPageProxy_cleanup() {\n this.pendingCleanup = true;\n this._tryCleanup();\n },\n /**\n * For internal use only. Attempts to clean up if rendering is in a state\n * where that's possible.\n * @ignore\n */\n _tryCleanup: function PDFPageProxy_tryCleanup() {\n if (!this.pendingCleanup ||\n Object.keys(this.intentStates).some(function(intent) {\n var intentState = this.intentStates[intent];\n return (intentState.renderTasks.length !== 0 ||\n intentState.receivingOperatorList);\n }, this)) {\n return;\n }\n\n Object.keys(this.intentStates).forEach(function(intent) {\n delete this.intentStates[intent];\n }, this);\n this.objs.clear();\n this.annotationsPromise = null;\n this.pendingCleanup = false;\n },\n /**\n * For internal use only.\n * @ignore\n */\n _startRenderPage: function PDFPageProxy_startRenderPage(transparency,\n intent) {\n var intentState = this.intentStates[intent];\n // TODO Refactor RenderPageRequest to separate rendering\n // and operator list logic\n if (intentState.displayReadyCapability) {\n intentState.displayReadyCapability.resolve(transparency);\n }\n },\n /**\n * For internal use only.\n * @ignore\n */\n _renderPageChunk: function PDFPageProxy_renderPageChunk(operatorListChunk,\n intent) {\n var intentState = this.intentStates[intent];\n var i, ii;\n // Add the new chunk to the current operator list.\n for (i = 0, ii = operatorListChunk.length; i < ii; i++) {\n intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);\n intentState.operatorList.argsArray.push(\n operatorListChunk.argsArray[i]);\n }\n intentState.operatorList.lastChunk = operatorListChunk.lastChunk;\n\n // Notify all the rendering tasks there are more operators to be consumed.\n for (i = 0; i < intentState.renderTasks.length; i++) {\n intentState.renderTasks[i].operatorListChanged();\n }\n\n if (operatorListChunk.lastChunk) {\n intentState.receivingOperatorList = false;\n this._tryCleanup();\n }\n },\n };\n return PDFPageProxy;\n})();\n\nclass LoopbackPort {\n constructor(defer) {\n this._listeners = [];\n this._defer = defer;\n this._deferred = Promise.resolve(undefined);\n }\n\n postMessage(obj, transfers) {\n function cloneValue(value) {\n // Trying to perform a structured clone close to the spec, including\n // transfers.\n if (typeof value !== 'object' || value === null) {\n return value;\n }\n if (cloned.has(value)) { // already cloned the object\n return cloned.get(value);\n }\n var result;\n var buffer;\n if ((buffer = value.buffer) && isArrayBuffer(buffer)) {\n // We found object with ArrayBuffer (typed array).\n var transferable = transfers && transfers.indexOf(buffer) >= 0;\n if (value === buffer) {\n // Special case when we are faking typed arrays in compatibility.js.\n result = value;\n } else if (transferable) {\n result = new value.constructor(buffer, value.byteOffset,\n value.byteLength);\n } else {\n result = new value.constructor(value);\n }\n cloned.set(value, result);\n return result;\n }\n result = Array.isArray(value) ? [] : {};\n cloned.set(value, result); // adding to cache now for cyclic references\n // Cloning all value and object properties, however ignoring properties\n // defined via getter.\n for (var i in value) {\n var desc, p = value;\n while (!(desc = Object.getOwnPropertyDescriptor(p, i))) {\n p = Object.getPrototypeOf(p);\n }\n if (typeof desc.value === 'undefined' ||\n typeof desc.value === 'function') {\n continue;\n }\n result[i] = cloneValue(desc.value);\n }\n return result;\n }\n\n if (!this._defer) {\n this._listeners.forEach(function (listener) {\n listener.call(this, { data: obj, });\n }, this);\n return;\n }\n\n var cloned = new WeakMap();\n var e = { data: cloneValue(obj), };\n this._deferred.then(() => {\n this._listeners.forEach(function (listener) {\n listener.call(this, e);\n }, this);\n });\n }\n\n addEventListener(name, listener) {\n this._listeners.push(listener);\n }\n\n removeEventListener(name, listener) {\n var i = this._listeners.indexOf(listener);\n this._listeners.splice(i, 1);\n }\n\n terminate() {\n this._listeners = [];\n }\n}\n\n/**\n * PDF.js web worker abstraction, it controls instantiation of PDF documents and\n * WorkerTransport for them. If creation of a web worker is not possible,\n * a \"fake\" worker will be used instead.\n * @class\n */\nvar PDFWorker = (function PDFWorkerClosure() {\n let nextFakeWorkerId = 0;\n\n function getWorkerSrc() {\n if (typeof workerSrc !== 'undefined') {\n return workerSrc;\n }\n if (getDefaultSetting('workerSrc')) {\n return getDefaultSetting('workerSrc');\n }\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('PRODUCTION && !(MOZCENTRAL || FIREFOX)') &&\n pdfjsFilePath) {\n return pdfjsFilePath.replace(/(\\.(?:min\\.)?js)(\\?.*)?$/i, '.worker$1$2');\n }\n throw new Error('No PDFJS.workerSrc specified');\n }\n\n let fakeWorkerFilesLoadedCapability;\n\n // Loads worker code into main thread.\n function setupFakeWorkerGlobal() {\n var WorkerMessageHandler;\n if (fakeWorkerFilesLoadedCapability) {\n return fakeWorkerFilesLoadedCapability.promise;\n }\n fakeWorkerFilesLoadedCapability = createPromiseCapability();\n // In the developer build load worker_loader which in turn loads all the\n // other files and resolves the promise. In production only the\n // pdf.worker.js file is needed.\n if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) {\n if (typeof SystemJS === 'object') {\n SystemJS.import('pdfjs/core/worker').then((worker) => {\n WorkerMessageHandler = worker.WorkerMessageHandler;\n fakeWorkerFilesLoadedCapability.resolve(WorkerMessageHandler);\n });\n } else if (typeof require === 'function') {\n var worker = require('../core/worker.js');\n WorkerMessageHandler = worker.WorkerMessageHandler;\n fakeWorkerFilesLoadedCapability.resolve(WorkerMessageHandler);\n } else {\n throw new Error(\n 'SystemJS or CommonJS must be used to load fake worker.');\n }\n } else if (PDFJSDev.test('SINGLE_FILE')) {\n var pdfjsCoreWorker = require('../core/worker.js');\n WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;\n fakeWorkerFilesLoadedCapability.resolve(WorkerMessageHandler);\n } else {\n var loader = fakeWorkerFilesLoader || function (callback) {\n Util.loadScript(getWorkerSrc(), function () {\n callback(window.pdfjsDistBuildPdfWorker.WorkerMessageHandler);\n });\n };\n loader(fakeWorkerFilesLoadedCapability.resolve);\n }\n return fakeWorkerFilesLoadedCapability.promise;\n }\n\n function createCDNWrapper(url) {\n // We will rely on blob URL's property to specify origin.\n // We want this function to fail in case if createObjectURL or Blob do not\n // exist or fail for some reason -- our Worker creation will fail anyway.\n var wrapper = 'importScripts(\\'' + url + '\\');';\n return URL.createObjectURL(new Blob([wrapper]));\n }\n\n let pdfWorkerPorts = new WeakMap();\n\n function PDFWorker(name, port) {\n if (port && pdfWorkerPorts.has(port)) {\n throw new Error('Cannot use more than one PDFWorker per port');\n }\n\n this.name = name;\n this.destroyed = false;\n this.postMessageTransfers = true;\n\n this._readyCapability = createPromiseCapability();\n this._port = null;\n this._webWorker = null;\n this._messageHandler = null;\n\n if (port) {\n pdfWorkerPorts.set(port, this);\n this._initializeFromPort(port);\n return;\n }\n\n this._initialize();\n }\n\n PDFWorker.prototype = /** @lends PDFWorker.prototype */ {\n get promise() {\n return this._readyCapability.promise;\n },\n\n get port() {\n return this._port;\n },\n\n get messageHandler() {\n return this._messageHandler;\n },\n\n _initializeFromPort: function PDFWorker_initializeFromPort(port) {\n this._port = port;\n this._messageHandler = new MessageHandler('main', 'worker', port);\n this._messageHandler.on('ready', function () {\n // Ignoring 'ready' event -- MessageHandler shall be already initialized\n // and ready to accept the messages.\n });\n this._readyCapability.resolve();\n },\n\n _initialize: function PDFWorker_initialize() {\n // If worker support isn't disabled explicit and the browser has worker\n // support, create a new web worker and test if it/the browser fulfills\n // all requirements to run parts of pdf.js in a web worker.\n // Right now, the requirement is, that an Uint8Array is still an\n // Uint8Array as it arrives on the worker. (Chrome added this with v.15.)\n if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('SINGLE_FILE')) &&\n !isWorkerDisabled && !getDefaultSetting('disableWorker') &&\n typeof Worker !== 'undefined') {\n var workerSrc = getWorkerSrc();\n\n try {\n // Wraps workerSrc path into blob URL, if the former does not belong\n // to the same origin.\n if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('GENERIC') &&\n !isSameOrigin(window.location.href, workerSrc)) {\n workerSrc = createCDNWrapper(\n new URL(workerSrc, window.location).href);\n }\n\n // Some versions of FF can't create a worker on localhost, see:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=683280\n var worker = new Worker(workerSrc);\n var messageHandler = new MessageHandler('main', 'worker', worker);\n var terminateEarly = () => {\n worker.removeEventListener('error', onWorkerError);\n messageHandler.destroy();\n worker.terminate();\n if (this.destroyed) {\n this._readyCapability.reject(new Error('Worker was destroyed'));\n } else {\n // Fall back to fake worker if the termination is caused by an\n // error (e.g. NetworkError / SecurityError).\n this._setupFakeWorker();\n }\n };\n\n var onWorkerError = () => {\n if (!this._webWorker) {\n // Worker failed to initialize due to an error. Clean up and fall\n // back to the fake worker.\n terminateEarly();\n }\n };\n worker.addEventListener('error', onWorkerError);\n\n messageHandler.on('test', (data) => {\n worker.removeEventListener('error', onWorkerError);\n if (this.destroyed) {\n terminateEarly();\n return; // worker was destroyed\n }\n var supportTypedArray = data && data.supportTypedArray;\n if (supportTypedArray) {\n this._messageHandler = messageHandler;\n this._port = worker;\n this._webWorker = worker;\n if (!data.supportTransfers) {\n this.postMessageTransfers = false;\n isPostMessageTransfersDisabled = true;\n }\n this._readyCapability.resolve();\n // Send global setting, e.g. verbosity level.\n messageHandler.send('configure', {\n verbosity: getVerbosityLevel(),\n });\n } else {\n this._setupFakeWorker();\n messageHandler.destroy();\n worker.terminate();\n }\n });\n\n messageHandler.on('console_log', function (data) {\n console.log.apply(console, data);\n });\n messageHandler.on('console_error', function (data) {\n console.error.apply(console, data);\n });\n\n messageHandler.on('ready', (data) => {\n worker.removeEventListener('error', onWorkerError);\n if (this.destroyed) {\n terminateEarly();\n return; // worker was destroyed\n }\n try {\n sendTest();\n } catch (e) {\n // We need fallback to a faked worker.\n this._setupFakeWorker();\n }\n });\n\n var sendTest = function () {\n var postMessageTransfers =\n getDefaultSetting('postMessageTransfers') &&\n !isPostMessageTransfersDisabled;\n var testObj = new Uint8Array([postMessageTransfers ? 255 : 0]);\n // Some versions of Opera throw a DATA_CLONE_ERR on serializing the\n // typed array. Also, checking if we can use transfers.\n try {\n messageHandler.send('test', testObj, [testObj.buffer]);\n } catch (ex) {\n info('Cannot use postMessage transfers');\n testObj[0] = 0;\n messageHandler.send('test', testObj);\n }\n };\n\n // It might take time for worker to initialize (especially when AMD\n // loader is used). We will try to send test immediately, and then\n // when 'ready' message will arrive. The worker shall process only\n // first received 'test'.\n sendTest();\n return;\n } catch (e) {\n info('The worker has been disabled.');\n }\n }\n // Either workers are disabled, not supported or have thrown an exception.\n // Thus, we fallback to a faked worker.\n this._setupFakeWorker();\n },\n\n _setupFakeWorker: function PDFWorker_setupFakeWorker() {\n if (!isWorkerDisabled && !getDefaultSetting('disableWorker')) {\n warn('Setting up fake worker.');\n isWorkerDisabled = true;\n }\n\n setupFakeWorkerGlobal().then((WorkerMessageHandler) => {\n if (this.destroyed) {\n this._readyCapability.reject(new Error('Worker was destroyed'));\n return;\n }\n\n // We cannot turn on proper fake port simulation (this includes\n // structured cloning) when typed arrays are not supported. Relying\n // on a chance that messages will be sent in proper order.\n var isTypedArraysPresent = Uint8Array !== Float32Array;\n var port = new LoopbackPort(isTypedArraysPresent);\n this._port = port;\n\n // All fake workers use the same port, making id unique.\n var id = 'fake' + (nextFakeWorkerId++);\n\n // If the main thread is our worker, setup the handling for the\n // messages -- the main thread sends to it self.\n var workerHandler = new MessageHandler(id + '_worker', id, port);\n WorkerMessageHandler.setup(workerHandler, port);\n\n var messageHandler = new MessageHandler(id, id + '_worker', port);\n this._messageHandler = messageHandler;\n this._readyCapability.resolve();\n });\n },\n\n /**\n * Destroys the worker instance.\n */\n destroy: function PDFWorker_destroy() {\n this.destroyed = true;\n if (this._webWorker) {\n // We need to terminate only web worker created resource.\n this._webWorker.terminate();\n this._webWorker = null;\n }\n pdfWorkerPorts.delete(this._port);\n this._port = null;\n if (this._messageHandler) {\n this._messageHandler.destroy();\n this._messageHandler = null;\n }\n },\n };\n\n PDFWorker.fromPort = function (port) {\n if (pdfWorkerPorts.has(port)) {\n return pdfWorkerPorts.get(port);\n }\n return new PDFWorker(null, port);\n };\n\n return PDFWorker;\n})();\n\n/**\n * For internal use only.\n * @ignore\n */\nvar WorkerTransport = (function WorkerTransportClosure() {\n function WorkerTransport(messageHandler, loadingTask, networkStream,\n CMapReaderFactory) {\n this.messageHandler = messageHandler;\n this.loadingTask = loadingTask;\n this.commonObjs = new PDFObjects();\n this.fontLoader = new FontLoader(loadingTask.docId);\n this.CMapReaderFactory = new CMapReaderFactory({\n baseUrl: getDefaultSetting('cMapUrl'),\n isCompressed: getDefaultSetting('cMapPacked'),\n });\n\n this.destroyed = false;\n this.destroyCapability = null;\n this._passwordCapability = null;\n\n this._networkStream = networkStream;\n this._fullReader = null;\n this._lastProgress = null;\n\n this.pageCache = [];\n this.pagePromises = [];\n this.downloadInfoCapability = createPromiseCapability();\n\n this.setupMessageHandler();\n }\n WorkerTransport.prototype = {\n destroy: function WorkerTransport_destroy() {\n if (this.destroyCapability) {\n return this.destroyCapability.promise;\n }\n\n this.destroyed = true;\n this.destroyCapability = createPromiseCapability();\n\n if (this._passwordCapability) {\n this._passwordCapability.reject(\n new Error('Worker was destroyed during onPassword callback'));\n }\n\n var waitOn = [];\n // We need to wait for all renderings to be completed, e.g.\n // timeout/rAF can take a long time.\n this.pageCache.forEach(function (page) {\n if (page) {\n waitOn.push(page._destroy());\n }\n });\n this.pageCache = [];\n this.pagePromises = [];\n // We also need to wait for the worker to finish its long running tasks.\n var terminated = this.messageHandler.sendWithPromise('Terminate', null);\n waitOn.push(terminated);\n Promise.all(waitOn).then(() => {\n this.fontLoader.clear();\n if (this._networkStream) {\n this._networkStream.cancelAllRequests();\n }\n\n if (this.messageHandler) {\n this.messageHandler.destroy();\n this.messageHandler = null;\n }\n this.destroyCapability.resolve();\n }, this.destroyCapability.reject);\n return this.destroyCapability.promise;\n },\n\n setupMessageHandler: function WorkerTransport_setupMessageHandler() {\n var messageHandler = this.messageHandler;\n var loadingTask = this.loadingTask;\n\n messageHandler.on('GetReader', function(data, sink) {\n assert(this._networkStream);\n this._fullReader = this._networkStream.getFullReader();\n this._fullReader.onProgress = (evt) => {\n this._lastProgress = {\n loaded: evt.loaded,\n total: evt.total,\n };\n };\n sink.onPull = () => {\n this._fullReader.read().then(function({ value, done, }) {\n if (done) {\n sink.close();\n return;\n }\n assert(isArrayBuffer(value));\n // Enqueue data chunk into sink, and transfer it\n // to other side as `Transferable` object.\n sink.enqueue(new Uint8Array(value), 1, [value]);\n }).catch((reason) => {\n sink.error(reason);\n });\n };\n\n sink.onCancel = (reason) => {\n this._fullReader.cancel(reason);\n };\n }, this);\n\n messageHandler.on('ReaderHeadersReady', function(data) {\n let headersCapability = createPromiseCapability();\n let fullReader = this._fullReader;\n fullReader.headersReady.then(() => {\n // If stream or range are disabled, it's our only way to report\n // loading progress.\n if (!fullReader.isStreamingSupported ||\n !fullReader.isRangeSupported) {\n if (this._lastProgress) {\n let loadingTask = this.loadingTask;\n if (loadingTask.onProgress) {\n loadingTask.onProgress(this._lastProgress);\n }\n }\n fullReader.onProgress = (evt) => {\n let loadingTask = this.loadingTask;\n if (loadingTask.onProgress) {\n loadingTask.onProgress({\n loaded: evt.loaded,\n total: evt.total,\n });\n }\n };\n }\n\n headersCapability.resolve({\n isStreamingSupported: fullReader.isStreamingSupported,\n isRangeSupported: fullReader.isRangeSupported,\n contentLength: fullReader.contentLength,\n });\n }, headersCapability.reject);\n\n return headersCapability.promise;\n }, this);\n\n messageHandler.on('GetRangeReader', function(data, sink) {\n assert(this._networkStream);\n let _rangeReader =\n this._networkStream.getRangeReader(data.begin, data.end);\n\n sink.onPull = () => {\n _rangeReader.read().then(function({ value, done, }) {\n if (done) {\n sink.close();\n return;\n }\n assert(isArrayBuffer(value));\n sink.enqueue(new Uint8Array(value), 1, [value]);\n }).catch((reason) => {\n sink.error(reason);\n });\n };\n\n sink.onCancel = (reason) => {\n _rangeReader.cancel(reason);\n };\n }, this);\n\n messageHandler.on('GetDoc', function transportDoc(data) {\n var pdfInfo = data.pdfInfo;\n this.numPages = data.pdfInfo.numPages;\n var loadingTask = this.loadingTask;\n var pdfDocument = new PDFDocumentProxy(pdfInfo, this, loadingTask);\n this.pdfDocument = pdfDocument;\n loadingTask._capability.resolve(pdfDocument);\n }, this);\n\n messageHandler.on('PasswordRequest',\n function transportPasswordRequest(exception) {\n this._passwordCapability = createPromiseCapability();\n\n if (loadingTask.onPassword) {\n var updatePassword = (password) => {\n this._passwordCapability.resolve({\n password,\n });\n };\n loadingTask.onPassword(updatePassword, exception.code);\n } else {\n this._passwordCapability.reject(\n new PasswordException(exception.message, exception.code));\n }\n return this._passwordCapability.promise;\n }, this);\n\n messageHandler.on('PasswordException',\n function transportPasswordException(exception) {\n loadingTask._capability.reject(\n new PasswordException(exception.message, exception.code));\n }, this);\n\n messageHandler.on('InvalidPDF', function transportInvalidPDF(exception) {\n this.loadingTask._capability.reject(\n new InvalidPDFException(exception.message));\n }, this);\n\n messageHandler.on('MissingPDF', function transportMissingPDF(exception) {\n this.loadingTask._capability.reject(\n new MissingPDFException(exception.message));\n }, this);\n\n messageHandler.on('UnexpectedResponse',\n function transportUnexpectedResponse(exception) {\n this.loadingTask._capability.reject(\n new UnexpectedResponseException(exception.message, exception.status));\n }, this);\n\n messageHandler.on('UnknownError',\n function transportUnknownError(exception) {\n this.loadingTask._capability.reject(\n new UnknownErrorException(exception.message, exception.details));\n }, this);\n\n messageHandler.on('DataLoaded', function transportPage(data) {\n this.downloadInfoCapability.resolve(data);\n }, this);\n\n messageHandler.on('PDFManagerReady', function transportPage(data) {\n }, this);\n\n messageHandler.on('StartRenderPage', function transportRender(data) {\n if (this.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n var page = this.pageCache[data.pageIndex];\n\n page.stats.timeEnd('Page Request');\n page._startRenderPage(data.transparency, data.intent);\n }, this);\n\n messageHandler.on('RenderPageChunk', function transportRender(data) {\n if (this.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n var page = this.pageCache[data.pageIndex];\n\n page._renderPageChunk(data.operatorList, data.intent);\n }, this);\n\n messageHandler.on('commonobj', function transportObj(data) {\n if (this.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n\n var id = data[0];\n var type = data[1];\n if (this.commonObjs.hasData(id)) {\n return;\n }\n\n switch (type) {\n case 'Font':\n var exportedData = data[2];\n\n if ('error' in exportedData) {\n var exportedError = exportedData.error;\n warn('Error during font loading: ' + exportedError);\n this.commonObjs.resolve(id, exportedError);\n break;\n }\n var fontRegistry = null;\n if (getDefaultSetting('pdfBug') && globalScope.FontInspector &&\n globalScope['FontInspector'].enabled) {\n fontRegistry = {\n registerFont(font, url) {\n globalScope['FontInspector'].fontAdded(font, url);\n },\n };\n }\n var font = new FontFaceObject(exportedData, {\n isEvalSupported: getDefaultSetting('isEvalSupported'),\n disableFontFace: getDefaultSetting('disableFontFace'),\n fontRegistry,\n });\n var fontReady = (fontObjs) => {\n this.commonObjs.resolve(id, font);\n };\n\n this.fontLoader.bind([font], fontReady);\n break;\n case 'FontPath':\n this.commonObjs.resolve(id, data[2]);\n break;\n default:\n throw new Error(`Got unknown common object type ${type}`);\n }\n }, this);\n\n messageHandler.on('obj', function transportObj(data) {\n if (this.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n\n var id = data[0];\n var pageIndex = data[1];\n var type = data[2];\n var pageProxy = this.pageCache[pageIndex];\n var imageData;\n if (pageProxy.objs.hasData(id)) {\n return;\n }\n\n switch (type) {\n case 'JpegStream':\n imageData = data[3];\n loadJpegStream(id, imageData, pageProxy.objs);\n break;\n case 'Image':\n imageData = data[3];\n pageProxy.objs.resolve(id, imageData);\n\n // heuristics that will allow not to store large data\n var MAX_IMAGE_SIZE_TO_STORE = 8000000;\n if (imageData && 'data' in imageData &&\n imageData.data.length > MAX_IMAGE_SIZE_TO_STORE) {\n pageProxy.cleanupAfterRender = true;\n }\n break;\n default:\n throw new Error(`Got unknown object type ${type}`);\n }\n }, this);\n\n messageHandler.on('DocProgress', function transportDocProgress(data) {\n if (this.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n\n var loadingTask = this.loadingTask;\n if (loadingTask.onProgress) {\n loadingTask.onProgress({\n loaded: data.loaded,\n total: data.total,\n });\n }\n }, this);\n\n messageHandler.on('PageError', function transportError(data) {\n if (this.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n\n var page = this.pageCache[data.pageNum - 1];\n var intentState = page.intentStates[data.intent];\n\n if (intentState.displayReadyCapability) {\n intentState.displayReadyCapability.reject(data.error);\n } else {\n throw new Error(data.error);\n }\n\n if (intentState.operatorList) {\n // Mark operator list as complete.\n intentState.operatorList.lastChunk = true;\n for (var i = 0; i < intentState.renderTasks.length; i++) {\n intentState.renderTasks[i].operatorListChanged();\n }\n }\n }, this);\n\n messageHandler.on('UnsupportedFeature',\n function transportUnsupportedFeature(data) {\n if (this.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n var featureId = data.featureId;\n var loadingTask = this.loadingTask;\n if (loadingTask.onUnsupportedFeature) {\n loadingTask.onUnsupportedFeature(featureId);\n }\n _UnsupportedManager.notify(featureId);\n }, this);\n\n messageHandler.on('JpegDecode', function(data) {\n if (this.destroyed) {\n return Promise.reject(new Error('Worker was destroyed'));\n }\n\n if (typeof document === 'undefined') {\n // Make sure that this code is not executing in node.js, as\n // it's using DOM image, and there is no library to support that.\n return Promise.reject(new Error('\"document\" is not defined.'));\n }\n\n var imageUrl = data[0];\n var components = data[1];\n if (components !== 3 && components !== 1) {\n return Promise.reject(\n new Error('Only 3 components or 1 component can be returned'));\n }\n\n return new Promise(function (resolve, reject) {\n var img = new Image();\n img.onload = function () {\n var width = img.width;\n var height = img.height;\n var size = width * height;\n var rgbaLength = size * 4;\n var buf = new Uint8Array(size * components);\n var tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = width;\n tmpCanvas.height = height;\n var tmpCtx = tmpCanvas.getContext('2d');\n tmpCtx.drawImage(img, 0, 0);\n var data = tmpCtx.getImageData(0, 0, width, height).data;\n var i, j;\n\n if (components === 3) {\n for (i = 0, j = 0; i < rgbaLength; i += 4, j += 3) {\n buf[j] = data[i];\n buf[j + 1] = data[i + 1];\n buf[j + 2] = data[i + 2];\n }\n } else if (components === 1) {\n for (i = 0, j = 0; i < rgbaLength; i += 4, j++) {\n buf[j] = data[i];\n }\n }\n resolve({ data: buf, width, height, });\n };\n img.onerror = function () {\n reject(new Error('JpegDecode failed to load image'));\n };\n img.src = imageUrl;\n });\n }, this);\n\n messageHandler.on('FetchBuiltInCMap', function (data) {\n if (this.destroyed) {\n return Promise.reject(new Error('Worker was destroyed'));\n }\n return this.CMapReaderFactory.fetch({\n name: data.name,\n });\n }, this);\n },\n\n getData: function WorkerTransport_getData() {\n return this.messageHandler.sendWithPromise('GetData', null);\n },\n\n getPage: function WorkerTransport_getPage(pageNumber, capability) {\n if (!Number.isInteger(pageNumber) ||\n pageNumber <= 0 || pageNumber > this.numPages) {\n return Promise.reject(new Error('Invalid page request'));\n }\n\n var pageIndex = pageNumber - 1;\n if (pageIndex in this.pagePromises) {\n return this.pagePromises[pageIndex];\n }\n var promise = this.messageHandler.sendWithPromise('GetPage', {\n pageIndex,\n }).then((pageInfo) => {\n if (this.destroyed) {\n throw new Error('Transport destroyed');\n }\n var page = new PDFPageProxy(pageIndex, pageInfo, this);\n this.pageCache[pageIndex] = page;\n return page;\n });\n this.pagePromises[pageIndex] = promise;\n return promise;\n },\n\n getPageIndex: function WorkerTransport_getPageIndexByRef(ref) {\n return this.messageHandler.sendWithPromise('GetPageIndex', {\n ref,\n }).catch(function (reason) {\n return Promise.reject(new Error(reason));\n });\n },\n\n getAnnotations: function WorkerTransport_getAnnotations(pageIndex, intent) {\n return this.messageHandler.sendWithPromise('GetAnnotations', {\n pageIndex,\n intent,\n });\n },\n\n getDestinations: function WorkerTransport_getDestinations() {\n return this.messageHandler.sendWithPromise('GetDestinations', null);\n },\n\n getDestination: function WorkerTransport_getDestination(id) {\n return this.messageHandler.sendWithPromise('GetDestination', {\n id,\n });\n },\n\n getPageLabels: function WorkerTransport_getPageLabels() {\n return this.messageHandler.sendWithPromise('GetPageLabels', null);\n },\n\n getPageMode() {\n return this.messageHandler.sendWithPromise('GetPageMode', null);\n },\n\n getAttachments: function WorkerTransport_getAttachments() {\n return this.messageHandler.sendWithPromise('GetAttachments', null);\n },\n\n getJavaScript: function WorkerTransport_getJavaScript() {\n return this.messageHandler.sendWithPromise('GetJavaScript', null);\n },\n\n getOutline: function WorkerTransport_getOutline() {\n return this.messageHandler.sendWithPromise('GetOutline', null);\n },\n\n getMetadata: function WorkerTransport_getMetadata() {\n return this.messageHandler.sendWithPromise('GetMetadata', null).\n then(function transportMetadata(results) {\n return {\n info: results[0],\n metadata: (results[1] ? new Metadata(results[1]) : null),\n };\n });\n },\n\n getStats: function WorkerTransport_getStats() {\n return this.messageHandler.sendWithPromise('GetStats', null);\n },\n\n startCleanup: function WorkerTransport_startCleanup() {\n this.messageHandler.sendWithPromise('Cleanup', null).then(() => {\n for (var i = 0, ii = this.pageCache.length; i < ii; i++) {\n var page = this.pageCache[i];\n if (page) {\n page.cleanup();\n }\n }\n this.commonObjs.clear();\n this.fontLoader.clear();\n });\n },\n };\n return WorkerTransport;\n\n})();\n\n/**\n * A PDF document and page is built of many objects. E.g. there are objects\n * for fonts, images, rendering code and such. These objects might get processed\n * inside of a worker. The `PDFObjects` implements some basic functions to\n * manage these objects.\n * @ignore\n */\nvar PDFObjects = (function PDFObjectsClosure() {\n function PDFObjects() {\n this.objs = Object.create(null);\n }\n\n PDFObjects.prototype = {\n /**\n * Internal function.\n * Ensures there is an object defined for `objId`.\n */\n ensureObj: function PDFObjects_ensureObj(objId) {\n if (this.objs[objId]) {\n return this.objs[objId];\n }\n\n var obj = {\n capability: createPromiseCapability(),\n data: null,\n resolved: false,\n };\n this.objs[objId] = obj;\n\n return obj;\n },\n\n /**\n * If called *without* callback, this returns the data of `objId` but the\n * object needs to be resolved. If it isn't, this function throws.\n *\n * If called *with* a callback, the callback is called with the data of the\n * object once the object is resolved. That means, if you call this\n * function and the object is already resolved, the callback gets called\n * right away.\n */\n get: function PDFObjects_get(objId, callback) {\n // If there is a callback, then the get can be async and the object is\n // not required to be resolved right now\n if (callback) {\n this.ensureObj(objId).capability.promise.then(callback);\n return null;\n }\n\n // If there isn't a callback, the user expects to get the resolved data\n // directly.\n var obj = this.objs[objId];\n\n // If there isn't an object yet or the object isn't resolved, then the\n // data isn't ready yet!\n if (!obj || !obj.resolved) {\n throw new Error(`Requesting object that isn't resolved yet ${objId}`);\n }\n\n return obj.data;\n },\n\n /**\n * Resolves the object `objId` with optional `data`.\n */\n resolve: function PDFObjects_resolve(objId, data) {\n var obj = this.ensureObj(objId);\n\n obj.resolved = true;\n obj.data = data;\n obj.capability.resolve(data);\n },\n\n isResolved: function PDFObjects_isResolved(objId) {\n var objs = this.objs;\n\n if (!objs[objId]) {\n return false;\n }\n return objs[objId].resolved;\n },\n\n hasData: function PDFObjects_hasData(objId) {\n return this.isResolved(objId);\n },\n\n /**\n * Returns the data of `objId` if object exists, null otherwise.\n */\n getData: function PDFObjects_getData(objId) {\n var objs = this.objs;\n if (!objs[objId] || !objs[objId].resolved) {\n return null;\n }\n return objs[objId].data;\n },\n\n clear: function PDFObjects_clear() {\n this.objs = Object.create(null);\n },\n };\n return PDFObjects;\n})();\n\n/**\n * Allows controlling of the rendering tasks.\n * @class\n * @alias RenderTask\n */\nvar RenderTask = (function RenderTaskClosure() {\n function RenderTask(internalRenderTask) {\n this._internalRenderTask = internalRenderTask;\n\n /**\n * Callback for incremental rendering -- a function that will be called\n * each time the rendering is paused. To continue rendering call the\n * function that is the first argument to the callback.\n * @type {function}\n */\n this.onContinue = null;\n }\n\n RenderTask.prototype = /** @lends RenderTask.prototype */ {\n /**\n * Promise for rendering task completion.\n * @return {Promise}\n */\n get promise() {\n return this._internalRenderTask.capability.promise;\n },\n\n /**\n * Cancels the rendering task. If the task is currently rendering it will\n * not be cancelled until graphics pauses with a timeout. The promise that\n * this object extends will be rejected when cancelled.\n */\n cancel: function RenderTask_cancel() {\n this._internalRenderTask.cancel();\n },\n\n /**\n * Registers callbacks to indicate the rendering task completion.\n *\n * @param {function} onFulfilled The callback for the rendering completion.\n * @param {function} onRejected The callback for the rendering failure.\n * @return {Promise} A promise that is resolved after the onFulfilled or\n * onRejected callback.\n */\n then: function RenderTask_then(onFulfilled, onRejected) {\n return this.promise.then.apply(this.promise, arguments);\n },\n };\n\n return RenderTask;\n})();\n\n/**\n * For internal use only.\n * @ignore\n */\nvar InternalRenderTask = (function InternalRenderTaskClosure() {\n let canvasInRendering = new WeakMap();\n\n function InternalRenderTask(callback, params, objs, commonObjs, operatorList,\n pageNumber, canvasFactory) {\n this.callback = callback;\n this.params = params;\n this.objs = objs;\n this.commonObjs = commonObjs;\n this.operatorListIdx = null;\n this.operatorList = operatorList;\n this.pageNumber = pageNumber;\n this.canvasFactory = canvasFactory;\n this.running = false;\n this.graphicsReadyCallback = null;\n this.graphicsReady = false;\n this.useRequestAnimationFrame = false;\n this.cancelled = false;\n this.capability = createPromiseCapability();\n this.task = new RenderTask(this);\n // caching this-bound methods\n this._continueBound = this._continue.bind(this);\n this._scheduleNextBound = this._scheduleNext.bind(this);\n this._nextBound = this._next.bind(this);\n this._canvas = params.canvasContext.canvas;\n }\n\n InternalRenderTask.prototype = {\n\n initializeGraphics:\n function InternalRenderTask_initializeGraphics(transparency) {\n\n if (this._canvas) {\n if (canvasInRendering.has(this._canvas)) {\n throw new Error(\n 'Cannot use the same canvas during multiple render() operations. ' +\n 'Use different canvas or ensure previous operations were ' +\n 'cancelled or completed.');\n }\n canvasInRendering.set(this._canvas, this);\n }\n\n if (this.cancelled) {\n return;\n }\n if (getDefaultSetting('pdfBug') && globalScope.StepperManager &&\n globalScope.StepperManager.enabled) {\n this.stepper = globalScope.StepperManager.create(this.pageNumber - 1);\n this.stepper.init(this.operatorList);\n this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();\n }\n\n var params = this.params;\n this.gfx = new CanvasGraphics(params.canvasContext, this.commonObjs,\n this.objs, this.canvasFactory,\n params.imageLayer);\n\n this.gfx.beginDrawing({\n transform: params.transform,\n viewport: params.viewport,\n transparency,\n background: params.background,\n });\n this.operatorListIdx = 0;\n this.graphicsReady = true;\n if (this.graphicsReadyCallback) {\n this.graphicsReadyCallback();\n }\n },\n\n cancel: function InternalRenderTask_cancel() {\n this.running = false;\n this.cancelled = true;\n if (this._canvas) {\n canvasInRendering.delete(this._canvas);\n }\n\n if ((typeof PDFJSDev !== 'undefined' && PDFJSDev.test('PDFJS_NEXT')) ||\n getDefaultSetting('pdfjsNext')) {\n this.callback(new RenderingCancelledException(\n 'Rendering cancelled, page ' + this.pageNumber, 'canvas'));\n } else {\n this.callback('cancelled');\n }\n },\n\n operatorListChanged: function InternalRenderTask_operatorListChanged() {\n if (!this.graphicsReady) {\n if (!this.graphicsReadyCallback) {\n this.graphicsReadyCallback = this._continueBound;\n }\n return;\n }\n\n if (this.stepper) {\n this.stepper.updateOperatorList(this.operatorList);\n }\n\n if (this.running) {\n return;\n }\n this._continue();\n },\n\n _continue: function InternalRenderTask__continue() {\n this.running = true;\n if (this.cancelled) {\n return;\n }\n if (this.task.onContinue) {\n this.task.onContinue(this._scheduleNextBound);\n } else {\n this._scheduleNext();\n }\n },\n\n _scheduleNext: function InternalRenderTask__scheduleNext() {\n if (this.useRequestAnimationFrame && typeof window !== 'undefined') {\n window.requestAnimationFrame(this._nextBound);\n } else {\n Promise.resolve(undefined).then(this._nextBound);\n }\n },\n\n _next: function InternalRenderTask__next() {\n if (this.cancelled) {\n return;\n }\n this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList,\n this.operatorListIdx,\n this._continueBound,\n this.stepper);\n if (this.operatorListIdx === this.operatorList.argsArray.length) {\n this.running = false;\n if (this.operatorList.lastChunk) {\n this.gfx.endDrawing();\n if (this._canvas) {\n canvasInRendering.delete(this._canvas);\n }\n this.callback();\n }\n }\n },\n\n };\n\n return InternalRenderTask;\n})();\n\n/**\n * (Deprecated) Global observer of unsupported feature usages. Use\n * onUnsupportedFeature callback of the {PDFDocumentLoadingTask} instance.\n */\nvar _UnsupportedManager = (function UnsupportedManagerClosure() {\n var listeners = [];\n return {\n listen(cb) {\n deprecated('Global UnsupportedManager.listen is used: ' +\n ' use PDFDocumentLoadingTask.onUnsupportedFeature instead');\n listeners.push(cb);\n },\n notify(featureId) {\n for (var i = 0, ii = listeners.length; i < ii; i++) {\n listeners[i](featureId);\n }\n },\n };\n})();\n\nvar version, build;\nif (typeof PDFJSDev !== 'undefined') {\n version = PDFJSDev.eval('BUNDLE_VERSION');\n build = PDFJSDev.eval('BUNDLE_BUILD');\n}\n\nexport {\n getDocument,\n LoopbackPort,\n PDFDataRangeTransport,\n PDFWorker,\n PDFDocumentProxy,\n PDFPageProxy,\n setPDFNetworkStreamClass,\n _UnsupportedManager,\n version,\n build,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/api.js","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint-disable no-multi-str */\n\nimport { getDefaultSetting } from './dom_utils';\nimport { shadow } from '../shared/util';\n\nvar WebGLUtils = (function WebGLUtilsClosure() {\n function loadShader(gl, code, shaderType) {\n var shader = gl.createShader(shaderType);\n gl.shaderSource(shader, code);\n gl.compileShader(shader);\n var compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n if (!compiled) {\n var errorMsg = gl.getShaderInfoLog(shader);\n throw new Error('Error during shader compilation: ' + errorMsg);\n }\n return shader;\n }\n function createVertexShader(gl, code) {\n return loadShader(gl, code, gl.VERTEX_SHADER);\n }\n function createFragmentShader(gl, code) {\n return loadShader(gl, code, gl.FRAGMENT_SHADER);\n }\n function createProgram(gl, shaders) {\n var program = gl.createProgram();\n for (var i = 0, ii = shaders.length; i < ii; ++i) {\n gl.attachShader(program, shaders[i]);\n }\n gl.linkProgram(program);\n var linked = gl.getProgramParameter(program, gl.LINK_STATUS);\n if (!linked) {\n var errorMsg = gl.getProgramInfoLog(program);\n throw new Error('Error during program linking: ' + errorMsg);\n }\n return program;\n }\n function createTexture(gl, image, textureId) {\n gl.activeTexture(textureId);\n var texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n\n // Set the parameters so we can render any size image.\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n\n // Upload the image into the texture.\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);\n return texture;\n }\n\n var currentGL, currentCanvas;\n function generateGL() {\n if (currentGL) {\n return;\n }\n\n // The temporary canvas is used in the WebGL context.\n currentCanvas = document.createElement('canvas');\n currentGL = currentCanvas.getContext('webgl',\n { premultipliedalpha: false, });\n }\n\n var smaskVertexShaderCode = '\\\n attribute vec2 a_position; \\\n attribute vec2 a_texCoord; \\\n \\\n uniform vec2 u_resolution; \\\n \\\n varying vec2 v_texCoord; \\\n \\\n void main() { \\\n vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; \\\n gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \\\n \\\n v_texCoord = a_texCoord; \\\n } ';\n\n var smaskFragmentShaderCode = '\\\n precision mediump float; \\\n \\\n uniform vec4 u_backdrop; \\\n uniform int u_subtype; \\\n uniform sampler2D u_image; \\\n uniform sampler2D u_mask; \\\n \\\n varying vec2 v_texCoord; \\\n \\\n void main() { \\\n vec4 imageColor = texture2D(u_image, v_texCoord); \\\n vec4 maskColor = texture2D(u_mask, v_texCoord); \\\n if (u_backdrop.a > 0.0) { \\\n maskColor.rgb = maskColor.rgb * maskColor.a + \\\n u_backdrop.rgb * (1.0 - maskColor.a); \\\n } \\\n float lum; \\\n if (u_subtype == 0) { \\\n lum = maskColor.a; \\\n } else { \\\n lum = maskColor.r * 0.3 + maskColor.g * 0.59 + \\\n maskColor.b * 0.11; \\\n } \\\n imageColor.a *= lum; \\\n imageColor.rgb *= imageColor.a; \\\n gl_FragColor = imageColor; \\\n } ';\n\n var smaskCache = null;\n\n function initSmaskGL() {\n var canvas, gl;\n\n generateGL();\n canvas = currentCanvas;\n currentCanvas = null;\n gl = currentGL;\n currentGL = null;\n\n // setup a GLSL program\n var vertexShader = createVertexShader(gl, smaskVertexShaderCode);\n var fragmentShader = createFragmentShader(gl, smaskFragmentShaderCode);\n var program = createProgram(gl, [vertexShader, fragmentShader]);\n gl.useProgram(program);\n\n var cache = {};\n cache.gl = gl;\n cache.canvas = canvas;\n cache.resolutionLocation = gl.getUniformLocation(program, 'u_resolution');\n cache.positionLocation = gl.getAttribLocation(program, 'a_position');\n cache.backdropLocation = gl.getUniformLocation(program, 'u_backdrop');\n cache.subtypeLocation = gl.getUniformLocation(program, 'u_subtype');\n\n var texCoordLocation = gl.getAttribLocation(program, 'a_texCoord');\n var texLayerLocation = gl.getUniformLocation(program, 'u_image');\n var texMaskLocation = gl.getUniformLocation(program, 'u_mask');\n\n // provide texture coordinates for the rectangle.\n var texCoordBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0.0, 0.0,\n 1.0, 0.0,\n 0.0, 1.0,\n 0.0, 1.0,\n 1.0, 0.0,\n 1.0, 1.0]), gl.STATIC_DRAW);\n gl.enableVertexAttribArray(texCoordLocation);\n gl.vertexAttribPointer(texCoordLocation, 2, gl.FLOAT, false, 0, 0);\n\n gl.uniform1i(texLayerLocation, 0);\n gl.uniform1i(texMaskLocation, 1);\n\n smaskCache = cache;\n }\n\n function composeSMask(layer, mask, properties) {\n var width = layer.width, height = layer.height;\n\n if (!smaskCache) {\n initSmaskGL();\n }\n var cache = smaskCache, canvas = cache.canvas, gl = cache.gl;\n canvas.width = width;\n canvas.height = height;\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n gl.uniform2f(cache.resolutionLocation, width, height);\n\n if (properties.backdrop) {\n gl.uniform4f(cache.resolutionLocation, properties.backdrop[0],\n properties.backdrop[1], properties.backdrop[2], 1);\n } else {\n gl.uniform4f(cache.resolutionLocation, 0, 0, 0, 0);\n }\n gl.uniform1i(cache.subtypeLocation,\n properties.subtype === 'Luminosity' ? 1 : 0);\n\n // Create a textures\n var texture = createTexture(gl, layer, gl.TEXTURE0);\n var maskTexture = createTexture(gl, mask, gl.TEXTURE1);\n\n\n // Create a buffer and put a single clipspace rectangle in\n // it (2 triangles)\n var buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n width, 0,\n 0, height,\n 0, height,\n width, 0,\n width, height]), gl.STATIC_DRAW);\n gl.enableVertexAttribArray(cache.positionLocation);\n gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0);\n\n // draw\n gl.clearColor(0, 0, 0, 0);\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n gl.clear(gl.COLOR_BUFFER_BIT);\n\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n\n gl.flush();\n\n gl.deleteTexture(texture);\n gl.deleteTexture(maskTexture);\n gl.deleteBuffer(buffer);\n\n return canvas;\n }\n\n var figuresVertexShaderCode = '\\\n attribute vec2 a_position; \\\n attribute vec3 a_color; \\\n \\\n uniform vec2 u_resolution; \\\n uniform vec2 u_scale; \\\n uniform vec2 u_offset; \\\n \\\n varying vec4 v_color; \\\n \\\n void main() { \\\n vec2 position = (a_position + u_offset) * u_scale; \\\n vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; \\\n gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \\\n \\\n v_color = vec4(a_color / 255.0, 1.0); \\\n } ';\n\n var figuresFragmentShaderCode = '\\\n precision mediump float; \\\n \\\n varying vec4 v_color; \\\n \\\n void main() { \\\n gl_FragColor = v_color; \\\n } ';\n\n var figuresCache = null;\n\n function initFiguresGL() {\n var canvas, gl;\n\n generateGL();\n canvas = currentCanvas;\n currentCanvas = null;\n gl = currentGL;\n currentGL = null;\n\n // setup a GLSL program\n var vertexShader = createVertexShader(gl, figuresVertexShaderCode);\n var fragmentShader = createFragmentShader(gl, figuresFragmentShaderCode);\n var program = createProgram(gl, [vertexShader, fragmentShader]);\n gl.useProgram(program);\n\n var cache = {};\n cache.gl = gl;\n cache.canvas = canvas;\n cache.resolutionLocation = gl.getUniformLocation(program, 'u_resolution');\n cache.scaleLocation = gl.getUniformLocation(program, 'u_scale');\n cache.offsetLocation = gl.getUniformLocation(program, 'u_offset');\n cache.positionLocation = gl.getAttribLocation(program, 'a_position');\n cache.colorLocation = gl.getAttribLocation(program, 'a_color');\n\n figuresCache = cache;\n }\n\n function drawFigures(width, height, backgroundColor, figures, context) {\n if (!figuresCache) {\n initFiguresGL();\n }\n var cache = figuresCache, canvas = cache.canvas, gl = cache.gl;\n\n canvas.width = width;\n canvas.height = height;\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n gl.uniform2f(cache.resolutionLocation, width, height);\n\n // count triangle points\n var count = 0;\n var i, ii, rows;\n for (i = 0, ii = figures.length; i < ii; i++) {\n switch (figures[i].type) {\n case 'lattice':\n rows = (figures[i].coords.length / figures[i].verticesPerRow) | 0;\n count += (rows - 1) * (figures[i].verticesPerRow - 1) * 6;\n break;\n case 'triangles':\n count += figures[i].coords.length;\n break;\n }\n }\n // transfer data\n var coords = new Float32Array(count * 2);\n var colors = new Uint8Array(count * 3);\n var coordsMap = context.coords, colorsMap = context.colors;\n var pIndex = 0, cIndex = 0;\n for (i = 0, ii = figures.length; i < ii; i++) {\n var figure = figures[i], ps = figure.coords, cs = figure.colors;\n switch (figure.type) {\n case 'lattice':\n var cols = figure.verticesPerRow;\n rows = (ps.length / cols) | 0;\n for (var row = 1; row < rows; row++) {\n var offset = row * cols + 1;\n for (var col = 1; col < cols; col++, offset++) {\n coords[pIndex] = coordsMap[ps[offset - cols - 1]];\n coords[pIndex + 1] = coordsMap[ps[offset - cols - 1] + 1];\n coords[pIndex + 2] = coordsMap[ps[offset - cols]];\n coords[pIndex + 3] = coordsMap[ps[offset - cols] + 1];\n coords[pIndex + 4] = coordsMap[ps[offset - 1]];\n coords[pIndex + 5] = coordsMap[ps[offset - 1] + 1];\n colors[cIndex] = colorsMap[cs[offset - cols - 1]];\n colors[cIndex + 1] = colorsMap[cs[offset - cols - 1] + 1];\n colors[cIndex + 2] = colorsMap[cs[offset - cols - 1] + 2];\n colors[cIndex + 3] = colorsMap[cs[offset - cols]];\n colors[cIndex + 4] = colorsMap[cs[offset - cols] + 1];\n colors[cIndex + 5] = colorsMap[cs[offset - cols] + 2];\n colors[cIndex + 6] = colorsMap[cs[offset - 1]];\n colors[cIndex + 7] = colorsMap[cs[offset - 1] + 1];\n colors[cIndex + 8] = colorsMap[cs[offset - 1] + 2];\n\n coords[pIndex + 6] = coords[pIndex + 2];\n coords[pIndex + 7] = coords[pIndex + 3];\n coords[pIndex + 8] = coords[pIndex + 4];\n coords[pIndex + 9] = coords[pIndex + 5];\n coords[pIndex + 10] = coordsMap[ps[offset]];\n coords[pIndex + 11] = coordsMap[ps[offset] + 1];\n colors[cIndex + 9] = colors[cIndex + 3];\n colors[cIndex + 10] = colors[cIndex + 4];\n colors[cIndex + 11] = colors[cIndex + 5];\n colors[cIndex + 12] = colors[cIndex + 6];\n colors[cIndex + 13] = colors[cIndex + 7];\n colors[cIndex + 14] = colors[cIndex + 8];\n colors[cIndex + 15] = colorsMap[cs[offset]];\n colors[cIndex + 16] = colorsMap[cs[offset] + 1];\n colors[cIndex + 17] = colorsMap[cs[offset] + 2];\n pIndex += 12;\n cIndex += 18;\n }\n }\n break;\n case 'triangles':\n for (var j = 0, jj = ps.length; j < jj; j++) {\n coords[pIndex] = coordsMap[ps[j]];\n coords[pIndex + 1] = coordsMap[ps[j] + 1];\n colors[cIndex] = colorsMap[cs[j]];\n colors[cIndex + 1] = colorsMap[cs[j] + 1];\n colors[cIndex + 2] = colorsMap[cs[j] + 2];\n pIndex += 2;\n cIndex += 3;\n }\n break;\n }\n }\n\n // draw\n if (backgroundColor) {\n gl.clearColor(backgroundColor[0] / 255, backgroundColor[1] / 255,\n backgroundColor[2] / 255, 1.0);\n } else {\n gl.clearColor(0, 0, 0, 0);\n }\n gl.clear(gl.COLOR_BUFFER_BIT);\n\n var coordsBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, coordsBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, coords, gl.STATIC_DRAW);\n gl.enableVertexAttribArray(cache.positionLocation);\n gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0);\n\n var colorsBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, colorsBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW);\n gl.enableVertexAttribArray(cache.colorLocation);\n gl.vertexAttribPointer(cache.colorLocation, 3, gl.UNSIGNED_BYTE, false,\n 0, 0);\n\n gl.uniform2f(cache.scaleLocation, context.scaleX, context.scaleY);\n gl.uniform2f(cache.offsetLocation, context.offsetX, context.offsetY);\n\n gl.drawArrays(gl.TRIANGLES, 0, count);\n\n gl.flush();\n\n gl.deleteBuffer(coordsBuffer);\n gl.deleteBuffer(colorsBuffer);\n\n return canvas;\n }\n\n function cleanup() {\n if (smaskCache && smaskCache.canvas) {\n smaskCache.canvas.width = 0;\n smaskCache.canvas.height = 0;\n }\n if (figuresCache && figuresCache.canvas) {\n figuresCache.canvas.width = 0;\n figuresCache.canvas.height = 0;\n }\n smaskCache = null;\n figuresCache = null;\n }\n\n return {\n get isEnabled() {\n if (getDefaultSetting('disableWebGL')) {\n return false;\n }\n var enabled = false;\n try {\n generateGL();\n enabled = !!currentGL;\n } catch (e) { }\n return shadow(this, 'isEnabled', enabled);\n },\n composeSMask,\n drawFigures,\n clear: cleanup,\n };\n})();\n\nexport {\n WebGLUtils,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/webgl.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { assert, deprecated } from '../shared/util';\nimport { SimpleXMLParser } from './xml_parser';\n\nclass Metadata {\n constructor(data) {\n assert(typeof data === 'string', 'Metadata: input is not a string');\n\n // Ghostscript may produce invalid metadata, so try to repair that first.\n data = this._repair(data);\n\n // Convert the string to an XML document.\n let parser = new SimpleXMLParser();\n const xmlDocument = parser.parseFromString(data);\n\n this._metadata = Object.create(null);\n\n if (xmlDocument) {\n this._parse(xmlDocument);\n }\n }\n\n _repair(data) {\n return data.replace(/>\\\\376\\\\377([^<]+)/g, function(all, codes) {\n let bytes = codes.replace(/\\\\([0-3])([0-7])([0-7])/g,\n function(code, d1, d2, d3) {\n return String.fromCharCode(d1 * 64 + d2 * 8 + d3 * 1);\n });\n\n let chars = '';\n for (let i = 0, ii = bytes.length; i < ii; i += 2) {\n let code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1);\n if (code >= 32 && code < 127 && code !== 60 && code !== 62 &&\n code !== 38) {\n chars += String.fromCharCode(code);\n } else {\n chars += '&#x' + (0x10000 + code).toString(16).substring(1) + ';';\n }\n }\n\n return '>' + chars;\n });\n }\n\n _parse(xmlDocument) {\n let rdf = xmlDocument.documentElement;\n\n if (rdf.nodeName.toLowerCase() !== 'rdf:rdf') { // Wrapped in <xmpmeta>\n rdf = rdf.firstChild;\n while (rdf && rdf.nodeName.toLowerCase() !== 'rdf:rdf') {\n rdf = rdf.nextSibling;\n }\n }\n\n let nodeName = rdf ? rdf.nodeName.toLowerCase() : null;\n if (!rdf || nodeName !== 'rdf:rdf' || !rdf.hasChildNodes()) {\n return;\n }\n\n let children = rdf.childNodes;\n for (let i = 0, ii = children.length; i < ii; i++) {\n let desc = children[i];\n if (desc.nodeName.toLowerCase() !== 'rdf:description') {\n continue;\n }\n\n for (let j = 0, jj = desc.childNodes.length; j < jj; j++) {\n if (desc.childNodes[j].nodeName.toLowerCase() !== '#text') {\n let entry = desc.childNodes[j];\n let name = entry.nodeName.toLowerCase();\n\n this._metadata[name] = entry.textContent.trim();\n }\n }\n }\n }\n\n get(name) {\n return this._metadata[name] || null;\n }\n\n getAll() {\n return this._metadata;\n }\n\n has(name) {\n return typeof this._metadata[name] !== 'undefined';\n }\n\n get metadata() {\n deprecated('`metadata` getter; use `getAll()` instead.');\n return this.getAll();\n }\n}\n\nexport {\n Metadata,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/metadata.js","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n addLinkAttributes, CustomStyle, DOMSVGFactory, getDefaultSetting,\n getFilenameFromUrl, LinkTarget\n} from './dom_utils';\nimport {\n AnnotationBorderStyleType, AnnotationType, stringToPDFString, Util, warn\n} from '../shared/util';\n\n/**\n * @typedef {Object} AnnotationElementParameters\n * @property {Object} data\n * @property {HTMLDivElement} layer\n * @property {PDFPage} page\n * @property {PageViewport} viewport\n * @property {IPDFLinkService} linkService\n * @property {DownloadManager} downloadManager\n * @property {string} imageResourcesPath\n * @property {boolean} renderInteractiveForms\n * @property {Object} svgFactory\n */\n\nclass AnnotationElementFactory {\n /**\n * @param {AnnotationElementParameters} parameters\n * @returns {AnnotationElement}\n */\n static create(parameters) {\n let subtype = parameters.data.annotationType;\n\n switch (subtype) {\n case AnnotationType.LINK:\n return new LinkAnnotationElement(parameters);\n\n case AnnotationType.TEXT:\n return new TextAnnotationElement(parameters);\n\n case AnnotationType.WIDGET:\n let fieldType = parameters.data.fieldType;\n\n switch (fieldType) {\n case 'Tx':\n return new TextWidgetAnnotationElement(parameters);\n case 'Btn':\n if (parameters.data.radioButton) {\n return new RadioButtonWidgetAnnotationElement(parameters);\n } else if (parameters.data.checkBox) {\n return new CheckboxWidgetAnnotationElement(parameters);\n }\n warn('Unimplemented button widget annotation: pushbutton');\n break;\n case 'Ch':\n return new ChoiceWidgetAnnotationElement(parameters);\n }\n return new WidgetAnnotationElement(parameters);\n\n case AnnotationType.POPUP:\n return new PopupAnnotationElement(parameters);\n\n case AnnotationType.LINE:\n return new LineAnnotationElement(parameters);\n\n case AnnotationType.SQUARE:\n return new SquareAnnotationElement(parameters);\n\n case AnnotationType.CIRCLE:\n return new CircleAnnotationElement(parameters);\n\n case AnnotationType.POLYLINE:\n return new PolylineAnnotationElement(parameters);\n\n case AnnotationType.POLYGON:\n return new PolygonAnnotationElement(parameters);\n\n case AnnotationType.HIGHLIGHT:\n return new HighlightAnnotationElement(parameters);\n\n case AnnotationType.UNDERLINE:\n return new UnderlineAnnotationElement(parameters);\n\n case AnnotationType.SQUIGGLY:\n return new SquigglyAnnotationElement(parameters);\n\n case AnnotationType.STRIKEOUT:\n return new StrikeOutAnnotationElement(parameters);\n\n case AnnotationType.STAMP:\n return new StampAnnotationElement(parameters);\n\n case AnnotationType.FILEATTACHMENT:\n return new FileAttachmentAnnotationElement(parameters);\n\n default:\n return new AnnotationElement(parameters);\n }\n }\n}\n\nclass AnnotationElement {\n constructor(parameters, isRenderable = false, ignoreBorder = false) {\n this.isRenderable = isRenderable;\n this.data = parameters.data;\n this.layer = parameters.layer;\n this.page = parameters.page;\n this.viewport = parameters.viewport;\n this.linkService = parameters.linkService;\n this.downloadManager = parameters.downloadManager;\n this.imageResourcesPath = parameters.imageResourcesPath;\n this.renderInteractiveForms = parameters.renderInteractiveForms;\n this.svgFactory = parameters.svgFactory;\n\n if (isRenderable) {\n this.container = this._createContainer(ignoreBorder);\n }\n }\n\n /**\n * Create an empty container for the annotation's HTML element.\n *\n * @private\n * @param {boolean} ignoreBorder\n * @memberof AnnotationElement\n * @returns {HTMLSectionElement}\n */\n _createContainer(ignoreBorder = false) {\n let data = this.data, page = this.page, viewport = this.viewport;\n let container = document.createElement('section');\n let width = data.rect[2] - data.rect[0];\n let height = data.rect[3] - data.rect[1];\n\n container.setAttribute('data-annotation-id', data.id);\n\n // Do *not* modify `data.rect`, since that will corrupt the annotation\n // position on subsequent calls to `_createContainer` (see issue 6804).\n let rect = Util.normalizeRect([\n data.rect[0],\n page.view[3] - data.rect[1] + page.view[1],\n data.rect[2],\n page.view[3] - data.rect[3] + page.view[1]\n ]);\n\n CustomStyle.setProp('transform', container,\n 'matrix(' + viewport.transform.join(',') + ')');\n CustomStyle.setProp('transformOrigin', container,\n -rect[0] + 'px ' + -rect[1] + 'px');\n\n if (!ignoreBorder && data.borderStyle.width > 0) {\n container.style.borderWidth = data.borderStyle.width + 'px';\n if (data.borderStyle.style !== AnnotationBorderStyleType.UNDERLINE) {\n // Underline styles only have a bottom border, so we do not need\n // to adjust for all borders. This yields a similar result as\n // Adobe Acrobat/Reader.\n width = width - 2 * data.borderStyle.width;\n height = height - 2 * data.borderStyle.width;\n }\n\n let horizontalRadius = data.borderStyle.horizontalCornerRadius;\n let verticalRadius = data.borderStyle.verticalCornerRadius;\n if (horizontalRadius > 0 || verticalRadius > 0) {\n let radius = horizontalRadius + 'px / ' + verticalRadius + 'px';\n CustomStyle.setProp('borderRadius', container, radius);\n }\n\n switch (data.borderStyle.style) {\n case AnnotationBorderStyleType.SOLID:\n container.style.borderStyle = 'solid';\n break;\n\n case AnnotationBorderStyleType.DASHED:\n container.style.borderStyle = 'dashed';\n break;\n\n case AnnotationBorderStyleType.BEVELED:\n warn('Unimplemented border style: beveled');\n break;\n\n case AnnotationBorderStyleType.INSET:\n warn('Unimplemented border style: inset');\n break;\n\n case AnnotationBorderStyleType.UNDERLINE:\n container.style.borderBottomStyle = 'solid';\n break;\n\n default:\n break;\n }\n\n if (data.color) {\n container.style.borderColor = Util.makeCssRgb(data.color[0] | 0,\n data.color[1] | 0,\n data.color[2] | 0);\n } else {\n // Transparent (invisible) border, so do not draw it at all.\n container.style.borderWidth = 0;\n }\n }\n\n container.style.left = rect[0] + 'px';\n container.style.top = rect[1] + 'px';\n\n container.style.width = width + 'px';\n container.style.height = height + 'px';\n\n return container;\n }\n\n /**\n * Create a popup for the annotation's HTML element. This is used for\n * annotations that do not have a Popup entry in the dictionary, but\n * are of a type that works with popups (such as Highlight annotations).\n *\n * @private\n * @param {HTMLSectionElement} container\n * @param {HTMLDivElement|HTMLImageElement|null} trigger\n * @param {Object} data\n * @memberof AnnotationElement\n */\n _createPopup(container, trigger, data) {\n // If no trigger element is specified, create it.\n if (!trigger) {\n trigger = document.createElement('div');\n trigger.style.height = container.style.height;\n trigger.style.width = container.style.width;\n container.appendChild(trigger);\n }\n\n let popupElement = new PopupElement({\n container,\n trigger,\n color: data.color,\n title: data.title,\n contents: data.contents,\n hideWrapper: true,\n });\n let popup = popupElement.render();\n\n // Position the popup next to the annotation's container.\n popup.style.left = container.style.width;\n\n container.appendChild(popup);\n }\n\n /**\n * Render the annotation's HTML element in the empty container.\n *\n * @public\n * @memberof AnnotationElement\n */\n render() {\n throw new Error('Abstract method `AnnotationElement.render` called');\n }\n}\n\nclass LinkAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.url || parameters.data.dest ||\n parameters.data.action);\n super(parameters, isRenderable);\n }\n\n /**\n * Render the link annotation's HTML element in the empty container.\n *\n * @public\n * @memberof LinkAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'linkAnnotation';\n\n let link = document.createElement('a');\n addLinkAttributes(link, {\n url: this.data.url,\n target: (this.data.newWindow ? LinkTarget.BLANK : undefined),\n });\n\n if (!this.data.url) {\n if (this.data.action) {\n this._bindNamedAction(link, this.data.action);\n } else {\n this._bindLink(link, this.data.dest);\n }\n }\n\n this.container.appendChild(link);\n return this.container;\n }\n\n /**\n * Bind internal links to the link element.\n *\n * @private\n * @param {Object} link\n * @param {Object} destination\n * @memberof LinkAnnotationElement\n */\n _bindLink(link, destination) {\n link.href = this.linkService.getDestinationHash(destination);\n link.onclick = () => {\n if (destination) {\n this.linkService.navigateTo(destination);\n }\n return false;\n };\n if (destination) {\n link.className = 'internalLink';\n }\n }\n\n /**\n * Bind named actions to the link element.\n *\n * @private\n * @param {Object} link\n * @param {Object} action\n * @memberof LinkAnnotationElement\n */\n _bindNamedAction(link, action) {\n link.href = this.linkService.getAnchorUrl('');\n link.onclick = () => {\n this.linkService.executeNamedAction(action);\n return false;\n };\n link.className = 'internalLink';\n }\n}\n\nclass TextAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.hasPopup ||\n parameters.data.title || parameters.data.contents);\n super(parameters, isRenderable);\n }\n\n /**\n * Render the text annotation's HTML element in the empty container.\n *\n * @public\n * @memberof TextAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'textAnnotation';\n\n let image = document.createElement('img');\n image.style.height = this.container.style.height;\n image.style.width = this.container.style.width;\n image.src = this.imageResourcesPath + 'annotation-' +\n this.data.name.toLowerCase() + '.svg';\n image.alt = '[{{type}} Annotation]';\n image.dataset.l10nId = 'text_annotation_type';\n image.dataset.l10nArgs = JSON.stringify({ type: this.data.name, });\n\n if (!this.data.hasPopup) {\n this._createPopup(this.container, image, this.data);\n }\n\n this.container.appendChild(image);\n return this.container;\n }\n}\n\nclass WidgetAnnotationElement extends AnnotationElement {\n /**\n * Render the widget annotation's HTML element in the empty container.\n *\n * @public\n * @memberof WidgetAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n // Show only the container for unsupported field types.\n return this.container;\n }\n}\n\nclass TextWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n let isRenderable = parameters.renderInteractiveForms ||\n (!parameters.data.hasAppearance && !!parameters.data.fieldValue);\n super(parameters, isRenderable);\n }\n\n /**\n * Render the text widget annotation's HTML element in the empty container.\n *\n * @public\n * @memberof TextWidgetAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n const TEXT_ALIGNMENT = ['left', 'center', 'right'];\n\n this.container.className = 'textWidgetAnnotation';\n\n let element = null;\n if (this.renderInteractiveForms) {\n // NOTE: We cannot set the values using `element.value` below, since it\n // prevents the AnnotationLayer rasterizer in `test/driver.js`\n // from parsing the elements correctly for the reference tests.\n if (this.data.multiLine) {\n element = document.createElement('textarea');\n element.textContent = this.data.fieldValue;\n } else {\n element = document.createElement('input');\n element.type = 'text';\n element.setAttribute('value', this.data.fieldValue);\n }\n\n element.disabled = this.data.readOnly;\n\n if (this.data.maxLen !== null) {\n element.maxLength = this.data.maxLen;\n }\n\n if (this.data.comb) {\n let fieldWidth = this.data.rect[2] - this.data.rect[0];\n let combWidth = fieldWidth / this.data.maxLen;\n\n element.classList.add('comb');\n element.style.letterSpacing = 'calc(' + combWidth + 'px - 1ch)';\n }\n } else {\n element = document.createElement('div');\n element.textContent = this.data.fieldValue;\n element.style.verticalAlign = 'middle';\n element.style.display = 'table-cell';\n\n let font = null;\n if (this.data.fontRefName) {\n font = this.page.commonObjs.getData(this.data.fontRefName);\n }\n this._setTextStyle(element, font);\n }\n\n if (this.data.textAlignment !== null) {\n element.style.textAlign = TEXT_ALIGNMENT[this.data.textAlignment];\n }\n\n this.container.appendChild(element);\n return this.container;\n }\n\n /**\n * Apply text styles to the text in the element.\n *\n * @private\n * @param {HTMLDivElement} element\n * @param {Object} font\n * @memberof TextWidgetAnnotationElement\n */\n _setTextStyle(element, font) {\n // TODO: This duplicates some of the logic in CanvasGraphics.setFont().\n let style = element.style;\n style.fontSize = this.data.fontSize + 'px';\n style.direction = (this.data.fontDirection < 0 ? 'rtl' : 'ltr');\n\n if (!font) {\n return;\n }\n\n style.fontWeight = (font.black ?\n (font.bold ? '900' : 'bold') :\n (font.bold ? 'bold' : 'normal'));\n style.fontStyle = (font.italic ? 'italic' : 'normal');\n\n // Use a reasonable default font if the font doesn't specify a fallback.\n let fontFamily = font.loadedName ? '\"' + font.loadedName + '\", ' : '';\n let fallbackName = font.fallbackName || 'Helvetica, sans-serif';\n style.fontFamily = fontFamily + fallbackName;\n }\n}\n\nclass CheckboxWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n super(parameters, parameters.renderInteractiveForms);\n }\n\n /**\n * Render the checkbox widget annotation's HTML element\n * in the empty container.\n *\n * @public\n * @memberof CheckboxWidgetAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'buttonWidgetAnnotation checkBox';\n\n let element = document.createElement('input');\n element.disabled = this.data.readOnly;\n element.type = 'checkbox';\n if (this.data.fieldValue && this.data.fieldValue !== 'Off') {\n element.setAttribute('checked', true);\n }\n\n this.container.appendChild(element);\n return this.container;\n }\n}\n\nclass RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n super(parameters, parameters.renderInteractiveForms);\n }\n\n /**\n * Render the radio button widget annotation's HTML element\n * in the empty container.\n *\n * @public\n * @memberof RadioButtonWidgetAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'buttonWidgetAnnotation radioButton';\n\n let element = document.createElement('input');\n element.disabled = this.data.readOnly;\n element.type = 'radio';\n element.name = this.data.fieldName;\n if (this.data.fieldValue === this.data.buttonValue) {\n element.setAttribute('checked', true);\n }\n\n this.container.appendChild(element);\n return this.container;\n }\n}\n\nclass ChoiceWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n super(parameters, parameters.renderInteractiveForms);\n }\n\n /**\n * Render the choice widget annotation's HTML element in the empty\n * container.\n *\n * @public\n * @memberof ChoiceWidgetAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'choiceWidgetAnnotation';\n\n let selectElement = document.createElement('select');\n selectElement.disabled = this.data.readOnly;\n\n if (!this.data.combo) {\n // List boxes have a size and (optionally) multiple selection.\n selectElement.size = this.data.options.length;\n\n if (this.data.multiSelect) {\n selectElement.multiple = true;\n }\n }\n\n // Insert the options into the choice field.\n for (let i = 0, ii = this.data.options.length; i < ii; i++) {\n let option = this.data.options[i];\n\n let optionElement = document.createElement('option');\n optionElement.textContent = option.displayValue;\n optionElement.value = option.exportValue;\n\n if (this.data.fieldValue.indexOf(option.displayValue) >= 0) {\n optionElement.setAttribute('selected', true);\n }\n\n selectElement.appendChild(optionElement);\n }\n\n this.container.appendChild(selectElement);\n return this.container;\n }\n}\n\nclass PopupAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.title || parameters.data.contents);\n super(parameters, isRenderable);\n }\n\n /**\n * Render the popup annotation's HTML element in the empty container.\n *\n * @public\n * @memberof PopupAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n // Do not render popup annotations for parent elements with these types as\n // they create the popups themselves (because of custom trigger divs).\n const IGNORE_TYPES = ['Line', 'Square', 'Circle', 'PolyLine', 'Polygon'];\n\n this.container.className = 'popupAnnotation';\n\n if (IGNORE_TYPES.indexOf(this.data.parentType) >= 0) {\n return this.container;\n }\n\n let selector = '[data-annotation-id=\"' + this.data.parentId + '\"]';\n let parentElement = this.layer.querySelector(selector);\n if (!parentElement) {\n return this.container;\n }\n\n let popup = new PopupElement({\n container: this.container,\n trigger: parentElement,\n color: this.data.color,\n title: this.data.title,\n contents: this.data.contents,\n });\n\n // Position the popup next to the parent annotation's container.\n // PDF viewers ignore a popup annotation's rectangle.\n let parentLeft = parseFloat(parentElement.style.left);\n let parentWidth = parseFloat(parentElement.style.width);\n CustomStyle.setProp('transformOrigin', this.container,\n -(parentLeft + parentWidth) + 'px -' +\n parentElement.style.top);\n this.container.style.left = (parentLeft + parentWidth) + 'px';\n\n this.container.appendChild(popup.render());\n return this.container;\n }\n}\n\nclass PopupElement {\n constructor(parameters) {\n this.container = parameters.container;\n this.trigger = parameters.trigger;\n this.color = parameters.color;\n this.title = parameters.title;\n this.contents = parameters.contents;\n this.hideWrapper = parameters.hideWrapper || false;\n\n this.pinned = false;\n }\n\n /**\n * Render the popup's HTML element.\n *\n * @public\n * @memberof PopupElement\n * @returns {HTMLSectionElement}\n */\n render() {\n const BACKGROUND_ENLIGHT = 0.7;\n\n let wrapper = document.createElement('div');\n wrapper.className = 'popupWrapper';\n\n // For Popup annotations we hide the entire section because it contains\n // only the popup. However, for Text annotations without a separate Popup\n // annotation, we cannot hide the entire container as the image would\n // disappear too. In that special case, hiding the wrapper suffices.\n this.hideElement = (this.hideWrapper ? wrapper : this.container);\n this.hideElement.setAttribute('hidden', true);\n\n let popup = document.createElement('div');\n popup.className = 'popup';\n\n let color = this.color;\n if (color) {\n // Enlighten the color.\n let r = BACKGROUND_ENLIGHT * (255 - color[0]) + color[0];\n let g = BACKGROUND_ENLIGHT * (255 - color[1]) + color[1];\n let b = BACKGROUND_ENLIGHT * (255 - color[2]) + color[2];\n popup.style.backgroundColor = Util.makeCssRgb(r | 0, g | 0, b | 0);\n }\n\n let contents = this._formatContents(this.contents);\n let title = document.createElement('h1');\n title.textContent = this.title;\n\n // Attach the event listeners to the trigger element.\n this.trigger.addEventListener('click', this._toggle.bind(this));\n this.trigger.addEventListener('mouseover', this._show.bind(this, false));\n this.trigger.addEventListener('mouseout', this._hide.bind(this, false));\n popup.addEventListener('click', this._hide.bind(this, true));\n\n popup.appendChild(title);\n popup.appendChild(contents);\n wrapper.appendChild(popup);\n return wrapper;\n }\n\n /**\n * Format the contents of the popup by adding newlines where necessary.\n *\n * @private\n * @param {string} contents\n * @memberof PopupElement\n * @returns {HTMLParagraphElement}\n */\n _formatContents(contents) {\n let p = document.createElement('p');\n let lines = contents.split(/(?:\\r\\n?|\\n)/);\n for (let i = 0, ii = lines.length; i < ii; ++i) {\n let line = lines[i];\n p.appendChild(document.createTextNode(line));\n if (i < (ii - 1)) {\n p.appendChild(document.createElement('br'));\n }\n }\n return p;\n }\n\n /**\n * Toggle the visibility of the popup.\n *\n * @private\n * @memberof PopupElement\n */\n _toggle() {\n if (this.pinned) {\n this._hide(true);\n } else {\n this._show(true);\n }\n }\n\n /**\n * Show the popup.\n *\n * @private\n * @param {boolean} pin\n * @memberof PopupElement\n */\n _show(pin = false) {\n if (pin) {\n this.pinned = true;\n }\n if (this.hideElement.hasAttribute('hidden')) {\n this.hideElement.removeAttribute('hidden');\n this.container.style.zIndex += 1;\n }\n }\n\n /**\n * Hide the popup.\n *\n * @private\n * @param {boolean} unpin\n * @memberof PopupElement\n */\n _hide(unpin = true) {\n if (unpin) {\n this.pinned = false;\n }\n if (!this.hideElement.hasAttribute('hidden') && !this.pinned) {\n this.hideElement.setAttribute('hidden', true);\n this.container.style.zIndex -= 1;\n }\n }\n}\n\nclass LineAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.hasPopup ||\n parameters.data.title || parameters.data.contents);\n super(parameters, isRenderable, /* ignoreBorder = */ true);\n }\n\n /**\n * Render the line annotation's HTML element in the empty container.\n *\n * @public\n * @memberof LineAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'lineAnnotation';\n\n // Create an invisible line with the same starting and ending coordinates\n // that acts as the trigger for the popup. Only the line itself should\n // trigger the popup, not the entire container.\n let data = this.data;\n let width = data.rect[2] - data.rect[0];\n let height = data.rect[3] - data.rect[1];\n let svg = this.svgFactory.create(width, height);\n\n // PDF coordinates are calculated from a bottom left origin, so transform\n // the line coordinates to a top left origin for the SVG element.\n let line = this.svgFactory.createElement('svg:line');\n line.setAttribute('x1', data.rect[2] - data.lineCoordinates[0]);\n line.setAttribute('y1', data.rect[3] - data.lineCoordinates[1]);\n line.setAttribute('x2', data.rect[2] - data.lineCoordinates[2]);\n line.setAttribute('y2', data.rect[3] - data.lineCoordinates[3]);\n line.setAttribute('stroke-width', data.borderStyle.width);\n line.setAttribute('stroke', 'transparent');\n\n svg.appendChild(line);\n this.container.append(svg);\n\n // Create the popup ourselves so that we can bind it to the line instead\n // of to the entire container (which is the default).\n this._createPopup(this.container, line, data);\n\n return this.container;\n }\n}\n\nclass SquareAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.hasPopup ||\n parameters.data.title || parameters.data.contents);\n super(parameters, isRenderable, /* ignoreBorder = */ true);\n }\n\n /**\n * Render the square annotation's HTML element in the empty container.\n *\n * @public\n * @memberof SquareAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'squareAnnotation';\n\n // Create an invisible square with the same rectangle that acts as the\n // trigger for the popup. Only the square itself should trigger the\n // popup, not the entire container.\n let data = this.data;\n let width = data.rect[2] - data.rect[0];\n let height = data.rect[3] - data.rect[1];\n let svg = this.svgFactory.create(width, height);\n\n // The browser draws half of the borders inside the square and half of\n // the borders outside the square by default. This behavior cannot be\n // changed programmatically, so correct for that here.\n let borderWidth = data.borderStyle.width;\n let square = this.svgFactory.createElement('svg:rect');\n square.setAttribute('x', borderWidth / 2);\n square.setAttribute('y', borderWidth / 2);\n square.setAttribute('width', width - borderWidth);\n square.setAttribute('height', height - borderWidth);\n square.setAttribute('stroke-width', borderWidth);\n square.setAttribute('stroke', 'transparent');\n square.setAttribute('fill', 'none');\n\n svg.appendChild(square);\n this.container.append(svg);\n\n // Create the popup ourselves so that we can bind it to the square instead\n // of to the entire container (which is the default).\n this._createPopup(this.container, square, data);\n\n return this.container;\n }\n}\n\nclass CircleAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.hasPopup ||\n parameters.data.title || parameters.data.contents);\n super(parameters, isRenderable, /* ignoreBorder = */ true);\n }\n\n /**\n * Render the circle annotation's HTML element in the empty container.\n *\n * @public\n * @memberof CircleAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'circleAnnotation';\n\n // Create an invisible circle with the same ellipse that acts as the\n // trigger for the popup. Only the circle itself should trigger the\n // popup, not the entire container.\n let data = this.data;\n let width = data.rect[2] - data.rect[0];\n let height = data.rect[3] - data.rect[1];\n let svg = this.svgFactory.create(width, height);\n\n // The browser draws half of the borders inside the circle and half of\n // the borders outside the circle by default. This behavior cannot be\n // changed programmatically, so correct for that here.\n let borderWidth = data.borderStyle.width;\n let circle = this.svgFactory.createElement('svg:ellipse');\n circle.setAttribute('cx', width / 2);\n circle.setAttribute('cy', height / 2);\n circle.setAttribute('rx', (width / 2) - (borderWidth / 2));\n circle.setAttribute('ry', (height / 2) - (borderWidth / 2));\n circle.setAttribute('stroke-width', borderWidth);\n circle.setAttribute('stroke', 'transparent');\n circle.setAttribute('fill', 'none');\n\n svg.appendChild(circle);\n this.container.append(svg);\n\n // Create the popup ourselves so that we can bind it to the circle instead\n // of to the entire container (which is the default).\n this._createPopup(this.container, circle, data);\n\n return this.container;\n }\n}\n\nclass PolylineAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.hasPopup ||\n parameters.data.title || parameters.data.contents);\n super(parameters, isRenderable, /* ignoreBorder = */ true);\n\n this.containerClassName = 'polylineAnnotation';\n this.svgElementName = 'svg:polyline';\n }\n\n /**\n * Render the polyline annotation's HTML element in the empty container.\n *\n * @public\n * @memberof PolylineAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = this.containerClassName;\n\n // Create an invisible polyline with the same points that acts as the\n // trigger for the popup. Only the polyline itself should trigger the\n // popup, not the entire container.\n let data = this.data;\n let width = data.rect[2] - data.rect[0];\n let height = data.rect[3] - data.rect[1];\n let svg = this.svgFactory.create(width, height);\n\n // Convert the vertices array to a single points string that the SVG\n // polyline element expects (\"x1,y1 x2,y2 ...\"). PDF coordinates are\n // calculated from a bottom left origin, so transform the polyline\n // coordinates to a top left origin for the SVG element.\n let vertices = data.vertices;\n let points = [];\n for (let i = 0, ii = vertices.length; i < ii; i++) {\n let x = vertices[i].x - data.rect[0];\n let y = data.rect[3] - vertices[i].y;\n points.push(x + ',' + y);\n }\n points = points.join(' ');\n\n let borderWidth = data.borderStyle.width;\n let polyline = this.svgFactory.createElement(this.svgElementName);\n polyline.setAttribute('points', points);\n polyline.setAttribute('stroke-width', borderWidth);\n polyline.setAttribute('stroke', 'transparent');\n polyline.setAttribute('fill', 'none');\n\n svg.appendChild(polyline);\n this.container.append(svg);\n\n // Create the popup ourselves so that we can bind it to the polyline\n // instead of to the entire container (which is the default).\n this._createPopup(this.container, polyline, data);\n\n return this.container;\n }\n}\n\nclass PolygonAnnotationElement extends PolylineAnnotationElement {\n constructor(parameters) {\n // Polygons are specific forms of polylines, so reuse their logic.\n super(parameters);\n\n this.containerClassName = 'polygonAnnotation';\n this.svgElementName = 'svg:polygon';\n }\n}\n\nclass HighlightAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.hasPopup ||\n parameters.data.title || parameters.data.contents);\n super(parameters, isRenderable, /* ignoreBorder = */ true);\n }\n\n /**\n * Render the highlight annotation's HTML element in the empty container.\n *\n * @public\n * @memberof HighlightAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'highlightAnnotation';\n\n if (!this.data.hasPopup) {\n this._createPopup(this.container, null, this.data);\n }\n return this.container;\n }\n}\n\nclass UnderlineAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.hasPopup ||\n parameters.data.title || parameters.data.contents);\n super(parameters, isRenderable, /* ignoreBorder = */ true);\n }\n\n /**\n * Render the underline annotation's HTML element in the empty container.\n *\n * @public\n * @memberof UnderlineAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'underlineAnnotation';\n\n if (!this.data.hasPopup) {\n this._createPopup(this.container, null, this.data);\n }\n return this.container;\n }\n}\n\nclass SquigglyAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.hasPopup ||\n parameters.data.title || parameters.data.contents);\n super(parameters, isRenderable, /* ignoreBorder = */ true);\n }\n\n /**\n * Render the squiggly annotation's HTML element in the empty container.\n *\n * @public\n * @memberof SquigglyAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'squigglyAnnotation';\n\n if (!this.data.hasPopup) {\n this._createPopup(this.container, null, this.data);\n }\n return this.container;\n }\n}\n\nclass StrikeOutAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.hasPopup ||\n parameters.data.title || parameters.data.contents);\n super(parameters, isRenderable, /* ignoreBorder = */ true);\n }\n\n /**\n * Render the strikeout annotation's HTML element in the empty container.\n *\n * @public\n * @memberof StrikeOutAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'strikeoutAnnotation';\n\n if (!this.data.hasPopup) {\n this._createPopup(this.container, null, this.data);\n }\n return this.container;\n }\n}\n\nclass StampAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n let isRenderable = !!(parameters.data.hasPopup ||\n parameters.data.title || parameters.data.contents);\n super(parameters, isRenderable, /* ignoreBorder = */ true);\n }\n\n /**\n * Render the stamp annotation's HTML element in the empty container.\n *\n * @public\n * @memberof StampAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'stampAnnotation';\n\n if (!this.data.hasPopup) {\n this._createPopup(this.container, null, this.data);\n }\n return this.container;\n }\n}\n\nclass FileAttachmentAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, /* isRenderable = */ true);\n\n let file = this.data.file;\n this.filename = getFilenameFromUrl(file.filename);\n this.content = file.content;\n\n this.linkService.onFileAttachmentAnnotation({\n id: stringToPDFString(file.filename),\n filename: file.filename,\n content: file.content,\n });\n }\n\n /**\n * Render the file attachment annotation's HTML element in the empty\n * container.\n *\n * @public\n * @memberof FileAttachmentAnnotationElement\n * @returns {HTMLSectionElement}\n */\n render() {\n this.container.className = 'fileAttachmentAnnotation';\n\n let trigger = document.createElement('div');\n trigger.style.height = this.container.style.height;\n trigger.style.width = this.container.style.width;\n trigger.addEventListener('dblclick', this._download.bind(this));\n\n if (!this.data.hasPopup && (this.data.title || this.data.contents)) {\n this._createPopup(this.container, trigger, this.data);\n }\n\n this.container.appendChild(trigger);\n return this.container;\n }\n\n /**\n * Download the file attachment associated with this annotation.\n *\n * @private\n * @memberof FileAttachmentAnnotationElement\n */\n _download() {\n if (!this.downloadManager) {\n warn('Download cannot be started due to unavailable download manager');\n return;\n }\n this.downloadManager.downloadData(this.content, this.filename, '');\n }\n}\n\n/**\n * @typedef {Object} AnnotationLayerParameters\n * @property {PageViewport} viewport\n * @property {HTMLDivElement} div\n * @property {Array} annotations\n * @property {PDFPage} page\n * @property {IPDFLinkService} linkService\n * @property {string} imageResourcesPath\n * @property {boolean} renderInteractiveForms\n */\n\nclass AnnotationLayer {\n /**\n * Render a new annotation layer with all annotation elements.\n *\n * @public\n * @param {AnnotationLayerParameters} parameters\n * @memberof AnnotationLayer\n */\n static render(parameters) {\n for (let i = 0, ii = parameters.annotations.length; i < ii; i++) {\n let data = parameters.annotations[i];\n if (!data) {\n continue;\n }\n let element = AnnotationElementFactory.create({\n data,\n layer: parameters.div,\n page: parameters.page,\n viewport: parameters.viewport,\n linkService: parameters.linkService,\n downloadManager: parameters.downloadManager,\n imageResourcesPath: parameters.imageResourcesPath ||\n getDefaultSetting('imageResourcesPath'),\n renderInteractiveForms: parameters.renderInteractiveForms || false,\n svgFactory: new DOMSVGFactory(),\n });\n if (element.isRenderable) {\n parameters.div.appendChild(element.render());\n }\n }\n }\n\n /**\n * Update the annotation elements on existing annotation layer.\n *\n * @public\n * @param {AnnotationLayerParameters} parameters\n * @memberof AnnotationLayer\n */\n static update(parameters) {\n for (let i = 0, ii = parameters.annotations.length; i < ii; i++) {\n let data = parameters.annotations[i];\n let element = parameters.div.querySelector(\n '[data-annotation-id=\"' + data.id + '\"]');\n if (element) {\n CustomStyle.setProp('transform', element,\n 'matrix(' + parameters.viewport.transform.join(',') + ')');\n }\n }\n parameters.div.removeAttribute('hidden');\n }\n}\n\nexport {\n AnnotationLayer,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/annotation_layer.js","/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AbortException, createPromiseCapability, Util } from '../shared/util';\nimport { CustomStyle, getDefaultSetting } from './dom_utils';\n\n/**\n * Text layer render parameters.\n *\n * @typedef {Object} TextLayerRenderParameters\n * @property {TextContent} textContent - (optional) Text content to render\n * (the object is returned by the page's getTextContent() method).\n * @property {ReadableStream} textContentStream - (optional) Text content\n * stream to render (the stream is returned by the page's\n * streamTextContent() method).\n * @property {HTMLElement} container - HTML element that will contain text runs.\n * @property {PageViewport} viewport - The target viewport to properly\n * layout the text runs.\n * @property {Array} textDivs - (optional) HTML elements that are correspond\n * the text items of the textContent input. This is output and shall be\n * initially be set to empty array.\n * @property {Array} textContentItemsStr - (optional) Strings that correspond\n * the `str` property of the text items of textContent input. This is output\n * and shall be initially be set to empty array.\n * @property {number} timeout - (optional) Delay in milliseconds before\n * rendering of the text runs occurs.\n * @property {boolean} enhanceTextSelection - (optional) Whether to turn on the\n * text selection enhancement.\n */\nvar renderTextLayer = (function renderTextLayerClosure() {\n var MAX_TEXT_DIVS_TO_RENDER = 100000;\n\n var NonWhitespaceRegexp = /\\S/;\n\n function isAllWhitespace(str) {\n return !NonWhitespaceRegexp.test(str);\n }\n\n // Text layers may contain many thousand div's, and using `styleBuf` avoids\n // creating many intermediate strings when building their 'style' properties.\n var styleBuf = ['left: ', 0, 'px; top: ', 0, 'px; font-size: ', 0,\n 'px; font-family: ', '', ';'];\n\n function appendText(task, geom, styles) {\n // Initialize all used properties to keep the caches monomorphic.\n var textDiv = document.createElement('div');\n var textDivProperties = {\n style: null,\n angle: 0,\n canvasWidth: 0,\n isWhitespace: false,\n originalTransform: null,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0,\n paddingTop: 0,\n scale: 1,\n };\n\n task._textDivs.push(textDiv);\n if (isAllWhitespace(geom.str)) {\n textDivProperties.isWhitespace = true;\n task._textDivProperties.set(textDiv, textDivProperties);\n return;\n }\n\n var tx = Util.transform(task._viewport.transform, geom.transform);\n var angle = Math.atan2(tx[1], tx[0]);\n var style = styles[geom.fontName];\n if (style.vertical) {\n angle += Math.PI / 2;\n }\n var fontHeight = Math.sqrt((tx[2] * tx[2]) + (tx[3] * tx[3]));\n var fontAscent = fontHeight;\n if (style.ascent) {\n fontAscent = style.ascent * fontAscent;\n } else if (style.descent) {\n fontAscent = (1 + style.descent) * fontAscent;\n }\n\n var left;\n var top;\n if (angle === 0) {\n left = tx[4];\n top = tx[5] - fontAscent;\n } else {\n left = tx[4] + (fontAscent * Math.sin(angle));\n top = tx[5] - (fontAscent * Math.cos(angle));\n }\n styleBuf[1] = left;\n styleBuf[3] = top;\n styleBuf[5] = fontHeight;\n styleBuf[7] = style.fontFamily;\n textDivProperties.style = styleBuf.join('');\n textDiv.setAttribute('style', textDivProperties.style);\n\n textDiv.textContent = geom.str;\n // |fontName| is only used by the Font Inspector. This test will succeed\n // when e.g. the Font Inspector is off but the Stepper is on, but it's\n // not worth the effort to do a more accurate test. We only use `dataset`\n // here to make the font name available for the debugger.\n if (getDefaultSetting('pdfBug')) {\n textDiv.dataset.fontName = geom.fontName;\n }\n if (angle !== 0) {\n textDivProperties.angle = angle * (180 / Math.PI);\n }\n // We don't bother scaling single-char text divs, because it has very\n // little effect on text highlighting. This makes scrolling on docs with\n // lots of such divs a lot faster.\n if (geom.str.length > 1) {\n if (style.vertical) {\n textDivProperties.canvasWidth = geom.height * task._viewport.scale;\n } else {\n textDivProperties.canvasWidth = geom.width * task._viewport.scale;\n }\n }\n task._textDivProperties.set(textDiv, textDivProperties);\n if (task._textContentStream) {\n task._layoutText(textDiv);\n }\n\n if (task._enhanceTextSelection) {\n var angleCos = 1, angleSin = 0;\n if (angle !== 0) {\n angleCos = Math.cos(angle);\n angleSin = Math.sin(angle);\n }\n var divWidth = (style.vertical ? geom.height : geom.width) *\n task._viewport.scale;\n var divHeight = fontHeight;\n\n var m, b;\n if (angle !== 0) {\n m = [angleCos, angleSin, -angleSin, angleCos, left, top];\n b = Util.getAxialAlignedBoundingBox([0, 0, divWidth, divHeight], m);\n } else {\n b = [left, top, left + divWidth, top + divHeight];\n }\n\n task._bounds.push({\n left: b[0],\n top: b[1],\n right: b[2],\n bottom: b[3],\n div: textDiv,\n size: [divWidth, divHeight],\n m,\n });\n }\n }\n\n function render(task) {\n if (task._canceled) {\n return;\n }\n var textDivs = task._textDivs;\n var capability = task._capability;\n var textDivsLength = textDivs.length;\n\n // No point in rendering many divs as it would make the browser\n // unusable even after the divs are rendered.\n if (textDivsLength > MAX_TEXT_DIVS_TO_RENDER) {\n task._renderingDone = true;\n capability.resolve();\n return;\n }\n\n if (!task._textContentStream) {\n for (var i = 0; i < textDivsLength; i++) {\n task._layoutText(textDivs[i]);\n }\n }\n\n task._renderingDone = true;\n capability.resolve();\n }\n\n function expand(task) {\n var bounds = task._bounds;\n var viewport = task._viewport;\n\n var expanded = expandBounds(viewport.width, viewport.height, bounds);\n for (var i = 0; i < expanded.length; i++) {\n var div = bounds[i].div;\n var divProperties = task._textDivProperties.get(div);\n if (divProperties.angle === 0) {\n divProperties.paddingLeft = bounds[i].left - expanded[i].left;\n divProperties.paddingTop = bounds[i].top - expanded[i].top;\n divProperties.paddingRight = expanded[i].right - bounds[i].right;\n divProperties.paddingBottom = expanded[i].bottom - bounds[i].bottom;\n task._textDivProperties.set(div, divProperties);\n continue;\n }\n // Box is rotated -- trying to find padding so rotated div will not\n // exceed its expanded bounds.\n var e = expanded[i], b = bounds[i];\n var m = b.m, c = m[0], s = m[1];\n // Finding intersections with expanded box.\n var points = [[0, 0], [0, b.size[1]], [b.size[0], 0], b.size];\n var ts = new Float64Array(64);\n points.forEach(function (p, i) {\n var t = Util.applyTransform(p, m);\n ts[i + 0] = c && (e.left - t[0]) / c;\n ts[i + 4] = s && (e.top - t[1]) / s;\n ts[i + 8] = c && (e.right - t[0]) / c;\n ts[i + 12] = s && (e.bottom - t[1]) / s;\n\n ts[i + 16] = s && (e.left - t[0]) / -s;\n ts[i + 20] = c && (e.top - t[1]) / c;\n ts[i + 24] = s && (e.right - t[0]) / -s;\n ts[i + 28] = c && (e.bottom - t[1]) / c;\n\n ts[i + 32] = c && (e.left - t[0]) / -c;\n ts[i + 36] = s && (e.top - t[1]) / -s;\n ts[i + 40] = c && (e.right - t[0]) / -c;\n ts[i + 44] = s && (e.bottom - t[1]) / -s;\n\n ts[i + 48] = s && (e.left - t[0]) / s;\n ts[i + 52] = c && (e.top - t[1]) / -c;\n ts[i + 56] = s && (e.right - t[0]) / s;\n ts[i + 60] = c && (e.bottom - t[1]) / -c;\n });\n var findPositiveMin = function (ts, offset, count) {\n var result = 0;\n for (var i = 0; i < count; i++) {\n var t = ts[offset++];\n if (t > 0) {\n result = result ? Math.min(t, result) : t;\n }\n }\n return result;\n };\n // Not based on math, but to simplify calculations, using cos and sin\n // absolute values to not exceed the box (it can but insignificantly).\n var boxScale = 1 + Math.min(Math.abs(c), Math.abs(s));\n divProperties.paddingLeft = findPositiveMin(ts, 32, 16) / boxScale;\n divProperties.paddingTop = findPositiveMin(ts, 48, 16) / boxScale;\n divProperties.paddingRight = findPositiveMin(ts, 0, 16) / boxScale;\n divProperties.paddingBottom = findPositiveMin(ts, 16, 16) / boxScale;\n task._textDivProperties.set(div, divProperties);\n }\n }\n\n function expandBounds(width, height, boxes) {\n var bounds = boxes.map(function (box, i) {\n return {\n x1: box.left,\n y1: box.top,\n x2: box.right,\n y2: box.bottom,\n index: i,\n x1New: undefined,\n x2New: undefined,\n };\n });\n expandBoundsLTR(width, bounds);\n var expanded = new Array(boxes.length);\n bounds.forEach(function (b) {\n var i = b.index;\n expanded[i] = {\n left: b.x1New,\n top: 0,\n right: b.x2New,\n bottom: 0,\n };\n });\n\n // Rotating on 90 degrees and extending extended boxes. Reusing the bounds\n // array and objects.\n boxes.map(function (box, i) {\n var e = expanded[i], b = bounds[i];\n b.x1 = box.top;\n b.y1 = width - e.right;\n b.x2 = box.bottom;\n b.y2 = width - e.left;\n b.index = i;\n b.x1New = undefined;\n b.x2New = undefined;\n });\n expandBoundsLTR(height, bounds);\n\n bounds.forEach(function (b) {\n var i = b.index;\n expanded[i].top = b.x1New;\n expanded[i].bottom = b.x2New;\n });\n return expanded;\n }\n\n function expandBoundsLTR(width, bounds) {\n // Sorting by x1 coordinate and walk by the bounds in the same order.\n bounds.sort(function (a, b) {\n return a.x1 - b.x1 || a.index - b.index;\n });\n\n // First we see on the horizon is a fake boundary.\n var fakeBoundary = {\n x1: -Infinity,\n y1: -Infinity,\n x2: 0,\n y2: Infinity,\n index: -1,\n x1New: 0,\n x2New: 0,\n };\n var horizon = [{\n start: -Infinity,\n end: Infinity,\n boundary: fakeBoundary,\n }];\n\n bounds.forEach(function (boundary) {\n // Searching for the affected part of horizon.\n // TODO red-black tree or simple binary search\n var i = 0;\n while (i < horizon.length && horizon[i].end <= boundary.y1) {\n i++;\n }\n var j = horizon.length - 1;\n while (j >= 0 && horizon[j].start >= boundary.y2) {\n j--;\n }\n\n var horizonPart, affectedBoundary;\n var q, k, maxXNew = -Infinity;\n for (q = i; q <= j; q++) {\n horizonPart = horizon[q];\n affectedBoundary = horizonPart.boundary;\n var xNew;\n if (affectedBoundary.x2 > boundary.x1) {\n // In the middle of the previous element, new x shall be at the\n // boundary start. Extending if further if the affected bondary\n // placed on top of the current one.\n xNew = affectedBoundary.index > boundary.index ?\n affectedBoundary.x1New : boundary.x1;\n } else if (affectedBoundary.x2New === undefined) {\n // We have some space in between, new x in middle will be a fair\n // choice.\n xNew = (affectedBoundary.x2 + boundary.x1) / 2;\n } else {\n // Affected boundary has x2new set, using it as new x.\n xNew = affectedBoundary.x2New;\n }\n if (xNew > maxXNew) {\n maxXNew = xNew;\n }\n }\n\n // Set new x1 for current boundary.\n boundary.x1New = maxXNew;\n\n // Adjusts new x2 for the affected boundaries.\n for (q = i; q <= j; q++) {\n horizonPart = horizon[q];\n affectedBoundary = horizonPart.boundary;\n if (affectedBoundary.x2New === undefined) {\n // Was not set yet, choosing new x if possible.\n if (affectedBoundary.x2 > boundary.x1) {\n // Current and affected boundaries intersect. If affected boundary\n // is placed on top of the current, shrinking the affected.\n if (affectedBoundary.index > boundary.index) {\n affectedBoundary.x2New = affectedBoundary.x2;\n }\n } else {\n affectedBoundary.x2New = maxXNew;\n }\n } else if (affectedBoundary.x2New > maxXNew) {\n // Affected boundary is touching new x, pushing it back.\n affectedBoundary.x2New = Math.max(maxXNew, affectedBoundary.x2);\n }\n }\n\n // Fixing the horizon.\n var changedHorizon = [], lastBoundary = null;\n for (q = i; q <= j; q++) {\n horizonPart = horizon[q];\n affectedBoundary = horizonPart.boundary;\n // Checking which boundary will be visible.\n var useBoundary = affectedBoundary.x2 > boundary.x2 ?\n affectedBoundary : boundary;\n if (lastBoundary === useBoundary) {\n // Merging with previous.\n changedHorizon[changedHorizon.length - 1].end = horizonPart.end;\n } else {\n changedHorizon.push({\n start: horizonPart.start,\n end: horizonPart.end,\n boundary: useBoundary,\n });\n lastBoundary = useBoundary;\n }\n }\n if (horizon[i].start < boundary.y1) {\n changedHorizon[0].start = boundary.y1;\n changedHorizon.unshift({\n start: horizon[i].start,\n end: boundary.y1,\n boundary: horizon[i].boundary,\n });\n }\n if (boundary.y2 < horizon[j].end) {\n changedHorizon[changedHorizon.length - 1].end = boundary.y2;\n changedHorizon.push({\n start: boundary.y2,\n end: horizon[j].end,\n boundary: horizon[j].boundary,\n });\n }\n\n // Set x2 new of boundary that is no longer visible (see overlapping case\n // above).\n // TODO more efficient, e.g. via reference counting.\n for (q = i; q <= j; q++) {\n horizonPart = horizon[q];\n affectedBoundary = horizonPart.boundary;\n if (affectedBoundary.x2New !== undefined) {\n continue;\n }\n var used = false;\n for (k = i - 1; !used && k >= 0 &&\n horizon[k].start >= affectedBoundary.y1; k--) {\n used = horizon[k].boundary === affectedBoundary;\n }\n for (k = j + 1; !used && k < horizon.length &&\n horizon[k].end <= affectedBoundary.y2; k++) {\n used = horizon[k].boundary === affectedBoundary;\n }\n for (k = 0; !used && k < changedHorizon.length; k++) {\n used = changedHorizon[k].boundary === affectedBoundary;\n }\n if (!used) {\n affectedBoundary.x2New = maxXNew;\n }\n }\n\n Array.prototype.splice.apply(horizon,\n [i, j - i + 1].concat(changedHorizon));\n });\n\n // Set new x2 for all unset boundaries.\n horizon.forEach(function (horizonPart) {\n var affectedBoundary = horizonPart.boundary;\n if (affectedBoundary.x2New === undefined) {\n affectedBoundary.x2New = Math.max(width, affectedBoundary.x2);\n }\n });\n }\n\n /**\n * Text layer rendering task.\n *\n * @param {TextContent} textContent\n * @param {HTMLElement} container\n * @param {PageViewport} viewport\n * @param {Array} textDivs\n * @param {boolean} enhanceTextSelection\n * @private\n */\n function TextLayerRenderTask({ textContent, textContentStream, container,\n viewport, textDivs, textContentItemsStr,\n enhanceTextSelection, }) {\n this._textContent = textContent;\n this._textContentStream = textContentStream;\n this._container = container;\n this._viewport = viewport;\n this._textDivs = textDivs || [];\n this._textContentItemsStr = textContentItemsStr || [];\n this._enhanceTextSelection = !!enhanceTextSelection;\n\n this._reader = null;\n this._layoutTextLastFontSize = null;\n this._layoutTextLastFontFamily = null;\n this._layoutTextCtx = null;\n this._textDivProperties = new WeakMap();\n this._renderingDone = false;\n this._canceled = false;\n this._capability = createPromiseCapability();\n this._renderTimer = null;\n this._bounds = [];\n }\n TextLayerRenderTask.prototype = {\n get promise() {\n return this._capability.promise;\n },\n\n cancel: function TextLayer_cancel() {\n if (this._reader) {\n this._reader.cancel(new AbortException('text layer task cancelled'));\n this._reader = null;\n }\n this._canceled = true;\n if (this._renderTimer !== null) {\n clearTimeout(this._renderTimer);\n this._renderTimer = null;\n }\n this._capability.reject('canceled');\n },\n\n _processItems(items, styleCache) {\n for (let i = 0, len = items.length; i < len; i++) {\n this._textContentItemsStr.push(items[i].str);\n appendText(this, items[i], styleCache);\n }\n },\n\n _layoutText(textDiv) {\n let textLayerFrag = this._container;\n\n let textDivProperties = this._textDivProperties.get(textDiv);\n if (textDivProperties.isWhitespace) {\n return;\n }\n\n let fontSize = textDiv.style.fontSize;\n let fontFamily = textDiv.style.fontFamily;\n\n // Only build font string and set to context if different from last.\n if (fontSize !== this._layoutTextLastFontSize ||\n fontFamily !== this._layoutTextLastFontFamily) {\n this._layoutTextCtx.font = fontSize + ' ' + fontFamily;\n this._lastFontSize = fontSize;\n this._lastFontFamily = fontFamily;\n }\n\n let width = this._layoutTextCtx.measureText(textDiv.textContent).width;\n\n let transform = '';\n if (textDivProperties.canvasWidth !== 0 && width > 0) {\n textDivProperties.scale = textDivProperties.canvasWidth / width;\n transform = 'scaleX(' + textDivProperties.scale + ')';\n }\n if (textDivProperties.angle !== 0) {\n transform = 'rotate(' + textDivProperties.angle + 'deg) ' + transform;\n }\n if (transform !== '') {\n textDivProperties.originalTransform = transform;\n CustomStyle.setProp('transform', textDiv, transform);\n }\n this._textDivProperties.set(textDiv, textDivProperties);\n textLayerFrag.appendChild(textDiv);\n },\n\n _render: function TextLayer_render(timeout) {\n let capability = createPromiseCapability();\n let styleCache = Object.create(null);\n\n // The temporary canvas is used to measure text length in the DOM.\n let canvas = document.createElement('canvas');\n if (typeof PDFJSDev === 'undefined' ||\n PDFJSDev.test('FIREFOX || MOZCENTRAL || GENERIC')) {\n canvas.mozOpaque = true;\n }\n this._layoutTextCtx = canvas.getContext('2d', { alpha: false, });\n\n if (this._textContent) {\n let textItems = this._textContent.items;\n let textStyles = this._textContent.styles;\n this._processItems(textItems, textStyles);\n capability.resolve();\n } else if (this._textContentStream) {\n let pump = () => {\n this._reader.read().then(({ value, done, }) => {\n if (done) {\n capability.resolve();\n return;\n }\n\n Util.extendObj(styleCache, value.styles);\n this._processItems(value.items, styleCache);\n pump();\n\n }, capability.reject);\n };\n\n this._reader = this._textContentStream.getReader();\n pump();\n } else {\n throw new Error('Neither \"textContent\" nor \"textContentStream\"' +\n ' parameters specified.');\n }\n\n capability.promise.then(() => {\n styleCache = null;\n if (!timeout) { // Render right away\n render(this);\n } else { // Schedule\n this._renderTimer = setTimeout(() => {\n render(this);\n this._renderTimer = null;\n }, timeout);\n }\n }, this._capability.reject);\n },\n\n expandTextDivs: function TextLayer_expandTextDivs(expandDivs) {\n if (!this._enhanceTextSelection || !this._renderingDone) {\n return;\n }\n if (this._bounds !== null) {\n expand(this);\n this._bounds = null;\n }\n\n for (var i = 0, ii = this._textDivs.length; i < ii; i++) {\n var div = this._textDivs[i];\n var divProperties = this._textDivProperties.get(div);\n\n if (divProperties.isWhitespace) {\n continue;\n }\n if (expandDivs) {\n var transform = '', padding = '';\n\n if (divProperties.scale !== 1) {\n transform = 'scaleX(' + divProperties.scale + ')';\n }\n if (divProperties.angle !== 0) {\n transform = 'rotate(' + divProperties.angle + 'deg) ' + transform;\n }\n if (divProperties.paddingLeft !== 0) {\n padding += ' padding-left: ' +\n (divProperties.paddingLeft / divProperties.scale) + 'px;';\n transform += ' translateX(' +\n (-divProperties.paddingLeft / divProperties.scale) + 'px)';\n }\n if (divProperties.paddingTop !== 0) {\n padding += ' padding-top: ' + divProperties.paddingTop + 'px;';\n transform += ' translateY(' + (-divProperties.paddingTop) + 'px)';\n }\n if (divProperties.paddingRight !== 0) {\n padding += ' padding-right: ' +\n (divProperties.paddingRight / divProperties.scale) + 'px;';\n }\n if (divProperties.paddingBottom !== 0) {\n padding += ' padding-bottom: ' +\n divProperties.paddingBottom + 'px;';\n }\n\n if (padding !== '') {\n div.setAttribute('style', divProperties.style + padding);\n }\n if (transform !== '') {\n CustomStyle.setProp('transform', div, transform);\n }\n } else {\n div.style.padding = 0;\n CustomStyle.setProp('transform', div,\n divProperties.originalTransform || '');\n }\n }\n },\n };\n\n /**\n * Starts rendering of the text layer.\n *\n * @param {TextLayerRenderParameters} renderParameters\n * @returns {TextLayerRenderTask}\n */\n function renderTextLayer(renderParameters) {\n var task = new TextLayerRenderTask({\n textContent: renderParameters.textContent,\n textContentStream: renderParameters.textContentStream,\n container: renderParameters.container,\n viewport: renderParameters.viewport,\n textDivs: renderParameters.textDivs,\n textContentItemsStr: renderParameters.textContentItemsStr,\n enhanceTextSelection: renderParameters.enhanceTextSelection,\n });\n task._render(renderParameters.timeout);\n return task;\n }\n\n return renderTextLayer;\n})();\n\nexport {\n renderTextLayer,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/text_layer.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals __non_webpack_require__ */\n\nimport {\n createObjectURL, FONT_IDENTITY_MATRIX, IDENTITY_MATRIX, ImageKind, isNodeJS,\n isNum, OPS, Util, warn\n} from '../shared/util';\nimport { DOMSVGFactory } from './dom_utils';\n\nvar SVGGraphics = function() {\n throw new Error('Not implemented: SVGGraphics');\n};\n\nif (typeof PDFJSDev === 'undefined' ||\n PDFJSDev.test('GENERIC || SINGLE_FILE')) {\n\nvar SVG_DEFAULTS = {\n fontStyle: 'normal',\n fontWeight: 'normal',\n fillColor: '#000000',\n};\n\nvar convertImgDataToPng = (function convertImgDataToPngClosure() {\n var PNG_HEADER =\n new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);\n\n var CHUNK_WRAPPER_SIZE = 12;\n\n var crcTable = new Int32Array(256);\n for (var i = 0; i < 256; i++) {\n var c = i;\n for (var h = 0; h < 8; h++) {\n if (c & 1) {\n c = 0xedB88320 ^ ((c >> 1) & 0x7fffffff);\n } else {\n c = (c >> 1) & 0x7fffffff;\n }\n }\n crcTable[i] = c;\n }\n\n function crc32(data, start, end) {\n var crc = -1;\n for (var i = start; i < end; i++) {\n var a = (crc ^ data[i]) & 0xff;\n var b = crcTable[a];\n crc = (crc >>> 8) ^ b;\n }\n return crc ^ -1;\n }\n\n function writePngChunk(type, body, data, offset) {\n var p = offset;\n var len = body.length;\n\n data[p] = len >> 24 & 0xff;\n data[p + 1] = len >> 16 & 0xff;\n data[p + 2] = len >> 8 & 0xff;\n data[p + 3] = len & 0xff;\n p += 4;\n\n data[p] = type.charCodeAt(0) & 0xff;\n data[p + 1] = type.charCodeAt(1) & 0xff;\n data[p + 2] = type.charCodeAt(2) & 0xff;\n data[p + 3] = type.charCodeAt(3) & 0xff;\n p += 4;\n\n data.set(body, p);\n p += body.length;\n\n var crc = crc32(data, offset + 4, p);\n\n data[p] = crc >> 24 & 0xff;\n data[p + 1] = crc >> 16 & 0xff;\n data[p + 2] = crc >> 8 & 0xff;\n data[p + 3] = crc & 0xff;\n }\n\n function adler32(data, start, end) {\n var a = 1;\n var b = 0;\n for (var i = start; i < end; ++i) {\n a = (a + (data[i] & 0xff)) % 65521;\n b = (b + a) % 65521;\n }\n return (b << 16) | a;\n }\n\n /**\n * @param {Uint8Array} literals The input data.\n * @returns {Uint8Array} The DEFLATE-compressed data stream in zlib format.\n * This is the required format for compressed streams in the PNG format:\n * http://www.libpng.org/pub/png/spec/1.2/PNG-Compression.html\n */\n function deflateSync(literals) {\n if (!isNodeJS()) {\n // zlib is certainly not available outside of Node.js. We can either use\n // the pako library for client-side DEFLATE compression, or use the canvas\n // API of the browser to obtain a more optimal PNG file.\n return deflateSyncUncompressed(literals);\n }\n try {\n // NOTE: This implementation is far from perfect, but already way better\n // than not applying any compression.\n //\n // A better algorithm will try to choose a good predictor/filter and\n // then choose a suitable zlib compression strategy (e.g. 3,Z_RLE).\n //\n // Node v0.11.12 zlib.deflateSync is introduced (and returns a Buffer).\n // Node v3.0.0 Buffer inherits from Uint8Array.\n // Node v8.0.0 zlib.deflateSync accepts Uint8Array as input.\n var input;\n // eslint-disable-next-line no-undef\n if (parseInt(process.versions.node) >= 8) {\n input = literals;\n } else {\n // eslint-disable-next-line no-undef\n input = new Buffer(literals);\n }\n var output = __non_webpack_require__('zlib')\n .deflateSync(input, { level: 9, });\n return output instanceof Uint8Array ? output : new Uint8Array(output);\n } catch (e) {\n warn('Not compressing PNG because zlib.deflateSync is unavailable: ' + e);\n }\n\n return deflateSyncUncompressed(literals);\n }\n\n // An implementation of DEFLATE with compression level 0 (Z_NO_COMPRESSION).\n function deflateSyncUncompressed(literals) {\n var len = literals.length;\n var maxBlockLength = 0xFFFF;\n\n var deflateBlocks = Math.ceil(len / maxBlockLength);\n var idat = new Uint8Array(2 + len + deflateBlocks * 5 + 4);\n var pi = 0;\n idat[pi++] = 0x78; // compression method and flags\n idat[pi++] = 0x9c; // flags\n\n var pos = 0;\n while (len > maxBlockLength) {\n // writing non-final DEFLATE blocks type 0 and length of 65535\n idat[pi++] = 0x00;\n idat[pi++] = 0xff;\n idat[pi++] = 0xff;\n idat[pi++] = 0x00;\n idat[pi++] = 0x00;\n idat.set(literals.subarray(pos, pos + maxBlockLength), pi);\n pi += maxBlockLength;\n pos += maxBlockLength;\n len -= maxBlockLength;\n }\n\n // writing non-final DEFLATE blocks type 0\n idat[pi++] = 0x01;\n idat[pi++] = len & 0xff;\n idat[pi++] = len >> 8 & 0xff;\n idat[pi++] = (~len & 0xffff) & 0xff;\n idat[pi++] = (~len & 0xffff) >> 8 & 0xff;\n idat.set(literals.subarray(pos), pi);\n pi += literals.length - pos;\n\n var adler = adler32(literals, 0, literals.length); // checksum\n idat[pi++] = adler >> 24 & 0xff;\n idat[pi++] = adler >> 16 & 0xff;\n idat[pi++] = adler >> 8 & 0xff;\n idat[pi++] = adler & 0xff;\n return idat;\n }\n\n function encode(imgData, kind, forceDataSchema) {\n var width = imgData.width;\n var height = imgData.height;\n var bitDepth, colorType, lineSize;\n var bytes = imgData.data;\n\n switch (kind) {\n case ImageKind.GRAYSCALE_1BPP:\n colorType = 0;\n bitDepth = 1;\n lineSize = (width + 7) >> 3;\n break;\n case ImageKind.RGB_24BPP:\n colorType = 2;\n bitDepth = 8;\n lineSize = width * 3;\n break;\n case ImageKind.RGBA_32BPP:\n colorType = 6;\n bitDepth = 8;\n lineSize = width * 4;\n break;\n default:\n throw new Error('invalid format');\n }\n\n // prefix every row with predictor 0\n var literals = new Uint8Array((1 + lineSize) * height);\n var offsetLiterals = 0, offsetBytes = 0;\n var y, i;\n for (y = 0; y < height; ++y) {\n literals[offsetLiterals++] = 0; // no prediction\n literals.set(bytes.subarray(offsetBytes, offsetBytes + lineSize),\n offsetLiterals);\n offsetBytes += lineSize;\n offsetLiterals += lineSize;\n }\n\n if (kind === ImageKind.GRAYSCALE_1BPP) {\n // inverting for B/W\n offsetLiterals = 0;\n for (y = 0; y < height; y++) {\n offsetLiterals++; // skipping predictor\n for (i = 0; i < lineSize; i++) {\n literals[offsetLiterals++] ^= 0xFF;\n }\n }\n }\n\n var ihdr = new Uint8Array([\n width >> 24 & 0xff,\n width >> 16 & 0xff,\n width >> 8 & 0xff,\n width & 0xff,\n height >> 24 & 0xff,\n height >> 16 & 0xff,\n height >> 8 & 0xff,\n height & 0xff,\n bitDepth, // bit depth\n colorType, // color type\n 0x00, // compression method\n 0x00, // filter method\n 0x00 // interlace method\n ]);\n\n var idat = deflateSync(literals);\n\n // PNG will consists: header, IHDR+data, IDAT+data, and IEND.\n var pngLength = PNG_HEADER.length + (CHUNK_WRAPPER_SIZE * 3) +\n ihdr.length + idat.length;\n var data = new Uint8Array(pngLength);\n var offset = 0;\n data.set(PNG_HEADER, offset);\n offset += PNG_HEADER.length;\n writePngChunk('IHDR', ihdr, data, offset);\n offset += CHUNK_WRAPPER_SIZE + ihdr.length;\n writePngChunk('IDATA', idat, data, offset);\n offset += CHUNK_WRAPPER_SIZE + idat.length;\n writePngChunk('IEND', new Uint8Array(0), data, offset);\n\n return createObjectURL(data, 'image/png', forceDataSchema);\n }\n\n return function convertImgDataToPng(imgData, forceDataSchema) {\n var kind = (imgData.kind === undefined ?\n ImageKind.GRAYSCALE_1BPP : imgData.kind);\n return encode(imgData, kind, forceDataSchema);\n };\n})();\n\nvar SVGExtraState = (function SVGExtraStateClosure() {\n function SVGExtraState() {\n this.fontSizeScale = 1;\n this.fontWeight = SVG_DEFAULTS.fontWeight;\n this.fontSize = 0;\n\n this.textMatrix = IDENTITY_MATRIX;\n this.fontMatrix = FONT_IDENTITY_MATRIX;\n this.leading = 0;\n\n // Current point (in user coordinates)\n this.x = 0;\n this.y = 0;\n\n // Start of text line (in text coordinates)\n this.lineX = 0;\n this.lineY = 0;\n\n // Character and word spacing\n this.charSpacing = 0;\n this.wordSpacing = 0;\n this.textHScale = 1;\n this.textRise = 0;\n\n // Default foreground and background colors\n this.fillColor = SVG_DEFAULTS.fillColor;\n this.strokeColor = '#000000';\n\n this.fillAlpha = 1;\n this.strokeAlpha = 1;\n this.lineWidth = 1;\n this.lineJoin = '';\n this.lineCap = '';\n this.miterLimit = 0;\n\n this.dashArray = [];\n this.dashPhase = 0;\n\n this.dependencies = [];\n\n // Clipping\n this.activeClipUrl = null;\n this.clipGroup = null;\n\n this.maskId = '';\n }\n\n SVGExtraState.prototype = {\n clone: function SVGExtraState_clone() {\n return Object.create(this);\n },\n setCurrentPoint: function SVGExtraState_setCurrentPoint(x, y) {\n this.x = x;\n this.y = y;\n },\n };\n return SVGExtraState;\n})();\n\nSVGGraphics = (function SVGGraphicsClosure() {\n function opListToTree(opList) {\n var opTree = [];\n var tmp = [];\n var opListLen = opList.length;\n\n for (var x = 0; x < opListLen; x++) {\n if (opList[x].fn === 'save') {\n opTree.push({ 'fnId': 92, 'fn': 'group', 'items': [], });\n tmp.push(opTree);\n opTree = opTree[opTree.length - 1].items;\n continue;\n }\n\n if (opList[x].fn === 'restore') {\n opTree = tmp.pop();\n } else {\n opTree.push(opList[x]);\n }\n }\n return opTree;\n }\n\n /**\n * Formats float number.\n * @param value {number} number to format.\n * @returns {string}\n */\n function pf(value) {\n if (Number.isInteger(value)) {\n return value.toString();\n }\n var s = value.toFixed(10);\n var i = s.length - 1;\n if (s[i] !== '0') {\n return s;\n }\n // removing trailing zeros\n do {\n i--;\n } while (s[i] === '0');\n return s.substr(0, s[i] === '.' ? i : i + 1);\n }\n\n /**\n * Formats transform matrix. The standard rotation, scale and translate\n * matrices are replaced by their shorter forms, and for identity matrix\n * returns empty string to save the memory.\n * @param m {Array} matrix to format.\n * @returns {string}\n */\n function pm(m) {\n if (m[4] === 0 && m[5] === 0) {\n if (m[1] === 0 && m[2] === 0) {\n if (m[0] === 1 && m[3] === 1) {\n return '';\n }\n return 'scale(' + pf(m[0]) + ' ' + pf(m[3]) + ')';\n }\n if (m[0] === m[3] && m[1] === -m[2]) {\n var a = Math.acos(m[0]) * 180 / Math.PI;\n return 'rotate(' + pf(a) + ')';\n }\n } else {\n if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) {\n return 'translate(' + pf(m[4]) + ' ' + pf(m[5]) + ')';\n }\n }\n return 'matrix(' + pf(m[0]) + ' ' + pf(m[1]) + ' ' + pf(m[2]) + ' ' +\n pf(m[3]) + ' ' + pf(m[4]) + ' ' + pf(m[5]) + ')';\n }\n\n function SVGGraphics(commonObjs, objs, forceDataSchema) {\n this.svgFactory = new DOMSVGFactory();\n\n this.current = new SVGExtraState();\n this.transformMatrix = IDENTITY_MATRIX; // Graphics state matrix\n this.transformStack = [];\n this.extraStack = [];\n this.commonObjs = commonObjs;\n this.objs = objs;\n this.pendingClip = null;\n this.pendingEOFill = false;\n\n this.embedFonts = false;\n this.embeddedFonts = Object.create(null);\n this.cssStyle = null;\n this.forceDataSchema = !!forceDataSchema;\n }\n\n var XML_NS = 'http://www.w3.org/XML/1998/namespace';\n var XLINK_NS = 'http://www.w3.org/1999/xlink';\n var LINE_CAP_STYLES = ['butt', 'round', 'square'];\n var LINE_JOIN_STYLES = ['miter', 'round', 'bevel'];\n var clipCount = 0;\n var maskCount = 0;\n\n SVGGraphics.prototype = {\n save: function SVGGraphics_save() {\n this.transformStack.push(this.transformMatrix);\n var old = this.current;\n this.extraStack.push(old);\n this.current = old.clone();\n },\n\n restore: function SVGGraphics_restore() {\n this.transformMatrix = this.transformStack.pop();\n this.current = this.extraStack.pop();\n\n this.pendingClip = null;\n this.tgrp = null;\n },\n\n group: function SVGGraphics_group(items) {\n this.save();\n this.executeOpTree(items);\n this.restore();\n },\n\n loadDependencies: function SVGGraphics_loadDependencies(operatorList) {\n var fnArray = operatorList.fnArray;\n var fnArrayLen = fnArray.length;\n var argsArray = operatorList.argsArray;\n\n for (var i = 0; i < fnArrayLen; i++) {\n if (OPS.dependency === fnArray[i]) {\n var deps = argsArray[i];\n for (var n = 0, nn = deps.length; n < nn; n++) {\n var obj = deps[n];\n var common = obj.substring(0, 2) === 'g_';\n var promise;\n if (common) {\n promise = new Promise((resolve) => {\n this.commonObjs.get(obj, resolve);\n });\n } else {\n promise = new Promise((resolve) => {\n this.objs.get(obj, resolve);\n });\n }\n this.current.dependencies.push(promise);\n }\n }\n }\n return Promise.all(this.current.dependencies);\n },\n\n transform: function SVGGraphics_transform(a, b, c, d, e, f) {\n var transformMatrix = [a, b, c, d, e, f];\n this.transformMatrix = Util.transform(this.transformMatrix,\n transformMatrix);\n this.tgrp = null;\n },\n\n getSVG: function SVGGraphics_getSVG(operatorList, viewport) {\n this.viewport = viewport;\n\n var svgElement = this._initialize(viewport);\n return this.loadDependencies(operatorList).then(() => {\n this.transformMatrix = IDENTITY_MATRIX;\n var opTree = this.convertOpList(operatorList);\n this.executeOpTree(opTree);\n return svgElement;\n });\n },\n\n convertOpList: function SVGGraphics_convertOpList(operatorList) {\n var argsArray = operatorList.argsArray;\n var fnArray = operatorList.fnArray;\n var fnArrayLen = fnArray.length;\n var REVOPS = [];\n var opList = [];\n\n for (var op in OPS) {\n REVOPS[OPS[op]] = op;\n }\n\n for (var x = 0; x < fnArrayLen; x++) {\n var fnId = fnArray[x];\n opList.push({\n 'fnId': fnId,\n 'fn': REVOPS[fnId],\n 'args': argsArray[x],\n });\n }\n return opListToTree(opList);\n },\n\n executeOpTree: function SVGGraphics_executeOpTree(opTree) {\n var opTreeLen = opTree.length;\n for (var x = 0; x < opTreeLen; x++) {\n var fn = opTree[x].fn;\n var fnId = opTree[x].fnId;\n var args = opTree[x].args;\n\n switch (fnId | 0) {\n case OPS.beginText:\n this.beginText();\n break;\n case OPS.setLeading:\n this.setLeading(args);\n break;\n case OPS.setLeadingMoveText:\n this.setLeadingMoveText(args[0], args[1]);\n break;\n case OPS.setFont:\n this.setFont(args);\n break;\n case OPS.showText:\n this.showText(args[0]);\n break;\n case OPS.showSpacedText:\n this.showText(args[0]);\n break;\n case OPS.endText:\n this.endText();\n break;\n case OPS.moveText:\n this.moveText(args[0], args[1]);\n break;\n case OPS.setCharSpacing:\n this.setCharSpacing(args[0]);\n break;\n case OPS.setWordSpacing:\n this.setWordSpacing(args[0]);\n break;\n case OPS.setHScale:\n this.setHScale(args[0]);\n break;\n case OPS.setTextMatrix:\n this.setTextMatrix(args[0], args[1], args[2],\n args[3], args[4], args[5]);\n break;\n case OPS.setTextRise:\n this.setTextRise(args[0]);\n break;\n case OPS.setLineWidth:\n this.setLineWidth(args[0]);\n break;\n case OPS.setLineJoin:\n this.setLineJoin(args[0]);\n break;\n case OPS.setLineCap:\n this.setLineCap(args[0]);\n break;\n case OPS.setMiterLimit:\n this.setMiterLimit(args[0]);\n break;\n case OPS.setFillRGBColor:\n this.setFillRGBColor(args[0], args[1], args[2]);\n break;\n case OPS.setStrokeRGBColor:\n this.setStrokeRGBColor(args[0], args[1], args[2]);\n break;\n case OPS.setDash:\n this.setDash(args[0], args[1]);\n break;\n case OPS.setGState:\n this.setGState(args[0]);\n break;\n case OPS.fill:\n this.fill();\n break;\n case OPS.eoFill:\n this.eoFill();\n break;\n case OPS.stroke:\n this.stroke();\n break;\n case OPS.fillStroke:\n this.fillStroke();\n break;\n case OPS.eoFillStroke:\n this.eoFillStroke();\n break;\n case OPS.clip:\n this.clip('nonzero');\n break;\n case OPS.eoClip:\n this.clip('evenodd');\n break;\n case OPS.paintSolidColorImageMask:\n this.paintSolidColorImageMask();\n break;\n case OPS.paintJpegXObject:\n this.paintJpegXObject(args[0], args[1], args[2]);\n break;\n case OPS.paintImageXObject:\n this.paintImageXObject(args[0]);\n break;\n case OPS.paintInlineImageXObject:\n this.paintInlineImageXObject(args[0]);\n break;\n case OPS.paintImageMaskXObject:\n this.paintImageMaskXObject(args[0]);\n break;\n case OPS.paintFormXObjectBegin:\n this.paintFormXObjectBegin(args[0], args[1]);\n break;\n case OPS.paintFormXObjectEnd:\n this.paintFormXObjectEnd();\n break;\n case OPS.closePath:\n this.closePath();\n break;\n case OPS.closeStroke:\n this.closeStroke();\n break;\n case OPS.closeFillStroke:\n this.closeFillStroke();\n break;\n case OPS.nextLine:\n this.nextLine();\n break;\n case OPS.transform:\n this.transform(args[0], args[1], args[2], args[3],\n args[4], args[5]);\n break;\n case OPS.constructPath:\n this.constructPath(args[0], args[1]);\n break;\n case OPS.endPath:\n this.endPath();\n break;\n case 92:\n this.group(opTree[x].items);\n break;\n default:\n warn('Unimplemented operator ' + fn);\n break;\n }\n }\n },\n\n setWordSpacing: function SVGGraphics_setWordSpacing(wordSpacing) {\n this.current.wordSpacing = wordSpacing;\n },\n\n setCharSpacing: function SVGGraphics_setCharSpacing(charSpacing) {\n this.current.charSpacing = charSpacing;\n },\n\n nextLine: function SVGGraphics_nextLine() {\n this.moveText(0, this.current.leading);\n },\n\n setTextMatrix: function SVGGraphics_setTextMatrix(a, b, c, d, e, f) {\n var current = this.current;\n this.current.textMatrix = this.current.lineMatrix = [a, b, c, d, e, f];\n\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n\n current.xcoords = [];\n current.tspan = this.svgFactory.createElement('svg:tspan');\n current.tspan.setAttributeNS(null, 'font-family', current.fontFamily);\n current.tspan.setAttributeNS(null, 'font-size',\n pf(current.fontSize) + 'px');\n current.tspan.setAttributeNS(null, 'y', pf(-current.y));\n\n current.txtElement = this.svgFactory.createElement('svg:text');\n current.txtElement.appendChild(current.tspan);\n },\n\n beginText: function SVGGraphics_beginText() {\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n this.current.textMatrix = IDENTITY_MATRIX;\n this.current.lineMatrix = IDENTITY_MATRIX;\n this.current.tspan = this.svgFactory.createElement('svg:tspan');\n this.current.txtElement = this.svgFactory.createElement('svg:text');\n this.current.txtgrp = this.svgFactory.createElement('svg:g');\n this.current.xcoords = [];\n },\n\n moveText: function SVGGraphics_moveText(x, y) {\n var current = this.current;\n this.current.x = this.current.lineX += x;\n this.current.y = this.current.lineY += y;\n\n current.xcoords = [];\n current.tspan = this.svgFactory.createElement('svg:tspan');\n current.tspan.setAttributeNS(null, 'font-family', current.fontFamily);\n current.tspan.setAttributeNS(null, 'font-size',\n pf(current.fontSize) + 'px');\n current.tspan.setAttributeNS(null, 'y', pf(-current.y));\n },\n\n showText: function SVGGraphics_showText(glyphs) {\n var current = this.current;\n var font = current.font;\n var fontSize = current.fontSize;\n\n if (fontSize === 0) {\n return;\n }\n\n var charSpacing = current.charSpacing;\n var wordSpacing = current.wordSpacing;\n var fontDirection = current.fontDirection;\n var textHScale = current.textHScale * fontDirection;\n var glyphsLength = glyphs.length;\n var vertical = font.vertical;\n var widthAdvanceScale = fontSize * current.fontMatrix[0];\n\n var x = 0, i;\n for (i = 0; i < glyphsLength; ++i) {\n var glyph = glyphs[i];\n if (glyph === null) {\n // word break\n x += fontDirection * wordSpacing;\n continue;\n } else if (isNum(glyph)) {\n x += -glyph * fontSize * 0.001;\n continue;\n }\n\n var width = glyph.width;\n var character = glyph.fontChar;\n var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n var charWidth = width * widthAdvanceScale + spacing * fontDirection;\n\n if (!glyph.isInFont && !font.missingFile) {\n x += charWidth;\n // TODO: To assist with text selection, we should replace the missing\n // character with a space character if charWidth is not zero.\n // But we cannot just do \"character = ' '\", because the ' ' character\n // might actually map to a different glyph.\n continue;\n }\n current.xcoords.push(current.x + x * textHScale);\n current.tspan.textContent += character;\n x += charWidth;\n }\n if (vertical) {\n current.y -= x * textHScale;\n } else {\n current.x += x * textHScale;\n }\n\n current.tspan.setAttributeNS(null, 'x',\n current.xcoords.map(pf).join(' '));\n current.tspan.setAttributeNS(null, 'y', pf(-current.y));\n current.tspan.setAttributeNS(null, 'font-family', current.fontFamily);\n current.tspan.setAttributeNS(null, 'font-size',\n pf(current.fontSize) + 'px');\n if (current.fontStyle !== SVG_DEFAULTS.fontStyle) {\n current.tspan.setAttributeNS(null, 'font-style', current.fontStyle);\n }\n if (current.fontWeight !== SVG_DEFAULTS.fontWeight) {\n current.tspan.setAttributeNS(null, 'font-weight', current.fontWeight);\n }\n if (current.fillColor !== SVG_DEFAULTS.fillColor) {\n current.tspan.setAttributeNS(null, 'fill', current.fillColor);\n }\n\n // Include the text rise in the text matrix since the `pm` function\n // creates the SVG element's `translate` entry (work on a copy to avoid\n // altering the original text matrix).\n let textMatrix = current.textMatrix;\n if (current.textRise !== 0) {\n textMatrix = textMatrix.slice();\n textMatrix[5] += current.textRise;\n }\n\n current.txtElement.setAttributeNS(null, 'transform',\n pm(textMatrix) + ' scale(1, -1)');\n current.txtElement.setAttributeNS(XML_NS, 'xml:space', 'preserve');\n current.txtElement.appendChild(current.tspan);\n current.txtgrp.appendChild(current.txtElement);\n\n this._ensureTransformGroup().appendChild(current.txtElement);\n },\n\n setLeadingMoveText: function SVGGraphics_setLeadingMoveText(x, y) {\n this.setLeading(-y);\n this.moveText(x, y);\n },\n\n addFontStyle: function SVGGraphics_addFontStyle(fontObj) {\n if (!this.cssStyle) {\n this.cssStyle = this.svgFactory.createElement('svg:style');\n this.cssStyle.setAttributeNS(null, 'type', 'text/css');\n this.defs.appendChild(this.cssStyle);\n }\n\n var url = createObjectURL(fontObj.data, fontObj.mimetype,\n this.forceDataSchema);\n this.cssStyle.textContent +=\n '@font-face { font-family: \"' + fontObj.loadedName + '\";' +\n ' src: url(' + url + '); }\\n';\n },\n\n setFont: function SVGGraphics_setFont(details) {\n var current = this.current;\n var fontObj = this.commonObjs.get(details[0]);\n var size = details[1];\n this.current.font = fontObj;\n\n if (this.embedFonts && fontObj.data &&\n !this.embeddedFonts[fontObj.loadedName]) {\n this.addFontStyle(fontObj);\n this.embeddedFonts[fontObj.loadedName] = fontObj;\n }\n\n current.fontMatrix = (fontObj.fontMatrix ?\n fontObj.fontMatrix : FONT_IDENTITY_MATRIX);\n\n var bold = fontObj.black ? (fontObj.bold ? 'bolder' : 'bold') :\n (fontObj.bold ? 'bold' : 'normal');\n var italic = fontObj.italic ? 'italic' : 'normal';\n\n if (size < 0) {\n size = -size;\n current.fontDirection = -1;\n } else {\n current.fontDirection = 1;\n }\n current.fontSize = size;\n current.fontFamily = fontObj.loadedName;\n current.fontWeight = bold;\n current.fontStyle = italic;\n\n current.tspan = this.svgFactory.createElement('svg:tspan');\n current.tspan.setAttributeNS(null, 'y', pf(-current.y));\n current.xcoords = [];\n },\n\n endText: function SVGGraphics_endText() {},\n\n // Path properties\n setLineWidth: function SVGGraphics_setLineWidth(width) {\n this.current.lineWidth = width;\n },\n setLineCap: function SVGGraphics_setLineCap(style) {\n this.current.lineCap = LINE_CAP_STYLES[style];\n },\n setLineJoin: function SVGGraphics_setLineJoin(style) {\n this.current.lineJoin = LINE_JOIN_STYLES[style];\n },\n setMiterLimit: function SVGGraphics_setMiterLimit(limit) {\n this.current.miterLimit = limit;\n },\n setStrokeAlpha: function SVGGraphics_setStrokeAlpha(strokeAlpha) {\n this.current.strokeAlpha = strokeAlpha;\n },\n setStrokeRGBColor: function SVGGraphics_setStrokeRGBColor(r, g, b) {\n var color = Util.makeCssRgb(r, g, b);\n this.current.strokeColor = color;\n },\n setFillAlpha: function SVGGraphics_setFillAlpha(fillAlpha) {\n this.current.fillAlpha = fillAlpha;\n },\n setFillRGBColor: function SVGGraphics_setFillRGBColor(r, g, b) {\n var color = Util.makeCssRgb(r, g, b);\n this.current.fillColor = color;\n this.current.tspan = this.svgFactory.createElement('svg:tspan');\n this.current.xcoords = [];\n },\n setDash: function SVGGraphics_setDash(dashArray, dashPhase) {\n this.current.dashArray = dashArray;\n this.current.dashPhase = dashPhase;\n },\n\n constructPath: function SVGGraphics_constructPath(ops, args) {\n var current = this.current;\n var x = current.x, y = current.y;\n current.path = this.svgFactory.createElement('svg:path');\n var d = [];\n var opLength = ops.length;\n\n for (var i = 0, j = 0; i < opLength; i++) {\n switch (ops[i] | 0) {\n case OPS.rectangle:\n x = args[j++];\n y = args[j++];\n var width = args[j++];\n var height = args[j++];\n var xw = x + width;\n var yh = y + height;\n d.push('M', pf(x), pf(y), 'L', pf(xw), pf(y), 'L', pf(xw), pf(yh),\n 'L', pf(x), pf(yh), 'Z');\n break;\n case OPS.moveTo:\n x = args[j++];\n y = args[j++];\n d.push('M', pf(x), pf(y));\n break;\n case OPS.lineTo:\n x = args[j++];\n y = args[j++];\n d.push('L', pf(x), pf(y));\n break;\n case OPS.curveTo:\n x = args[j + 4];\n y = args[j + 5];\n d.push('C', pf(args[j]), pf(args[j + 1]), pf(args[j + 2]),\n pf(args[j + 3]), pf(x), pf(y));\n j += 6;\n break;\n case OPS.curveTo2:\n x = args[j + 2];\n y = args[j + 3];\n d.push('C', pf(x), pf(y), pf(args[j]), pf(args[j + 1]),\n pf(args[j + 2]), pf(args[j + 3]));\n j += 4;\n break;\n case OPS.curveTo3:\n x = args[j + 2];\n y = args[j + 3];\n d.push('C', pf(args[j]), pf(args[j + 1]), pf(x), pf(y),\n pf(x), pf(y));\n j += 4;\n break;\n case OPS.closePath:\n d.push('Z');\n break;\n }\n }\n current.path.setAttributeNS(null, 'd', d.join(' '));\n current.path.setAttributeNS(null, 'fill', 'none');\n\n this._ensureTransformGroup().appendChild(current.path);\n\n // Saving a reference in current.element so that it can be addressed\n // in 'fill' and 'stroke'\n current.element = current.path;\n current.setCurrentPoint(x, y);\n },\n\n endPath: function SVGGraphics_endPath() {\n if (!this.pendingClip) {\n return;\n }\n var current = this.current;\n // Add current path to clipping path\n var clipId = 'clippath' + clipCount;\n clipCount++;\n var clipPath = this.svgFactory.createElement('svg:clipPath');\n clipPath.setAttributeNS(null, 'id', clipId);\n clipPath.setAttributeNS(null, 'transform', pm(this.transformMatrix));\n var clipElement = current.element.cloneNode();\n if (this.pendingClip === 'evenodd') {\n clipElement.setAttributeNS(null, 'clip-rule', 'evenodd');\n } else {\n clipElement.setAttributeNS(null, 'clip-rule', 'nonzero');\n }\n this.pendingClip = null;\n clipPath.appendChild(clipElement);\n this.defs.appendChild(clipPath);\n\n if (current.activeClipUrl) {\n // The previous clipping group content can go out of order -- resetting\n // cached clipGroups.\n current.clipGroup = null;\n this.extraStack.forEach(function (prev) {\n prev.clipGroup = null;\n });\n }\n current.activeClipUrl = 'url(#' + clipId + ')';\n\n this.tgrp = null;\n },\n\n clip: function SVGGraphics_clip(type) {\n this.pendingClip = type;\n },\n\n closePath: function SVGGraphics_closePath() {\n var current = this.current;\n var d = current.path.getAttributeNS(null, 'd');\n d += 'Z';\n current.path.setAttributeNS(null, 'd', d);\n },\n\n setLeading: function SVGGraphics_setLeading(leading) {\n this.current.leading = -leading;\n },\n\n setTextRise: function SVGGraphics_setTextRise(textRise) {\n this.current.textRise = textRise;\n },\n\n setHScale: function SVGGraphics_setHScale(scale) {\n this.current.textHScale = scale / 100;\n },\n\n setGState: function SVGGraphics_setGState(states) {\n for (var i = 0, ii = states.length; i < ii; i++) {\n var state = states[i];\n var key = state[0];\n var value = state[1];\n\n switch (key) {\n case 'LW':\n this.setLineWidth(value);\n break;\n case 'LC':\n this.setLineCap(value);\n break;\n case 'LJ':\n this.setLineJoin(value);\n break;\n case 'ML':\n this.setMiterLimit(value);\n break;\n case 'D':\n this.setDash(value[0], value[1]);\n break;\n case 'Font':\n this.setFont(value);\n break;\n case 'CA':\n this.setStrokeAlpha(value);\n break;\n case 'ca':\n this.setFillAlpha(value);\n break;\n default:\n warn('Unimplemented graphic state ' + key);\n break;\n }\n }\n },\n\n fill: function SVGGraphics_fill() {\n var current = this.current;\n current.element.setAttributeNS(null, 'fill', current.fillColor);\n current.element.setAttributeNS(null, 'fill-opacity', current.fillAlpha);\n },\n\n stroke: function SVGGraphics_stroke() {\n var current = this.current;\n\n current.element.setAttributeNS(null, 'stroke', current.strokeColor);\n current.element.setAttributeNS(null, 'stroke-opacity',\n current.strokeAlpha);\n current.element.setAttributeNS(null, 'stroke-miterlimit',\n pf(current.miterLimit));\n current.element.setAttributeNS(null, 'stroke-linecap', current.lineCap);\n current.element.setAttributeNS(null, 'stroke-linejoin', current.lineJoin);\n current.element.setAttributeNS(null, 'stroke-width',\n pf(current.lineWidth) + 'px');\n current.element.setAttributeNS(null, 'stroke-dasharray',\n current.dashArray.map(pf).join(' '));\n current.element.setAttributeNS(null, 'stroke-dashoffset',\n pf(current.dashPhase) + 'px');\n\n current.element.setAttributeNS(null, 'fill', 'none');\n },\n\n eoFill: function SVGGraphics_eoFill() {\n this.current.element.setAttributeNS(null, 'fill-rule', 'evenodd');\n this.fill();\n },\n\n fillStroke: function SVGGraphics_fillStroke() {\n // Order is important since stroke wants fill to be none.\n // First stroke, then if fill needed, it will be overwritten.\n this.stroke();\n this.fill();\n },\n\n eoFillStroke: function SVGGraphics_eoFillStroke() {\n this.current.element.setAttributeNS(null, 'fill-rule', 'evenodd');\n this.fillStroke();\n },\n\n closeStroke: function SVGGraphics_closeStroke() {\n this.closePath();\n this.stroke();\n },\n\n closeFillStroke: function SVGGraphics_closeFillStroke() {\n this.closePath();\n this.fillStroke();\n },\n\n paintSolidColorImageMask:\n function SVGGraphics_paintSolidColorImageMask() {\n var current = this.current;\n var rect = this.svgFactory.createElement('svg:rect');\n rect.setAttributeNS(null, 'x', '0');\n rect.setAttributeNS(null, 'y', '0');\n rect.setAttributeNS(null, 'width', '1px');\n rect.setAttributeNS(null, 'height', '1px');\n rect.setAttributeNS(null, 'fill', current.fillColor);\n\n this._ensureTransformGroup().appendChild(rect);\n },\n\n paintJpegXObject: function SVGGraphics_paintJpegXObject(objId, w, h) {\n var imgObj = this.objs.get(objId);\n var imgEl = this.svgFactory.createElement('svg:image');\n imgEl.setAttributeNS(XLINK_NS, 'xlink:href', imgObj.src);\n imgEl.setAttributeNS(null, 'width', pf(w));\n imgEl.setAttributeNS(null, 'height', pf(h));\n imgEl.setAttributeNS(null, 'x', '0');\n imgEl.setAttributeNS(null, 'y', pf(-h));\n imgEl.setAttributeNS(null, 'transform',\n 'scale(' + pf(1 / w) + ' ' + pf(-1 / h) + ')');\n\n this._ensureTransformGroup().appendChild(imgEl);\n },\n\n paintImageXObject: function SVGGraphics_paintImageXObject(objId) {\n var imgData = this.objs.get(objId);\n if (!imgData) {\n warn('Dependent image isn\\'t ready yet');\n return;\n }\n this.paintInlineImageXObject(imgData);\n },\n\n paintInlineImageXObject:\n function SVGGraphics_paintInlineImageXObject(imgData, mask) {\n var width = imgData.width;\n var height = imgData.height;\n\n var imgSrc = convertImgDataToPng(imgData, this.forceDataSchema);\n var cliprect = this.svgFactory.createElement('svg:rect');\n cliprect.setAttributeNS(null, 'x', '0');\n cliprect.setAttributeNS(null, 'y', '0');\n cliprect.setAttributeNS(null, 'width', pf(width));\n cliprect.setAttributeNS(null, 'height', pf(height));\n this.current.element = cliprect;\n this.clip('nonzero');\n var imgEl = this.svgFactory.createElement('svg:image');\n imgEl.setAttributeNS(XLINK_NS, 'xlink:href', imgSrc);\n imgEl.setAttributeNS(null, 'x', '0');\n imgEl.setAttributeNS(null, 'y', pf(-height));\n imgEl.setAttributeNS(null, 'width', pf(width) + 'px');\n imgEl.setAttributeNS(null, 'height', pf(height) + 'px');\n imgEl.setAttributeNS(null, 'transform',\n 'scale(' + pf(1 / width) + ' ' +\n pf(-1 / height) + ')');\n if (mask) {\n mask.appendChild(imgEl);\n } else {\n this._ensureTransformGroup().appendChild(imgEl);\n }\n },\n\n paintImageMaskXObject:\n function SVGGraphics_paintImageMaskXObject(imgData) {\n var current = this.current;\n var width = imgData.width;\n var height = imgData.height;\n var fillColor = current.fillColor;\n\n current.maskId = 'mask' + maskCount++;\n var mask = this.svgFactory.createElement('svg:mask');\n mask.setAttributeNS(null, 'id', current.maskId);\n\n var rect = this.svgFactory.createElement('svg:rect');\n rect.setAttributeNS(null, 'x', '0');\n rect.setAttributeNS(null, 'y', '0');\n rect.setAttributeNS(null, 'width', pf(width));\n rect.setAttributeNS(null, 'height', pf(height));\n rect.setAttributeNS(null, 'fill', fillColor);\n rect.setAttributeNS(null, 'mask', 'url(#' + current.maskId + ')');\n this.defs.appendChild(mask);\n\n this._ensureTransformGroup().appendChild(rect);\n\n this.paintInlineImageXObject(imgData, mask);\n },\n\n paintFormXObjectBegin:\n function SVGGraphics_paintFormXObjectBegin(matrix, bbox) {\n if (Array.isArray(matrix) && matrix.length === 6) {\n this.transform(matrix[0], matrix[1], matrix[2],\n matrix[3], matrix[4], matrix[5]);\n }\n\n if (Array.isArray(bbox) && bbox.length === 4) {\n var width = bbox[2] - bbox[0];\n var height = bbox[3] - bbox[1];\n\n var cliprect = this.svgFactory.createElement('svg:rect');\n cliprect.setAttributeNS(null, 'x', bbox[0]);\n cliprect.setAttributeNS(null, 'y', bbox[1]);\n cliprect.setAttributeNS(null, 'width', pf(width));\n cliprect.setAttributeNS(null, 'height', pf(height));\n this.current.element = cliprect;\n this.clip('nonzero');\n this.endPath();\n }\n },\n\n paintFormXObjectEnd:\n function SVGGraphics_paintFormXObjectEnd() {},\n\n /**\n * @private\n */\n _initialize(viewport) {\n let svg = this.svgFactory.create(viewport.width, viewport.height);\n\n // Create the definitions element.\n let definitions = this.svgFactory.createElement('svg:defs');\n svg.appendChild(definitions);\n this.defs = definitions;\n\n // Create the root group element, which acts a container for all other\n // groups and applies the viewport transform.\n let rootGroup = this.svgFactory.createElement('svg:g');\n rootGroup.setAttributeNS(null, 'transform', pm(viewport.transform));\n svg.appendChild(rootGroup);\n\n // For the construction of the SVG image we are only interested in the\n // root group, so we expose it as the entry point of the SVG image for\n // the other code in this class.\n this.svg = rootGroup;\n\n return svg;\n },\n\n /**\n * @private\n */\n _ensureClipGroup: function SVGGraphics_ensureClipGroup() {\n if (!this.current.clipGroup) {\n var clipGroup = this.svgFactory.createElement('svg:g');\n clipGroup.setAttributeNS(null, 'clip-path',\n this.current.activeClipUrl);\n this.svg.appendChild(clipGroup);\n this.current.clipGroup = clipGroup;\n }\n return this.current.clipGroup;\n },\n\n /**\n * @private\n */\n _ensureTransformGroup: function SVGGraphics_ensureTransformGroup() {\n if (!this.tgrp) {\n this.tgrp = this.svgFactory.createElement('svg:g');\n this.tgrp.setAttributeNS(null, 'transform', pm(this.transformMatrix));\n if (this.current.activeClipUrl) {\n this._ensureClipGroup().appendChild(this.tgrp);\n } else {\n this.svg.appendChild(this.tgrp);\n }\n }\n return this.tgrp;\n },\n };\n return SVGGraphics;\n})();\n\n}\n\nexport {\n SVGGraphics,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/svg.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint-disable no-unused-vars */\n\n'use strict';\n\nvar pdfjsVersion =\n typeof PDFJSDev !== 'undefined' ? PDFJSDev.eval('BUNDLE_VERSION') : void 0;\nvar pdfjsBuild =\n typeof PDFJSDev !== 'undefined' ? PDFJSDev.eval('BUNDLE_BUILD') : void 0;\n\nvar pdfjsSharedUtil = require('./shared/util.js');\nvar pdfjsDisplayGlobal = require('./display/global.js');\nvar pdfjsDisplayAPI = require('./display/api.js');\nvar pdfjsDisplayTextLayer = require('./display/text_layer.js');\nvar pdfjsDisplayAnnotationLayer = require('./display/annotation_layer.js');\nvar pdfjsDisplayDOMUtils = require('./display/dom_utils.js');\nvar pdfjsDisplaySVG = require('./display/svg.js');\n\nif (typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n if (pdfjsSharedUtil.isNodeJS()) {\n var PDFNodeStream = require('./display/node_stream.js').PDFNodeStream;\n pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFNodeStream);\n } else if (typeof Response !== 'undefined' && 'body' in Response.prototype &&\n typeof ReadableStream !== 'undefined') {\n var PDFFetchStream = require('./display/fetch_stream.js').PDFFetchStream;\n pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFFetchStream);\n } else {\n var PDFNetworkStream = require('./display/network.js').PDFNetworkStream;\n pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFNetworkStream);\n }\n}\n\nexports.PDFJS = pdfjsDisplayGlobal.PDFJS;\nexports.build = pdfjsDisplayAPI.build;\nexports.version = pdfjsDisplayAPI.version;\nexports.getDocument = pdfjsDisplayAPI.getDocument;\nexports.LoopbackPort = pdfjsDisplayAPI.LoopbackPort;\nexports.PDFDataRangeTransport = pdfjsDisplayAPI.PDFDataRangeTransport;\nexports.PDFWorker = pdfjsDisplayAPI.PDFWorker;\nexports.renderTextLayer = pdfjsDisplayTextLayer.renderTextLayer;\nexports.AnnotationLayer = pdfjsDisplayAnnotationLayer.AnnotationLayer;\nexports.CustomStyle = pdfjsDisplayDOMUtils.CustomStyle;\nexports.createPromiseCapability = pdfjsSharedUtil.createPromiseCapability;\nexports.PasswordResponses = pdfjsSharedUtil.PasswordResponses;\nexports.InvalidPDFException = pdfjsSharedUtil.InvalidPDFException;\nexports.MissingPDFException = pdfjsSharedUtil.MissingPDFException;\nexports.SVGGraphics = pdfjsDisplaySVG.SVGGraphics;\nexports.NativeImageDecoding = pdfjsSharedUtil.NativeImageDecoding;\nexports.UnexpectedResponseException =\n pdfjsSharedUtil.UnexpectedResponseException;\nexports.OPS = pdfjsSharedUtil.OPS;\nexports.UNSUPPORTED_FEATURES = pdfjsSharedUtil.UNSUPPORTED_FEATURES;\nexports.isValidUrl = pdfjsDisplayDOMUtils.isValidUrl;\nexports.createValidAbsoluteUrl = pdfjsSharedUtil.createValidAbsoluteUrl;\nexports.createObjectURL = pdfjsSharedUtil.createObjectURL;\nexports.removeNullCharacters = pdfjsSharedUtil.removeNullCharacters;\nexports.shadow = pdfjsSharedUtil.shadow;\nexports.createBlob = pdfjsSharedUtil.createBlob;\nexports.RenderingCancelledException =\n pdfjsDisplayDOMUtils.RenderingCancelledException;\nexports.getFilenameFromUrl = pdfjsDisplayDOMUtils.getFilenameFromUrl;\nexports.addLinkAttributes = pdfjsDisplayDOMUtils.addLinkAttributes;\nexports.StatTimer = pdfjsSharedUtil.StatTimer;\n\n\n\n// WEBPACK FOOTER //\n// src/pdf.js","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint-disable no-extend-native */\n/* globals VBArray, PDFJS, global */\n\n// Skip compatibility checks for the extensions and if we already ran\n// this module.\nif ((typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) &&\n (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked)) {\n\nvar globalScope = require('./global_scope');\n\nvar userAgent = (typeof navigator !== 'undefined' && navigator.userAgent) || '';\nvar isAndroid = /Android/.test(userAgent);\nvar isAndroidPre3 = /Android\\s[0-2][^\\d]/.test(userAgent);\nvar isAndroidPre5 = /Android\\s[0-4][^\\d]/.test(userAgent);\nvar isChrome = userAgent.indexOf('Chrom') >= 0;\nvar isChromeWithRangeBug = /Chrome\\/(39|40)\\./.test(userAgent);\nvar isIOSChrome = userAgent.indexOf('CriOS') >= 0;\nvar isIE = userAgent.indexOf('Trident') >= 0;\nvar isIOS = /\\b(iPad|iPhone|iPod)(?=;)/.test(userAgent);\nvar isOpera = userAgent.indexOf('Opera') >= 0;\nvar isSafari = /Safari\\//.test(userAgent) &&\n !/(Chrome\\/|Android\\s)/.test(userAgent);\n\nvar hasDOM = typeof window === 'object' && typeof document === 'object';\n\n// Initializing PDFJS global object here, it case if we need to change/disable\n// some PDF.js features, e.g. range requests\nif (typeof PDFJS === 'undefined') {\n globalScope.PDFJS = {};\n}\n\nPDFJS.compatibilityChecked = true;\n\n// Checking if the typed arrays are supported\n// Support: iOS<6.0 (subarray), IE<10, Android<4.0\n(function checkTypedArrayCompatibility() {\n if (typeof Uint8ClampedArray === 'undefined') {\n // Support: IE<11\n globalScope.Uint8ClampedArray =\n require('core-js/fn/typed/uint8-clamped-array');\n }\n\n if (typeof Uint8Array !== 'undefined') {\n // Support: iOS<6.0\n if (typeof Uint8Array.prototype.subarray === 'undefined') {\n Uint8Array.prototype.subarray = function subarray(start, end) {\n return new Uint8Array(this.slice(start, end));\n };\n Float32Array.prototype.subarray = function subarray(start, end) {\n return new Float32Array(this.slice(start, end));\n };\n }\n\n // Support: Android<4.1\n if (typeof Float64Array === 'undefined') {\n globalScope.Float64Array = Float32Array;\n }\n return;\n }\n\n function subarray(start, end) {\n return new TypedArray(this.slice(start, end));\n }\n\n function setArrayOffset(array, offset) {\n if (arguments.length < 2) {\n offset = 0;\n }\n for (var i = 0, n = array.length; i < n; ++i, ++offset) {\n this[offset] = array[i] & 0xFF;\n }\n }\n\n function Uint32ArrayView(buffer, length) {\n this.buffer = buffer;\n this.byteLength = buffer.length;\n this.length = length;\n ensureUint32ArrayViewProps(this.length);\n }\n Uint32ArrayView.prototype = Object.create(null);\n\n var uint32ArrayViewSetters = 0;\n function createUint32ArrayProp(index) {\n return {\n get() {\n var buffer = this.buffer, offset = index << 2;\n return (buffer[offset] | (buffer[offset + 1] << 8) |\n (buffer[offset + 2] << 16) | (buffer[offset + 3] << 24)) >>> 0;\n },\n set(value) {\n var buffer = this.buffer, offset = index << 2;\n buffer[offset] = value & 255;\n buffer[offset + 1] = (value >> 8) & 255;\n buffer[offset + 2] = (value >> 16) & 255;\n buffer[offset + 3] = (value >>> 24) & 255;\n },\n };\n }\n\n function ensureUint32ArrayViewProps(length) {\n while (uint32ArrayViewSetters < length) {\n Object.defineProperty(Uint32ArrayView.prototype,\n uint32ArrayViewSetters,\n createUint32ArrayProp(uint32ArrayViewSetters));\n uint32ArrayViewSetters++;\n }\n }\n\n function TypedArray(arg1) {\n var result, i, n;\n if (typeof arg1 === 'number') {\n result = [];\n for (i = 0; i < arg1; ++i) {\n result[i] = 0;\n }\n } else if ('slice' in arg1) {\n result = arg1.slice(0);\n } else {\n result = [];\n for (i = 0, n = arg1.length; i < n; ++i) {\n result[i] = arg1[i];\n }\n }\n\n result.subarray = subarray;\n result.buffer = result;\n result.byteLength = result.length;\n result.set = setArrayOffset;\n\n if (typeof arg1 === 'object' && arg1.buffer) {\n result.buffer = arg1.buffer;\n }\n return result;\n }\n\n globalScope.Uint8Array = TypedArray;\n globalScope.Int8Array = TypedArray;\n\n // we don't need support for set, byteLength for 32-bit array\n // so we can use the TypedArray as well\n globalScope.Int32Array = TypedArray;\n globalScope.Uint16Array = TypedArray;\n globalScope.Float32Array = TypedArray;\n globalScope.Float64Array = TypedArray;\n\n globalScope.Uint32Array = function () {\n if (arguments.length === 3) {\n // Building view for buffer, offset, and length\n if (arguments[1] !== 0) {\n throw new Error('offset !== 0 is not supported');\n }\n return new Uint32ArrayView(arguments[0], arguments[2]);\n }\n return TypedArray.apply(this, arguments);\n };\n})();\n\n// window.CanvasPixelArray.buffer/.byteLength\n// Support: IE9\n(function canvasPixelArrayBuffer() {\n if (!hasDOM || !window.CanvasPixelArray) {\n return;\n }\n var cpaProto = window.CanvasPixelArray.prototype;\n if ('buffer' in cpaProto) {\n return;\n }\n // Trying to fake CanvasPixelArray as Uint8ClampedArray.\n Object.defineProperty(cpaProto, 'buffer', {\n get() {\n return this;\n },\n enumerable: false,\n configurable: true,\n });\n Object.defineProperty(cpaProto, 'byteLength', {\n get() {\n return this.length;\n },\n enumerable: false,\n configurable: true,\n });\n})();\n\n// URL = URL || webkitURL\n// Support: Safari<7, Android 4.2+\n(function normalizeURLObject() {\n if (!globalScope.URL) {\n globalScope.URL = globalScope.webkitURL;\n }\n})();\n\n// Object.defineProperty()?\n// Support: Android<4.0, Safari<5.1\n(function checkObjectDefinePropertyCompatibility() {\n if (typeof Object.defineProperty !== 'undefined') {\n var definePropertyPossible = true;\n try {\n if (hasDOM) {\n // some browsers (e.g. safari) cannot use defineProperty() on DOM\n // objects and thus the native version is not sufficient\n Object.defineProperty(new Image(), 'id', { value: 'test', });\n }\n // ... another test for android gb browser for non-DOM objects\n var Test = function Test() {};\n Test.prototype = { get id() { }, };\n Object.defineProperty(new Test(), 'id',\n { value: '', configurable: true, enumerable: true, writable: false, });\n } catch (e) {\n definePropertyPossible = false;\n }\n if (definePropertyPossible) {\n return;\n }\n }\n\n Object.defineProperty = function objectDefineProperty(obj, name, def) {\n delete obj[name];\n if ('get' in def) {\n obj.__defineGetter__(name, def['get']);\n }\n if ('set' in def) {\n obj.__defineSetter__(name, def['set']);\n }\n if ('value' in def) {\n obj.__defineSetter__(name, function objectDefinePropertySetter(value) {\n this.__defineGetter__(name, function objectDefinePropertyGetter() {\n return value;\n });\n return value;\n });\n obj[name] = def.value;\n }\n };\n})();\n\n\n// No XMLHttpRequest#response?\n// Support: IE<11, Android <4.0\n(function checkXMLHttpRequestResponseCompatibility() {\n if (typeof XMLHttpRequest === 'undefined') {\n return;\n }\n var xhrPrototype = XMLHttpRequest.prototype;\n var xhr = new XMLHttpRequest();\n if (!('overrideMimeType' in xhr)) {\n // IE10 might have response, but not overrideMimeType\n // Support: IE10\n Object.defineProperty(xhrPrototype, 'overrideMimeType', {\n value: function xmlHttpRequestOverrideMimeType(mimeType) {},\n });\n }\n if ('responseType' in xhr) {\n return;\n }\n\n Object.defineProperty(xhrPrototype, 'responseType', {\n get: function xmlHttpRequestGetResponseType() {\n return this._responseType || 'text';\n },\n set: function xmlHttpRequestSetResponseType(value) {\n if (value === 'text' || value === 'arraybuffer') {\n this._responseType = value;\n if (value === 'arraybuffer' &&\n typeof this.overrideMimeType === 'function') {\n this.overrideMimeType('text/plain; charset=x-user-defined');\n }\n }\n },\n });\n\n // Support: IE9\n if (typeof VBArray !== 'undefined') {\n Object.defineProperty(xhrPrototype, 'response', {\n get: function xmlHttpRequestResponseGet() {\n if (this.responseType === 'arraybuffer') {\n return new Uint8Array(new VBArray(this.responseBody).toArray());\n }\n return this.responseText;\n },\n });\n return;\n }\n\n Object.defineProperty(xhrPrototype, 'response', {\n get: function xmlHttpRequestResponseGet() {\n if (this.responseType !== 'arraybuffer') {\n return this.responseText;\n }\n var text = this.responseText;\n var i, n = text.length;\n var result = new Uint8Array(n);\n for (i = 0; i < n; ++i) {\n result[i] = text.charCodeAt(i) & 0xFF;\n }\n return result.buffer;\n },\n });\n})();\n\n// window.btoa (base64 encode function) ?\n// Support: IE<10\n(function checkWindowBtoaCompatibility() {\n if ('btoa' in globalScope) {\n return;\n }\n\n var digits =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n globalScope.btoa = function (chars) {\n var buffer = '';\n var i, n;\n for (i = 0, n = chars.length; i < n; i += 3) {\n var b1 = chars.charCodeAt(i) & 0xFF;\n var b2 = chars.charCodeAt(i + 1) & 0xFF;\n var b3 = chars.charCodeAt(i + 2) & 0xFF;\n var d1 = b1 >> 2, d2 = ((b1 & 3) << 4) | (b2 >> 4);\n var d3 = i + 1 < n ? ((b2 & 0xF) << 2) | (b3 >> 6) : 64;\n var d4 = i + 2 < n ? (b3 & 0x3F) : 64;\n buffer += (digits.charAt(d1) + digits.charAt(d2) +\n digits.charAt(d3) + digits.charAt(d4));\n }\n return buffer;\n };\n})();\n\n// window.atob (base64 encode function)?\n// Support: IE<10\n(function checkWindowAtobCompatibility() {\n if ('atob' in globalScope) {\n return;\n }\n\n // https://github.com/davidchambers/Base64.js\n var digits =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n globalScope.atob = function (input) {\n input = input.replace(/=+$/, '');\n if (input.length % 4 === 1) {\n throw new Error('bad atob input');\n }\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = '';\n // get next character\n (buffer = input.charAt(idx++));\n // character found in table?\n // initialize bit storage and add its ascii value\n ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = digits.indexOf(buffer);\n }\n return output;\n };\n})();\n\n// Function.prototype.bind?\n// Support: Android<4.0, iOS<6.0\n(function checkFunctionPrototypeBindCompatibility() {\n if (typeof Function.prototype.bind !== 'undefined') {\n return;\n }\n\n Function.prototype.bind = function functionPrototypeBind(obj) {\n var fn = this, headArgs = Array.prototype.slice.call(arguments, 1);\n var bound = function functionPrototypeBindBound() {\n var args = headArgs.concat(Array.prototype.slice.call(arguments));\n return fn.apply(obj, args);\n };\n return bound;\n };\n})();\n\n// HTMLElement dataset property\n// Support: IE<11, Safari<5.1, Android<4.0\n(function checkDatasetProperty() {\n if (!hasDOM) {\n return;\n }\n var div = document.createElement('div');\n if ('dataset' in div) {\n return; // dataset property exists\n }\n\n Object.defineProperty(HTMLElement.prototype, 'dataset', {\n get() {\n if (this._dataset) {\n return this._dataset;\n }\n\n var dataset = {};\n for (var j = 0, jj = this.attributes.length; j < jj; j++) {\n var attribute = this.attributes[j];\n if (attribute.name.substring(0, 5) !== 'data-') {\n continue;\n }\n var key = attribute.name.substring(5).replace(/\\-([a-z])/g,\n function(all, ch) {\n return ch.toUpperCase();\n });\n dataset[key] = attribute.value;\n }\n\n Object.defineProperty(this, '_dataset', {\n value: dataset,\n writable: false,\n enumerable: false,\n });\n return dataset;\n },\n enumerable: true,\n });\n})();\n\n// HTMLElement classList property\n// Support: IE<10, Android<4.0, iOS<5.0\n(function checkClassListProperty() {\n function changeList(element, itemName, add, remove) {\n var s = element.className || '';\n var list = s.split(/\\s+/g);\n if (list[0] === '') {\n list.shift();\n }\n var index = list.indexOf(itemName);\n if (index < 0 && add) {\n list.push(itemName);\n }\n if (index >= 0 && remove) {\n list.splice(index, 1);\n }\n element.className = list.join(' ');\n return (index >= 0);\n }\n\n if (!hasDOM) {\n return;\n }\n\n var div = document.createElement('div');\n if ('classList' in div) {\n return; // classList property exists\n }\n\n var classListPrototype = {\n add(name) {\n changeList(this.element, name, true, false);\n },\n contains(name) {\n return changeList(this.element, name, false, false);\n },\n remove(name) {\n changeList(this.element, name, false, true);\n },\n toggle(name) {\n changeList(this.element, name, true, true);\n },\n };\n\n Object.defineProperty(HTMLElement.prototype, 'classList', {\n get() {\n if (this._classList) {\n return this._classList;\n }\n\n var classList = Object.create(classListPrototype, {\n element: {\n value: this,\n writable: false,\n enumerable: true,\n },\n });\n Object.defineProperty(this, '_classList', {\n value: classList,\n writable: false,\n enumerable: false,\n });\n return classList;\n },\n enumerable: true,\n });\n})();\n\n// Checking if worker has console support. Forwarding all messages to the main\n// thread if console object is absent.\n(function checkWorkerConsoleCompatibility() {\n if (typeof importScripts === 'undefined' || 'console' in globalScope) {\n return;\n }\n\n var consoleTimer = {};\n\n var workerConsole = {\n log: function log() {\n var args = Array.prototype.slice.call(arguments);\n globalScope.postMessage({\n targetName: 'main',\n action: 'console_log',\n data: args,\n });\n },\n\n error: function error() {\n var args = Array.prototype.slice.call(arguments);\n globalScope.postMessage({\n targetName: 'main',\n action: 'console_error',\n data: args,\n });\n },\n\n time: function time(name) {\n consoleTimer[name] = Date.now();\n },\n\n timeEnd: function timeEnd(name) {\n var time = consoleTimer[name];\n if (!time) {\n throw new Error('Unknown timer name ' + name);\n }\n this.log('Timer:', name, Date.now() - time);\n },\n };\n\n globalScope.console = workerConsole;\n})();\n\n// Check console compatibility\n// In older IE versions the console object is not available\n// unless console is open.\n// Support: IE<10\n(function checkConsoleCompatibility() {\n if (!hasDOM) {\n return;\n }\n if (!('console' in window)) {\n window.console = {\n log() {},\n error() {},\n warn() {},\n };\n return;\n }\n if (!('bind' in console.log)) {\n // native functions in IE9 might not have bind\n console.log = (function(fn) {\n return function(msg) {\n return fn(msg);\n };\n })(console.log);\n console.error = (function(fn) {\n return function(msg) {\n return fn(msg);\n };\n })(console.error);\n console.warn = (function(fn) {\n return function(msg) {\n return fn(msg);\n };\n })(console.warn);\n return;\n }\n})();\n\n// Check onclick compatibility in Opera\n// Support: Opera<15\n(function checkOnClickCompatibility() {\n // workaround for reported Opera bug DSK-354448:\n // onclick fires on disabled buttons with opaque content\n function ignoreIfTargetDisabled(event) {\n if (isDisabled(event.target)) {\n event.stopPropagation();\n }\n }\n function isDisabled(node) {\n return node.disabled || (node.parentNode && isDisabled(node.parentNode));\n }\n if (isOpera) {\n // use browser detection since we cannot feature-check this bug\n document.addEventListener('click', ignoreIfTargetDisabled, true);\n }\n})();\n\n// Checks if possible to use URL.createObjectURL()\n// Support: IE, Chrome on iOS\n(function checkOnBlobSupport() {\n // sometimes IE and Chrome on iOS loosing the data created with\n // createObjectURL(), see #3977 and #8081\n if (isIE || isIOSChrome) {\n PDFJS.disableCreateObjectURL = true;\n }\n})();\n\n// Checks if navigator.language is supported\n(function checkNavigatorLanguage() {\n if (typeof navigator === 'undefined') {\n return;\n }\n if ('language' in navigator) {\n return;\n }\n PDFJS.locale = navigator.userLanguage || 'en-US';\n})();\n\n// Support: Safari 6.0+, Android<3.0, Chrome 39/40, iOS\n(function checkRangeRequests() {\n // Safari has issues with cached range requests see:\n // https://github.com/mozilla/pdf.js/issues/3260\n // Last tested with version 6.0.4.\n\n // Older versions of Android (pre 3.0) has issues with range requests, see:\n // https://github.com/mozilla/pdf.js/issues/3381.\n // Make sure that we only match webkit-based Android browsers,\n // since Firefox/Fennec works as expected.\n\n // Range requests are broken in Chrome 39 and 40, https://crbug.com/442318\n if (isSafari || isAndroidPre3 || isChromeWithRangeBug || isIOS) {\n PDFJS.disableRange = true;\n PDFJS.disableStream = true;\n }\n})();\n\n// Check if the browser supports manipulation of the history.\n// Support: IE<10, Android<4.2\n(function checkHistoryManipulation() {\n if (!hasDOM) {\n return;\n }\n // Android 2.x has so buggy pushState support that it was removed in\n // Android 3.0 and restored as late as in Android 4.2.\n // Support: Android 2.x\n if (!history.pushState || isAndroidPre3) {\n PDFJS.disableHistory = true;\n }\n})();\n\n// Support: IE<11, Chrome<21, Android<4.4, Safari<6\n(function checkSetPresenceInImageData() {\n if (!hasDOM) {\n return;\n }\n // IE < 11 will use window.CanvasPixelArray which lacks set function.\n if (window.CanvasPixelArray) {\n if (typeof window.CanvasPixelArray.prototype.set !== 'function') {\n window.CanvasPixelArray.prototype.set = function(arr) {\n for (var i = 0, ii = this.length; i < ii; i++) {\n this[i] = arr[i];\n }\n };\n }\n } else {\n // Old Chrome and Android use an inaccessible CanvasPixelArray prototype.\n // Because we cannot feature detect it, we rely on user agent parsing.\n var polyfill = false, versionMatch;\n if (isChrome) {\n versionMatch = userAgent.match(/Chrom(e|ium)\\/([0-9]+)\\./);\n // Chrome < 21 lacks the set function.\n polyfill = versionMatch && parseInt(versionMatch[2]) < 21;\n } else if (isAndroid) {\n // Android < 4.4 lacks the set function.\n // Android >= 4.4 will contain Chrome in the user agent,\n // thus pass the Chrome check above and not reach this block.\n polyfill = isAndroidPre5;\n } else if (isSafari) {\n versionMatch = userAgent.\n match(/Version\\/([0-9]+)\\.([0-9]+)\\.([0-9]+) Safari\\//);\n // Safari < 6 lacks the set function.\n polyfill = versionMatch && parseInt(versionMatch[1]) < 6;\n }\n\n if (polyfill) {\n var contextPrototype = window.CanvasRenderingContext2D.prototype;\n var createImageData = contextPrototype.createImageData;\n contextPrototype.createImageData = function(w, h) {\n var imageData = createImageData.call(this, w, h);\n imageData.data.set = function(arr) {\n for (var i = 0, ii = this.length; i < ii; i++) {\n this[i] = arr[i];\n }\n };\n return imageData;\n };\n // this closure will be kept referenced, so clear its vars\n contextPrototype = null;\n }\n }\n})();\n\n// Support: IE<10, Android<4.0, iOS\n(function checkRequestAnimationFrame() {\n function installFakeAnimationFrameFunctions() {\n window.requestAnimationFrame = function (callback) {\n return window.setTimeout(callback, 20);\n };\n window.cancelAnimationFrame = function (timeoutID) {\n window.clearTimeout(timeoutID);\n };\n }\n\n if (!hasDOM) {\n return;\n }\n if (isIOS) {\n // requestAnimationFrame on iOS is broken, replacing with fake one.\n installFakeAnimationFrameFunctions();\n return;\n }\n if ('requestAnimationFrame' in window) {\n return;\n }\n window.requestAnimationFrame = window.mozRequestAnimationFrame ||\n window.webkitRequestAnimationFrame;\n if (window.requestAnimationFrame) {\n return;\n }\n installFakeAnimationFrameFunctions();\n})();\n\n// Support: Android, iOS\n(function checkCanvasSizeLimitation() {\n if (isIOS || isAndroid) {\n // 5MP\n PDFJS.maxCanvasPixels = 5242880;\n }\n})();\n\n// Disable fullscreen support for certain problematic configurations.\n// Support: IE11+ (when embedded).\n(function checkFullscreenSupport() {\n if (!hasDOM) {\n return;\n }\n if (isIE && window.parent !== window) {\n PDFJS.disableFullscreen = true;\n }\n})();\n\n// Provides document.currentScript support\n// Support: IE, Chrome<29.\n(function checkCurrentScript() {\n if (!hasDOM) {\n return;\n }\n if ('currentScript' in document) {\n return;\n }\n Object.defineProperty(document, 'currentScript', {\n get() {\n var scripts = document.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n },\n enumerable: true,\n configurable: true,\n });\n})();\n\n// Provides `input.type = 'type'` runtime failure protection.\n// Support: IE9,10.\n(function checkInputTypeNumberAssign() {\n if (!hasDOM) {\n return;\n }\n var el = document.createElement('input');\n try {\n el.type = 'number';\n } catch (ex) {\n var inputProto = el.constructor.prototype;\n var typeProperty = Object.getOwnPropertyDescriptor(inputProto, 'type');\n Object.defineProperty(inputProto, 'type', {\n get() {\n return typeProperty.get.call(this);\n },\n set(value) {\n typeProperty.set.call(this, value === 'number' ? 'text' : value);\n },\n enumerable: true,\n configurable: true,\n });\n }\n})();\n\n// Provides correct document.readyState value for legacy browsers.\n// Support: IE9,10.\n(function checkDocumentReadyState() {\n if (!hasDOM) {\n return;\n }\n if (!document.attachEvent) {\n return;\n }\n var documentProto = document.constructor.prototype;\n var readyStateProto = Object.getOwnPropertyDescriptor(documentProto,\n 'readyState');\n Object.defineProperty(documentProto, 'readyState', {\n get() {\n var value = readyStateProto.get.call(this);\n return value === 'interactive' ? 'loading' : value;\n },\n set(value) {\n readyStateProto.set.call(this, value);\n },\n enumerable: true,\n configurable: true,\n });\n})();\n\n// Provides support for ChildNode.remove in legacy browsers.\n// Support: IE.\n(function checkChildNodeRemove() {\n if (!hasDOM) {\n return;\n }\n if (typeof Element.prototype.remove !== 'undefined') {\n return;\n }\n Element.prototype.remove = function () {\n if (this.parentNode) {\n this.parentNode.removeChild(this);\n }\n };\n})();\n\n// Provides support for Number.isNaN in legacy browsers.\n// Support: IE.\n(function checkNumberIsNaN() {\n if (Number.isNaN) {\n return;\n }\n Number.isNaN = require('core-js/fn/number/is-nan');\n})();\n\n// Provides support for Number.isInteger in legacy browsers.\n// Support: IE.\n(function checkNumberIsInteger() {\n if (Number.isInteger) {\n return;\n }\n Number.isInteger = require('core-js/fn/number/is-integer');\n})();\n\n(function checkPromise() {\n if (globalScope.Promise) {\n return;\n }\n globalScope.Promise = require('core-js/fn/promise');\n})();\n\n(function checkWeakMap() {\n if (globalScope.WeakMap) {\n return;\n }\n globalScope.WeakMap = require('core-js/fn/weak-map');\n})();\n\n// Polyfill from https://github.com/Polymer/URL\n/* Any copyright is dedicated to the Public Domain.\n * http://creativecommons.org/publicdomain/zero/1.0/ */\n(function checkURLConstructor() {\n // feature detect for URL constructor\n var hasWorkingUrl = false;\n try {\n if (typeof URL === 'function' &&\n typeof URL.prototype === 'object' &&\n ('origin' in URL.prototype)) {\n var u = new URL('b', 'http://a');\n u.pathname = 'c%20d';\n hasWorkingUrl = u.href === 'http://a/c%20d';\n }\n } catch (e) { }\n\n if (hasWorkingUrl) {\n return;\n }\n\n var relative = Object.create(null);\n relative['ftp'] = 21;\n relative['file'] = 0;\n relative['gopher'] = 70;\n relative['http'] = 80;\n relative['https'] = 443;\n relative['ws'] = 80;\n relative['wss'] = 443;\n\n var relativePathDotMapping = Object.create(null);\n relativePathDotMapping['%2e'] = '.';\n relativePathDotMapping['.%2e'] = '..';\n relativePathDotMapping['%2e.'] = '..';\n relativePathDotMapping['%2e%2e'] = '..';\n\n function isRelativeScheme(scheme) {\n return relative[scheme] !== undefined;\n }\n\n function invalid() {\n clear.call(this);\n this._isInvalid = true;\n }\n\n function IDNAToASCII(h) {\n if (h === '') {\n invalid.call(this);\n }\n // XXX\n return h.toLowerCase();\n }\n\n function percentEscape(c) {\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ? `\n [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) === -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n function percentEscapeQuery(c) {\n // XXX This actually needs to encode c using encoding and then\n // convert the bytes one-by-one.\n\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ` (do not escape '?')\n [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) === -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n var EOF, ALPHA = /[a-zA-Z]/,\n ALPHANUMERIC = /[a-zA-Z0-9\\+\\-\\.]/;\n\n function parse(input, stateOverride, base) {\n function err(message) {\n errors.push(message);\n }\n\n var state = stateOverride || 'scheme start',\n cursor = 0,\n buffer = '',\n seenAt = false,\n seenBracket = false,\n errors = [];\n\n loop: while ((input[cursor - 1] !== EOF || cursor === 0) &&\n !this._isInvalid) {\n var c = input[cursor];\n switch (state) {\n case 'scheme start':\n if (c && ALPHA.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n state = 'scheme';\n } else if (!stateOverride) {\n buffer = '';\n state = 'no scheme';\n continue;\n } else {\n err('Invalid scheme.');\n break loop;\n }\n break;\n\n case 'scheme':\n if (c && ALPHANUMERIC.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n } else if (c === ':') {\n this._scheme = buffer;\n buffer = '';\n if (stateOverride) {\n break loop;\n }\n if (isRelativeScheme(this._scheme)) {\n this._isRelative = true;\n }\n if (this._scheme === 'file') {\n state = 'relative';\n } else if (this._isRelative && base &&\n base._scheme === this._scheme) {\n state = 'relative or authority';\n } else if (this._isRelative) {\n state = 'authority first slash';\n } else {\n state = 'scheme data';\n }\n } else if (!stateOverride) {\n buffer = '';\n cursor = 0;\n state = 'no scheme';\n continue;\n } else if (c === EOF) {\n break loop;\n } else {\n err('Code point not allowed in scheme: ' + c);\n break loop;\n }\n break;\n\n case 'scheme data':\n if (c === '?') {\n this._query = '?';\n state = 'query';\n } else if (c === '#') {\n this._fragment = '#';\n state = 'fragment';\n } else {\n // XXX error handling\n if (c !== EOF && c !== '\\t' && c !== '\\n' && c !== '\\r') {\n this._schemeData += percentEscape(c);\n }\n }\n break;\n\n case 'no scheme':\n if (!base || !(isRelativeScheme(base._scheme))) {\n err('Missing scheme.');\n invalid.call(this);\n } else {\n state = 'relative';\n continue;\n }\n break;\n\n case 'relative or authority':\n if (c === '/' && input[cursor + 1] === '/') {\n state = 'authority ignore slashes';\n } else {\n err('Expected /, got: ' + c);\n state = 'relative';\n continue;\n }\n break;\n\n case 'relative':\n this._isRelative = true;\n if (this._scheme !== 'file') {\n this._scheme = base._scheme;\n }\n if (c === EOF) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n this._username = base._username;\n this._password = base._password;\n break loop;\n } else if (c === '/' || c === '\\\\') {\n if (c === '\\\\') {\n err('\\\\ is an invalid code point.');\n }\n state = 'relative slash';\n } else if (c === '?') {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = '?';\n this._username = base._username;\n this._password = base._password;\n state = 'query';\n } else if (c === '#') {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n this._fragment = '#';\n this._username = base._username;\n this._password = base._password;\n state = 'fragment';\n } else {\n var nextC = input[cursor + 1];\n var nextNextC = input[cursor + 2];\n if (this._scheme !== 'file' || !ALPHA.test(c) ||\n (nextC !== ':' && nextC !== '|') ||\n (nextNextC !== EOF && nextNextC !== '/' && nextNextC !== '\\\\' &&\n nextNextC !== '?' && nextNextC !== '#')) {\n this._host = base._host;\n this._port = base._port;\n this._username = base._username;\n this._password = base._password;\n this._path = base._path.slice();\n this._path.pop();\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'relative slash':\n if (c === '/' || c === '\\\\') {\n if (c === '\\\\') {\n err('\\\\ is an invalid code point.');\n }\n if (this._scheme === 'file') {\n state = 'file host';\n } else {\n state = 'authority ignore slashes';\n }\n } else {\n if (this._scheme !== 'file') {\n this._host = base._host;\n this._port = base._port;\n this._username = base._username;\n this._password = base._password;\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'authority first slash':\n if (c === '/') {\n state = 'authority second slash';\n } else {\n err('Expected \\'/\\', got: ' + c);\n state = 'authority ignore slashes';\n continue;\n }\n break;\n\n case 'authority second slash':\n state = 'authority ignore slashes';\n if (c !== '/') {\n err('Expected \\'/\\', got: ' + c);\n continue;\n }\n break;\n\n case 'authority ignore slashes':\n if (c !== '/' && c !== '\\\\') {\n state = 'authority';\n continue;\n } else {\n err('Expected authority, got: ' + c);\n }\n break;\n\n case 'authority':\n if (c === '@') {\n if (seenAt) {\n err('@ already seen.');\n buffer += '%40';\n }\n seenAt = true;\n for (var i = 0; i < buffer.length; i++) {\n var cp = buffer[i];\n if (cp === '\\t' || cp === '\\n' || cp === '\\r') {\n err('Invalid whitespace in authority.');\n continue;\n }\n // XXX check URL code points\n if (cp === ':' && this._password === null) {\n this._password = '';\n continue;\n }\n var tempC = percentEscape(cp);\n if (this._password !== null) {\n this._password += tempC;\n } else {\n this._username += tempC;\n }\n }\n buffer = '';\n } else if (c === EOF || c === '/' || c === '\\\\' ||\n c === '?' || c === '#') {\n cursor -= buffer.length;\n buffer = '';\n state = 'host';\n continue;\n } else {\n buffer += c;\n }\n break;\n\n case 'file host':\n if (c === EOF || c === '/' || c === '\\\\' || c === '?' || c === '#') {\n if (buffer.length === 2 && ALPHA.test(buffer[0]) &&\n (buffer[1] === ':' || buffer[1] === '|')) {\n state = 'relative path';\n } else if (buffer.length === 0) {\n state = 'relative path start';\n } else {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n }\n continue;\n } else if (c === '\\t' || c === '\\n' || c === '\\r') {\n err('Invalid whitespace in file host.');\n } else {\n buffer += c;\n }\n break;\n\n case 'host':\n case 'hostname':\n if (c === ':' && !seenBracket) {\n // XXX host parsing\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'port';\n if (stateOverride === 'hostname') {\n break loop;\n }\n } else if (c === EOF || c === '/' ||\n c === '\\\\' || c === '?' || c === '#') {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n if (stateOverride) {\n break loop;\n }\n continue;\n } else if (c !== '\\t' && c !== '\\n' && c !== '\\r') {\n if (c === '[') {\n seenBracket = true;\n } else if (c === ']') {\n seenBracket = false;\n }\n buffer += c;\n } else {\n err('Invalid code point in host/hostname: ' + c);\n }\n break;\n\n case 'port':\n if (/[0-9]/.test(c)) {\n buffer += c;\n } else if (c === EOF || c === '/' || c === '\\\\' ||\n c === '?' || c === '#' || stateOverride) {\n if (buffer !== '') {\n var temp = parseInt(buffer, 10);\n if (temp !== relative[this._scheme]) {\n this._port = temp + '';\n }\n buffer = '';\n }\n if (stateOverride) {\n break loop;\n }\n state = 'relative path start';\n continue;\n } else if (c === '\\t' || c === '\\n' || c === '\\r') {\n err('Invalid code point in port: ' + c);\n } else {\n invalid.call(this);\n }\n break;\n\n case 'relative path start':\n if (c === '\\\\') {\n err('\\'\\\\\\' not allowed in path.');\n }\n state = 'relative path';\n if (c !== '/' && c !== '\\\\') {\n continue;\n }\n break;\n\n case 'relative path':\n if (c === EOF || c === '/' || c === '\\\\' ||\n (!stateOverride && (c === '?' || c === '#'))) {\n if (c === '\\\\') {\n err('\\\\ not allowed in relative path.');\n }\n var tmp;\n if ((tmp = relativePathDotMapping[buffer.toLowerCase()])) {\n buffer = tmp;\n }\n if (buffer === '..') {\n this._path.pop();\n if (c !== '/' && c !== '\\\\') {\n this._path.push('');\n }\n } else if (buffer === '.' && c !== '/' && c !== '\\\\') {\n this._path.push('');\n } else if (buffer !== '.') {\n if (this._scheme === 'file' && this._path.length === 0 &&\n buffer.length === 2 && ALPHA.test(buffer[0]) &&\n buffer[1] === '|') {\n buffer = buffer[0] + ':';\n }\n this._path.push(buffer);\n }\n buffer = '';\n if (c === '?') {\n this._query = '?';\n state = 'query';\n } else if (c === '#') {\n this._fragment = '#';\n state = 'fragment';\n }\n } else if (c !== '\\t' && c !== '\\n' && c !== '\\r') {\n buffer += percentEscape(c);\n }\n break;\n\n case 'query':\n if (!stateOverride && c === '#') {\n this._fragment = '#';\n state = 'fragment';\n } else if (c !== EOF && c !== '\\t' && c !== '\\n' && c !== '\\r') {\n this._query += percentEscapeQuery(c);\n }\n break;\n\n case 'fragment':\n if (c !== EOF && c !== '\\t' && c !== '\\n' && c !== '\\r') {\n this._fragment += c;\n }\n break;\n }\n\n cursor++;\n }\n }\n\n function clear() {\n this._scheme = '';\n this._schemeData = '';\n this._username = '';\n this._password = null;\n this._host = '';\n this._port = '';\n this._path = [];\n this._query = '';\n this._fragment = '';\n this._isInvalid = false;\n this._isRelative = false;\n }\n\n // Does not process domain names or IP addresses.\n // Does not handle encoding for the query parameter.\n function JURL(url, base /* , encoding */) {\n if (base !== undefined && !(base instanceof JURL)) {\n base = new JURL(String(base));\n }\n\n this._url = url;\n clear.call(this);\n\n var input = url.replace(/^[ \\t\\r\\n\\f]+|[ \\t\\r\\n\\f]+$/g, '');\n // encoding = encoding || 'utf-8'\n\n parse.call(this, input, null, base);\n }\n\n JURL.prototype = {\n toString() {\n return this.href;\n },\n get href() {\n if (this._isInvalid) {\n return this._url;\n }\n var authority = '';\n if (this._username !== '' || this._password !== null) {\n authority = this._username +\n (this._password !== null ? ':' + this._password : '') + '@';\n }\n\n return this.protocol +\n (this._isRelative ? '//' + authority + this.host : '') +\n this.pathname + this._query + this._fragment;\n },\n // The named parameter should be different from the setter's function name.\n // Otherwise Safari 5 will throw an error (see issue 8541)\n set href(value) {\n clear.call(this);\n parse.call(this, value);\n },\n\n get protocol() {\n return this._scheme + ':';\n },\n set protocol(value) {\n if (this._isInvalid) {\n return;\n }\n parse.call(this, value + ':', 'scheme start');\n },\n\n get host() {\n return this._isInvalid ? '' : this._port ?\n this._host + ':' + this._port : this._host;\n },\n set host(value) {\n if (this._isInvalid || !this._isRelative) {\n return;\n }\n parse.call(this, value, 'host');\n },\n\n get hostname() {\n return this._host;\n },\n set hostname(value) {\n if (this._isInvalid || !this._isRelative) {\n return;\n }\n parse.call(this, value, 'hostname');\n },\n\n get port() {\n return this._port;\n },\n set port(value) {\n if (this._isInvalid || !this._isRelative) {\n return;\n }\n parse.call(this, value, 'port');\n },\n\n get pathname() {\n return this._isInvalid ? '' : this._isRelative ?\n '/' + this._path.join('/') : this._schemeData;\n },\n set pathname(value) {\n if (this._isInvalid || !this._isRelative) {\n return;\n }\n this._path = [];\n parse.call(this, value, 'relative path start');\n },\n\n get search() {\n return this._isInvalid || !this._query || this._query === '?' ?\n '' : this._query;\n },\n set search(value) {\n if (this._isInvalid || !this._isRelative) {\n return;\n }\n this._query = '?';\n if (value[0] === '?') {\n value = value.slice(1);\n }\n parse.call(this, value, 'query');\n },\n\n get hash() {\n return this._isInvalid || !this._fragment || this._fragment === '#' ?\n '' : this._fragment;\n },\n set hash(value) {\n if (this._isInvalid) {\n return;\n }\n this._fragment = '#';\n if (value[0] === '#') {\n value = value.slice(1);\n }\n parse.call(this, value, 'fragment');\n },\n\n get origin() {\n var host;\n if (this._isInvalid || !this._scheme) {\n return '';\n }\n // javascript: Gecko returns String(\"\"), WebKit/Blink String(\"null\")\n // Gecko throws error for \"data://\"\n // data: Gecko returns \"\", Blink returns \"data://\", WebKit returns \"null\"\n // Gecko returns String(\"\") for file: mailto:\n // WebKit/Blink returns String(\"SCHEME://\") for file: mailto:\n switch (this._scheme) {\n case 'data':\n case 'file':\n case 'javascript':\n case 'mailto':\n return 'null';\n case 'blob':\n // Special case of blob: -- returns valid origin of _schemeData.\n try {\n return new JURL(this._schemeData).origin || 'null';\n } catch (_) {\n // Invalid _schemeData origin -- ignoring errors.\n }\n return 'null';\n }\n host = this.host;\n if (!host) {\n return '';\n }\n return this._scheme + '://' + host;\n },\n };\n\n // Copy over the static methods\n var OriginalURL = globalScope.URL;\n if (OriginalURL) {\n JURL.createObjectURL = function(blob) {\n // IE extension allows a second optional options argument.\n // http://msdn.microsoft.com/en-us/library/ie/hh772302(v=vs.85).aspx\n return OriginalURL.createObjectURL.apply(OriginalURL, arguments);\n };\n JURL.revokeObjectURL = function(url) {\n OriginalURL.revokeObjectURL(url);\n };\n }\n\n globalScope.URL = JURL;\n})();\n\n}\n\n\n\n// WEBPACK FOOTER //\n// src/shared/compatibility.js","require('../../modules/es6.typed.uint8-clamped-array');\nmodule.exports = require('../../modules/_core').Uint8ClampedArray;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/fn/typed/uint8-clamped-array.js","require('./_typed-array')('Uint8', 1, function (init) {\n return function Uint8ClampedArray(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n}, true);\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es6.typed.uint8-clamped-array.js","'use strict';\nif (require('./_descriptors')) {\n var LIBRARY = require('./_library');\n var global = require('./_global');\n var fails = require('./_fails');\n var $export = require('./_export');\n var $typed = require('./_typed');\n var $buffer = require('./_typed-buffer');\n var ctx = require('./_ctx');\n var anInstance = require('./_an-instance');\n var propertyDesc = require('./_property-desc');\n var hide = require('./_hide');\n var redefineAll = require('./_redefine-all');\n var toInteger = require('./_to-integer');\n var toLength = require('./_to-length');\n var toIndex = require('./_to-index');\n var toAbsoluteIndex = require('./_to-absolute-index');\n var toPrimitive = require('./_to-primitive');\n var has = require('./_has');\n var classof = require('./_classof');\n var isObject = require('./_is-object');\n var toObject = require('./_to-object');\n var isArrayIter = require('./_is-array-iter');\n var create = require('./_object-create');\n var getPrototypeOf = require('./_object-gpo');\n var gOPN = require('./_object-gopn').f;\n var getIterFn = require('./core.get-iterator-method');\n var uid = require('./_uid');\n var wks = require('./_wks');\n var createArrayMethod = require('./_array-methods');\n var createArrayIncludes = require('./_array-includes');\n var speciesConstructor = require('./_species-constructor');\n var ArrayIterators = require('./es6.array.iterator');\n var Iterators = require('./_iterators');\n var $iterDetect = require('./_iter-detect');\n var setSpecies = require('./_set-species');\n var arrayFill = require('./_array-fill');\n var arrayCopyWithin = require('./_array-copy-within');\n var $DP = require('./_object-dp');\n var $GOPD = require('./_object-gopd');\n var dP = $DP.f;\n var gOPD = $GOPD.f;\n var RangeError = global.RangeError;\n var TypeError = global.TypeError;\n var Uint8Array = global.Uint8Array;\n var ARRAY_BUFFER = 'ArrayBuffer';\n var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;\n var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\n var PROTOTYPE = 'prototype';\n var ArrayProto = Array[PROTOTYPE];\n var $ArrayBuffer = $buffer.ArrayBuffer;\n var $DataView = $buffer.DataView;\n var arrayForEach = createArrayMethod(0);\n var arrayFilter = createArrayMethod(2);\n var arraySome = createArrayMethod(3);\n var arrayEvery = createArrayMethod(4);\n var arrayFind = createArrayMethod(5);\n var arrayFindIndex = createArrayMethod(6);\n var arrayIncludes = createArrayIncludes(true);\n var arrayIndexOf = createArrayIncludes(false);\n var arrayValues = ArrayIterators.values;\n var arrayKeys = ArrayIterators.keys;\n var arrayEntries = ArrayIterators.entries;\n var arrayLastIndexOf = ArrayProto.lastIndexOf;\n var arrayReduce = ArrayProto.reduce;\n var arrayReduceRight = ArrayProto.reduceRight;\n var arrayJoin = ArrayProto.join;\n var arraySort = ArrayProto.sort;\n var arraySlice = ArrayProto.slice;\n var arrayToString = ArrayProto.toString;\n var arrayToLocaleString = ArrayProto.toLocaleString;\n var ITERATOR = wks('iterator');\n var TAG = wks('toStringTag');\n var TYPED_CONSTRUCTOR = uid('typed_constructor');\n var DEF_CONSTRUCTOR = uid('def_constructor');\n var ALL_CONSTRUCTORS = $typed.CONSTR;\n var TYPED_ARRAY = $typed.TYPED;\n var VIEW = $typed.VIEW;\n var WRONG_LENGTH = 'Wrong length!';\n\n var $map = createArrayMethod(1, function (O, length) {\n return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);\n });\n\n var LITTLE_ENDIAN = fails(function () {\n // eslint-disable-next-line no-undef\n return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;\n });\n\n var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {\n new Uint8Array(1).set({});\n });\n\n var toOffset = function (it, BYTES) {\n var offset = toInteger(it);\n if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');\n return offset;\n };\n\n var validate = function (it) {\n if (isObject(it) && TYPED_ARRAY in it) return it;\n throw TypeError(it + ' is not a typed array!');\n };\n\n var allocate = function (C, length) {\n if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {\n throw TypeError('It is not a typed array constructor!');\n } return new C(length);\n };\n\n var speciesFromList = function (O, list) {\n return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);\n };\n\n var fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = allocate(C, length);\n while (length > index) result[index] = list[index++];\n return result;\n };\n\n var addGetter = function (it, key, internal) {\n dP(it, key, { get: function () { return this._d[internal]; } });\n };\n\n var $from = function from(source /* , mapfn, thisArg */) {\n var O = toObject(source);\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iterFn = getIterFn(O);\n var i, length, values, result, step, iterator;\n if (iterFn != undefined && !isArrayIter(iterFn)) {\n for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {\n values.push(step.value);\n } O = values;\n }\n if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);\n for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n };\n\n var $of = function of(/* ...items */) {\n var index = 0;\n var length = arguments.length;\n var result = allocate(this, length);\n while (length > index) result[index] = arguments[index++];\n return result;\n };\n\n // iOS Safari 6.x fails here\n var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });\n\n var $toLocaleString = function toLocaleString() {\n return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);\n };\n\n var proto = {\n copyWithin: function copyWithin(target, start /* , end */) {\n return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n },\n every: function every(callbackfn /* , thisArg */) {\n return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars\n return arrayFill.apply(validate(this), arguments);\n },\n filter: function filter(callbackfn /* , thisArg */) {\n return speciesFromList(this, arrayFilter(validate(this), callbackfn,\n arguments.length > 1 ? arguments[1] : undefined));\n },\n find: function find(predicate /* , thisArg */) {\n return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n findIndex: function findIndex(predicate /* , thisArg */) {\n return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n forEach: function forEach(callbackfn /* , thisArg */) {\n arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n indexOf: function indexOf(searchElement /* , fromIndex */) {\n return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n includes: function includes(searchElement /* , fromIndex */) {\n return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n join: function join(separator) { // eslint-disable-line no-unused-vars\n return arrayJoin.apply(validate(this), arguments);\n },\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars\n return arrayLastIndexOf.apply(validate(this), arguments);\n },\n map: function map(mapfn /* , thisArg */) {\n return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduce.apply(validate(this), arguments);\n },\n reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduceRight.apply(validate(this), arguments);\n },\n reverse: function reverse() {\n var that = this;\n var length = validate(that).length;\n var middle = Math.floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n },\n some: function some(callbackfn /* , thisArg */) {\n return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n sort: function sort(comparefn) {\n return arraySort.call(validate(this), comparefn);\n },\n subarray: function subarray(begin, end) {\n var O = validate(this);\n var length = O.length;\n var $begin = toAbsoluteIndex(begin, length);\n return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(\n O.buffer,\n O.byteOffset + $begin * O.BYTES_PER_ELEMENT,\n toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)\n );\n }\n };\n\n var $slice = function slice(start, end) {\n return speciesFromList(this, arraySlice.call(validate(this), start, end));\n };\n\n var $set = function set(arrayLike /* , offset */) {\n validate(this);\n var offset = toOffset(arguments[1], 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError(WRONG_LENGTH);\n while (index < len) this[offset + index] = src[index++];\n };\n\n var $iterators = {\n entries: function entries() {\n return arrayEntries.call(validate(this));\n },\n keys: function keys() {\n return arrayKeys.call(validate(this));\n },\n values: function values() {\n return arrayValues.call(validate(this));\n }\n };\n\n var isTAIndex = function (target, key) {\n return isObject(target)\n && target[TYPED_ARRAY]\n && typeof key != 'symbol'\n && key in target\n && String(+key) == String(key);\n };\n var $getDesc = function getOwnPropertyDescriptor(target, key) {\n return isTAIndex(target, key = toPrimitive(key, true))\n ? propertyDesc(2, target[key])\n : gOPD(target, key);\n };\n var $setDesc = function defineProperty(target, key, desc) {\n if (isTAIndex(target, key = toPrimitive(key, true))\n && isObject(desc)\n && has(desc, 'value')\n && !has(desc, 'get')\n && !has(desc, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !desc.configurable\n && (!has(desc, 'writable') || desc.writable)\n && (!has(desc, 'enumerable') || desc.enumerable)\n ) {\n target[key] = desc.value;\n return target;\n } return dP(target, key, desc);\n };\n\n if (!ALL_CONSTRUCTORS) {\n $GOPD.f = $getDesc;\n $DP.f = $setDesc;\n }\n\n $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {\n getOwnPropertyDescriptor: $getDesc,\n defineProperty: $setDesc\n });\n\n if (fails(function () { arrayToString.call({}); })) {\n arrayToString = arrayToLocaleString = function toString() {\n return arrayJoin.call(this);\n };\n }\n\n var $TypedArrayPrototype$ = redefineAll({}, proto);\n redefineAll($TypedArrayPrototype$, $iterators);\n hide($TypedArrayPrototype$, ITERATOR, $iterators.values);\n redefineAll($TypedArrayPrototype$, {\n slice: $slice,\n set: $set,\n constructor: function () { /* noop */ },\n toString: arrayToString,\n toLocaleString: $toLocaleString\n });\n addGetter($TypedArrayPrototype$, 'buffer', 'b');\n addGetter($TypedArrayPrototype$, 'byteOffset', 'o');\n addGetter($TypedArrayPrototype$, 'byteLength', 'l');\n addGetter($TypedArrayPrototype$, 'length', 'e');\n dP($TypedArrayPrototype$, TAG, {\n get: function () { return this[TYPED_ARRAY]; }\n });\n\n // eslint-disable-next-line max-statements\n module.exports = function (KEY, BYTES, wrapper, CLAMPED) {\n CLAMPED = !!CLAMPED;\n var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + KEY;\n var SETTER = 'set' + KEY;\n var TypedArray = global[NAME];\n var Base = TypedArray || {};\n var TAC = TypedArray && getPrototypeOf(TypedArray);\n var FORCED = !TypedArray || !$typed.ABV;\n var O = {};\n var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];\n var getter = function (that, index) {\n var data = that._d;\n return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);\n };\n var setter = function (that, index, value) {\n var data = that._d;\n if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;\n data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);\n };\n var addElement = function (that, index) {\n dP(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n if (FORCED) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME, '_d');\n var index = 0;\n var offset = 0;\n var buffer, byteLength, length, klass;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new $ArrayBuffer(byteLength);\n } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n buffer = data;\n offset = toOffset($offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - offset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (TYPED_ARRAY in data) {\n return fromList(TypedArray, data);\n } else {\n return $from.call(TypedArray, data);\n }\n hide(that, '_d', {\n b: buffer,\n o: offset,\n l: byteLength,\n e: length,\n v: new $DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);\n hide(TypedArrayPrototype, 'constructor', TypedArray);\n } else if (!fails(function () {\n TypedArray(1);\n }) || !fails(function () {\n new TypedArray(-1); // eslint-disable-line no-new\n }) || !$iterDetect(function (iter) {\n new TypedArray(); // eslint-disable-line no-new\n new TypedArray(null); // eslint-disable-line no-new\n new TypedArray(1.5); // eslint-disable-line no-new\n new TypedArray(iter); // eslint-disable-line no-new\n }, true)) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME);\n var klass;\n // `ws` module bug, temporarily remove validation length for Uint8Array\n // https://github.com/websockets/ws/pull/645\n if (!isObject(data)) return new Base(toIndex(data));\n if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n return $length !== undefined\n ? new Base(data, toOffset($offset, BYTES), $length)\n : $offset !== undefined\n ? new Base(data, toOffset($offset, BYTES))\n : new Base(data);\n }\n if (TYPED_ARRAY in data) return fromList(TypedArray, data);\n return $from.call(TypedArray, data);\n });\n arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {\n if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);\n });\n TypedArray[PROTOTYPE] = TypedArrayPrototype;\n if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;\n }\n var $nativeIterator = TypedArrayPrototype[ITERATOR];\n var CORRECT_ITER_NAME = !!$nativeIterator\n && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);\n var $iterator = $iterators.values;\n hide(TypedArray, TYPED_CONSTRUCTOR, true);\n hide(TypedArrayPrototype, TYPED_ARRAY, NAME);\n hide(TypedArrayPrototype, VIEW, true);\n hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);\n\n if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {\n dP(TypedArrayPrototype, TAG, {\n get: function () { return NAME; }\n });\n }\n\n O[NAME] = TypedArray;\n\n $export($export.G + $export.W + $export.F * (TypedArray != Base), O);\n\n $export($export.S, NAME, {\n BYTES_PER_ELEMENT: BYTES\n });\n\n $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {\n from: $from,\n of: $of\n });\n\n if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);\n\n $export($export.P, NAME, proto);\n\n setSpecies(NAME);\n\n $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });\n\n $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);\n\n if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;\n\n $export($export.P + $export.F * fails(function () {\n new TypedArray(1).slice();\n }), NAME, { slice: $slice });\n\n $export($export.P + $export.F * (fails(function () {\n return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();\n }) || !fails(function () {\n TypedArrayPrototype.toLocaleString.call([1, 2]);\n })), NAME, { toLocaleString: $toLocaleString });\n\n Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;\n if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);\n };\n} else module.exports = function () { /* empty */ };\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_typed-array.js","'use strict';\nvar global = require('./_global');\nvar DESCRIPTORS = require('./_descriptors');\nvar LIBRARY = require('./_library');\nvar $typed = require('./_typed');\nvar hide = require('./_hide');\nvar redefineAll = require('./_redefine-all');\nvar fails = require('./_fails');\nvar anInstance = require('./_an-instance');\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nvar toIndex = require('./_to-index');\nvar gOPN = require('./_object-gopn').f;\nvar dP = require('./_object-dp').f;\nvar arrayFill = require('./_array-fill');\nvar setToStringTag = require('./_set-to-string-tag');\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length!';\nvar WRONG_INDEX = 'Wrong index!';\nvar $ArrayBuffer = global[ARRAY_BUFFER];\nvar $DataView = global[DATA_VIEW];\nvar Math = global.Math;\nvar RangeError = global.RangeError;\n// eslint-disable-next-line no-shadow-restricted-names\nvar Infinity = global.Infinity;\nvar BaseBuffer = $ArrayBuffer;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\nvar BUFFER = 'buffer';\nvar BYTE_LENGTH = 'byteLength';\nvar BYTE_OFFSET = 'byteOffset';\nvar $BUFFER = DESCRIPTORS ? '_b' : BUFFER;\nvar $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;\nvar $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;\n\n// IEEE754 conversions based on https://github.com/feross/ieee754\nfunction packIEEE754(value, mLen, nBytes) {\n var buffer = new Array(nBytes);\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var i = 0;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n var e, m, c;\n value = abs(value);\n // eslint-disable-next-line no-self-compare\n if (value != value || value === Infinity) {\n // eslint-disable-next-line no-self-compare\n m = value != value ? 1 : 0;\n e = eMax;\n } else {\n e = floor(log(value) / LN2);\n if (value * (c = pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * pow(2, eBias - 1) * pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);\n buffer[--i] |= s * 128;\n return buffer;\n}\nfunction unpackIEEE754(buffer, mLen, nBytes) {\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = eLen - 7;\n var i = nBytes - 1;\n var s = buffer[i--];\n var e = s & 127;\n var m;\n s >>= 7;\n for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : s ? -Infinity : Infinity;\n } else {\n m = m + pow(2, mLen);\n e = e - eBias;\n } return (s ? -1 : 1) * m * pow(2, e - mLen);\n}\n\nfunction unpackI32(bytes) {\n return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];\n}\nfunction packI8(it) {\n return [it & 0xff];\n}\nfunction packI16(it) {\n return [it & 0xff, it >> 8 & 0xff];\n}\nfunction packI32(it) {\n return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];\n}\nfunction packF64(it) {\n return packIEEE754(it, 52, 8);\n}\nfunction packF32(it) {\n return packIEEE754(it, 23, 4);\n}\n\nfunction addGetter(C, key, internal) {\n dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });\n}\n\nfunction get(view, bytes, index, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = store.slice(start, start + bytes);\n return isLittleEndian ? pack : pack.reverse();\n}\nfunction set(view, bytes, index, conversion, value, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = conversion(+value);\n for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];\n}\n\nif (!$typed.ABV) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n this._b = arrayFill.call(new Array(byteLength), 0);\n this[$LENGTH] = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = buffer[$LENGTH];\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n this[$BUFFER] = buffer;\n this[$OFFSET] = offset;\n this[$LENGTH] = byteLength;\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, BYTE_LENGTH, '_l');\n addGetter($DataView, BUFFER, '_b');\n addGetter($DataView, BYTE_LENGTH, '_l');\n addGetter($DataView, BYTE_OFFSET, '_o');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1]));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packF32, value, arguments[2]);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packF64, value, arguments[2]);\n }\n });\n} else {\n if (!fails(function () {\n $ArrayBuffer(1);\n }) || !fails(function () {\n new $ArrayBuffer(-1); // eslint-disable-line no-new\n }) || fails(function () {\n new $ArrayBuffer(); // eslint-disable-line no-new\n new $ArrayBuffer(1.5); // eslint-disable-line no-new\n new $ArrayBuffer(NaN); // eslint-disable-line no-new\n return $ArrayBuffer.name != ARRAY_BUFFER;\n })) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new BaseBuffer(toIndex(length));\n };\n var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];\n for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);\n }\n if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;\n }\n // iOS Safari 7.x bug\n var view = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataView[PROTOTYPE].setInt8;\n view.setInt8(0, 2147483648);\n view.setInt8(1, 2147483649);\n if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, true);\n}\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\nhide($DataView[PROTOTYPE], $typed.VIEW, true);\nexports[ARRAY_BUFFER] = $ArrayBuffer;\nexports[DATA_VIEW] = $DataView;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_typed-buffer.js","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_object-dps.js","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_array-species-create.js","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_array-species-constructor.js","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_is-array.js","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_add-to-unscopables.js","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_iter-step.js","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_iter-create.js","// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\n'use strict';\nvar toObject = require('./_to-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\n\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_array-copy-within.js","require('../../modules/es6.number.is-nan');\nmodule.exports = require('../../modules/_core').Number.isNaN;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/fn/number/is-nan.js","// 20.1.2.4 Number.isNaN(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare\n return number != number;\n }\n});\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es6.number.is-nan.js","require('../../modules/es6.number.is-integer');\nmodule.exports = require('../../modules/_core').Number.isInteger;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/fn/number/is-integer.js","// 20.1.2.3 Number.isInteger(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { isInteger: require('./_is-integer') });\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es6.number.is-integer.js","// 20.1.2.3 Number.isInteger(number)\nvar isObject = require('./_is-object');\nvar floor = Math.floor;\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_is-integer.js","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nrequire('../modules/es7.promise.finally');\nrequire('../modules/es7.promise.try');\nmodule.exports = require('../modules/_core').Promise;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/fn/promise.js","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es6.string.iterator.js","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_string-at.js","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar userAgent = require('./_user-agent');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8 || '';\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function')\n && promise.then(empty) instanceof FakePromise\n // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // we can't detect it synchronously, so just check versions\n && v8.indexOf('6.6') !== 0\n && userAgent.indexOf('Chrome/66') === -1;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // may throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n if (domain && !exited) domain.exit();\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es6.promise.js","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_iter-call.js","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_invoke.js","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n var promise = Promise.resolve(undefined);\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_microtask.js","var global = require('./_global');\nvar navigator = global.navigator;\n\nmodule.exports = navigator && navigator.userAgent || '';\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_user-agent.js","// https://github.com/tc39/proposal-promise-finally\n'use strict';\nvar $export = require('./_export');\nvar core = require('./_core');\nvar global = require('./_global');\nvar speciesConstructor = require('./_species-constructor');\nvar promiseResolve = require('./_promise-resolve');\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es7.promise.finally.js","'use strict';\n// https://github.com/tc39/proposal-promise-try\nvar $export = require('./_export');\nvar newPromiseCapability = require('./_new-promise-capability');\nvar perform = require('./_perform');\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapability.f(this);\n var result = perform(callbackfn);\n (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n return promiseCapability.promise;\n} });\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es7.promise.try.js","require('../modules/es6.object.to-string');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.weak-map');\nrequire('../modules/es7.weak-map.of');\nrequire('../modules/es7.weak-map.from');\nmodule.exports = require('../modules/_core').WeakMap;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/fn/weak-map.js","'use strict';\nvar each = require('./_array-methods')(0);\nvar redefine = require('./_redefine');\nvar meta = require('./_meta');\nvar assign = require('./_object-assign');\nvar weak = require('./_collection-weak');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar validate = require('./_validate-collection');\nvar WEAK_MAP = 'WeakMap';\nvar getWeak = meta.getWeak;\nvar isExtensible = Object.isExtensible;\nvar uncaughtFrozenStore = weak.ufstore;\nvar tmp = {};\nvar InternalMap;\n\nvar wrapper = function (get) {\n return function WeakMap() {\n return get(this, arguments.length > 0 ? arguments[0] : undefined);\n };\n};\n\nvar methods = {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n if (isObject(key)) {\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);\n return data ? data[this._i] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return weak.def(validate(this, WEAK_MAP), key, value);\n }\n};\n\n// 23.3 WeakMap Objects\nvar $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true);\n\n// IE11 WeakMap frozen keys fix\nif (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {\n InternalMap = weak.getConstructor(wrapper, WEAK_MAP);\n assign(InternalMap.prototype, methods);\n meta.NEED = true;\n each(['delete', 'has', 'get', 'set'], function (key) {\n var proto = $WeakMap.prototype;\n var method = proto[key];\n redefine(proto, key, function (a, b) {\n // store frozen objects on internal weakmap shim\n if (isObject(a) && !isExtensible(a)) {\n if (!this._f) this._f = new InternalMap();\n var result = this._f[key](a, b);\n return key == 'set' ? this : result;\n // store all the rest on native weakmap\n } return method.call(this, a, b);\n });\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es6.weak-map.js","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_object-assign.js","exports.f = Object.getOwnPropertySymbols;\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_object-gops.js","'use strict';\nvar redefineAll = require('./_redefine-all');\nvar getWeak = require('./_meta').getWeak;\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar createArrayMethod = require('./_array-methods');\nvar $has = require('./_has');\nvar validate = require('./_validate-collection');\nvar arrayFind = createArrayMethod(5);\nvar arrayFindIndex = createArrayMethod(6);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (that) {\n return that._l || (that._l = new UncaughtFrozenStore());\n};\nvar UncaughtFrozenStore = function () {\n this.a = [];\n};\nvar findUncaughtFrozen = function (store, key) {\n return arrayFind(store.a, function (it) {\n return it[0] === key;\n });\n};\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.a.push([key, value]);\n },\n 'delete': function (key) {\n var index = arrayFindIndex(this.a, function (it) {\n return it[0] === key;\n });\n if (~index) this.a.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = id++; // collection id\n that._l = undefined; // leak store for uncaught frozen objects\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);\n return data && $has(data, this._i) && delete data[this._i];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);\n return data && $has(data, this._i);\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var data = getWeak(anObject(key), true);\n if (data === true) uncaughtFrozenStore(that).set(key, value);\n else data[that._i] = value;\n return that;\n },\n ufstore: uncaughtFrozenStore\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_collection-weak.js","'use strict';\nvar global = require('./_global');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar redefineAll = require('./_redefine-all');\nvar meta = require('./_meta');\nvar forOf = require('./_for-of');\nvar anInstance = require('./_an-instance');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar $iterDetect = require('./_iter-detect');\nvar setToStringTag = require('./_set-to-string-tag');\nvar inheritIfRequired = require('./_inherit-if-required');\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n var fixMethod = function (KEY) {\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n var instance = new C();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new C();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if (!ACCEPT_ITERABLES) {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME);\n var that = inheritIfRequired(new Base(), target, C);\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n // weak collections should not contains .clear method\n if (IS_WEAK && proto.clear) delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_collection.js","var isObject = require('./_is-object');\nvar setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_inherit-if-required.js","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_set-proto.js","// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of\nrequire('./_set-collection-of')('WeakMap');\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es7.weak-map.of.js","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = require('./_export');\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { of: function of() {\n var length = arguments.length;\n var A = new Array(length);\n while (length--) A[length] = arguments[length];\n return new this(A);\n } });\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_set-collection-of.js","// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from\nrequire('./_set-collection-from')('WeakMap');\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/es7.weak-map.from.js","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar ctx = require('./_ctx');\nvar forOf = require('./_for-of');\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {\n var mapFn = arguments[1];\n var mapping, A, n, cb;\n aFunction(this);\n mapping = mapFn !== undefined;\n if (mapping) aFunction(mapFn);\n if (source == undefined) return new this();\n A = [];\n if (mapping) {\n n = 0;\n cb = ctx(mapFn, arguments[2], 2);\n forOf(source, false, function (nextItem) {\n A.push(cb(nextItem, n++));\n });\n } else {\n forOf(source, false, A.push, A);\n }\n return new this(A);\n } });\n};\n\n\n\n// WEBPACK FOOTER //\n// node_modules/core-js/modules/_set-collection-from.js","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet isReadableStreamSupported = false;\nif (typeof ReadableStream !== 'undefined') {\n // MS Edge may say it has ReadableStream but they are not up to spec yet.\n try {\n // eslint-disable-next-line no-new\n new ReadableStream({\n start(controller) {\n controller.close();\n },\n });\n isReadableStreamSupported = true;\n } catch (e) {\n // The ReadableStream constructor cannot be used.\n }\n}\nif (isReadableStreamSupported) {\n exports.ReadableStream = ReadableStream;\n} else {\n if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME')) {\n throw new Error('ReadableStream polyfill is not found for Chrome bundle');\n }\n exports.ReadableStream =\n require('../../external/streams/streams-lib').ReadableStream;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/shared/streams_polyfill.js","/*\n * To the extent possible under law, the authors have dedicated all copyright\n * and related and neighboring rights to this software to the public\n * domain worldwide. This software is distributed without any warranty.\n *\n * You should have received a copy of the CC0 Public Domain Dedication along\n * with this software. If not, see https://creativecommons.org/publicdomain/zero/1.0/.\n */\n\n(function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap\n/******/ // The module cache\n/******/ var installedModules = {};\n/******/\n/******/ // The require function\n/******/ function __w_pdfjs_require__(moduleId) {\n/******/\n/******/ // Check if module is in cache\n/******/ if(installedModules[moduleId])\n/******/ return installedModules[moduleId].exports;\n/******/\n/******/ // Create a new module (and put it into the cache)\n/******/ var module = installedModules[moduleId] = {\n/******/ i: moduleId,\n/******/ l: false,\n/******/ exports: {}\n/******/ };\n/******/\n/******/ // Execute the module function\n/******/ modules[moduleId].call(module.exports, module, module.exports, __w_pdfjs_require__);\n/******/\n/******/ // Flag the module as loaded\n/******/ module.l = true;\n/******/\n/******/ // Return the exports of the module\n/******/ return module.exports;\n/******/ }\n/******/\n/******/\n/******/ // expose the modules object (__webpack_modules__)\n/******/ __w_pdfjs_require__.m = modules;\n/******/\n/******/ // expose the module cache\n/******/ __w_pdfjs_require__.c = installedModules;\n/******/\n/******/ // identity function for calling harmony imports with the correct context\n/******/ __w_pdfjs_require__.i = function(value) { return value; };\n/******/\n/******/ // define getter function for harmony exports\n/******/ __w_pdfjs_require__.d = function(exports, name, getter) {\n/******/ if(!__w_pdfjs_require__.o(exports, name)) {\n/******/ Object.defineProperty(exports, name, {\n/******/ configurable: false,\n/******/ enumerable: true,\n/******/ get: getter\n/******/ });\n/******/ }\n/******/ };\n/******/\n/******/ // getDefaultExport function for compatibility with non-harmony modules\n/******/ __w_pdfjs_require__.n = function(module) {\n/******/ var getter = module && module.__esModule ?\n/******/ function getDefault() { return module['default']; } :\n/******/ function getModuleExports() { return module; };\n/******/ __w_pdfjs_require__.d(getter, 'a', getter);\n/******/ return getter;\n/******/ };\n/******/\n/******/ // Object.prototype.hasOwnProperty.call\n/******/ __w_pdfjs_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ // __webpack_public_path__\n/******/ __w_pdfjs_require__.p = \"\";\n/******/\n/******/ // Load entry module and return exports\n/******/ return __w_pdfjs_require__(__w_pdfjs_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __w_pdfjs_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _require = __w_pdfjs_require__(1),\n assert = _require.assert;\n\nfunction IsPropertyKey(argument) {\n return typeof argument === 'string' || (typeof argument === 'undefined' ? 'undefined' : _typeof(argument)) === 'symbol';\n}\n\nexports.typeIsObject = function (x) {\n return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x !== null || typeof x === 'function';\n};\n\nexports.createDataProperty = function (o, p, v) {\n assert(exports.typeIsObject(o));\n Object.defineProperty(o, p, { value: v, writable: true, enumerable: true, configurable: true });\n};\n\nexports.createArrayFromList = function (elements) {\n // We use arrays to represent lists, so this is basically a no-op.\n // Do a slice though just in case we happen to depend on the unique-ness.\n return elements.slice();\n};\n\nexports.ArrayBufferCopy = function (dest, destOffset, src, srcOffset, n) {\n new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset);\n};\n\nexports.CreateIterResultObject = function (value, done) {\n assert(typeof done === 'boolean');\n var obj = {};\n Object.defineProperty(obj, 'value', { value: value, enumerable: true, writable: true, configurable: true });\n Object.defineProperty(obj, 'done', { value: done, enumerable: true, writable: true, configurable: true });\n return obj;\n};\n\nexports.IsFiniteNonNegativeNumber = function (v) {\n if (Number.isNaN(v)) {\n return false;\n }\n if (v === Infinity) {\n return false;\n }\n if (v < 0) {\n return false;\n }\n\n return true;\n};\n\nfunction Call(F, V, args) {\n if (typeof F !== 'function') {\n throw new TypeError('Argument is not a function');\n }\n\n return Function.prototype.apply.call(F, V, args);\n}\n\nexports.InvokeOrNoop = function (O, P, args) {\n assert(O !== undefined);\n assert(IsPropertyKey(P));\n assert(Array.isArray(args));\n\n var method = O[P];\n if (method === undefined) {\n return undefined;\n }\n\n return Call(method, O, args);\n};\n\nexports.PromiseInvokeOrNoop = function (O, P, args) {\n assert(O !== undefined);\n assert(IsPropertyKey(P));\n assert(Array.isArray(args));\n try {\n return Promise.resolve(exports.InvokeOrNoop(O, P, args));\n } catch (returnValueE) {\n return Promise.reject(returnValueE);\n }\n};\n\nexports.PromiseInvokeOrPerformFallback = function (O, P, args, F, argsF) {\n assert(O !== undefined);\n assert(IsPropertyKey(P));\n assert(Array.isArray(args));\n assert(Array.isArray(argsF));\n\n var method = void 0;\n try {\n method = O[P];\n } catch (methodE) {\n return Promise.reject(methodE);\n }\n\n if (method === undefined) {\n return F.apply(null, argsF);\n }\n\n try {\n return Promise.resolve(Call(method, O, args));\n } catch (e) {\n return Promise.reject(e);\n }\n};\n\n// Not implemented correctly\nexports.TransferArrayBuffer = function (O) {\n return O.slice();\n};\n\nexports.ValidateAndNormalizeHighWaterMark = function (highWaterMark) {\n highWaterMark = Number(highWaterMark);\n if (Number.isNaN(highWaterMark) || highWaterMark < 0) {\n throw new RangeError('highWaterMark property of a queuing strategy must be non-negative and non-NaN');\n }\n\n return highWaterMark;\n};\n\nexports.ValidateAndNormalizeQueuingStrategy = function (size, highWaterMark) {\n if (size !== undefined && typeof size !== 'function') {\n throw new TypeError('size property of a queuing strategy must be a function');\n }\n\n highWaterMark = exports.ValidateAndNormalizeHighWaterMark(highWaterMark);\n\n return { size: size, highWaterMark: highWaterMark };\n};\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __w_pdfjs_require__) {\n\n\"use strict\";\n\n\nfunction rethrowAssertionErrorRejection(e) {\n // Used throughout the reference implementation, as `.catch(rethrowAssertionErrorRejection)`, to ensure any errors\n // get shown. There are places in the spec where we do promise transformations and purposefully ignore or don't\n // expect any errors, but assertion errors are always problematic.\n if (e && e.constructor === AssertionError) {\n setTimeout(function () {\n throw e;\n }, 0);\n }\n};\n\nfunction AssertionError(message) {\n this.name = 'AssertionError';\n this.message = message || '';\n this.stack = new Error().stack;\n}\nAssertionError.prototype = Object.create(Error.prototype);\nAssertionError.prototype.constructor = AssertionError;\n\nfunction assert(value, message) {\n if (!value) {\n throw new AssertionError(message);\n }\n}\n\nmodule.exports = {\n rethrowAssertionErrorRejection: rethrowAssertionErrorRejection,\n AssertionError: AssertionError,\n assert: assert\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __w_pdfjs_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar _require = __w_pdfjs_require__(0),\n InvokeOrNoop = _require.InvokeOrNoop,\n PromiseInvokeOrNoop = _require.PromiseInvokeOrNoop,\n ValidateAndNormalizeQueuingStrategy = _require.ValidateAndNormalizeQueuingStrategy,\n typeIsObject = _require.typeIsObject;\n\nvar _require2 = __w_pdfjs_require__(1),\n assert = _require2.assert,\n rethrowAssertionErrorRejection = _require2.rethrowAssertionErrorRejection;\n\nvar _require3 = __w_pdfjs_require__(3),\n DequeueValue = _require3.DequeueValue,\n EnqueueValueWithSize = _require3.EnqueueValueWithSize,\n PeekQueueValue = _require3.PeekQueueValue,\n ResetQueue = _require3.ResetQueue;\n\nvar WritableStream = function () {\n function WritableStream() {\n var underlyingSink = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n size = _ref.size,\n _ref$highWaterMark = _ref.highWaterMark,\n highWaterMark = _ref$highWaterMark === undefined ? 1 : _ref$highWaterMark;\n\n _classCallCheck(this, WritableStream);\n\n this._state = 'writable';\n\n // The error that will be reported by new method calls once the state becomes errored. Only set when [[state]] is\n // 'erroring' or 'errored'. May be set to an undefined value.\n this._storedError = undefined;\n\n this._writer = undefined;\n\n // Initialize to undefined first because the constructor of the controller checks this\n // variable to validate the caller.\n this._writableStreamController = undefined;\n\n // This queue is placed here instead of the writer class in order to allow for passing a writer to the next data\n // producer without waiting for the queued writes to finish.\n this._writeRequests = [];\n\n // Write requests are removed from _writeRequests when write() is called on the underlying sink. This prevents\n // them from being erroneously rejected on error. If a write() call is in-flight, the request is stored here.\n this._inFlightWriteRequest = undefined;\n\n // The promise that was returned from writer.close(). Stored here because it may be fulfilled after the writer\n // has been detached.\n this._closeRequest = undefined;\n\n // Close request is removed from _closeRequest when close() is called on the underlying sink. This prevents it\n // from being erroneously rejected on error. If a close() call is in-flight, the request is stored here.\n this._inFlightCloseRequest = undefined;\n\n // The promise that was returned from writer.abort(). This may also be fulfilled after the writer has detached.\n this._pendingAbortRequest = undefined;\n\n // The backpressure signal set by the controller.\n this._backpressure = false;\n\n var type = underlyingSink.type;\n\n if (type !== undefined) {\n throw new RangeError('Invalid type is specified');\n }\n\n this._writableStreamController = new WritableStreamDefaultController(this, underlyingSink, size, highWaterMark);\n this._writableStreamController.__startSteps();\n }\n\n _createClass(WritableStream, [{\n key: 'abort',\n value: function abort(reason) {\n if (IsWritableStream(this) === false) {\n return Promise.reject(streamBrandCheckException('abort'));\n }\n\n if (IsWritableStreamLocked(this) === true) {\n return Promise.reject(new TypeError('Cannot abort a stream that already has a writer'));\n }\n\n return WritableStreamAbort(this, reason);\n }\n }, {\n key: 'getWriter',\n value: function getWriter() {\n if (IsWritableStream(this) === false) {\n throw streamBrandCheckException('getWriter');\n }\n\n return AcquireWritableStreamDefaultWriter(this);\n }\n }, {\n key: 'locked',\n get: function get() {\n if (IsWritableStream(this) === false) {\n throw streamBrandCheckException('locked');\n }\n\n return IsWritableStreamLocked(this);\n }\n }]);\n\n return WritableStream;\n}();\n\nmodule.exports = {\n AcquireWritableStreamDefaultWriter: AcquireWritableStreamDefaultWriter,\n IsWritableStream: IsWritableStream,\n IsWritableStreamLocked: IsWritableStreamLocked,\n WritableStream: WritableStream,\n WritableStreamAbort: WritableStreamAbort,\n WritableStreamDefaultControllerError: WritableStreamDefaultControllerError,\n WritableStreamDefaultWriterCloseWithErrorPropagation: WritableStreamDefaultWriterCloseWithErrorPropagation,\n WritableStreamDefaultWriterRelease: WritableStreamDefaultWriterRelease,\n WritableStreamDefaultWriterWrite: WritableStreamDefaultWriterWrite,\n WritableStreamCloseQueuedOrInFlight: WritableStreamCloseQueuedOrInFlight\n};\n\n// Abstract operations for the WritableStream.\n\nfunction AcquireWritableStreamDefaultWriter(stream) {\n return new WritableStreamDefaultWriter(stream);\n}\n\nfunction IsWritableStream(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n\n if (!Object.prototype.hasOwnProperty.call(x, '_writableStreamController')) {\n return false;\n }\n\n return true;\n}\n\nfunction IsWritableStreamLocked(stream) {\n assert(IsWritableStream(stream) === true, 'IsWritableStreamLocked should only be used on known writable streams');\n\n if (stream._writer === undefined) {\n return false;\n }\n\n return true;\n}\n\nfunction WritableStreamAbort(stream, reason) {\n var state = stream._state;\n if (state === 'closed') {\n return Promise.resolve(undefined);\n }\n if (state === 'errored') {\n return Promise.reject(stream._storedError);\n }\n var error = new TypeError('Requested to abort');\n if (stream._pendingAbortRequest !== undefined) {\n return Promise.reject(error);\n }\n\n assert(state === 'writable' || state === 'erroring', 'state must be writable or erroring');\n\n var wasAlreadyErroring = false;\n if (state === 'erroring') {\n wasAlreadyErroring = true;\n // reason will not be used, so don't keep a reference to it.\n reason = undefined;\n }\n\n var promise = new Promise(function (resolve, reject) {\n stream._pendingAbortRequest = {\n _resolve: resolve,\n _reject: reject,\n _reason: reason,\n _wasAlreadyErroring: wasAlreadyErroring\n };\n });\n\n if (wasAlreadyErroring === false) {\n WritableStreamStartErroring(stream, error);\n }\n\n return promise;\n}\n\n// WritableStream API exposed for controllers.\n\nfunction WritableStreamAddWriteRequest(stream) {\n assert(IsWritableStreamLocked(stream) === true);\n assert(stream._state === 'writable');\n\n var promise = new Promise(function (resolve, reject) {\n var writeRequest = {\n _resolve: resolve,\n _reject: reject\n };\n\n stream._writeRequests.push(writeRequest);\n });\n\n return promise;\n}\n\nfunction WritableStreamDealWithRejection(stream, error) {\n var state = stream._state;\n\n if (state === 'writable') {\n WritableStreamStartErroring(stream, error);\n return;\n }\n\n assert(state === 'erroring');\n WritableStreamFinishErroring(stream);\n}\n\nfunction WritableStreamStartErroring(stream, reason) {\n assert(stream._storedError === undefined, 'stream._storedError === undefined');\n assert(stream._state === 'writable', 'state must be writable');\n\n var controller = stream._writableStreamController;\n assert(controller !== undefined, 'controller must not be undefined');\n\n stream._state = 'erroring';\n stream._storedError = reason;\n var writer = stream._writer;\n if (writer !== undefined) {\n WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason);\n }\n\n if (WritableStreamHasOperationMarkedInFlight(stream) === false && controller._started === true) {\n WritableStreamFinishErroring(stream);\n }\n}\n\nfunction WritableStreamFinishErroring(stream) {\n assert(stream._state === 'erroring', 'stream._state === erroring');\n assert(WritableStreamHasOperationMarkedInFlight(stream) === false, 'WritableStreamHasOperationMarkedInFlight(stream) === false');\n stream._state = 'errored';\n stream._writableStreamController.__errorSteps();\n\n var storedError = stream._storedError;\n for (var i = 0; i < stream._writeRequests.length; i++) {\n var writeRequest = stream._writeRequests[i];\n writeRequest._reject(storedError);\n }\n stream._writeRequests = [];\n\n if (stream._pendingAbortRequest === undefined) {\n WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);\n return;\n }\n\n var abortRequest = stream._pendingAbortRequest;\n stream._pendingAbortRequest = undefined;\n\n if (abortRequest._wasAlreadyErroring === true) {\n abortRequest._reject(storedError);\n WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);\n return;\n }\n\n var promise = stream._writableStreamController.__abortSteps(abortRequest._reason);\n promise.then(function () {\n abortRequest._resolve();\n WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);\n }, function (reason) {\n abortRequest._reject(reason);\n WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);\n });\n}\n\nfunction WritableStreamFinishInFlightWrite(stream) {\n assert(stream._inFlightWriteRequest !== undefined);\n stream._inFlightWriteRequest._resolve(undefined);\n stream._inFlightWriteRequest = undefined;\n}\n\nfunction WritableStreamFinishInFlightWriteWithError(stream, error) {\n assert(stream._inFlightWriteRequest !== undefined);\n stream._inFlightWriteRequest._reject(error);\n stream._inFlightWriteRequest = undefined;\n\n assert(stream._state === 'writable' || stream._state === 'erroring');\n\n WritableStreamDealWithRejection(stream, error);\n}\n\nfunction WritableStreamFinishInFlightClose(stream) {\n assert(stream._inFlightCloseRequest !== undefined);\n stream._inFlightCloseRequest._resolve(undefined);\n stream._inFlightCloseRequest = undefined;\n\n var state = stream._state;\n\n assert(state === 'writable' || state === 'erroring');\n\n if (state === 'erroring') {\n // The error was too late to do anything, so it is ignored.\n stream._storedError = undefined;\n if (stream._pendingAbortRequest !== undefined) {\n stream._pendingAbortRequest._resolve();\n stream._pendingAbortRequest = undefined;\n }\n }\n\n stream._state = 'closed';\n\n var writer = stream._writer;\n if (writer !== undefined) {\n defaultWriterClosedPromiseResolve(writer);\n }\n\n assert(stream._pendingAbortRequest === undefined, 'stream._pendingAbortRequest === undefined');\n assert(stream._storedError === undefined, 'stream._storedError === undefined');\n}\n\nfunction WritableStreamFinishInFlightCloseWithError(stream, error) {\n assert(stream._inFlightCloseRequest !== undefined);\n stream._inFlightCloseRequest._reject(error);\n stream._inFlightCloseRequest = undefined;\n\n assert(stream._state === 'writable' || stream._state === 'erroring');\n\n // Never execute sink abort() after sink close().\n if (stream._pendingAbortRequest !== undefined) {\n stream._pendingAbortRequest._reject(error);\n stream._pendingAbortRequest = undefined;\n }\n WritableStreamDealWithRejection(stream, error);\n}\n\n// TODO(ricea): Fix alphabetical order.\nfunction WritableStreamCloseQueuedOrInFlight(stream) {\n if (stream._closeRequest === undefined && stream._inFlightCloseRequest === undefined) {\n return false;\n }\n\n return true;\n}\n\nfunction WritableStreamHasOperationMarkedInFlight(stream) {\n if (stream._inFlightWriteRequest === undefined && stream._inFlightCloseRequest === undefined) {\n return false;\n }\n\n return true;\n}\n\nfunction WritableStreamMarkCloseRequestInFlight(stream) {\n assert(stream._inFlightCloseRequest === undefined);\n assert(stream._closeRequest !== undefined);\n stream._inFlightCloseRequest = stream._closeRequest;\n stream._closeRequest = undefined;\n}\n\nfunction WritableStreamMarkFirstWriteRequestInFlight(stream) {\n assert(stream._inFlightWriteRequest === undefined, 'there must be no pending write request');\n assert(stream._writeRequests.length !== 0, 'writeRequests must not be empty');\n stream._inFlightWriteRequest = stream._writeRequests.shift();\n}\n\nfunction WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream) {\n assert(stream._state === 'errored', '_stream_.[[state]] is `\"errored\"`');\n if (stream._closeRequest !== undefined) {\n assert(stream._inFlightCloseRequest === undefined);\n\n stream._closeRequest._reject(stream._storedError);\n stream._closeRequest = undefined;\n }\n var writer = stream._writer;\n if (writer !== undefined) {\n defaultWriterClosedPromiseReject(writer, stream._storedError);\n writer._closedPromise.catch(function () {});\n }\n}\n\nfunction WritableStreamUpdateBackpressure(stream, backpressure) {\n assert(stream._state === 'writable');\n assert(WritableStreamCloseQueuedOrInFlight(stream) === false);\n\n var writer = stream._writer;\n if (writer !== undefined && backpressure !== stream._backpressure) {\n if (backpressure === true) {\n defaultWriterReadyPromiseReset(writer);\n } else {\n assert(backpressure === false);\n\n defaultWriterReadyPromiseResolve(writer);\n }\n }\n\n stream._backpressure = backpressure;\n}\n\nvar WritableStreamDefaultWriter = function () {\n function WritableStreamDefaultWriter(stream) {\n _classCallCheck(this, WritableStreamDefaultWriter);\n\n if (IsWritableStream(stream) === false) {\n throw new TypeError('WritableStreamDefaultWriter can only be constructed with a WritableStream instance');\n }\n if (IsWritableStreamLocked(stream) === true) {\n throw new TypeError('This stream has already been locked for exclusive writing by another writer');\n }\n\n this._ownerWritableStream = stream;\n stream._writer = this;\n\n var state = stream._state;\n\n if (state === 'writable') {\n if (WritableStreamCloseQueuedOrInFlight(stream) === false && stream._backpressure === true) {\n defaultWriterReadyPromiseInitialize(this);\n } else {\n defaultWriterReadyPromiseInitializeAsResolved(this);\n }\n\n defaultWriterClosedPromiseInitialize(this);\n } else if (state === 'erroring') {\n defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError);\n this._readyPromise.catch(function () {});\n defaultWriterClosedPromiseInitialize(this);\n } else if (state === 'closed') {\n defaultWriterReadyPromiseInitializeAsResolved(this);\n defaultWriterClosedPromiseInitializeAsResolved(this);\n } else {\n assert(state === 'errored', 'state must be errored');\n\n var storedError = stream._storedError;\n defaultWriterReadyPromiseInitializeAsRejected(this, storedError);\n this._readyPromise.catch(function () {});\n defaultWriterClosedPromiseInitializeAsRejected(this, storedError);\n this._closedPromise.catch(function () {});\n }\n }\n\n _createClass(WritableStreamDefaultWriter, [{\n key: 'abort',\n value: function abort(reason) {\n if (IsWritableStreamDefaultWriter(this) === false) {\n return Promise.reject(defaultWriterBrandCheckException('abort'));\n }\n\n if (this._ownerWritableStream === undefined) {\n return Promise.reject(defaultWriterLockException('abort'));\n }\n\n return WritableStreamDefaultWriterAbort(this, reason);\n }\n }, {\n key: 'close',\n value: function close() {\n if (IsWritableStreamDefaultWriter(this) === false) {\n return Promise.reject(defaultWriterBrandCheckException('close'));\n }\n\n var stream = this._ownerWritableStream;\n\n if (stream === undefined) {\n return Promise.reject(defaultWriterLockException('close'));\n }\n\n if (WritableStreamCloseQueuedOrInFlight(stream) === true) {\n return Promise.reject(new TypeError('cannot close an already-closing stream'));\n }\n\n return WritableStreamDefaultWriterClose(this);\n }\n }, {\n key: 'releaseLock',\n value: function releaseLock() {\n if (IsWritableStreamDefaultWriter(this) === false) {\n throw defaultWriterBrandCheckException('releaseLock');\n }\n\n var stream = this._ownerWritableStream;\n\n if (stream === undefined) {\n return;\n }\n\n assert(stream._writer !== undefined);\n\n WritableStreamDefaultWriterRelease(this);\n }\n }, {\n key: 'write',\n value: function write(chunk) {\n if (IsWritableStreamDefaultWriter(this) === false) {\n return Promise.reject(defaultWriterBrandCheckException('write'));\n }\n\n if (this._ownerWritableStream === undefined) {\n return Promise.reject(defaultWriterLockException('write to'));\n }\n\n return WritableStreamDefaultWriterWrite(this, chunk);\n }\n }, {\n key: 'closed',\n get: function get() {\n if (IsWritableStreamDefaultWriter(this) === false) {\n return Promise.reject(defaultWriterBrandCheckException('closed'));\n }\n\n return this._closedPromise;\n }\n }, {\n key: 'desiredSize',\n get: function get() {\n if (IsWritableStreamDefaultWriter(this) === false) {\n throw defaultWriterBrandCheckException('desiredSize');\n }\n\n if (this._ownerWritableStream === undefined) {\n throw defaultWriterLockException('desiredSize');\n }\n\n return WritableStreamDefaultWriterGetDesiredSize(this);\n }\n }, {\n key: 'ready',\n get: function get() {\n if (IsWritableStreamDefaultWriter(this) === false) {\n return Promise.reject(defaultWriterBrandCheckException('ready'));\n }\n\n return this._readyPromise;\n }\n }]);\n\n return WritableStreamDefaultWriter;\n}();\n\n// Abstract operations for the WritableStreamDefaultWriter.\n\nfunction IsWritableStreamDefaultWriter(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n\n if (!Object.prototype.hasOwnProperty.call(x, '_ownerWritableStream')) {\n return false;\n }\n\n return true;\n}\n\n// A client of WritableStreamDefaultWriter may use these functions directly to bypass state check.\n\nfunction WritableStreamDefaultWriterAbort(writer, reason) {\n var stream = writer._ownerWritableStream;\n\n assert(stream !== undefined);\n\n return WritableStreamAbort(stream, reason);\n}\n\nfunction WritableStreamDefaultWriterClose(writer) {\n var stream = writer._ownerWritableStream;\n\n assert(stream !== undefined);\n\n var state = stream._state;\n if (state === 'closed' || state === 'errored') {\n return Promise.reject(new TypeError('The stream (in ' + state + ' state) is not in the writable state and cannot be closed'));\n }\n\n assert(state === 'writable' || state === 'erroring');\n assert(WritableStreamCloseQueuedOrInFlight(stream) === false);\n\n var promise = new Promise(function (resolve, reject) {\n var closeRequest = {\n _resolve: resolve,\n _reject: reject\n };\n\n stream._closeRequest = closeRequest;\n });\n\n if (stream._backpressure === true && state === 'writable') {\n defaultWriterReadyPromiseResolve(writer);\n }\n\n WritableStreamDefaultControllerClose(stream._writableStreamController);\n\n return promise;\n}\n\nfunction WritableStreamDefaultWriterCloseWithErrorPropagation(writer) {\n var stream = writer._ownerWritableStream;\n\n assert(stream !== undefined);\n\n var state = stream._state;\n if (WritableStreamCloseQueuedOrInFlight(stream) === true || state === 'closed') {\n return Promise.resolve();\n }\n\n if (state === 'errored') {\n return Promise.reject(stream._storedError);\n }\n\n assert(state === 'writable' || state === 'erroring');\n\n return WritableStreamDefaultWriterClose(writer);\n}\n\nfunction WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error) {\n if (writer._closedPromiseState === 'pending') {\n defaultWriterClosedPromiseReject(writer, error);\n } else {\n defaultWriterClosedPromiseResetToRejected(writer, error);\n }\n writer._closedPromise.catch(function () {});\n}\n\nfunction WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) {\n if (writer._readyPromiseState === 'pending') {\n defaultWriterReadyPromiseReject(writer, error);\n } else {\n defaultWriterReadyPromiseResetToRejected(writer, error);\n }\n writer._readyPromise.catch(function () {});\n}\n\nfunction WritableStreamDefaultWriterGetDesiredSize(writer) {\n var stream = writer._ownerWritableStream;\n var state = stream._state;\n\n if (state === 'errored' || state === 'erroring') {\n return null;\n }\n\n if (state === 'closed') {\n return 0;\n }\n\n return WritableStreamDefaultControllerGetDesiredSize(stream._writableStreamController);\n}\n\nfunction WritableStreamDefaultWriterRelease(writer) {\n var stream = writer._ownerWritableStream;\n assert(stream !== undefined);\n assert(stream._writer === writer);\n\n var releasedError = new TypeError('Writer was released and can no longer be used to monitor the stream\\'s closedness');\n\n WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError);\n\n // The state transitions to \"errored\" before the sink abort() method runs, but the writer.closed promise is not\n // rejected until afterwards. This means that simply testing state will not work.\n WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError);\n\n stream._writer = undefined;\n writer._ownerWritableStream = undefined;\n}\n\nfunction WritableStreamDefaultWriterWrite(writer, chunk) {\n var stream = writer._ownerWritableStream;\n\n assert(stream !== undefined);\n\n var controller = stream._writableStreamController;\n\n var chunkSize = WritableStreamDefaultControllerGetChunkSize(controller, chunk);\n\n if (stream !== writer._ownerWritableStream) {\n return Promise.reject(defaultWriterLockException('write to'));\n }\n\n var state = stream._state;\n if (state === 'errored') {\n return Promise.reject(stream._storedError);\n }\n if (WritableStreamCloseQueuedOrInFlight(stream) === true || state === 'closed') {\n return Promise.reject(new TypeError('The stream is closing or closed and cannot be written to'));\n }\n if (state === 'erroring') {\n return Promise.reject(stream._storedError);\n }\n\n assert(state === 'writable');\n\n var promise = WritableStreamAddWriteRequest(stream);\n\n WritableStreamDefaultControllerWrite(controller, chunk, chunkSize);\n\n return promise;\n}\n\nvar WritableStreamDefaultController = function () {\n function WritableStreamDefaultController(stream, underlyingSink, size, highWaterMark) {\n _classCallCheck(this, WritableStreamDefaultController);\n\n if (IsWritableStream(stream) === false) {\n throw new TypeError('WritableStreamDefaultController can only be constructed with a WritableStream instance');\n }\n\n if (stream._writableStreamController !== undefined) {\n throw new TypeError('WritableStreamDefaultController instances can only be created by the WritableStream constructor');\n }\n\n this._controlledWritableStream = stream;\n\n this._underlyingSink = underlyingSink;\n\n // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly.\n this._queue = undefined;\n this._queueTotalSize = undefined;\n ResetQueue(this);\n\n this._started = false;\n\n var normalizedStrategy = ValidateAndNormalizeQueuingStrategy(size, highWaterMark);\n this._strategySize = normalizedStrategy.size;\n this._strategyHWM = normalizedStrategy.highWaterMark;\n\n var backpressure = WritableStreamDefaultControllerGetBackpressure(this);\n WritableStreamUpdateBackpressure(stream, backpressure);\n }\n\n _createClass(WritableStreamDefaultController, [{\n key: 'error',\n value: function error(e) {\n if (IsWritableStreamDefaultController(this) === false) {\n throw new TypeError('WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController');\n }\n var state = this._controlledWritableStream._state;\n if (state !== 'writable') {\n // The stream is closed, errored or will be soon. The sink can't do anything useful if it gets an error here, so\n // just treat it as a no-op.\n return;\n }\n\n WritableStreamDefaultControllerError(this, e);\n }\n }, {\n key: '__abortSteps',\n value: function __abortSteps(reason) {\n return PromiseInvokeOrNoop(this._underlyingSink, 'abort', [reason]);\n }\n }, {\n key: '__errorSteps',\n value: function __errorSteps() {\n ResetQueue(this);\n }\n }, {\n key: '__startSteps',\n value: function __startSteps() {\n var _this = this;\n\n var startResult = InvokeOrNoop(this._underlyingSink, 'start', [this]);\n var stream = this._controlledWritableStream;\n\n Promise.resolve(startResult).then(function () {\n assert(stream._state === 'writable' || stream._state === 'erroring');\n _this._started = true;\n WritableStreamDefaultControllerAdvanceQueueIfNeeded(_this);\n }, function (r) {\n assert(stream._state === 'writable' || stream._state === 'erroring');\n _this._started = true;\n WritableStreamDealWithRejection(stream, r);\n }).catch(rethrowAssertionErrorRejection);\n }\n }]);\n\n return WritableStreamDefaultController;\n}();\n\n// Abstract operations implementing interface required by the WritableStream.\n\nfunction WritableStreamDefaultControllerClose(controller) {\n EnqueueValueWithSize(controller, 'close', 0);\n WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);\n}\n\nfunction WritableStreamDefaultControllerGetChunkSize(controller, chunk) {\n var strategySize = controller._strategySize;\n\n if (strategySize === undefined) {\n return 1;\n }\n\n try {\n return strategySize(chunk);\n } catch (chunkSizeE) {\n WritableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE);\n return 1;\n }\n}\n\nfunction WritableStreamDefaultControllerGetDesiredSize(controller) {\n return controller._strategyHWM - controller._queueTotalSize;\n}\n\nfunction WritableStreamDefaultControllerWrite(controller, chunk, chunkSize) {\n var writeRecord = { chunk: chunk };\n\n try {\n EnqueueValueWithSize(controller, writeRecord, chunkSize);\n } catch (enqueueE) {\n WritableStreamDefaultControllerErrorIfNeeded(controller, enqueueE);\n return;\n }\n\n var stream = controller._controlledWritableStream;\n if (WritableStreamCloseQueuedOrInFlight(stream) === false && stream._state === 'writable') {\n var backpressure = WritableStreamDefaultControllerGetBackpressure(controller);\n WritableStreamUpdateBackpressure(stream, backpressure);\n }\n\n WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);\n}\n\n// Abstract operations for the WritableStreamDefaultController.\n\nfunction IsWritableStreamDefaultController(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n\n if (!Object.prototype.hasOwnProperty.call(x, '_underlyingSink')) {\n return false;\n }\n\n return true;\n}\n\nfunction WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) {\n var stream = controller._controlledWritableStream;\n\n if (controller._started === false) {\n return;\n }\n\n if (stream._inFlightWriteRequest !== undefined) {\n return;\n }\n\n var state = stream._state;\n if (state === 'closed' || state === 'errored') {\n return;\n }\n if (state === 'erroring') {\n WritableStreamFinishErroring(stream);\n return;\n }\n\n if (controller._queue.length === 0) {\n return;\n }\n\n var writeRecord = PeekQueueValue(controller);\n if (writeRecord === 'close') {\n WritableStreamDefaultControllerProcessClose(controller);\n } else {\n WritableStreamDefaultControllerProcessWrite(controller, writeRecord.chunk);\n }\n}\n\nfunction WritableStreamDefaultControllerErrorIfNeeded(controller, error) {\n if (controller._controlledWritableStream._state === 'writable') {\n WritableStreamDefaultControllerError(controller, error);\n }\n}\n\nfunction WritableStreamDefaultControllerProcessClose(controller) {\n var stream = controller._controlledWritableStream;\n\n WritableStreamMarkCloseRequestInFlight(stream);\n\n DequeueValue(controller);\n assert(controller._queue.length === 0, 'queue must be empty once the final write record is dequeued');\n\n var sinkClosePromise = PromiseInvokeOrNoop(controller._underlyingSink, 'close', []);\n sinkClosePromise.then(function () {\n WritableStreamFinishInFlightClose(stream);\n }, function (reason) {\n WritableStreamFinishInFlightCloseWithError(stream, reason);\n }).catch(rethrowAssertionErrorRejection);\n}\n\nfunction WritableStreamDefaultControllerProcessWrite(controller, chunk) {\n var stream = controller._controlledWritableStream;\n\n WritableStreamMarkFirstWriteRequestInFlight(stream);\n\n var sinkWritePromise = PromiseInvokeOrNoop(controller._underlyingSink, 'write', [chunk, controller]);\n sinkWritePromise.then(function () {\n WritableStreamFinishInFlightWrite(stream);\n\n var state = stream._state;\n assert(state === 'writable' || state === 'erroring');\n\n DequeueValue(controller);\n\n if (WritableStreamCloseQueuedOrInFlight(stream) === false && state === 'writable') {\n var backpressure = WritableStreamDefaultControllerGetBackpressure(controller);\n WritableStreamUpdateBackpressure(stream, backpressure);\n }\n\n WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);\n }, function (reason) {\n WritableStreamFinishInFlightWriteWithError(stream, reason);\n }).catch(rethrowAssertionErrorRejection);\n}\n\nfunction WritableStreamDefaultControllerGetBackpressure(controller) {\n var desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller);\n return desiredSize <= 0;\n}\n\n// A client of WritableStreamDefaultController may use these functions directly to bypass state check.\n\nfunction WritableStreamDefaultControllerError(controller, error) {\n var stream = controller._controlledWritableStream;\n\n assert(stream._state === 'writable');\n\n WritableStreamStartErroring(stream, error);\n}\n\n// Helper functions for the WritableStream.\n\nfunction streamBrandCheckException(name) {\n return new TypeError('WritableStream.prototype.' + name + ' can only be used on a WritableStream');\n}\n\n// Helper functions for the WritableStreamDefaultWriter.\n\nfunction defaultWriterBrandCheckException(name) {\n return new TypeError('WritableStreamDefaultWriter.prototype.' + name + ' can only be used on a WritableStreamDefaultWriter');\n}\n\nfunction defaultWriterLockException(name) {\n return new TypeError('Cannot ' + name + ' a stream using a released writer');\n}\n\nfunction defaultWriterClosedPromiseInitialize(writer) {\n writer._closedPromise = new Promise(function (resolve, reject) {\n writer._closedPromise_resolve = resolve;\n writer._closedPromise_reject = reject;\n writer._closedPromiseState = 'pending';\n });\n}\n\nfunction defaultWriterClosedPromiseInitializeAsRejected(writer, reason) {\n writer._closedPromise = Promise.reject(reason);\n writer._closedPromise_resolve = undefined;\n writer._closedPromise_reject = undefined;\n writer._closedPromiseState = 'rejected';\n}\n\nfunction defaultWriterClosedPromiseInitializeAsResolved(writer) {\n writer._closedPromise = Promise.resolve(undefined);\n writer._closedPromise_resolve = undefined;\n writer._closedPromise_reject = undefined;\n writer._closedPromiseState = 'resolved';\n}\n\nfunction defaultWriterClosedPromiseReject(writer, reason) {\n assert(writer._closedPromise_resolve !== undefined, 'writer._closedPromise_resolve !== undefined');\n assert(writer._closedPromise_reject !== undefined, 'writer._closedPromise_reject !== undefined');\n assert(writer._closedPromiseState === 'pending', 'writer._closedPromiseState is pending');\n\n writer._closedPromise_reject(reason);\n writer._closedPromise_resolve = undefined;\n writer._closedPromise_reject = undefined;\n writer._closedPromiseState = 'rejected';\n}\n\nfunction defaultWriterClosedPromiseResetToRejected(writer, reason) {\n assert(writer._closedPromise_resolve === undefined, 'writer._closedPromise_resolve === undefined');\n assert(writer._closedPromise_reject === undefined, 'writer._closedPromise_reject === undefined');\n assert(writer._closedPromiseState !== 'pending', 'writer._closedPromiseState is not pending');\n\n writer._closedPromise = Promise.reject(reason);\n writer._closedPromiseState = 'rejected';\n}\n\nfunction defaultWriterClosedPromiseResolve(writer) {\n assert(writer._closedPromise_resolve !== undefined, 'writer._closedPromise_resolve !== undefined');\n assert(writer._closedPromise_reject !== undefined, 'writer._closedPromise_reject !== undefined');\n assert(writer._closedPromiseState === 'pending', 'writer._closedPromiseState is pending');\n\n writer._closedPromise_resolve(undefined);\n writer._closedPromise_resolve = undefined;\n writer._closedPromise_reject = undefined;\n writer._closedPromiseState = 'resolved';\n}\n\nfunction defaultWriterReadyPromiseInitialize(writer) {\n writer._readyPromise = new Promise(function (resolve, reject) {\n writer._readyPromise_resolve = resolve;\n writer._readyPromise_reject = reject;\n });\n writer._readyPromiseState = 'pending';\n}\n\nfunction defaultWriterReadyPromiseInitializeAsRejected(writer, reason) {\n writer._readyPromise = Promise.reject(reason);\n writer._readyPromise_resolve = undefined;\n writer._readyPromise_reject = undefined;\n writer._readyPromiseState = 'rejected';\n}\n\nfunction defaultWriterReadyPromiseInitializeAsResolved(writer) {\n writer._readyPromise = Promise.resolve(undefined);\n writer._readyPromise_resolve = undefined;\n writer._readyPromise_reject = undefined;\n writer._readyPromiseState = 'fulfilled';\n}\n\nfunction defaultWriterReadyPromiseReject(writer, reason) {\n assert(writer._readyPromise_resolve !== undefined, 'writer._readyPromise_resolve !== undefined');\n assert(writer._readyPromise_reject !== undefined, 'writer._readyPromise_reject !== undefined');\n\n writer._readyPromise_reject(reason);\n writer._readyPromise_resolve = undefined;\n writer._readyPromise_reject = undefined;\n writer._readyPromiseState = 'rejected';\n}\n\nfunction defaultWriterReadyPromiseReset(writer) {\n assert(writer._readyPromise_resolve === undefined, 'writer._readyPromise_resolve === undefined');\n assert(writer._readyPromise_reject === undefined, 'writer._readyPromise_reject === undefined');\n\n writer._readyPromise = new Promise(function (resolve, reject) {\n writer._readyPromise_resolve = resolve;\n writer._readyPromise_reject = reject;\n });\n writer._readyPromiseState = 'pending';\n}\n\nfunction defaultWriterReadyPromiseResetToRejected(writer, reason) {\n assert(writer._readyPromise_resolve === undefined, 'writer._readyPromise_resolve === undefined');\n assert(writer._readyPromise_reject === undefined, 'writer._readyPromise_reject === undefined');\n\n writer._readyPromise = Promise.reject(reason);\n writer._readyPromiseState = 'rejected';\n}\n\nfunction defaultWriterReadyPromiseResolve(writer) {\n assert(writer._readyPromise_resolve !== undefined, 'writer._readyPromise_resolve !== undefined');\n assert(writer._readyPromise_reject !== undefined, 'writer._readyPromise_reject !== undefined');\n\n writer._readyPromise_resolve(undefined);\n writer._readyPromise_resolve = undefined;\n writer._readyPromise_reject = undefined;\n writer._readyPromiseState = 'fulfilled';\n}\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __w_pdfjs_require__) {\n\n\"use strict\";\n\n\nvar _require = __w_pdfjs_require__(0),\n IsFiniteNonNegativeNumber = _require.IsFiniteNonNegativeNumber;\n\nvar _require2 = __w_pdfjs_require__(1),\n assert = _require2.assert;\n\nexports.DequeueValue = function (container) {\n assert('_queue' in container && '_queueTotalSize' in container, 'Spec-level failure: DequeueValue should only be used on containers with [[queue]] and [[queueTotalSize]].');\n assert(container._queue.length > 0, 'Spec-level failure: should never dequeue from an empty queue.');\n\n var pair = container._queue.shift();\n container._queueTotalSize -= pair.size;\n if (container._queueTotalSize < 0) {\n container._queueTotalSize = 0;\n }\n\n return pair.value;\n};\n\nexports.EnqueueValueWithSize = function (container, value, size) {\n assert('_queue' in container && '_queueTotalSize' in container, 'Spec-level failure: EnqueueValueWithSize should only be used on containers with [[queue]] and ' + '[[queueTotalSize]].');\n\n size = Number(size);\n if (!IsFiniteNonNegativeNumber(size)) {\n throw new RangeError('Size must be a finite, non-NaN, non-negative number.');\n }\n\n container._queue.push({ value: value, size: size });\n container._queueTotalSize += size;\n};\n\nexports.PeekQueueValue = function (container) {\n assert('_queue' in container && '_queueTotalSize' in container, 'Spec-level failure: PeekQueueValue should only be used on containers with [[queue]] and [[queueTotalSize]].');\n assert(container._queue.length > 0, 'Spec-level failure: should never peek at an empty queue.');\n\n var pair = container._queue[0];\n return pair.value;\n};\n\nexports.ResetQueue = function (container) {\n assert('_queue' in container && '_queueTotalSize' in container, 'Spec-level failure: ResetQueue should only be used on containers with [[queue]] and [[queueTotalSize]].');\n\n container._queue = [];\n container._queueTotalSize = 0;\n};\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __w_pdfjs_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar _require = __w_pdfjs_require__(0),\n ArrayBufferCopy = _require.ArrayBufferCopy,\n CreateIterResultObject = _require.CreateIterResultObject,\n IsFiniteNonNegativeNumber = _require.IsFiniteNonNegativeNumber,\n InvokeOrNoop = _require.InvokeOrNoop,\n PromiseInvokeOrNoop = _require.PromiseInvokeOrNoop,\n TransferArrayBuffer = _require.TransferArrayBuffer,\n ValidateAndNormalizeQueuingStrategy = _require.ValidateAndNormalizeQueuingStrategy,\n ValidateAndNormalizeHighWaterMark = _require.ValidateAndNormalizeHighWaterMark;\n\nvar _require2 = __w_pdfjs_require__(0),\n createArrayFromList = _require2.createArrayFromList,\n createDataProperty = _require2.createDataProperty,\n typeIsObject = _require2.typeIsObject;\n\nvar _require3 = __w_pdfjs_require__(1),\n assert = _require3.assert,\n rethrowAssertionErrorRejection = _require3.rethrowAssertionErrorRejection;\n\nvar _require4 = __w_pdfjs_require__(3),\n DequeueValue = _require4.DequeueValue,\n EnqueueValueWithSize = _require4.EnqueueValueWithSize,\n ResetQueue = _require4.ResetQueue;\n\nvar _require5 = __w_pdfjs_require__(2),\n AcquireWritableStreamDefaultWriter = _require5.AcquireWritableStreamDefaultWriter,\n IsWritableStream = _require5.IsWritableStream,\n IsWritableStreamLocked = _require5.IsWritableStreamLocked,\n WritableStreamAbort = _require5.WritableStreamAbort,\n WritableStreamDefaultWriterCloseWithErrorPropagation = _require5.WritableStreamDefaultWriterCloseWithErrorPropagation,\n WritableStreamDefaultWriterRelease = _require5.WritableStreamDefaultWriterRelease,\n WritableStreamDefaultWriterWrite = _require5.WritableStreamDefaultWriterWrite,\n WritableStreamCloseQueuedOrInFlight = _require5.WritableStreamCloseQueuedOrInFlight;\n\nvar ReadableStream = function () {\n function ReadableStream() {\n var underlyingSource = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n size = _ref.size,\n highWaterMark = _ref.highWaterMark;\n\n _classCallCheck(this, ReadableStream);\n\n // Exposed to controllers.\n this._state = 'readable';\n\n this._reader = undefined;\n this._storedError = undefined;\n\n this._disturbed = false;\n\n // Initialize to undefined first because the constructor of the controller checks this\n // variable to validate the caller.\n this._readableStreamController = undefined;\n var type = underlyingSource.type;\n var typeString = String(type);\n if (typeString === 'bytes') {\n if (highWaterMark === undefined) {\n highWaterMark = 0;\n }\n this._readableStreamController = new ReadableByteStreamController(this, underlyingSource, highWaterMark);\n } else if (type === undefined) {\n if (highWaterMark === undefined) {\n highWaterMark = 1;\n }\n this._readableStreamController = new ReadableStreamDefaultController(this, underlyingSource, size, highWaterMark);\n } else {\n throw new RangeError('Invalid type is specified');\n }\n }\n\n _createClass(ReadableStream, [{\n key: 'cancel',\n value: function cancel(reason) {\n if (IsReadableStream(this) === false) {\n return Promise.reject(streamBrandCheckException('cancel'));\n }\n\n if (IsReadableStreamLocked(this) === true) {\n return Promise.reject(new TypeError('Cannot cancel a stream that already has a reader'));\n }\n\n return ReadableStreamCancel(this, reason);\n }\n }, {\n key: 'getReader',\n value: function getReader() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n mode = _ref2.mode;\n\n if (IsReadableStream(this) === false) {\n throw streamBrandCheckException('getReader');\n }\n\n if (mode === undefined) {\n return AcquireReadableStreamDefaultReader(this);\n }\n\n mode = String(mode);\n\n if (mode === 'byob') {\n return AcquireReadableStreamBYOBReader(this);\n }\n\n throw new RangeError('Invalid mode is specified');\n }\n }, {\n key: 'pipeThrough',\n value: function pipeThrough(_ref3, options) {\n var writable = _ref3.writable,\n readable = _ref3.readable;\n\n var promise = this.pipeTo(writable, options);\n\n ifIsObjectAndHasAPromiseIsHandledInternalSlotSetPromiseIsHandledToTrue(promise);\n\n return readable;\n }\n }, {\n key: 'pipeTo',\n value: function pipeTo(dest) {\n var _this = this;\n\n var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n preventClose = _ref4.preventClose,\n preventAbort = _ref4.preventAbort,\n preventCancel = _ref4.preventCancel;\n\n if (IsReadableStream(this) === false) {\n return Promise.reject(streamBrandCheckException('pipeTo'));\n }\n if (IsWritableStream(dest) === false) {\n return Promise.reject(new TypeError('ReadableStream.prototype.pipeTo\\'s first argument must be a WritableStream'));\n }\n\n preventClose = Boolean(preventClose);\n preventAbort = Boolean(preventAbort);\n preventCancel = Boolean(preventCancel);\n\n if (IsReadableStreamLocked(this) === true) {\n return Promise.reject(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream'));\n }\n if (IsWritableStreamLocked(dest) === true) {\n return Promise.reject(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream'));\n }\n\n var reader = AcquireReadableStreamDefaultReader(this);\n var writer = AcquireWritableStreamDefaultWriter(dest);\n\n var shuttingDown = false;\n\n // This is used to keep track of the spec's requirement that we wait for ongoing writes during shutdown.\n var currentWrite = Promise.resolve();\n\n return new Promise(function (resolve, reject) {\n // Using reader and writer, read all chunks from this and write them to dest\n // - Backpressure must be enforced\n // - Shutdown must stop all activity\n function pipeLoop() {\n currentWrite = Promise.resolve();\n\n if (shuttingDown === true) {\n return Promise.resolve();\n }\n\n return writer._readyPromise.then(function () {\n return ReadableStreamDefaultReaderRead(reader).then(function (_ref5) {\n var value = _ref5.value,\n done = _ref5.done;\n\n if (done === true) {\n return;\n }\n\n currentWrite = WritableStreamDefaultWriterWrite(writer, value).catch(function () {});\n });\n }).then(pipeLoop);\n }\n\n // Errors must be propagated forward\n isOrBecomesErrored(_this, reader._closedPromise, function (storedError) {\n if (preventAbort === false) {\n shutdownWithAction(function () {\n return WritableStreamAbort(dest, storedError);\n }, true, storedError);\n } else {\n shutdown(true, storedError);\n }\n });\n\n // Errors must be propagated backward\n isOrBecomesErrored(dest, writer._closedPromise, function (storedError) {\n if (preventCancel === false) {\n shutdownWithAction(function () {\n return ReadableStreamCancel(_this, storedError);\n }, true, storedError);\n } else {\n shutdown(true, storedError);\n }\n });\n\n // Closing must be propagated forward\n isOrBecomesClosed(_this, reader._closedPromise, function () {\n if (preventClose === false) {\n shutdownWithAction(function () {\n return WritableStreamDefaultWriterCloseWithErrorPropagation(writer);\n });\n } else {\n shutdown();\n }\n });\n\n // Closing must be propagated backward\n if (WritableStreamCloseQueuedOrInFlight(dest) === true || dest._state === 'closed') {\n var destClosed = new TypeError('the destination writable stream closed before all data could be piped to it');\n\n if (preventCancel === false) {\n shutdownWithAction(function () {\n return ReadableStreamCancel(_this, destClosed);\n }, true, destClosed);\n } else {\n shutdown(true, destClosed);\n }\n }\n\n pipeLoop().catch(function (err) {\n currentWrite = Promise.resolve();\n rethrowAssertionErrorRejection(err);\n });\n\n function waitForWritesToFinish() {\n // Another write may have started while we were waiting on this currentWrite, so we have to be sure to wait\n // for that too.\n var oldCurrentWrite = currentWrite;\n return currentWrite.then(function () {\n return oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : undefined;\n });\n }\n\n function isOrBecomesErrored(stream, promise, action) {\n if (stream._state === 'errored') {\n action(stream._storedError);\n } else {\n promise.catch(action).catch(rethrowAssertionErrorRejection);\n }\n }\n\n function isOrBecomesClosed(stream, promise, action) {\n if (stream._state === 'closed') {\n action();\n } else {\n promise.then(action).catch(rethrowAssertionErrorRejection);\n }\n }\n\n function shutdownWithAction(action, originalIsError, originalError) {\n if (shuttingDown === true) {\n return;\n }\n shuttingDown = true;\n\n if (dest._state === 'writable' && WritableStreamCloseQueuedOrInFlight(dest) === false) {\n waitForWritesToFinish().then(doTheRest);\n } else {\n doTheRest();\n }\n\n function doTheRest() {\n action().then(function () {\n return finalize(originalIsError, originalError);\n }, function (newError) {\n return finalize(true, newError);\n }).catch(rethrowAssertionErrorRejection);\n }\n }\n\n function shutdown(isError, error) {\n if (shuttingDown === true) {\n return;\n }\n shuttingDown = true;\n\n if (dest._state === 'writable' && WritableStreamCloseQueuedOrInFlight(dest) === false) {\n waitForWritesToFinish().then(function () {\n return finalize(isError, error);\n }).catch(rethrowAssertionErrorRejection);\n } else {\n finalize(isError, error);\n }\n }\n\n function finalize(isError, error) {\n WritableStreamDefaultWriterRelease(writer);\n ReadableStreamReaderGenericRelease(reader);\n\n if (isError) {\n reject(error);\n } else {\n resolve(undefined);\n }\n }\n });\n }\n }, {\n key: 'tee',\n value: function tee() {\n if (IsReadableStream(this) === false) {\n throw streamBrandCheckException('tee');\n }\n\n var branches = ReadableStreamTee(this, false);\n return createArrayFromList(branches);\n }\n }, {\n key: 'locked',\n get: function get() {\n if (IsReadableStream(this) === false) {\n throw streamBrandCheckException('locked');\n }\n\n return IsReadableStreamLocked(this);\n }\n }]);\n\n return ReadableStream;\n}();\n\nmodule.exports = {\n ReadableStream: ReadableStream,\n IsReadableStreamDisturbed: IsReadableStreamDisturbed,\n ReadableStreamDefaultControllerClose: ReadableStreamDefaultControllerClose,\n ReadableStreamDefaultControllerEnqueue: ReadableStreamDefaultControllerEnqueue,\n ReadableStreamDefaultControllerError: ReadableStreamDefaultControllerError,\n ReadableStreamDefaultControllerGetDesiredSize: ReadableStreamDefaultControllerGetDesiredSize\n};\n\n// Abstract operations for the ReadableStream.\n\nfunction AcquireReadableStreamBYOBReader(stream) {\n return new ReadableStreamBYOBReader(stream);\n}\n\nfunction AcquireReadableStreamDefaultReader(stream) {\n return new ReadableStreamDefaultReader(stream);\n}\n\nfunction IsReadableStream(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n\n if (!Object.prototype.hasOwnProperty.call(x, '_readableStreamController')) {\n return false;\n }\n\n return true;\n}\n\nfunction IsReadableStreamDisturbed(stream) {\n assert(IsReadableStream(stream) === true, 'IsReadableStreamDisturbed should only be used on known readable streams');\n\n return stream._disturbed;\n}\n\nfunction IsReadableStreamLocked(stream) {\n assert(IsReadableStream(stream) === true, 'IsReadableStreamLocked should only be used on known readable streams');\n\n if (stream._reader === undefined) {\n return false;\n }\n\n return true;\n}\n\nfunction ReadableStreamTee(stream, cloneForBranch2) {\n assert(IsReadableStream(stream) === true);\n assert(typeof cloneForBranch2 === 'boolean');\n\n var reader = AcquireReadableStreamDefaultReader(stream);\n\n var teeState = {\n closedOrErrored: false,\n canceled1: false,\n canceled2: false,\n reason1: undefined,\n reason2: undefined\n };\n teeState.promise = new Promise(function (resolve) {\n teeState._resolve = resolve;\n });\n\n var pull = create_ReadableStreamTeePullFunction();\n pull._reader = reader;\n pull._teeState = teeState;\n pull._cloneForBranch2 = cloneForBranch2;\n\n var cancel1 = create_ReadableStreamTeeBranch1CancelFunction();\n cancel1._stream = stream;\n cancel1._teeState = teeState;\n\n var cancel2 = create_ReadableStreamTeeBranch2CancelFunction();\n cancel2._stream = stream;\n cancel2._teeState = teeState;\n\n var underlyingSource1 = Object.create(Object.prototype);\n createDataProperty(underlyingSource1, 'pull', pull);\n createDataProperty(underlyingSource1, 'cancel', cancel1);\n var branch1Stream = new ReadableStream(underlyingSource1);\n\n var underlyingSource2 = Object.create(Object.prototype);\n createDataProperty(underlyingSource2, 'pull', pull);\n createDataProperty(underlyingSource2, 'cancel', cancel2);\n var branch2Stream = new ReadableStream(underlyingSource2);\n\n pull._branch1 = branch1Stream._readableStreamController;\n pull._branch2 = branch2Stream._readableStreamController;\n\n reader._closedPromise.catch(function (r) {\n if (teeState.closedOrErrored === true) {\n return;\n }\n\n ReadableStreamDefaultControllerError(pull._branch1, r);\n ReadableStreamDefaultControllerError(pull._branch2, r);\n teeState.closedOrErrored = true;\n });\n\n return [branch1Stream, branch2Stream];\n}\n\nfunction create_ReadableStreamTeePullFunction() {\n function f() {\n var reader = f._reader,\n branch1 = f._branch1,\n branch2 = f._branch2,\n teeState = f._teeState;\n\n\n return ReadableStreamDefaultReaderRead(reader).then(function (result) {\n assert(typeIsObject(result));\n var value = result.value;\n var done = result.done;\n assert(typeof done === 'boolean');\n\n if (done === true && teeState.closedOrErrored === false) {\n if (teeState.canceled1 === false) {\n ReadableStreamDefaultControllerClose(branch1);\n }\n if (teeState.canceled2 === false) {\n ReadableStreamDefaultControllerClose(branch2);\n }\n teeState.closedOrErrored = true;\n }\n\n if (teeState.closedOrErrored === true) {\n return;\n }\n\n var value1 = value;\n var value2 = value;\n\n // There is no way to access the cloning code right now in the reference implementation.\n // If we add one then we'll need an implementation for serializable objects.\n // if (teeState.canceled2 === false && cloneForBranch2 === true) {\n // value2 = StructuredDeserialize(StructuredSerialize(value2));\n // }\n\n if (teeState.canceled1 === false) {\n ReadableStreamDefaultControllerEnqueue(branch1, value1);\n }\n\n if (teeState.canceled2 === false) {\n ReadableStreamDefaultControllerEnqueue(branch2, value2);\n }\n });\n }\n return f;\n}\n\nfunction create_ReadableStreamTeeBranch1CancelFunction() {\n function f(reason) {\n var stream = f._stream,\n teeState = f._teeState;\n\n\n teeState.canceled1 = true;\n teeState.reason1 = reason;\n if (teeState.canceled2 === true) {\n var compositeReason = createArrayFromList([teeState.reason1, teeState.reason2]);\n var cancelResult = ReadableStreamCancel(stream, compositeReason);\n teeState._resolve(cancelResult);\n }\n return teeState.promise;\n }\n return f;\n}\n\nfunction create_ReadableStreamTeeBranch2CancelFunction() {\n function f(reason) {\n var stream = f._stream,\n teeState = f._teeState;\n\n\n teeState.canceled2 = true;\n teeState.reason2 = reason;\n if (teeState.canceled1 === true) {\n var compositeReason = createArrayFromList([teeState.reason1, teeState.reason2]);\n var cancelResult = ReadableStreamCancel(stream, compositeReason);\n teeState._resolve(cancelResult);\n }\n return teeState.promise;\n }\n return f;\n}\n\n// ReadableStream API exposed for controllers.\n\nfunction ReadableStreamAddReadIntoRequest(stream) {\n assert(IsReadableStreamBYOBReader(stream._reader) === true);\n assert(stream._state === 'readable' || stream._state === 'closed');\n\n var promise = new Promise(function (resolve, reject) {\n var readIntoRequest = {\n _resolve: resolve,\n _reject: reject\n };\n\n stream._reader._readIntoRequests.push(readIntoRequest);\n });\n\n return promise;\n}\n\nfunction ReadableStreamAddReadRequest(stream) {\n assert(IsReadableStreamDefaultReader(stream._reader) === true);\n assert(stream._state === 'readable');\n\n var promise = new Promise(function (resolve, reject) {\n var readRequest = {\n _resolve: resolve,\n _reject: reject\n };\n\n stream._reader._readRequests.push(readRequest);\n });\n\n return promise;\n}\n\nfunction ReadableStreamCancel(stream, reason) {\n stream._disturbed = true;\n\n if (stream._state === 'closed') {\n return Promise.resolve(undefined);\n }\n if (stream._state === 'errored') {\n return Promise.reject(stream._storedError);\n }\n\n ReadableStreamClose(stream);\n\n var sourceCancelPromise = stream._readableStreamController.__cancelSteps(reason);\n return sourceCancelPromise.then(function () {\n return undefined;\n });\n}\n\nfunction ReadableStreamClose(stream) {\n assert(stream._state === 'readable');\n\n stream._state = 'closed';\n\n var reader = stream._reader;\n\n if (reader === undefined) {\n return undefined;\n }\n\n if (IsReadableStreamDefaultReader(reader) === true) {\n for (var i = 0; i < reader._readRequests.length; i++) {\n var _resolve = reader._readRequests[i]._resolve;\n\n _resolve(CreateIterResultObject(undefined, true));\n }\n reader._readRequests = [];\n }\n\n defaultReaderClosedPromiseResolve(reader);\n\n return undefined;\n}\n\nfunction ReadableStreamError(stream, e) {\n assert(IsReadableStream(stream) === true, 'stream must be ReadableStream');\n assert(stream._state === 'readable', 'state must be readable');\n\n stream._state = 'errored';\n stream._storedError = e;\n\n var reader = stream._reader;\n\n if (reader === undefined) {\n return undefined;\n }\n\n if (IsReadableStreamDefaultReader(reader) === true) {\n for (var i = 0; i < reader._readRequests.length; i++) {\n var readRequest = reader._readRequests[i];\n readRequest._reject(e);\n }\n\n reader._readRequests = [];\n } else {\n assert(IsReadableStreamBYOBReader(reader), 'reader must be ReadableStreamBYOBReader');\n\n for (var _i = 0; _i < reader._readIntoRequests.length; _i++) {\n var readIntoRequest = reader._readIntoRequests[_i];\n readIntoRequest._reject(e);\n }\n\n reader._readIntoRequests = [];\n }\n\n defaultReaderClosedPromiseReject(reader, e);\n reader._closedPromise.catch(function () {});\n}\n\nfunction ReadableStreamFulfillReadIntoRequest(stream, chunk, done) {\n var reader = stream._reader;\n\n assert(reader._readIntoRequests.length > 0);\n\n var readIntoRequest = reader._readIntoRequests.shift();\n readIntoRequest._resolve(CreateIterResultObject(chunk, done));\n}\n\nfunction ReadableStreamFulfillReadRequest(stream, chunk, done) {\n var reader = stream._reader;\n\n assert(reader._readRequests.length > 0);\n\n var readRequest = reader._readRequests.shift();\n readRequest._resolve(CreateIterResultObject(chunk, done));\n}\n\nfunction ReadableStreamGetNumReadIntoRequests(stream) {\n return stream._reader._readIntoRequests.length;\n}\n\nfunction ReadableStreamGetNumReadRequests(stream) {\n return stream._reader._readRequests.length;\n}\n\nfunction ReadableStreamHasBYOBReader(stream) {\n var reader = stream._reader;\n\n if (reader === undefined) {\n return false;\n }\n\n if (IsReadableStreamBYOBReader(reader) === false) {\n return false;\n }\n\n return true;\n}\n\nfunction ReadableStreamHasDefaultReader(stream) {\n var reader = stream._reader;\n\n if (reader === undefined) {\n return false;\n }\n\n if (IsReadableStreamDefaultReader(reader) === false) {\n return false;\n }\n\n return true;\n}\n\n// Readers\n\nvar ReadableStreamDefaultReader = function () {\n function ReadableStreamDefaultReader(stream) {\n _classCallCheck(this, ReadableStreamDefaultReader);\n\n if (IsReadableStream(stream) === false) {\n throw new TypeError('ReadableStreamDefaultReader can only be constructed with a ReadableStream instance');\n }\n if (IsReadableStreamLocked(stream) === true) {\n throw new TypeError('This stream has already been locked for exclusive reading by another reader');\n }\n\n ReadableStreamReaderGenericInitialize(this, stream);\n\n this._readRequests = [];\n }\n\n _createClass(ReadableStreamDefaultReader, [{\n key: 'cancel',\n value: function cancel(reason) {\n if (IsReadableStreamDefaultReader(this) === false) {\n return Promise.reject(defaultReaderBrandCheckException('cancel'));\n }\n\n if (this._ownerReadableStream === undefined) {\n return Promise.reject(readerLockException('cancel'));\n }\n\n return ReadableStreamReaderGenericCancel(this, reason);\n }\n }, {\n key: 'read',\n value: function read() {\n if (IsReadableStreamDefaultReader(this) === false) {\n return Promise.reject(defaultReaderBrandCheckException('read'));\n }\n\n if (this._ownerReadableStream === undefined) {\n return Promise.reject(readerLockException('read from'));\n }\n\n return ReadableStreamDefaultReaderRead(this);\n }\n }, {\n key: 'releaseLock',\n value: function releaseLock() {\n if (IsReadableStreamDefaultReader(this) === false) {\n throw defaultReaderBrandCheckException('releaseLock');\n }\n\n if (this._ownerReadableStream === undefined) {\n return;\n }\n\n if (this._readRequests.length > 0) {\n throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled');\n }\n\n ReadableStreamReaderGenericRelease(this);\n }\n }, {\n key: 'closed',\n get: function get() {\n if (IsReadableStreamDefaultReader(this) === false) {\n return Promise.reject(defaultReaderBrandCheckException('closed'));\n }\n\n return this._closedPromise;\n }\n }]);\n\n return ReadableStreamDefaultReader;\n}();\n\nvar ReadableStreamBYOBReader = function () {\n function ReadableStreamBYOBReader(stream) {\n _classCallCheck(this, ReadableStreamBYOBReader);\n\n if (!IsReadableStream(stream)) {\n throw new TypeError('ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a ' + 'byte source');\n }\n if (IsReadableByteStreamController(stream._readableStreamController) === false) {\n throw new TypeError('Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte ' + 'source');\n }\n if (IsReadableStreamLocked(stream)) {\n throw new TypeError('This stream has already been locked for exclusive reading by another reader');\n }\n\n ReadableStreamReaderGenericInitialize(this, stream);\n\n this._readIntoRequests = [];\n }\n\n _createClass(ReadableStreamBYOBReader, [{\n key: 'cancel',\n value: function cancel(reason) {\n if (!IsReadableStreamBYOBReader(this)) {\n return Promise.reject(byobReaderBrandCheckException('cancel'));\n }\n\n if (this._ownerReadableStream === undefined) {\n return Promise.reject(readerLockException('cancel'));\n }\n\n return ReadableStreamReaderGenericCancel(this, reason);\n }\n }, {\n key: 'read',\n value: function read(view) {\n if (!IsReadableStreamBYOBReader(this)) {\n return Promise.reject(byobReaderBrandCheckException('read'));\n }\n\n if (this._ownerReadableStream === undefined) {\n return Promise.reject(readerLockException('read from'));\n }\n\n if (!ArrayBuffer.isView(view)) {\n return Promise.reject(new TypeError('view must be an array buffer view'));\n }\n\n if (view.byteLength === 0) {\n return Promise.reject(new TypeError('view must have non-zero byteLength'));\n }\n\n return ReadableStreamBYOBReaderRead(this, view);\n }\n }, {\n key: 'releaseLock',\n value: function releaseLock() {\n if (!IsReadableStreamBYOBReader(this)) {\n throw byobReaderBrandCheckException('releaseLock');\n }\n\n if (this._ownerReadableStream === undefined) {\n return;\n }\n\n if (this._readIntoRequests.length > 0) {\n throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled');\n }\n\n ReadableStreamReaderGenericRelease(this);\n }\n }, {\n key: 'closed',\n get: function get() {\n if (!IsReadableStreamBYOBReader(this)) {\n return Promise.reject(byobReaderBrandCheckException('closed'));\n }\n\n return this._closedPromise;\n }\n }]);\n\n return ReadableStreamBYOBReader;\n}();\n\n// Abstract operations for the readers.\n\nfunction IsReadableStreamBYOBReader(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n\n if (!Object.prototype.hasOwnProperty.call(x, '_readIntoRequests')) {\n return false;\n }\n\n return true;\n}\n\nfunction IsReadableStreamDefaultReader(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n\n if (!Object.prototype.hasOwnProperty.call(x, '_readRequests')) {\n return false;\n }\n\n return true;\n}\n\nfunction ReadableStreamReaderGenericInitialize(reader, stream) {\n reader._ownerReadableStream = stream;\n stream._reader = reader;\n\n if (stream._state === 'readable') {\n defaultReaderClosedPromiseInitialize(reader);\n } else if (stream._state === 'closed') {\n defaultReaderClosedPromiseInitializeAsResolved(reader);\n } else {\n assert(stream._state === 'errored', 'state must be errored');\n\n defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError);\n reader._closedPromise.catch(function () {});\n }\n}\n\n// A client of ReadableStreamDefaultReader and ReadableStreamBYOBReader may use these functions directly to bypass state\n// check.\n\nfunction ReadableStreamReaderGenericCancel(reader, reason) {\n var stream = reader._ownerReadableStream;\n assert(stream !== undefined);\n return ReadableStreamCancel(stream, reason);\n}\n\nfunction ReadableStreamReaderGenericRelease(reader) {\n assert(reader._ownerReadableStream !== undefined);\n assert(reader._ownerReadableStream._reader === reader);\n\n if (reader._ownerReadableStream._state === 'readable') {\n defaultReaderClosedPromiseReject(reader, new TypeError('Reader was released and can no longer be used to monitor the stream\\'s closedness'));\n } else {\n defaultReaderClosedPromiseResetToRejected(reader, new TypeError('Reader was released and can no longer be used to monitor the stream\\'s closedness'));\n }\n reader._closedPromise.catch(function () {});\n\n reader._ownerReadableStream._reader = undefined;\n reader._ownerReadableStream = undefined;\n}\n\nfunction ReadableStreamBYOBReaderRead(reader, view) {\n var stream = reader._ownerReadableStream;\n\n assert(stream !== undefined);\n\n stream._disturbed = true;\n\n if (stream._state === 'errored') {\n return Promise.reject(stream._storedError);\n }\n\n // Controllers must implement this.\n return ReadableByteStreamControllerPullInto(stream._readableStreamController, view);\n}\n\nfunction ReadableStreamDefaultReaderRead(reader) {\n var stream = reader._ownerReadableStream;\n\n assert(stream !== undefined);\n\n stream._disturbed = true;\n\n if (stream._state === 'closed') {\n return Promise.resolve(CreateIterResultObject(undefined, true));\n }\n\n if (stream._state === 'errored') {\n return Promise.reject(stream._storedError);\n }\n\n assert(stream._state === 'readable');\n\n return stream._readableStreamController.__pullSteps();\n}\n\n// Controllers\n\nvar ReadableStreamDefaultController = function () {\n function ReadableStreamDefaultController(stream, underlyingSource, size, highWaterMark) {\n _classCallCheck(this, ReadableStreamDefaultController);\n\n if (IsReadableStream(stream) === false) {\n throw new TypeError('ReadableStreamDefaultController can only be constructed with a ReadableStream instance');\n }\n\n if (stream._readableStreamController !== undefined) {\n throw new TypeError('ReadableStreamDefaultController instances can only be created by the ReadableStream constructor');\n }\n\n this._controlledReadableStream = stream;\n\n this._underlyingSource = underlyingSource;\n\n // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly.\n this._queue = undefined;\n this._queueTotalSize = undefined;\n ResetQueue(this);\n\n this._started = false;\n this._closeRequested = false;\n this._pullAgain = false;\n this._pulling = false;\n\n var normalizedStrategy = ValidateAndNormalizeQueuingStrategy(size, highWaterMark);\n this._strategySize = normalizedStrategy.size;\n this._strategyHWM = normalizedStrategy.highWaterMark;\n\n var controller = this;\n\n var startResult = InvokeOrNoop(underlyingSource, 'start', [this]);\n Promise.resolve(startResult).then(function () {\n controller._started = true;\n\n assert(controller._pulling === false);\n assert(controller._pullAgain === false);\n\n ReadableStreamDefaultControllerCallPullIfNeeded(controller);\n }, function (r) {\n ReadableStreamDefaultControllerErrorIfNeeded(controller, r);\n }).catch(rethrowAssertionErrorRejection);\n }\n\n _createClass(ReadableStreamDefaultController, [{\n key: 'close',\n value: function close() {\n if (IsReadableStreamDefaultController(this) === false) {\n throw defaultControllerBrandCheckException('close');\n }\n\n if (this._closeRequested === true) {\n throw new TypeError('The stream has already been closed; do not close it again!');\n }\n\n var state = this._controlledReadableStream._state;\n if (state !== 'readable') {\n throw new TypeError('The stream (in ' + state + ' state) is not in the readable state and cannot be closed');\n }\n\n ReadableStreamDefaultControllerClose(this);\n }\n }, {\n key: 'enqueue',\n value: function enqueue(chunk) {\n if (IsReadableStreamDefaultController(this) === false) {\n throw defaultControllerBrandCheckException('enqueue');\n }\n\n if (this._closeRequested === true) {\n throw new TypeError('stream is closed or draining');\n }\n\n var state = this._controlledReadableStream._state;\n if (state !== 'readable') {\n throw new TypeError('The stream (in ' + state + ' state) is not in the readable state and cannot be enqueued to');\n }\n\n return ReadableStreamDefaultControllerEnqueue(this, chunk);\n }\n }, {\n key: 'error',\n value: function error(e) {\n if (IsReadableStreamDefaultController(this) === false) {\n throw defaultControllerBrandCheckException('error');\n }\n\n var stream = this._controlledReadableStream;\n if (stream._state !== 'readable') {\n throw new TypeError('The stream is ' + stream._state + ' and so cannot be errored');\n }\n\n ReadableStreamDefaultControllerError(this, e);\n }\n }, {\n key: '__cancelSteps',\n value: function __cancelSteps(reason) {\n ResetQueue(this);\n return PromiseInvokeOrNoop(this._underlyingSource, 'cancel', [reason]);\n }\n }, {\n key: '__pullSteps',\n value: function __pullSteps() {\n var stream = this._controlledReadableStream;\n\n if (this._queue.length > 0) {\n var chunk = DequeueValue(this);\n\n if (this._closeRequested === true && this._queue.length === 0) {\n ReadableStreamClose(stream);\n } else {\n ReadableStreamDefaultControllerCallPullIfNeeded(this);\n }\n\n return Promise.resolve(CreateIterResultObject(chunk, false));\n }\n\n var pendingPromise = ReadableStreamAddReadRequest(stream);\n ReadableStreamDefaultControllerCallPullIfNeeded(this);\n return pendingPromise;\n }\n }, {\n key: 'desiredSize',\n get: function get() {\n if (IsReadableStreamDefaultController(this) === false) {\n throw defaultControllerBrandCheckException('desiredSize');\n }\n\n return ReadableStreamDefaultControllerGetDesiredSize(this);\n }\n }]);\n\n return ReadableStreamDefaultController;\n}();\n\n// Abstract operations for the ReadableStreamDefaultController.\n\nfunction IsReadableStreamDefaultController(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n\n if (!Object.prototype.hasOwnProperty.call(x, '_underlyingSource')) {\n return false;\n }\n\n return true;\n}\n\nfunction ReadableStreamDefaultControllerCallPullIfNeeded(controller) {\n var shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller);\n if (shouldPull === false) {\n return undefined;\n }\n\n if (controller._pulling === true) {\n controller._pullAgain = true;\n return undefined;\n }\n\n assert(controller._pullAgain === false);\n\n controller._pulling = true;\n\n var pullPromise = PromiseInvokeOrNoop(controller._underlyingSource, 'pull', [controller]);\n pullPromise.then(function () {\n controller._pulling = false;\n\n if (controller._pullAgain === true) {\n controller._pullAgain = false;\n return ReadableStreamDefaultControllerCallPullIfNeeded(controller);\n }\n return undefined;\n }, function (e) {\n ReadableStreamDefaultControllerErrorIfNeeded(controller, e);\n }).catch(rethrowAssertionErrorRejection);\n\n return undefined;\n}\n\nfunction ReadableStreamDefaultControllerShouldCallPull(controller) {\n var stream = controller._controlledReadableStream;\n\n if (stream._state === 'closed' || stream._state === 'errored') {\n return false;\n }\n\n if (controller._closeRequested === true) {\n return false;\n }\n\n if (controller._started === false) {\n return false;\n }\n\n if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) {\n return true;\n }\n\n var desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller);\n if (desiredSize > 0) {\n return true;\n }\n\n return false;\n}\n\n// A client of ReadableStreamDefaultController may use these functions directly to bypass state check.\n\nfunction ReadableStreamDefaultControllerClose(controller) {\n var stream = controller._controlledReadableStream;\n\n assert(controller._closeRequested === false);\n assert(stream._state === 'readable');\n\n controller._closeRequested = true;\n\n if (controller._queue.length === 0) {\n ReadableStreamClose(stream);\n }\n}\n\nfunction ReadableStreamDefaultControllerEnqueue(controller, chunk) {\n var stream = controller._controlledReadableStream;\n\n assert(controller._closeRequested === false);\n assert(stream._state === 'readable');\n\n if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) {\n ReadableStreamFulfillReadRequest(stream, chunk, false);\n } else {\n var chunkSize = 1;\n\n if (controller._strategySize !== undefined) {\n var strategySize = controller._strategySize;\n try {\n chunkSize = strategySize(chunk);\n } catch (chunkSizeE) {\n ReadableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE);\n throw chunkSizeE;\n }\n }\n\n try {\n EnqueueValueWithSize(controller, chunk, chunkSize);\n } catch (enqueueE) {\n ReadableStreamDefaultControllerErrorIfNeeded(controller, enqueueE);\n throw enqueueE;\n }\n }\n\n ReadableStreamDefaultControllerCallPullIfNeeded(controller);\n\n return undefined;\n}\n\nfunction ReadableStreamDefaultControllerError(controller, e) {\n var stream = controller._controlledReadableStream;\n\n assert(stream._state === 'readable');\n\n ResetQueue(controller);\n\n ReadableStreamError(stream, e);\n}\n\nfunction ReadableStreamDefaultControllerErrorIfNeeded(controller, e) {\n if (controller._controlledReadableStream._state === 'readable') {\n ReadableStreamDefaultControllerError(controller, e);\n }\n}\n\nfunction ReadableStreamDefaultControllerGetDesiredSize(controller) {\n var stream = controller._controlledReadableStream;\n var state = stream._state;\n\n if (state === 'errored') {\n return null;\n }\n if (state === 'closed') {\n return 0;\n }\n\n return controller._strategyHWM - controller._queueTotalSize;\n}\n\nvar ReadableStreamBYOBRequest = function () {\n function ReadableStreamBYOBRequest(controller, view) {\n _classCallCheck(this, ReadableStreamBYOBRequest);\n\n this._associatedReadableByteStreamController = controller;\n this._view = view;\n }\n\n _createClass(ReadableStreamBYOBRequest, [{\n key: 'respond',\n value: function respond(bytesWritten) {\n if (IsReadableStreamBYOBRequest(this) === false) {\n throw byobRequestBrandCheckException('respond');\n }\n\n if (this._associatedReadableByteStreamController === undefined) {\n throw new TypeError('This BYOB request has been invalidated');\n }\n\n ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController, bytesWritten);\n }\n }, {\n key: 'respondWithNewView',\n value: function respondWithNewView(view) {\n if (IsReadableStreamBYOBRequest(this) === false) {\n throw byobRequestBrandCheckException('respond');\n }\n\n if (this._associatedReadableByteStreamController === undefined) {\n throw new TypeError('This BYOB request has been invalidated');\n }\n\n if (!ArrayBuffer.isView(view)) {\n throw new TypeError('You can only respond with array buffer views');\n }\n\n ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController, view);\n }\n }, {\n key: 'view',\n get: function get() {\n return this._view;\n }\n }]);\n\n return ReadableStreamBYOBRequest;\n}();\n\nvar ReadableByteStreamController = function () {\n function ReadableByteStreamController(stream, underlyingByteSource, highWaterMark) {\n _classCallCheck(this, ReadableByteStreamController);\n\n if (IsReadableStream(stream) === false) {\n throw new TypeError('ReadableByteStreamController can only be constructed with a ReadableStream instance given ' + 'a byte source');\n }\n\n if (stream._readableStreamController !== undefined) {\n throw new TypeError('ReadableByteStreamController instances can only be created by the ReadableStream constructor given a byte ' + 'source');\n }\n\n this._controlledReadableStream = stream;\n\n this._underlyingByteSource = underlyingByteSource;\n\n this._pullAgain = false;\n this._pulling = false;\n\n ReadableByteStreamControllerClearPendingPullIntos(this);\n\n // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly.\n this._queue = this._queueTotalSize = undefined;\n ResetQueue(this);\n\n this._closeRequested = false;\n this._started = false;\n\n this._strategyHWM = ValidateAndNormalizeHighWaterMark(highWaterMark);\n\n var autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize;\n if (autoAllocateChunkSize !== undefined) {\n if (Number.isInteger(autoAllocateChunkSize) === false || autoAllocateChunkSize <= 0) {\n throw new RangeError('autoAllocateChunkSize must be a positive integer');\n }\n }\n this._autoAllocateChunkSize = autoAllocateChunkSize;\n\n this._pendingPullIntos = [];\n\n var controller = this;\n\n var startResult = InvokeOrNoop(underlyingByteSource, 'start', [this]);\n Promise.resolve(startResult).then(function () {\n controller._started = true;\n\n assert(controller._pulling === false);\n assert(controller._pullAgain === false);\n\n ReadableByteStreamControllerCallPullIfNeeded(controller);\n }, function (r) {\n if (stream._state === 'readable') {\n ReadableByteStreamControllerError(controller, r);\n }\n }).catch(rethrowAssertionErrorRejection);\n }\n\n _createClass(ReadableByteStreamController, [{\n key: 'close',\n value: function close() {\n if (IsReadableByteStreamController(this) === false) {\n throw byteStreamControllerBrandCheckException('close');\n }\n\n if (this._closeRequested === true) {\n throw new TypeError('The stream has already been closed; do not close it again!');\n }\n\n var state = this._controlledReadableStream._state;\n if (state !== 'readable') {\n throw new TypeError('The stream (in ' + state + ' state) is not in the readable state and cannot be closed');\n }\n\n ReadableByteStreamControllerClose(this);\n }\n }, {\n key: 'enqueue',\n value: function enqueue(chunk) {\n if (IsReadableByteStreamController(this) === false) {\n throw byteStreamControllerBrandCheckException('enqueue');\n }\n\n if (this._closeRequested === true) {\n throw new TypeError('stream is closed or draining');\n }\n\n var state = this._controlledReadableStream._state;\n if (state !== 'readable') {\n throw new TypeError('The stream (in ' + state + ' state) is not in the readable state and cannot be enqueued to');\n }\n\n if (!ArrayBuffer.isView(chunk)) {\n throw new TypeError('You can only enqueue array buffer views when using a ReadableByteStreamController');\n }\n\n ReadableByteStreamControllerEnqueue(this, chunk);\n }\n }, {\n key: 'error',\n value: function error(e) {\n if (IsReadableByteStreamController(this) === false) {\n throw byteStreamControllerBrandCheckException('error');\n }\n\n var stream = this._controlledReadableStream;\n if (stream._state !== 'readable') {\n throw new TypeError('The stream is ' + stream._state + ' and so cannot be errored');\n }\n\n ReadableByteStreamControllerError(this, e);\n }\n }, {\n key: '__cancelSteps',\n value: function __cancelSteps(reason) {\n if (this._pendingPullIntos.length > 0) {\n var firstDescriptor = this._pendingPullIntos[0];\n firstDescriptor.bytesFilled = 0;\n }\n\n ResetQueue(this);\n\n return PromiseInvokeOrNoop(this._underlyingByteSource, 'cancel', [reason]);\n }\n }, {\n key: '__pullSteps',\n value: function __pullSteps() {\n var stream = this._controlledReadableStream;\n assert(ReadableStreamHasDefaultReader(stream) === true);\n\n if (this._queueTotalSize > 0) {\n assert(ReadableStreamGetNumReadRequests(stream) === 0);\n\n var entry = this._queue.shift();\n this._queueTotalSize -= entry.byteLength;\n\n ReadableByteStreamControllerHandleQueueDrain(this);\n\n var view = void 0;\n try {\n view = new Uint8Array(entry.buffer, entry.byteOffset, entry.byteLength);\n } catch (viewE) {\n return Promise.reject(viewE);\n }\n\n return Promise.resolve(CreateIterResultObject(view, false));\n }\n\n var autoAllocateChunkSize = this._autoAllocateChunkSize;\n if (autoAllocateChunkSize !== undefined) {\n var buffer = void 0;\n try {\n buffer = new ArrayBuffer(autoAllocateChunkSize);\n } catch (bufferE) {\n return Promise.reject(bufferE);\n }\n\n var pullIntoDescriptor = {\n buffer: buffer,\n byteOffset: 0,\n byteLength: autoAllocateChunkSize,\n bytesFilled: 0,\n elementSize: 1,\n ctor: Uint8Array,\n readerType: 'default'\n };\n\n this._pendingPullIntos.push(pullIntoDescriptor);\n }\n\n var promise = ReadableStreamAddReadRequest(stream);\n\n ReadableByteStreamControllerCallPullIfNeeded(this);\n\n return promise;\n }\n }, {\n key: 'byobRequest',\n get: function get() {\n if (IsReadableByteStreamController(this) === false) {\n throw byteStreamControllerBrandCheckException('byobRequest');\n }\n\n if (this._byobRequest === undefined && this._pendingPullIntos.length > 0) {\n var firstDescriptor = this._pendingPullIntos[0];\n var view = new Uint8Array(firstDescriptor.buffer, firstDescriptor.byteOffset + firstDescriptor.bytesFilled, firstDescriptor.byteLength - firstDescriptor.bytesFilled);\n\n this._byobRequest = new ReadableStreamBYOBRequest(this, view);\n }\n\n return this._byobRequest;\n }\n }, {\n key: 'desiredSize',\n get: function get() {\n if (IsReadableByteStreamController(this) === false) {\n throw byteStreamControllerBrandCheckException('desiredSize');\n }\n\n return ReadableByteStreamControllerGetDesiredSize(this);\n }\n }]);\n\n return ReadableByteStreamController;\n}();\n\n// Abstract operations for the ReadableByteStreamController.\n\nfunction IsReadableByteStreamController(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n\n if (!Object.prototype.hasOwnProperty.call(x, '_underlyingByteSource')) {\n return false;\n }\n\n return true;\n}\n\nfunction IsReadableStreamBYOBRequest(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n\n if (!Object.prototype.hasOwnProperty.call(x, '_associatedReadableByteStreamController')) {\n return false;\n }\n\n return true;\n}\n\nfunction ReadableByteStreamControllerCallPullIfNeeded(controller) {\n var shouldPull = ReadableByteStreamControllerShouldCallPull(controller);\n if (shouldPull === false) {\n return undefined;\n }\n\n if (controller._pulling === true) {\n controller._pullAgain = true;\n return undefined;\n }\n\n assert(controller._pullAgain === false);\n\n controller._pulling = true;\n\n // TODO: Test controller argument\n var pullPromise = PromiseInvokeOrNoop(controller._underlyingByteSource, 'pull', [controller]);\n pullPromise.then(function () {\n controller._pulling = false;\n\n if (controller._pullAgain === true) {\n controller._pullAgain = false;\n ReadableByteStreamControllerCallPullIfNeeded(controller);\n }\n }, function (e) {\n if (controller._controlledReadableStream._state === 'readable') {\n ReadableByteStreamControllerError(controller, e);\n }\n }).catch(rethrowAssertionErrorRejection);\n\n return undefined;\n}\n\nfunction ReadableByteStreamControllerClearPendingPullIntos(controller) {\n ReadableByteStreamControllerInvalidateBYOBRequest(controller);\n controller._pendingPullIntos = [];\n}\n\nfunction ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor) {\n assert(stream._state !== 'errored', 'state must not be errored');\n\n var done = false;\n if (stream._state === 'closed') {\n assert(pullIntoDescriptor.bytesFilled === 0);\n done = true;\n }\n\n var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);\n if (pullIntoDescriptor.readerType === 'default') {\n ReadableStreamFulfillReadRequest(stream, filledView, done);\n } else {\n assert(pullIntoDescriptor.readerType === 'byob');\n ReadableStreamFulfillReadIntoRequest(stream, filledView, done);\n }\n}\n\nfunction ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor) {\n var bytesFilled = pullIntoDescriptor.bytesFilled;\n var elementSize = pullIntoDescriptor.elementSize;\n\n assert(bytesFilled <= pullIntoDescriptor.byteLength);\n assert(bytesFilled % elementSize === 0);\n\n return new pullIntoDescriptor.ctor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, bytesFilled / elementSize);\n}\n\nfunction ReadableByteStreamControllerEnqueueChunkToQueue(controller, buffer, byteOffset, byteLength) {\n controller._queue.push({ buffer: buffer, byteOffset: byteOffset, byteLength: byteLength });\n controller._queueTotalSize += byteLength;\n}\n\nfunction ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) {\n var elementSize = pullIntoDescriptor.elementSize;\n\n var currentAlignedBytes = pullIntoDescriptor.bytesFilled - pullIntoDescriptor.bytesFilled % elementSize;\n\n var maxBytesToCopy = Math.min(controller._queueTotalSize, pullIntoDescriptor.byteLength - pullIntoDescriptor.bytesFilled);\n var maxBytesFilled = pullIntoDescriptor.bytesFilled + maxBytesToCopy;\n var maxAlignedBytes = maxBytesFilled - maxBytesFilled % elementSize;\n\n var totalBytesToCopyRemaining = maxBytesToCopy;\n var ready = false;\n if (maxAlignedBytes > currentAlignedBytes) {\n totalBytesToCopyRemaining = maxAlignedBytes - pullIntoDescriptor.bytesFilled;\n ready = true;\n }\n\n var queue = controller._queue;\n\n while (totalBytesToCopyRemaining > 0) {\n var headOfQueue = queue[0];\n\n var bytesToCopy = Math.min(totalBytesToCopyRemaining, headOfQueue.byteLength);\n\n var destStart = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled;\n ArrayBufferCopy(pullIntoDescriptor.buffer, destStart, headOfQueue.buffer, headOfQueue.byteOffset, bytesToCopy);\n\n if (headOfQueue.byteLength === bytesToCopy) {\n queue.shift();\n } else {\n headOfQueue.byteOffset += bytesToCopy;\n headOfQueue.byteLength -= bytesToCopy;\n }\n controller._queueTotalSize -= bytesToCopy;\n\n ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesToCopy, pullIntoDescriptor);\n\n totalBytesToCopyRemaining -= bytesToCopy;\n }\n\n if (ready === false) {\n assert(controller._queueTotalSize === 0, 'queue must be empty');\n assert(pullIntoDescriptor.bytesFilled > 0);\n assert(pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize);\n }\n\n return ready;\n}\n\nfunction ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, size, pullIntoDescriptor) {\n assert(controller._pendingPullIntos.length === 0 || controller._pendingPullIntos[0] === pullIntoDescriptor);\n\n ReadableByteStreamControllerInvalidateBYOBRequest(controller);\n pullIntoDescriptor.bytesFilled += size;\n}\n\nfunction ReadableByteStreamControllerHandleQueueDrain(controller) {\n assert(controller._controlledReadableStream._state === 'readable');\n\n if (controller._queueTotalSize === 0 && controller._closeRequested === true) {\n ReadableStreamClose(controller._controlledReadableStream);\n } else {\n ReadableByteStreamControllerCallPullIfNeeded(controller);\n }\n}\n\nfunction ReadableByteStreamControllerInvalidateBYOBRequest(controller) {\n if (controller._byobRequest === undefined) {\n return;\n }\n\n controller._byobRequest._associatedReadableByteStreamController = undefined;\n controller._byobRequest._view = undefined;\n controller._byobRequest = undefined;\n}\n\nfunction ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller) {\n assert(controller._closeRequested === false);\n\n while (controller._pendingPullIntos.length > 0) {\n if (controller._queueTotalSize === 0) {\n return;\n }\n\n var pullIntoDescriptor = controller._pendingPullIntos[0];\n\n if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) === true) {\n ReadableByteStreamControllerShiftPendingPullInto(controller);\n\n ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableStream, pullIntoDescriptor);\n }\n }\n}\n\nfunction ReadableByteStreamControllerPullInto(controller, view) {\n var stream = controller._controlledReadableStream;\n\n var elementSize = 1;\n if (view.constructor !== DataView) {\n elementSize = view.constructor.BYTES_PER_ELEMENT;\n }\n\n var ctor = view.constructor;\n\n var pullIntoDescriptor = {\n buffer: view.buffer,\n byteOffset: view.byteOffset,\n byteLength: view.byteLength,\n bytesFilled: 0,\n elementSize: elementSize,\n ctor: ctor,\n readerType: 'byob'\n };\n\n if (controller._pendingPullIntos.length > 0) {\n pullIntoDescriptor.buffer = TransferArrayBuffer(pullIntoDescriptor.buffer);\n controller._pendingPullIntos.push(pullIntoDescriptor);\n\n // No ReadableByteStreamControllerCallPullIfNeeded() call since:\n // - No change happens on desiredSize\n // - The source has already been notified of that there's at least 1 pending read(view)\n\n return ReadableStreamAddReadIntoRequest(stream);\n }\n\n if (stream._state === 'closed') {\n var emptyView = new view.constructor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, 0);\n return Promise.resolve(CreateIterResultObject(emptyView, true));\n }\n\n if (controller._queueTotalSize > 0) {\n if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) === true) {\n var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);\n\n ReadableByteStreamControllerHandleQueueDrain(controller);\n\n return Promise.resolve(CreateIterResultObject(filledView, false));\n }\n\n if (controller._closeRequested === true) {\n var e = new TypeError('Insufficient bytes to fill elements in the given buffer');\n ReadableByteStreamControllerError(controller, e);\n\n return Promise.reject(e);\n }\n }\n\n pullIntoDescriptor.buffer = TransferArrayBuffer(pullIntoDescriptor.buffer);\n controller._pendingPullIntos.push(pullIntoDescriptor);\n\n var promise = ReadableStreamAddReadIntoRequest(stream);\n\n ReadableByteStreamControllerCallPullIfNeeded(controller);\n\n return promise;\n}\n\nfunction ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor) {\n firstDescriptor.buffer = TransferArrayBuffer(firstDescriptor.buffer);\n\n assert(firstDescriptor.bytesFilled === 0, 'bytesFilled must be 0');\n\n var stream = controller._controlledReadableStream;\n if (ReadableStreamHasBYOBReader(stream) === true) {\n while (ReadableStreamGetNumReadIntoRequests(stream) > 0) {\n var pullIntoDescriptor = ReadableByteStreamControllerShiftPendingPullInto(controller);\n ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor);\n }\n }\n}\n\nfunction ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, pullIntoDescriptor) {\n if (pullIntoDescriptor.bytesFilled + bytesWritten > pullIntoDescriptor.byteLength) {\n throw new RangeError('bytesWritten out of range');\n }\n\n ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesWritten, pullIntoDescriptor);\n\n if (pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize) {\n // TODO: Figure out whether we should detach the buffer or not here.\n return;\n }\n\n ReadableByteStreamControllerShiftPendingPullInto(controller);\n\n var remainderSize = pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize;\n if (remainderSize > 0) {\n var end = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled;\n var remainder = pullIntoDescriptor.buffer.slice(end - remainderSize, end);\n ReadableByteStreamControllerEnqueueChunkToQueue(controller, remainder, 0, remainder.byteLength);\n }\n\n pullIntoDescriptor.buffer = TransferArrayBuffer(pullIntoDescriptor.buffer);\n pullIntoDescriptor.bytesFilled -= remainderSize;\n ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableStream, pullIntoDescriptor);\n\n ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller);\n}\n\nfunction ReadableByteStreamControllerRespondInternal(controller, bytesWritten) {\n var firstDescriptor = controller._pendingPullIntos[0];\n\n var stream = controller._controlledReadableStream;\n\n if (stream._state === 'closed') {\n if (bytesWritten !== 0) {\n throw new TypeError('bytesWritten must be 0 when calling respond() on a closed stream');\n }\n\n ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor);\n } else {\n assert(stream._state === 'readable');\n\n ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor);\n }\n}\n\nfunction ReadableByteStreamControllerShiftPendingPullInto(controller) {\n var descriptor = controller._pendingPullIntos.shift();\n ReadableByteStreamControllerInvalidateBYOBRequest(controller);\n return descriptor;\n}\n\nfunction ReadableByteStreamControllerShouldCallPull(controller) {\n var stream = controller._controlledReadableStream;\n\n if (stream._state !== 'readable') {\n return false;\n }\n\n if (controller._closeRequested === true) {\n return false;\n }\n\n if (controller._started === false) {\n return false;\n }\n\n if (ReadableStreamHasDefaultReader(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) {\n return true;\n }\n\n if (ReadableStreamHasBYOBReader(stream) === true && ReadableStreamGetNumReadIntoRequests(stream) > 0) {\n return true;\n }\n\n if (ReadableByteStreamControllerGetDesiredSize(controller) > 0) {\n return true;\n }\n\n return false;\n}\n\n// A client of ReadableByteStreamController may use these functions directly to bypass state check.\n\nfunction ReadableByteStreamControllerClose(controller) {\n var stream = controller._controlledReadableStream;\n\n assert(controller._closeRequested === false);\n assert(stream._state === 'readable');\n\n if (controller._queueTotalSize > 0) {\n controller._closeRequested = true;\n\n return;\n }\n\n if (controller._pendingPullIntos.length > 0) {\n var firstPendingPullInto = controller._pendingPullIntos[0];\n if (firstPendingPullInto.bytesFilled > 0) {\n var e = new TypeError('Insufficient bytes to fill elements in the given buffer');\n ReadableByteStreamControllerError(controller, e);\n\n throw e;\n }\n }\n\n ReadableStreamClose(stream);\n}\n\nfunction ReadableByteStreamControllerEnqueue(controller, chunk) {\n var stream = controller._controlledReadableStream;\n\n assert(controller._closeRequested === false);\n assert(stream._state === 'readable');\n\n var buffer = chunk.buffer;\n var byteOffset = chunk.byteOffset;\n var byteLength = chunk.byteLength;\n var transferredBuffer = TransferArrayBuffer(buffer);\n\n if (ReadableStreamHasDefaultReader(stream) === true) {\n if (ReadableStreamGetNumReadRequests(stream) === 0) {\n ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);\n } else {\n assert(controller._queue.length === 0);\n\n var transferredView = new Uint8Array(transferredBuffer, byteOffset, byteLength);\n ReadableStreamFulfillReadRequest(stream, transferredView, false);\n }\n } else if (ReadableStreamHasBYOBReader(stream) === true) {\n // TODO: Ideally in this branch detaching should happen only if the buffer is not consumed fully.\n ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);\n ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller);\n } else {\n assert(IsReadableStreamLocked(stream) === false, 'stream must not be locked');\n ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);\n }\n}\n\nfunction ReadableByteStreamControllerError(controller, e) {\n var stream = controller._controlledReadableStream;\n\n assert(stream._state === 'readable');\n\n ReadableByteStreamControllerClearPendingPullIntos(controller);\n\n ResetQueue(controller);\n ReadableStreamError(stream, e);\n}\n\nfunction ReadableByteStreamControllerGetDesiredSize(controller) {\n var stream = controller._controlledReadableStream;\n var state = stream._state;\n\n if (state === 'errored') {\n return null;\n }\n if (state === 'closed') {\n return 0;\n }\n\n return controller._strategyHWM - controller._queueTotalSize;\n}\n\nfunction ReadableByteStreamControllerRespond(controller, bytesWritten) {\n bytesWritten = Number(bytesWritten);\n if (IsFiniteNonNegativeNumber(bytesWritten) === false) {\n throw new RangeError('bytesWritten must be a finite');\n }\n\n assert(controller._pendingPullIntos.length > 0);\n\n ReadableByteStreamControllerRespondInternal(controller, bytesWritten);\n}\n\nfunction ReadableByteStreamControllerRespondWithNewView(controller, view) {\n assert(controller._pendingPullIntos.length > 0);\n\n var firstDescriptor = controller._pendingPullIntos[0];\n\n if (firstDescriptor.byteOffset + firstDescriptor.bytesFilled !== view.byteOffset) {\n throw new RangeError('The region specified by view does not match byobRequest');\n }\n if (firstDescriptor.byteLength !== view.byteLength) {\n throw new RangeError('The buffer of view has different capacity than byobRequest');\n }\n\n firstDescriptor.buffer = view.buffer;\n\n ReadableByteStreamControllerRespondInternal(controller, view.byteLength);\n}\n\n// Helper functions for the ReadableStream.\n\nfunction streamBrandCheckException(name) {\n return new TypeError('ReadableStream.prototype.' + name + ' can only be used on a ReadableStream');\n}\n\n// Helper functions for the readers.\n\nfunction readerLockException(name) {\n return new TypeError('Cannot ' + name + ' a stream using a released reader');\n}\n\n// Helper functions for the ReadableStreamDefaultReader.\n\nfunction defaultReaderBrandCheckException(name) {\n return new TypeError('ReadableStreamDefaultReader.prototype.' + name + ' can only be used on a ReadableStreamDefaultReader');\n}\n\nfunction defaultReaderClosedPromiseInitialize(reader) {\n reader._closedPromise = new Promise(function (resolve, reject) {\n reader._closedPromise_resolve = resolve;\n reader._closedPromise_reject = reject;\n });\n}\n\nfunction defaultReaderClosedPromiseInitializeAsRejected(reader, reason) {\n reader._closedPromise = Promise.reject(reason);\n reader._closedPromise_resolve = undefined;\n reader._closedPromise_reject = undefined;\n}\n\nfunction defaultReaderClosedPromiseInitializeAsResolved(reader) {\n reader._closedPromise = Promise.resolve(undefined);\n reader._closedPromise_resolve = undefined;\n reader._closedPromise_reject = undefined;\n}\n\nfunction defaultReaderClosedPromiseReject(reader, reason) {\n assert(reader._closedPromise_resolve !== undefined);\n assert(reader._closedPromise_reject !== undefined);\n\n reader._closedPromise_reject(reason);\n reader._closedPromise_resolve = undefined;\n reader._closedPromise_reject = undefined;\n}\n\nfunction defaultReaderClosedPromiseResetToRejected(reader, reason) {\n assert(reader._closedPromise_resolve === undefined);\n assert(reader._closedPromise_reject === undefined);\n\n reader._closedPromise = Promise.reject(reason);\n}\n\nfunction defaultReaderClosedPromiseResolve(reader) {\n assert(reader._closedPromise_resolve !== undefined);\n assert(reader._closedPromise_reject !== undefined);\n\n reader._closedPromise_resolve(undefined);\n reader._closedPromise_resolve = undefined;\n reader._closedPromise_reject = undefined;\n}\n\n// Helper functions for the ReadableStreamDefaultReader.\n\nfunction byobReaderBrandCheckException(name) {\n return new TypeError('ReadableStreamBYOBReader.prototype.' + name + ' can only be used on a ReadableStreamBYOBReader');\n}\n\n// Helper functions for the ReadableStreamDefaultController.\n\nfunction defaultControllerBrandCheckException(name) {\n return new TypeError('ReadableStreamDefaultController.prototype.' + name + ' can only be used on a ReadableStreamDefaultController');\n}\n\n// Helper functions for the ReadableStreamBYOBRequest.\n\nfunction byobRequestBrandCheckException(name) {\n return new TypeError('ReadableStreamBYOBRequest.prototype.' + name + ' can only be used on a ReadableStreamBYOBRequest');\n}\n\n// Helper functions for the ReadableByteStreamController.\n\nfunction byteStreamControllerBrandCheckException(name) {\n return new TypeError('ReadableByteStreamController.prototype.' + name + ' can only be used on a ReadableByteStreamController');\n}\n\n// Helper function for ReadableStream pipeThrough\n\nfunction ifIsObjectAndHasAPromiseIsHandledInternalSlotSetPromiseIsHandledToTrue(promise) {\n try {\n // This relies on the brand-check that is enforced by Promise.prototype.then(). As with the rest of the reference\n // implementation, it doesn't attempt to do the right thing if someone has modified the global environment.\n Promise.prototype.then.call(promise, undefined, function () {});\n } catch (e) {\n // The brand check failed, therefore the internal slot is not present and there's nothing further to do.\n }\n}\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __w_pdfjs_require__) {\n\n\"use strict\";\n\n\nvar transformStream = __w_pdfjs_require__(6);\nvar readableStream = __w_pdfjs_require__(4);\nvar writableStream = __w_pdfjs_require__(2);\n\nexports.TransformStream = transformStream.TransformStream;\nexports.ReadableStream = readableStream.ReadableStream;\nexports.IsReadableStreamDisturbed = readableStream.IsReadableStreamDisturbed;\nexports.ReadableStreamDefaultControllerClose = readableStream.ReadableStreamDefaultControllerClose;\nexports.ReadableStreamDefaultControllerEnqueue = readableStream.ReadableStreamDefaultControllerEnqueue;\nexports.ReadableStreamDefaultControllerError = readableStream.ReadableStreamDefaultControllerError;\nexports.ReadableStreamDefaultControllerGetDesiredSize = readableStream.ReadableStreamDefaultControllerGetDesiredSize;\nexports.AcquireWritableStreamDefaultWriter = writableStream.AcquireWritableStreamDefaultWriter;\nexports.IsWritableStream = writableStream.IsWritableStream;\nexports.IsWritableStreamLocked = writableStream.IsWritableStreamLocked;\nexports.WritableStream = writableStream.WritableStream;\nexports.WritableStreamAbort = writableStream.WritableStreamAbort;\nexports.WritableStreamDefaultControllerError = writableStream.WritableStreamDefaultControllerError;\nexports.WritableStreamDefaultWriterCloseWithErrorPropagation = writableStream.WritableStreamDefaultWriterCloseWithErrorPropagation;\nexports.WritableStreamDefaultWriterRelease = writableStream.WritableStreamDefaultWriterRelease;\nexports.WritableStreamDefaultWriterWrite = writableStream.WritableStreamDefaultWriterWrite;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __w_pdfjs_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar _require = __w_pdfjs_require__(1),\n assert = _require.assert;\n\nvar _require2 = __w_pdfjs_require__(0),\n InvokeOrNoop = _require2.InvokeOrNoop,\n PromiseInvokeOrPerformFallback = _require2.PromiseInvokeOrPerformFallback,\n PromiseInvokeOrNoop = _require2.PromiseInvokeOrNoop,\n typeIsObject = _require2.typeIsObject;\n\nvar _require3 = __w_pdfjs_require__(4),\n ReadableStream = _require3.ReadableStream,\n ReadableStreamDefaultControllerClose = _require3.ReadableStreamDefaultControllerClose,\n ReadableStreamDefaultControllerEnqueue = _require3.ReadableStreamDefaultControllerEnqueue,\n ReadableStreamDefaultControllerError = _require3.ReadableStreamDefaultControllerError,\n ReadableStreamDefaultControllerGetDesiredSize = _require3.ReadableStreamDefaultControllerGetDesiredSize;\n\nvar _require4 = __w_pdfjs_require__(2),\n WritableStream = _require4.WritableStream,\n WritableStreamDefaultControllerError = _require4.WritableStreamDefaultControllerError;\n\n// Methods on the transform stream controller object\n\nfunction TransformStreamCloseReadable(transformStream) {\n // console.log('TransformStreamCloseReadable()');\n\n if (transformStream._errored === true) {\n throw new TypeError('TransformStream is already errored');\n }\n\n if (transformStream._readableClosed === true) {\n throw new TypeError('Readable side is already closed');\n }\n\n TransformStreamCloseReadableInternal(transformStream);\n}\n\nfunction TransformStreamEnqueueToReadable(transformStream, chunk) {\n // console.log('TransformStreamEnqueueToReadable()');\n\n if (transformStream._errored === true) {\n throw new TypeError('TransformStream is already errored');\n }\n\n if (transformStream._readableClosed === true) {\n throw new TypeError('Readable side is already closed');\n }\n\n // We throttle transformer.transform invocation based on the backpressure of the ReadableStream, but we still\n // accept TransformStreamEnqueueToReadable() calls.\n\n var controller = transformStream._readableController;\n\n try {\n ReadableStreamDefaultControllerEnqueue(controller, chunk);\n } catch (e) {\n // This happens when readableStrategy.size() throws.\n // The ReadableStream has already errored itself.\n transformStream._readableClosed = true;\n TransformStreamErrorIfNeeded(transformStream, e);\n\n throw transformStream._storedError;\n }\n\n var desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller);\n var maybeBackpressure = desiredSize <= 0;\n\n if (maybeBackpressure === true && transformStream._backpressure === false) {\n // This allows pull() again. When desiredSize is 0, it's possible that a pull() will happen immediately (but\n // asynchronously) after this because of pending read()s and set _backpressure back to false.\n //\n // If pull() could be called from inside enqueue(), then this logic would be wrong. This cannot happen\n // because there is always a promise pending from start() or pull() when _backpressure is false.\n TransformStreamSetBackpressure(transformStream, true);\n }\n}\n\nfunction TransformStreamError(transformStream, e) {\n if (transformStream._errored === true) {\n throw new TypeError('TransformStream is already errored');\n }\n\n TransformStreamErrorInternal(transformStream, e);\n}\n\n// Abstract operations.\n\nfunction TransformStreamCloseReadableInternal(transformStream) {\n assert(transformStream._errored === false);\n assert(transformStream._readableClosed === false);\n\n try {\n ReadableStreamDefaultControllerClose(transformStream._readableController);\n } catch (e) {\n assert(false);\n }\n\n transformStream._readableClosed = true;\n}\n\nfunction TransformStreamErrorIfNeeded(transformStream, e) {\n if (transformStream._errored === false) {\n TransformStreamErrorInternal(transformStream, e);\n }\n}\n\nfunction TransformStreamErrorInternal(transformStream, e) {\n // console.log('TransformStreamErrorInternal()');\n\n assert(transformStream._errored === false);\n\n transformStream._errored = true;\n transformStream._storedError = e;\n\n if (transformStream._writableDone === false) {\n WritableStreamDefaultControllerError(transformStream._writableController, e);\n }\n if (transformStream._readableClosed === false) {\n ReadableStreamDefaultControllerError(transformStream._readableController, e);\n }\n}\n\n// Used for preventing the next write() call on TransformStreamSink until there\n// is no longer backpressure.\nfunction TransformStreamReadableReadyPromise(transformStream) {\n assert(transformStream._backpressureChangePromise !== undefined, '_backpressureChangePromise should have been initialized');\n\n if (transformStream._backpressure === false) {\n return Promise.resolve();\n }\n\n assert(transformStream._backpressure === true, '_backpressure should have been initialized');\n\n return transformStream._backpressureChangePromise;\n}\n\nfunction TransformStreamSetBackpressure(transformStream, backpressure) {\n // console.log(`TransformStreamSetBackpressure(${backpressure})`);\n\n // Passes also when called during construction.\n assert(transformStream._backpressure !== backpressure, 'TransformStreamSetBackpressure() should be called only when backpressure is changed');\n\n if (transformStream._backpressureChangePromise !== undefined) {\n // The fulfillment value is just for a sanity check.\n transformStream._backpressureChangePromise_resolve(backpressure);\n }\n\n transformStream._backpressureChangePromise = new Promise(function (resolve) {\n transformStream._backpressureChangePromise_resolve = resolve;\n });\n\n transformStream._backpressureChangePromise.then(function (resolution) {\n assert(resolution !== backpressure, '_backpressureChangePromise should be fulfilled only when backpressure is changed');\n });\n\n transformStream._backpressure = backpressure;\n}\n\nfunction TransformStreamDefaultTransform(chunk, transformStreamController) {\n var transformStream = transformStreamController._controlledTransformStream;\n TransformStreamEnqueueToReadable(transformStream, chunk);\n return Promise.resolve();\n}\n\nfunction TransformStreamTransform(transformStream, chunk) {\n // console.log('TransformStreamTransform()');\n\n assert(transformStream._errored === false);\n assert(transformStream._transforming === false);\n assert(transformStream._backpressure === false);\n\n transformStream._transforming = true;\n\n var transformer = transformStream._transformer;\n var controller = transformStream._transformStreamController;\n\n var transformPromise = PromiseInvokeOrPerformFallback(transformer, 'transform', [chunk, controller], TransformStreamDefaultTransform, [chunk, controller]);\n\n return transformPromise.then(function () {\n transformStream._transforming = false;\n\n return TransformStreamReadableReadyPromise(transformStream);\n }, function (e) {\n TransformStreamErrorIfNeeded(transformStream, e);\n return Promise.reject(e);\n });\n}\n\nfunction IsTransformStreamDefaultController(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n\n if (!Object.prototype.hasOwnProperty.call(x, '_controlledTransformStream')) {\n return false;\n }\n\n return true;\n}\n\nfunction IsTransformStream(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n\n if (!Object.prototype.hasOwnProperty.call(x, '_transformStreamController')) {\n return false;\n }\n\n return true;\n}\n\nvar TransformStreamSink = function () {\n function TransformStreamSink(transformStream, startPromise) {\n _classCallCheck(this, TransformStreamSink);\n\n this._transformStream = transformStream;\n this._startPromise = startPromise;\n }\n\n _createClass(TransformStreamSink, [{\n key: 'start',\n value: function start(c) {\n var transformStream = this._transformStream;\n\n transformStream._writableController = c;\n\n return this._startPromise.then(function () {\n return TransformStreamReadableReadyPromise(transformStream);\n });\n }\n }, {\n key: 'write',\n value: function write(chunk) {\n // console.log('TransformStreamSink.write()');\n\n var transformStream = this._transformStream;\n\n return TransformStreamTransform(transformStream, chunk);\n }\n }, {\n key: 'abort',\n value: function abort() {\n var transformStream = this._transformStream;\n transformStream._writableDone = true;\n TransformStreamErrorInternal(transformStream, new TypeError('Writable side aborted'));\n }\n }, {\n key: 'close',\n value: function close() {\n // console.log('TransformStreamSink.close()');\n\n var transformStream = this._transformStream;\n\n assert(transformStream._transforming === false);\n\n transformStream._writableDone = true;\n\n var flushPromise = PromiseInvokeOrNoop(transformStream._transformer, 'flush', [transformStream._transformStreamController]);\n // Return a promise that is fulfilled with undefined on success.\n return flushPromise.then(function () {\n if (transformStream._errored === true) {\n return Promise.reject(transformStream._storedError);\n }\n if (transformStream._readableClosed === false) {\n TransformStreamCloseReadableInternal(transformStream);\n }\n return Promise.resolve();\n }).catch(function (r) {\n TransformStreamErrorIfNeeded(transformStream, r);\n return Promise.reject(transformStream._storedError);\n });\n }\n }]);\n\n return TransformStreamSink;\n}();\n\nvar TransformStreamSource = function () {\n function TransformStreamSource(transformStream, startPromise) {\n _classCallCheck(this, TransformStreamSource);\n\n this._transformStream = transformStream;\n this._startPromise = startPromise;\n }\n\n _createClass(TransformStreamSource, [{\n key: 'start',\n value: function start(c) {\n var transformStream = this._transformStream;\n\n transformStream._readableController = c;\n\n return this._startPromise.then(function () {\n // Prevent the first pull() call until there is backpressure.\n\n assert(transformStream._backpressureChangePromise !== undefined, '_backpressureChangePromise should have been initialized');\n\n if (transformStream._backpressure === true) {\n return Promise.resolve();\n }\n\n assert(transformStream._backpressure === false, '_backpressure should have been initialized');\n\n return transformStream._backpressureChangePromise;\n });\n }\n }, {\n key: 'pull',\n value: function pull() {\n // console.log('TransformStreamSource.pull()');\n\n var transformStream = this._transformStream;\n\n // Invariant. Enforced by the promises returned by start() and pull().\n assert(transformStream._backpressure === true, 'pull() should be never called while _backpressure is false');\n\n assert(transformStream._backpressureChangePromise !== undefined, '_backpressureChangePromise should have been initialized');\n\n TransformStreamSetBackpressure(transformStream, false);\n\n // Prevent the next pull() call until there is backpressure.\n return transformStream._backpressureChangePromise;\n }\n }, {\n key: 'cancel',\n value: function cancel() {\n var transformStream = this._transformStream;\n transformStream._readableClosed = true;\n TransformStreamErrorInternal(transformStream, new TypeError('Readable side canceled'));\n }\n }]);\n\n return TransformStreamSource;\n}();\n\nvar TransformStreamDefaultController = function () {\n function TransformStreamDefaultController(transformStream) {\n _classCallCheck(this, TransformStreamDefaultController);\n\n if (IsTransformStream(transformStream) === false) {\n throw new TypeError('TransformStreamDefaultController can only be ' + 'constructed with a TransformStream instance');\n }\n\n if (transformStream._transformStreamController !== undefined) {\n throw new TypeError('TransformStreamDefaultController instances can ' + 'only be created by the TransformStream constructor');\n }\n\n this._controlledTransformStream = transformStream;\n }\n\n _createClass(TransformStreamDefaultController, [{\n key: 'enqueue',\n value: function enqueue(chunk) {\n if (IsTransformStreamDefaultController(this) === false) {\n throw defaultControllerBrandCheckException('enqueue');\n }\n\n TransformStreamEnqueueToReadable(this._controlledTransformStream, chunk);\n }\n }, {\n key: 'close',\n value: function close() {\n if (IsTransformStreamDefaultController(this) === false) {\n throw defaultControllerBrandCheckException('close');\n }\n\n TransformStreamCloseReadable(this._controlledTransformStream);\n }\n }, {\n key: 'error',\n value: function error(reason) {\n if (IsTransformStreamDefaultController(this) === false) {\n throw defaultControllerBrandCheckException('error');\n }\n\n TransformStreamError(this._controlledTransformStream, reason);\n }\n }, {\n key: 'desiredSize',\n get: function get() {\n if (IsTransformStreamDefaultController(this) === false) {\n throw defaultControllerBrandCheckException('desiredSize');\n }\n\n var transformStream = this._controlledTransformStream;\n var readableController = transformStream._readableController;\n\n return ReadableStreamDefaultControllerGetDesiredSize(readableController);\n }\n }]);\n\n return TransformStreamDefaultController;\n}();\n\nvar TransformStream = function () {\n function TransformStream() {\n var transformer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, TransformStream);\n\n this._transformer = transformer;\n var readableStrategy = transformer.readableStrategy,\n writableStrategy = transformer.writableStrategy;\n\n\n this._transforming = false;\n this._errored = false;\n this._storedError = undefined;\n\n this._writableController = undefined;\n this._readableController = undefined;\n this._transformStreamController = undefined;\n\n this._writableDone = false;\n this._readableClosed = false;\n\n this._backpressure = undefined;\n this._backpressureChangePromise = undefined;\n this._backpressureChangePromise_resolve = undefined;\n\n this._transformStreamController = new TransformStreamDefaultController(this);\n\n var startPromise_resolve = void 0;\n var startPromise = new Promise(function (resolve) {\n startPromise_resolve = resolve;\n });\n\n var source = new TransformStreamSource(this, startPromise);\n\n this._readable = new ReadableStream(source, readableStrategy);\n\n var sink = new TransformStreamSink(this, startPromise);\n\n this._writable = new WritableStream(sink, writableStrategy);\n\n assert(this._writableController !== undefined);\n assert(this._readableController !== undefined);\n\n var desiredSize = ReadableStreamDefaultControllerGetDesiredSize(this._readableController);\n // Set _backpressure based on desiredSize. As there is no read() at this point, we can just interpret\n // desiredSize being non-positive as backpressure.\n TransformStreamSetBackpressure(this, desiredSize <= 0);\n\n var transformStream = this;\n var startResult = InvokeOrNoop(transformer, 'start', [transformStream._transformStreamController]);\n startPromise_resolve(startResult);\n startPromise.catch(function (e) {\n // The underlyingSink and underlyingSource will error the readable and writable ends on their own.\n if (transformStream._errored === false) {\n transformStream._errored = true;\n transformStream._storedError = e;\n }\n });\n }\n\n _createClass(TransformStream, [{\n key: 'readable',\n get: function get() {\n if (IsTransformStream(this) === false) {\n throw streamBrandCheckException('readable');\n }\n\n return this._readable;\n }\n }, {\n key: 'writable',\n get: function get() {\n if (IsTransformStream(this) === false) {\n throw streamBrandCheckException('writable');\n }\n\n return this._writable;\n }\n }]);\n\n return TransformStream;\n}();\n\nmodule.exports = { TransformStream: TransformStream };\n\n// Helper functions for the TransformStreamDefaultController.\n\nfunction defaultControllerBrandCheckException(name) {\n return new TypeError('TransformStreamDefaultController.prototype.' + name + ' can only be used on a TransformStreamDefaultController');\n}\n\n// Helper functions for the TransformStream.\n\nfunction streamBrandCheckException(name) {\n return new TypeError('TransformStream.prototype.' + name + ' can only be used on a TransformStream');\n}\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __w_pdfjs_require__) {\n\nmodule.exports = __w_pdfjs_require__(5);\n\n\n/***/ })\n/******/ ])));\n\n\n// WEBPACK FOOTER //\n// external/streams/streams-lib.js","/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n _UnsupportedManager, getDocument, LoopbackPort, PDFDataRangeTransport,\n PDFWorker\n} from './api';\nimport {\n addLinkAttributes, CustomStyle, DEFAULT_LINK_REL, getFilenameFromUrl,\n isExternalLinkTargetSet, isValidUrl, LinkTarget\n} from './dom_utils';\nimport {\n createBlob, createObjectURL, createPromiseCapability, deprecated,\n getVerbosityLevel, InvalidPDFException, isLittleEndian,\n MissingPDFException, OPS, PageViewport, PasswordException, PasswordResponses,\n removeNullCharacters, setVerbosityLevel, shadow, UnexpectedResponseException,\n UnknownErrorException, UNSUPPORTED_FEATURES, Util, VERBOSITY_LEVELS, warn\n} from '../shared/util';\nimport { AnnotationLayer } from './annotation_layer';\nimport globalScope from '../shared/global_scope';\nimport { Metadata } from './metadata';\nimport { renderTextLayer } from './text_layer';\nimport { SVGGraphics } from './svg';\n\n// The global PDFJS object is now deprecated and will not be supported in\n// the future. The members below are maintained for backward compatibility\n// and shall not be extended or modified. If the global.js is included as\n// a module, we will create a global PDFJS object instance or use existing.\nif (!globalScope.PDFJS) {\n globalScope.PDFJS = {};\n}\nvar PDFJS = globalScope.PDFJS;\n\nif (typeof PDFJSDev !== 'undefined') {\n PDFJS.version = PDFJSDev.eval('BUNDLE_VERSION');\n PDFJS.build = PDFJSDev.eval('BUNDLE_BUILD');\n}\n\nPDFJS.pdfBug = false;\n\nif (PDFJS.verbosity !== undefined) {\n setVerbosityLevel(PDFJS.verbosity);\n}\ndelete PDFJS.verbosity;\nObject.defineProperty(PDFJS, 'verbosity', {\n get() {\n return getVerbosityLevel();\n },\n set(level) {\n setVerbosityLevel(level);\n },\n enumerable: true,\n configurable: true,\n});\n\nPDFJS.VERBOSITY_LEVELS = VERBOSITY_LEVELS;\nPDFJS.OPS = OPS;\nPDFJS.UNSUPPORTED_FEATURES = UNSUPPORTED_FEATURES;\nPDFJS.isValidUrl = isValidUrl;\nPDFJS.shadow = shadow;\nPDFJS.createBlob = createBlob;\nPDFJS.createObjectURL = function PDFJS_createObjectURL(data, contentType) {\n return createObjectURL(data, contentType, PDFJS.disableCreateObjectURL);\n};\nObject.defineProperty(PDFJS, 'isLittleEndian', {\n configurable: true,\n get: function PDFJS_isLittleEndian() {\n return shadow(PDFJS, 'isLittleEndian', isLittleEndian());\n },\n});\nPDFJS.removeNullCharacters = removeNullCharacters;\nPDFJS.PasswordResponses = PasswordResponses;\nPDFJS.PasswordException = PasswordException;\nPDFJS.UnknownErrorException = UnknownErrorException;\nPDFJS.InvalidPDFException = InvalidPDFException;\nPDFJS.MissingPDFException = MissingPDFException;\nPDFJS.UnexpectedResponseException = UnexpectedResponseException;\nPDFJS.Util = Util;\nPDFJS.PageViewport = PageViewport;\nPDFJS.createPromiseCapability = createPromiseCapability;\n\n/**\n * The maximum allowed image size in total pixels e.g. width * height. Images\n * above this value will not be drawn. Use -1 for no limit.\n * @var {number}\n */\nPDFJS.maxImageSize = (PDFJS.maxImageSize === undefined ?\n -1 : PDFJS.maxImageSize);\n\n/**\n * The url of where the predefined Adobe CMaps are located. Include trailing\n * slash.\n * @var {string}\n */\nPDFJS.cMapUrl = (PDFJS.cMapUrl === undefined ? null : PDFJS.cMapUrl);\n\n/**\n * Specifies if CMaps are binary packed.\n * @var {boolean}\n */\nPDFJS.cMapPacked = PDFJS.cMapPacked === undefined ? false : PDFJS.cMapPacked;\n\n/**\n * By default fonts are converted to OpenType fonts and loaded via font face\n * rules. If disabled, the font will be rendered using a built in font\n * renderer that constructs the glyphs with primitive path commands.\n * @var {boolean}\n */\nPDFJS.disableFontFace = (PDFJS.disableFontFace === undefined ?\n false : PDFJS.disableFontFace);\n\n/**\n * Path for image resources, mainly for annotation icons. Include trailing\n * slash.\n * @var {string}\n */\nPDFJS.imageResourcesPath = (PDFJS.imageResourcesPath === undefined ?\n '' : PDFJS.imageResourcesPath);\n\n/**\n * Disable the web worker and run all code on the main thread. This will\n * happen automatically if the browser doesn't support workers or sending\n * typed arrays to workers.\n * @var {boolean}\n */\nPDFJS.disableWorker = (PDFJS.disableWorker === undefined ?\n false : PDFJS.disableWorker);\n\n/**\n * Path and filename of the worker file. Required when the worker is enabled\n * in development mode. If unspecified in the production build, the worker\n * will be loaded based on the location of the pdf.js file. It is recommended\n * that the workerSrc is set in a custom application to prevent issues caused\n * by third-party frameworks and libraries.\n * @var {string}\n */\nPDFJS.workerSrc = (PDFJS.workerSrc === undefined ? null : PDFJS.workerSrc);\n\n/**\n * Defines global port for worker process. Overrides workerSrc and\n * disableWorker setting.\n */\nPDFJS.workerPort = (PDFJS.workerPort === undefined ? null : PDFJS.workerPort);\n\n/**\n * Disable range request loading of PDF files. When enabled and if the server\n * supports partial content requests then the PDF will be fetched in chunks.\n * Enabled (false) by default.\n * @var {boolean}\n */\nPDFJS.disableRange = (PDFJS.disableRange === undefined ?\n false : PDFJS.disableRange);\n\n/**\n * Disable streaming of PDF file data. By default PDF.js attempts to load PDF\n * in chunks. This default behavior can be disabled.\n * @var {boolean}\n */\nPDFJS.disableStream = (PDFJS.disableStream === undefined ?\n false : PDFJS.disableStream);\n\n/**\n * Disable pre-fetching of PDF file data. When range requests are enabled\n * PDF.js will automatically keep fetching more data even if it isn't needed\n * to display the current page. This default behavior can be disabled.\n *\n * NOTE: It is also necessary to disable streaming, see above,\n * in order for disabling of pre-fetching to work correctly.\n * @var {boolean}\n */\nPDFJS.disableAutoFetch = (PDFJS.disableAutoFetch === undefined ?\n false : PDFJS.disableAutoFetch);\n\n/**\n * Enables special hooks for debugging PDF.js.\n * @var {boolean}\n */\nPDFJS.pdfBug = (PDFJS.pdfBug === undefined ? false : PDFJS.pdfBug);\n\n/**\n * Enables transfer usage in postMessage for ArrayBuffers.\n * @var {boolean}\n */\nPDFJS.postMessageTransfers = (PDFJS.postMessageTransfers === undefined ?\n true : PDFJS.postMessageTransfers);\n\n/**\n * Disables URL.createObjectURL usage.\n * @var {boolean}\n */\nPDFJS.disableCreateObjectURL = (PDFJS.disableCreateObjectURL === undefined ?\n false : PDFJS.disableCreateObjectURL);\n\n/**\n * Disables WebGL usage.\n * @var {boolean}\n */\nPDFJS.disableWebGL = (PDFJS.disableWebGL === undefined ?\n true : PDFJS.disableWebGL);\n\n/**\n * Specifies the |target| attribute for external links.\n * The constants from PDFJS.LinkTarget should be used:\n * - NONE [default]\n * - SELF\n * - BLANK\n * - PARENT\n * - TOP\n * @var {number}\n */\nPDFJS.externalLinkTarget = (PDFJS.externalLinkTarget === undefined ?\n LinkTarget.NONE : PDFJS.externalLinkTarget);\n\n/**\n * Specifies the |rel| attribute for external links. Defaults to stripping\n * the referrer.\n * @var {string}\n */\nPDFJS.externalLinkRel = (PDFJS.externalLinkRel === undefined ?\n DEFAULT_LINK_REL : PDFJS.externalLinkRel);\n\n/**\n * Determines if we can eval strings as JS. Primarily used to improve\n * performance for font rendering.\n * @var {boolean}\n */\nPDFJS.isEvalSupported = (PDFJS.isEvalSupported === undefined ?\n true : PDFJS.isEvalSupported);\n\n/**\n * Opt-in to backwards incompatible API changes. NOTE:\n * If the `PDFJS_NEXT` build flag is set, it will override this setting.\n * @var {boolean}\n */\nPDFJS.pdfjsNext = (PDFJS.pdfjsNext === undefined) ? false : PDFJS.pdfjsNext;\n\nif (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) {\n var savedOpenExternalLinksInNewWindow = PDFJS.openExternalLinksInNewWindow;\n delete PDFJS.openExternalLinksInNewWindow;\n Object.defineProperty(PDFJS, 'openExternalLinksInNewWindow', {\n get() {\n return PDFJS.externalLinkTarget === LinkTarget.BLANK;\n },\n set(value) {\n if (value) {\n deprecated('PDFJS.openExternalLinksInNewWindow, please use ' +\n '\"PDFJS.externalLinkTarget = PDFJS.LinkTarget.BLANK\" instead.');\n }\n if (PDFJS.externalLinkTarget !== LinkTarget.NONE) {\n warn('PDFJS.externalLinkTarget is already initialized');\n return;\n }\n PDFJS.externalLinkTarget = value ? LinkTarget.BLANK : LinkTarget.NONE;\n },\n enumerable: true,\n configurable: true,\n });\n if (savedOpenExternalLinksInNewWindow) {\n /**\n * (Deprecated) Opens external links in a new window if enabled.\n * The default behavior opens external links in the PDF.js window.\n *\n * NOTE: This property has been deprecated, please use\n * `PDFJS.externalLinkTarget = PDFJS.LinkTarget.BLANK` instead.\n * @var {boolean}\n */\n PDFJS.openExternalLinksInNewWindow = savedOpenExternalLinksInNewWindow;\n }\n}\n\nPDFJS.getDocument = getDocument;\nPDFJS.LoopbackPort = LoopbackPort;\nPDFJS.PDFDataRangeTransport = PDFDataRangeTransport;\nPDFJS.PDFWorker = PDFWorker;\n\nPDFJS.hasCanvasTypedArrays = true; // compatibility.js ensures this invariant\nPDFJS.CustomStyle = CustomStyle;\nPDFJS.LinkTarget = LinkTarget;\nPDFJS.addLinkAttributes = addLinkAttributes;\nPDFJS.getFilenameFromUrl = getFilenameFromUrl;\nPDFJS.isExternalLinkTargetSet = isExternalLinkTargetSet;\n\nPDFJS.AnnotationLayer = AnnotationLayer;\n\nPDFJS.renderTextLayer = renderTextLayer;\n\nPDFJS.Metadata = Metadata;\n\nPDFJS.SVGGraphics = SVGGraphics;\n\nPDFJS.UnsupportedManager = _UnsupportedManager;\n\nexport {\n globalScope,\n PDFJS,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/global.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n assert, bytesToString, isEvalSupported, shadow, string32, warn\n} from '../shared/util';\n\nfunction FontLoader(docId) {\n this.docId = docId;\n this.styleElement = null;\n if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) {\n this.nativeFontFaces = [];\n this.loadTestFontId = 0;\n this.loadingContext = {\n requests: [],\n nextRequestId: 0,\n };\n }\n}\nFontLoader.prototype = {\n insertRule: function fontLoaderInsertRule(rule) {\n var styleElement = this.styleElement;\n if (!styleElement) {\n styleElement = this.styleElement = document.createElement('style');\n styleElement.id = 'PDFJS_FONT_STYLE_TAG_' + this.docId;\n document.documentElement.getElementsByTagName('head')[0].appendChild(\n styleElement);\n }\n\n var styleSheet = styleElement.sheet;\n styleSheet.insertRule(rule, styleSheet.cssRules.length);\n },\n\n clear: function fontLoaderClear() {\n if (this.styleElement) {\n // Note: ChildNode.remove doesn't throw if the parentNode is undefined.\n this.styleElement.remove();\n this.styleElement = null;\n }\n if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) {\n this.nativeFontFaces.forEach(function(nativeFontFace) {\n document.fonts.delete(nativeFontFace);\n });\n this.nativeFontFaces.length = 0;\n }\n },\n};\n\nif (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) {\n var getLoadTestFont = function () {\n // This is a CFF font with 1 glyph for '.' that fills its entire width and\n // height.\n return atob(\n 'T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQ' +\n 'AABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwA' +\n 'AAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbm' +\n 'FtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAA' +\n 'AADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6A' +\n 'ABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAA' +\n 'MQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAA' +\n 'AAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAA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ader.prototype, 'loadTestFont', {\n get() {\n return shadow(this, 'loadTestFont', getLoadTestFont());\n },\n configurable: true,\n });\n\n FontLoader.prototype.addNativeFontFace =\n function fontLoader_addNativeFontFace(nativeFontFace) {\n this.nativeFontFaces.push(nativeFontFace);\n document.fonts.add(nativeFontFace);\n };\n\n FontLoader.prototype.bind = function fontLoaderBind(fonts, callback) {\n var rules = [];\n var fontsToLoad = [];\n var fontLoadPromises = [];\n var getNativeFontPromise = function(nativeFontFace) {\n // Return a promise that is always fulfilled, even when the font fails to\n // load.\n return nativeFontFace.loaded.catch(function(e) {\n warn('Failed to load font \"' + nativeFontFace.family + '\": ' + e);\n });\n };\n // Firefox Font Loading API does not work with mozPrintCallback --\n // disabling it in this case.\n var isFontLoadingAPISupported = FontLoader.isFontLoadingAPISupported &&\n !FontLoader.isSyncFontLoadingSupported;\n for (var i = 0, ii = fonts.length; i < ii; i++) {\n var font = fonts[i];\n\n // Add the font to the DOM only once or skip if the font\n // is already loaded.\n if (font.attached || font.loading === false) {\n continue;\n }\n font.attached = true;\n\n if (isFontLoadingAPISupported) {\n var nativeFontFace = font.createNativeFontFace();\n if (nativeFontFace) {\n this.addNativeFontFace(nativeFontFace);\n fontLoadPromises.push(getNativeFontPromise(nativeFontFace));\n }\n } else {\n var rule = font.createFontFaceRule();\n if (rule) {\n this.insertRule(rule);\n rules.push(rule);\n fontsToLoad.push(font);\n }\n }\n }\n\n var request = this.queueLoadingCallback(callback);\n if (isFontLoadingAPISupported) {\n Promise.all(fontLoadPromises).then(function() {\n request.complete();\n });\n } else if (rules.length > 0 && !FontLoader.isSyncFontLoadingSupported) {\n this.prepareFontLoadEvent(rules, fontsToLoad, request);\n } else {\n request.complete();\n }\n };\n\n FontLoader.prototype.queueLoadingCallback =\n function FontLoader_queueLoadingCallback(callback) {\n function LoadLoader_completeRequest() {\n assert(!request.end, 'completeRequest() cannot be called twice');\n request.end = Date.now();\n\n // sending all completed requests in order how they were queued\n while (context.requests.length > 0 && context.requests[0].end) {\n var otherRequest = context.requests.shift();\n setTimeout(otherRequest.callback, 0);\n }\n }\n\n var context = this.loadingContext;\n var requestId = 'pdfjs-font-loading-' + (context.nextRequestId++);\n var request = {\n id: requestId,\n complete: LoadLoader_completeRequest,\n callback,\n started: Date.now(),\n };\n context.requests.push(request);\n return request;\n };\n\n FontLoader.prototype.prepareFontLoadEvent =\n function fontLoaderPrepareFontLoadEvent(rules, fonts, request) {\n /** Hack begin */\n // There's currently no event when a font has finished downloading so the\n // following code is a dirty hack to 'guess' when a font is\n // ready. It's assumed fonts are loaded in order, so add a known test\n // font after the desired fonts and then test for the loading of that\n // test font.\n\n function int32(data, offset) {\n return (data.charCodeAt(offset) << 24) |\n (data.charCodeAt(offset + 1) << 16) |\n (data.charCodeAt(offset + 2) << 8) |\n (data.charCodeAt(offset + 3) & 0xff);\n }\n\n function spliceString(s, offset, remove, insert) {\n var chunk1 = s.substr(0, offset);\n var chunk2 = s.substr(offset + remove);\n return chunk1 + insert + chunk2;\n }\n\n var i, ii;\n\n // The temporary canvas is used to determine if fonts are loaded.\n var canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n var ctx = canvas.getContext('2d');\n\n var called = 0;\n function isFontReady(name, callback) {\n called++;\n // With setTimeout clamping this gives the font ~100ms to load.\n if (called > 30) {\n warn('Load test font never loaded.');\n callback();\n return;\n }\n ctx.font = '30px ' + name;\n ctx.fillText('.', 0, 20);\n var imageData = ctx.getImageData(0, 0, 1, 1);\n if (imageData.data[3] > 0) {\n callback();\n return;\n }\n setTimeout(isFontReady.bind(null, name, callback));\n }\n\n var loadTestFontId = 'lt' + Date.now() + this.loadTestFontId++;\n // Chromium seems to cache fonts based on a hash of the actual font data,\n // so the font must be modified for each load test else it will appear to\n // be loaded already.\n // TODO: This could maybe be made faster by avoiding the btoa of the full\n // font by splitting it in chunks before hand and padding the font id.\n var data = this.loadTestFont;\n var COMMENT_OFFSET = 976; // has to be on 4 byte boundary (for checksum)\n data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length,\n loadTestFontId);\n // CFF checksum is important for IE, adjusting it\n var CFF_CHECKSUM_OFFSET = 16;\n var XXXX_VALUE = 0x58585858; // the \"comment\" filled with 'X'\n var checksum = int32(data, CFF_CHECKSUM_OFFSET);\n for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) {\n checksum = (checksum - XXXX_VALUE + int32(loadTestFontId, i)) | 0;\n }\n if (i < loadTestFontId.length) { // align to 4 bytes boundary\n checksum = (checksum - XXXX_VALUE +\n int32(loadTestFontId + 'XXX', i)) | 0;\n }\n data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, string32(checksum));\n\n var url = 'url(data:font/opentype;base64,' + btoa(data) + ');';\n var rule = '@font-face { font-family:\"' + loadTestFontId + '\";src:' +\n url + '}';\n this.insertRule(rule);\n\n var names = [];\n for (i = 0, ii = fonts.length; i < ii; i++) {\n names.push(fonts[i].loadedName);\n }\n names.push(loadTestFontId);\n\n var div = document.createElement('div');\n div.setAttribute('style',\n 'visibility: hidden;' +\n 'width: 10px; height: 10px;' +\n 'position: absolute; top: 0px; left: 0px;');\n for (i = 0, ii = names.length; i < ii; ++i) {\n var span = document.createElement('span');\n span.textContent = 'Hi';\n span.style.fontFamily = names[i];\n div.appendChild(span);\n }\n document.body.appendChild(div);\n\n isFontReady(loadTestFontId, function() {\n document.body.removeChild(div);\n request.complete();\n });\n /** Hack end */\n };\n} else {\n FontLoader.prototype.bind = function fontLoaderBind(fonts, callback) {\n for (var i = 0, ii = fonts.length; i < ii; i++) {\n var font = fonts[i];\n if (font.attached) {\n continue;\n }\n\n font.attached = true;\n var rule = font.createFontFaceRule();\n if (rule) {\n this.insertRule(rule);\n }\n }\n\n setTimeout(callback);\n };\n}\nif (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) {\n FontLoader.isFontLoadingAPISupported = typeof document !== 'undefined' &&\n !!document.fonts;\n}\nif (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL || CHROME')) {\n var isSyncFontLoadingSupported = function isSyncFontLoadingSupported() {\n if (typeof navigator === 'undefined') {\n // node.js - we can pretend sync font loading is supported.\n return true;\n }\n\n var supported = false;\n\n // User agent string sniffing is bad, but there is no reliable way to tell\n // if font is fully loaded and ready to be used with canvas.\n var m = /Mozilla\\/5.0.*?rv:(\\d+).*? Gecko/.exec(navigator.userAgent);\n if (m && m[1] >= 14) {\n supported = true;\n }\n // TODO other browsers\n return supported;\n };\n Object.defineProperty(FontLoader, 'isSyncFontLoadingSupported', {\n get() {\n return shadow(FontLoader, 'isSyncFontLoadingSupported',\n isSyncFontLoadingSupported());\n },\n enumerable: true,\n configurable: true,\n });\n}\n\nvar IsEvalSupportedCached = {\n get value() {\n return shadow(this, 'value', isEvalSupported());\n },\n};\n\nvar FontFaceObject = (function FontFaceObjectClosure() {\n function FontFaceObject(translatedData, options) {\n this.compiledGlyphs = Object.create(null);\n // importing translated data\n for (var i in translatedData) {\n this[i] = translatedData[i];\n }\n this.options = options;\n }\n FontFaceObject.prototype = {\n createNativeFontFace: function FontFaceObject_createNativeFontFace() {\n if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('MOZCENTRAL')) {\n throw new Error('Not implemented: createNativeFontFace');\n }\n\n if (!this.data) {\n return null;\n }\n\n if (this.options.disableFontFace) {\n this.disableFontFace = true;\n return null;\n }\n\n var nativeFontFace = new FontFace(this.loadedName, this.data, {});\n\n if (this.options.fontRegistry) {\n this.options.fontRegistry.registerFont(this);\n }\n return nativeFontFace;\n },\n\n createFontFaceRule: function FontFaceObject_createFontFaceRule() {\n if (!this.data) {\n return null;\n }\n\n if (this.options.disableFontFace) {\n this.disableFontFace = true;\n return null;\n }\n\n var data = bytesToString(new Uint8Array(this.data));\n var fontName = this.loadedName;\n\n // Add the font-face rule to the document\n var url = ('url(data:' + this.mimetype + ';base64,' + btoa(data) + ');');\n var rule = '@font-face { font-family:\"' + fontName + '\";src:' + url + '}';\n\n if (this.options.fontRegistry) {\n this.options.fontRegistry.registerFont(this, url);\n }\n\n return rule;\n },\n\n getPathGenerator:\n function FontFaceObject_getPathGenerator(objs, character) {\n if (!(character in this.compiledGlyphs)) {\n var cmds = objs.get(this.loadedName + '_path_' + character);\n var current, i, len;\n\n // If we can, compile cmds into JS for MAXIMUM SPEED\n if (this.options.isEvalSupported && IsEvalSupportedCached.value) {\n var args, js = '';\n for (i = 0, len = cmds.length; i < len; i++) {\n current = cmds[i];\n\n if (current.args !== undefined) {\n args = current.args.join(',');\n } else {\n args = '';\n }\n\n js += 'c.' + current.cmd + '(' + args + ');\\n';\n }\n // eslint-disable-next-line no-new-func\n this.compiledGlyphs[character] = new Function('c', 'size', js);\n } else {\n // But fall back on using Function.prototype.apply() if we're\n // blocked from using eval() for whatever reason (like CSP policies)\n this.compiledGlyphs[character] = function(c, size) {\n for (i = 0, len = cmds.length; i < len; i++) {\n current = cmds[i];\n\n if (current.cmd === 'scale') {\n current.args = [size, -size];\n }\n\n c[current.cmd].apply(c, current.args);\n }\n };\n }\n }\n return this.compiledGlyphs[character];\n },\n };\n\n return FontFaceObject;\n})();\n\nexport {\n FontFaceObject,\n FontLoader,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/font_loader.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n FONT_IDENTITY_MATRIX, IDENTITY_MATRIX, ImageKind, info, isLittleEndian, isNum,\n OPS, shadow, TextRenderingMode, Util, warn\n} from '../shared/util';\nimport { getShadingPatternFromIR, TilingPattern } from './pattern_helper';\nimport { WebGLUtils } from './webgl';\n\n// <canvas> contexts store most of the state we need natively.\n// However, PDF needs a bit more state, which we store here.\n\n// Minimal font size that would be used during canvas fillText operations.\nvar MIN_FONT_SIZE = 16;\n// Maximum font size that would be used during canvas fillText operations.\nvar MAX_FONT_SIZE = 100;\nvar MAX_GROUP_SIZE = 4096;\n\n// Heuristic value used when enforcing minimum line widths.\nvar MIN_WIDTH_FACTOR = 0.65;\n\nvar COMPILE_TYPE3_GLYPHS = true;\nvar MAX_SIZE_TO_COMPILE = 1000;\n\nvar FULL_CHUNK_HEIGHT = 16;\n\nvar IsLittleEndianCached = {\n get value() {\n return shadow(IsLittleEndianCached, 'value', isLittleEndian());\n },\n};\n\nfunction addContextCurrentTransform(ctx) {\n // If the context doesn't expose a `mozCurrentTransform`, add a JS based one.\n if (!ctx.mozCurrentTransform) {\n ctx._originalSave = ctx.save;\n ctx._originalRestore = ctx.restore;\n ctx._originalRotate = ctx.rotate;\n ctx._originalScale = ctx.scale;\n ctx._originalTranslate = ctx.translate;\n ctx._originalTransform = ctx.transform;\n ctx._originalSetTransform = ctx.setTransform;\n\n ctx._transformMatrix = ctx._transformMatrix || [1, 0, 0, 1, 0, 0];\n ctx._transformStack = [];\n\n Object.defineProperty(ctx, 'mozCurrentTransform', {\n get: function getCurrentTransform() {\n return this._transformMatrix;\n },\n });\n\n Object.defineProperty(ctx, 'mozCurrentTransformInverse', {\n get: function getCurrentTransformInverse() {\n // Calculation done using WolframAlpha:\n // http://www.wolframalpha.com/input/?\n // i=Inverse+{{a%2C+c%2C+e}%2C+{b%2C+d%2C+f}%2C+{0%2C+0%2C+1}}\n\n var m = this._transformMatrix;\n var a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5];\n\n var ad_bc = a * d - b * c;\n var bc_ad = b * c - a * d;\n\n return [\n d / ad_bc,\n b / bc_ad,\n c / bc_ad,\n a / ad_bc,\n (d * e - c * f) / bc_ad,\n (b * e - a * f) / ad_bc\n ];\n },\n });\n\n ctx.save = function ctxSave() {\n var old = this._transformMatrix;\n this._transformStack.push(old);\n this._transformMatrix = old.slice(0, 6);\n\n this._originalSave();\n };\n\n ctx.restore = function ctxRestore() {\n var prev = this._transformStack.pop();\n if (prev) {\n this._transformMatrix = prev;\n this._originalRestore();\n }\n };\n\n ctx.translate = function ctxTranslate(x, y) {\n var m = this._transformMatrix;\n m[4] = m[0] * x + m[2] * y + m[4];\n m[5] = m[1] * x + m[3] * y + m[5];\n\n this._originalTranslate(x, y);\n };\n\n ctx.scale = function ctxScale(x, y) {\n var m = this._transformMatrix;\n m[0] = m[0] * x;\n m[1] = m[1] * x;\n m[2] = m[2] * y;\n m[3] = m[3] * y;\n\n this._originalScale(x, y);\n };\n\n ctx.transform = function ctxTransform(a, b, c, d, e, f) {\n var m = this._transformMatrix;\n this._transformMatrix = [\n m[0] * a + m[2] * b,\n m[1] * a + m[3] * b,\n m[0] * c + m[2] * d,\n m[1] * c + m[3] * d,\n m[0] * e + m[2] * f + m[4],\n m[1] * e + m[3] * f + m[5]\n ];\n\n ctx._originalTransform(a, b, c, d, e, f);\n };\n\n ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {\n this._transformMatrix = [a, b, c, d, e, f];\n\n ctx._originalSetTransform(a, b, c, d, e, f);\n };\n\n ctx.rotate = function ctxRotate(angle) {\n var cosValue = Math.cos(angle);\n var sinValue = Math.sin(angle);\n\n var m = this._transformMatrix;\n this._transformMatrix = [\n m[0] * cosValue + m[2] * sinValue,\n m[1] * cosValue + m[3] * sinValue,\n m[0] * (-sinValue) + m[2] * cosValue,\n m[1] * (-sinValue) + m[3] * cosValue,\n m[4],\n m[5]\n ];\n\n this._originalRotate(angle);\n };\n }\n}\n\nvar CachedCanvases = (function CachedCanvasesClosure() {\n function CachedCanvases(canvasFactory) {\n this.canvasFactory = canvasFactory;\n this.cache = Object.create(null);\n }\n CachedCanvases.prototype = {\n getCanvas: function CachedCanvases_getCanvas(id, width, height,\n trackTransform) {\n var canvasEntry;\n if (this.cache[id] !== undefined) {\n canvasEntry = this.cache[id];\n this.canvasFactory.reset(canvasEntry, width, height);\n // reset canvas transform for emulated mozCurrentTransform, if needed\n canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0);\n } else {\n canvasEntry = this.canvasFactory.create(width, height);\n this.cache[id] = canvasEntry;\n }\n if (trackTransform) {\n addContextCurrentTransform(canvasEntry.context);\n }\n return canvasEntry;\n },\n clear() {\n for (var id in this.cache) {\n var canvasEntry = this.cache[id];\n this.canvasFactory.destroy(canvasEntry);\n delete this.cache[id];\n }\n },\n };\n return CachedCanvases;\n})();\n\nfunction compileType3Glyph(imgData) {\n var POINT_TO_PROCESS_LIMIT = 1000;\n\n var width = imgData.width, height = imgData.height;\n var i, j, j0, width1 = width + 1;\n var points = new Uint8Array(width1 * (height + 1));\n var POINT_TYPES =\n new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);\n\n // decodes bit-packed mask data\n var lineSize = (width + 7) & ~7, data0 = imgData.data;\n var data = new Uint8Array(lineSize * height), pos = 0, ii;\n for (i = 0, ii = data0.length; i < ii; i++) {\n var mask = 128, elem = data0[i];\n while (mask > 0) {\n data[pos++] = (elem & mask) ? 0 : 255;\n mask >>= 1;\n }\n }\n\n // finding iteresting points: every point is located between mask pixels,\n // so there will be points of the (width + 1)x(height + 1) grid. Every point\n // will have flags assigned based on neighboring mask pixels:\n // 4 | 8\n // --P--\n // 2 | 1\n // We are interested only in points with the flags:\n // - outside corners: 1, 2, 4, 8;\n // - inside corners: 7, 11, 13, 14;\n // - and, intersections: 5, 10.\n var count = 0;\n pos = 0;\n if (data[pos] !== 0) {\n points[0] = 1;\n ++count;\n }\n for (j = 1; j < width; j++) {\n if (data[pos] !== data[pos + 1]) {\n points[j] = data[pos] ? 2 : 1;\n ++count;\n }\n pos++;\n }\n if (data[pos] !== 0) {\n points[j] = 2;\n ++count;\n }\n for (i = 1; i < height; i++) {\n pos = i * lineSize;\n j0 = i * width1;\n if (data[pos - lineSize] !== data[pos]) {\n points[j0] = data[pos] ? 1 : 8;\n ++count;\n }\n // 'sum' is the position of the current pixel configuration in the 'TYPES'\n // array (in order 8-1-2-4, so we can use '>>2' to shift the column).\n var sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0);\n for (j = 1; j < width; j++) {\n sum = (sum >> 2) + (data[pos + 1] ? 4 : 0) +\n (data[pos - lineSize + 1] ? 8 : 0);\n if (POINT_TYPES[sum]) {\n points[j0 + j] = POINT_TYPES[sum];\n ++count;\n }\n pos++;\n }\n if (data[pos - lineSize] !== data[pos]) {\n points[j0 + j] = data[pos] ? 2 : 4;\n ++count;\n }\n\n if (count > POINT_TO_PROCESS_LIMIT) {\n return null;\n }\n }\n\n pos = lineSize * (height - 1);\n j0 = i * width1;\n if (data[pos] !== 0) {\n points[j0] = 8;\n ++count;\n }\n for (j = 1; j < width; j++) {\n if (data[pos] !== data[pos + 1]) {\n points[j0 + j] = data[pos] ? 4 : 8;\n ++count;\n }\n pos++;\n }\n if (data[pos] !== 0) {\n points[j0 + j] = 4;\n ++count;\n }\n if (count > POINT_TO_PROCESS_LIMIT) {\n return null;\n }\n\n // building outlines\n var steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);\n var outlines = [];\n for (i = 0; count && i <= height; i++) {\n var p = i * width1;\n var end = p + width;\n while (p < end && !points[p]) {\n p++;\n }\n if (p === end) {\n continue;\n }\n var coords = [p % width1, i];\n\n var type = points[p], p0 = p, pp;\n do {\n var step = steps[type];\n do {\n p += step;\n } while (!points[p]);\n\n pp = points[p];\n if (pp !== 5 && pp !== 10) {\n // set new direction\n type = pp;\n // delete mark\n points[p] = 0;\n } else { // type is 5 or 10, ie, a crossing\n // set new direction\n type = pp & ((0x33 * type) >> 4);\n // set new type for \"future hit\"\n points[p] &= (type >> 2 | type << 2);\n }\n\n coords.push(p % width1);\n coords.push((p / width1) | 0);\n --count;\n } while (p0 !== p);\n outlines.push(coords);\n --i;\n }\n\n var drawOutline = function(c) {\n c.save();\n // the path shall be painted in [0..1]x[0..1] space\n c.scale(1 / width, -1 / height);\n c.translate(0, -height);\n c.beginPath();\n for (var i = 0, ii = outlines.length; i < ii; i++) {\n var o = outlines[i];\n c.moveTo(o[0], o[1]);\n for (var j = 2, jj = o.length; j < jj; j += 2) {\n c.lineTo(o[j], o[j + 1]);\n }\n }\n c.fill();\n c.beginPath();\n c.restore();\n };\n\n return drawOutline;\n}\n\nvar CanvasExtraState = (function CanvasExtraStateClosure() {\n function CanvasExtraState() {\n // Are soft masks and alpha values shapes or opacities?\n this.alphaIsShape = false;\n this.fontSize = 0;\n this.fontSizeScale = 1;\n this.textMatrix = IDENTITY_MATRIX;\n this.textMatrixScale = 1;\n this.fontMatrix = FONT_IDENTITY_MATRIX;\n this.leading = 0;\n // Current point (in user coordinates)\n this.x = 0;\n this.y = 0;\n // Start of text line (in text coordinates)\n this.lineX = 0;\n this.lineY = 0;\n // Character and word spacing\n this.charSpacing = 0;\n this.wordSpacing = 0;\n this.textHScale = 1;\n this.textRenderingMode = TextRenderingMode.FILL;\n this.textRise = 0;\n // Default fore and background colors\n this.fillColor = '#000000';\n this.strokeColor = '#000000';\n this.patternFill = false;\n // Note: fill alpha applies to all non-stroking operations\n this.fillAlpha = 1;\n this.strokeAlpha = 1;\n this.lineWidth = 1;\n this.activeSMask = null;\n this.resumeSMaskCtx = null; // nonclonable field (see the save method below)\n }\n\n CanvasExtraState.prototype = {\n clone: function CanvasExtraState_clone() {\n return Object.create(this);\n },\n setCurrentPoint: function CanvasExtraState_setCurrentPoint(x, y) {\n this.x = x;\n this.y = y;\n },\n };\n return CanvasExtraState;\n})();\n\nvar CanvasGraphics = (function CanvasGraphicsClosure() {\n // Defines the time the executeOperatorList is going to be executing\n // before it stops and shedules a continue of execution.\n var EXECUTION_TIME = 15;\n // Defines the number of steps before checking the execution time\n var EXECUTION_STEPS = 10;\n\n function CanvasGraphics(canvasCtx, commonObjs, objs, canvasFactory,\n imageLayer) {\n this.ctx = canvasCtx;\n this.current = new CanvasExtraState();\n this.stateStack = [];\n this.pendingClip = null;\n this.pendingEOFill = false;\n this.res = null;\n this.xobjs = null;\n this.commonObjs = commonObjs;\n this.objs = objs;\n this.canvasFactory = canvasFactory;\n this.imageLayer = imageLayer;\n this.groupStack = [];\n this.processingType3 = null;\n // Patterns are painted relative to the initial page/form transform, see pdf\n // spec 8.7.2 NOTE 1.\n this.baseTransform = null;\n this.baseTransformStack = [];\n this.groupLevel = 0;\n this.smaskStack = [];\n this.smaskCounter = 0;\n this.tempSMask = null;\n this.cachedCanvases = new CachedCanvases(this.canvasFactory);\n if (canvasCtx) {\n // NOTE: if mozCurrentTransform is polyfilled, then the current state of\n // the transformation must already be set in canvasCtx._transformMatrix.\n addContextCurrentTransform(canvasCtx);\n }\n this.cachedGetSinglePixelWidth = null;\n }\n\n function putBinaryImageData(ctx, imgData) {\n if (typeof ImageData !== 'undefined' && imgData instanceof ImageData) {\n ctx.putImageData(imgData, 0, 0);\n return;\n }\n\n // Put the image data to the canvas in chunks, rather than putting the\n // whole image at once. This saves JS memory, because the ImageData object\n // is smaller. It also possibly saves C++ memory within the implementation\n // of putImageData(). (E.g. in Firefox we make two short-lived copies of\n // the data passed to putImageData()). |n| shouldn't be too small, however,\n // because too many putImageData() calls will slow things down.\n //\n // Note: as written, if the last chunk is partial, the putImageData() call\n // will (conceptually) put pixels past the bounds of the canvas. But\n // that's ok; any such pixels are ignored.\n\n var height = imgData.height, width = imgData.width;\n var partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n var fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n var totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n\n var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n var srcPos = 0, destPos;\n var src = imgData.data;\n var dest = chunkImgData.data;\n var i, j, thisChunkHeight, elemsInThisChunk;\n\n // There are multiple forms in which the pixel data can be passed, and\n // imgData.kind tells us which one this is.\n if (imgData.kind === ImageKind.GRAYSCALE_1BPP) {\n // Grayscale, 1 bit per pixel (i.e. black-and-white).\n var srcLength = src.byteLength;\n var dest32 = new Uint32Array(dest.buffer, 0, dest.byteLength >> 2);\n var dest32DataLength = dest32.length;\n var fullSrcDiff = (width + 7) >> 3;\n var white = 0xFFFFFFFF;\n var black = IsLittleEndianCached.value ? 0xFF000000 : 0x000000FF;\n for (i = 0; i < totalChunks; i++) {\n thisChunkHeight =\n (i < fullChunks) ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n destPos = 0;\n for (j = 0; j < thisChunkHeight; j++) {\n var srcDiff = srcLength - srcPos;\n var k = 0;\n var kEnd = (srcDiff > fullSrcDiff) ? width : srcDiff * 8 - 7;\n var kEndUnrolled = kEnd & ~7;\n var mask = 0;\n var srcByte = 0;\n for (; k < kEndUnrolled; k += 8) {\n srcByte = src[srcPos++];\n dest32[destPos++] = (srcByte & 128) ? white : black;\n dest32[destPos++] = (srcByte & 64) ? white : black;\n dest32[destPos++] = (srcByte & 32) ? white : black;\n dest32[destPos++] = (srcByte & 16) ? white : black;\n dest32[destPos++] = (srcByte & 8) ? white : black;\n dest32[destPos++] = (srcByte & 4) ? white : black;\n dest32[destPos++] = (srcByte & 2) ? white : black;\n dest32[destPos++] = (srcByte & 1) ? white : black;\n }\n for (; k < kEnd; k++) {\n if (mask === 0) {\n srcByte = src[srcPos++];\n mask = 128;\n }\n\n dest32[destPos++] = (srcByte & mask) ? white : black;\n mask >>= 1;\n }\n }\n // We ran out of input. Make all remaining pixels transparent.\n while (destPos < dest32DataLength) {\n dest32[destPos++] = 0;\n }\n\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n } else if (imgData.kind === ImageKind.RGBA_32BPP) {\n // RGBA, 32-bits per pixel.\n\n j = 0;\n elemsInThisChunk = width * FULL_CHUNK_HEIGHT * 4;\n for (i = 0; i < fullChunks; i++) {\n dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n srcPos += elemsInThisChunk;\n\n ctx.putImageData(chunkImgData, 0, j);\n j += FULL_CHUNK_HEIGHT;\n }\n if (i < totalChunks) {\n elemsInThisChunk = width * partialChunkHeight * 4;\n dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n ctx.putImageData(chunkImgData, 0, j);\n }\n\n } else if (imgData.kind === ImageKind.RGB_24BPP) {\n // RGB, 24-bits per pixel.\n thisChunkHeight = FULL_CHUNK_HEIGHT;\n elemsInThisChunk = width * thisChunkHeight;\n for (i = 0; i < totalChunks; i++) {\n if (i >= fullChunks) {\n thisChunkHeight = partialChunkHeight;\n elemsInThisChunk = width * thisChunkHeight;\n }\n\n destPos = 0;\n for (j = elemsInThisChunk; j--;) {\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = 255;\n }\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n } else {\n throw new Error(`bad image kind: ${imgData.kind}`);\n }\n }\n\n function putBinaryImageMask(ctx, imgData) {\n var height = imgData.height, width = imgData.width;\n var partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n var fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n var totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n\n var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n var srcPos = 0;\n var src = imgData.data;\n var dest = chunkImgData.data;\n\n for (var i = 0; i < totalChunks; i++) {\n var thisChunkHeight =\n (i < fullChunks) ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n\n // Expand the mask so it can be used by the canvas. Any required\n // inversion has already been handled.\n var destPos = 3; // alpha component offset\n for (var j = 0; j < thisChunkHeight; j++) {\n var mask = 0;\n for (var k = 0; k < width; k++) {\n if (!mask) {\n var elem = src[srcPos++];\n mask = 128;\n }\n dest[destPos] = (elem & mask) ? 0 : 255;\n destPos += 4;\n mask >>= 1;\n }\n }\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n }\n\n function copyCtxState(sourceCtx, destCtx) {\n var properties = ['strokeStyle', 'fillStyle', 'fillRule', 'globalAlpha',\n 'lineWidth', 'lineCap', 'lineJoin', 'miterLimit',\n 'globalCompositeOperation', 'font'];\n for (var i = 0, ii = properties.length; i < ii; i++) {\n var property = properties[i];\n if (sourceCtx[property] !== undefined) {\n destCtx[property] = sourceCtx[property];\n }\n }\n if (sourceCtx.setLineDash !== undefined) {\n destCtx.setLineDash(sourceCtx.getLineDash());\n destCtx.lineDashOffset = sourceCtx.lineDashOffset;\n }\n }\n\n function resetCtxToDefault(ctx) {\n ctx.strokeStyle = '#000000';\n ctx.fillStyle = '#000000';\n ctx.fillRule = 'nonzero';\n ctx.globalAlpha = 1;\n ctx.lineWidth = 1;\n ctx.lineCap = 'butt';\n ctx.lineJoin = 'miter';\n ctx.miterLimit = 10;\n ctx.globalCompositeOperation = 'source-over';\n ctx.font = '10px sans-serif';\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([]);\n ctx.lineDashOffset = 0;\n }\n }\n\n function composeSMaskBackdrop(bytes, r0, g0, b0) {\n var length = bytes.length;\n for (var i = 3; i < length; i += 4) {\n var alpha = bytes[i];\n if (alpha === 0) {\n bytes[i - 3] = r0;\n bytes[i - 2] = g0;\n bytes[i - 1] = b0;\n } else if (alpha < 255) {\n var alpha_ = 255 - alpha;\n bytes[i - 3] = (bytes[i - 3] * alpha + r0 * alpha_) >> 8;\n bytes[i - 2] = (bytes[i - 2] * alpha + g0 * alpha_) >> 8;\n bytes[i - 1] = (bytes[i - 1] * alpha + b0 * alpha_) >> 8;\n }\n }\n }\n\n function composeSMaskAlpha(maskData, layerData, transferMap) {\n var length = maskData.length;\n var scale = 1 / 255;\n for (var i = 3; i < length; i += 4) {\n var alpha = transferMap ? transferMap[maskData[i]] : maskData[i];\n layerData[i] = (layerData[i] * alpha * scale) | 0;\n }\n }\n\n function composeSMaskLuminosity(maskData, layerData, transferMap) {\n var length = maskData.length;\n for (var i = 3; i < length; i += 4) {\n var y = (maskData[i - 3] * 77) + // * 0.3 / 255 * 0x10000\n (maskData[i - 2] * 152) + // * 0.59 ....\n (maskData[i - 1] * 28); // * 0.11 ....\n layerData[i] = transferMap ?\n (layerData[i] * transferMap[y >> 8]) >> 8 :\n (layerData[i] * y) >> 16;\n }\n }\n\n function genericComposeSMask(maskCtx, layerCtx, width, height,\n subtype, backdrop, transferMap) {\n var hasBackdrop = !!backdrop;\n var r0 = hasBackdrop ? backdrop[0] : 0;\n var g0 = hasBackdrop ? backdrop[1] : 0;\n var b0 = hasBackdrop ? backdrop[2] : 0;\n\n var composeFn;\n if (subtype === 'Luminosity') {\n composeFn = composeSMaskLuminosity;\n } else {\n composeFn = composeSMaskAlpha;\n }\n\n // processing image in chunks to save memory\n var PIXELS_TO_PROCESS = 1048576;\n var chunkSize = Math.min(height, Math.ceil(PIXELS_TO_PROCESS / width));\n for (var row = 0; row < height; row += chunkSize) {\n var chunkHeight = Math.min(chunkSize, height - row);\n var maskData = maskCtx.getImageData(0, row, width, chunkHeight);\n var layerData = layerCtx.getImageData(0, row, width, chunkHeight);\n\n if (hasBackdrop) {\n composeSMaskBackdrop(maskData.data, r0, g0, b0);\n }\n composeFn(maskData.data, layerData.data, transferMap);\n\n maskCtx.putImageData(layerData, 0, row);\n }\n }\n\n function composeSMask(ctx, smask, layerCtx) {\n var mask = smask.canvas;\n var maskCtx = smask.context;\n\n ctx.setTransform(smask.scaleX, 0, 0, smask.scaleY,\n smask.offsetX, smask.offsetY);\n\n var backdrop = smask.backdrop || null;\n if (!smask.transferMap && WebGLUtils.isEnabled) {\n var composed = WebGLUtils.composeSMask(layerCtx.canvas, mask,\n { subtype: smask.subtype, backdrop, });\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(composed, smask.offsetX, smask.offsetY);\n return;\n }\n genericComposeSMask(maskCtx, layerCtx, mask.width, mask.height,\n smask.subtype, backdrop, smask.transferMap);\n ctx.drawImage(mask, 0, 0);\n }\n\n var LINE_CAP_STYLES = ['butt', 'round', 'square'];\n var LINE_JOIN_STYLES = ['miter', 'round', 'bevel'];\n var NORMAL_CLIP = {};\n var EO_CLIP = {};\n\n CanvasGraphics.prototype = {\n\n beginDrawing({ transform, viewport, transparency,\n background = null, }) {\n // For pdfs that use blend modes we have to clear the canvas else certain\n // blend modes can look wrong since we'd be blending with a white\n // backdrop. The problem with a transparent backdrop though is we then\n // don't get sub pixel anti aliasing on text, creating temporary\n // transparent canvas when we have blend modes.\n var width = this.ctx.canvas.width;\n var height = this.ctx.canvas.height;\n\n this.ctx.save();\n this.ctx.fillStyle = background || 'rgb(255, 255, 255)';\n this.ctx.fillRect(0, 0, width, height);\n this.ctx.restore();\n\n if (transparency) {\n var transparentCanvas = this.cachedCanvases.getCanvas(\n 'transparent', width, height, true);\n this.compositeCtx = this.ctx;\n this.transparentCanvas = transparentCanvas.canvas;\n this.ctx = transparentCanvas.context;\n this.ctx.save();\n // The transform can be applied before rendering, transferring it to\n // the new canvas.\n this.ctx.transform.apply(this.ctx,\n this.compositeCtx.mozCurrentTransform);\n }\n\n this.ctx.save();\n resetCtxToDefault(this.ctx);\n if (transform) {\n this.ctx.transform.apply(this.ctx, transform);\n }\n this.ctx.transform.apply(this.ctx, viewport.transform);\n\n this.baseTransform = this.ctx.mozCurrentTransform.slice();\n\n if (this.imageLayer) {\n this.imageLayer.beginLayout();\n }\n },\n\n executeOperatorList: function CanvasGraphics_executeOperatorList(\n operatorList,\n executionStartIdx, continueCallback,\n stepper) {\n var argsArray = operatorList.argsArray;\n var fnArray = operatorList.fnArray;\n var i = executionStartIdx || 0;\n var argsArrayLen = argsArray.length;\n\n // Sometimes the OperatorList to execute is empty.\n if (argsArrayLen === i) {\n return i;\n }\n\n var chunkOperations = (argsArrayLen - i > EXECUTION_STEPS &&\n typeof continueCallback === 'function');\n var endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0;\n var steps = 0;\n\n var commonObjs = this.commonObjs;\n var objs = this.objs;\n var fnId;\n\n while (true) {\n if (stepper !== undefined && i === stepper.nextBreakPoint) {\n stepper.breakIt(i, continueCallback);\n return i;\n }\n\n fnId = fnArray[i];\n\n if (fnId !== OPS.dependency) {\n this[fnId].apply(this, argsArray[i]);\n } else {\n var deps = argsArray[i];\n for (var n = 0, nn = deps.length; n < nn; n++) {\n var depObjId = deps[n];\n var common = depObjId[0] === 'g' && depObjId[1] === '_';\n var objsPool = common ? commonObjs : objs;\n\n // If the promise isn't resolved yet, add the continueCallback\n // to the promise and bail out.\n if (!objsPool.isResolved(depObjId)) {\n objsPool.get(depObjId, continueCallback);\n return i;\n }\n }\n }\n\n i++;\n\n // If the entire operatorList was executed, stop as were done.\n if (i === argsArrayLen) {\n return i;\n }\n\n // If the execution took longer then a certain amount of time and\n // `continueCallback` is specified, interrupt the execution.\n if (chunkOperations && ++steps > EXECUTION_STEPS) {\n if (Date.now() > endTime) {\n continueCallback();\n return i;\n }\n steps = 0;\n }\n\n // If the operatorList isn't executed completely yet OR the execution\n // time was short enough, do another execution round.\n }\n },\n\n endDrawing: function CanvasGraphics_endDrawing() {\n // Finishing all opened operations such as SMask group painting.\n if (this.current.activeSMask !== null) {\n this.endSMaskGroup();\n }\n\n this.ctx.restore();\n\n if (this.transparentCanvas) {\n this.ctx = this.compositeCtx;\n this.ctx.save();\n this.ctx.setTransform(1, 0, 0, 1, 0, 0); // Avoid apply transform twice\n this.ctx.drawImage(this.transparentCanvas, 0, 0);\n this.ctx.restore();\n this.transparentCanvas = null;\n }\n\n this.cachedCanvases.clear();\n WebGLUtils.clear();\n\n if (this.imageLayer) {\n this.imageLayer.endLayout();\n }\n },\n\n // Graphics state\n setLineWidth: function CanvasGraphics_setLineWidth(width) {\n this.current.lineWidth = width;\n this.ctx.lineWidth = width;\n },\n setLineCap: function CanvasGraphics_setLineCap(style) {\n this.ctx.lineCap = LINE_CAP_STYLES[style];\n },\n setLineJoin: function CanvasGraphics_setLineJoin(style) {\n this.ctx.lineJoin = LINE_JOIN_STYLES[style];\n },\n setMiterLimit: function CanvasGraphics_setMiterLimit(limit) {\n this.ctx.miterLimit = limit;\n },\n setDash: function CanvasGraphics_setDash(dashArray, dashPhase) {\n var ctx = this.ctx;\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash(dashArray);\n ctx.lineDashOffset = dashPhase;\n }\n },\n setRenderingIntent: function CanvasGraphics_setRenderingIntent(intent) {\n // Maybe if we one day fully support color spaces this will be important\n // for now we can ignore.\n // TODO set rendering intent?\n },\n setFlatness: function CanvasGraphics_setFlatness(flatness) {\n // There's no way to control this with canvas, but we can safely ignore.\n // TODO set flatness?\n },\n setGState: function CanvasGraphics_setGState(states) {\n for (var i = 0, ii = states.length; i < ii; i++) {\n var state = states[i];\n var key = state[0];\n var value = state[1];\n\n switch (key) {\n case 'LW':\n this.setLineWidth(value);\n break;\n case 'LC':\n this.setLineCap(value);\n break;\n case 'LJ':\n this.setLineJoin(value);\n break;\n case 'ML':\n this.setMiterLimit(value);\n break;\n case 'D':\n this.setDash(value[0], value[1]);\n break;\n case 'RI':\n this.setRenderingIntent(value);\n break;\n case 'FL':\n this.setFlatness(value);\n break;\n case 'Font':\n this.setFont(value[0], value[1]);\n break;\n case 'CA':\n this.current.strokeAlpha = state[1];\n break;\n case 'ca':\n this.current.fillAlpha = state[1];\n this.ctx.globalAlpha = state[1];\n break;\n case 'BM':\n this.ctx.globalCompositeOperation = value;\n break;\n case 'SMask':\n if (this.current.activeSMask) {\n // If SMask is currrenly used, it needs to be suspended or\n // finished. Suspend only makes sense when at least one save()\n // was performed and state needs to be reverted on restore().\n if (this.stateStack.length > 0 &&\n (this.stateStack[this.stateStack.length - 1].activeSMask ===\n this.current.activeSMask)) {\n this.suspendSMaskGroup();\n } else {\n this.endSMaskGroup();\n }\n }\n this.current.activeSMask = value ? this.tempSMask : null;\n if (this.current.activeSMask) {\n this.beginSMaskGroup();\n }\n this.tempSMask = null;\n break;\n }\n }\n },\n beginSMaskGroup: function CanvasGraphics_beginSMaskGroup() {\n\n var activeSMask = this.current.activeSMask;\n var drawnWidth = activeSMask.canvas.width;\n var drawnHeight = activeSMask.canvas.height;\n var cacheId = 'smaskGroupAt' + this.groupLevel;\n var scratchCanvas = this.cachedCanvases.getCanvas(\n cacheId, drawnWidth, drawnHeight, true);\n\n var currentCtx = this.ctx;\n var currentTransform = currentCtx.mozCurrentTransform;\n this.ctx.save();\n\n var groupCtx = scratchCanvas.context;\n groupCtx.scale(1 / activeSMask.scaleX, 1 / activeSMask.scaleY);\n groupCtx.translate(-activeSMask.offsetX, -activeSMask.offsetY);\n groupCtx.transform.apply(groupCtx, currentTransform);\n\n activeSMask.startTransformInverse = groupCtx.mozCurrentTransformInverse;\n\n copyCtxState(currentCtx, groupCtx);\n this.ctx = groupCtx;\n this.setGState([\n ['BM', 'source-over'],\n ['ca', 1],\n ['CA', 1]\n ]);\n this.groupStack.push(currentCtx);\n this.groupLevel++;\n },\n suspendSMaskGroup: function CanvasGraphics_endSMaskGroup() {\n // Similar to endSMaskGroup, the intermediate canvas has to be composed\n // and future ctx state restored.\n var groupCtx = this.ctx;\n this.groupLevel--;\n this.ctx = this.groupStack.pop();\n\n composeSMask(this.ctx, this.current.activeSMask, groupCtx);\n this.ctx.restore();\n this.ctx.save(); // save is needed since SMask will be resumed.\n copyCtxState(groupCtx, this.ctx);\n\n // Saving state for resuming.\n this.current.resumeSMaskCtx = groupCtx;\n // Transform was changed in the SMask canvas, reflecting this change on\n // this.ctx.\n var deltaTransform = Util.transform(\n this.current.activeSMask.startTransformInverse,\n groupCtx.mozCurrentTransform);\n this.ctx.transform.apply(this.ctx, deltaTransform);\n\n // SMask was composed, the results at the groupCtx can be cleared.\n groupCtx.save();\n groupCtx.setTransform(1, 0, 0, 1, 0, 0);\n groupCtx.clearRect(0, 0, groupCtx.canvas.width, groupCtx.canvas.height);\n groupCtx.restore();\n },\n resumeSMaskGroup: function CanvasGraphics_endSMaskGroup() {\n // Resuming state saved by suspendSMaskGroup. We don't need to restore\n // any groupCtx state since restore() command (the only caller) will do\n // that for us. See also beginSMaskGroup.\n var groupCtx = this.current.resumeSMaskCtx;\n var currentCtx = this.ctx;\n this.ctx = groupCtx;\n this.groupStack.push(currentCtx);\n this.groupLevel++;\n },\n endSMaskGroup: function CanvasGraphics_endSMaskGroup() {\n var groupCtx = this.ctx;\n this.groupLevel--;\n this.ctx = this.groupStack.pop();\n\n composeSMask(this.ctx, this.current.activeSMask, groupCtx);\n this.ctx.restore();\n copyCtxState(groupCtx, this.ctx);\n // Transform was changed in the SMask canvas, reflecting this change on\n // this.ctx.\n var deltaTransform = Util.transform(\n this.current.activeSMask.startTransformInverse,\n groupCtx.mozCurrentTransform);\n this.ctx.transform.apply(this.ctx, deltaTransform);\n },\n save: function CanvasGraphics_save() {\n this.ctx.save();\n var old = this.current;\n this.stateStack.push(old);\n this.current = old.clone();\n this.current.resumeSMaskCtx = null;\n },\n restore: function CanvasGraphics_restore() {\n // SMask was suspended, we just need to resume it.\n if (this.current.resumeSMaskCtx) {\n this.resumeSMaskGroup();\n }\n // SMask has to be finished once there is no states that are using the\n // same SMask.\n if (this.current.activeSMask !== null && (this.stateStack.length === 0 ||\n this.stateStack[this.stateStack.length - 1].activeSMask !==\n this.current.activeSMask)) {\n this.endSMaskGroup();\n }\n\n if (this.stateStack.length !== 0) {\n this.current = this.stateStack.pop();\n this.ctx.restore();\n\n // Ensure that the clipping path is reset (fixes issue6413.pdf).\n this.pendingClip = null;\n\n this.cachedGetSinglePixelWidth = null;\n }\n },\n transform: function CanvasGraphics_transform(a, b, c, d, e, f) {\n this.ctx.transform(a, b, c, d, e, f);\n\n this.cachedGetSinglePixelWidth = null;\n },\n\n // Path\n constructPath: function CanvasGraphics_constructPath(ops, args) {\n var ctx = this.ctx;\n var current = this.current;\n var x = current.x, y = current.y;\n for (var i = 0, j = 0, ii = ops.length; i < ii; i++) {\n switch (ops[i] | 0) {\n case OPS.rectangle:\n x = args[j++];\n y = args[j++];\n var width = args[j++];\n var height = args[j++];\n if (width === 0) {\n width = this.getSinglePixelWidth();\n }\n if (height === 0) {\n height = this.getSinglePixelWidth();\n }\n var xw = x + width;\n var yh = y + height;\n this.ctx.moveTo(x, y);\n this.ctx.lineTo(xw, y);\n this.ctx.lineTo(xw, yh);\n this.ctx.lineTo(x, yh);\n this.ctx.lineTo(x, y);\n this.ctx.closePath();\n break;\n case OPS.moveTo:\n x = args[j++];\n y = args[j++];\n ctx.moveTo(x, y);\n break;\n case OPS.lineTo:\n x = args[j++];\n y = args[j++];\n ctx.lineTo(x, y);\n break;\n case OPS.curveTo:\n x = args[j + 4];\n y = args[j + 5];\n ctx.bezierCurveTo(args[j], args[j + 1], args[j + 2], args[j + 3],\n x, y);\n j += 6;\n break;\n case OPS.curveTo2:\n ctx.bezierCurveTo(x, y, args[j], args[j + 1],\n args[j + 2], args[j + 3]);\n x = args[j + 2];\n y = args[j + 3];\n j += 4;\n break;\n case OPS.curveTo3:\n x = args[j + 2];\n y = args[j + 3];\n ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y);\n j += 4;\n break;\n case OPS.closePath:\n ctx.closePath();\n break;\n }\n }\n current.setCurrentPoint(x, y);\n },\n closePath: function CanvasGraphics_closePath() {\n this.ctx.closePath();\n },\n stroke: function CanvasGraphics_stroke(consumePath) {\n consumePath = typeof consumePath !== 'undefined' ? consumePath : true;\n var ctx = this.ctx;\n var strokeColor = this.current.strokeColor;\n // Prevent drawing too thin lines by enforcing a minimum line width.\n ctx.lineWidth = Math.max(this.getSinglePixelWidth() * MIN_WIDTH_FACTOR,\n this.current.lineWidth);\n // For stroke we want to temporarily change the global alpha to the\n // stroking alpha.\n ctx.globalAlpha = this.current.strokeAlpha;\n if (strokeColor && strokeColor.hasOwnProperty('type') &&\n strokeColor.type === 'Pattern') {\n // for patterns, we transform to pattern space, calculate\n // the pattern, call stroke, and restore to user space\n ctx.save();\n ctx.strokeStyle = strokeColor.getPattern(ctx, this);\n ctx.stroke();\n ctx.restore();\n } else {\n ctx.stroke();\n }\n if (consumePath) {\n this.consumePath();\n }\n // Restore the global alpha to the fill alpha\n ctx.globalAlpha = this.current.fillAlpha;\n },\n closeStroke: function CanvasGraphics_closeStroke() {\n this.closePath();\n this.stroke();\n },\n fill: function CanvasGraphics_fill(consumePath) {\n consumePath = typeof consumePath !== 'undefined' ? consumePath : true;\n var ctx = this.ctx;\n var fillColor = this.current.fillColor;\n var isPatternFill = this.current.patternFill;\n var needRestore = false;\n\n if (isPatternFill) {\n ctx.save();\n if (this.baseTransform) {\n ctx.setTransform.apply(ctx, this.baseTransform);\n }\n ctx.fillStyle = fillColor.getPattern(ctx, this);\n needRestore = true;\n }\n\n if (this.pendingEOFill) {\n ctx.fill('evenodd');\n this.pendingEOFill = false;\n } else {\n ctx.fill();\n }\n\n if (needRestore) {\n ctx.restore();\n }\n if (consumePath) {\n this.consumePath();\n }\n },\n eoFill: function CanvasGraphics_eoFill() {\n this.pendingEOFill = true;\n this.fill();\n },\n fillStroke: function CanvasGraphics_fillStroke() {\n this.fill(false);\n this.stroke(false);\n\n this.consumePath();\n },\n eoFillStroke: function CanvasGraphics_eoFillStroke() {\n this.pendingEOFill = true;\n this.fillStroke();\n },\n closeFillStroke: function CanvasGraphics_closeFillStroke() {\n this.closePath();\n this.fillStroke();\n },\n closeEOFillStroke: function CanvasGraphics_closeEOFillStroke() {\n this.pendingEOFill = true;\n this.closePath();\n this.fillStroke();\n },\n endPath: function CanvasGraphics_endPath() {\n this.consumePath();\n },\n\n // Clipping\n clip: function CanvasGraphics_clip() {\n this.pendingClip = NORMAL_CLIP;\n },\n eoClip: function CanvasGraphics_eoClip() {\n this.pendingClip = EO_CLIP;\n },\n\n // Text\n beginText: function CanvasGraphics_beginText() {\n this.current.textMatrix = IDENTITY_MATRIX;\n this.current.textMatrixScale = 1;\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n },\n endText: function CanvasGraphics_endText() {\n var paths = this.pendingTextPaths;\n var ctx = this.ctx;\n if (paths === undefined) {\n ctx.beginPath();\n return;\n }\n\n ctx.save();\n ctx.beginPath();\n for (var i = 0; i < paths.length; i++) {\n var path = paths[i];\n ctx.setTransform.apply(ctx, path.transform);\n ctx.translate(path.x, path.y);\n path.addToPath(ctx, path.fontSize);\n }\n ctx.restore();\n ctx.clip();\n ctx.beginPath();\n delete this.pendingTextPaths;\n },\n setCharSpacing: function CanvasGraphics_setCharSpacing(spacing) {\n this.current.charSpacing = spacing;\n },\n setWordSpacing: function CanvasGraphics_setWordSpacing(spacing) {\n this.current.wordSpacing = spacing;\n },\n setHScale: function CanvasGraphics_setHScale(scale) {\n this.current.textHScale = scale / 100;\n },\n setLeading: function CanvasGraphics_setLeading(leading) {\n this.current.leading = -leading;\n },\n setFont: function CanvasGraphics_setFont(fontRefName, size) {\n var fontObj = this.commonObjs.get(fontRefName);\n var current = this.current;\n\n if (!fontObj) {\n throw new Error(`Can't find font for ${fontRefName}`);\n }\n\n current.fontMatrix = (fontObj.fontMatrix ?\n fontObj.fontMatrix : FONT_IDENTITY_MATRIX);\n\n // A valid matrix needs all main diagonal elements to be non-zero\n // This also ensures we bypass FF bugzilla bug #719844.\n if (current.fontMatrix[0] === 0 ||\n current.fontMatrix[3] === 0) {\n warn('Invalid font matrix for font ' + fontRefName);\n }\n\n // The spec for Tf (setFont) says that 'size' specifies the font 'scale',\n // and in some docs this can be negative (inverted x-y axes).\n if (size < 0) {\n size = -size;\n current.fontDirection = -1;\n } else {\n current.fontDirection = 1;\n }\n\n this.current.font = fontObj;\n this.current.fontSize = size;\n\n if (fontObj.isType3Font) {\n return; // we don't need ctx.font for Type3 fonts\n }\n\n var name = fontObj.loadedName || 'sans-serif';\n var bold = fontObj.black ? '900' : (fontObj.bold ? 'bold' : 'normal');\n var italic = fontObj.italic ? 'italic' : 'normal';\n var typeface = '\"' + name + '\", ' + fontObj.fallbackName;\n\n // Some font backends cannot handle fonts below certain size.\n // Keeping the font at minimal size and using the fontSizeScale to change\n // the current transformation matrix before the fillText/strokeText.\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=726227\n var browserFontSize = size < MIN_FONT_SIZE ? MIN_FONT_SIZE :\n size > MAX_FONT_SIZE ? MAX_FONT_SIZE : size;\n this.current.fontSizeScale = size / browserFontSize;\n\n var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface;\n this.ctx.font = rule;\n },\n setTextRenderingMode: function CanvasGraphics_setTextRenderingMode(mode) {\n this.current.textRenderingMode = mode;\n },\n setTextRise: function CanvasGraphics_setTextRise(rise) {\n this.current.textRise = rise;\n },\n moveText: function CanvasGraphics_moveText(x, y) {\n this.current.x = this.current.lineX += x;\n this.current.y = this.current.lineY += y;\n },\n setLeadingMoveText: function CanvasGraphics_setLeadingMoveText(x, y) {\n this.setLeading(-y);\n this.moveText(x, y);\n },\n setTextMatrix: function CanvasGraphics_setTextMatrix(a, b, c, d, e, f) {\n this.current.textMatrix = [a, b, c, d, e, f];\n this.current.textMatrixScale = Math.sqrt(a * a + b * b);\n\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n },\n nextLine: function CanvasGraphics_nextLine() {\n this.moveText(0, this.current.leading);\n },\n\n paintChar: function CanvasGraphics_paintChar(character, x, y) {\n var ctx = this.ctx;\n var current = this.current;\n var font = current.font;\n var textRenderingMode = current.textRenderingMode;\n var fontSize = current.fontSize / current.fontSizeScale;\n var fillStrokeMode = textRenderingMode &\n TextRenderingMode.FILL_STROKE_MASK;\n var isAddToPathSet = !!(textRenderingMode &\n TextRenderingMode.ADD_TO_PATH_FLAG);\n\n var addToPath;\n if (font.disableFontFace || isAddToPathSet) {\n addToPath = font.getPathGenerator(this.commonObjs, character);\n }\n\n if (font.disableFontFace) {\n ctx.save();\n ctx.translate(x, y);\n ctx.beginPath();\n addToPath(ctx, fontSize);\n if (fillStrokeMode === TextRenderingMode.FILL ||\n fillStrokeMode === TextRenderingMode.FILL_STROKE) {\n ctx.fill();\n }\n if (fillStrokeMode === TextRenderingMode.STROKE ||\n fillStrokeMode === TextRenderingMode.FILL_STROKE) {\n ctx.stroke();\n }\n ctx.restore();\n } else {\n if (fillStrokeMode === TextRenderingMode.FILL ||\n fillStrokeMode === TextRenderingMode.FILL_STROKE) {\n ctx.fillText(character, x, y);\n }\n if (fillStrokeMode === TextRenderingMode.STROKE ||\n fillStrokeMode === TextRenderingMode.FILL_STROKE) {\n ctx.strokeText(character, x, y);\n }\n }\n\n if (isAddToPathSet) {\n var paths = this.pendingTextPaths || (this.pendingTextPaths = []);\n paths.push({\n transform: ctx.mozCurrentTransform,\n x,\n y,\n fontSize,\n addToPath,\n });\n }\n },\n\n get isFontSubpixelAAEnabled() {\n // Checks if anti-aliasing is enabled when scaled text is painted.\n // On Windows GDI scaled fonts looks bad.\n var ctx = this.canvasFactory.create(10, 10).context;\n ctx.scale(1.5, 1);\n ctx.fillText('I', 0, 10);\n var data = ctx.getImageData(0, 0, 10, 10).data;\n var enabled = false;\n for (var i = 3; i < data.length; i += 4) {\n if (data[i] > 0 && data[i] < 255) {\n enabled = true;\n break;\n }\n }\n return shadow(this, 'isFontSubpixelAAEnabled', enabled);\n },\n\n showText: function CanvasGraphics_showText(glyphs) {\n var current = this.current;\n var font = current.font;\n if (font.isType3Font) {\n return this.showType3Text(glyphs);\n }\n\n var fontSize = current.fontSize;\n if (fontSize === 0) {\n return;\n }\n\n var ctx = this.ctx;\n var fontSizeScale = current.fontSizeScale;\n var charSpacing = current.charSpacing;\n var wordSpacing = current.wordSpacing;\n var fontDirection = current.fontDirection;\n var textHScale = current.textHScale * fontDirection;\n var glyphsLength = glyphs.length;\n var vertical = font.vertical;\n var spacingDir = vertical ? 1 : -1;\n var defaultVMetrics = font.defaultVMetrics;\n var widthAdvanceScale = fontSize * current.fontMatrix[0];\n\n var simpleFillText =\n current.textRenderingMode === TextRenderingMode.FILL &&\n !font.disableFontFace;\n\n ctx.save();\n ctx.transform.apply(ctx, current.textMatrix);\n ctx.translate(current.x, current.y + current.textRise);\n\n if (current.patternFill) {\n // TODO: Some shading patterns are not applied correctly to text,\n // e.g. issues 3988 and 5432, and ShowText-ShadingPattern.pdf.\n ctx.fillStyle = current.fillColor.getPattern(ctx, this);\n }\n\n if (fontDirection > 0) {\n ctx.scale(textHScale, -1);\n } else {\n ctx.scale(textHScale, 1);\n }\n\n var lineWidth = current.lineWidth;\n var scale = current.textMatrixScale;\n if (scale === 0 || lineWidth === 0) {\n var fillStrokeMode = current.textRenderingMode &\n TextRenderingMode.FILL_STROKE_MASK;\n if (fillStrokeMode === TextRenderingMode.STROKE ||\n fillStrokeMode === TextRenderingMode.FILL_STROKE) {\n this.cachedGetSinglePixelWidth = null;\n lineWidth = this.getSinglePixelWidth() * MIN_WIDTH_FACTOR;\n }\n } else {\n lineWidth /= scale;\n }\n\n if (fontSizeScale !== 1.0) {\n ctx.scale(fontSizeScale, fontSizeScale);\n lineWidth /= fontSizeScale;\n }\n\n ctx.lineWidth = lineWidth;\n\n var x = 0, i;\n for (i = 0; i < glyphsLength; ++i) {\n var glyph = glyphs[i];\n if (isNum(glyph)) {\n x += spacingDir * glyph * fontSize / 1000;\n continue;\n }\n\n var restoreNeeded = false;\n var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n var character = glyph.fontChar;\n var accent = glyph.accent;\n var scaledX, scaledY, scaledAccentX, scaledAccentY;\n var width = glyph.width;\n if (vertical) {\n var vmetric, vx, vy;\n vmetric = glyph.vmetric || defaultVMetrics;\n vx = glyph.vmetric ? vmetric[1] : width * 0.5;\n vx = -vx * widthAdvanceScale;\n vy = vmetric[2] * widthAdvanceScale;\n\n width = vmetric ? -vmetric[0] : width;\n scaledX = vx / fontSizeScale;\n scaledY = (x + vy) / fontSizeScale;\n } else {\n scaledX = x / fontSizeScale;\n scaledY = 0;\n }\n\n if (font.remeasure && width > 0) {\n // Some standard fonts may not have the exact width: rescale per\n // character if measured width is greater than expected glyph width\n // and subpixel-aa is enabled, otherwise just center the glyph.\n var measuredWidth = ctx.measureText(character).width * 1000 /\n fontSize * fontSizeScale;\n if (width < measuredWidth && this.isFontSubpixelAAEnabled) {\n var characterScaleX = width / measuredWidth;\n restoreNeeded = true;\n ctx.save();\n ctx.scale(characterScaleX, 1);\n scaledX /= characterScaleX;\n } else if (width !== measuredWidth) {\n scaledX += (width - measuredWidth) / 2000 *\n fontSize / fontSizeScale;\n }\n }\n\n // Only attempt to draw the glyph if it is actually in the embedded font\n // file or if there isn't a font file so the fallback font is shown.\n if (glyph.isInFont || font.missingFile) {\n if (simpleFillText && !accent) {\n // common case\n ctx.fillText(character, scaledX, scaledY);\n } else {\n this.paintChar(character, scaledX, scaledY);\n if (accent) {\n scaledAccentX = scaledX + accent.offset.x / fontSizeScale;\n scaledAccentY = scaledY - accent.offset.y / fontSizeScale;\n this.paintChar(accent.fontChar, scaledAccentX, scaledAccentY);\n }\n }\n }\n\n var charWidth = width * widthAdvanceScale + spacing * fontDirection;\n x += charWidth;\n\n if (restoreNeeded) {\n ctx.restore();\n }\n }\n if (vertical) {\n current.y -= x * textHScale;\n } else {\n current.x += x * textHScale;\n }\n ctx.restore();\n },\n\n showType3Text: function CanvasGraphics_showType3Text(glyphs) {\n // Type3 fonts - each glyph is a \"mini-PDF\"\n var ctx = this.ctx;\n var current = this.current;\n var font = current.font;\n var fontSize = current.fontSize;\n var fontDirection = current.fontDirection;\n var spacingDir = font.vertical ? 1 : -1;\n var charSpacing = current.charSpacing;\n var wordSpacing = current.wordSpacing;\n var textHScale = current.textHScale * fontDirection;\n var fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX;\n var glyphsLength = glyphs.length;\n var isTextInvisible =\n current.textRenderingMode === TextRenderingMode.INVISIBLE;\n var i, glyph, width, spacingLength;\n\n if (isTextInvisible || fontSize === 0) {\n return;\n }\n this.cachedGetSinglePixelWidth = null;\n\n ctx.save();\n ctx.transform.apply(ctx, current.textMatrix);\n ctx.translate(current.x, current.y);\n\n ctx.scale(textHScale, fontDirection);\n\n for (i = 0; i < glyphsLength; ++i) {\n glyph = glyphs[i];\n if (isNum(glyph)) {\n spacingLength = spacingDir * glyph * fontSize / 1000;\n this.ctx.translate(spacingLength, 0);\n current.x += spacingLength * textHScale;\n continue;\n }\n\n var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n var operatorList = font.charProcOperatorList[glyph.operatorListId];\n if (!operatorList) {\n warn(`Type3 character \"${glyph.operatorListId}\" is not available.`);\n continue;\n }\n this.processingType3 = glyph;\n this.save();\n ctx.scale(fontSize, fontSize);\n ctx.transform.apply(ctx, fontMatrix);\n this.executeOperatorList(operatorList);\n this.restore();\n\n var transformed = Util.applyTransform([glyph.width, 0], fontMatrix);\n width = transformed[0] * fontSize + spacing;\n\n ctx.translate(width, 0);\n current.x += width * textHScale;\n }\n ctx.restore();\n this.processingType3 = null;\n },\n\n // Type3 fonts\n setCharWidth: function CanvasGraphics_setCharWidth(xWidth, yWidth) {\n // We can safely ignore this since the width should be the same\n // as the width in the Widths array.\n },\n setCharWidthAndBounds: function CanvasGraphics_setCharWidthAndBounds(xWidth,\n yWidth,\n llx,\n lly,\n urx,\n ury) {\n // TODO According to the spec we're also suppose to ignore any operators\n // that set color or include images while processing this type3 font.\n this.ctx.rect(llx, lly, urx - llx, ury - lly);\n this.clip();\n this.endPath();\n },\n\n // Color\n getColorN_Pattern: function CanvasGraphics_getColorN_Pattern(IR) {\n var pattern;\n if (IR[0] === 'TilingPattern') {\n var color = IR[1];\n var baseTransform = this.baseTransform ||\n this.ctx.mozCurrentTransform.slice();\n var canvasGraphicsFactory = {\n createCanvasGraphics: (ctx) => {\n return new CanvasGraphics(ctx, this.commonObjs, this.objs,\n this.canvasFactory);\n },\n };\n pattern = new TilingPattern(IR, color, this.ctx, canvasGraphicsFactory,\n baseTransform);\n } else {\n pattern = getShadingPatternFromIR(IR);\n }\n return pattern;\n },\n setStrokeColorN: function CanvasGraphics_setStrokeColorN() {\n this.current.strokeColor = this.getColorN_Pattern(arguments);\n },\n setFillColorN: function CanvasGraphics_setFillColorN() {\n this.current.fillColor = this.getColorN_Pattern(arguments);\n this.current.patternFill = true;\n },\n setStrokeRGBColor: function CanvasGraphics_setStrokeRGBColor(r, g, b) {\n var color = Util.makeCssRgb(r, g, b);\n this.ctx.strokeStyle = color;\n this.current.strokeColor = color;\n },\n setFillRGBColor: function CanvasGraphics_setFillRGBColor(r, g, b) {\n var color = Util.makeCssRgb(r, g, b);\n this.ctx.fillStyle = color;\n this.current.fillColor = color;\n this.current.patternFill = false;\n },\n\n shadingFill: function CanvasGraphics_shadingFill(patternIR) {\n var ctx = this.ctx;\n\n this.save();\n var pattern = getShadingPatternFromIR(patternIR);\n ctx.fillStyle = pattern.getPattern(ctx, this, true);\n\n var inv = ctx.mozCurrentTransformInverse;\n if (inv) {\n var canvas = ctx.canvas;\n var width = canvas.width;\n var height = canvas.height;\n\n var bl = Util.applyTransform([0, 0], inv);\n var br = Util.applyTransform([0, height], inv);\n var ul = Util.applyTransform([width, 0], inv);\n var ur = Util.applyTransform([width, height], inv);\n\n var x0 = Math.min(bl[0], br[0], ul[0], ur[0]);\n var y0 = Math.min(bl[1], br[1], ul[1], ur[1]);\n var x1 = Math.max(bl[0], br[0], ul[0], ur[0]);\n var y1 = Math.max(bl[1], br[1], ul[1], ur[1]);\n\n this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0);\n } else {\n // HACK to draw the gradient onto an infinite rectangle.\n // PDF gradients are drawn across the entire image while\n // Canvas only allows gradients to be drawn in a rectangle\n // The following bug should allow us to remove this.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=664884\n\n this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10);\n }\n\n this.restore();\n },\n\n // Images\n beginInlineImage: function CanvasGraphics_beginInlineImage() {\n throw new Error('Should not call beginInlineImage');\n },\n beginImageData: function CanvasGraphics_beginImageData() {\n throw new Error('Should not call beginImageData');\n },\n\n paintFormXObjectBegin: function CanvasGraphics_paintFormXObjectBegin(matrix,\n bbox) {\n this.save();\n this.baseTransformStack.push(this.baseTransform);\n\n if (Array.isArray(matrix) && matrix.length === 6) {\n this.transform.apply(this, matrix);\n }\n\n this.baseTransform = this.ctx.mozCurrentTransform;\n\n if (Array.isArray(bbox) && bbox.length === 4) {\n var width = bbox[2] - bbox[0];\n var height = bbox[3] - bbox[1];\n this.ctx.rect(bbox[0], bbox[1], width, height);\n this.clip();\n this.endPath();\n }\n },\n\n paintFormXObjectEnd: function CanvasGraphics_paintFormXObjectEnd() {\n this.restore();\n this.baseTransform = this.baseTransformStack.pop();\n },\n\n beginGroup: function CanvasGraphics_beginGroup(group) {\n this.save();\n var currentCtx = this.ctx;\n // TODO non-isolated groups - according to Rik at adobe non-isolated\n // group results aren't usually that different and they even have tools\n // that ignore this setting. Notes from Rik on implementing:\n // - When you encounter an transparency group, create a new canvas with\n // the dimensions of the bbox\n // - copy the content from the previous canvas to the new canvas\n // - draw as usual\n // - remove the backdrop alpha:\n // alphaNew = 1 - (1 - alpha)/(1 - alphaBackdrop) with 'alpha' the alpha\n // value of your transparency group and 'alphaBackdrop' the alpha of the\n // backdrop\n // - remove background color:\n // colorNew = color - alphaNew *colorBackdrop /(1 - alphaNew)\n if (!group.isolated) {\n info('TODO: Support non-isolated groups.');\n }\n\n // TODO knockout - supposedly possible with the clever use of compositing\n // modes.\n if (group.knockout) {\n warn('Knockout groups not supported.');\n }\n\n var currentTransform = currentCtx.mozCurrentTransform;\n if (group.matrix) {\n currentCtx.transform.apply(currentCtx, group.matrix);\n }\n if (!group.bbox) {\n throw new Error('Bounding box is required.');\n }\n\n // Based on the current transform figure out how big the bounding box\n // will actually be.\n var bounds = Util.getAxialAlignedBoundingBox(\n group.bbox,\n currentCtx.mozCurrentTransform);\n // Clip the bounding box to the current canvas.\n var canvasBounds = [0,\n 0,\n currentCtx.canvas.width,\n currentCtx.canvas.height];\n bounds = Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0];\n // Use ceil in case we're between sizes so we don't create canvas that is\n // too small and make the canvas at least 1x1 pixels.\n var offsetX = Math.floor(bounds[0]);\n var offsetY = Math.floor(bounds[1]);\n var drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1);\n var drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1);\n var scaleX = 1, scaleY = 1;\n if (drawnWidth > MAX_GROUP_SIZE) {\n scaleX = drawnWidth / MAX_GROUP_SIZE;\n drawnWidth = MAX_GROUP_SIZE;\n }\n if (drawnHeight > MAX_GROUP_SIZE) {\n scaleY = drawnHeight / MAX_GROUP_SIZE;\n drawnHeight = MAX_GROUP_SIZE;\n }\n\n var cacheId = 'groupAt' + this.groupLevel;\n if (group.smask) {\n // Using two cache entries is case if masks are used one after another.\n cacheId += '_smask_' + ((this.smaskCounter++) % 2);\n }\n var scratchCanvas = this.cachedCanvases.getCanvas(\n cacheId, drawnWidth, drawnHeight, true);\n var groupCtx = scratchCanvas.context;\n\n // Since we created a new canvas that is just the size of the bounding box\n // we have to translate the group ctx.\n groupCtx.scale(1 / scaleX, 1 / scaleY);\n groupCtx.translate(-offsetX, -offsetY);\n groupCtx.transform.apply(groupCtx, currentTransform);\n\n if (group.smask) {\n // Saving state and cached mask to be used in setGState.\n this.smaskStack.push({\n canvas: scratchCanvas.canvas,\n context: groupCtx,\n offsetX,\n offsetY,\n scaleX,\n scaleY,\n subtype: group.smask.subtype,\n backdrop: group.smask.backdrop,\n transferMap: group.smask.transferMap || null,\n startTransformInverse: null, // used during suspend operation\n });\n } else {\n // Setup the current ctx so when the group is popped we draw it at the\n // right location.\n currentCtx.setTransform(1, 0, 0, 1, 0, 0);\n currentCtx.translate(offsetX, offsetY);\n currentCtx.scale(scaleX, scaleY);\n }\n // The transparency group inherits all off the current graphics state\n // except the blend mode, soft mask, and alpha constants.\n copyCtxState(currentCtx, groupCtx);\n this.ctx = groupCtx;\n this.setGState([\n ['BM', 'source-over'],\n ['ca', 1],\n ['CA', 1]\n ]);\n this.groupStack.push(currentCtx);\n this.groupLevel++;\n\n // Reseting mask state, masks will be applied on restore of the group.\n this.current.activeSMask = null;\n },\n\n endGroup: function CanvasGraphics_endGroup(group) {\n this.groupLevel--;\n var groupCtx = this.ctx;\n this.ctx = this.groupStack.pop();\n // Turn off image smoothing to avoid sub pixel interpolation which can\n // look kind of blurry for some pdfs.\n if (this.ctx.imageSmoothingEnabled !== undefined) {\n this.ctx.imageSmoothingEnabled = false;\n } else {\n this.ctx.mozImageSmoothingEnabled = false;\n }\n if (group.smask) {\n this.tempSMask = this.smaskStack.pop();\n } else {\n this.ctx.drawImage(groupCtx.canvas, 0, 0);\n }\n this.restore();\n },\n\n beginAnnotations: function CanvasGraphics_beginAnnotations() {\n this.save();\n if (this.baseTransform) {\n this.ctx.setTransform.apply(this.ctx, this.baseTransform);\n }\n },\n\n endAnnotations: function CanvasGraphics_endAnnotations() {\n this.restore();\n },\n\n beginAnnotation: function CanvasGraphics_beginAnnotation(rect, transform,\n matrix) {\n this.save();\n resetCtxToDefault(this.ctx);\n this.current = new CanvasExtraState();\n\n if (Array.isArray(rect) && rect.length === 4) {\n var width = rect[2] - rect[0];\n var height = rect[3] - rect[1];\n this.ctx.rect(rect[0], rect[1], width, height);\n this.clip();\n this.endPath();\n }\n\n this.transform.apply(this, transform);\n this.transform.apply(this, matrix);\n },\n\n endAnnotation: function CanvasGraphics_endAnnotation() {\n this.restore();\n },\n\n paintJpegXObject: function CanvasGraphics_paintJpegXObject(objId, w, h) {\n var domImage = this.objs.get(objId);\n if (!domImage) {\n warn('Dependent image isn\\'t ready yet');\n return;\n }\n\n this.save();\n\n var ctx = this.ctx;\n // scale the image to the unit square\n ctx.scale(1 / w, -1 / h);\n\n ctx.drawImage(domImage, 0, 0, domImage.width, domImage.height,\n 0, -h, w, h);\n if (this.imageLayer) {\n var currentTransform = ctx.mozCurrentTransformInverse;\n var position = this.getCanvasPosition(0, 0);\n this.imageLayer.appendImage({\n objId,\n left: position[0],\n top: position[1],\n width: w / currentTransform[0],\n height: h / currentTransform[3],\n });\n }\n this.restore();\n },\n\n paintImageMaskXObject: function CanvasGraphics_paintImageMaskXObject(img) {\n var ctx = this.ctx;\n var width = img.width, height = img.height;\n var fillColor = this.current.fillColor;\n var isPatternFill = this.current.patternFill;\n\n var glyph = this.processingType3;\n\n if (COMPILE_TYPE3_GLYPHS && glyph && glyph.compiled === undefined) {\n if (width <= MAX_SIZE_TO_COMPILE && height <= MAX_SIZE_TO_COMPILE) {\n glyph.compiled =\n compileType3Glyph({ data: img.data, width, height, });\n } else {\n glyph.compiled = null;\n }\n }\n\n if (glyph && glyph.compiled) {\n glyph.compiled(ctx);\n return;\n }\n\n var maskCanvas = this.cachedCanvases.getCanvas('maskCanvas',\n width, height);\n var maskCtx = maskCanvas.context;\n maskCtx.save();\n\n putBinaryImageMask(maskCtx, img);\n\n maskCtx.globalCompositeOperation = 'source-in';\n\n maskCtx.fillStyle = isPatternFill ?\n fillColor.getPattern(maskCtx, this) : fillColor;\n maskCtx.fillRect(0, 0, width, height);\n\n maskCtx.restore();\n\n this.paintInlineImageXObject(maskCanvas.canvas);\n },\n\n paintImageMaskXObjectRepeat:\n function CanvasGraphics_paintImageMaskXObjectRepeat(imgData, scaleX,\n scaleY, positions) {\n var width = imgData.width;\n var height = imgData.height;\n var fillColor = this.current.fillColor;\n var isPatternFill = this.current.patternFill;\n\n var maskCanvas = this.cachedCanvases.getCanvas('maskCanvas',\n width, height);\n var maskCtx = maskCanvas.context;\n maskCtx.save();\n\n putBinaryImageMask(maskCtx, imgData);\n\n maskCtx.globalCompositeOperation = 'source-in';\n\n maskCtx.fillStyle = isPatternFill ?\n fillColor.getPattern(maskCtx, this) : fillColor;\n maskCtx.fillRect(0, 0, width, height);\n\n maskCtx.restore();\n\n var ctx = this.ctx;\n for (var i = 0, ii = positions.length; i < ii; i += 2) {\n ctx.save();\n ctx.transform(scaleX, 0, 0, scaleY, positions[i], positions[i + 1]);\n ctx.scale(1, -1);\n ctx.drawImage(maskCanvas.canvas, 0, 0, width, height,\n 0, -1, 1, 1);\n ctx.restore();\n }\n },\n\n paintImageMaskXObjectGroup:\n function CanvasGraphics_paintImageMaskXObjectGroup(images) {\n var ctx = this.ctx;\n\n var fillColor = this.current.fillColor;\n var isPatternFill = this.current.patternFill;\n for (var i = 0, ii = images.length; i < ii; i++) {\n var image = images[i];\n var width = image.width, height = image.height;\n\n var maskCanvas = this.cachedCanvases.getCanvas('maskCanvas',\n width, height);\n var maskCtx = maskCanvas.context;\n maskCtx.save();\n\n putBinaryImageMask(maskCtx, image);\n\n maskCtx.globalCompositeOperation = 'source-in';\n\n maskCtx.fillStyle = isPatternFill ?\n fillColor.getPattern(maskCtx, this) : fillColor;\n maskCtx.fillRect(0, 0, width, height);\n\n maskCtx.restore();\n\n ctx.save();\n ctx.transform.apply(ctx, image.transform);\n ctx.scale(1, -1);\n ctx.drawImage(maskCanvas.canvas, 0, 0, width, height,\n 0, -1, 1, 1);\n ctx.restore();\n }\n },\n\n paintImageXObject: function CanvasGraphics_paintImageXObject(objId) {\n var imgData = this.objs.get(objId);\n if (!imgData) {\n warn('Dependent image isn\\'t ready yet');\n return;\n }\n\n this.paintInlineImageXObject(imgData);\n },\n\n paintImageXObjectRepeat:\n function CanvasGraphics_paintImageXObjectRepeat(objId, scaleX, scaleY,\n positions) {\n var imgData = this.objs.get(objId);\n if (!imgData) {\n warn('Dependent image isn\\'t ready yet');\n return;\n }\n\n var width = imgData.width;\n var height = imgData.height;\n var map = [];\n for (var i = 0, ii = positions.length; i < ii; i += 2) {\n map.push({ transform: [scaleX, 0, 0, scaleY, positions[i],\n positions[i + 1]], x: 0, y: 0, w: width, h: height, });\n }\n this.paintInlineImageXObjectGroup(imgData, map);\n },\n\n paintInlineImageXObject:\n function CanvasGraphics_paintInlineImageXObject(imgData) {\n var width = imgData.width;\n var height = imgData.height;\n var ctx = this.ctx;\n\n this.save();\n // scale the image to the unit square\n ctx.scale(1 / width, -1 / height);\n\n var currentTransform = ctx.mozCurrentTransformInverse;\n var a = currentTransform[0], b = currentTransform[1];\n var widthScale = Math.max(Math.sqrt(a * a + b * b), 1);\n var c = currentTransform[2], d = currentTransform[3];\n var heightScale = Math.max(Math.sqrt(c * c + d * d), 1);\n\n var imgToPaint, tmpCanvas;\n // instanceof HTMLElement does not work in jsdom node.js module\n if (imgData instanceof HTMLElement || !imgData.data) {\n imgToPaint = imgData;\n } else {\n tmpCanvas = this.cachedCanvases.getCanvas('inlineImage',\n width, height);\n var tmpCtx = tmpCanvas.context;\n putBinaryImageData(tmpCtx, imgData);\n imgToPaint = tmpCanvas.canvas;\n }\n\n var paintWidth = width, paintHeight = height;\n var tmpCanvasId = 'prescale1';\n // Vertial or horizontal scaling shall not be more than 2 to not loose the\n // pixels during drawImage operation, painting on the temporary canvas(es)\n // that are twice smaller in size\n while ((widthScale > 2 && paintWidth > 1) ||\n (heightScale > 2 && paintHeight > 1)) {\n var newWidth = paintWidth, newHeight = paintHeight;\n if (widthScale > 2 && paintWidth > 1) {\n newWidth = Math.ceil(paintWidth / 2);\n widthScale /= paintWidth / newWidth;\n }\n if (heightScale > 2 && paintHeight > 1) {\n newHeight = Math.ceil(paintHeight / 2);\n heightScale /= paintHeight / newHeight;\n }\n tmpCanvas = this.cachedCanvases.getCanvas(tmpCanvasId,\n newWidth, newHeight);\n tmpCtx = tmpCanvas.context;\n tmpCtx.clearRect(0, 0, newWidth, newHeight);\n tmpCtx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight,\n 0, 0, newWidth, newHeight);\n imgToPaint = tmpCanvas.canvas;\n paintWidth = newWidth;\n paintHeight = newHeight;\n tmpCanvasId = tmpCanvasId === 'prescale1' ? 'prescale2' : 'prescale1';\n }\n ctx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight,\n 0, -height, width, height);\n\n if (this.imageLayer) {\n var position = this.getCanvasPosition(0, -height);\n this.imageLayer.appendImage({\n imgData,\n left: position[0],\n top: position[1],\n width: width / currentTransform[0],\n height: height / currentTransform[3],\n });\n }\n this.restore();\n },\n\n paintInlineImageXObjectGroup:\n function CanvasGraphics_paintInlineImageXObjectGroup(imgData, map) {\n var ctx = this.ctx;\n var w = imgData.width;\n var h = imgData.height;\n\n var tmpCanvas = this.cachedCanvases.getCanvas('inlineImage', w, h);\n var tmpCtx = tmpCanvas.context;\n putBinaryImageData(tmpCtx, imgData);\n\n for (var i = 0, ii = map.length; i < ii; i++) {\n var entry = map[i];\n ctx.save();\n ctx.transform.apply(ctx, entry.transform);\n ctx.scale(1, -1);\n ctx.drawImage(tmpCanvas.canvas, entry.x, entry.y, entry.w, entry.h,\n 0, -1, 1, 1);\n if (this.imageLayer) {\n var position = this.getCanvasPosition(entry.x, entry.y);\n this.imageLayer.appendImage({\n imgData,\n left: position[0],\n top: position[1],\n width: w,\n height: h,\n });\n }\n ctx.restore();\n }\n },\n\n paintSolidColorImageMask:\n function CanvasGraphics_paintSolidColorImageMask() {\n this.ctx.fillRect(0, 0, 1, 1);\n },\n\n paintXObject: function CanvasGraphics_paintXObject() {\n warn('Unsupported \\'paintXObject\\' command.');\n },\n\n // Marked content\n\n markPoint: function CanvasGraphics_markPoint(tag) {\n // TODO Marked content.\n },\n markPointProps: function CanvasGraphics_markPointProps(tag, properties) {\n // TODO Marked content.\n },\n beginMarkedContent: function CanvasGraphics_beginMarkedContent(tag) {\n // TODO Marked content.\n },\n beginMarkedContentProps: function CanvasGraphics_beginMarkedContentProps(\n tag, properties) {\n // TODO Marked content.\n },\n endMarkedContent: function CanvasGraphics_endMarkedContent() {\n // TODO Marked content.\n },\n\n // Compatibility\n\n beginCompat: function CanvasGraphics_beginCompat() {\n // TODO ignore undefined operators (should we do that anyway?)\n },\n endCompat: function CanvasGraphics_endCompat() {\n // TODO stop ignoring undefined operators\n },\n\n // Helper functions\n\n consumePath: function CanvasGraphics_consumePath() {\n var ctx = this.ctx;\n if (this.pendingClip) {\n if (this.pendingClip === EO_CLIP) {\n ctx.clip('evenodd');\n } else {\n ctx.clip();\n }\n this.pendingClip = null;\n }\n ctx.beginPath();\n },\n getSinglePixelWidth: function CanvasGraphics_getSinglePixelWidth(scale) {\n if (this.cachedGetSinglePixelWidth === null) {\n // NOTE: The `save` and `restore` commands used below is a workaround\n // that is necessary in order to prevent `mozCurrentTransformInverse`\n // from intermittently returning incorrect values in Firefox, see:\n // https://github.com/mozilla/pdf.js/issues/7188.\n this.ctx.save();\n var inverse = this.ctx.mozCurrentTransformInverse;\n this.ctx.restore();\n // max of the current horizontal and vertical scale\n this.cachedGetSinglePixelWidth = Math.sqrt(Math.max(\n (inverse[0] * inverse[0] + inverse[1] * inverse[1]),\n (inverse[2] * inverse[2] + inverse[3] * inverse[3])));\n }\n return this.cachedGetSinglePixelWidth;\n },\n getCanvasPosition: function CanvasGraphics_getCanvasPosition(x, y) {\n var transform = this.ctx.mozCurrentTransform;\n return [\n transform[0] * x + transform[2] * y + transform[4],\n transform[1] * x + transform[3] * y + transform[5]\n ];\n },\n };\n\n for (var op in OPS) {\n CanvasGraphics.prototype[OPS[op]] = CanvasGraphics.prototype[op];\n }\n\n return CanvasGraphics;\n})();\n\nexport {\n CanvasGraphics,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/canvas.js","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormatError, info, Util } from '../shared/util';\nimport { WebGLUtils } from './webgl';\n\nvar ShadingIRs = {};\n\nShadingIRs.RadialAxial = {\n fromIR: function RadialAxial_fromIR(raw) {\n var type = raw[1];\n var colorStops = raw[2];\n var p0 = raw[3];\n var p1 = raw[4];\n var r0 = raw[5];\n var r1 = raw[6];\n return {\n type: 'Pattern',\n getPattern: function RadialAxial_getPattern(ctx) {\n var grad;\n if (type === 'axial') {\n grad = ctx.createLinearGradient(p0[0], p0[1], p1[0], p1[1]);\n } else if (type === 'radial') {\n grad = ctx.createRadialGradient(p0[0], p0[1], r0, p1[0], p1[1], r1);\n }\n\n for (var i = 0, ii = colorStops.length; i < ii; ++i) {\n var c = colorStops[i];\n grad.addColorStop(c[0], c[1]);\n }\n return grad;\n },\n };\n },\n};\n\nvar createMeshCanvas = (function createMeshCanvasClosure() {\n function drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {\n // Very basic Gouraud-shaded triangle rasterization algorithm.\n var coords = context.coords, colors = context.colors;\n var bytes = data.data, rowSize = data.width * 4;\n var tmp;\n if (coords[p1 + 1] > coords[p2 + 1]) {\n tmp = p1; p1 = p2; p2 = tmp; tmp = c1; c1 = c2; c2 = tmp;\n }\n if (coords[p2 + 1] > coords[p3 + 1]) {\n tmp = p2; p2 = p3; p3 = tmp; tmp = c2; c2 = c3; c3 = tmp;\n }\n if (coords[p1 + 1] > coords[p2 + 1]) {\n tmp = p1; p1 = p2; p2 = tmp; tmp = c1; c1 = c2; c2 = tmp;\n }\n var x1 = (coords[p1] + context.offsetX) * context.scaleX;\n var y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY;\n var x2 = (coords[p2] + context.offsetX) * context.scaleX;\n var y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY;\n var x3 = (coords[p3] + context.offsetX) * context.scaleX;\n var y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY;\n if (y1 >= y3) {\n return;\n }\n var c1r = colors[c1], c1g = colors[c1 + 1], c1b = colors[c1 + 2];\n var c2r = colors[c2], c2g = colors[c2 + 1], c2b = colors[c2 + 2];\n var c3r = colors[c3], c3g = colors[c3 + 1], c3b = colors[c3 + 2];\n\n var minY = Math.round(y1), maxY = Math.round(y3);\n var xa, car, cag, cab;\n var xb, cbr, cbg, cbb;\n var k;\n for (var y = minY; y <= maxY; y++) {\n if (y < y2) {\n k = y < y1 ? 0 : y1 === y2 ? 1 : (y1 - y) / (y1 - y2);\n xa = x1 - (x1 - x2) * k;\n car = c1r - (c1r - c2r) * k;\n cag = c1g - (c1g - c2g) * k;\n cab = c1b - (c1b - c2b) * k;\n } else {\n k = y > y3 ? 1 : y2 === y3 ? 0 : (y2 - y) / (y2 - y3);\n xa = x2 - (x2 - x3) * k;\n car = c2r - (c2r - c3r) * k;\n cag = c2g - (c2g - c3g) * k;\n cab = c2b - (c2b - c3b) * k;\n }\n k = y < y1 ? 0 : y > y3 ? 1 : (y1 - y) / (y1 - y3);\n xb = x1 - (x1 - x3) * k;\n cbr = c1r - (c1r - c3r) * k;\n cbg = c1g - (c1g - c3g) * k;\n cbb = c1b - (c1b - c3b) * k;\n var x1_ = Math.round(Math.min(xa, xb));\n var x2_ = Math.round(Math.max(xa, xb));\n var j = rowSize * y + x1_ * 4;\n for (var x = x1_; x <= x2_; x++) {\n k = (xa - x) / (xa - xb);\n k = k < 0 ? 0 : k > 1 ? 1 : k;\n bytes[j++] = (car - (car - cbr) * k) | 0;\n bytes[j++] = (cag - (cag - cbg) * k) | 0;\n bytes[j++] = (cab - (cab - cbb) * k) | 0;\n bytes[j++] = 255;\n }\n }\n }\n\n function drawFigure(data, figure, context) {\n var ps = figure.coords;\n var cs = figure.colors;\n var i, ii;\n switch (figure.type) {\n case 'lattice':\n var verticesPerRow = figure.verticesPerRow;\n var rows = Math.floor(ps.length / verticesPerRow) - 1;\n var cols = verticesPerRow - 1;\n for (i = 0; i < rows; i++) {\n var q = i * verticesPerRow;\n for (var j = 0; j < cols; j++, q++) {\n drawTriangle(data, context,\n ps[q], ps[q + 1], ps[q + verticesPerRow],\n cs[q], cs[q + 1], cs[q + verticesPerRow]);\n drawTriangle(data, context,\n ps[q + verticesPerRow + 1], ps[q + 1], ps[q + verticesPerRow],\n cs[q + verticesPerRow + 1], cs[q + 1], cs[q + verticesPerRow]);\n }\n }\n break;\n case 'triangles':\n for (i = 0, ii = ps.length; i < ii; i += 3) {\n drawTriangle(data, context,\n ps[i], ps[i + 1], ps[i + 2],\n cs[i], cs[i + 1], cs[i + 2]);\n }\n break;\n default:\n throw new Error('illegal figure');\n }\n }\n\n function createMeshCanvas(bounds, combinesScale, coords, colors, figures,\n backgroundColor, cachedCanvases) {\n // we will increase scale on some weird factor to let antialiasing take\n // care of \"rough\" edges\n var EXPECTED_SCALE = 1.1;\n // MAX_PATTERN_SIZE is used to avoid OOM situation.\n var MAX_PATTERN_SIZE = 3000; // 10in @ 300dpi shall be enough\n // We need to keep transparent border around our pattern for fill():\n // createPattern with 'no-repeat' will bleed edges across entire area.\n var BORDER_SIZE = 2;\n\n var offsetX = Math.floor(bounds[0]);\n var offsetY = Math.floor(bounds[1]);\n var boundsWidth = Math.ceil(bounds[2]) - offsetX;\n var boundsHeight = Math.ceil(bounds[3]) - offsetY;\n\n var width = Math.min(Math.ceil(Math.abs(boundsWidth * combinesScale[0] *\n EXPECTED_SCALE)), MAX_PATTERN_SIZE);\n var height = Math.min(Math.ceil(Math.abs(boundsHeight * combinesScale[1] *\n EXPECTED_SCALE)), MAX_PATTERN_SIZE);\n var scaleX = boundsWidth / width;\n var scaleY = boundsHeight / height;\n\n var context = {\n coords,\n colors,\n offsetX: -offsetX,\n offsetY: -offsetY,\n scaleX: 1 / scaleX,\n scaleY: 1 / scaleY,\n };\n\n var paddedWidth = width + BORDER_SIZE * 2;\n var paddedHeight = height + BORDER_SIZE * 2;\n\n var canvas, tmpCanvas, i, ii;\n if (WebGLUtils.isEnabled) {\n canvas = WebGLUtils.drawFigures(width, height, backgroundColor,\n figures, context);\n\n // https://bugzilla.mozilla.org/show_bug.cgi?id=972126\n tmpCanvas = cachedCanvases.getCanvas('mesh', paddedWidth, paddedHeight,\n false);\n tmpCanvas.context.drawImage(canvas, BORDER_SIZE, BORDER_SIZE);\n canvas = tmpCanvas.canvas;\n } else {\n tmpCanvas = cachedCanvases.getCanvas('mesh', paddedWidth, paddedHeight,\n false);\n var tmpCtx = tmpCanvas.context;\n\n var data = tmpCtx.createImageData(width, height);\n if (backgroundColor) {\n var bytes = data.data;\n for (i = 0, ii = bytes.length; i < ii; i += 4) {\n bytes[i] = backgroundColor[0];\n bytes[i + 1] = backgroundColor[1];\n bytes[i + 2] = backgroundColor[2];\n bytes[i + 3] = 255;\n }\n }\n for (i = 0; i < figures.length; i++) {\n drawFigure(data, figures[i], context);\n }\n tmpCtx.putImageData(data, BORDER_SIZE, BORDER_SIZE);\n canvas = tmpCanvas.canvas;\n }\n\n return {\n canvas,\n offsetX: offsetX - BORDER_SIZE * scaleX,\n offsetY: offsetY - BORDER_SIZE * scaleY,\n scaleX,\n scaleY,\n };\n }\n return createMeshCanvas;\n})();\n\nShadingIRs.Mesh = {\n fromIR: function Mesh_fromIR(raw) {\n // var type = raw[1];\n var coords = raw[2];\n var colors = raw[3];\n var figures = raw[4];\n var bounds = raw[5];\n var matrix = raw[6];\n // var bbox = raw[7];\n var background = raw[8];\n return {\n type: 'Pattern',\n getPattern: function Mesh_getPattern(ctx, owner, shadingFill) {\n var scale;\n if (shadingFill) {\n scale = Util.singularValueDecompose2dScale(ctx.mozCurrentTransform);\n } else {\n // Obtain scale from matrix and current transformation matrix.\n scale = Util.singularValueDecompose2dScale(owner.baseTransform);\n if (matrix) {\n var matrixScale = Util.singularValueDecompose2dScale(matrix);\n scale = [scale[0] * matrixScale[0],\n scale[1] * matrixScale[1]];\n }\n }\n\n\n // Rasterizing on the main thread since sending/queue large canvases\n // might cause OOM.\n var temporaryPatternCanvas = createMeshCanvas(bounds, scale, coords,\n colors, figures, shadingFill ? null : background,\n owner.cachedCanvases);\n\n if (!shadingFill) {\n ctx.setTransform.apply(ctx, owner.baseTransform);\n if (matrix) {\n ctx.transform.apply(ctx, matrix);\n }\n }\n\n ctx.translate(temporaryPatternCanvas.offsetX,\n temporaryPatternCanvas.offsetY);\n ctx.scale(temporaryPatternCanvas.scaleX,\n temporaryPatternCanvas.scaleY);\n\n return ctx.createPattern(temporaryPatternCanvas.canvas, 'no-repeat');\n },\n };\n },\n};\n\nShadingIRs.Dummy = {\n fromIR: function Dummy_fromIR() {\n return {\n type: 'Pattern',\n getPattern: function Dummy_fromIR_getPattern() {\n return 'hotpink';\n },\n };\n },\n};\n\nfunction getShadingPatternFromIR(raw) {\n var shadingIR = ShadingIRs[raw[0]];\n if (!shadingIR) {\n throw new Error(`Unknown IR type: ${raw[0]}`);\n }\n return shadingIR.fromIR(raw);\n}\n\nvar TilingPattern = (function TilingPatternClosure() {\n var PaintType = {\n COLORED: 1,\n UNCOLORED: 2,\n };\n\n var MAX_PATTERN_SIZE = 3000; // 10in @ 300dpi shall be enough\n\n function TilingPattern(IR, color, ctx, canvasGraphicsFactory, baseTransform) {\n this.operatorList = IR[2];\n this.matrix = IR[3] || [1, 0, 0, 1, 0, 0];\n this.bbox = IR[4];\n this.xstep = IR[5];\n this.ystep = IR[6];\n this.paintType = IR[7];\n this.tilingType = IR[8];\n this.color = color;\n this.canvasGraphicsFactory = canvasGraphicsFactory;\n this.baseTransform = baseTransform;\n this.type = 'Pattern';\n this.ctx = ctx;\n }\n\n TilingPattern.prototype = {\n createPatternCanvas: function TilinPattern_createPatternCanvas(owner) {\n var operatorList = this.operatorList;\n var bbox = this.bbox;\n var xstep = this.xstep;\n var ystep = this.ystep;\n var paintType = this.paintType;\n var tilingType = this.tilingType;\n var color = this.color;\n var canvasGraphicsFactory = this.canvasGraphicsFactory;\n\n info('TilingType: ' + tilingType);\n\n var x0 = bbox[0], y0 = bbox[1], x1 = bbox[2], y1 = bbox[3];\n\n var topLeft = [x0, y0];\n // we want the canvas to be as large as the step size\n var botRight = [x0 + xstep, y0 + ystep];\n\n var width = botRight[0] - topLeft[0];\n var height = botRight[1] - topLeft[1];\n\n // Obtain scale from matrix and current transformation matrix.\n var matrixScale = Util.singularValueDecompose2dScale(this.matrix);\n var curMatrixScale = Util.singularValueDecompose2dScale(\n this.baseTransform);\n var combinedScale = [matrixScale[0] * curMatrixScale[0],\n matrixScale[1] * curMatrixScale[1]];\n\n // MAX_PATTERN_SIZE is used to avoid OOM situation.\n // Use width and height values that are as close as possible to the end\n // result when the pattern is used. Too low value makes the pattern look\n // blurry. Too large value makes it look too crispy.\n width = Math.min(Math.ceil(Math.abs(width * combinedScale[0])),\n MAX_PATTERN_SIZE);\n\n height = Math.min(Math.ceil(Math.abs(height * combinedScale[1])),\n MAX_PATTERN_SIZE);\n\n var tmpCanvas = owner.cachedCanvases.getCanvas('pattern',\n width, height, true);\n var tmpCtx = tmpCanvas.context;\n var graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx);\n graphics.groupLevel = owner.groupLevel;\n\n this.setFillAndStrokeStyleToContext(graphics, paintType, color);\n\n this.setScale(width, height, xstep, ystep);\n this.transformToScale(graphics);\n\n // transform coordinates to pattern space\n var tmpTranslate = [1, 0, 0, 1, -topLeft[0], -topLeft[1]];\n graphics.transform.apply(graphics, tmpTranslate);\n\n this.clipBbox(graphics, bbox, x0, y0, x1, y1);\n\n graphics.executeOperatorList(operatorList);\n return tmpCanvas.canvas;\n },\n\n setScale: function TilingPattern_setScale(width, height, xstep, ystep) {\n this.scale = [width / xstep, height / ystep];\n },\n\n transformToScale: function TilingPattern_transformToScale(graphics) {\n var scale = this.scale;\n var tmpScale = [scale[0], 0, 0, scale[1], 0, 0];\n graphics.transform.apply(graphics, tmpScale);\n },\n\n scaleToContext: function TilingPattern_scaleToContext() {\n var scale = this.scale;\n this.ctx.scale(1 / scale[0], 1 / scale[1]);\n },\n\n clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) {\n if (Array.isArray(bbox) && bbox.length === 4) {\n var bboxWidth = x1 - x0;\n var bboxHeight = y1 - y0;\n graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);\n graphics.clip();\n graphics.endPath();\n }\n },\n\n setFillAndStrokeStyleToContext:\n function setFillAndStrokeStyleToContext(graphics, paintType, color) {\n let context = graphics.ctx, current = graphics.current;\n switch (paintType) {\n case PaintType.COLORED:\n var ctx = this.ctx;\n context.fillStyle = ctx.fillStyle;\n context.strokeStyle = ctx.strokeStyle;\n current.fillColor = ctx.fillStyle;\n current.strokeColor = ctx.strokeStyle;\n break;\n case PaintType.UNCOLORED:\n var cssColor = Util.makeCssRgb(color[0], color[1], color[2]);\n context.fillStyle = cssColor;\n context.strokeStyle = cssColor;\n // Set color needed by image masks (fixes issues 3226 and 8741).\n current.fillColor = cssColor;\n current.strokeColor = cssColor;\n break;\n default:\n throw new FormatError(`Unsupported paint type: ${paintType}`);\n }\n },\n\n getPattern: function TilingPattern_getPattern(ctx, owner) {\n var temporaryPatternCanvas = this.createPatternCanvas(owner);\n\n ctx = this.ctx;\n ctx.setTransform.apply(ctx, this.baseTransform);\n ctx.transform.apply(ctx, this.matrix);\n this.scaleToContext();\n\n return ctx.createPattern(temporaryPatternCanvas, 'repeat');\n },\n };\n\n return TilingPattern;\n})();\n\nexport {\n getShadingPatternFromIR,\n TilingPattern,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/pattern_helper.js","/* Copyright 2018 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// The code for XMLParserBase copied from\n// https://github.com/mozilla/shumway/blob/16451d8836fa85f4b16eeda8b4bda2fa9e2b22b0/src/avm2/natives/xml.ts\n\nconst XMLParserErrorCode = {\n NoError: 0,\n EndOfDocument: -1,\n UnterminatedCdat: -2,\n UnterminatedXmlDeclaration: -3,\n UnterminatedDoctypeDeclaration: -4,\n UnterminatedComment: -5,\n MalformedElement: -6,\n OutOfMemory: -7,\n UnterminatedAttributeValue: -8,\n UnterminatedElement: -9,\n ElementNeverBegun: -10,\n};\n\nfunction isWhitespace(s, index) {\n const ch = s[index];\n return ch === ' ' || ch === '\\n' || ch === '\\r' || ch === '\\t';\n}\n\nfunction isWhitespaceString(s) {\n for (let i = 0, ii = s.length; i < ii; i++) {\n if (!isWhitespace(s, i)) {\n return false;\n }\n }\n return true;\n}\n\nclass XMLParserBase {\n _resolveEntities(s) {\n return s.replace(/&([^;]+);/g, function (all, entity) {\n if (entity.substring(0, 2) === '#x') {\n return String.fromCharCode(parseInt(entity.substring(2), 16));\n } else if (entity.substring(0, 1) === '#') {\n return String.fromCharCode(parseInt(entity.substring(1), 10));\n }\n switch (entity) {\n case 'lt':\n return '<';\n case 'gt':\n return '>';\n case 'amp':\n return '&';\n case 'quot':\n return '\\\"';\n }\n return this.onResolveEntity(entity);\n });\n }\n\n _parseContent(s, start) {\n let pos = start, name, attributes = [];\n\n function skipWs() {\n while (pos < s.length && isWhitespace(s, pos)) {\n ++pos;\n }\n }\n\n while (pos < s.length && !isWhitespace(s, pos) &&\n s[pos] !== '>' && s[pos] !== '/') {\n ++pos;\n }\n name = s.substring(start, pos);\n skipWs();\n while (pos < s.length && s[pos] !== '>' &&\n s[pos] !== '/' && s[pos] !== '?') {\n skipWs();\n let attrName = '', attrValue = '';\n while (pos < s.length && !isWhitespace(s, pos) && s[pos] !== '=') {\n attrName += s[pos];\n ++pos;\n }\n skipWs();\n if (s[pos] !== '=') {\n return null;\n }\n ++pos;\n skipWs();\n const attrEndChar = s[pos];\n if (attrEndChar !== '\\\"' && attrEndChar !== '\\'') {\n return null;\n }\n const attrEndIndex = s.indexOf(attrEndChar, ++pos);\n if (attrEndIndex < 0) {\n return null;\n }\n attrValue = s.substring(pos, attrEndIndex);\n attributes.push({\n name: attrName,\n value: this._resolveEntities(attrValue),\n });\n pos = attrEndIndex + 1;\n skipWs();\n }\n return {\n name,\n attributes,\n parsed: pos - start,\n };\n }\n\n _parseProcessingInstruction(s, start) {\n let pos = start, name, value;\n\n function skipWs() {\n while (pos < s.length && isWhitespace(s, pos)) {\n ++pos;\n }\n }\n\n while (pos < s.length && !isWhitespace(s, pos) &&\n s[pos] !== '>' && s[pos] !== '/') {\n ++pos;\n }\n name = s.substring(start, pos);\n skipWs();\n const attrStart = pos;\n while (pos < s.length && (s[pos] !== '?' || s[pos + 1] !== '>')) {\n ++pos;\n }\n value = s.substring(attrStart, pos);\n return {\n name,\n value,\n parsed: pos - start,\n };\n }\n\n parseXml(s) {\n let i = 0;\n while (i < s.length) {\n const ch = s[i];\n let j = i;\n if (ch === '<') {\n ++j;\n const ch2 = s[j];\n let q;\n switch (ch2) {\n case '/':\n ++j;\n q = s.indexOf('>', j);\n if (q < 0) {\n this.onError(XMLParserErrorCode.UnterminatedElement);\n return;\n }\n this.onEndElement(s.substring(j, q));\n j = q + 1;\n break;\n case '?':\n ++j;\n const pi = this._parseProcessingInstruction(s, j);\n if (s.substring(j + pi.parsed, j + pi.parsed + 2) !== '?>') {\n this.onError(XMLParserErrorCode.UnterminatedXmlDeclaration);\n return;\n }\n this.onPi(pi.name, pi.value);\n j += pi.parsed + 2;\n break;\n case '!':\n if (s.substring(j + 1, j + 3) === '--') {\n q = s.indexOf('-->', j + 3);\n if (q < 0) {\n this.onError(XMLParserErrorCode.UnterminatedComment);\n return;\n }\n this.onComment(s.substring(j + 3, q));\n j = q + 3;\n } else if (s.substring(j + 1, j + 8) === '[CDATA[') {\n q = s.indexOf(']]>', j + 8);\n if (q < 0) {\n this.onError(XMLParserErrorCode.UnterminatedCdat);\n return;\n }\n this.onCdata(s.substring(j + 8, q));\n j = q + 3;\n } else if (s.substring(j + 1, j + 8) === 'DOCTYPE') {\n const q2 = s.indexOf('[', j + 8);\n let complexDoctype = false;\n q = s.indexOf('>', j + 8);\n if (q < 0) {\n this.onError(XMLParserErrorCode.UnterminatedDoctypeDeclaration);\n return;\n }\n if (q2 > 0 && q > q2) {\n q = s.indexOf(']>', j + 8);\n if (q < 0) {\n this.onError(\n XMLParserErrorCode.UnterminatedDoctypeDeclaration);\n return;\n }\n complexDoctype = true;\n }\n const doctypeContent =\n s.substring(j + 8, q + (complexDoctype ? 1 : 0));\n this.onDoctype(doctypeContent);\n j = q + (complexDoctype ? 2 : 1);\n } else {\n this.onError(XMLParserErrorCode.MalformedElement);\n return;\n }\n break;\n default:\n const content = this._parseContent(s, j);\n if (content === null) {\n this.onError(XMLParserErrorCode.MalformedElement);\n return;\n }\n let isClosed = false;\n if (s.substring(j + content.parsed,\n j + content.parsed + 2) === '/>') {\n isClosed = true;\n } else if (s.substring(j + content.parsed,\n j + content.parsed + 1) !== '>') {\n this.onError(XMLParserErrorCode.UnterminatedElement);\n return;\n }\n this.onBeginElement(content.name, content.attributes, isClosed);\n j += content.parsed + (isClosed ? 2 : 1);\n break;\n }\n } else {\n while (j < s.length && s[j] !== '<') {\n j++;\n }\n const text = s.substring(i, j);\n this.onText(this._resolveEntities(text));\n }\n i = j;\n }\n }\n\n onResolveEntity(name) {\n return `&${name};`;\n }\n\n onPi(name, value) { }\n\n onComment(text) { }\n\n onCdata(text) { }\n\n onDoctype(doctypeContent) { }\n\n onText(text) { }\n\n onBeginElement(name, attributes, isEmpty) { }\n\n onEndElement(name) { }\n\n onError(code) { }\n}\n\nclass SimpleDOMNode {\n constructor(nodeName, nodeValue) {\n this.nodeName = nodeName;\n this.nodeValue = nodeValue;\n\n Object.defineProperty(this, 'parentNode', { value: null, writable: true, });\n }\n\n get firstChild() {\n return this.childNodes[0];\n }\n\n get nextSibling() {\n let index = this.parentNode.childNodes.indexOf(this);\n return this.parentNode.childNodes[index + 1];\n }\n\n get textContent() {\n if (!this.childNodes) {\n return this.nodeValue || '';\n }\n return this.childNodes.map(function(child) {\n return child.textContent;\n }).join('');\n }\n\n hasChildNodes() {\n return this.childNodes && this.childNodes.length > 0;\n }\n}\n\nclass SimpleXMLParser extends XMLParserBase {\n constructor() {\n super();\n this._currentFragment = null;\n this._stack = null;\n this._errorCode = XMLParserErrorCode.NoError;\n }\n\n parseFromString(data) {\n this._currentFragment = [];\n this._stack = [];\n this._errorCode = XMLParserErrorCode.NoError;\n\n this.parseXml(data);\n\n if (this._errorCode !== XMLParserErrorCode.NoError) {\n return undefined; // return undefined on error\n }\n\n // We should only have one root.\n const [documentElement] = this._currentFragment;\n return { documentElement, };\n }\n\n onResolveEntity(name) {\n switch (name) {\n case 'apos':\n return '\\'';\n }\n return super.onResolveEntity(name);\n }\n\n onText(text) {\n if (isWhitespaceString(text)) {\n return;\n }\n const node = new SimpleDOMNode('#text', text);\n this._currentFragment.push(node);\n }\n\n onCdata(text) {\n const node = new SimpleDOMNode('#text', text);\n this._currentFragment.push(node);\n }\n\n onBeginElement(name, attributes, isEmpty) {\n const node = new SimpleDOMNode(name);\n node.childNodes = [];\n this._currentFragment.push(node);\n if (isEmpty) {\n return;\n }\n this._stack.push(this._currentFragment);\n this._currentFragment = node.childNodes;\n }\n\n onEndElement(name) {\n this._currentFragment = this._stack.pop();\n const lastElement = this._currentFragment[this._currentFragment.length - 1];\n for (let i = 0, ii = lastElement.childNodes.length; i < ii; i++) {\n lastElement.childNodes[i].parentNode = lastElement;\n }\n }\n\n onError(code) {\n this._errorCode = code;\n }\n}\n\nexport {\n SimpleXMLParser,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/xml_parser.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { assert, createPromiseCapability } from '../shared/util';\n\n /** @implements {IPDFStream} */\nvar PDFDataTransportStream = (function PDFDataTransportStreamClosure() {\n function PDFDataTransportStream(params, pdfDataRangeTransport) {\n assert(pdfDataRangeTransport);\n\n this._queuedChunks = [];\n var initialData = params.initialData;\n if (initialData && initialData.length > 0) {\n let buffer = new Uint8Array(initialData).buffer;\n this._queuedChunks.push(buffer);\n }\n\n this._pdfDataRangeTransport = pdfDataRangeTransport;\n this._isRangeSupported = !(params.disableRange);\n this._isStreamingSupported = !(params.disableStream);\n this._contentLength = params.length;\n\n this._fullRequestReader = null;\n this._rangeReaders = [];\n\n this._pdfDataRangeTransport.addRangeListener((begin, chunk) => {\n this._onReceiveData({ begin, chunk, });\n });\n\n this._pdfDataRangeTransport.addProgressListener((loaded) => {\n this._onProgress({ loaded, });\n });\n\n this._pdfDataRangeTransport.addProgressiveReadListener((chunk) => {\n this._onReceiveData({ chunk, });\n });\n\n this._pdfDataRangeTransport.transportReady();\n }\n PDFDataTransportStream.prototype = {\n _onReceiveData: function PDFDataTransportStream_onReceiveData(args) {\n let buffer = new Uint8Array(args.chunk).buffer;\n if (args.begin === undefined) {\n if (this._fullRequestReader) {\n this._fullRequestReader._enqueue(buffer);\n } else {\n this._queuedChunks.push(buffer);\n }\n } else {\n var found = this._rangeReaders.some(function (rangeReader) {\n if (rangeReader._begin !== args.begin) {\n return false;\n }\n rangeReader._enqueue(buffer);\n return true;\n });\n assert(found);\n }\n },\n\n _onProgress: function PDFDataTransportStream_onDataProgress(evt) {\n if (this._rangeReaders.length > 0) {\n // Reporting to first range reader.\n var firstReader = this._rangeReaders[0];\n if (firstReader.onProgress) {\n firstReader.onProgress({ loaded: evt.loaded, });\n }\n }\n },\n\n _removeRangeReader:\n function PDFDataTransportStream_removeRangeReader(reader) {\n var i = this._rangeReaders.indexOf(reader);\n if (i >= 0) {\n this._rangeReaders.splice(i, 1);\n }\n },\n\n getFullReader: function PDFDataTransportStream_getFullReader() {\n assert(!this._fullRequestReader);\n var queuedChunks = this._queuedChunks;\n this._queuedChunks = null;\n return new PDFDataTransportStreamReader(this, queuedChunks);\n },\n\n getRangeReader: function PDFDataTransportStream_getRangeReader(begin, end) {\n var reader = new PDFDataTransportStreamRangeReader(this, begin, end);\n this._pdfDataRangeTransport.requestDataRange(begin, end);\n this._rangeReaders.push(reader);\n return reader;\n },\n\n cancelAllRequests:\n function PDFDataTransportStream_cancelAllRequests(reason) {\n if (this._fullRequestReader) {\n this._fullRequestReader.cancel(reason);\n }\n var readers = this._rangeReaders.slice(0);\n readers.forEach(function (rangeReader) {\n rangeReader.cancel(reason);\n });\n this._pdfDataRangeTransport.abort();\n },\n };\n\n /** @implements {IPDFStreamReader} */\n function PDFDataTransportStreamReader(stream, queuedChunks) {\n this._stream = stream;\n this._done = false;\n this._queuedChunks = queuedChunks || [];\n this._requests = [];\n this._headersReady = Promise.resolve();\n stream._fullRequestReader = this;\n\n this.onProgress = null; // not used\n }\n PDFDataTransportStreamReader.prototype = {\n _enqueue: function PDFDataTransportStreamReader_enqueue(chunk) {\n if (this._done) {\n return; // ignore new data\n }\n if (this._requests.length > 0) {\n var requestCapability = this._requests.shift();\n requestCapability.resolve({ value: chunk, done: false, });\n return;\n }\n this._queuedChunks.push(chunk);\n },\n\n get headersReady() {\n return this._headersReady;\n },\n\n get isRangeSupported() {\n return this._stream._isRangeSupported;\n },\n\n get isStreamingSupported() {\n return this._stream._isStreamingSupported;\n },\n\n get contentLength() {\n return this._stream._contentLength;\n },\n\n read: function PDFDataTransportStreamReader_read() {\n if (this._queuedChunks.length > 0) {\n var chunk = this._queuedChunks.shift();\n return Promise.resolve({ value: chunk, done: false, });\n }\n if (this._done) {\n return Promise.resolve({ value: undefined, done: true, });\n }\n var requestCapability = createPromiseCapability();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n },\n\n cancel: function PDFDataTransportStreamReader_cancel(reason) {\n this._done = true;\n this._requests.forEach(function (requestCapability) {\n requestCapability.resolve({ value: undefined, done: true, });\n });\n this._requests = [];\n },\n };\n\n /** @implements {IPDFStreamRangeReader} */\n function PDFDataTransportStreamRangeReader(stream, begin, end) {\n this._stream = stream;\n this._begin = begin;\n this._end = end;\n this._queuedChunk = null;\n this._requests = [];\n this._done = false;\n\n this.onProgress = null;\n }\n PDFDataTransportStreamRangeReader.prototype = {\n _enqueue: function PDFDataTransportStreamRangeReader_enqueue(chunk) {\n if (this._done) {\n return; // ignore new data\n }\n if (this._requests.length === 0) {\n this._queuedChunk = chunk;\n } else {\n var requestsCapability = this._requests.shift();\n requestsCapability.resolve({ value: chunk, done: false, });\n this._requests.forEach(function (requestCapability) {\n requestCapability.resolve({ value: undefined, done: true, });\n });\n this._requests = [];\n }\n this._done = true;\n this._stream._removeRangeReader(this);\n },\n\n get isStreamingSupported() {\n return false;\n },\n\n read: function PDFDataTransportStreamRangeReader_read() {\n if (this._queuedChunk) {\n let chunk = this._queuedChunk;\n this._queuedChunk = null;\n return Promise.resolve({ value: chunk, done: false, });\n }\n if (this._done) {\n return Promise.resolve({ value: undefined, done: true, });\n }\n var requestCapability = createPromiseCapability();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n },\n\n cancel: function PDFDataTransportStreamRangeReader_cancel(reason) {\n this._done = true;\n this._requests.forEach(function (requestCapability) {\n requestCapability.resolve({ value: undefined, done: true, });\n });\n this._requests = [];\n this._stream._removeRangeReader(this);\n },\n };\n\n return PDFDataTransportStream;\n})();\n\nexport {\n PDFDataTransportStream,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/transport_stream.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals __non_webpack_require__ */\n\nlet fs = __non_webpack_require__('fs');\nlet http = __non_webpack_require__('http');\nlet https = __non_webpack_require__('https');\nlet url = __non_webpack_require__('url');\n\nimport {\n AbortException, assert, createPromiseCapability\n} from '../shared/util';\nimport { validateRangeRequestCapabilities } from './network_utils';\n\nclass PDFNodeStream {\n constructor(options) {\n this.options = options;\n this.source = options.source;\n this.url = url.parse(this.source.url);\n this.isHttp = this.url.protocol === 'http:' ||\n this.url.protocol === 'https:';\n // Check if url refers to filesystem.\n this.isFsUrl = this.url.protocol === 'file:' || !this.url.host;\n this.httpHeaders = (this.isHttp && this.source.httpHeaders) || {};\n\n this._fullRequest = null;\n this._rangeRequestReaders = [];\n }\n\n getFullReader() {\n assert(!this._fullRequest);\n this._fullRequest = this.isFsUrl ?\n new PDFNodeStreamFsFullReader(this) :\n new PDFNodeStreamFullReader(this);\n return this._fullRequest;\n }\n\n getRangeReader(start, end) {\n let rangeReader = this.isFsUrl ?\n new PDFNodeStreamFsRangeReader(this, start, end) :\n new PDFNodeStreamRangeReader(this, start, end);\n this._rangeRequestReaders.push(rangeReader);\n return rangeReader;\n }\n\n cancelAllRequests(reason) {\n if (this._fullRequest) {\n this._fullRequest.cancel(reason);\n }\n\n let readers = this._rangeRequestReaders.slice(0);\n readers.forEach(function(reader) {\n reader.cancel(reason);\n });\n }\n}\n\nclass BaseFullReader {\n constructor(stream) {\n this._url = stream.url;\n this._done = false;\n this._errored = false;\n this._reason = null;\n this.onProgress = null;\n this._contentLength = stream.source.length; // optional\n this._loaded = 0;\n\n this._disableRange = stream.options.disableRange || false;\n this._rangeChunkSize = stream.source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n\n this._isStreamingSupported = !stream.source.disableStream;\n this._isRangeSupported = !stream.options.disableRange;\n\n this._readableStream = null;\n this._readCapability = createPromiseCapability();\n this._headersCapability = createPromiseCapability();\n }\n\n get headersReady() {\n return this._headersCapability.promise;\n }\n\n get contentLength() {\n return this._contentLength;\n }\n\n get isRangeSupported() {\n return this._isRangeSupported;\n }\n\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n\n read() {\n return this._readCapability.promise.then(() => {\n if (this._done) {\n return Promise.resolve({ value: undefined, done: true, });\n }\n if (this._errored) {\n return Promise.reject(this._reason);\n }\n\n let chunk = this._readableStream.read();\n if (chunk === null) {\n this._readCapability = createPromiseCapability();\n return this.read();\n }\n this._loaded += chunk.length;\n if (this.onProgress) {\n this.onProgress({\n loaded: this._loaded,\n total: this._contentLength,\n });\n }\n // Ensure that `read()` method returns ArrayBuffer.\n let buffer = new Uint8Array(chunk).buffer;\n return Promise.resolve({ value: buffer, done: false, });\n });\n }\n\n cancel(reason) {\n // Call `this._error()` method when cancel is called\n // before _readableStream is set.\n if (!this._readableStream) {\n this._error(reason);\n return;\n }\n this._readableStream.destroy(reason);\n }\n\n _error(reason) {\n this._errored = true;\n this._reason = reason;\n this._readCapability.resolve();\n }\n\n _setReadableStream(readableStream) {\n this._readableStream = readableStream;\n readableStream.on('readable', () => {\n this._readCapability.resolve();\n });\n\n readableStream.on('end', () => {\n // Destroy readable to minimize resource usage.\n readableStream.destroy();\n this._done = true;\n this._readCapability.resolve();\n });\n\n readableStream.on('error', (reason) => {\n this._error(reason);\n });\n\n // We need to stop reading when range is supported and streaming is\n // disabled.\n if (!this._isStreamingSupported && this._isRangeSupported) {\n this._error(new AbortException('streaming is disabled'));\n }\n\n // Destroy ReadableStream if already in errored state.\n if (this._errored) {\n this._readableStream.destroy(this._reason);\n }\n }\n}\n\nclass BaseRangeReader {\n constructor(stream) {\n this._url = stream.url;\n this._done = false;\n this._errored = false;\n this._reason = null;\n this.onProgress = null;\n this._loaded = 0;\n this._readableStream = null;\n this._readCapability = createPromiseCapability();\n\n this._isStreamingSupported = !stream.source.disableStream;\n }\n\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n\n read() {\n return this._readCapability.promise.then(() => {\n if (this._done) {\n return Promise.resolve({ value: undefined, done: true, });\n }\n if (this._errored) {\n return Promise.reject(this._reason);\n }\n\n let chunk = this._readableStream.read();\n if (chunk === null) {\n this._readCapability = createPromiseCapability();\n return this.read();\n }\n this._loaded += chunk.length;\n if (this.onProgress) {\n this.onProgress({ loaded: this._loaded, });\n }\n // Ensure that `read()` method returns ArrayBuffer.\n let buffer = new Uint8Array(chunk).buffer;\n return Promise.resolve({ value: buffer, done: false, });\n });\n }\n\n cancel(reason) {\n // Call `this._error()` method when cancel is called\n // before _readableStream is set.\n if (!this._readableStream) {\n this._error(reason);\n return;\n }\n this._readableStream.destroy(reason);\n }\n\n _error(reason) {\n this._errored = true;\n this._reason = reason;\n this._readCapability.resolve();\n }\n\n _setReadableStream(readableStream) {\n this._readableStream = readableStream;\n readableStream.on('readable', () => {\n this._readCapability.resolve();\n });\n\n readableStream.on('end', () => {\n // Destroy readableStream to minimize resource usage.\n readableStream.destroy();\n this._done = true;\n this._readCapability.resolve();\n });\n\n readableStream.on('error', (reason) => {\n this._error(reason);\n });\n\n // Destroy readableStream if already in errored state.\n if (this._errored) {\n this._readableStream.destroy(this._reason);\n }\n }\n}\n\nfunction createRequestOptions(url, headers) {\n return {\n protocol: url.protocol,\n auth: url.auth,\n host: url.hostname,\n port: url.port,\n path: url.path,\n method: 'GET',\n headers,\n };\n}\n\nclass PDFNodeStreamFullReader extends BaseFullReader {\n constructor(stream) {\n super(stream);\n\n let handleResponse = (response) => {\n this._headersCapability.resolve();\n this._setReadableStream(response);\n\n let { allowRangeRequests, suggestedLength, } =\n validateRangeRequestCapabilities({\n getResponseHeader: (name) => {\n // Make sure that headers name are in lower case, as mentioned\n // here: https://nodejs.org/api/http.html#http_message_headers.\n return this._readableStream.headers[name.toLowerCase()];\n },\n isHttp: stream.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange,\n });\n\n if (allowRangeRequests) {\n this._isRangeSupported = true;\n }\n // Setting right content length.\n this._contentLength = suggestedLength;\n };\n\n this._request = null;\n if (this._url.protocol === 'http:') {\n this._request = http.request(createRequestOptions(\n this._url, stream.httpHeaders), handleResponse);\n } else {\n this._request = https.request(createRequestOptions(\n this._url, stream.httpHeaders), handleResponse);\n }\n\n this._request.on('error', (reason) => {\n this._errored = true;\n this._reason = reason;\n this._headersCapability.reject(reason);\n });\n // Note: `request.end(data)` is used to write `data` to request body\n // and notify end of request. But one should always call `request.end()`\n // even if there is no data to write -- (to notify the end of request).\n this._request.end();\n }\n}\n\nclass PDFNodeStreamRangeReader extends BaseRangeReader {\n constructor(stream, start, end) {\n super(stream);\n\n this._httpHeaders = {};\n for (let property in stream.httpHeaders) {\n let value = stream.httpHeaders[property];\n if (typeof value === 'undefined') {\n continue;\n }\n this._httpHeaders[property] = value;\n }\n this._httpHeaders['Range'] = `bytes=${start}-${end - 1}`;\n\n this._request = null;\n if (this._url.protocol === 'http:') {\n this._request = http.request(createRequestOptions(\n this._url, this._httpHeaders), (response) => {\n this._setReadableStream(response);\n });\n } else {\n this._request = https.request(createRequestOptions(\n this._url, this._httpHeaders), (response) => {\n this._setReadableStream(response);\n });\n }\n\n this._request.on('error', (reason) => {\n this._errored = true;\n this._reason = reason;\n });\n this._request.end();\n }\n}\n\nclass PDFNodeStreamFsFullReader extends BaseFullReader {\n constructor(stream) {\n super(stream);\n let path = decodeURI(this._url.path);\n\n fs.lstat(path, (error, stat) => {\n if (error) {\n this._errored = true;\n this._reason = error;\n this._headersCapability.reject(error);\n return;\n }\n // Setting right content length.\n this._contentLength = stat.size;\n\n this._setReadableStream(fs.createReadStream(path));\n this._headersCapability.resolve();\n });\n }\n}\n\nclass PDFNodeStreamFsRangeReader extends BaseRangeReader {\n constructor(stream, start, end) {\n super(stream);\n\n this._setReadableStream(\n fs.createReadStream(decodeURI(this._url.path), { start, end: end - 1, }));\n }\n}\n\nexport {\n PDFNodeStream,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/node_stream.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AbortException, assert, createPromiseCapability\n} from '../shared/util';\nimport {\n createResponseStatusError, validateRangeRequestCapabilities,\n validateResponseStatus\n} from './network_utils';\n\nfunction createFetchOptions(headers, withCredentials) {\n return {\n method: 'GET',\n headers,\n mode: 'cors',\n credentials: withCredentials ? 'include' : 'same-origin',\n redirect: 'follow',\n };\n}\n\nclass PDFFetchStream {\n constructor(options) {\n this.options = options;\n this.source = options.source;\n this.isHttp = /^https?:/i.test(this.source.url);\n this.httpHeaders = (this.isHttp && this.source.httpHeaders) || {};\n\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n\n getFullReader() {\n assert(!this._fullRequestReader);\n this._fullRequestReader = new PDFFetchStreamReader(this);\n return this._fullRequestReader;\n }\n\n getRangeReader(begin, end) {\n let reader = new PDFFetchStreamRangeReader(this, begin, end);\n this._rangeRequestReaders.push(reader);\n return reader;\n }\n\n cancelAllRequests(reason) {\n if (this._fullRequestReader) {\n this._fullRequestReader.cancel(reason);\n }\n let readers = this._rangeRequestReaders.slice(0);\n readers.forEach(function(reader) {\n reader.cancel(reason);\n });\n }\n}\n\nclass PDFFetchStreamReader {\n constructor(stream) {\n this._stream = stream;\n this._reader = null;\n this._loaded = 0;\n this._withCredentials = stream.source.withCredentials;\n this._contentLength = this._stream.source.length;\n this._headersCapability = createPromiseCapability();\n this._disableRange = this._stream.options.disableRange;\n this._rangeChunkSize = this._stream.source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n\n this._isRangeSupported = !this._stream.options.disableRange;\n this._isStreamingSupported = !this._stream.source.disableStream;\n\n this._headers = new Headers();\n for (let property in this._stream.httpHeaders) {\n let value = this._stream.httpHeaders[property];\n if (typeof value === 'undefined') {\n continue;\n }\n this._headers.append(property, value);\n }\n\n let url = this._stream.source.url;\n fetch(url, createFetchOptions(this._headers, this._withCredentials)).\n then((response) => {\n if (!validateResponseStatus(response.status)) {\n throw createResponseStatusError(response.status, url);\n }\n this._reader = response.body.getReader();\n this._headersCapability.resolve();\n\n let { allowRangeRequests, suggestedLength, } =\n validateRangeRequestCapabilities({\n getResponseHeader: (name) => {\n return response.headers.get(name);\n },\n isHttp: this._stream.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange,\n });\n\n this._contentLength = suggestedLength;\n this._isRangeSupported = allowRangeRequests;\n\n // We need to stop reading when range is supported and streaming is\n // disabled.\n if (!this._isStreamingSupported && this._isRangeSupported) {\n this.cancel(new AbortException('streaming is disabled'));\n }\n }).catch(this._headersCapability.reject);\n\n this.onProgress = null;\n }\n\n get headersReady() {\n return this._headersCapability.promise;\n }\n\n get contentLength() {\n return this._contentLength;\n }\n\n get isRangeSupported() {\n return this._isRangeSupported;\n }\n\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n\n read() {\n return this._headersCapability.promise.then(() => {\n return this._reader.read().then(({ value, done, }) => {\n if (done) {\n return Promise.resolve({ value, done, });\n }\n this._loaded += value.byteLength;\n if (this.onProgress) {\n this.onProgress({\n loaded: this._loaded,\n total: this._contentLength,\n });\n }\n let buffer = new Uint8Array(value).buffer;\n return Promise.resolve({ value: buffer, done: false, });\n });\n });\n }\n\n cancel(reason) {\n if (this._reader) {\n this._reader.cancel(reason);\n }\n }\n}\n\nclass PDFFetchStreamRangeReader {\n constructor(stream, begin, end) {\n this._stream = stream;\n this._reader = null;\n this._loaded = 0;\n this._withCredentials = stream.source.withCredentials;\n this._readCapability = createPromiseCapability();\n this._isStreamingSupported = !stream.source.disableStream;\n\n this._headers = new Headers();\n for (let property in this._stream.httpHeaders) {\n let value = this._stream.httpHeaders[property];\n if (typeof value === 'undefined') {\n continue;\n }\n this._headers.append(property, value);\n }\n\n let rangeStr = begin + '-' + (end - 1);\n this._headers.append('Range', 'bytes=' + rangeStr);\n let url = this._stream.source.url;\n fetch(url, createFetchOptions(this._headers, this._withCredentials)).\n then((response) => {\n if (!validateResponseStatus(response.status)) {\n throw createResponseStatusError(response.status, url);\n }\n this._readCapability.resolve();\n this._reader = response.body.getReader();\n });\n\n this.onProgress = null;\n }\n\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n\n read() {\n return this._readCapability.promise.then(() => {\n return this._reader.read().then(({ value, done, }) => {\n if (done) {\n return Promise.resolve({ value, done, });\n }\n this._loaded += value.byteLength;\n if (this.onProgress) {\n this.onProgress({ loaded: this._loaded, });\n }\n let buffer = new Uint8Array(value).buffer;\n return Promise.resolve({ value: buffer, done: false, });\n });\n });\n }\n\n cancel(reason) {\n if (this._reader) {\n this._reader.cancel(reason);\n }\n }\n}\n\nexport {\n PDFFetchStream,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/fetch_stream.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { assert, createPromiseCapability, stringToBytes } from '../shared/util';\nimport {\n createResponseStatusError, validateRangeRequestCapabilities\n} from './network_utils';\nimport globalScope from '../shared/global_scope';\n\nif (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n throw new Error('Module \"./network\" shall not ' +\n 'be used with FIREFOX or MOZCENTRAL build.');\n}\n\nvar OK_RESPONSE = 200;\nvar PARTIAL_CONTENT_RESPONSE = 206;\n\nfunction NetworkManager(url, args) {\n this.url = url;\n args = args || {};\n this.isHttp = /^https?:/i.test(url);\n this.httpHeaders = (this.isHttp && args.httpHeaders) || {};\n this.withCredentials = args.withCredentials || false;\n this.getXhr = args.getXhr ||\n function NetworkManager_getXhr() {\n return new XMLHttpRequest();\n };\n\n this.currXhrId = 0;\n this.pendingRequests = Object.create(null);\n this.loadedRequests = Object.create(null);\n}\n\nfunction getArrayBuffer(xhr) {\n var data = xhr.response;\n if (typeof data !== 'string') {\n return data;\n }\n let array = stringToBytes(data);\n return array.buffer;\n}\n\nvar supportsMozChunked =\n typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') ? false :\n (function supportsMozChunkedClosure() {\n try {\n var x = new XMLHttpRequest();\n // Firefox 37- required .open() to be called before setting responseType.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=707484\n // Even though the URL is not visited, .open() could fail if the URL is\n // blocked, e.g. via the connect-src CSP directive or the NoScript addon.\n // When this error occurs, this feature detection method will mistakenly\n // report that moz-chunked-arraybuffer is not supported in Firefox 37-.\n x.open('GET', globalScope.location.href);\n x.responseType = 'moz-chunked-arraybuffer';\n return x.responseType === 'moz-chunked-arraybuffer';\n } catch (e) {\n return false;\n }\n})();\n\nNetworkManager.prototype = {\n requestRange: function NetworkManager_requestRange(begin, end, listeners) {\n var args = {\n begin,\n end,\n };\n for (var prop in listeners) {\n args[prop] = listeners[prop];\n }\n return this.request(args);\n },\n\n requestFull: function NetworkManager_requestFull(listeners) {\n return this.request(listeners);\n },\n\n request: function NetworkManager_request(args) {\n var xhr = this.getXhr();\n var xhrId = this.currXhrId++;\n var pendingRequest = this.pendingRequests[xhrId] = {\n xhr,\n };\n\n xhr.open('GET', this.url);\n xhr.withCredentials = this.withCredentials;\n for (var property in this.httpHeaders) {\n var value = this.httpHeaders[property];\n if (typeof value === 'undefined') {\n continue;\n }\n xhr.setRequestHeader(property, value);\n }\n if (this.isHttp && 'begin' in args && 'end' in args) {\n var rangeStr = args.begin + '-' + (args.end - 1);\n xhr.setRequestHeader('Range', 'bytes=' + rangeStr);\n pendingRequest.expectedStatus = 206;\n } else {\n pendingRequest.expectedStatus = 200;\n }\n\n var useMozChunkedLoading = supportsMozChunked && !!args.onProgressiveData;\n if (useMozChunkedLoading) {\n xhr.responseType = 'moz-chunked-arraybuffer';\n pendingRequest.onProgressiveData = args.onProgressiveData;\n pendingRequest.mozChunked = true;\n } else {\n xhr.responseType = 'arraybuffer';\n }\n\n if (args.onError) {\n xhr.onerror = function(evt) {\n args.onError(xhr.status);\n };\n }\n xhr.onreadystatechange = this.onStateChange.bind(this, xhrId);\n xhr.onprogress = this.onProgress.bind(this, xhrId);\n\n pendingRequest.onHeadersReceived = args.onHeadersReceived;\n pendingRequest.onDone = args.onDone;\n pendingRequest.onError = args.onError;\n pendingRequest.onProgress = args.onProgress;\n\n xhr.send(null);\n\n return xhrId;\n },\n\n onProgress: function NetworkManager_onProgress(xhrId, evt) {\n var pendingRequest = this.pendingRequests[xhrId];\n if (!pendingRequest) {\n // Maybe abortRequest was called...\n return;\n }\n\n if (pendingRequest.mozChunked) {\n var chunk = getArrayBuffer(pendingRequest.xhr);\n pendingRequest.onProgressiveData(chunk);\n }\n\n var onProgress = pendingRequest.onProgress;\n if (onProgress) {\n onProgress(evt);\n }\n },\n\n onStateChange: function NetworkManager_onStateChange(xhrId, evt) {\n var pendingRequest = this.pendingRequests[xhrId];\n if (!pendingRequest) {\n // Maybe abortRequest was called...\n return;\n }\n\n var xhr = pendingRequest.xhr;\n if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) {\n pendingRequest.onHeadersReceived();\n delete pendingRequest.onHeadersReceived;\n }\n\n if (xhr.readyState !== 4) {\n return;\n }\n\n if (!(xhrId in this.pendingRequests)) {\n // The XHR request might have been aborted in onHeadersReceived()\n // callback, in which case we should abort request\n return;\n }\n\n delete this.pendingRequests[xhrId];\n\n // success status == 0 can be on ftp, file and other protocols\n if (xhr.status === 0 && this.isHttp) {\n if (pendingRequest.onError) {\n pendingRequest.onError(xhr.status);\n }\n return;\n }\n var xhrStatus = xhr.status || OK_RESPONSE;\n\n // From http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.2:\n // \"A server MAY ignore the Range header\". This means it's possible to\n // get a 200 rather than a 206 response from a range request.\n var ok_response_on_range_request =\n xhrStatus === OK_RESPONSE &&\n pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE;\n\n if (!ok_response_on_range_request &&\n xhrStatus !== pendingRequest.expectedStatus) {\n if (pendingRequest.onError) {\n pendingRequest.onError(xhr.status);\n }\n return;\n }\n\n this.loadedRequests[xhrId] = true;\n\n var chunk = getArrayBuffer(xhr);\n if (xhrStatus === PARTIAL_CONTENT_RESPONSE) {\n var rangeHeader = xhr.getResponseHeader('Content-Range');\n var matches = /bytes (\\d+)-(\\d+)\\/(\\d+)/.exec(rangeHeader);\n var begin = parseInt(matches[1], 10);\n pendingRequest.onDone({\n begin,\n chunk,\n });\n } else if (pendingRequest.onProgressiveData) {\n pendingRequest.onDone(null);\n } else if (chunk) {\n pendingRequest.onDone({\n begin: 0,\n chunk,\n });\n } else if (pendingRequest.onError) {\n pendingRequest.onError(xhr.status);\n }\n },\n\n hasPendingRequests: function NetworkManager_hasPendingRequests() {\n for (var xhrId in this.pendingRequests) {\n return true;\n }\n return false;\n },\n\n getRequestXhr: function NetworkManager_getXhr(xhrId) {\n return this.pendingRequests[xhrId].xhr;\n },\n\n isStreamingRequest: function NetworkManager_isStreamingRequest(xhrId) {\n return !!(this.pendingRequests[xhrId].onProgressiveData);\n },\n\n isPendingRequest: function NetworkManager_isPendingRequest(xhrId) {\n return xhrId in this.pendingRequests;\n },\n\n isLoadedRequest: function NetworkManager_isLoadedRequest(xhrId) {\n return xhrId in this.loadedRequests;\n },\n\n abortAllRequests: function NetworkManager_abortAllRequests() {\n for (var xhrId in this.pendingRequests) {\n this.abortRequest(xhrId | 0);\n }\n },\n\n abortRequest: function NetworkManager_abortRequest(xhrId) {\n var xhr = this.pendingRequests[xhrId].xhr;\n delete this.pendingRequests[xhrId];\n xhr.abort();\n },\n};\n\n/** @implements {IPDFStream} */\nfunction PDFNetworkStream(options) {\n this._options = options;\n var source = options.source;\n this._manager = new NetworkManager(source.url, {\n httpHeaders: source.httpHeaders,\n withCredentials: source.withCredentials,\n });\n this._rangeChunkSize = source.rangeChunkSize;\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n}\n\nPDFNetworkStream.prototype = {\n _onRangeRequestReaderClosed:\n function PDFNetworkStream_onRangeRequestReaderClosed(reader) {\n var i = this._rangeRequestReaders.indexOf(reader);\n if (i >= 0) {\n this._rangeRequestReaders.splice(i, 1);\n }\n },\n\n getFullReader: function PDFNetworkStream_getFullReader() {\n assert(!this._fullRequestReader);\n this._fullRequestReader =\n new PDFNetworkStreamFullRequestReader(this._manager, this._options);\n return this._fullRequestReader;\n },\n\n getRangeReader: function PDFNetworkStream_getRangeReader(begin, end) {\n var reader = new PDFNetworkStreamRangeRequestReader(this._manager,\n begin, end);\n reader.onClosed = this._onRangeRequestReaderClosed.bind(this);\n this._rangeRequestReaders.push(reader);\n return reader;\n },\n\n cancelAllRequests: function PDFNetworkStream_cancelAllRequests(reason) {\n if (this._fullRequestReader) {\n this._fullRequestReader.cancel(reason);\n }\n var readers = this._rangeRequestReaders.slice(0);\n readers.forEach(function (reader) {\n reader.cancel(reason);\n });\n },\n};\n\n/** @implements {IPDFStreamReader} */\nfunction PDFNetworkStreamFullRequestReader(manager, options) {\n this._manager = manager;\n\n var source = options.source;\n var args = {\n onHeadersReceived: this._onHeadersReceived.bind(this),\n onProgressiveData: source.disableStream ? null :\n this._onProgressiveData.bind(this),\n onDone: this._onDone.bind(this),\n onError: this._onError.bind(this),\n onProgress: this._onProgress.bind(this),\n };\n this._url = source.url;\n this._fullRequestId = manager.requestFull(args);\n this._headersReceivedCapability = createPromiseCapability();\n this._disableRange = options.disableRange || false;\n this._contentLength = source.length; // optional\n this._rangeChunkSize = source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n\n this._isStreamingSupported = false;\n this._isRangeSupported = false;\n\n this._cachedChunks = [];\n this._requests = [];\n this._done = false;\n this._storedError = undefined;\n\n this.onProgress = null;\n}\n\nPDFNetworkStreamFullRequestReader.prototype = {\n _onHeadersReceived:\n function PDFNetworkStreamFullRequestReader_onHeadersReceived() {\n var fullRequestXhrId = this._fullRequestId;\n var fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId);\n\n let { allowRangeRequests, suggestedLength, } =\n validateRangeRequestCapabilities({\n getResponseHeader: (name) => {\n return fullRequestXhr.getResponseHeader(name);\n },\n isHttp: this._manager.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange,\n });\n\n // Setting right content length.\n this._contentLength = suggestedLength || this._contentLength;\n\n if (allowRangeRequests) {\n this._isRangeSupported = true;\n }\n\n var networkManager = this._manager;\n if (networkManager.isStreamingRequest(fullRequestXhrId)) {\n // We can continue fetching when progressive loading is enabled,\n // and we don't need the autoFetch feature.\n this._isStreamingSupported = true;\n } else if (this._isRangeSupported) {\n // NOTE: by cancelling the full request, and then issuing range\n // requests, there will be an issue for sites where you can only\n // request the pdf once. However, if this is the case, then the\n // server should not be returning that it can support range\n // requests.\n networkManager.abortRequest(fullRequestXhrId);\n }\n\n this._headersReceivedCapability.resolve();\n },\n\n _onProgressiveData:\n function PDFNetworkStreamFullRequestReader_onProgressiveData(chunk) {\n if (this._requests.length > 0) {\n var requestCapability = this._requests.shift();\n requestCapability.resolve({ value: chunk, done: false, });\n } else {\n this._cachedChunks.push(chunk);\n }\n },\n\n _onDone: function PDFNetworkStreamFullRequestReader_onDone(args) {\n if (args) {\n this._onProgressiveData(args.chunk);\n }\n this._done = true;\n if (this._cachedChunks.length > 0) {\n return;\n }\n this._requests.forEach(function (requestCapability) {\n requestCapability.resolve({ value: undefined, done: true, });\n });\n this._requests = [];\n },\n\n _onError: function PDFNetworkStreamFullRequestReader_onError(status) {\n var url = this._url;\n var exception = createResponseStatusError(status, url);\n this._storedError = exception;\n this._headersReceivedCapability.reject(exception);\n this._requests.forEach(function (requestCapability) {\n requestCapability.reject(exception);\n });\n this._requests = [];\n this._cachedChunks = [];\n },\n\n _onProgress: function PDFNetworkStreamFullRequestReader_onProgress(data) {\n if (this.onProgress) {\n this.onProgress({\n loaded: data.loaded,\n total: data.lengthComputable ? data.total : this._contentLength,\n });\n }\n },\n\n get isRangeSupported() {\n return this._isRangeSupported;\n },\n\n get isStreamingSupported() {\n return this._isStreamingSupported;\n },\n\n get contentLength() {\n return this._contentLength;\n },\n\n get headersReady() {\n return this._headersReceivedCapability.promise;\n },\n\n read: function PDFNetworkStreamFullRequestReader_read() {\n if (this._storedError) {\n return Promise.reject(this._storedError);\n }\n if (this._cachedChunks.length > 0) {\n var chunk = this._cachedChunks.shift();\n return Promise.resolve({ value: chunk, done: false, });\n }\n if (this._done) {\n return Promise.resolve({ value: undefined, done: true, });\n }\n var requestCapability = createPromiseCapability();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n },\n\n cancel: function PDFNetworkStreamFullRequestReader_cancel(reason) {\n this._done = true;\n this._headersReceivedCapability.reject(reason);\n this._requests.forEach(function (requestCapability) {\n requestCapability.resolve({ value: undefined, done: true, });\n });\n this._requests = [];\n if (this._manager.isPendingRequest(this._fullRequestId)) {\n this._manager.abortRequest(this._fullRequestId);\n }\n this._fullRequestReader = null;\n },\n};\n\n/** @implements {IPDFStreamRangeReader} */\nfunction PDFNetworkStreamRangeRequestReader(manager, begin, end) {\n this._manager = manager;\n var args = {\n onDone: this._onDone.bind(this),\n onProgress: this._onProgress.bind(this),\n };\n this._requestId = manager.requestRange(begin, end, args);\n this._requests = [];\n this._queuedChunk = null;\n this._done = false;\n\n this.onProgress = null;\n this.onClosed = null;\n}\n\nPDFNetworkStreamRangeRequestReader.prototype = {\n _close: function PDFNetworkStreamRangeRequestReader_close() {\n if (this.onClosed) {\n this.onClosed(this);\n }\n },\n\n _onDone: function PDFNetworkStreamRangeRequestReader_onDone(data) {\n var chunk = data.chunk;\n if (this._requests.length > 0) {\n var requestCapability = this._requests.shift();\n requestCapability.resolve({ value: chunk, done: false, });\n } else {\n this._queuedChunk = chunk;\n }\n this._done = true;\n this._requests.forEach(function (requestCapability) {\n requestCapability.resolve({ value: undefined, done: true, });\n });\n this._requests = [];\n this._close();\n },\n\n _onProgress: function PDFNetworkStreamRangeRequestReader_onProgress(evt) {\n if (!this.isStreamingSupported && this.onProgress) {\n this.onProgress({\n loaded: evt.loaded,\n });\n }\n },\n\n get isStreamingSupported() {\n return false; // TODO allow progressive range bytes loading\n },\n\n read: function PDFNetworkStreamRangeRequestReader_read() {\n if (this._queuedChunk !== null) {\n var chunk = this._queuedChunk;\n this._queuedChunk = null;\n return Promise.resolve({ value: chunk, done: false, });\n }\n if (this._done) {\n return Promise.resolve({ value: undefined, done: true, });\n }\n var requestCapability = createPromiseCapability();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n },\n\n cancel: function PDFNetworkStreamRangeRequestReader_cancel(reason) {\n this._done = true;\n this._requests.forEach(function (requestCapability) {\n requestCapability.resolve({ value: undefined, done: true, });\n });\n this._requests = [];\n if (this._manager.isPendingRequest(this._requestId)) {\n this._manager.abortRequest(this._requestId);\n }\n this._close();\n },\n};\n\nexport {\n PDFNetworkStream,\n NetworkManager,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/display/network.js"],"sourceRoot":""}
|
Binary file
|
Binary file
|